summaryrefslogtreecommitdiff
path: root/src/engine/play_time.c
diff options
context:
space:
mode:
authorcamthesaxman <cameronghall@cox.net>2018-02-18 19:59:51 -0600
committercamthesaxman <cameronghall@cox.net>2018-02-18 19:59:51 -0600
commitdaa05c1b7c5e079ad8554e88a290e07b333bd2db (patch)
treef635e307268f6e6027423369d221e2adf32b438d /src/engine/play_time.c
parent2e21a867487e2187a954a351f775bd3f3a9535b1 (diff)
remove subdirectories
Diffstat (limited to 'src/engine/play_time.c')
-rw-r--r--src/engine/play_time.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/engine/play_time.c b/src/engine/play_time.c
deleted file mode 100644
index 9882c9c4b..000000000
--- a/src/engine/play_time.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "global.h"
-#include "play_time.h"
-
-enum
-{
- STOPPED,
- RUNNING,
- MAXED_OUT
-};
-
-static u8 sPlayTimeCounterState;
-
-void PlayTimeCounter_Reset()
-{
- sPlayTimeCounterState = STOPPED;
-
- gSaveBlock2.playTimeHours = 0;
- gSaveBlock2.playTimeMinutes = 0;
- gSaveBlock2.playTimeSeconds = 0;
- gSaveBlock2.playTimeVBlanks = 0;
-}
-
-void PlayTimeCounter_Start()
-{
- sPlayTimeCounterState = RUNNING;
-
- if (gSaveBlock2.playTimeHours > 999)
- PlayTimeCounter_SetToMax();
-}
-
-void PlayTimeCounter_Stop()
-{
- sPlayTimeCounterState = STOPPED;
-}
-
-void PlayTimeCounter_Update()
-{
- if (sPlayTimeCounterState == RUNNING)
- {
- gSaveBlock2.playTimeVBlanks++;
-
- if (gSaveBlock2.playTimeVBlanks > 59)
- {
- gSaveBlock2.playTimeVBlanks = 0;
- gSaveBlock2.playTimeSeconds++;
-
- if (gSaveBlock2.playTimeSeconds > 59)
- {
- gSaveBlock2.playTimeSeconds = 0;
- gSaveBlock2.playTimeMinutes++;
-
- if (gSaveBlock2.playTimeMinutes > 59)
- {
- gSaveBlock2.playTimeMinutes = 0;
- gSaveBlock2.playTimeHours++;
-
- if (gSaveBlock2.playTimeHours > 999)
- PlayTimeCounter_SetToMax();
- }
- }
- }
- }
-}
-
-void PlayTimeCounter_SetToMax()
-{
- sPlayTimeCounterState = MAXED_OUT;
-
- gSaveBlock2.playTimeHours = 999;
- gSaveBlock2.playTimeMinutes = 59;
- gSaveBlock2.playTimeSeconds = 59;
- gSaveBlock2.playTimeVBlanks = 59;
-}