Remove ./ prefix from includes
parent
87ac7f08c7
commit
74fe51da6d
|
@ -1,7 +1,7 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "./color.h"
|
||||
#include "color.h"
|
||||
|
||||
color_t color(float r, float g, float b, float a)
|
||||
{
|
||||
|
|
10
src/game.c
10
src/game.c
|
@ -3,11 +3,11 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "./game.h"
|
||||
#include "./game/level.h"
|
||||
#include "./game/sound_medium.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "game.h"
|
||||
#include "game/level.h"
|
||||
#include "game/sound_medium.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
typedef enum game_state_t {
|
||||
GAME_STATE_RUNNING = 0,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./game/sound_medium.h"
|
||||
#include "game/sound_medium.h"
|
||||
|
||||
typedef struct game_t game_t;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "./game/level.h"
|
||||
#include "./game/level/camera.h"
|
||||
#include "./game/level/goals.h"
|
||||
#include "./game/level/lava.h"
|
||||
#include "./game/level/platforms.h"
|
||||
#include "./game/level/player.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "game/level.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "game/level/goals.h"
|
||||
#include "game/level/lava.h"
|
||||
#include "game/level/platforms.h"
|
||||
#include "game/level/player.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
/* TODO(#118): Level doesn't play the Nothing and Something sounds when the goal get into view */
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
|
||||
#include "./game/level/camera.h"
|
||||
#include "./game/level/platforms.h"
|
||||
#include "./game/level/player.h"
|
||||
#include "./sound_medium.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "game/level/platforms.h"
|
||||
#include "game/level/player.h"
|
||||
#include "sound_medium.h"
|
||||
|
||||
typedef struct level_t level_t;
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "./camera.h"
|
||||
#include "./sdl/renderer.h"
|
||||
#include "./system/error.h"
|
||||
#include "camera.h"
|
||||
#include "sdl/renderer.h"
|
||||
#include "system/error.h"
|
||||
|
||||
#define RATIO_X 16.0f
|
||||
#define RATIO_Y 9.0f
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef CAMERA_H_
|
||||
#define CAMERA_H_
|
||||
|
||||
#include "./color.h"
|
||||
#include "./math/point.h"
|
||||
#include "./math/rect.h"
|
||||
#include "./math/triangle.h"
|
||||
#include "color.h"
|
||||
#include "math/point.h"
|
||||
#include "math/rect.h"
|
||||
#include "math/triangle.h"
|
||||
|
||||
typedef struct camera_t camera_t;
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "./goals.h"
|
||||
#include "./math/pi.h"
|
||||
#include "./math/triangle.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "goals.h"
|
||||
#include "math/pi.h"
|
||||
#include "math/triangle.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
#define GOAL_RADIUS 10.0f
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./game/level/camera.h"
|
||||
#include "./game/level/player.h"
|
||||
#include "./game/sound_medium.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "game/level/player.h"
|
||||
#include "game/sound_medium.h"
|
||||
|
||||
typedef struct goals_t goals_t;
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "./color.h"
|
||||
#include "./game/level/lava/wavy_rect.h"
|
||||
#include "./lava.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "color.h"
|
||||
#include "game/level/lava/wavy_rect.h"
|
||||
#include "lava.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
struct lava_t {
|
||||
lt_t *lt;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef LAVA_H_
|
||||
#define LAVA_H_
|
||||
|
||||
#include "./game/level/camera.h"
|
||||
#include "./math/rect.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct lava_t lava_t;
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "./math/pi.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "./wavy_rect.h"
|
||||
#include "math/pi.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
#include "wavy_rect.h"
|
||||
|
||||
#define WAVE_PILLAR_WIDTH 10.0f
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./color.h"
|
||||
#include "./game/level/camera.h"
|
||||
#include "./math/rect.h"
|
||||
#include "color.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct wavy_rect_t wavy_rect_t;
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "./platforms.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "platforms.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
struct platforms_t {
|
||||
lt_t *lt;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./camera.h"
|
||||
#include "./math/rect.h"
|
||||
#include "camera.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct platforms_t platforms_t;
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./game/level/player/dying_rect.h"
|
||||
#include "./game/level/player/rigid_rect.h"
|
||||
#include "./goals.h"
|
||||
#include "./math/point.h"
|
||||
#include "./platforms.h"
|
||||
#include "./player.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "game/level/player/dying_rect.h"
|
||||
#include "game/level/player/rigid_rect.h"
|
||||
#include "goals.h"
|
||||
#include "math/point.h"
|
||||
#include "platforms.h"
|
||||
#include "player.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
#define PLAYER_WIDTH 25.0f
|
||||
#define PLAYER_HEIGHT 25.0f
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./camera.h"
|
||||
#include "./game/sound_medium.h"
|
||||
#include "./lava.h"
|
||||
#include "./platforms.h"
|
||||
#include "camera.h"
|
||||
#include "game/sound_medium.h"
|
||||
#include "lava.h"
|
||||
#include "platforms.h"
|
||||
|
||||
typedef struct player_t player_t;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "./dying_rect.h"
|
||||
#include "./math/rand.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "dying_rect.h"
|
||||
#include "math/rand.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
#define DYING_RECT_PIECE_COUNT 20
|
||||
#define DYING_RECT_PIECE_SIZE 20.0f
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./color.h"
|
||||
#include "./game/level/camera.h"
|
||||
#include "./math/rect.h"
|
||||
#include "color.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct dying_rect_t dying_rect_t;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <assert.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./color.h"
|
||||
#include "./rigid_rect.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "color.h"
|
||||
#include "rigid_rect.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
#define RIGID_RECT_GRAVITY 1500.0f
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#ifndef RIGID_RECT_H_
|
||||
#define RIGID_RECT_H_
|
||||
|
||||
#include "./color.h"
|
||||
#include "./game/level/camera.h"
|
||||
#include "./game/level/platforms.h"
|
||||
#include "./math/rect.h"
|
||||
#include "color.h"
|
||||
#include "game/level/camera.h"
|
||||
#include "game/level/platforms.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct rigid_rect_t rigid_rect_t;
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./math/pi.h"
|
||||
#include "./sound_medium.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "math/pi.h"
|
||||
#include "sound_medium.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
struct sound_medium_t
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
|
||||
#include "./math/point.h"
|
||||
#include "math/point.h"
|
||||
|
||||
typedef struct sound_medium_t sound_medium_t;
|
||||
|
||||
|
|
14
src/main.c
14
src/main.c
|
@ -4,13 +4,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "./game.h"
|
||||
#include "./game/level/platforms.h"
|
||||
#include "./game/level/player.h"
|
||||
#include "./game/sound_medium.h"
|
||||
#include "./math/point.h"
|
||||
#include "./system/error.h"
|
||||
#include "./system/lt.h"
|
||||
#include "game.h"
|
||||
#include "game/level/platforms.h"
|
||||
#include "game/level/player.h"
|
||||
#include "game/sound_medium.h"
|
||||
#include "math/point.h"
|
||||
#include "system/error.h"
|
||||
#include "system/lt.h"
|
||||
|
||||
#define SCREEN_WIDTH 800
|
||||
#define SCREEN_HEIGHT 600
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "./mat3x3.h"
|
||||
#include "mat3x3.h"
|
||||
|
||||
mat3x3 mat3x3_product(mat3x3 m1, mat3x3 m2)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "./point.h"
|
||||
#include "point.h"
|
||||
|
||||
vec_t vec(float x, float y)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef POINT_H_
|
||||
#define POINT_H_
|
||||
|
||||
#include "./math/mat3x3.h"
|
||||
#include "./math/pi.h"
|
||||
#include "math/mat3x3.h"
|
||||
#include "math/pi.h"
|
||||
|
||||
typedef struct point_t {
|
||||
float x, y;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "./math/rand.h"
|
||||
#include "math/rand.h"
|
||||
|
||||
float rand_float(float max_value)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "./rect.h"
|
||||
#include "rect.h"
|
||||
|
||||
rect_t rect(float x, float y, float w, float h)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./math/point.h"
|
||||
#include "math/point.h"
|
||||
|
||||
typedef enum rect_side_t {
|
||||
RECT_SIDE_LEFT = 0,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "./math/pi.h"
|
||||
#include "./math/rand.h"
|
||||
#include "./triangle.h"
|
||||
#include "math/pi.h"
|
||||
#include "math/rand.h"
|
||||
#include "triangle.h"
|
||||
|
||||
triangle_t triangle(point_t p1, point_t p2, point_t p3)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef TRIANGLE_H_
|
||||
#define TRIANGLE_H_
|
||||
|
||||
#include "./math/point.h"
|
||||
#include "./math/rect.h"
|
||||
#include "math/point.h"
|
||||
#include "math/rect.h"
|
||||
|
||||
typedef struct triangle_t {
|
||||
point_t p1, p2, p3;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <SDL2/SDL.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "./renderer.h"
|
||||
#include "./system/error.h"
|
||||
#include "renderer.h"
|
||||
#include "system/error.h"
|
||||
|
||||
int draw_triangle(SDL_Renderer *render,
|
||||
triangle_t t)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "./math/point.h"
|
||||
#include "./math/triangle.h"
|
||||
#include "math/point.h"
|
||||
#include "math/triangle.h"
|
||||
|
||||
int draw_triangle(SDL_Renderer *render,
|
||||
triangle_t t);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./error.h"
|
||||
#include "error.h"
|
||||
|
||||
static error_type_t current_error_type = ERROR_TYPE_OK;
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./lt.h"
|
||||
#include "./lt/lt_slot.h"
|
||||
#include "./system/error.h"
|
||||
#include "lt.h"
|
||||
#include "lt/lt_slot.h"
|
||||
#include "system/error.h"
|
||||
|
||||
#define INITIAL_FRAME_BUFFER_SIZE 16
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./lt_slot.h"
|
||||
#include "./system/error.h"
|
||||
#include "lt_slot.h"
|
||||
#include "system/error.h"
|
||||
|
||||
struct lt_slot_t
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue