Moved grayscale toggle code from C to ASM; enabled grayscale toggle in dos port
This commit is contained in:
@@ -54,6 +54,7 @@ EXTSYM DOSJoyRead
|
||||
EXTSYM pl1contrl,pl2contrl,pl3contrl,pl4contrl,pl5contrl
|
||||
EXTSYM BufferSizeW,BufferSizeB,ProcessSoundBuffer
|
||||
EXTSYM TCPIPPortNum
|
||||
EXTSYM V8Mode,GrayscaleMode
|
||||
; EXTSYM InitTCP
|
||||
; EXTSYM StartServer
|
||||
; EXTSYM InitTCP
|
||||
@@ -753,6 +754,13 @@ NEWSYM InitPreGame ; Executes before starting/continuing a game
|
||||
jc near interror
|
||||
mov [oldhand8s],cx
|
||||
mov [oldhand8o],edx
|
||||
|
||||
mov al,[GrayscaleMode]
|
||||
cmp al,[V8Mode]
|
||||
je .nochangemode
|
||||
xor byte[V8Mode],1
|
||||
.nochangemode
|
||||
|
||||
.nofs
|
||||
cmp byte[NoSoundReinit],1
|
||||
je .nosound
|
||||
|
||||
@@ -2183,9 +2183,7 @@ DisplayGUIVideoClick:
|
||||
je .nocheckboxttb
|
||||
GUIClickCButton5 11,163,byte[Triplebufen],1
|
||||
.nocheckboxttb
|
||||
%ifndef __MSDOS__
|
||||
GUIClickCButton 11,183,byte[GrayscaleMode]
|
||||
%endif
|
||||
%ifndef __LINUX__
|
||||
GUIClickCButton2 115,183,byte[vsyncon],byte[cfgvsync],1
|
||||
%endif
|
||||
|
||||
@@ -1705,9 +1705,7 @@ DisplayGUIVideo:
|
||||
je .notext8
|
||||
GUIOuttextwin2 5,26,178,GUIVideoText8b
|
||||
.notext8
|
||||
%ifndef __MSDOS__
|
||||
GUIOuttextwin2 5,26,188,GUIVideoText8c
|
||||
%endif
|
||||
GUIOuttextwin2 5,130,188,GUIVideoText9
|
||||
add byte[GUItextcolor],15
|
||||
|
||||
@@ -1800,9 +1798,7 @@ DisplayGUIVideo:
|
||||
je .notext8b
|
||||
GUIOuttextwin2 5,25,177,GUIVideoText8b
|
||||
.notext8b
|
||||
%ifndef __MSDOS__
|
||||
GUIOuttextwin2 5,25,187,GUIVideoText8c
|
||||
%endif
|
||||
GUIOuttextwin2 5,129,187,GUIVideoText9
|
||||
DrawGUIButton 5,128,60,164,71,GUIVideoText8,4,0,0
|
||||
mov al,[GUIWincol]
|
||||
@@ -1921,14 +1917,12 @@ DisplayGUIVideo:
|
||||
.nocheckbox1m72
|
||||
GUIDisplayIconWin 5,11,173,[GUITemp]
|
||||
.nocheckboxm72
|
||||
%ifndef __MSDOS__
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
cmp byte[GrayscaleMode],0
|
||||
je .nocheckboxm73
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||
.nocheckboxm73
|
||||
GUIDisplayIconWin 5,11,183,[GUITemp]
|
||||
%endif
|
||||
%ifndef __LINUX__
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
cmp byte[vsyncon],0
|
||||
|
||||
@@ -132,6 +132,7 @@ EXTSYM UDPDisableMode,UDPEnableMode,UDPClearVars,UDPWait1Sec
|
||||
EXTSYM WinErrorA2,WinErrorB2,WinErrorC2
|
||||
EXTSYM ZsnesPage
|
||||
EXTSYM GetLocalTime
|
||||
EXTSYM V8Mode,GrayscaleMode
|
||||
|
||||
NEWSYM WinIntRFAsmStart
|
||||
|
||||
@@ -808,6 +809,12 @@ NEWSYM InitPreGame ; Executes before starting/continuing a game
|
||||
call initwinvideo
|
||||
popad
|
||||
|
||||
mov al,[GrayscaleMode]
|
||||
cmp al,[V8Mode]
|
||||
je .nochangemode
|
||||
xor byte[V8Mode],1
|
||||
.nochangemode
|
||||
|
||||
mov byte[RaisePitch],1
|
||||
pushad
|
||||
call AdjustFrequency
|
||||
|
||||
@@ -675,16 +675,12 @@ void Stop36HZ(void)
|
||||
DWORD FirstVid = 1;
|
||||
DWORD FirstFull = 1;
|
||||
extern BYTE GUIWFVID[];
|
||||
extern BYTE GrayscaleMode;
|
||||
extern BYTE V8Mode;
|
||||
void clearwin();
|
||||
|
||||
void initwinvideo(void)
|
||||
{
|
||||
DWORD newmode = 0;
|
||||
|
||||
V8Mode = (GrayscaleMode == 1);
|
||||
|
||||
if (CurMode != cvidmode)
|
||||
{
|
||||
CurMode = cvidmode;
|
||||
|
||||
@@ -144,6 +144,7 @@ EXTSYM Disconnect
|
||||
EXTSYM UDPDisableMode,UDPEnableMode,UDPClearVars,UDPWait1Sec
|
||||
EXTSYM WinErrorA2,WinErrorB2,WinErrorC2
|
||||
EXTSYM ZsnesPage
|
||||
EXTSYM V8Mode,GrayscaleMode
|
||||
EXTSYM _imp__GetLocalTime@4
|
||||
|
||||
|
||||
@@ -985,8 +986,6 @@ NEWSYM Output_Text ; Output character (ah=02h) or string (ah=09h)
|
||||
ret
|
||||
|
||||
|
||||
NEWSYM TempBlah, dd 0
|
||||
|
||||
NEWSYM InitPreGame ; Executes before starting/continuing a game
|
||||
mov byte[pressed+1],2
|
||||
pushad
|
||||
@@ -997,6 +996,12 @@ NEWSYM InitPreGame ; Executes before starting/continuing a game
|
||||
call initwinvideo
|
||||
popad
|
||||
|
||||
mov al,[GrayscaleMode]
|
||||
cmp al,[V8Mode]
|
||||
je .nochangemode
|
||||
xor byte[V8Mode],1
|
||||
.nochangemode
|
||||
|
||||
mov byte[RaisePitch],1
|
||||
pushad
|
||||
call AdjustFrequency
|
||||
|
||||
@@ -1476,8 +1476,6 @@ void Stop36HZ(void)
|
||||
|
||||
char WinMessage[256];
|
||||
extern unsigned char cvidmode;
|
||||
extern BYTE GrayscaleMode;
|
||||
extern BYTE V8Mode;
|
||||
DWORD FirstVid=1;
|
||||
DWORD FirstFull=1;
|
||||
extern BYTE GUIWFVID[];
|
||||
@@ -1492,8 +1490,6 @@ void initwinvideo(void)
|
||||
RECT rc1, swrect;
|
||||
DWORD newmode=0;
|
||||
|
||||
V8Mode = (GrayscaleMode == 1);
|
||||
|
||||
if (CurMode!=cvidmode)
|
||||
{
|
||||
CurMode=cvidmode;
|
||||
|
||||
Reference in New Issue
Block a user