Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
play_time.c
Go to the documentation of this file.
1#include "engine/game.h"
2#include "field/field_map.h"
3
4/* Sets the play time to zero */
12
13/* Turns the vsync-counted frames into seconds, minutes and hours, stopping at 999:59:59 */
14void updatePlayTime(void) {
15 if ((GAME.playTime.frames >> 8) >= 60) {
16 GAME.playTime.frames &= 0xFF;
17 if (++GAME.playTime.seconds >= 60) {
19 if (++GAME.playTime.minutes >= 60) {
21 if (++GAME.playTime.hours >= 1000) {
22 GAME.playTime.hours = 999;
26 }
27 }
28 }
29 }
30}
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
What the stage overlays and the executable use of FIELDSTG (fieldstg.h has the rest): its layers and ...
void resetPlayTime(void)
Sets the play time to zero.
Definition play_time.c:5
void updatePlayTime(void)
Turns the vsync-counted frames into seconds, minutes and hours, stopping at 999:59:59.
Definition play_time.c:14
PlayTime playTime
Definition game_state.h:508
s16 maxed
stopped at 999:59:59
Definition game_state.h:335
s16 seconds
Definition game_state.h:334
s32 frames
8.8, counted by the vsync callback
Definition game_state.h:331
s16 minutes
Definition game_state.h:333