1 //============================================================================= 2 // 3 // Adventure Game Studio (AGS) 4 // 5 // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others 6 // The full list of copyright holders can be found in the Copyright.txt 7 // file, which is part of this source code distribution. 8 // 9 // The AGS source code is provided under the Artistic License 2.0. 10 // A copy of this license can be found in the file License.txt and at 11 // http://www.opensource.org/licenses/artistic-license-2.0.php 12 // 13 //============================================================================= 14 15 #include "ac/timer.h" 16 #include "util/wgt2allg.h" // END_OF_FUNCTION macro 17 18 extern volatile int mvolcounter; 19 20 unsigned int loopcounter=0,lastcounter=0; 21 volatile unsigned long globalTimerCounter = 0; 22 23 volatile int timerloop=0; 24 int time_between_timers=25; // in milliseconds 25 // our timer, used to keep game running at same speed on all systems 26 #if defined(WINDOWS_VERSION) dj_timer_handler()27void __cdecl dj_timer_handler() { 28 #else 29 extern "C" void dj_timer_handler() { 30 #endif 31 timerloop++; 32 globalTimerCounter++; 33 if (mvolcounter > 0) mvolcounter++; 34 } 35 END_OF_FUNCTION(dj_timer_handler); 36