• R/O
  • SSH
  • HTTPS

deeangband: Commit


Commit MetaInfo

Revision9209 (tree)
Time2014-02-20 20:44:38
Authordeskull

Log Message

Defined PlayLoop() function to GameWorld class.

Change Summary

Incremental Difference

--- source/branch/new_source/Deeangband/Deeangband/Deeangband.h (revision 9208)
+++ source/branch/new_source/Deeangband/Deeangband/Deeangband.h (revision 9209)
@@ -13,4 +13,13 @@
1313 {
1414 GAME_COMMAND_REDRAW,
1515 GAME_COMMAND_EXIT
16-} GameCommand;
\ No newline at end of file
16+} GameCommand;
17+
18+/*!
19+ * プレイ終了コード
20+ */
21+typedef enum PlayExitCode
22+{
23+ PLAY_EXIT_DEAD,
24+ PLAY_EXIT_QUIT
25+} PlayExitCode;
--- source/branch/new_source/Deeangband/Deeangband/GameWorld.h (revision 9208)
+++ source/branch/new_source/Deeangband/Deeangband/GameWorld.h (revision 9209)
@@ -37,6 +37,7 @@
3737 class GameWorld
3838 {
3939 private:
40+ GameSurface *gameSurface;
4041
4142 //静的データリスト
4243 map<ID, Tag, Authority> authorityList; /*!<全権能リスト*/
@@ -63,9 +64,10 @@
6364 public:
6465
6566 GameWorld(GameSurface *gSurface);
66-
6767 ~GameWorld();
6868
69+ PlayExitCode PlayLoop(void);
70+
6971 /*
7072 * @brief 受け取ったゲームコマンドを処理する
7173 */
--- source/branch/new_source/Deeangband/Deeangband/GameWorld.cpp (revision 9208)
+++ source/branch/new_source/Deeangband/Deeangband/GameWorld.cpp (revision 9209)
@@ -12,6 +12,7 @@
1212
1313 GameWorld::GameWorld(GameSurface *gSurface)
1414 {
15+ gameSurface = gSurface;
1516 }
1617
1718 GameWorld::~GameWorld(void)
@@ -18,6 +19,11 @@
1819 {
1920 }
2021
22+PlayExitCode GameWorld::PlayLoop(void)
23+{
24+ return PLAY_EXIT_QUIT;
25+}
26+
2127 void GameWorld::DoGameCommand(GameCommand command)
2228 {
2329 switch(command)
--- source/branch/new_source/Deeangband/Deeangband/GameSurface.h (revision 9208)
+++ source/branch/new_source/Deeangband/Deeangband/GameSurface.h (revision 9209)
@@ -25,9 +25,19 @@
2525 public:
2626 GameSurface();
2727 virtual ~GameSurface();
28+
29+ /*!
30+ * @brief ゲームコマンドを受け取る
31+ * @return GameCommandで定義されたコマンド内容
32+ */
2833 virtual GameCommand GetCommand()
2934 {
3035 return GAME_COMMAND_REDRAW;
3136 }
37+
38+ virtual void Redraw()
39+ {
40+ return;
41+ }
3242 };
3343
Show on old repository browser