Switched to using tile coordinates, losing my angled movement unfortunately.

This commit is contained in:
2025-08-18 21:40:01 -05:00
parent bcb1616201
commit d79e12ffaa
18 changed files with 275 additions and 647 deletions

View File

@@ -44,16 +44,18 @@ void renderOverworldDraw(void) {
meshDraw(&chunk->meshBase, -1, -1);
}
for(uint8_t i = 0; i < ENTITY_COUNT_MAX; i++) {
entity_t *entity = &ENTITIES[i];
if(entity->type == ENTITY_TYPE_NULL) continue;
float_t x = (entity->x * TILE_WIDTH_HEIGHT) + entity->subX;
float_t y = (entity->y * TILE_WIDTH_HEIGHT) + entity->subY;
// Draw the entity
spriteBatchPush(
NULL,
floorf(entity->x), floorf(entity->y),
floorf(entity->x + TILE_WIDTH_HEIGHT), floorf(entity->y + TILE_WIDTH_HEIGHT),
x, y,
x + TILE_WIDTH_HEIGHT, y + TILE_WIDTH_HEIGHT,
0xFF, 0x00, 0xFF, 0XFF,
0.0f, 0.0f, 1.0f, 1.0f
);