#include "mempool.h" #include "scene_impl.h" #include #include // Maintain own queue to handle key presses struct sc_queue_32 key_buffer; int main(void) { sc_queue_init(&key_buffer); InitWindow(1280, 640, "raylib"); SetTargetFPS(60); init_memory_pools(); LevelScene_t scene; init_level_scene(&scene); Entity_t *p_ent = add_entity(&scene.scene.ent_manager, PLAYER_ENT_TAG); CBBox_t *p_bbox = add_component(&scene.scene.ent_manager, p_ent, CBBOX_COMP_T); p_bbox->size.x = 30; p_bbox->size.y = 45; add_component(&scene.scene.ent_manager, p_ent, CTRANSFORM_COMP_T); add_component(&scene.scene.ent_manager, p_ent, CTILECOORD_COMP_T); update_entity_manager(&scene.scene.ent_manager); //for (size_t step = 0; step < 6000; step++) while(true) { // This entire key processing relies on the assumption that a pressed key will // appear in the polling of raylib unsigned int sz = sc_queue_size(&key_buffer); // Process any existing pressed key for (size_t i=0; i