Added overlay support to GUI

This commit is contained in:
pagefault
2001-06-14 23:38:48 +00:00
parent 11b981549f
commit c42d644b7a
5 changed files with 28 additions and 11 deletions

View File

@@ -585,6 +585,8 @@ NEWSYM TripleBufferWin, db 0
NEWSYM ExclusiveSound, db 0 NEWSYM ExclusiveSound, db 0
NEWSYM OverlayEnabled, db 0
GUIsave equ $-GUIRAdd GUIsave equ $-GUIRAdd
NEWSYM CombinDataGlob, times 3300 db 0 ; 20-name, 42-combo, 2-key#, 1-P#, 1-ff NEWSYM CombinDataGlob, times 3300 db 0 ; 20-name, 42-combo, 2-key#, 1-P#, 1-ff
@@ -602,9 +604,9 @@ ModemOKStat db 0 ; OK is detected on modem status
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO ; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50 GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,26 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60 GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,22 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,13*16,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160 GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,13*16,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,178 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60 GUIwinsizey dd 0,190 ,3*16,166 ,190 ,196 ,184 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60
GUIwinptr db 0 GUIwinptr db 0
GUItextcolor db 0,0,0,0,0 GUItextcolor db 0,0,0,0,0

View File

@@ -888,11 +888,12 @@ GUIOptionKeys:
jne .nosavepath jne .nosavepath
xor byte[DontSavePath],1 xor byte[DontSavePath],1
.nosavepath .nosavepath
cmp dh,'I'
jne .nospcdisable
xor byte[SPCDisable],1
.nospcdisable
%ifdef __WIN32__ %ifdef __WIN32__
cmp dh,'Y'
jne .nooverlay
xor byte[OverlayEnabled],1
call guimustrestartmsg
.nooverlay
cmp dh,'S' cmp dh,'S'
jne .noalttimer jne .noalttimer
xor byte[AlternateTimer],1 xor byte[AlternateTimer],1
@@ -1026,6 +1027,10 @@ GUISoundKeys:
xor byte[ExclusiveSound],1 xor byte[ExclusiveSound],1
.noexclusivesound .noexclusivesound
%endif %endif
cmp dh,'D'
jne .nospcdisable
xor byte[SPCDisable],1
.nospcdisable
ret ret
.sampratenext db 1,4,5,6,2,3,0,0,0,0 .sampratenext db 1,4,5,6,2,3,0,0,0,0

View File

@@ -2119,8 +2119,8 @@ DisplayGUIOptionClick:
GUIClickCButton 11,146,byte[LatestSave] GUIClickCButton 11,146,byte[LatestSave]
GUIClickCButton 11,156,byte[AutoState] GUIClickCButton 11,156,byte[AutoState]
GUIClickCButton 11,166,byte[DontSavePath] GUIClickCButton 11,166,byte[DontSavePath]
GUIClickCButton 11,176,byte[SPCDisable]
%ifdef __WIN32__ %ifdef __WIN32__
GUIClickCButtonat 11,176,byte[OverlayEnabled]
GUIClickCButtonat 11,186,byte[AlternateTimer] GUIClickCButtonat 11,186,byte[AlternateTimer]
%endif %endif
; Frameskip = 0 ; Frameskip = 0
@@ -2252,6 +2252,7 @@ DisplayGUISoundClick:
%ifdef __WIN32__ %ifdef __WIN32__
GUIClickCButton 11,171,byte[ExclusiveSound] GUIClickCButton 11,171,byte[ExclusiveSound]
%endif %endif
GUIClickCButton 11,181,byte[SPCDisable]
cmp eax,15 cmp eax,15
jl near .nosrate jl near .nosrate
cmp edx,61 cmp edx,61

View File

