[Updated] Codebase to deal with wasm-style keyboard and mouse inputs

This commit is contained in:
Ninjaws
2024-12-10 14:41:59 +01:00
parent cbf6e658ea
commit 97d93ab113
33 changed files with 344 additions and 124 deletions
+57 -7
View File
@@ -1,16 +1,66 @@
#include "raylib.h"
#include "Screen.h"
#include "TitleScreen.h"
#include "StateService.h"
#include <iostream>
// #include "screens/Screen.h"
// #include "screens/TitleScreen.h"
#include "services/StateService.h"
// #include <iostream>
// #if defined(PLATFORM_WEB)
// #include <emscripten/emscripten.h>
// #endif
int main(void)
// void step();
// static void gameloop();
int main()
{
StateService& stateService = StateService::getInstance();
stateService.setScreenSize({640,544});
stateService.startGame();
// std::cout << "StateService instance: " << service << std::endl;
// InitWindow(640, 544, "Jelly Rescue");
// // SetTargetFPS(60);
// // setScreen(EScreen::TITLE);
// #if defined(PLATFORM_WEB)
// emscripten_set_main_loop(step, 0, 1);
// #else
// while (!WindowShouldClose())
// {
// step();
// }
// #endif
// CloseWindow();
return 0;
}
}
// static void gameloop()
// {
// // InitAudioDevice();
// InitWindow(640, 544, "Jelly Rescue");
// // SetTargetFPS(60);
// // setScreen(EScreen::TITLE);
// #if defined(PLATFORM_WEB)
// emscripten_set_main_loop(step, 0, 1);
// #else
// while (!WindowShouldClose())
// {
// step();
// }
// #endif
// CloseWindow();
// // CloseAudioDevice();
// }
// void step()
// {
// ClearBackground(BLACK);
// }