From a2e2207a6784d008480fdb9b16fe4d7009276d28 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Tue, 12 Jan 2016 14:43:42 -0500 Subject: [PATCH] Reversed a ruinous change. Dur... event times can be negative, and yet here I am changing it to unsigned. --- src/engine.h | 2 +- src/event.h | 2 +- src/missions.cpp | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/engine.h b/src/engine.h index 8339ecd..bf5ca3d 100644 --- a/src/engine.h +++ b/src/engine.h @@ -68,7 +68,7 @@ typedef struct Engine_ { // Times the mission normally Uint32 counter2; - Uint32 timeTaken; // In seconds + int timeTaken; // In seconds // For missions with a time limit int timeMission; diff --git a/src/event.h b/src/event.h index 8fea55c..01b44f5 100644 --- a/src/event.h +++ b/src/event.h @@ -22,7 +22,7 @@ along with this program. If not, see . typedef struct Event_ { - Uint32 time; + int time; int face; char message[255]; int entity; diff --git a/src/missions.cpp b/src/missions.cpp index 82a553e..e0de5f3 100644 --- a/src/missions.cpp +++ b/src/missions.cpp @@ -911,10 +911,9 @@ void missionFinishedScreen() game.timeTaken += engine.timeTaken; - snprintf(temp, sizeof temp, "Mission Time: %2lu:%02lu:%02lu", - (unsigned long)(engine.timeTaken / 3600), - (unsigned long)((engine.timeTaken / 60) % 60), - (unsigned long)(engine.timeTaken % 60)); + snprintf(temp, sizeof temp, "Mission Time: %2d:%02d:%02d", + engine.timeTaken / 3600, (engine.timeTaken / 60) % 60, + engine.timeTaken % 60); screen_renderString(temp, -1, 500, FONT_WHITE);