[Scummvm-cvs-logs] CVS: scummvm/saga systimer.cpp,1.4,1.5
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat May 1 09:25:00 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga sndres.cpp,1.9,1.10 sndres.h,1.8,1.9 sound.cpp,1.5,1.6 sound.h,1.5,1.6 sprite.cpp,1.4,1.5 sprite.h,1.3,1.4 sprite_mod.h,1.1,1.2 sstack.cpp,1.1,1.2 sstack.h,1.1,1.2 sthread.cpp,1.3,1.4 sthread.h,1.2,1.3 sys_interface.h,1.4,1.5 sysinput.cpp,1.2,1.3 systimer.cpp,1.3,1.4 systimer.h,1.4,1.5 text.cpp,1.1,1.2 text.h,1.1,1.2 text_mod.h,1.2,1.3 transitions.cpp,1.2,1.3 ys_binread.cpp,1.3,1.4 ys_binwrite.cpp,1.2,1.3 ys_dl_list.cpp,1.2,1.3 yslib.h,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga image.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8047
Modified Files:
systimer.cpp
Log Message:
indent
Index: systimer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/systimer.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- systimer.cpp 1 May 2004 16:15:55 -0000 1.4
+++ systimer.cpp 1 May 2004 16:23:54 -0000 1.5
@@ -49,21 +49,17 @@
static Uint32 SYSTIMER_Callback(Uint32 interval, void *param);
int SYSTIMER_InitMSCounter() {
-
if (R_TimerData.initialized) {
return R_FAILURE;
}
R_TimerData.t_previous_ticks = SDL_GetTicks();
-
R_TimerData.initialized = 1;
return R_SUCCESS;
}
-unsigned long SYSTIMER_ReadMSCounter(void)
-{
-
+unsigned long SYSTIMER_ReadMSCounter() {
Uint32 ms_elapsed = 0;
if (!R_TimerData.initialized) {
@@ -73,20 +69,16 @@
R_TimerData.t_current_ticks = SDL_GetTicks();
if (R_TimerData.t_current_ticks < R_TimerData.t_previous_ticks) {
- /* Timer has rolled over after 49 days... */
+ // Timer has rolled over after 49 days
} else {
- ms_elapsed = R_TimerData.t_current_ticks -
- R_TimerData.t_previous_ticks;
-
+ ms_elapsed = R_TimerData.t_current_ticks - R_TimerData.t_previous_ticks;
R_TimerData.t_previous_ticks = R_TimerData.t_current_ticks;
}
return ms_elapsed;
}
-int SYSTIMER_ResetMSCounter(void)
-{
-
+int SYSTIMER_ResetMSCounter() {
if (!R_TimerData.initialized) {
return R_FAILURE;
}
@@ -96,17 +88,13 @@
return R_SUCCESS;
}
-int SYSTIMER_Sleep(uint16 msec)
-{
+int SYSTIMER_Sleep(uint16 msec) {
SDL_Delay(msec);
return R_SUCCESS;
}
-int
-SYSTIMER_CreateTimer(R_SYSTIMER ** timer,
- unsigned long interval, void *param, R_SYSTIMER_CALLBACK callback)
-{
+int SYSTIMER_CreateTimer(R_SYSTIMER **timer, unsigned long interval, void *param, R_SYSTIMER_CALLBACK callback) {
R_SYSTIMER *new_timer = (R_SYSTIMER *)malloc(sizeof *new_timer);
if (new_timer == NULL) {
return R_MEM;
@@ -118,38 +106,31 @@
*timer = new_timer;
- new_timer->t_sdl_timerid = SDL_AddTimer(interval,
- SYSTIMER_Callback, new_timer);
+ new_timer->t_sdl_timerid = SDL_AddTimer(interval, SYSTIMER_Callback, new_timer);
if (new_timer->t_sdl_timerid == NULL) {
free(new_timer);
*timer = NULL;
-
return R_FAILURE;
}
return R_SUCCESS;
}
-int SYSTIMER_DestroyTimer(R_SYSTIMER * timer)
-{
+int SYSTIMER_DestroyTimer(R_SYSTIMER *timer) {
if (timer == NULL) {
return R_FAILURE;
}
timer->t_running = 0;
-
SDL_RemoveTimer(timer->t_sdl_timerid);
-
free(timer);
return R_SUCCESS;
}
-Uint32 SYSTIMER_Callback(Uint32 interval, void *param)
-{
+Uint32 SYSTIMER_Callback(Uint32 interval, void *param) {
R_SYSTIMER *timer_p = (R_SYSTIMER *)param;
-
timer_p->t_callback_f(timer_p->t_interval, timer_p->t_param);
return timer_p->t_interval;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga sndres.cpp,1.9,1.10 sndres.h,1.8,1.9 sound.cpp,1.5,1.6 sound.h,1.5,1.6 sprite.cpp,1.4,1.5 sprite.h,1.3,1.4 sprite_mod.h,1.1,1.2 sstack.cpp,1.1,1.2 sstack.h,1.1,1.2 sthread.cpp,1.3,1.4 sthread.h,1.2,1.3 sys_interface.h,1.4,1.5 sysinput.cpp,1.2,1.3 systimer.cpp,1.3,1.4 systimer.h,1.4,1.5 text.cpp,1.1,1.2 text.h,1.1,1.2 text_mod.h,1.2,1.3 transitions.cpp,1.2,1.3 ys_binread.cpp,1.3,1.4 ys_binwrite.cpp,1.2,1.3 ys_dl_list.cpp,1.2,1.3 yslib.h,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga image.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list