Skip to content

Commit 7480a20

Browse files
committed
Update header guards to avoid conflicts
1 parent 683b756 commit 7480a20

31 files changed

+64
-64
lines changed

audio/audio.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#ifndef AUDIO_H
2-
#define AUDIO_H
1+
#ifndef SDLGL_AUDIO_H
2+
#define SDLGL_AUDIO_H
33

44
// Disable the miniaudio Device API, we are using SDL Audio as our device
5-
#define MA_NO_DEVICE_IO
5+
#define SDLGL_MA_NO_DEVICE_IO
66
#include "../dependencies/miniaudio.h"
77

8-
#define CHANNELS 2
9-
#define SAMPLE_RATE 48000
8+
#define SDLGL_CHANNELS 2
9+
#define SDLGL_SAMPLE_RATE 48000
1010

1111
#include "SDL.h"
1212

audio/sound.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SOUND_H
2-
#define SOUND_H
1+
#ifndef SDLGL_SOUND_H
2+
#define SDLGL_SOUND_H
33

44
#include <memory>
55
#include <vector>

collision/collider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef COLLIDER_H
2-
#define COLLIDER_H
1+
#ifndef SDLGL_COLLIDER_H
2+
#define SDLGL_COLLIDER_H
33

44
#include <functional>
55
#include <vector>

collision/hitbox.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef HITBOX_H
2-
#define HITBOX_H
1+
#ifndef SDLGL_HITBOX_H
2+
#define SDLGL_HITBOX_H
33

44
#include <memory>
55

game/clock.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef CLOCK_H
2-
#define CLOCK_H
1+
#ifndef SDLGL_CLOCK_H
2+
#define SDLGL_CLOCK_H
33

