V-IntConnectionsCFG.asm
资源名称:VeMU.rar [点击查看]
上传用户:santakups8
上传日期:2021-03-23
资源大小:544k
文件大小:7k
源码类别:
模拟服务器
开发平台:
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...
- ;-----------------------------------------------------------------------------------
- .Const
- DefaultServerCode Equ 0
- Default_Ranking_Port Equ 44455
- Default_EventChip_Port Equ 44456
- Default_CS_Port Equ 55557
- Default_JS_Port Equ 55970
- Default_ExDB_Port Equ 55906
- Default_DS1_Port Equ 55960
- Default_DS2_Port Equ 55962
- Default_GS_Port Equ 55901
- .Data
- ;////////////
- ;Strings
- ;///////////
- DefaultServerName DB "Valkyrie Emulator", 0
- DefaultServerVersion DB "0.00.1", 0
- IntConnectionsPath DB "./Data/InternalConnections.cfg", 0
- DefaultIP DB "127.0.0.1", 0
- ;////////////////////////////////////////////////
- ;GameServerCFG
- ServerName DB 50 Dup(0)
- ServerVersion DB 20 Dup(0)
- ServerCode Dword ?
- GSPort Dword ?
- ;JoynServerCFG
- JSPort Dword ?
- JSIP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;DataServersCFG
- DS2Port Dword ?
- DS2IP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- DS1Port Dword ?
- DS1IP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;RankingCFG
- RankingEventConnect DWord ?
- RankPort Dword ?
- RankIP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;EventChipCFG
- EventChipConnect DWord ?
- EventPort Dword ?
- EventIP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;ExDBCFG
- ExDBPort Dword ?
- ExDBIP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;ConnectServerCFG
- CSPort Dword ?
- CSIP DB 20 Dup(0) ; xxx.xxx.xxx.xxx IP length
- ;///////////////////////////////////////////////////
- .Data?
- .Code
- V_ReadIntConnectCFG Proc
- call V_ReadGameServerCfg
- Call V_ReadRankingServerCfg
- Call V_ReadEventChipCfg
- Call V_ReadConnectServerCfg
- Call V_ReadJoynServerCfg
- Call V_ReadExDBServerCfg
- Call V_ReadDataServersCfg
- Ret
- V_ReadIntConnectCFG EndP
- V_ReadGameServerCfg Proc
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("ServerName"), Addr DefaultServerName,
- Addr ServerName, SizeOf ServerName, Addr IntConnectionsPath
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("ServerVersion"), Addr DefaultServerVersion,
- Addr ServerVersion, SizeOf ServerVersion, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("GameServerPort"), Default_GS_Port, Addr IntConnectionsPath
- mov GSPort, eax
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("ServerCode"), DefaultServerCode, Addr IntConnectionsPath
- mov ServerCode, eax
- Ret
- V_ReadGameServerCfg EndP
- V_ReadDataServersCfg Proc
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("DataServerIP1"), Addr DefaultIP,
- Addr DS1IP, SizeOf DS1IP, Addr IntConnectionsPath
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("DataServerIP2"), Addr DefaultIP,
- Addr DS2IP, SizeOf DS2IP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("DataServerPort1"), Default_DS1_Port, Addr IntConnectionsPath
- Mov DS1Port, Eax
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("DataServerPort2"), Default_DS2_Port, Addr IntConnectionsPath
- Mov DS2Port, Eax
- Ret
- V_ReadDataServersCfg EndP
- V_ReadExDBServerCfg Proc
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("ExDBServerIP"), Addr DefaultIP,
- Addr ExDBIP, SizeOf ExDBIP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("ExDBServerPort"), Default_ExDB_Port, Addr IntConnectionsPath
- Mov ExDBPort, Eax
- Ret
- V_ReadExDBServerCfg EndP
- V_ReadJoynServerCfg Proc
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("JoynServerIP"), Addr DefaultIP,
- Addr JSIP, SizeOf JSIP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("JoynServerPort"), Default_JS_Port, Addr IntConnectionsPath
- Mov JSPort, Eax
- Ret
- V_ReadJoynServerCfg EndP
- V_ReadConnectServerCfg Proc
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("ConnectServerIP"), Addr DefaultIP,
- Addr CSIP, SizeOf CSIP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("ConnectServerPort"), Default_CS_Port, Addr IntConnectionsPath
- Mov CSPort, Eax
- Ret
- V_ReadConnectServerCfg EndP
- V_ReadRankingServerCfg Proc
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("RankingServerConnect"), ON, Addr IntConnectionsPath
- Mov RankingEventConnect, Eax
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("RankingServerIP"), Addr DefaultIP,
- Addr RankIP, SizeOf RankIP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("RankingServerPort"), Default_Ranking_Port, Addr IntConnectionsPath
- Mov RankPort, Eax
- Ret
- V_ReadRankingServerCfg EndP
- V_ReadEventChipCfg Proc
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("EventChipConnect"), ON, Addr IntConnectionsPath
- Mov EventChipConnect, Eax
- Invoke GetPrivateProfileString, $CTA0("InternalConnections"), $CTA0("EventChipIP"), Addr DefaultIP,
- Addr EventIP, SizeOf EventIP, Addr IntConnectionsPath
- Invoke GetPrivateProfileInt, $CTA0("InternalConnections"), $CTA0("EventChipPort"), Default_EventChip_Port, Addr IntConnectionsPath
- Mov EventPort, Eax
- Ret
- V_ReadEventChipCfg EndP