V-EventChip.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:3k
源码类别:
模拟服务器
开发平台:
Asm
- ;EasyCodeName=Module1,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...
- ;-----------------------------------------------------------------------------------
- V_Event_ProtocolCore Proto :DWord, :DWord, :DWord
- .Const
- .Data?
- .Data
- .Code
- V_Event_ProtocolCore Proc PacketHeader:DWord, pRecvBuffer:DWord, PacketLength:DWord
- .const
- EventProto_MaxHeader Equ 7BH
- .Data
- ;===========
- ;Case Code
- ;===========
- EventCaseCode Byte 2 Dup (0, 1)
- ;===========
- ;jump table
- ;===========
- Align 4
- EventjmpTable DD Offset EventCase0
- DD Offset EventCase1
- .Code
- Mov Eax, PacketHeader
- .If (Eax > EventProto_MaxHeader)
- .else
- Xor Ecx, Ecx
- Mov Cl, Byte Ptr [Eax + EventCaseCode]
- Jmp DWord Ptr [Ecx * 4 + EventjmpTable] ;Jump table optimised C++
- EventCase0: ;Invalid case, i dont like Case 00
- Jmp EventEndProcedure
- EventCase1: ;SubHeader 01
- Jmp EventEndProcedure
- .endif
- EventEndProcedure:
- Ret
- V_Event_ProtocolCore EndP