From 1d738c35d40b99fc57bb61bb1a944d7361e3a790 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 8 Apr 2026 16:22:58 +0300 Subject: [PATCH 1/3] docs: move README to `docs/`; reword most sections Signed-off-by: NotAShelf Change-Id: Ida6ac152f3fa71ceb1d980afba9a82fc6a6a6964 --- README.md => docs/README.md | 70 +++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 31 deletions(-) rename README.md => docs/README.md (53%) diff --git a/README.md b/docs/README.md similarity index 53% rename from README.md rename to docs/README.md index 9d63b10..d9d9ba9 100644 --- a/README.md +++ b/docs/README.md @@ -1,11 +1,13 @@ # Rogged -Turn-based roguelike dungeon crawler, built in C99 and with a dash of Zig to -serve as a learning opportunity. Rogged is basically a classic roguelike where -you descend through floors of a procedurally generated dungeon, fighting -enemies, managing inventory, and trying to reach the bottom alive. +Turn-based, infinite roguelike dungeon crawler built with C99 and with a dash of +Zig. Meant to serve primarily, but not exclusively, as a learning opportunity. +Rogged is basically a classic roguelike where you descend through floors of a +procedurally generated dungeon, fighting enemies, managing inventory, and trying +to reach the bottom alive or die chasing a highscore! -A non-exhaustive list of its (current) features: +The game itself, be it the code or mechanics, is _heavily_ in development. For +now, a non-exhaustive list of its (current) features are as follows: - Turn-based combat with damage variance, critical hits, dodge, and block mechanics @@ -18,33 +20,27 @@ A non-exhaustive list of its (current) features: - Procedural audio via raylib - ASCII-inspired tile rendering, with HP bars and floating damage text -**Controls:** - -| Key | Action | -| ------------- | ----------------------------------- | -| WASD / Arrows | Move or attack | -| G | Pick up item | -| I | Open inventory | -| U | Use a potion | -| E | Equip item from inventory | -| D | Drop item | -| Y / N | Confirm / decline descending stairs | -| R | Restart (on game over) | -| Q | Quit | +There are still some features lacking polish, or lacking _any_ kind of attention +to be viable. For a semi-complete list of things that need to be done, see the +[future plans section](#future-plans). ## Build Instructions -Rogged is built with C99 and Zig. Besides `raylib` and `pkg-config` you will -need a C compiler and basic Zig tooling. For now, we use C99 and Zig 0.15.2. -Those might change in the future. - -Additionally you will need `clang-format` and `just` for the developer workflow -if you plan to contribute. +Rogged is built on a relatively simple stack. It uses C99 for the main game +logic, and Zig for the combat library. Besides `raylib` and `pkg-config`, you +only need the core Zig tooling. For now the required Zig version is 0.15.2, but +this might change in the future. Additionally, you will need `clang-format` and +`just` for common development tasks in the case you plan to contribute. For +building, Zig is enough. ### Using Nix (Recommended) -The recommended developer tooling is [Nix](https://nixos.org). This provides a -pure, reproducible devshell across all machines. +The _recommended_ way of developing this project is using +[Nix](https://nixos.org) and relying on devshells for pure, reproducible +developer environment across all machines. + +If you are a [Direnv](https://direnv.net) user, you may simply run +`direnv allow` or you may use `nix develop` to enter the default shell. ```sh # Enter the development shell @@ -56,6 +52,9 @@ $ just dev ### Manual Build +If you are allergic to good tooling and would rather use your system Zig, you +may simply invoke `zig build` after acquiring Zig 0.15.2. + ```sh # Full build $ zig build @@ -67,6 +66,8 @@ $ zig build run $ just dev ``` +The Justfile provides commands that work across both methods. + ### Task Runner Commands There's a `Justfile` designed to make common tasks somewhat easier. For now, @@ -84,10 +85,14 @@ If the project gets more complicated, new tasks might be added. ## Future Plans -The game is currently **playable end-to-end** but it lacks _serious_ polish to -claim its place as a fun roguelike. Some of the features I'd like to introduce, -in no particular order, are as follows: +The game is currently **playable end-to-end**, but it lacks a fair bit of polish +to claim its place as a fun, engaging roguelike you can just boot up and play. +Some of the features that are planned for the future, in no particular order, +are as follows: +- [ ] **Better enemy AI** - The current AI is very simple. +- [ ] **Fog of War** - Instead of loading the entire map, let the player + discover the rooms - [ ] **Save / Load system** - Persist and restore game state between sessions - [ ] **More enemy variety** - Additional enemy types with unique abilities - [ ] **More item variety** - Rings, wands, scrolls, and cursed items @@ -100,8 +105,9 @@ in no particular order, are as follows: - [ ] **UI polish** - Better message log history, item descriptions, death screen -In addition, it might be interesting to allow customizing the "world state" by -as scripting API. Though, that is for much later. +Later down the line it might be an interesting choice to provide a scripting +API, likely with Lua, to allow customizing the game state and events. Though, +that is for much later. ## Attributions @@ -118,4 +124,6 @@ Additionally, _huge_ thanks to [Raylib] for how easy it made graphics and audio. This was perhaps my best experience in developing a graphical application, and CERTAINLY the most ergonomic when it comes to writing a game. +--- + _I got rogged :/_ From 4dfe52ae729776dfd08408b926a6b33f37c5ec44 Mon Sep 17 00:00:00 2001 From: Squirrel Modeller Date: Thu, 9 Apr 2026 14:11:46 +0000 Subject: [PATCH 2/3] movement: generalize; use vectors (#16) Generalized movement, so that all entities move the same. Reviewed-on: https://git.frzn.dev/NotAShelf/rogged/pulls/16 Reviewed-by: raf Co-authored-by: Squirrel Modeller Co-committed-by: Squirrel Modeller --- build.zig | 1 + src/common.h | 8 ++++-- src/enemy.c | 49 +++++++++++++++-------------------- src/main.c | 69 ++++++++++++++++++++++++++++---------------------- src/movement.c | 29 +++++++++++++++++++++ src/movement.h | 17 +++++++++++++ src/player.c | 31 +++++------------------ src/player.h | 4 +-- src/render.c | 11 ++++---- 9 files changed, 127 insertions(+), 92 deletions(-) create mode 100644 src/movement.c create mode 100644 src/movement.h diff --git a/build.zig b/build.zig index 7109941..4d6f6b2 100644 --- a/build.zig +++ b/build.zig @@ -25,6 +25,7 @@ pub fn build(b: *std.Build) void { "src/main.c", "src/map.c", "src/player.c", + "src/movement.c", "src/render.c", "src/rng.c", "src/settings.c", diff --git a/src/common.h b/src/common.h index 61ab044..52fe274 100644 --- a/src/common.h +++ b/src/common.h @@ -4,6 +4,10 @@ #include "settings.h" #include +typedef struct { + int x, y; +} Vec2; + // Tile types typedef enum { TILE_WALL, TILE_FLOOR, TILE_STAIRS } TileType; @@ -57,7 +61,7 @@ typedef struct { // Player typedef struct { - int x, y; + Vec2 position; int hp, max_hp; int attack; int defense; @@ -83,7 +87,7 @@ typedef enum { ENEMY_GOBLIN, ENEMY_SKELETON, ENEMY_ORC } EnemyType; // Enemy typedef struct { - int x, y; + Vec2 position; int hp; int max_hp; int attack; diff --git a/src/enemy.c b/src/enemy.c index 9f72670..a9d4909 100644 --- a/src/enemy.c +++ b/src/enemy.c @@ -2,6 +2,7 @@ #include "combat.h" #include "common.h" #include "map.h" +#include "movement.h" #include "rng.h" #include @@ -29,7 +30,7 @@ void enemy_spawn(Enemy enemies[], int *count, Map *map, Player *p, int floor) { get_random_floor_tile(map, &ex, &ey, 50); // Don't spawn on player position - if (ex == p->x && ey == p->y) { + if (ex == p->position.x && ey == p->position.y) { continue; } @@ -41,8 +42,8 @@ void enemy_spawn(Enemy enemies[], int *count, Map *map, Player *p, int floor) { // Create enemy Enemy e; memset(&e, 0, sizeof(Enemy)); - e.x = ex; - e.y = ey; + e.position.x = ex; + e.position.y = ey; e.alive = 1; e.type = rng_int(ENEMY_GOBLIN, max_type); e.effect_count = 0; @@ -127,7 +128,7 @@ void enemy_spawn(Enemy enemies[], int *count, Map *map, Player *p, int floor) { // Check if position has an enemy int is_enemy_at(const Enemy *enemies, int count, int x, int y) { for (int i = 0; i < count; i++) { - if (enemies[i].alive && enemies[i].x == x && enemies[i].y == y) { + if (enemies[i].alive && enemies[i].position.x == x && enemies[i].position.y == y) { return 1; } } @@ -136,45 +137,37 @@ int is_enemy_at(const Enemy *enemies, int count, int x, int y) { // Check if enemy can see player (adjacent) static int can_see_player(Enemy *e, Player *p) { - int dx = p->x - e->x; - int dy = p->y - e->y; + int dx = p->position.x - e->position.x; + int dy = p->position.y - e->position.y; return (dx >= -1 && dx <= 1 && dy >= -1 && dy <= 1); } -// Check if position is occupied by player -static int is_player_at(Player *p, int x, int y) { - return (p->x == x && p->y == y); -} // Move enemy toward player static void enemy_move_toward_player(Enemy *e, Player *p, Map *map, Enemy *all_enemies, int enemy_count) { int dx = 0, dy = 0; - if (p->x > e->x) + if (p->position.x > e->position.x) dx = 1; - else if (p->x < e->x) + else if (p->position.x < e->position.x) dx = -1; - if (p->y > e->y) + if (p->position.y > e->position.y) dy = 1; - else if (p->y < e->y) + else if (p->position.y < e->position.y) dy = -1; - // Try horizontal first, then vertical - int new_x = e->x + dx; - int new_y = e->y; + Vec2 dir = {dx, 0}; + if (dx != 0) { + MoveResult r = try_move_entity(&e->position, dir, map, p, all_enemies, enemy_count, false); + if (r == MOVE_RESULT_MOVED) + return; + } - if (dx != 0 && is_floor(map, new_x, new_y) && !is_enemy_at(all_enemies, enemy_count, new_x, new_y) && - !is_player_at(p, new_x, new_y)) { - e->x = new_x; - } else if (dy != 0) { - new_x = e->x; - new_y = e->y + dy; - if (is_floor(map, new_x, new_y) && !is_enemy_at(all_enemies, enemy_count, new_x, new_y) && - !is_player_at(p, new_x, new_y)) { - e->x = new_x; - e->y = new_y; - } + dir.x = 0; + dir.y = dy; + if (dy != 0) { + try_move_entity(&e->position, dir, map, p, all_enemies, enemy_count, false); } } diff --git a/src/main.c b/src/main.c index d450d75..d90487b 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,7 @@ #include "enemy.h" #include "items.h" #include "map.h" +#include "movement.h" #include "player.h" #include "raylib.h" #include "render.h" @@ -117,8 +118,8 @@ static void init_floor(GameState *gs, int floor_num) { gs->floors_reached = 1; } else { // Move player to new floor position - gs->player.x = start_x; - gs->player.y = start_y; + gs->player.position.x = start_x; + gs->player.position.y = start_y; } gs->player.floor = floor_num; @@ -137,7 +138,8 @@ static void tick_all_effects(GameState *gs) { // Player effects int player_effect_dmg = combat_tick_effects(&gs->player); if (player_effect_dmg > 0) { - spawn_floating_text(gs, gs->player.x * TILE_SIZE + 8, gs->player.y * TILE_SIZE, player_effect_dmg, 0); + spawn_floating_text(gs, gs->player.position.x * TILE_SIZE + 8, gs->player.position.y * TILE_SIZE, player_effect_dmg, + 0); gs->screen_shake = SHAKE_EFFECT_DURATION; } @@ -155,7 +157,7 @@ static void tick_all_effects(GameState *gs) { continue; int enemy_effect_dmg = combat_tick_enemy_effects(e); if (enemy_effect_dmg > 0) { - spawn_floating_text(gs, e->x * TILE_SIZE + 8, e->y * TILE_SIZE, enemy_effect_dmg, 0); + spawn_floating_text(gs, e->position.x * TILE_SIZE + 8, e->position.y * TILE_SIZE, enemy_effect_dmg, 0); } if (!e->alive) { add_log(gs, "Enemy died from effects!"); @@ -173,7 +175,7 @@ static void post_action(GameState *gs, Enemy *attacked_enemy) { return; // Check if stepped on stairs - if (gs->map.tiles[gs->player.y][gs->player.x] == TILE_STAIRS) { + if (gs->map.tiles[gs->player.position.y][gs->player.position.x] == TILE_STAIRS) { gs->awaiting_descend = 1; gs->last_message = "Descend to next floor? (Y/N)"; gs->message_timer = 120; @@ -182,8 +184,8 @@ static void post_action(GameState *gs, Enemy *attacked_enemy) { // combat feedback - player attacked an enemy this turn if (attacked_enemy != NULL) { - int ex = attacked_enemy->x * TILE_SIZE + 8; - int ey = attacked_enemy->y * TILE_SIZE; + int ex = attacked_enemy->position.x * TILE_SIZE + 8; + int ey = attacked_enemy->position.y * TILE_SIZE; if (combat_was_dodged()) { spawn_floating_label(gs, ex, ey, LABEL_DODGE, EFFECT_NONE); @@ -224,8 +226,8 @@ static void post_action(GameState *gs, Enemy *attacked_enemy) { gs->screen_shake = SHAKE_PLAYER_DAMAGE_DURATION; gs->damage_taken += combat_get_last_damage(); gs->times_hit++; - spawn_floating_text(gs, gs->player.x * TILE_SIZE + 8, gs->player.y * TILE_SIZE, combat_get_last_damage(), - combat_was_critical()); + spawn_floating_text(gs, gs->player.position.x * TILE_SIZE + 8, gs->player.position.y * TILE_SIZE, + combat_get_last_damage(), combat_was_critical()); } // Set message and check game over @@ -388,7 +390,7 @@ static int handle_movement_input(GameState *gs) { // Check for manual item pickup (G key) if (IsKeyPressed(KEY_G)) { - Item *item = get_item_at_floor(gs->items, gs->item_count, gs->player.x, gs->player.y); + Item *item = get_item_at_floor(gs->items, gs->item_count, gs->player.position.x, gs->player.position.y); if (item != NULL) { if (player_pickup(&gs->player, item)) { gs->items_collected++; @@ -417,38 +419,45 @@ static int handle_movement_input(GameState *gs) { } } - // Movement: use IsKeyDown for held-key repeat - int dx = 0, dy = 0; - if (IsKeyDown(KEY_W) || IsKeyDown(KEY_UP)) - dy = -1; - else if (IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN)) - dy = 1; - else if (IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT)) - dx = -1; - else if (IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT)) - dx = 1; - if (dx == 0 && dy == 0) + Vec2 direction = {0, 0}; + if (IsKeyDown(KEY_W) || IsKeyDown(KEY_UP)) + direction.y = -1; + else if (IsKeyDown(KEY_S) || IsKeyDown(KEY_DOWN)) + direction.y = 1; + else if (IsKeyDown(KEY_A) || IsKeyDown(KEY_LEFT)) + direction.x = -1; + else if (IsKeyDown(KEY_D) || IsKeyDown(KEY_RIGHT)) + direction.x = 1; + + if (direction.x == 0 && direction.y == 0) return 0; // Reset combat event before player acts combat_reset_event(); - int new_x = gs->player.x + dx; - int new_y = gs->player.y + dy; + + int new_x = gs->player.position.x + direction.x; + int new_y = gs->player.position.y + direction.y; + + Enemy *target = NULL; int action = 0; - // Attack enemy at target tile, or move into it - Enemy *target = player_find_enemy_at(gs->enemies, gs->enemy_count, new_x, new_y); - if (target != NULL) { - player_attack(&gs->player, target); + MoveResult result = + try_move_entity(&gs->player.position, direction, &gs->map, &gs->player, gs->enemies, gs->enemy_count, true); + if (result == MOVE_RESULT_MOVED) { + player_on_move(&gs->player); action = 1; - } else { - action = player_move(&gs->player, dx, dy, &gs->map); + } else if (result == MOVE_RESULT_BLOCKED_ENEMY) { + target = player_find_enemy_at(gs->enemies, gs->enemy_count, new_x, new_y); + if (target != NULL) { + player_attack(&gs->player, target); + action = 1; + } } if (action) - post_action(gs, target); // target is NULL on move, enemy ptr on attack + post_action(gs, target); return action; } diff --git a/src/movement.c b/src/movement.c new file mode 100644 index 0000000..0f7fd8f --- /dev/null +++ b/src/movement.c @@ -0,0 +1,29 @@ +#include "movement.h" +#include "enemy.h" +#include "map.h" +#include + +// Check if position is occupied by player +static int is_player_at(Player *p, int x, int y) { + return (p->position.x == x && p->position.y == y); +} + +MoveResult try_move_entity(Vec2 *p, Vec2 direction, Map *map, Player *player, Enemy *enemies, int enemy_count, + bool moving_is_player) { + int new_x = p->x + direction.x; + int new_y = p->y + direction.y; + + if (!is_floor(map, new_x, new_y)) + return MOVE_RESULT_BLOCKED_WALL; + + if (is_enemy_at(enemies, enemy_count, new_x, new_y)) + return MOVE_RESULT_BLOCKED_ENEMY; + if (!moving_is_player) { + if (is_player_at(player, new_x, new_y)) + return MOVE_RESULT_BLOCKED_PLAYER; + } + + p->x = new_x; + p->y = new_y; + return MOVE_RESULT_MOVED; +} diff --git a/src/movement.h b/src/movement.h new file mode 100644 index 0000000..e73a9a0 --- /dev/null +++ b/src/movement.h @@ -0,0 +1,17 @@ +#ifndef MOVEMENT_H +#define MOVEMENT_H + +#include "common.h" + +typedef enum { + MOVE_RESULT_MOVED, + MOVE_RESULT_BLOCKED_WALL, + MOVE_RESULT_BLOCKED_PLAYER, + MOVE_RESULT_BLOCKED_ENEMY +} MoveResult; + +// Attempts to move entity in a given direction. Returns outcome of action. +MoveResult try_move_entity(Vec2 *p, Vec2 direction, Map *map, Player *player, Enemy *enemies, int enemy_count, + bool moving_is_player); + +#endif // MOVEMENT_H diff --git a/src/player.c b/src/player.c index 3bb4c4d..ecc9967 100644 --- a/src/player.c +++ b/src/player.c @@ -2,15 +2,12 @@ #include "combat.h" #include "common.h" #include "items.h" -#include "map.h" #include "settings.h" -#include "utils.h" -#include #include void player_init(Player *p, int x, int y) { - p->x = x; - p->y = y; + p->position.x = x; + p->position.y = y; p->hp = PLAYER_BASE_HP; p->max_hp = PLAYER_BASE_HP; p->attack = PLAYER_BASE_ATTACK; @@ -43,36 +40,20 @@ Enemy *player_find_enemy_at(Enemy *enemies, int count, int x, int y) { if (count > MAX_ENEMIES) count = MAX_ENEMIES; for (int i = 0; i < count; i++) { - if (enemies[i].alive && enemies[i].x == x && enemies[i].y == y) + if (enemies[i].alive && enemies[i].position.x == x && enemies[i].position.y == y) return &enemies[i]; } return NULL; } -int player_move(Player *p, int dx, int dy, Map *map) { - int new_x = p->x + dx; - int new_y = p->y + dy; - - // Check bounds - if (!in_bounds(new_x, new_y, MAP_WIDTH, MAP_HEIGHT)) - return 0; - - // Check if walkable - if (!is_floor(map, new_x, new_y)) - return 0; - - // Move player - p->x = new_x; - p->y = new_y; +void player_on_move(Player *p) { p->step_count += 1; - // Regen suppressed while poisoned, bleeding, or burning if (p->step_count % REGEN_STEP_INTERVAL == 0 && p->hp < p->max_hp && !combat_has_effect(p->effects, p->effect_count, EFFECT_POISON) && !combat_has_effect(p->effects, p->effect_count, EFFECT_BLEED) && !combat_has_effect(p->effects, p->effect_count, EFFECT_BURN)) { p->hp += 1; } - return 1; } void player_attack(Player *p, Enemy *e) { @@ -228,8 +209,8 @@ int player_drop_item(Player *p, int inv_index, Item *items, int item_count) { if (items[i].picked_up) { // Place dropped item at this position items[i] = *item; - items[i].x = p->x; - items[i].y = p->y; + items[i].x = p->position.x; + items[i].y = p->position.y; items[i].picked_up = 0; // Remove from inventory player_remove_inventory_item(p, inv_index); diff --git a/src/player.h b/src/player.h index ca91abf..290806a 100644 --- a/src/player.h +++ b/src/player.h @@ -6,8 +6,8 @@ // Initialize player at position void player_init(Player *p, int x, int y); -// Move player to (x+dx, y+dy); returns 1 if moved, 0 if blocked -int player_move(Player *p, int dx, int dy, Map *map); +// Apply status effects, healing, etc +void player_on_move(Player *p); // Find a living enemy at tile (x, y); returns NULL if none Enemy *player_find_enemy_at(Enemy *enemies, int count, int x, int y); diff --git a/src/render.c b/src/render.c index 3c24e15..99267a8 100644 --- a/src/render.c +++ b/src/render.c @@ -30,7 +30,8 @@ void render_map(const Map *map) { } void render_player(const Player *p) { - Rectangle rect = {(float)(p->x * TILE_SIZE), (float)(p->y * TILE_SIZE), (float)TILE_SIZE, (float)TILE_SIZE}; + Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE, + (float)TILE_SIZE}; DrawRectangleRec(rect, BLUE); } @@ -39,8 +40,8 @@ void render_enemies(const Enemy *enemies, int count) { if (!enemies[i].alive) continue; - Rectangle rect = {(float)(enemies[i].x * TILE_SIZE), (float)(enemies[i].y * TILE_SIZE), (float)TILE_SIZE, - (float)TILE_SIZE}; + Rectangle rect = {(float)(enemies[i].position.x * TILE_SIZE), (float)(enemies[i].position.y * TILE_SIZE), + (float)TILE_SIZE, (float)TILE_SIZE}; // Different colors based on enemy type Color enemy_color; @@ -72,8 +73,8 @@ void render_enemies(const Enemy *enemies, int count) { bar_color = (Color){200, 180, 40, 255}; // yellow else bar_color = (Color){200, 60, 60, 255}; // red - Rectangle hp_bar = {(float)(enemies[i].x * TILE_SIZE), (float)(enemies[i].y * TILE_SIZE - 4), (float)hp_pixels, - 3}; + Rectangle hp_bar = {(float)(enemies[i].position.x * TILE_SIZE), (float)(enemies[i].position.y * TILE_SIZE - 4), + (float)hp_pixels, 3}; DrawRectangleRec(hp_bar, bar_color); } } From 0b3608b18c837cdb58221ec63e910b7afed2bca9 Mon Sep 17 00:00:00 2001 From: "A.M. Rowsell" Date: Wed, 8 Apr 2026 10:22:26 -0400 Subject: [PATCH 3/3] render: add player sprite. welcome to dude man --- assets/entities/player.png | Bin 0 -> 214 bytes assets/entities/player.png.kra | Bin 0 -> 30070 bytes assets/entities/player_white.png | Bin 0 -> 198 bytes src/main.c | 4 +++- src/render.c | 10 ++++++---- src/render.h | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 assets/entities/player.png create mode 100644 assets/entities/player.png.kra create mode 100644 assets/entities/player_white.png diff --git a/assets/entities/player.png b/assets/entities/player.png new file mode 100644 index 0000000000000000000000000000000000000000..8cab912c90cea4a2d70a7cc8c2fed1494d55244c GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{DA?iY z;uvCadTFpDUxNV$^W)}i|Lv3f59tavM>r%;mfe-IRQrI5qEgDm>izLPJ%%@m(wwI^ z%)2%#Lhi1%8P@{63DVsG4!YH^<^GsA?=5Oz@jtha`TvP-UB2B9CZGGEd_=2sEst}| zsSpLOkEa;^TCU=H{vh}MWyfE?B;Gao+uZ66S&)^k^`TUnf6}*aQxAJ@oCkChgQu&X J%Q~loCIB7sP-*}G literal 0 HcmV?d00001 diff --git a/assets/entities/player.png.kra b/assets/entities/player.png.kra new file mode 100644 index 0000000000000000000000000000000000000000..063cdf3d75cd562661a347365bc83f5371050c85 GIT binary patch literal 30070 zcmeI*bx>SgwkUAirIFw+!7aF3;~HFpdvJGmf&>e0L4yT%x8NGwA-KC=GV|ume7Q4K z@4b3|-ReW_KG4-`)#<%^?><%hYA;0@NGJrb--pTjFrA!J$U=DZQ|r^ zXJTMy_tC=0z{$eahRKb=%E7|PK=CyY^KUQv9VpbR+kprP24(;Y28Q@M(7?jR*w%>A z&HCer>X6bRGv@Nen-Y%sY5POIy*Vd{oDMMS0w~ia6=UxAWJ zDd7x1cG5kaj}tSzblyNPeBsdffhlnXBQC3yXwNNm_Oz=!-c76!{n<5;$t=&d+Y!o@ ztwpf4kw>(a1gQdc$AAk5d0f^}Mp4H$X#H*nuSBklK`?0Dp|Mn%3@Xc9N!??kGN&KL zugr|&n|~8VFyB|HGhw2wWczPU5f$Hx^}Oefvmr~+#7!9(G>_Csu>`n9e#}_EY!JMs zOyHo*k^LNye|yktL7W$bTjFlP51vP}8D9)7!-Ml?sZ&xDK|UNZ=$n24sY@>tv?lAP z_rv32%m^vE(X~ zQDQWbU~En<4hQE}Kc%7vB!rmI*sNJ52SlaJDZI?FsfraN)ypQ*BuQff^|v_Q`+FVY zkTWu9kTe9b+s%qC1B>lMA>f=gS%Y_!Ooq#4%szQmewUE48y#-A1VR_vHHR$JEGja+ z#i^B_+UM>z7uaEb7S@=ysbpl6N$3~0S|WsPEuBHxXprHxr`s3LxTO+Dw7Jz#X)J5G zU(oG->FN082#L>x<0ifPF?UAC)Yhru`vvXs_Hxl1iB9`wZWOJuDCmCobZE`Ut>t6; zrGkt@KXs`F+ZN-Z8P_6s;4+o#FFv7X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7zX7Fyz-C-Pg}Eq{HvO F{tMh)hFAaq literal 0 HcmV?d00001 diff --git a/assets/entities/player_white.png b/assets/entities/player_white.png new file mode 100644 index 0000000000000000000000000000000000000000..23b9e9f55a39b16eb8c0d232414c023dd0493c10 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C|Kd? z;uvCadTsDqE(S#o@0Wk$Z)#gSp0M)qiTJHEX3L*sNYqwR(`FOyhhO4tAZ literal 0 HcmV?d00001 diff --git a/src/main.c b/src/main.c index d90487b..6e0c8c9 100644 --- a/src/main.c +++ b/src/main.c @@ -505,6 +505,8 @@ static void game_loop(void) { GameState gs; memset(&gs, 0, sizeof(GameState)); load_audio_assets(&gs); + // entities + Texture2D player_tile = LoadTexture("./assets/entities/player_white.png"); // Initialize first floor rng_seed(12345); init_floor(&gs, 1); @@ -552,7 +554,7 @@ static void game_loop(void) { render_map(&gs.map); render_items(gs.items, gs.item_count); render_enemies(gs.enemies, gs.enemy_count); - render_player(&gs.player); + render_player(&gs.player, &player_tile); EndMode2D(); // Floating texts follow world shake diff --git a/src/render.c b/src/render.c index 99267a8..9dcd11c 100644 --- a/src/render.c +++ b/src/render.c @@ -29,10 +29,12 @@ void render_map(const Map *map) { } } -void render_player(const Player *p) { - Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE, - (float)TILE_SIZE}; - DrawRectangleRec(rect, BLUE); +void render_player(const Player *p, Texture2D *ptile) { + //Rectangle rect = {(float)(p->position.x * TILE_SIZE), (float)(p->position.y * TILE_SIZE), (float)TILE_SIZE, + // (float)TILE_SIZE}; + //DrawRectangleRec(rect, BLUE); + + DrawTexture(*ptile, (float)(p->x * TILE_SIZE), (float)(p->y * TILE_SIZE), (Color){255, 255, 255, 255}); } void render_enemies(const Enemy *enemies, int count) { diff --git a/src/render.h b/src/render.h index 016291f..4976636 100644 --- a/src/render.h +++ b/src/render.h @@ -77,7 +77,7 @@ void render_map(const Map *map); // Render the player -void render_player(const Player *p); +void render_player(const Player *p, Texture2D *ptile); // Render all enemies void render_enemies(const Enemy *enemies, int count);