Render test
This commit is contained in:
47
src/main.c
47
src/main.c
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user