Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/wipeout/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ typedef enum {
} menu_entry_type_t;

typedef enum {
MENU_VERTICAL = (1<<0),
MENU_HORIZONTAL = (1<<1),
MENU_FIXED = (1<<2),
MENU_ALIGN_CENTER = (1<<3),
MENU_ALIGN_BLOCK = (1<<4)
MENU_VERTICAL = 1<<0,
MENU_HORIZONTAL = 1<<1,
MENU_FIXED = 1<<2,
MENU_ALIGN_CENTER = 1<<3,
MENU_ALIGN_BLOCK = 1<<4
} menu_page_layout_t;

typedef struct menu_t menu_t;
Expand Down
2 changes: 1 addition & 1 deletion src/wipeout/particle.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void particles_draw(void) {
render_set_blend_mode(RENDER_BLEND_NORMAL);
}

void particles_spawn(vec3_t position, uint16_t type, vec3_t velocity, int size) {
void particles_spawn(vec3_t position, particle_type_t type, vec3_t velocity, int size) {
if (particles_active == PARTICLES_MAX) {
return;
}
Expand Down
18 changes: 10 additions & 8 deletions src/wipeout/particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

#define PARTICLES_MAX 1024

#define PARTICLE_TYPE_NONE -1
#define PARTICLE_TYPE_FIRE 0
#define PARTICLE_TYPE_FIRE_WHITE 1
#define PARTICLE_TYPE_SMOKE 2
#define PARTICLE_TYPE_EBOLT 3
#define PARTICLE_TYPE_HALO 4
#define PARTICLE_TYPE_GREENY 5
typedef enum {
PARTICLE_TYPE_NONE = -1,
PARTICLE_TYPE_FIRE = 0,
PARTICLE_TYPE_FIRE_WHITE,
PARTICLE_TYPE_SMOKE,
PARTICLE_TYPE_EBOLT,
PARTICLE_TYPE_HALO,
PARTICLE_TYPE_GREENY,
} particle_type_t;

typedef struct particle_t {
vec3_t position;
Expand All @@ -25,7 +27,7 @@ typedef struct particle_t {

void particles_load(void);
void particles_init(void);
void particles_spawn(vec3_t position, uint16_t type, vec3_t velocity, int size);
void particles_spawn(vec3_t position, particle_type_t type, vec3_t velocity, int size);
void particles_draw(void);
void particles_update(void);

Expand Down
2 changes: 0 additions & 2 deletions src/wipeout/race.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "menu.h"
#include "ingame_menus.h"

#define ATTRACT_DURATION 60.0

static bool is_paused = false;
static bool menu_is_scroll_text = false;
static bool has_show_credits = false;
Expand Down
8 changes: 4 additions & 4 deletions src/wipeout/sfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ typedef enum {

typedef enum {
SFX_NONE = 0,
SFX_PLAY = (1<<0),
SFX_RESERVE = (1<<1),
SFX_LOOP = (1<<2),
SFX_LOOP_PAUSE = (1<<3),
SFX_PLAY = 1<<0,
SFX_RESERVE = 1<<1,
SFX_LOOP = 1<<2,
SFX_LOOP_PAUSE = 1<<3,
} sfx_flags_t;

typedef struct {
Expand Down
39 changes: 20 additions & 19 deletions src/wipeout/ship.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
#include "track.h"
#include "sfx.h"

#define SHIP_IN_TOW (1<< 0)
#define SHIP_VIEW_REMOTE (1<< 1)
#define SHIP_VIEW_INTERNAL (1<< 2)
#define SHIP_DIRECTION_FORWARD (1<< 3)
#define SHIP_FLYING (1<< 4)
#define SHIP_LEFT_SIDE (1<< 5)
#define SHIP_RACING (1<< 6)
#define SHIP_COLL (1<< 7)
#define SHIP_ON_JUNCTION (1<< 8)
#define SHIP_VISIBLE (1<< 9)
#define SHIP_IN_RESCUE (1<<10)
#define SHIP_OVERTAKEN (1<<11)
#define SHIP_JUST_IN_FRONT (1<<12)
#define SHIP_JUNCTION_LEFT (1<<13)
#define SHIP_SHIELDED (1<<14)
#define SHIP_ELECTROED (1<<15)
#define SHIP_REVCONNED (1<<16)
#define SHIP_SPECIALED (1<<17)

enum {
SHIP_IN_TOW = 1<< 0,
SHIP_VIEW_REMOTE = 1<< 1,
SHIP_VIEW_INTERNAL = 1<< 2,
SHIP_DIRECTION_FORWARD = 1<< 3,
SHIP_FLYING = 1<< 4,
SHIP_LEFT_SIDE = 1<< 5,
SHIP_RACING = 1<< 6,
SHIP_COLL = 1<< 7,
SHIP_ON_JUNCTION = 1<< 8,
SHIP_VISIBLE = 1<< 9,
SHIP_IN_RESCUE = 1<<10,
SHIP_OVERTAKEN = 1<<11,
SHIP_JUST_IN_FRONT = 1<<12,
SHIP_JUNCTION_LEFT = 1<<13,
SHIP_SHIELDED = 1<<14,
SHIP_ELECTROED = 1<<15,
SHIP_REVCONNED = 1<<16,
SHIP_SPECIALED = 1<<17,
};

// Timings

Expand Down
28 changes: 16 additions & 12 deletions src/wipeout/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ typedef struct track_face_t {
uint8_t texture;
} track_face_t;

#define FACE_TRACK_BASE (1<<0)
#define FACE_PICKUP_LEFT (1<<1)
#define FACE_FLIP_TEXTURE (1<<2)
#define FACE_PICKUP_RIGHT (1<<3)
#define FACE_START_GRID (1<<4)
#define FACE_BOOST (1<<5)
#define FACE_PICKUP_COLLECTED (1<<6)
#define FACE_PICKUP_ACTIVE (1<<7)
enum {
FACE_TRACK_BASE = 1<<0,
FACE_PICKUP_LEFT = 1<<1,
FACE_FLIP_TEXTURE = 1<<2,
FACE_PICKUP_RIGHT = 1<<3,
FACE_START_GRID = 1<<4,
FACE_BOOST = 1<<5,
FACE_PICKUP_COLLECTED = 1<<6,
FACE_PICKUP_ACTIVE = 1<<7,
};

typedef struct {
uint16_t near[16];
Expand All @@ -54,10 +56,12 @@ typedef struct section_t {
int16_t num;
} section_t;

#define SECTION_JUMP 1
#define SECTION_JUNCTION_END 8
#define SECTION_JUNCTION_START 16
#define SECTION_JUNCTION 32
enum {
SECTION_JUMP = 1<<0,
SECTION_JUNCTION_END = 1<<3,
SECTION_JUNCTION_START = 1<<4,
SECTION_JUNCTION = 1<<5,
};

typedef struct {
track_face_t *face;
Expand Down
6 changes: 3 additions & 3 deletions src/wipeout/weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ typedef struct weapon_t {
Object *model;
bool active;

int16_t trail_particle;
int16_t track_hit_particle;
int16_t ship_hit_particle;
particle_type_t trail_particle;
particle_type_t track_hit_particle;
particle_type_t ship_hit_particle;
float trail_spawn_timer;

int16_t type;
Expand Down
37 changes: 18 additions & 19 deletions src/wipeout/weapon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,29 @@
#define WEAPON_MINE_RELEASE_RATE (3 * (1.0/30.0))
#define WEAPON_DELAY (40 * (1.0/30.0))

#define WEAPON_TYPE_NONE 0
#define WEAPON_TYPE_MINE 1
#define WEAPON_TYPE_MISSILE 2
#define WEAPON_TYPE_ROCKET 3
#define WEAPON_TYPE_SPECIAL 4
#define WEAPON_TYPE_EBOLT 5
#define WEAPON_TYPE_FLARE 6
#define WEAPON_TYPE_REV_CON 7
#define WEAPON_TYPE_SHIELD 8
#define WEAPON_TYPE_TURBO 9
#define WEAPON_TYPE_MAX 10

#define WEAPON_MINE_COUNT 5

#define WEAPON_HIT_NONE 0
#define WEAPON_HIT_SHIP 1
#define WEAPON_HIT_TRACK 2

#define WEAPON_PARTICLE_SPAWN_RATE 0.011
#define WEAPON_AI_DELAY 1.1

#define WEAPON_CLASS_ANY 1
#define WEAPON_CLASS_PROJECTILE 2

enum {
WEAPON_TYPE_NONE = 0,
WEAPON_TYPE_MINE,
WEAPON_TYPE_MISSILE,
WEAPON_TYPE_ROCKET,
WEAPON_TYPE_SPECIAL,
WEAPON_TYPE_EBOLT,
WEAPON_TYPE_FLARE,
WEAPON_TYPE_REV_CON,
WEAPON_TYPE_SHIELD,
WEAPON_TYPE_TURBO,
WEAPON_TYPE_MAX,
};

enum {
WEAPON_CLASS_ANY = 1,
WEAPON_CLASS_PROJECTILE,
};

void weapons_load(void);
void weapons_init(void);
Expand Down