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