g_game.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* Emacs style mode select -*- C++ -*-
  2. *-----------------------------------------------------------------------------
  3. *
  4. *
  5. * PrBoom: a Doom port merged with LxDoom and LSDLDoom
  6. * based on BOOM, a modified and improved DOOM engine
  7. * Copyright (C) 1999 by
  8. * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
  9. * Copyright (C) 1999-2000 by
  10. * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
  11. * Copyright 2005, 2006 by
  12. * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License
  16. * as published by the Free Software Foundation; either version 2
  17. * of the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  27. * 02111-1307, USA.
  28. *
  29. * DESCRIPTION: Main game control interface.
  30. *-----------------------------------------------------------------------------*/
  31. #ifndef __G_GAME__
  32. #define __G_GAME__
  33. #include "doomdef.h"
  34. #include "d_event.h"
  35. #include "d_ticcmd.h"
  36. //
  37. // GAME
  38. //
  39. // killough 5/2/98: number of bytes reserved for saving options
  40. #define GAME_OPTION_SIZE 64
  41. boolean G_Responder(event_t *ev);
  42. boolean G_CheckDemoStatus(void);
  43. void G_InitNew(skill_t skill, int episode, int map);
  44. void G_DeferedInitNew(skill_t skill, int episode, int map);
  45. void G_DeferedPlayDemo(const char *demo); // CPhipps - const
  46. void G_LoadGame(int slot, boolean is_command); // killough 5/15/98
  47. void G_ForcedLoadGame(void); // killough 5/15/98: forced loadgames
  48. void G_DoLoadGame(void);
  49. void G_SaveGame(int slot, const char *description); // Called by M_Responder.
  50. void G_ExitLevel(void);
  51. void G_SecretExitLevel(void);
  52. void G_WorldDone(void);
  53. void G_EndGame(void); /* cph - make m_menu.c call a G_* function for this */
  54. void G_Ticker(void);
  55. void G_ReloadDefaults(void); // killough 3/1/98: loads game defaults
  56. void G_DoNewGame(void);
  57. void G_DoReborn(int playernum);
  58. void G_DoPlayDemo(void);
  59. void G_DoCompleted(void);
  60. void G_ReadDemoTiccmd(ticcmd_t *cmd);
  61. void G_DoWorldDone(void);
  62. void G_Compatibility(void);
  63. const byte *G_ReadOptions(const byte *demo_p); /* killough 3/1/98 - cph: const byte* */
  64. void G_PlayerReborn(int player);
  65. void G_RestartLevel(void); // CPhipps - menu involked level restart
  66. void G_DoVictory(void);
  67. void G_BuildTiccmd (ticcmd_t* cmd); // CPhipps - move decl to header
  68. void G_MakeSpecialEvent(buttoncode_t bc, ...); /* cph - new event stuff */
  69. void G_UpdateSaveGameStrings();
  70. void G_LoadSettings();
  71. void G_SaveSettings();
  72. // killough 5/2/98: moved from m_misc.c:
  73. extern const int key_right;
  74. extern const int key_left;
  75. extern const int key_up;
  76. extern const int key_down;
  77. extern const int key_menu_right; // phares 3/7/98
  78. extern const int key_menu_left; // |
  79. extern const int key_menu_up; // V
  80. extern const int key_menu_down;
  81. extern const int key_menu_escape; // |
  82. extern const int key_menu_enter; // phares 3/7/98
  83. extern const int key_strafeleft;
  84. extern const int key_straferight;
  85. extern const int key_fire;
  86. extern const int key_use;
  87. extern const int key_strafe;
  88. extern const int key_speed;
  89. extern const int key_escape; // phares
  90. extern const int key_savegame; // |
  91. extern const int key_loadgame; // V
  92. extern const int key_reverse;
  93. extern const int key_zoomin;
  94. extern const int key_zoomout;
  95. extern const int key_chat;
  96. extern const int key_backspace;
  97. extern const int key_enter;
  98. extern const int key_help;
  99. extern const int key_soundvolume;
  100. extern const int key_hud;
  101. extern const int key_quicksave;
  102. extern const int key_endgame;
  103. extern const int key_messages;
  104. extern const int key_quickload;
  105. extern const int key_quit;
  106. extern const int key_gamma;
  107. extern const int key_spy;
  108. extern const int key_pause;
  109. extern const int key_setup;
  110. extern const int key_forward;
  111. extern const int key_leftturn;
  112. extern const int key_rightturn;
  113. extern const int key_backward;
  114. extern const int key_map_right;
  115. extern const int key_map_left;
  116. extern const int key_map_up;
  117. extern const int key_map_down;
  118. extern const int key_map_zoomin;
  119. extern const int key_map_zoomout;
  120. extern const int key_map;
  121. extern const int key_map_gobig;
  122. extern const int key_map_follow;
  123. extern const int key_map_mark; // ^
  124. extern const int key_map_clear; // |
  125. extern const int key_map_grid; // phares
  126. // killough 5/2/98: moved from d_deh.c:
  127. // Par times (new item with BOOM) - from g_game.c
  128. extern const int pars[4][10]; // hardcoded array size
  129. extern const int cpars[32]; // hardcoded array size
  130. // CPhipps - Make savedesciption visible in wider scope
  131. #define SAVEDESCLEN 8
  132. #define NUMKEYS 16
  133. #endif