Fixed cmdline netplay
This commit is contained in:
@@ -52,7 +52,14 @@ NEWSYM UIAsmStart
|
|||||||
|
|
||||||
; Function 0501h
|
; Function 0501h
|
||||||
; User Interface
|
; User Interface
|
||||||
|
|
||||||
; Search for CMDLINE= for commandline entry
|
; Search for CMDLINE= for commandline entry
|
||||||
|
|
||||||
|
|
||||||
|
NEWSYM CmdLineNetPlay, db 0
|
||||||
|
NEWSYM CmdLineTCPIPAddress, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
EXTSYM TCPIPAddress
|
||||||
|
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
|
||||||
NEWSYM zstart
|
NEWSYM zstart
|
||||||
@@ -68,6 +75,27 @@ NEWSYM zstart
|
|||||||
|
|
||||||
cld ;clear direction flag
|
cld ;clear direction flag
|
||||||
|
|
||||||
|
cmp byte[CmdLineNetPlay],0
|
||||||
|
je .nocmdlinenetplay
|
||||||
|
mov eax,[CmdLineTCPIPAddress]
|
||||||
|
mov [TCPIPAddress],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+4]
|
||||||
|
mov [TCPIPAddress+4],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+8]
|
||||||
|
mov [TCPIPAddress+8],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+12]
|
||||||
|
mov [TCPIPAddress+12],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+16]
|
||||||
|
mov [TCPIPAddress+16],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+20]
|
||||||
|
mov [TCPIPAddress+20],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+24]
|
||||||
|
mov [TCPIPAddress+24],eax
|
||||||
|
mov eax,[CmdLineTCPIPAddress+28]
|
||||||
|
mov [TCPIPAddress+28],eax
|
||||||
|
xor eax,eax
|
||||||
|
.nocmdlinenetplay
|
||||||
|
|
||||||
call setnoise
|
call setnoise
|
||||||
call InitSPC
|
call InitSPC
|
||||||
%ifndef __MSDOS__
|
%ifndef __MSDOS__
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ extern unsigned char Palette0, SPC700sh, OffBy1Line, DSPDisable,
|
|||||||
romtype, scanlines, showallext, smallscreenon, soundon,
|
romtype, scanlines, showallext, smallscreenon, soundon,
|
||||||
spcon, vsyncon, DisplayS, fname, filefound, SnowOn,
|
spcon, vsyncon, DisplayS, fname, filefound, SnowOn,
|
||||||
NetChatFirst,NetServer,NetNewNick,
|
NetChatFirst,NetServer,NetNewNick,
|
||||||
NetFilename,TCPIPAddress,NetQuitAfter,UDPConfig;
|
NetFilename,NetQuitAfter,UDPConfig,CmdLineNetPlay,
|
||||||
|
CmdLineTCPIPAddress;
|
||||||
|
|
||||||
void ccmdline(void);
|
void ccmdline(void);
|
||||||
|
|
||||||
@@ -170,7 +171,8 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdSh
|
|||||||
if (strptr<4) {
|
if (strptr<4) {
|
||||||
NetServer=0;
|
NetServer=0;
|
||||||
} else {
|
} else {
|
||||||
strp=&TCPIPAddress;
|
CmdLineNetPlay=1;
|
||||||
|
strp=&CmdLineTCPIPAddress;
|
||||||
strncpy(strp,ExtA[3],28);
|
strncpy(strp,ExtA[3],28);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user