V-WndCore.ASM
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:4k
源码类别:
模拟服务器
开发平台:
Asm
- ;EasyCodeName=MENU,1
- ;-----------------------------------------------------------------------------------
- ; VeMU
- ; Its a package that allows the user to set his own server of the game
- ; "MuOnline", this is not an emulator since i am not "emulating"
- ; what the actual games does, i am "creating" a method for set a Server
- ; of this Game.
- ;
- ; Copyright (C) 2010 Felipe Ya馿z
- ;
- ; This program is free software: you can redistribute it and/or modify
- ; it under the terms of the GNU General Public License as published by
- ; the Free Software Foundation, either version 3 of the License, or
- ; (at your option) any later version.
- ;
- ; This program is distributed in the hope that it will be useful,
- ; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ; GNU General Public License for more details.
- ;
- ; You should have received a copy of the GNU General Public License
- ; along with this program. If not, see http://www.gnu.org/licenses/.
- ;-----------------------------------------------------------------------------------
- ;-----------------------------------------------------------------------------------
- ; -----------------
- ; Coded /
- ; By /
- ; -={FeN$x)=-
- ; / Felipe Y.
- ; /
- ; -----------------
- ; Programming Lang: ASM
- ; Country: Chile
- ; My respect for all those who lost their lifes
- ; In the earthquake of my country...
- ; Let god take their spirits home...
- ;-----------------------------------------------------------------------------------
- WinMain Proto :DWord, :DWord, :DWord, :DWord
- WndProc Proto :Dword, :Dword, :Dword, :Dword
- .Const
- IDM_START Equ 1
- .Data
- szCommandLine DB MAX_PATH * 50 Dup(?) ;for hold the whole command line
- .Data?
- hInstance HINSTANCE ?
- CommandLine LPSTR ?
- .Code
- V_InitWindow Proc
- Invoke GetModuleHandle, NULL
- Mov hInstance, Eax
- Invoke GetCommandLine
- Mov CommandLine, Eax
- Invoke WinMain, hInstance, NULL, CommandLine, SW_SHOWDEFAULT
- Invoke ExitProcess, Eax
- Ret
- V_InitWindow EndP
- WinMain Proc hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdShow:DWord
- Local wc:WNDCLASSEX
- Local msg:MSG
- Local hWnd:HWND
- Mov wc.cbSize, SizeOf WNDCLASSEX
- Mov wc.style, CS_HREDRAW Or CS_VREDRAW
- Mov wc.lpfnWndProc, Offset WndProc
- Mov wc.cbClsExtra, NULL
- Mov wc.cbWndExtra, NULL
- Push hInst
- Pop wc.hInstance
- Mov wc.hbrBackground, COLOR_WINDOW + 1
- Mov wc.lpszMenuName, $CTA0("ValkMenu")
- Mov wc.lpszClassName, $CTA0("Valkyrie Project")
- Invoke LoadIcon, hInst, 500
- Mov wc.hIcon, Eax
- Mov wc.hIconSm, Eax
- Invoke LoadCursor, NULL, IDC_ARROW
- Mov wc.hCursor, Eax
- Invoke RegisterClassEx, Addr wc
- Invoke CreateWindowEx, NULL, $CTA0("Valkyrie Project"), $CTA0("Valkyrie Emulator"),
- WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, NULL, CW_USEDEFAULT, 0, NULL, NULL, hInst, NULL
- Mov GShWnd, Eax
- Invoke ShowWindow, GShWnd, SW_MAXIMIZE
- .While TRUE
- Invoke GetMessage, Addr msg, NULL, 0, 0
- .Break .If (!Eax)
- Invoke DispatchMessage, Addr msg
- .EndW
- Mov Eax, msg.wParam
- Ret
- WinMain EndP
- WndProc Proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
- .If uMsg == WM_DESTROY
- Invoke PostQuitMessage, NULL
- Xor Eax, Eax
- .ElseIf uMsg == WM_COMMAND
- Mov Eax, wParam
- .If Ax == IDM_START
- call V_InitGamePlay
- ;Call V_Sock_InitInternalClients
- .Else
- Invoke DestroyWindow, hWnd
- Xor Eax, Eax
- .EndIf
- .ElseIf uMsg == WM_PAINT
- Call V_Print_Run
- Call V_DisplayRect
- .Elseif uMsg == WM_ERASEBKGND
- Invoke DefWindowProc, hWnd, uMsg, wParam, lParam
- .ElseIf uMsg == WM_LOG_PAINT
- invoke V_LogSystem_Print, wParam
- .Else
- invoke V_Sock_InternalAdmin, uMsg, lParam
- Invoke DefWindowProc, hWnd, uMsg, wParam, lParam
- .EndIf
- Ret
- WndProc EndP