Render test

This commit is contained in:
2025-06-10 17:09:33 -05:00
parent a2fd58fda7
commit 1b6db0c643
47 changed files with 219 additions and 370 deletions

View File

@@ -1,47 +0,0 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "input.h"
#include "util/random.h"
#include "display/render.h"
#include "rpg/entity/entity.h"
int32_t main(const int32_t argc, const char **argv) {
inputInit();
randomInit();
renderInit();
entity_t *ent;
ent = &ENTITIES[0];
entityInit(ent, ENTITY_TYPE_PLAYER);
while(1) {
inputUpdate();
ent = ENTITIES;
do {
if(ent->type == ENTITY_TYPE_NULL) {
ent++;
continue;
}
entityUpdate(ent++);
} while(ent < (ENTITIES + ENTITY_COUNT));
if(inputIsDown(INPUT_DOWN)) {
printf("Input down pressed\n");
} else {
printf("Input down not pressed\n");
}
// renderUpdate();
usleep(16 * 1000); // Sleep for 16 milliseconds (60 FPS)
}
return EXIT_SUCCESS;
}