Skip to content

Commit

Permalink
Make minimap not look so tiny when starting tiny maps, like campaign.…
Browse files Browse the repository at this point in the history
… Clean out some dead code.

Cherry-picked from 8934dfd.
  • Loading branch information
perim authored and cybersphinx committed May 5, 2011
1 parent ca4cbdb commit 5731d0e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 31 deletions.
16 changes: 5 additions & 11 deletions src/init.c
Expand Up @@ -920,11 +920,6 @@ BOOL stageTwoInitialise(void)
return false;
}

if(!InitRadar()) // After resLoad cause it needs the game palette initialised.
{
return false;
}

if(!initMiscImds()) /* Set up the explosions */
{
iV_ShutDown();
Expand Down Expand Up @@ -1034,6 +1029,11 @@ BOOL stageThreeInitialise(void)

loopMissionState = LMS_NORMAL;

if(!InitRadar()) // After resLoad cause it needs the game palette initialised.
{
return false;
}

// reset the clock to normal speed
gameTimeResetMod();

Expand Down Expand Up @@ -1130,10 +1130,6 @@ BOOL stageThreeInitialise(void)
return true;
}





/*****************************************************************************/
/* Shutdown before any data is released */

Expand Down Expand Up @@ -1242,8 +1238,6 @@ static void initMiscVars(void)
selectedPlayer = 0;
godMode = false;

// ffs am

radarOnScreen = true;
enableConsoleDisplay(true);

Expand Down
3 changes: 1 addition & 2 deletions src/keybind.c
Expand Up @@ -2632,8 +2632,7 @@ void kf_ToggleRadarAllyEnemy(void)
{
CONPRINTF(ConsoleString, (ConsoleString, _("Radar showing player colors")));
}

resetRadarRedraw();
resizeRadar();
}

void kf_ToggleRadarTerrain(void)
Expand Down
11 changes: 2 additions & 9 deletions src/mission.c
Expand Up @@ -844,7 +844,7 @@ static void saveMissionData(void)
//clear all the effects from the map
initEffectsSystem();

resetRadarRedraw();
resizeRadar();
}

/*
Expand Down Expand Up @@ -927,19 +927,12 @@ void restoreMissionData(void)
//reset the current structure lists
setCurrentStructQuantity(false);

//initPlayerPower();

initFactoryNumFlag();
resetFactoryNumFlag();

//terrain types? - hopefully not! otherwise we have to load in the terrain texture pages.

//reset the game time
//gameTimeReset(mission.startTime);

offWorldKeepLists = false;

resetRadarRedraw();
resizeRadar();

// reset the environ map back to the homebase settings
environReset();
Expand Down
12 changes: 4 additions & 8 deletions src/radar.c
Expand Up @@ -120,20 +120,16 @@ void radarInitVars(void)
radarSize(RadarZoom);
}

//called for when a new mission is started
void resetRadarRedraw()
{
// make sure Radar buffer is correct
resizeRadar();
}

BOOL InitRadar(void)
{
// Ally/enemy/me colors
colRadarAlly = WZCOL_YELLOW;
colRadarEnemy = WZCOL_RED;
colRadarMe = WZCOL_WHITE;

if (mapWidth < 150) // too small!
{
RadarZoom = DEFAULT_RADARZOOM * 2;
}
pie_InitRadar();

return true;
Expand Down
1 change: 0 additions & 1 deletion src/radar.h
Expand Up @@ -35,7 +35,6 @@ void radarColour(UDWORD tileNumber, uint8_t r, uint8_t g, uint8_t b); ///< Set r
#define DEFAULT_RADARZOOM (16) // 1.00x
#define RADARZOOM_STEP (16 * 1/4) // 0.25x

extern void resetRadarRedraw(void);
extern BOOL InitRadar(void); ///< Initialize minimap subsystem.
extern BOOL ShutdownRadar(void); ///< Shutdown minimap subsystem.
extern BOOL resizeRadar(void); ///< Recalculate minimap size. For initialization code only.
Expand Down

0 comments on commit 5731d0e

Please sign in to comment.