@@ -1374,7 +1374,7 @@ DisplayGUIOption:
GUIOuttextwin2u 4,26,151,GUIOptionTextH,9 GUIOuttextwin2u 4,26,151,GUIOptionTextH,9
GUIOuttextwin2u 4,26,161,GUIOptionTextI,15 GUIOuttextwin2u 4,26,161,GUIOptionTextI,15
GUIOuttextwin2u 4,26,171,GUIOptionTextJ,0 GUIOuttextwin2u 4,26,171,GUIOptionTextJ,0
GUIOuttextwin2u 4,26,181,GUIOptionTextK,1 GUIOuttextwin2u 4,26,181,GUIOptionTextK,6
add byte[GUItextcolor],15 add byte[GUItextcolor],15
GUIOuttextwin2 4,5,15,[GUITemp] GUIOuttextwin2 4,5,15,[GUITemp]
GUIOuttextwin2 4,25,30,GUIOptionText2 GUIOuttextwin2 4,25,30,GUIOptionText2
@@ -1505,7 +1505,7 @@ DisplayGUIOption:
.nocheckbox13 .nocheckbox13
GUIDisplayIconWin 4,11,166,[GUITemp] GUIDisplayIconWin 4,11,166,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[SPCDisable],0 cmp byte[OverlayEnabled],0
je .nocheckbox14 je .nocheckbox14
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox14 .nocheckbox14
@@ -1580,7 +1580,7 @@ GUIOptionTextG db 'OLD GFX MODE 2',0
GUIOptionTextH db 'START AT LATEST SAVE',0 GUIOptionTextH db 'START AT LATEST SAVE',0
GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0 GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0
GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0 GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0
GUIOptionTextK db 'DISABLE SOUND CPU EMU',0 GUIOptionTextK db 'OVERLAY SUPPORT',0
GUIOptionTextL db 'USE ALTERNATE TIMER',0 GUIOptionTextL db 'USE ALTERNATE TIMER',0
GUIOptionText8 db '-',0 GUIOptionText8 db '-',0
GUIOptionText9 db '+',0 GUIOptionText9 db '+',0
@@ -2142,6 +2142,7 @@ DisplayGUISound:
GUIOuttextwin2u 6,26,166,GUISoundTextM,0 GUIOuttextwin2u 6,26,166,GUISoundTextM,0
%ifdef __WIN32__ %ifdef __WIN32__
GUIOuttextwin2u 6,26,176,GUISoundTextN,1 GUIOuttextwin2u 6,26,176,GUISoundTextN,1
GUIOuttextwin2u 6,26,186,GUISoundTextO,0
%endif %endif
add byte[GUItextcolor],15 add byte[GUItextcolor],15
GUIOuttextwin2 6,25,25,GUISoundText1 GUIOuttextwin2 6,25,25,GUISoundText1
@@ -2169,6 +2170,7 @@ DisplayGUISound:
GUIOuttextwin2 6,25,165,GUISoundTextM GUIOuttextwin2 6,25,165,GUISoundTextM
%ifdef __WIN32__ %ifdef __WIN32__
GUIOuttextwin2 6,25,175,GUISoundTextN GUIOuttextwin2 6,25,175,GUISoundTextN
GUIOuttextwin2 6,25,185,GUISoundTextO
%endif %endif
mov al,[GUIWincol] mov al,[GUIWincol]
mov byte[GUItextcolor],al mov byte[GUItextcolor],al
@@ -2268,6 +2270,12 @@ DisplayGUISound:
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox9 .nocheckbox9
GUIDisplayIconWin 6,11,171,[GUITemp] GUIDisplayIconWin 6,11,171,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[OverlayEnabled],0
je .nocheckbox10
mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox10
GUIDisplayIconWin 6,11,181,[GUITemp]
%endif %endif
DrawGUIWinBox 6,15,61,69,69,167 DrawGUIWinBox 6,15,61,69,69,167
mov dword[GUITemp],GUISoundText7 mov dword[GUITemp],GUISoundText7
@@ -2360,6 +2368,7 @@ GUISoundTextK db 'LOW PASS FILTER',0
GUISoundTextL db 'SOUND BUFFERING',0 GUISoundTextL db 'SOUND BUFFERING',0
GUISoundTextM db 'CUBIC SPLINE INTERP',0 GUISoundTextM db 'CUBIC SPLINE INTERP',0
GUISoundTextN db 'EXCLUSIVE MODE',0 GUISoundTextN db 'EXCLUSIVE MODE',0
GUISoundTextO db 'DISABLE SPC EMU',0
DisplayGUICheatConv: DisplayGUICheatConv:
mov eax,[ccheatnpos] mov eax,[ccheatnpos]

View File

@@ -44,7 +44,6 @@ DWORD FirstSound=1;
int AllowDefault=0; int AllowDefault=0;
int SoundEnabled=1; int SoundEnabled=1;
BYTE OverlayEnabled = 0;
DWORD Overlay = 0; DWORD Overlay = 0;
DWORD Overlay_failed = 0; DWORD Overlay_failed = 0;
DWORD Overlay_Colorkey = 0; DWORD Overlay_Colorkey = 0;
@@ -162,6 +161,7 @@ void DDrawError(){
extern "C" BYTE vsyncon; extern "C" BYTE vsyncon;
extern "C" BYTE TripleBufferWin; extern "C" BYTE TripleBufferWin;
extern "C" BYTE OverlayEnabled;
void DrawScreen() void DrawScreen()
{ {