claude review
This commit is contained in:
@@ -44,6 +44,7 @@ Entity entity_enemy_new(Vector2 pos, Arena* arena, TextureManager* tm)
|
|||||||
EntityManager entity_manager_init()
|
EntityManager entity_manager_init()
|
||||||
{
|
{
|
||||||
EntityManager em = {0};
|
EntityManager em = {0};
|
||||||
|
em.entities = NULL;
|
||||||
|
|
||||||
arrsetcap(em.entities, ENTITY_INITAL_CAP);
|
arrsetcap(em.entities, ENTITY_INITAL_CAP);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "game.h"
|
#include "game_defs.h"
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "texture_manager.h"
|
#include "texture_manager.h"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "sprite.h"
|
||||||
#include "utils/defs.h"
|
#include "utils/defs.h"
|
||||||
|
|
||||||
#define GAME_NAME "Colossus March"
|
#define GAME_NAME "Colossus March"
|
||||||
|
|
||||||
#define BG CLITERAL(Color){243, 223, 162, 255}
|
#define BG CLITERAL(Color){243, 223, 162, 255}
|
||||||
@@ -14,3 +16,9 @@ typedef struct GameContext {
|
|||||||
} GameContext;
|
} GameContext;
|
||||||
|
|
||||||
extern GameContext g_ctx;
|
extern GameContext g_ctx;
|
||||||
|
|
||||||
|
typedef struct Player {
|
||||||
|
Sprite* sprite;
|
||||||
|
Vector2 pos;
|
||||||
|
float walk_speed;
|
||||||
|
} Player;
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "sprite.h"
|
|
||||||
|
|
||||||
typedef struct Player {
|
|
||||||
Sprite* sprite;
|
|
||||||
Vector2 pos;
|
|
||||||
float walk_speed;
|
|
||||||
} Player;
|
|
||||||
|
|
||||||
void game_screen_init();
|
void game_screen_init();
|
||||||
void game_screen_update();
|
void game_screen_update();
|
||||||
void game_screen_draw();
|
void game_screen_draw();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ TextureManager texture_manager_init()
|
|||||||
|
|
||||||
Texture2D texture_manager_load_texture(TextureManager* tm, const char* path)
|
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) {
|
if (texture_idx == -1) {
|
||||||
Texture2D tex = LoadTexture(path);
|
Texture2D tex = LoadTexture(path);
|
||||||
@@ -39,7 +39,7 @@ Texture2D texture_manager_load_texture_from_image(TextureManager* tm,
|
|||||||
const char* name,
|
const char* name,
|
||||||
Image image)
|
Image image)
|
||||||
{
|
{
|
||||||
size texture_idx = shget(tm->tex_hash, name);
|
i32 texture_idx = shget(tm->tex_hash, name);
|
||||||
|
|
||||||
if (texture_idx == -1) {
|
if (texture_idx == -1) {
|
||||||
Texture2D tex = LoadTextureFromImage(image);
|
Texture2D tex = LoadTextureFromImage(image);
|
||||||
|
|||||||
Reference in New Issue
Block a user