From aefe5f8c1c45f4cdeafe08113953a9f03df3c644 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Mon, 22 May 2017 07:06:17 +0200 Subject: * Split screen from now on is only calling GsDrawList() once. The reason for this is that now DMA is used instead of GPIO for drawenv/dispenv management. * (PSXSDK internals): incorrect bit shifting was being made on 0xE3 and 0xE4 GPU instructions (drawenv management). * (Bugfix): Timers were not being reset properly because pad1_cheat_timer and pad2_cheat_timer were being accidentally reset to NULL on calling memset() for cheatsArray. * Timers are now updated every 100 ms instead of every second. * Mouse sprite should be now drawn on X_SCREEN_RESOLUTION >> 2 in 2-player mode. TODO: check why this isn't working! --- Source/System.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/System.c') diff --git a/Source/System.c b/Source/System.c index 833c80f..6eeaf15 100644 --- a/Source/System.c +++ b/Source/System.c @@ -391,12 +391,12 @@ bool SystemContains_u16(uint16_t value, uint16_t * buffer, size_t sz) return false; } -TYPE_TIMER * SystemCreateTimer(uint32_t seconds, bool rf, void (*timer_callback)(void) ) +TYPE_TIMER* SystemCreateTimer(uint32_t t, bool rf, void (*timer_callback)(void) ) { bool success = false; uint8_t i; - if(seconds == 0) + if(t == 0) { dprintf("Cannot create timer with time == 0!\n"); return NULL; @@ -407,8 +407,8 @@ TYPE_TIMER * SystemCreateTimer(uint32_t seconds, bool rf, void (*timer_callback) if(timer_array[i].busy == false) { timer_array[i].Timeout_Callback = timer_callback; - timer_array[i].time = seconds; - timer_array[i].orig_time = seconds; + timer_array[i].time = t; + timer_array[i].orig_time = t; timer_array[i].repeat_flag = rf; timer_array[i].busy = true; success = true; @@ -447,7 +447,7 @@ void SystemUserTimersHandler(void) { if(timer_array[i].busy == true) { - if(System1SecondTick() == true) + if(System100msTick() == true) { timer_array[i].time--; @@ -472,12 +472,12 @@ void SystemUserTimersHandler(void) } } -void SystemTimerRestart(TYPE_TIMER * timer) +void SystemTimerRestart(TYPE_TIMER* timer) { timer->time = timer->orig_time; } -void SystemTimerRemove(TYPE_TIMER * timer) +void SystemTimerRemove(TYPE_TIMER* timer) { timer->time = 0; timer->orig_time = 0; @@ -486,7 +486,7 @@ void SystemTimerRemove(TYPE_TIMER * timer) timer->repeat_flag = false; } -bool SystemArrayCompare(unsigned short * arr1, unsigned short * arr2, size_t sz) +bool SystemArrayCompare(unsigned short* arr1, unsigned short* arr2, size_t sz) { size_t i; -- cgit v1.2.3