Skip to content

Commit

Permalink
libcommon: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jul 13, 2012
1 parent 37f00cd commit 4f23b6d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
15 changes: 13 additions & 2 deletions doomsday/plugins/common/include/g_common.h
Expand Up @@ -67,12 +67,23 @@ void G_SetGameAction(gameaction_t action);
boolean G_QuitInProgress(void);

/**
* @param map Logical map number (i.e., not a warp/translated number).
* @param mapEntryPoint Logical map entry point number.
* @param map Logical map number (i.e., not a warp/translated number).
* @param mapEntryPoint Logical map entry point number.
*/
void G_InitNew(skillmode_t skill, uint episode, uint map, uint mapEntryPoint);
void G_DeferedInitNew(skillmode_t skill, uint episode, uint map, uint mapEntryPoint);

/**
* Leave the current map and start intermission routine.
* (if __JHEXEN__ the intermission will only be displayed when exiting a
* hub and in DeathMatch games)
*
* @param newMap Logical map number we are entering (i.e., not a warp/translated number).
* @param mapEntryPoint Logical map entry point on the new map.
* @param secretExit @c true if the exit taken was marked as 'secret'.
*/
void G_LeaveMap(uint newMap, uint mapEntryPoint, boolean secretExit);

/// @return Generated name. Must be released with Str_Delete()
AutoStr* G_GenerateSaveGameName(void);

Expand Down
15 changes: 3 additions & 12 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -160,7 +160,7 @@ void G_DoLoadGame(void);
void G_DoPlayDemo(void);
void G_DoMapCompleted(void);
void G_DoVictory(void);
void G_DoWorldDone(void);
void G_DoLeaveMap(void);
void G_DoSaveGame(void);
void G_DoScreenShot(void);
void G_DoQuitGame(void);
Expand Down Expand Up @@ -1625,7 +1625,7 @@ static void runGameAction(void)
#endif

case GA_LEAVEMAP:
G_DoWorldDone();
G_DoLeaveMap();
break;

#if !__JHEXEN__
Expand Down Expand Up @@ -2315,15 +2315,6 @@ void G_InitForNewGame(skillmode_t skill)
DD_Executef(true, "texreset raw");
}

/**
* Leave the current map and start intermission routine.
* (if __JHEXEN__ the intermission will only be displayed when exiting a
* hub and in DeathMatch games)
*
* @param newMap ID of the map we are entering.
* @param _entryPoint Entry point on the new map.
* @param secretExit
*/
void G_LeaveMap(uint newMap, uint _entryPoint, boolean _secretExit)
{
if(IS_CLIENT || (cyclingMaps && mapCycleNoExit)) return;
Expand Down Expand Up @@ -2598,7 +2589,7 @@ static int G_SaveStateWorker(void* parameters)
return result;
}

void G_DoWorldDone(void)
void G_DoLeaveMap(void)
{
#if __JHEXEN__
playerbackup_t playerBackup[MAXPLAYERS];
Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/jdoom/include/g_game.h
Expand Up @@ -110,7 +110,6 @@ int G_DebriefingEnabled(uint episode, uint map, ddfinale_t* fin);

void G_DoReborn(int playernum);
void G_PlayerReborn(int player);
void G_LeaveMap(uint newMap, uint entryPoint, boolean secretExit);

uint G_GetNextMap(uint episode, uint map, boolean secretExit);

Expand Down
2 changes: 0 additions & 2 deletions doomsday/plugins/jdoom64/include/g_game.h
Expand Up @@ -113,8 +113,6 @@ int G_DebriefingEnabled(uint episode, uint map, ddfinale_t* fin);
void G_DoReborn(int playernum);
void G_PlayerReborn(int player);

void G_LeaveMap(uint newMap, uint entryPoint, boolean secretExit);

uint G_GetNextMap(uint episode, uint map, boolean secretExit);

/**
Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/jheretic/include/g_game.h
Expand Up @@ -108,7 +108,6 @@ int G_DebriefingEnabled(uint episode, uint map, ddfinale_t* fin);

void G_DoReborn(int playernum);
void G_PlayerReborn(int player);
void G_LeaveMap(uint newMap, uint entryPoint, boolean secretExit);

uint G_GetNextMap(uint episode, uint map, boolean secretExit);

Expand Down
1 change: 0 additions & 1 deletion doomsday/plugins/jhexen/include/g_game.h
Expand Up @@ -125,7 +125,6 @@ void G_DoPlayDemo(void);

void G_PlayDemo(char* name);
void G_TimeDemo(char* name);
void G_LeaveMap(uint newMap, uint entryPoint, boolean secretExit);
void G_StartNewInit(void);
void G_WorldDone(void);
void G_ScreenShot(void);
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jhexen/src/p_spec.c
Expand Up @@ -35,6 +35,7 @@
#include "jhexen.h"

#include "dmu_lib.h"
#include "g_common.h"
#include "p_inventory.h"
#include "p_player.h"
#include "p_map.h"
Expand Down

0 comments on commit 4f23b6d

Please sign in to comment.