added different scaling, breaking change
This commit is contained in:
parent
8bc4572ae3
commit
799e5ad9eb
4 changed files with 92 additions and 57 deletions
33
state.odin
Normal file
33
state.odin
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package space_invaders
|
||||
|
||||
import "core:c"
|
||||
import glm "core:math/linalg/glsl"
|
||||
|
||||
GameState :: struct {
|
||||
// window
|
||||
target_fps: c.int,
|
||||
title: cstring,
|
||||
screen_width: c.int,
|
||||
screen_height: c.int,
|
||||
// frame stats
|
||||
frame_counter: int,
|
||||
current_frame_time: f64,
|
||||
last_frame_time: f64,
|
||||
delta_time: f64,
|
||||
// game vars
|
||||
screen: GameScreen,
|
||||
previous_screen: GameScreen,
|
||||
last_frame_screen: GameScreen,
|
||||
game_end: GameEndType,
|
||||
reset_game: bool,
|
||||
aliens: #soa[ALIENS]Alien,
|
||||
bullets: #soa[MAX_BULLETS]Bullet,
|
||||
bullet_index: int,
|
||||
player_last_time_fired: f64,
|
||||
player_pos: glm.vec2,
|
||||
player_health: c.int,
|
||||
player_score: c.int,
|
||||
player_high_score: c.int,
|
||||
shuffle_dir: ShuffleDirection,
|
||||
last_shuffle_dir: ShuffleDirection,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue