From 76cb99342ac7b5c3c019a593f1bef18307a442e7 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 29 Jan 2019 18:55:20 +0000 Subject: [PATCH] Finished MiniMapLoop --- src/MiniMap.cpp | 52 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/MiniMap.cpp b/src/MiniMap.cpp index d109feb3..8bae1934 100644 --- a/src/MiniMap.cpp +++ b/src/MiniMap.cpp @@ -101,7 +101,7 @@ int MiniMapLoop() PutFramePerSecound(); if (!Flip_SystemTask()) - return 0; + return 0; } RECT rcMiniMap = {0, 0, gMap.width, gMap.length}; @@ -145,30 +145,32 @@ int MiniMapLoop() if (!Flip_SystemTask()) return 0; } - /* - for ( f = 8; f >= -1; --f ) - { - GetTrg(); - if ( gKey & 0x8000 ) - { - v3 = Call_Escape(gscreen); - if ( !v3 ) - return 0; - if ( v3 == 2 ) - return 2; - } - PutBitmap4(&grcGame, 0, 0, &grcGame, 10); - rcView.left = 160 - f * gMap.width / 16; - rcView.right = f * gMap.width / 16 + 160; - rcView.top = 120 - f * gMap.length / 16; - rcView.bottom = f * gMap.length / 16 + 120; - PutMapName(1); - CortBox(&rcView, 0); - PutFramePerSecound(); - if ( !Flip_SystemTask(gscreen) ) - return 0; - } - */ + for (int f = 8; f >= -1; --f) + { + GetTrg(); + + if (gKey & KEY_ESCAPE) + { + int escRet = Call_Escape(); + if (escRet == 0) + return 0; + if (escRet == 2) + return 2; + } + + PutBitmap4(&grcGame, 0, 0, &grcGame, 10); + rcView.left = 160 - f * gMap.width / 16; + rcView.right = f * gMap.width / 16 + 160; + rcView.top = 120 - f * gMap.length / 16; + rcView.bottom = f * gMap.length / 16 + 120; + PutMapName(true); + CortBox(&rcView, 0); + + PutFramePerSecound(); + if (!Flip_SystemTask()) + return 0; + } + return 1; } \ No newline at end of file