Added quick key for saving SPC data

This commit is contained in:
pagefault
2001-09-10 21:31:19 +00:00
parent ac43d3bfe5
commit 7242dd83b6
5 changed files with 25 additions and 31 deletions

View File

@@ -33,7 +33,7 @@ EXTSYM frameskip,initvideo,newgfx16b,oldhandSBo,oldhandSBs,soundon,cvidmode
EXTSYM vidbuffer,vidbufferofsa,vidbufferofsb,disable65816sh,GUISaveVars,virqnodisable
EXTSYM KeySaveState,KeyLoadState,KeyQuickExit,KeyQuickLoad,KeyQuickRst,GUIDoReset
EXTSYM KeyOnStA,KeyOnStB,ProcessKeyOn,printnum,sramsavedis,DSPDisable,C4Enable
EXTSYM KeyQuickClock,KeyQuickMinimize,TimerEnable,AutoIncSaveSlot
EXTSYM KeyQuickClock,KeyQuickSaveSPC,TimerEnable,AutoIncSaveSlot
EXTSYM IRQHack,HIRQLoc,Offby1line,splitflags,joinflags,KeyQuickSnapShot
EXTSYM csounddisable,videotroub,Open_File,Close_File,Read_File,ResetTripleBuf
EXTSYM Write_File,Output_Text,Create_File,Check_Key,Get_Key,Change_Dir,InitPreGame
@@ -115,15 +115,10 @@ EXTSYM fxbit01,fxbit01pcal,fxbit23,fxbit23pcal,fxbit45,fxbit45pcal,fxbit67,fxbit
EXTSYM SfxSFR,nosprincr,hirqmode2
EXTSYM cpucycle,debstop,switchtovirqdeb,debstop3,switchtonmideb
EXTSYM ReadSPC7110log,WriteSPC7110log
NEWSYM ExecuteAsmStart
EXTSYM statefileloc
EXTSYM NetPlayNoMore
%ifdef __WIN32__
EXTSYM MinimizeWindow
%endif
EXTSYM statefileloc
NEWSYM ExecuteAsmStart
%macro BackupCVMacM 2
mov edx,%1
@@ -986,6 +981,7 @@ NEWSYM abcdefg1, dd 0
NEWSYM abcdefg2, dd 0
NEWSYM abcdefg3, dd 0
NEWSYM SSKeyPressed, dd 0
NEWSYM SaveSPCKeyPressed, dd 0
NEWSYM NoSoundReinit, dd 0
NEWSYM NextNGDisplay, db 0
NEWSYM TempVidInfo, dd 0
@@ -1261,6 +1257,8 @@ reexecuteb2:
jnz near loadstate
cmp byte[SSKeyPressed],1
je near showmenu
cmp byte[SaveSPCKeyPressed],1
je near showmenu
cmp byte[debugdisble],0
jne .nodebugger
test byte[pressed+59],1
@@ -2301,9 +2299,10 @@ NEWSYM exitloop
mov byte[pressed+eax],0
mov eax,[KeyQuickClock]
mov byte[pressed+eax],0
mov eax,[KeyQuickMinimize]
mov eax,[KeyQuickSaveSPC]
mov byte[pressed+eax],0
mov byte[SSKeyPressed],0
mov byte[SaveSPCKeyPressed],0
jmp cpuover.returntoloop
.okay
mov byte[ExecExitOkay],5
@@ -2790,19 +2789,15 @@ NEWSYM cpuover
xor byte[TimerEnable],1
mov byte[pressed+eax],2
.noclockkey
%ifdef __WIN32__
mov eax,dword[KeyQuickMinimize]
mov eax,dword[KeyQuickSaveSPC]
or eax,eax
jz .nominimizekey
jz .nosavespckey
test byte[pressed+eax],1
jz .nominimizekey
pushad
call MinimizeWindow
popad
jz .nosavespckey
mov byte[SaveSPCKeyPressed],1
mov byte[pressed+eax],2
jmp exitloop
.nominimizekey
%endif
.nosavespckey
test byte[pressed+1],01h
jnz near exitloop
test byte[pressed+59],01h

View File

@@ -592,7 +592,7 @@ NEWSYM ExclusiveSound, db 0
NEWSYM DisableScreenSaver, db 0
NEWSYM TrapMouseCursor, db 1
NEWSYM KeyQuickClock, dd 0
NEWSYM KeyQuickMinimize, dd 0
NEWSYM KeyQuickSaveSPC, dd 0
NEWSYM AutoIncSaveSlot, db 0
NEWSYM TCPIPAddress, 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 SoundInterpType, db 2

View File

@@ -2729,9 +2729,7 @@ DisplayGameOptnsClick:
DGOptnsProcBox 8+114+78,178,[KeyQuickClock]
DGOptnsProcBox 8+25,188,[KeyQuickChat]
DGOptnsProcBox 8+57+45,188,[KeyQuickSnapShot]
%ifdef __WIN32__
DGOptnsProcBox 8+108+70,188,[KeyQuickMinimize]
%endif
DGOptnsProcBox 8+108+70,188,[KeyQuickSaveSPC]
ret
DisplayGUIOptnsClick:

View File

@@ -4512,9 +4512,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,9,190,GUIGameOptnsTextQ
GUIOuttextwin2 9,9+52,190,GUIGameOptnsTextR
GUIOuttextwin2 9,9+160,180,GUIGameOptnsTextU
%ifdef __WIN32__
GUIOuttextwin2 9,137,190,GUIGameOptnsTextV
%endif
mov byte[GUIGameOptnsColA],163
mov byte[GUIGameOptnsColB],217
@@ -4620,9 +4618,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,8,189,GUIGameOptnsTextQ
GUIOuttextwin2 9,8+52,189,GUIGameOptnsTextR
GUIOuttextwin2 9,8+160,179,GUIGameOptnsTextU
%ifdef __WIN32__
GUIOuttextwin2 9,136,189,GUIGameOptnsTextV
%endif
; Draw black boxes
DGOptnsDrawBox 27,24,[KeyBGDisble0]
@@ -4675,9 +4671,7 @@ DisplayGameOptns:
DGOptnsDrawBox 8+114+78,178,[KeyQuickClock]
DGOptnsDrawBox 8+25,188,[KeyQuickChat]
DGOptnsDrawBox 8+57+45,188,[KeyQuickSnapShot]
%ifdef __WIN32__
DGOptnsDrawBox 8+108+70,188,[KeyQuickMinimize]
%endif
DGOptnsDrawBox 8+108+70,188,[KeyQuickSaveSPC]
ret
GUIGameOptnsColA db 0
@@ -4713,7 +4707,7 @@ GUIGameOptnsTextR db 'SNAPSHOT',0
GUIGameOptnsTextS db 'REWIND KEY',0
GUIGameOptnsTextT db 'SLOWDWN KEY',0
GUIGameOptnsTextU db 'CLOCK',0
GUIGameOptnsTextV db 'MINIMIZE',0
GUIGameOptnsTextV db 'SAVE SPC',0
GUIGameOptnsTextX db 'DISPLAY FPS',0
DisplayGUIOptns:

View File

@@ -27,7 +27,7 @@ EXTSYM spcon,vesa2_bpos,vesa2_clbit,vesa2_gpos,vesa2_rpos,vesa2selec
EXTSYM vidbuffer,spritetablea,sprlefttot,newengen,spcextraram,resolutn
EXTSYM Open_File,Close_File,Read_File,Write_File,Create_File,Get_Key,Get_Date
EXTSYM continueprognokeys,ForceNonTransp,GUIOn,Check_Key,JoyRead
EXTSYM GetScreen, SSKeyPressed, StopSound, StartSound
EXTSYM GetScreen,SSKeyPressed,SaveSPCKeyPressed,StopSound,StartSound
EXTSYM ExecExitOkay,t1cc
EXTSYM Clear2xSaIBuffer
EXTSYM romdata,romtype,ScreenShotFormat
@@ -158,6 +158,8 @@ NEWSYM showmenu
call savepcx
jmp .nopalwrite
.nosskey
cmp byte[SaveSPCKeyPressed],1
je near .savespckey
test byte[pressed+14],1
jz .nof12
call savepcx
@@ -331,6 +333,7 @@ NEWSYM showmenu
.nofps
cmp dword[menucloc],20*288
jne near .nospcsave
.savespckey
cmp byte[spcon],0
je .nospc
cmp byte[newengen],1
@@ -380,6 +383,10 @@ NEWSYM showmenu
mov eax,[MsgCount]
mov [MessageOn],eax
.nosnddmp
cmp byte[SaveSPCKeyPressed],1
jne .exitloop
mov byte[SaveSPCKeyPressed],0
jmp .nopalwrite
.exitloop
call GUIUnBuffer
mov al,[newengen]