44
// Keeps track of 'delta' times between frames
55
class Clock {

game/context.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef CONTEXT_H
2-
#define CONTEXT_H
1+
#ifndef SDLGL_CONTEXT_H
2+
#define SDLGL_CONTEXT_H
33

44
#include "../audio/audio.h"
55
#include "../graphics/graphics.h"

game/entity.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef ENTITY_H
2-
#define ENTITY_H
1+
#ifndef SDLGL_ENTITY_H
2+
#define SDLGL_ENTITY_H
33

44
#include <memory>
55

game/physical_entity.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PHYSICAL_ENTITY_H
2-
#define PHYSICAL_ENTITY_H
1+
#ifndef SDLGL_PHYSICAL_ENTITY_H
2+
#define SDLGL_PHYSICAL_ENTITY_H
33

44
#include "entity.h"
55

game/scene.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SCENE_H
2-
#define SCENE_H
1+
#ifndef SDLGL_SCENE_H
2+
#define SDLGL_SCENE_H
33

44
#include <unordered_map>
55
#include <vector>

game/timer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TIMER_H
2-
#define TIMER_H
1+
#ifndef SDLGL_TIMER_H
2+
#define SDLGL_TIMER_H
33

44
class Timer {
55
unsigned int start_time;

graphics/character.cpp

Whitespace-only changes.

graphics/character.h

Whitespace-only changes.

graphics/effects/emitter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PARTICLE_EMITTER_H
2-
#define PARTICLE_EMITTER_H
1+
#ifndef SDLGL_PARTICLE_EMITTER_H
2+
#define SDLGL_PARTICLE_EMITTER_H
33

44
#include "../../game/physical_entity.h"
55
#include "particle.h"

graphics/effects/linear_emitter.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef LINEAR_PARTICLE_EMITTER_H
2-
#define LINEAR_PARTICLE_EMITTER_H
1+
#ifndef SDLGL_LINEAR_PARTICLE_EMITTER_H
2+
#define SDLGL_LINEAR_PARTICLE_EMITTER_H
33

44
#include <utility>
55

graphics/effects/linear_particle.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef LINEAR_PARTICLE_H
2-
#define LINEAR_PARTICLE_H
1+
#ifndef SDLGL_LINEAR_PARTICLE_H
2+
#define SDLGL_LINEAR_PARTICLE_H
33

44
#include "particle.h"
55

graphics/effects/particle.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef PARTICLE_H
2-
#define PARTICLE_H
1+
#ifndef SDLGL_PARTICLE_H
2+
#define SDLGL_PARTICLE_H
33

44
#include "../../game/physical_entity.h"
55
#include "../../game/timer.h"

graphics/fps_counter.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#ifndef FPS_COUNTER_H
2-
#define FPS_COUNTER_H
1+
#ifndef SDLGL_FPS_COUNTER_H
2+
#define SDLGL_FPS_COUNTER_H
33

4-
#define NUM_FRAMES_SAMPLED (10)
4+
#define SDLGL_NUM_FRAMES_SAMPLED (10)
55
// Interval in seconds before updating FPS calculation
6-
#define UPDATE_DELAY (0.25f)
6+
#define SDLGL_UPDATE_DELAY (0.25f)
77

88
class FPSCounter {
99
float frame_times[NUM_FRAMES_SAMPLED];

graphics/graphics.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef GRAPHICS_H
2-
#define GRAPHICS_H
1+
#ifndef SDLGL_GRAPHICS_H
2+
#define SDLGL_GRAPHICS_H
33

44
#include <string>
55
#include <vector>

graphics/offset.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SPRITE_OFFSET_H
2-
#define SPRITE_OFFSET_H
1+
#ifndef SDLGL_SPRITE_OFFSET_H
2+
#define SDLGL_SPRITE_OFFSET_H
33

44
struct Offset {
55
int x;

graphics/resources.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef RESOURCES_H
2-
#define RESOURCES_H
1+
#ifndef SDLGL_RESOURCES_H
2+
#define SDLGL_RESOURCES_H
33

44
#include <map>
55
#include <string>

graphics/sprite.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SPRITE_H
2-
#define SPRITE_H
1+
#ifndef SDLGL_SPRITE_H
2+
#define SDLGL_SPRITE_H
33

44
#include <vector>
55

graphics/text.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TEXT_H
2-
#define TEXT_H
1+
#ifndef SDLGL_TEXT_H
2+
#define SDLGL_TEXT_H
33

44
#include <string>
55

graphics/texture.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TEXTURE_H
2-
#define TEXTURE_H
1+
#ifndef SDLGL_TEXTURE_H
2+
#define SDLGL_TEXTURE_H
33

44
#include <vector>
55

graphics/tilemap.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TILEMAP_H
2-
#define TILEMAP_H
1+
#ifndef SDLGL_TILEMAP_H
2+
#define SDLGL_TILEMAP_H
33

44
#include <vector>
55

graphics/tileset.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef TILESET_H
2-
#define TILESET_H
1+
#ifndef SDLGL_TILESET_H
2+
#define SDLGL_TILESET_H
33

44
#include <map>
55

input/inputs.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#ifndef INPUTS_H
2-
#define INPUTS_H
1+
#ifndef SDLGL_INPUTS_H
2+
#define SDLGL_INPUTS_H
33

44
#include "SDL.h"
55

6-
#define NUM_KEYS 2014
6+
#define SDLGL_NUM_KEYS 2014
77

88
class Inputs {
99
bool quit;

ui/entity_count.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef ENTITY_COUNT_H
2-
#define ENTITY_COUNT_H
1+
#ifndef SDLGL_ENTITY_COUNT_H
2+
#define SDLGL_ENTITY_COUNT_H
33

44
#include <string>
55

ui/fps_display.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef FPS_DISPLAY_H
2-
#define FPS_DISPLAY_H
1+
#ifndef SDLGL_FPS_DISPLAY_H
2+
#define SDLGL_FPS_DISPLAY_H
33

44
#include <string>
55

utilities/math.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef UTILMATH_H
2-
#define UTILMATH_H
1+
#ifndef SDLGL_UTILMATH_H
2+
#define SDLGL_UTILMATH_H
33

44
#include <utility>
55

utilities/noise.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef NOISE_H
2-
#define NOISE_H
1+
#ifndef SDLGL_NOISE_H
2+
#define SDLGL_NOISE_H
33

44
#include <array>
55

utilities/random.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef RANDOM_H
2-
#define RANDOM_H
1+
#ifndef SDLGL_RANDOM_H
2+
#define SDLGL_RANDOM_H
33

44
#include <random>
55

0 commit comments

Comments
 (0)