Added alternate timer to gui

This commit is contained in:
pagefault
2001-05-21 22:22:40 +00:00
parent 51fee95cd7
commit ff381befca
5 changed files with 41 additions and 13 deletions

View File

@@ -579,8 +579,8 @@ NEWSYM GUIWGAdd, db 8
NEWSYM GUIWBAdd, db 25 NEWSYM GUIWBAdd, db 25
NEWSYM BlackAndWhite, db 0 NEWSYM BlackAndWhite, db 0
NEWSYM MouseWheel, db 1 NEWSYM MouseWheel, db 1
NEWSYM AlternateTimer, db 0
GUIsave equ $-GUIRAdd GUIsave equ $-GUIRAdd

View File

@@ -812,12 +812,20 @@ GUIOptionKeys:
mov [cfgnewgfx],al mov [cfgnewgfx],al
.invalidng .invalidng
.nonewgfx .nonewgfx
%ifdef __MSDOS__
cmp dh,'V' cmp dh,'V'
jne .novsync jne .novsync
xor byte[vsyncon],1 xor byte[vsyncon],1
mov al,[vsyncon] mov al,[vsyncon]
mov [cfgvsync],al mov [cfgvsync],al
.novsync .novsync
%endif
%ifdef __WIN32__
cmp dh,'H'
jne .nohighpriority
xor byte[HighPriority],1
.nohighpriority
%endif
cmp dh,'M' cmp dh,'M'
jne .nommxcopy jne .nommxcopy
xor byte[FPUCopy],2 xor byte[FPUCopy],2
@@ -844,10 +852,12 @@ GUIOptionKeys:
jne .noswfix jne .noswfix
xor byte[SidewinderFix],1 xor byte[SidewinderFix],1
.noswfix .noswfix
cmp dh,'H' %ifdef __WIN32__
jne .nohighpriority cmp dh,'S'
xor byte[HighPriority],1 jne .noalttimer
.nohighpriority xor byte[AlternateTimer],1
.noalttimer
%endif
cmp dh,'F' cmp dh,'F'
jne .nofpsatstart jne .nofpsatstart
xor byte[FPSAtStart],1 xor byte[FPSAtStart],1

View File

@@ -2085,7 +2085,12 @@ DisplayGUIOptionClick:
jne near .invalidng jne near .invalidng
GUIClickCButton2 11,36,byte[newengen],byte[cfgnewgfx],1 GUIClickCButton2 11,36,byte[newengen],byte[cfgnewgfx],1
.invalidng .invalidng
%ifdef __MSDOS__
GUIClickCButton2 11,46,byte[vsyncon],byte[cfgvsync],1 GUIClickCButton2 11,46,byte[vsyncon],byte[cfgvsync],1
%endif
%ifdef __WIN32__
GUIClickCButton 11,46,byte[HighPriority]
%endif
GUIClickCButton2 11,56,byte[FPUCopy],byte[cfgcopymethod],2 GUIClickCButton2 11,56,byte[FPUCopy],byte[cfgcopymethod],2
GUIClickCButtonM 11,66,byte[pl12s34] GUIClickCButtonM 11,66,byte[pl12s34]
; cmp byte[OSPort],3 ; cmp byte[OSPort],3
@@ -2095,7 +2100,7 @@ DisplayGUIOptionClick:
%endif %endif
;.win32config ;.win32config
%ifdef __WIN32__ %ifdef __WIN32__
GUIClickCButton 11,76,byte[HighPriority] GUIClickCButton 11,76,byte[AlternateTimer]
%endif %endif
GUIClickCButton 11,86,byte[FPSAtStart] GUIClickCButton 11,86,byte[FPSAtStart]
GUIClickCButton 11,96,byte[Turbo30hz] GUIClickCButton 11,96,byte[Turbo30hz]

View File

@@ -1355,6 +1355,9 @@ DisplayGUIOption:
%ifdef __MSDOS__ %ifdef __MSDOS__
GUIOuttextwin2u 4,26,51,GUIOptionText5,0 GUIOuttextwin2u 4,26,51,GUIOptionText5,0
%endif %endif
%ifdef __WIN32__
GUIOuttextwin2u 4,26,51,GUIOptionText5b,0
%endif
;.win32b ;.win32b
GUIOuttextwin2u 4,26,61,GUIOptionText6,0 GUIOuttextwin2u 4,26,61,GUIOptionText6,0
GUIOuttextwin2u 4,26,71,GUIOptionText7,0 GUIOuttextwin2u 4,26,71,GUIOptionText7,0
@@ -1365,7 +1368,7 @@ DisplayGUIOption:
%endif %endif
;.win32b2 ;.win32b2
%ifdef __WIN32__ %ifdef __WIN32__
GUIOuttextwin2u 4,26,81,GUIOptionTextAb,0 GUIOuttextwin2u 4,26,81,GUIOptionTextAb,1
%endif %endif
GUIOuttextwin2u 4,26,91,GUIOptionTextB,0 GUIOuttextwin2u 4,26,91,GUIOptionTextB,0
GUIOuttextwin2u 4,26,101,GUIOptionTextC,2 GUIOuttextwin2u 4,26,101,GUIOptionTextC,2
@@ -1387,6 +1390,9 @@ DisplayGUIOption:
%ifdef __MSDOS__ %ifdef __MSDOS__
GUIOuttextwin2 4,25,50,GUIOptionText5 GUIOuttextwin2 4,25,50,GUIOptionText5
%endif %endif
%ifdef __WIN32__
GUIOuttextwin2 4,25,50,GUIOptionText5b
%endif
;.win32c ;.win32c
GUIOuttextwin2 4,25,60,GUIOptionText6 GUIOuttextwin2 4,25,60,GUIOptionText6
GUIOuttextwin2 4,25,70,GUIOptionText7 GUIOuttextwin2 4,25,70,GUIOptionText7
@@ -1429,17 +1435,24 @@ DisplayGUIOption:
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox1 .nocheckbox1
GUIDisplayIconWin 4,11,36,[GUITemp] GUIDisplayIconWin 4,11,36,[GUITemp]
%ifdef __MSDOS__
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[vsyncon],0 cmp byte[vsyncon],0
je .nocheckbox2 je .nocheckbox2
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.nocheckbox2
; cmp byte[OSPort],3 ; cmp byte[OSPort],3
; je near .win32 ; je near .win32
%ifdef __MSDOS__
GUIDisplayIconWin 4,11,46,[GUITemp] GUIDisplayIconWin 4,11,46,[GUITemp]
%endif %endif
;.win32 ;.win32
%ifdef __WIN32__
mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[HighPriority],0
je .nocheckbox2
mov dword[GUITemp],GUIIconDataCheckBoxC
%endif
.nocheckbox2
GUIDisplayIconWin 4,11,46,[GUITemp]
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[FPUCopy],2 cmp byte[FPUCopy],2
jne .nocheckbox3 jne .nocheckbox3
@@ -1465,7 +1478,7 @@ DisplayGUIOption:
;.win322 ;.win322
%ifdef __WIN32__ %ifdef __WIN32__
mov dword[GUITemp],GUIIconDataCheckBoxUC mov dword[GUITemp],GUIIconDataCheckBoxUC
cmp byte[HighPriority],0 cmp byte[AlternateTimer],0
je .win323 je .win323
mov dword[GUITemp],GUIIconDataCheckBoxC mov dword[GUITemp],GUIIconDataCheckBoxC
.win323 .win323
@@ -1580,10 +1593,11 @@ GUIOptionText2 db 'AUTO FRAME RATE',0
GUIOptionText3 db 'MAX FRAME SKIP',0 GUIOptionText3 db 'MAX FRAME SKIP',0
GUIOptionText4 db 'NEW GFX ENGINE',0 GUIOptionText4 db 'NEW GFX ENGINE',0
GUIOptionText5 db 'VSYNC',0 GUIOptionText5 db 'VSYNC',0
GUIOptionText5b db 'HIGH PRIORITY MODE',0
GUIOptionText6 db 'MMX SUPPORT',0 GUIOptionText6 db 'MMX SUPPORT',0
GUIOptionText7 db 'USE PL3/4 AS PL1/2',0 GUIOptionText7 db 'USE PL3/4 AS PL1/2',0
GUIOptionTextA db 'SIDEWINDER FIX',0 GUIOptionTextA db 'SIDEWINDER FIX',0
GUIOptionTextAb db 'HIGH PRIORITY MODE',0 GUIOptionTextAb db 'USE ALTERNATE TIMER',0
GUIOptionTextB db 'FPS AT START',0 GUIOptionTextB db 'FPS AT START',0
GUIOptionTextC db 'USE 30HZ FOR TURBO',0 GUIOptionTextC db 'USE 30HZ FOR TURBO',0
GUIOptionTextD db 'ENABLE GAME CLOCK',0 GUIOptionTextD db 'ENABLE GAME CLOCK',0

View File

@@ -129,8 +129,6 @@ DWORD MouseButton;
_int64 start, end, freq, update_ticks_pc, start2, end2, update_ticks_pc2; _int64 start, end, freq, update_ticks_pc, start2, end2, update_ticks_pc2;
BYTE AlternateTimer=0;
extern "C" extern "C"
{ {
void drawscreenwin(void); void drawscreenwin(void);
@@ -190,6 +188,7 @@ extern BYTE ExclusiveSound;
extern BYTE HighPriority; extern BYTE HighPriority;
extern BYTE AlwaysOnTop; extern BYTE AlwaysOnTop;
extern BYTE SaveMainWindowPos; extern BYTE SaveMainWindowPos;
extern BYTE AlternateTimer;
extern signed short int MainWindowX; extern signed short int MainWindowX;
extern signed short int MainWindowY; extern signed short int MainWindowY;
extern int CurKeyPos; extern int CurKeyPos;