claude review

This commit is contained in:
2026-03-23 16:40:06 +01:00
parent 93308e3f8d
commit 64b89bd8c1
5 changed files with 12 additions and 11 deletions

View File

@@ -44,6 +44,7 @@ Entity entity_enemy_new(Vector2 pos, Arena* arena, TextureManager* tm)
EntityManager entity_manager_init()
{
EntityManager em = {0};
em.entities = NULL;
arrsetcap(em.entities, ENTITY_INITAL_CAP);

View File

@@ -1,6 +1,6 @@
#pragma once
#include "game.h"
#include "game_defs.h"
#include "raylib.h"
#include "sprite.h"
#include "texture_manager.h"

View File

@@ -1,6 +1,8 @@
#pragma once
#include "sprite.h"
#include "utils/defs.h"
#define GAME_NAME "Colossus March"
#define BG CLITERAL(Color){243, 223, 162, 255}
@@ -14,3 +16,9 @@ typedef struct GameContext {
} GameContext;
extern GameContext g_ctx;
typedef struct Player {
Sprite* sprite;
Vector2 pos;
float walk_speed;
} Player;

View File

@@ -1,13 +1,5 @@
#pragma once
#include "sprite.h"
typedef struct Player {
Sprite* sprite;
Vector2 pos;
float walk_speed;
} Player;
void game_screen_init();
void game_screen_update();
void game_screen_draw();

View File

@@ -21,7 +21,7 @@ TextureManager texture_manager_init()
Texture2D texture_manager_load_texture(TextureManager* tm, const char* path)
{
size texture_idx = shget(tm->tex_hash, path);
i32 texture_idx = shget(tm->tex_hash, path);
if (texture_idx == -1) {
Texture2D tex = LoadTexture(path);
@@ -39,7 +39,7 @@ Texture2D texture_manager_load_texture_from_image(TextureManager* tm,
const char* name,
Image image)
{
size texture_idx = shget(tm->tex_hash, name);
i32 texture_idx = shget(tm->tex_hash, name);
if (texture_idx == -1) {
Texture2D tex = LoadTextureFromImage(image);