GLOBALS.CPP 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include <stdlib.h>
  2. #include "globals.h"
  3. #include "resource.h"
  4. #include "misc.h"
  5. #include "i86.h"
  6. #include <memcheck.h>
  7. /***********************************************************************
  8. * Global variables
  9. **********************************************************************/
  10. Resource gSysRes;
  11. IniFile BloodINI("BLOOD.INI");
  12. char gBuildDate[] = __DATE__;
  13. int gOldDisplayMode;
  14. long gFrameClock = 0;
  15. int gFrameTicks = 0;
  16. int gFrame = 0;
  17. volatile long gGameClock = 0;
  18. int gCacheMiss = 0;
  19. int gFrameRate = 0;
  20. int gGamma = 0;
  21. int gSpring; // û(m/k)
  22. int gSpringPhaseInc; // kAngle360 / T
  23. BYTE gEndLevelFlag = 0;
  24. BOOL gPaused = FALSE;
  25. int gNetPlayers = 0;
  26. BOOL gNetGame = FALSE;
  27. int gNetMode = kNetModeCoop;
  28. void ClockStrobe( void )
  29. {
  30. gGameClock++;
  31. }
  32. void CLOCK_STROBE_END( void ) {};
  33. void LockClockStrobe( void )
  34. {
  35. dpmiLockMemory(FP_OFF(&ClockStrobe), FP_OFF(&CLOCK_STROBE_END) - FP_OFF(&ClockStrobe));
  36. dpmiLockMemory(FP_OFF(&gGameClock), sizeof(long));
  37. }
  38. void UnlockClockStrobe( void )
  39. {
  40. dpmiLockMemory(FP_OFF(&ClockStrobe), FP_OFF(&CLOCK_STROBE_END) - FP_OFF(&ClockStrobe));
  41. dpmiLockMemory(FP_OFF(&gGameClock), sizeof(long));
  42. }