Lots of changes, moved some code around
This commit is contained in:
@@ -913,6 +913,9 @@ CalcChecksum:
|
|||||||
or bl,80h
|
or bl,80h
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
NEWSYM GUIRestoreVars
|
NEWSYM GUIRestoreVars
|
||||||
mov edx,GUIFName
|
mov edx,GUIFName
|
||||||
call Open_File
|
call Open_File
|
||||||
@@ -927,6 +930,20 @@ NEWSYM GUIRestoreVars
|
|||||||
mov [smallscreenon],al
|
mov [smallscreenon],al
|
||||||
mov al,[GUIScreenScale]
|
mov al,[GUIScreenScale]
|
||||||
mov [ScreenScale],al
|
mov [ScreenScale],al
|
||||||
|
cmp byte[CmdLineNetPlay],0
|
||||||
|
je .nocmdlinenetplay
|
||||||
|
mov ecx,28/4
|
||||||
|
mov esi,CmdLineTCPIPAddress
|
||||||
|
mov edi,TCPIPAddress
|
||||||
|
.netplayloop
|
||||||
|
mov eax,[esi]
|
||||||
|
add esi,byte 4
|
||||||
|
mov [edi],eax
|
||||||
|
add edi,byte 4
|
||||||
|
dec ecx
|
||||||
|
jnz .netplayloop
|
||||||
|
xor eax,eax
|
||||||
|
.nocmdlinenetplay
|
||||||
call CalcChecksum
|
call CalcChecksum
|
||||||
cmp byte[TimeChecker],bl
|
cmp byte[TimeChecker],bl
|
||||||
jne .nottimer
|
jne .nottimer
|
||||||
|
|||||||
@@ -1656,18 +1656,6 @@ NEWSYM headerhack
|
|||||||
mov byte[opexec358cph],47
|
mov byte[opexec358cph],47
|
||||||
.notclocktower
|
.notclocktower
|
||||||
|
|
||||||
mov esi,[romdata]
|
|
||||||
add esi,07FC0h
|
|
||||||
cmp dword[esi],'EQUI'
|
|
||||||
jne .notequinox
|
|
||||||
cmp dword[esi+4],'NOX '
|
|
||||||
jne .notequinox
|
|
||||||
mov byte[opexec268],243
|
|
||||||
mov byte[opexec358],234
|
|
||||||
mov byte[opexec268cph],58
|
|
||||||
mov byte[opexec358cph],58
|
|
||||||
.notequinox
|
|
||||||
|
|
||||||
mov esi,[romdata]
|
mov esi,[romdata]
|
||||||
add esi,07FC0h
|
add esi,07FC0h
|
||||||
cmp dword[esi],'DRAG'
|
cmp dword[esi],'DRAG'
|
||||||
|
|||||||
@@ -55,11 +55,6 @@ NEWSYM UIAsmStart
|
|||||||
|
|
||||||
; 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
|
||||||
@@ -75,21 +70,6 @@ NEWSYM zstart
|
|||||||
|
|
||||||
cld ;clear direction flag
|
cld ;clear direction flag
|
||||||
|
|
||||||
cmp byte[CmdLineNetPlay],0
|
|
||||||
je .nocmdlinenetplay
|
|
||||||
mov ecx,28/4
|
|
||||||
mov esi,CmdLineTCPIPAddress
|
|
||||||
mov edi,TCPIPAddress
|
|
||||||
.netplayloop
|
|
||||||
mov eax,[esi]
|
|
||||||
add esi,byte 4
|
|
||||||
mov [edi],eax
|
|
||||||
add edi,byte 4
|
|
||||||
dec ecx
|
|
||||||
jnz .netplayloop
|
|
||||||
xor eax,eax
|
|
||||||
.nocmdlinenetplay
|
|
||||||
|
|
||||||
%ifndef __MSDOS__
|
%ifndef __MSDOS__
|
||||||
cmp byte[FirstTimeData],1
|
cmp byte[FirstTimeData],1
|
||||||
je .nofirsttime
|
je .nofirsttime
|
||||||
|
|||||||
@@ -1255,6 +1255,7 @@ int InitDirectDraw()
|
|||||||
if (pDirectDrawCreateEx(NULL, (void **)&lpDD, IID_IDirectDraw7, NULL) != DD_OK)
|
if (pDirectDrawCreateEx(NULL, (void **)&lpDD, IID_IDirectDraw7, NULL) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "DirectDrawCreateEx failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "DirectDrawCreateEx failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FullScreen == 1)
|
if (FullScreen == 1)
|
||||||
@@ -1262,10 +1263,12 @@ int InitDirectDraw()
|
|||||||
if (lpDD->SetCooperativeLevel(hMainWindow, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT) != DD_OK)
|
if (lpDD->SetCooperativeLevel(hMainWindow, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDraw7::SetCooperativeLevel failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDraw7::SetCooperativeLevel failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (lpDD->SetDisplayMode(WindowWidth, WindowHeight, 16, 0, 0) != DD_OK)
|
if (lpDD->SetDisplayMode(WindowWidth, WindowHeight, 16, 0, 0) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDraw7::SetDisplayMode failed.\nMake sure your video card supports this mode.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDraw7::SetDisplayMode failed.\nMake sure your video card supports this mode.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1273,6 +1276,7 @@ int InitDirectDraw()
|
|||||||
if (lpDD->SetCooperativeLevel(hMainWindow, DDSCL_NORMAL) != DD_OK)
|
if (lpDD->SetCooperativeLevel(hMainWindow, DDSCL_NORMAL) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDraw7::SetCooperativeLevel failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDraw7::SetCooperativeLevel failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
CheckAlwaysOnTop();
|
CheckAlwaysOnTop();
|
||||||
}
|
}
|
||||||
@@ -1292,6 +1296,7 @@ int InitDirectDraw()
|
|||||||
if (lpDD->CreateSurface(&ddsd2, &DD_Primary, NULL) != DD_OK)
|
if (lpDD->CreateSurface(&ddsd2, &DD_Primary, NULL) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDraw7::CreateSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDraw7::CreateSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FullScreen == 1)
|
if (FullScreen == 1)
|
||||||
@@ -1300,6 +1305,7 @@ int InitDirectDraw()
|
|||||||
if (DD_Primary->GetAttachedSurface(&ddsd2.ddsCaps, &DD_BackBuffer) != DD_OK)
|
if (DD_Primary->GetAttachedSurface(&ddsd2.ddsCaps, &DD_BackBuffer) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDrawSurface7::GetAttachedSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDrawSurface7::GetAttachedSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1329,6 +1335,7 @@ int InitDirectDraw()
|
|||||||
if (DD_Primary->GetPixelFormat(&format) != DD_OK)
|
if (DD_Primary->GetPixelFormat(&format) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDrawSurface7::GetPixelFormat failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDrawSurface7::GetPixelFormat failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BitDepth=format.dwRGBBitCount;
|
BitDepth=format.dwRGBBitCount;
|
||||||
@@ -1352,6 +1359,7 @@ int InitDirectDraw()
|
|||||||
if (lpDD->CreateSurface(&ddsd2, &DD_CFB, NULL) != DD_OK)
|
if (lpDD->CreateSurface(&ddsd2, &DD_CFB, NULL) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(NULL, "IDirectDraw7::CreateSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
MessageBox(NULL, "IDirectDraw7::CreateSurface failed.", "DirectDraw Error", MB_ICONERROR);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user