-
-
Notifications
You must be signed in to change notification settings - Fork 0
game_state: add user-controlled in-game timers #97
Copy link
Copy link
Open
Description
Allow definition of game timers:
- 16 bit counters
- They count seconds
- They have a name (for DATAGEN)
- They can be RESET, STARTed and STOPped
- They can be checked (FLOW checks)
- They can be acted upon (FLOW actions)
- There is always at least one global game timer (GAME_TIME) - This is to be implemented separately in game_state: add main in-game timer #98
- Not managed by IM2 ISR, but from the main game loop - check for current_time.seconds changes
Tasks:
- New data
struct timer_data_s: counter, state and initial state (running, stopped) - New global table
all_timers - New functions:
timer_init(called at program initialization),timer_reset(called on game initialization and in FLOW action),timer_start(called at game start and in flow action),timer_stop(called in flow action),timer_update_all_timers(called from main game loop),timer_reset_all_timers(called on game initialization) - FLOW checks: TIMER_EQUAL, TIMER_MORE_THAN, TIMER_LESS_THAN
- FLOW actions: TIMER_STOP, TIMER_START, TIMER_RESET
- DATAGEN: directive for TIMER in GAME_CONFIG: name, initial_state
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request