Skip to content

Commit

Permalink
Console|libcommon: Read-only variable "map-episode" is now a string
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 11, 2014
1 parent 0bef1b1 commit c701f95
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion doomsday/doc/libcommon/variable/map-episode.ame
@@ -1,3 +1,3 @@
@summary{
Current episode.
Current episode id.
}
3 changes: 0 additions & 3 deletions doomsday/doc/libdoom/variable/map-mission.ame

This file was deleted.

16 changes: 8 additions & 8 deletions doomsday/plugins/common/src/gamesession.cpp
Expand Up @@ -483,8 +483,8 @@ DENG2_PIMPL(GameSession), public SavedSession::IMapStateReaderFactory
::gameMapUri = mapUri;

// Update game status cvars:
Con_SetInteger2("map-episode", episodeId.toInt() - 1, SVF_WRITE_OVERRIDE);
Con_SetUri2 ("map-id", reinterpret_cast<uri_s *>(&::gameMapUri), SVF_WRITE_OVERRIDE);
Con_SetString2("map-episode", episodeId.toUtf8().constData(), SVF_WRITE_OVERRIDE);
Con_SetUri2 ("map-id", reinterpret_cast<uri_s *>(&::gameMapUri), SVF_WRITE_OVERRIDE);
}

/**
Expand Down Expand Up @@ -1280,8 +1280,8 @@ String GameSession::savedUserDescription(String const &saveName)

namespace {
int gsvRuleSkill;
int gsvEpisode;
uri_s *gsvMap;
char *gsvEpisode = (char *)"";
//uri_s *gsvMap;
#if __JHEXEN__
int gsvHub;
#endif
Expand All @@ -1291,12 +1291,12 @@ void GameSession::consoleRegister() //static
{
#define READONLYCVAR (CVF_READ_ONLY | CVF_NO_MAX | CVF_NO_MIN | CVF_NO_ARCHIVE)

C_VAR_INT("game-skill", &gsvRuleSkill, READONLYCVAR, 0, 0);
C_VAR_INT("map-episode", &gsvEpisode, READONLYCVAR, 0, 0);
C_VAR_INT ("game-skill", &gsvRuleSkill, READONLYCVAR, 0, 0);
C_VAR_CHARPTR("map-episode", &gsvEpisode, READONLYCVAR, 0, 0);
#if __JHEXEN__
C_VAR_INT("map-hub", &gsvHub, READONLYCVAR, 0, 0);
//C_VAR_INT ("map-hub", &gsvHub, READONLYCVAR, 0, 0);
#endif
C_VAR_URIPTR("map-id", &gsvMap, READONLYCVAR, 0, 0);
C_VAR_URIPTR ("map-id", &gsvMap, READONLYCVAR, 0, 0);

#undef READONLYCVAR
}
Expand Down
5 changes: 1 addition & 4 deletions doomsday/plugins/doom/data/conhelp.txt
Expand Up @@ -410,7 +410,7 @@ desc = 1=Show door colors in automap.
desc = Door glow thickness in the automap (with map-door-colors).

[map-episode]
desc = Current episode.
desc = Current episode id.

[map-huddisplay]
desc = 0=No HUD when in the automap 1=Current HUD display shown when in the automap 2=Always show Status Bar when in the automap
Expand Down Expand Up @@ -811,9 +811,6 @@ desc = 1=Show keys in HUD.
[hud-status-weaponslots-ownedfix]
desc = 1=Fix original DOOM behavior when drawing the statusbar owned weapon display.

[map-mission]
desc = Current mission.

[menu-quitsound]
desc = 1=Play a sound when quitting the game.

Expand Down
5 changes: 1 addition & 4 deletions doomsday/plugins/doom64/data/conhelp.txt
Expand Up @@ -345,10 +345,7 @@ desc = Current map id.
desc = Current map name.

[map-episode]
desc = Current episode.

[map-mission]
desc = Current mission.
desc = Current episode id.

[game-music]
desc = Currently playing music (id).
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/heretic/data/conhelp.txt
Expand Up @@ -413,7 +413,7 @@ desc = 1=Show door colors in automap.
desc = Door glow thickness in the automap (with map-door-colors).

[map-episode]
desc = Current episode.
desc = Current episode id.

[map-huddisplay]
desc = 0=No HUD when in the automap 1=Current HUD display shown when in the automap 2=Always show Status Bar when in the automap
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/hexen/data/conhelp.txt
Expand Up @@ -426,7 +426,7 @@ desc = 1=Show door colors in automap.
desc = Door glow thickness in the automap (with map-door-colors).

[map-episode]
desc = Current episode.
desc = Current episode id.

[map-huddisplay]
desc = 0=No HUD when in the automap 1=Current HUD display shown when in the automap 2=Always show Status Bar when in the automap
Expand Down

0 comments on commit c701f95

Please sign in to comment.