New debug key combo: CTRL+E will toggle display of gateway links. You must
delete your keymap file for this to work. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4131 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
6361fc6cb2
commit
15511049ca
|
@ -148,6 +148,7 @@ static SDWORD rangeCenterX,rangeCenterY,rangeRadius;
|
|||
static BOOL bDrawBlips=TRUE;
|
||||
static BOOL bDrawProximitys=TRUE;
|
||||
BOOL godMode;
|
||||
BOOL showGateways = FALSE;
|
||||
|
||||
static char skyboxPageName[PATH_MAX] = "page-25";
|
||||
|
||||
|
@ -3700,9 +3701,6 @@ static iIMDShape *flattenImd(iIMDShape *imd, UDWORD structX, UDWORD structY, UDW
|
|||
return imd;
|
||||
}
|
||||
|
||||
//#define SHOW_ZONES
|
||||
//#define SHOW_GATEWAYS
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
/* New improved (and much faster) tile drawer */
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
@ -3714,9 +3712,6 @@ static void drawTerrainTile(UDWORD i, UDWORD j, BOOL onWaterEdge)
|
|||
BOOL bOutlined = FALSE;
|
||||
UDWORD tileNumber = 0;
|
||||
TERRAIN_VERTEX vertices[3];
|
||||
#if defined(SHOW_ZONES) || defined(SHOW_GATEWAYS)
|
||||
SDWORD zone = 0;
|
||||
#endif
|
||||
PIELIGHT colour[2][2];
|
||||
|
||||
colour[0][0] = WZCOL_BLACK;
|
||||
|
@ -3749,18 +3744,6 @@ static void drawTerrainTile(UDWORD i, UDWORD j, BOOL onWaterEdge)
|
|||
{
|
||||
colour[1][1] = mapTile(actualX + 1, actualY + 1)->colour;
|
||||
}
|
||||
#if defined(SHOW_ZONES)
|
||||
if (!fpathBlockingTile(actualX, actualY) ||
|
||||
terrainType(psTile) == TER_WATER)
|
||||
{
|
||||
zone = gwGetZone(actualX, actualY);
|
||||
}
|
||||
#elif defined(SHOW_GATEWAYS)
|
||||
if (psTile->tileInfoBits & BITS_GATEWAY)
|
||||
{
|
||||
zone = gwGetZone(actualX, actualY);
|
||||
}
|
||||
#endif
|
||||
if ( terrainType(psTile) != TER_WATER || onWaterEdge )
|
||||
{
|
||||
// what tile texture number is it?
|
||||
|
@ -3773,17 +3756,14 @@ static void drawTerrainTile(UDWORD i, UDWORD j, BOOL onWaterEdge)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(SHOW_ZONES)
|
||||
if (zone != 0)
|
||||
/* Show gateways */
|
||||
if (psTile && psTile->tileInfoBits & BITS_GATEWAY && showGateways)
|
||||
{
|
||||
tileNumber = zone;
|
||||
colour[0][0].byte.g = 255;
|
||||
colour[1][0].byte.g = 255;
|
||||
colour[0][1].byte.g = 255;
|
||||
colour[1][1].byte.g = 255;
|
||||
}
|
||||
#elif defined(SHOW_GATEWAYS)
|
||||
if (psTile && psTile->tileInfoBits & BITS_GATEWAY)
|
||||
{
|
||||
tileNumber = 55;//zone;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Is the tile highlighted? Perhaps because there's a building foundation on it */
|
||||
if (psTile && !onWaterEdge && TILE_HIGHLIGHT(psTile))
|
||||
|
|
|
@ -113,7 +113,7 @@ extern SDWORD getCentreZ( void );
|
|||
extern SDWORD mouseTileX, mouseTileY;
|
||||
|
||||
extern BOOL bRender3DOnly;
|
||||
|
||||
extern BOOL showGateways;
|
||||
extern Vector2i visibleTiles;
|
||||
|
||||
/*returns the graphic ID for a droid rank*/
|
||||
|
|
|
@ -137,6 +137,13 @@ void kf_ToggleMissionTimer( void )
|
|||
{
|
||||
setMissionCheatTime(!mission.cheatTime);
|
||||
}
|
||||
|
||||
void kf_ToggleShowGateways(void)
|
||||
{
|
||||
addConsoleMessage("Gateways toggled.", DEFAULT_JUSTIFY);
|
||||
showGateways = !showGateways;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
void kf_ToggleRadarJump( void )
|
||||
{
|
||||
|
|
|
@ -205,6 +205,8 @@ extern void kf_SelectCommander_8( void );
|
|||
extern void kf_SelectCommander_9( void );
|
||||
void kf_ToggleReopenBuildMenu( void );
|
||||
|
||||
extern void kf_ToggleShowGateways(void);
|
||||
|
||||
// dirty but necessary
|
||||
extern char sTextToSend[MAX_CONSOLE_STRING_LENGTH];
|
||||
extern void kf_FaceNorth(void);
|
||||
|
|
|
@ -248,6 +248,7 @@ _keymapsave keyMapSaveTable[] =
|
|||
kf_LowerGamma,
|
||||
kf_ToggleWatchWindow,
|
||||
kf_ToggleDrivingMode,
|
||||
kf_ToggleShowGateways,
|
||||
NULL // last function!
|
||||
};
|
||||
|
||||
|
@ -430,7 +431,8 @@ void keyInitMappings( BOOL bForceDefaults )
|
|||
keyAddMapping(KEYMAP_ASSIGNABLE,KEY_IGNORE,(KEY_CODE)KEY_MAXSCAN,KEYMAP_PRESSED,kf_ToggleReopenBuildMenu,_("Toggle reopening the build menu"));
|
||||
|
||||
// NOTE THIS!!!!!!!
|
||||
// available: ctrl+e, ctrl+m, ctrl+k, ctrl+l
|
||||
// available: ctrl+m, ctrl+k, ctrl+l
|
||||
keyAddMapping(KEYMAP__DEBUG,KEY_LCTRL,KEY_E,KEYMAP_PRESSED,kf_ToggleShowGateways, "Toggle display of gateways");
|
||||
keyAddMapping(KEYMAP___HIDE,KEY_LSHIFT,KEY_BACKSPACE,KEYMAP_PRESSED,kf_ToggleDebugMappings, "TOGGLE Debug Mappings");
|
||||
keyAddMapping(KEYMAP__DEBUG,KEY_IGNORE,KEY_M,KEYMAP_PRESSED,kf_ShowMappings, "Show all keyboard mappings - use pause!");
|
||||
keyAddMapping(KEYMAP__DEBUG,KEY_IGNORE,KEY_V,KEYMAP_PRESSED,kf_ToggleVisibility, "Toggle visibility");
|
||||
|
|
Loading…
Reference in New Issue