Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
game.c File Reference
#include <game.h>
#include <enemy.h>
#include <sound.h>

Functions

void Game_Start ()
 
void Game_Update ()
 
void Game_Restart ()
 
void Game_AddAmmoSpent (int ammoCount)
 Increments the ammoSpent counter Call this when a bullet is fired.
 
void Game_AddHitsTaken ()
 Increments the hitsTaken counter Call this when player takes damage.
 
void Game_AddHealingItemUsed ()
 Increments the healingItemsUsed counter Call this when player uses a healing item.
 
void Game_TransitionNextLevel (void *data, int interactableIndex)
 

Variables

bool currentStageIncreased = false
 
GameData game
 

Function Documentation

◆ Game_AddAmmoSpent()

void Game_AddAmmoSpent ( int  ammoCount)

Increments the ammoSpent counter Call this when a bullet is fired.

◆ Game_AddHealingItemUsed()

void Game_AddHealingItemUsed ( )

Increments the healingItemsUsed counter Call this when player uses a healing item.

◆ Game_AddHitsTaken()

void Game_AddHitsTaken ( )

Increments the hitsTaken counter Call this when player takes damage.

◆ Game_Restart()

void Game_Restart ( )

◆ Game_Start()

void Game_Start ( )

◆ Game_TransitionNextLevel()

void Game_TransitionNextLevel ( void *  data,
int  interactableIndex 
)

◆ Game_Update()

void Game_Update ( )

Variable Documentation

◆ currentStageIncreased

bool currentStageIncreased = false

◆ game

GameData game
Initial value:
= {
.currentStage = 1,
.isTransitioning = false,
.viewingLog = -1,
.transitionTimer = NULL,
.hudToggled = false,
.runTime = 0.0f,
.ammoSpent = 0,
.hitsTaken = 0,
.healingItemsUsed = 0
}