Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
enemy_vantage.h File Reference

This file contains the data for the Vantage enemy type. More...

#include <enemy.h>
#include <gun.h>

Go to the source code of this file.

Classes

struct  VantageConfig
 

Functions

void Vantage_Start (EnemyData *data)
 [Start] Initializes a Vantage enemy instance
 
void Vantage_Update (EnemyData *data)
 [PostUpdate] Updates the Vantage enemy's state
 
void Vantage_UpdateGun (EnemyData *data)
 Updates the gun position and orientation for the Vantage enemy.
 
void Vantage_Render (EnemyData *data)
 
void Vantage_UpdateParticles ()
 Updates all particle emitters related to the Vantage enemy.
 
void Vantage_RenderParticles ()
 
void Vantage_UpdateLazer (EnemyData *data)
 Updates the laser targeting system for the Vantage enemy.
 
void Vantage_RenderLaser (EnemyData *data)
 

Variables

ParticleEmitter * VantageBulletEmitter
 
ParticleEmitter * VantageBulletFragmentsEmitter
 
ParticleEmitter * VantageMuzzleFlashEmitter
 
ParticleEmitter * VantageCasingEmitter
 
VantageConfig VantageConfigData
 
EnemyData VantageData
 [Data] Vantage enemy default data
 

Detailed Description

This file contains the data for the Vantage enemy type.

Author
Mango
Date
2025-03-22

Function Documentation

◆ Vantage_Render()

void Vantage_Render ( EnemyData *  data)

◆ Vantage_RenderLaser()

void Vantage_RenderLaser ( EnemyData *  data)

◆ Vantage_RenderParticles()

void Vantage_RenderParticles ( )

◆ Vantage_Start()

void Vantage_Start ( EnemyData *  data)

[Start] Initializes a Vantage enemy instance

Sets up the Vantage enemy's resources including animations, particle effects, and timers.

Parameters
dataPointer to the enemy data structure to initialize

◆ Vantage_Update()

void Vantage_Update ( EnemyData *  data)

[PostUpdate] Updates the Vantage enemy's state

This function is called each frame to update the Vantage enemy's behavior. The Vantage enemy is a long-range sniper that can detect the player from far away.

Parameters
dataPointer to the enemy data structure

◆ Vantage_UpdateGun()

void Vantage_UpdateGun ( EnemyData *  data)

Updates the gun position and orientation for the Vantage enemy.

Calculates the gun position, rotation, and orientation based on the enemy's position and the player's location. Also updates associated particle emitters for muzzle flash and bullet casings.

Parameters
dataPointer to the enemy data structure

◆ Vantage_UpdateLazer()

void Vantage_UpdateLazer ( EnemyData *  data)

Updates the laser targeting system for the Vantage enemy.

Calculates the laser beam's path from the gun to the first obstacle or player, handling collision detection and damage application. The laser is used for both visualization (showing where the Vantage is aiming) and for dealing damage when in shooting state.

Parameters
dataPointer to the enemy data structure

◆ Vantage_UpdateParticles()

void Vantage_UpdateParticles ( )

Updates all particle emitters related to the Vantage enemy.

Handles particle physics, collision detection, and damage calculation for bullets fired by the Vantage enemy. This function should be called once per frame to properly update and render all Vantage-specific particles.

Variable Documentation

◆ VantageBulletEmitter

ParticleEmitter* VantageBulletEmitter
extern

◆ VantageBulletFragmentsEmitter

ParticleEmitter* VantageBulletFragmentsEmitter
extern

◆ VantageCasingEmitter

ParticleEmitter* VantageCasingEmitter
extern

◆ VantageConfigData

VantageConfig VantageConfigData
extern

◆ VantageData

EnemyData VantageData
extern

[Data] Vantage enemy default data

This structure defines the default properties, stats and settings for the Vantage enemy type.

◆ VantageMuzzleFlashEmitter

ParticleEmitter* VantageMuzzleFlashEmitter
extern