finally compiling and running, text still needs rework

This commit is contained in:
2024-09-16 16:17:00 +03:00
parent 551d60ef85
commit 16c96010dc
43 changed files with 299 additions and 309 deletions

View File

@ -2,7 +2,7 @@
#include "scenes/scene.h"
#include "scenes/title.h"
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include <SDL_scancode.h>
#include <stdio.h>
@ -20,9 +20,6 @@ void game_tick(void) {
state->scene = title_scene(state);
}
input_add_action(&ctx.input, "debug_dump_atlases");
input_bind_action_scancode(&ctx.input, "debug_dump_atlases", SDL_SCANCODE_HOME);
input_add_action(&ctx.input, "debug_toggle");
input_bind_action_scancode(&ctx.input, "debug_toggle", SDL_SCANCODE_BACKSPACE);
@ -53,10 +50,6 @@ void game_tick(void) {
struct state *state = ctx.udata;
if (input_is_action_just_pressed(&ctx.input, "debug_dump_atlases")) {
textures_dump_atlases(&ctx.texture_cache);
}
if (input_is_action_just_pressed(&ctx.input, "debug_toggle")) {
ctx.debug = !ctx.debug;
}

View File

@ -1,6 +1,7 @@
#include "player.h"
#include "world.h"
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include <SDL2/SDL.h>

View File

@ -1,8 +1,7 @@
#ifndef PLAYER_H
#define PLAYER_H
#include "townengine/game_api.h"
#include "twn_game_api.h"
struct world;

View File

@ -2,7 +2,7 @@
#include "title.h"
#include "scene.h"
#include "townengine/game_api.h"
#include "twn_game_api.h"
#define STB_PERLIN_IMPLEMENTATION
#include <stb_perlin.h>

View File

@ -1,8 +1,7 @@
#ifndef INGAME_H
#define INGAME_H
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include "../state.h"
#include "scene.h"

View File

@ -3,7 +3,7 @@
#include "../world.h"
#include "../player.h"
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include <stdio.h>

View File

@ -1,8 +1,6 @@
#ifndef TITLE_H
#define TITLE_H
#include "townengine/game_api.h"
#include "../state.h"
#include "scene.h"
#include "../player.h"

View File

@ -2,8 +2,9 @@
#define STATE_H
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include <stdbool.h>
struct state {
t_ctx *ctx;

View File

@ -1,4 +1,4 @@
#include "townengine/game_api.h"
#include "twn_game_api.h"
#include "world.h"

View File

@ -1,8 +1,6 @@
#ifndef WORLD_H
#define WORLD_H
#include "townengine/game_api.h"
#include <stdint.h>
#include <stdbool.h>