refactoring app name to spacetris and new icon
This commit is contained in:
@ -38,7 +38,7 @@
|
||||
ApplicationManager::ApplicationManager() = default;
|
||||
|
||||
static void traceFile(const char* msg) {
|
||||
std::ofstream f("tetris_trace.log", std::ios::app);
|
||||
std::ofstream f("spacetris_trace.log", std::ios::app);
|
||||
if (f) f << msg << "\n";
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ void InputManager::processEvents() {
|
||||
while (SDL_PollEvent(&event)) {
|
||||
// Trace every polled event type for debugging abrupt termination
|
||||
{
|
||||
FILE* f = fopen("tetris_trace.log", "a"); if (f) { fprintf(f, "InputManager: polled event type=%d\n", (int)event.type); fclose(f); }
|
||||
FILE* f = fopen("spacetris_trace.log", "a"); if (f) { fprintf(f, "InputManager: polled event type=%d\n", (int)event.type); fclose(f); }
|
||||
}
|
||||
switch (event.type) {
|
||||
case SDL_EVENT_QUIT:
|
||||
@ -349,7 +349,7 @@ void InputManager::reset() {
|
||||
}
|
||||
|
||||
void InputManager::handleQuitEvent() {
|
||||
FILE* f = fopen("tetris_trace.log", "a");
|
||||
FILE* f = fopen("spacetris_trace.log", "a");
|
||||
if (f) {
|
||||
fprintf(f, "InputManager::handleQuitEvent invoked\n");
|
||||
fclose(f);
|
||||
|
||||
@ -86,7 +86,7 @@ bool StateManager::setState(AppState newState) {
|
||||
getStateName(m_currentState), getStateName(newState));
|
||||
// Persistent trace for debugging abrupt exits
|
||||
{
|
||||
FILE* f = fopen("tetris_trace.log", "a"); if (f) { fprintf(f, "setState start %s -> %s\n", getStateName(m_currentState), getStateName(newState)); fclose(f); }
|
||||
FILE* f = fopen("spacetris_trace.log", "a"); if (f) { fprintf(f, "setState start %s -> %s\n", getStateName(m_currentState), getStateName(newState)); fclose(f); }
|
||||
}
|
||||
|
||||
// Execute exit hooks for current state
|
||||
@ -101,7 +101,7 @@ bool StateManager::setState(AppState newState) {
|
||||
|
||||
// Trace completion
|
||||
{
|
||||
FILE* f = fopen("tetris_trace.log", "a"); if (f) { fprintf(f, "setState end %s\n", getStateName(m_currentState)); fclose(f); }
|
||||
FILE* f = fopen("spacetris_trace.log", "a"); if (f) { fprintf(f, "setState end %s\n", getStateName(m_currentState)); fclose(f); }
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -190,7 +190,7 @@ void StateManager::executeEnterHooks(AppState state) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Executing enter hook %d for state %s", idx, getStateName(state));
|
||||
// Also write to trace file for persistent record
|
||||
{
|
||||
FILE* f = fopen("tetris_trace.log", "a"); if (f) { fprintf(f, "executeEnterHook %d %s\n", idx, getStateName(state)); fclose(f); }
|
||||
FILE* f = fopen("spacetris_trace.log", "a"); if (f) { fprintf(f, "executeEnterHook %d %s\n", idx, getStateName(state)); fclose(f); }
|
||||
}
|
||||
try {
|
||||
hook();
|
||||
@ -212,7 +212,7 @@ void StateManager::executeExitHooks(AppState state) {
|
||||
for (auto& hook : it->second) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Executing exit hook %d for state %s", idx, getStateName(state));
|
||||
{
|
||||
FILE* f = fopen("tetris_trace.log", "a"); if (f) { fprintf(f, "executeExitHook %d %s\n", idx, getStateName(state)); fclose(f); }
|
||||
FILE* f = fopen("spacetris_trace.log", "a"); if (f) { fprintf(f, "executeExitHook %d %s\n", idx, getStateName(state)); fclose(f); }
|
||||
}
|
||||
try {
|
||||
hook();
|
||||
|
||||
Reference in New Issue
Block a user