• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。


Commit MetaInfo

Revision163 (tree)
Time2017-01-22 22:33:32
Authorxops-mikan

Log Message

コンソールのコマンドを2個追加(window・exit)、コンパイラの警告対策、OpenGLでのリセット処理に対応。

Change Summary

Incremental Difference

--- trunk/d3dgraphics-directx.cpp (revision 162)
+++ trunk/d3dgraphics-directx.cpp (revision 163)
@@ -69,6 +69,21 @@
6969 DestroyD3D();
7070 }
7171
72+//! @brief フルスクリーンフラグ設定
73+//! @param fullscreen フルスクリーンフラグ
74+//! @attention 同フラグは、初期化時の InitD3D() 関数でも設定できます。
75+void D3DGraphics::SetFullScreenFlag(bool fullscreen)
76+{
77+ fullscreenflag = fullscreen;
78+}
79+
80+//! @brief フルスクリーンフラグ取得
81+//! @return フルスクリーンフラグ
82+bool D3DGraphics::GetFullScreenFlag()
83+{
84+ return fullscreenflag;
85+}
86+
7287 //! @brief 初期化@n
7388 //! (DirectX 9)
7489 //! @param WindowCtrl WindowControlクラスのポインタ
@@ -342,10 +357,16 @@
342357 //! @brief デバイスのリソースを解放
343358 void D3DGraphics::CleanupD3Dresource()
344359 {
345- if( TextureFont != -1 ){ CleanupTexture(TextureFont); }
360+ if( TextureFont != -1 ){
361+ CleanupTexture(TextureFont);
362+ TextureFont = -1;
363+ }
346364
347365 #ifdef ENABLE_DEBUGCONSOLE
348- if( TextureDebugFont != -1 ){ CleanupTexture(TextureDebugFont); }
366+ if( TextureDebugFont != -1 ){
367+ CleanupTexture(TextureDebugFont);
368+ TextureDebugFont = -1;
369+ }
349370 #endif
350371
351372 if( pxmsfont != NULL ){
@@ -633,10 +654,10 @@
633654 bmpdata[0x03] = (unsigned char)((bufsize >> 8) & 0x000000FF);
634655 bmpdata[0x04] = (unsigned char)((bufsize >> 16) & 0x000000FF);
635656 bmpdata[0x05] = (unsigned char)((bufsize >> 24) & 0x000000FF);
636- bmpdata[0x0A] = headersize;
637- bmpdata[0x0E] = headersize - 14;
638- bmpdata[0x12] = width;
639- bmpdata[0x16] = height;
657+ bmpdata[0x0A] = (unsigned char)headersize;
658+ bmpdata[0x0E] = (unsigned char)(headersize - 14);
659+ bmpdata[0x12] = (unsigned char)width;
660+ bmpdata[0x16] = (unsigned char)height;
640661 bmpdata[0x1A] = 1;
641662 bmpdata[0x1C] = 24;
642663 bmpdata[0x1E] = 0;
--- trunk/d3dgraphics-opengl.cpp (revision 162)
+++ trunk/d3dgraphics-opengl.cpp (revision 163)
@@ -53,6 +53,7 @@
5353 hGLRC = NULL;
5454 width = 0;
5555 height = 0;
56+ fullscreenflag = false;
5657 SystemFont = NULL;
5758 now_SystemFontUStr = new WCHAR [1];
5859 now_SystemFontUStr[0] = NULL;
@@ -86,6 +87,21 @@
8687 DestroyD3D();
8788 }
8889
90+//! @brief フルスクリーンフラグ設定
91+//! @param fullscreen フルスクリーンフラグ
92+//! @attention 同フラグは、初期化時の InitD3D() 関数でも設定できます。
93+void D3DGraphics::SetFullScreenFlag(bool fullscreen)
94+{
95+ fullscreenflag = fullscreen;
96+}
97+
98+//! @brief フルスクリーンフラグ取得
99+//! @return フルスクリーンフラグ
100+bool D3DGraphics::GetFullScreenFlag()
101+{
102+ return fullscreenflag;
103+}
104+
89105 //! @brief 初期化@n
90106 //! (OpenGL 1.1)
91107 //! @param WindowCtrl WindowControlクラスのポインタ
@@ -106,6 +122,8 @@
106122 width = prc.right;
107123 height = prc.bottom;
108124
125+ fullscreenflag = fullscreen;
126+
109127 //フルスクリーン化
110128 if( fullscreen == true ){
111129 DEVMODE devmode;
@@ -219,14 +237,99 @@
219237 OutputLog.WriteLog(LOG_INIT, "グラフィック", "OpenGL(リセット)");
220238 #endif
221239
240+ //リソース解放
241+ CleanupD3Dresource();
242+
243+ if( hGLRC != NULL ){
244+ wglDeleteContext(hGLRC);
245+ hGLRC = NULL;
246+ }
247+
248+
249+ // 解放処理ここまで
250+ // ここから初期化処理
251+
222252 hWnd = WindowCtrl->GethWnd();
223253
254+ //フルスクリーン化
255+ if( fullscreenflag == true ){
256+ DEVMODE devmode;
257+ ZeroMemory(&devmode, sizeof(devmode));
258+ devmode.dmSize = sizeof(devmode);
259+ devmode.dmPelsWidth = width;
260+ devmode.dmPelsHeight = height;
261+ devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
262+
263+ if( ChangeDisplaySettings(&devmode, CDS_TEST) != DISP_CHANGE_SUCCESSFUL ){
264+ return 1;
265+ }
266+ ChangeDisplaySettings(&devmode, CDS_FULLSCREEN);
267+ }
268+
269+
270+
271+ HDC hDC;
272+ int pfdID;
273+ BOOL bResult;
274+
275+ //ピクセルフォーマット
276+ static PIXELFORMATDESCRIPTOR pfd = {
277+ sizeof (PIXELFORMATDESCRIPTOR),
278+ 1,
279+ PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL,
280+ PFD_TYPE_RGBA,
281+ 24,
282+ 0, 0, 0,
283+ 0, 0, 0,
284+ 0, 0,
285+ 0, 0, 0, 0, 0,
286+ 32,
287+ 0,
288+ 0,
289+ PFD_MAIN_PLANE,
290+ 0,
291+ 0,
292+ 0,
293+ 0
294+ };
295+
296+ //デバイスコンテキスト取得
297+ hDC = GetDC(hWnd);
298+
299+ //ピクセルフォーマットを取得
300+ pfdID = ChoosePixelFormat(hDC, &pfd);
301+ if( pfdID == 0 ){ return 1; }
302+
303+ //ピクセルフォーマットを指定
304+ bResult = SetPixelFormat(hDC, pfdID, &pfd);
305+ if( bResult == FALSE ){ return 1; }
306+
307+ //コンテキストを指定
308+ hGLRC = wglCreateContext(hDC);
309+ if( hGLRC == NULL ){ return 1; }
310+
311+ //デバイスコンテキスト解放
312+ ReleaseDC(hWnd, hDC);
313+
314+ //システムフォント用意
315+ //フォント名:MS ゴシック サイズ:18
316+ SystemFont = CreateFont(18, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, SHIFTJIS_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, "MS ゴシック");
317+
224318 #ifdef ENABLE_DEBUGLOG
225319 //ログに出力
226- OutputLog.WriteLog(LOG_ERROR, "", "");
320+ OutputLog.WriteLog(LOG_COMPLETE, "", "");
227321 #endif
228322
229- return 2;
323+ //テクスチャフォント用画像を取得
324+ TextureFont = LoadTexture(TextureFontFname, true, false);
325+
326+#ifdef ENABLE_DEBUGCONSOLE
327+ if( LoadDebugFontTexture() == false ){
328+ return 1;
329+ }
330+#endif
331+
332+ return 0;
230333 }
231334
232335 //! @brief 解放
@@ -235,6 +338,37 @@
235338 {
236339 if( hGLRC == NULL ){ return; }
237340
341+ CleanupD3Dresource();
342+
343+ if( hGLRC != NULL ){
344+ wglDeleteContext(hGLRC);
345+ hGLRC = NULL;
346+ }
347+
348+#ifdef ENABLE_DEBUGLOG
349+ //ログに出力
350+ OutputLog.WriteLog(LOG_CLEANUP, "グラフィック", "OpenGL");
351+#endif
352+
353+ //libjpeg解放
354+ jpeg_destroy_decompress(&cinfo);
355+}
356+
357+//! @brief デバイスのリソースを解放
358+void D3DGraphics::CleanupD3Dresource()
359+{
360+ if( TextureFont != -1 ){
361+ CleanupTexture(TextureFont);
362+ TextureFont = -1;
363+ }
364+
365+#ifdef ENABLE_DEBUGCONSOLE
366+ if( TextureDebugFont != -1 ){
367+ CleanupTexture(TextureDebugFont);
368+ TextureDebugFont = -1;
369+ }
370+#endif
371+
238372 for(int i=0; i<MAX_MODEL; i++){
239373 CleanupModel(i);
240374 }
@@ -254,19 +388,6 @@
254388 glDeleteLists(SystemFontListIdx, SystemFontListIdxSize);
255389 SystemFontListIdx = 0;
256390 }
257-
258- if( hGLRC != NULL ){
259- wglDeleteContext(hGLRC);
260- hGLRC = NULL;
261- }
262-
263-#ifdef ENABLE_DEBUGLOG
264- //ログに出力
265- OutputLog.WriteLog(LOG_CLEANUP, "グラフィック", "OpenGL");
266-#endif
267-
268- //libjpeg解放
269- jpeg_destroy_decompress(&cinfo);
270391 }
271392
272393 //! @brief モデルファイルを読み込む(.x)
--- trunk/d3dgraphics.h (revision 162)
+++ trunk/d3dgraphics.h (revision 163)
@@ -207,6 +207,7 @@
207207 HGLRC hGLRC; //!< OpenGLのコンテキスト
208208 int width; //!< 幅
209209 int height; //!< 高さ
210+ bool fullscreenflag; //!< フルスクリーン表示
210211 PAINTSTRUCT Paint_ps; //!< BeginPaint()関数とEndPaint()関数用
211212 MODELDATA pmodel[MAX_MODEL]; //!< モデルデータを格納
212213 TEXTUREDATA ptextures[MAX_TEXTURE]; //!< テクスチャを格納
@@ -239,6 +240,7 @@
239240 jpeg_decompress_struct cinfo; //!< libjpeg
240241 jpeg_error_mgr jerr; //!< libjpeg
241242
243+ void CleanupD3Dresource();
242244 int CheckFileExtension(char* filename, int nowformat);
243245 int CheckFileTypeFlag(char* filename, int nowformat);
244246 bool LoadBMPTexture(char* filename, bool BlackTransparent, TEXTUREDATA *ptexture);
@@ -262,6 +264,8 @@
262264 public:
263265 D3DGraphics();
264266 ~D3DGraphics();
267+ void SetFullScreenFlag(bool fullscreen);
268+ bool GetFullScreenFlag();
265269 int InitD3D(WindowControl *WindowCtrl, char *TextureFontFilename, bool fullscreen);
266270 int ResetD3D(WindowControl *WindowCtrl);
267271 void DestroyD3D();
--- trunk/gamemain.cpp (revision 162)
+++ trunk/gamemain.cpp (revision 163)
@@ -532,14 +532,17 @@
532532 mainmenu_mouseY = SCREEN_HEIGHT/2;
533533
534534 //標準ミッションのスクロールバーの設定
535- if( TOTAL_OFFICIALMISSION > TOTAL_MENUITEMS ){
535+#if TOTAL_OFFICIALMISSION > TOTAL_MENUITEMS
536+ //if( TOTAL_OFFICIALMISSION > TOTAL_MENUITEMS ){
536537 mainmenu_scrollbar_official_height = (float)(MAINMENU_H-25) / TOTAL_OFFICIALMISSION * TOTAL_MENUITEMS;
537538 mainmenu_scrollbar_official_scale = ((float)(MAINMENU_H-25) - mainmenu_scrollbar_official_height) / (TOTAL_OFFICIALMISSION - TOTAL_MENUITEMS);
538- }
539- else{
539+ //}
540+#else
541+ //else{
540542 mainmenu_scrollbar_official_height = 0.0f;
541543 mainmenu_scrollbar_official_scale = 0.0f;
542- }
544+ //}
545+#endif
543546
544547 //addonのスクロールバーの設定
545548 if( GameAddon.GetTotaldatas() > TOTAL_MENUITEMS ){
@@ -2165,13 +2168,9 @@
21652168 }
21662169
21672170 //ゲーム実行速度の表示
2168- if( 1 ){
2169- sprintf(str, "fps:%.2f", fps);
2170- }
2171- else{
2172- int speed = (int)(fps / (1000.0f/GAMEFRAMEMS) * 100);
2173- sprintf(str, "PROCESSING SPEED %d%%", speed);
2174- }
2171+ //int speed = (int)(fps / (1000.0f/GAMEFRAMEMS) * 100);
2172+ //sprintf(str, "PROCESSING SPEED %d%%", speed);
2173+ sprintf(str, "fps:%.2f", fps);
21752174 d3dg->Draw2DTextureFontText(SCREEN_WIDTH - strlen(str)*14 - 14 +1, 10+1, str, d3dg->GetColorCode(0.0f,0.0f,0.0f,1.0f), 14, 18);
21762175 d3dg->Draw2DTextureFontText(SCREEN_WIDTH - strlen(str)*14 - 14, 10, str, d3dg->GetColorCode(1.0f,0.5f,0.0f,1.0f), 14, 18);
21772176
@@ -2778,7 +2777,7 @@
27782777 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "ff revive kill <NUM> treat <NUM> nodamage <NUM>");
27792778 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "break <NUM> newobj <NUM>");
27802779 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "bot nofight caution stop estop speed");
2781- AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "ss clear");
2780+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "window ss clear exit");
27822781 }
27832782
27842783 //人の統計情報
@@ -3359,6 +3358,37 @@
33593358 AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str);
33603359 }
33613360
3361+ //ウィンドウ・フルスクリーン切り替え
3362+ if( strcmp(NewCommand, "window") == 0 ){
3363+ //現在の表示モード取得
3364+ bool flag = d3dg->GetFullScreenFlag();
3365+
3366+ if( flag == false ){ flag = true; }
3367+ else{ flag = false; }
3368+
3369+ //切り替え処理
3370+ WindowCtrl->ChangeWindowMode(flag);
3371+ d3dg->SetFullScreenFlag(flag);
3372+ if( ResetGame(WindowCtrl) != 0 ){
3373+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "[Error] Change failed.");
3374+ }
3375+ else{
3376+ Recovery();
3377+
3378+ //キー入力を取得
3379+ // ※ディスプレイ解像度の変化によるマウスの移動分を捨てる
3380+ inputCtrl->GetInputState(true);
3381+ inputCtrl->MoveMouseCenter();
3382+
3383+ if( flag == true ){
3384+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "Changed FullScreen mode.");
3385+ }
3386+ else{
3387+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "Changed Window mode.");
3388+ }
3389+ }
3390+ }
3391+
33623392 //スクリーンショットを撮影
33633393 // ※コンソール画面を削除するため、撮影を1フレーム遅らせる。
33643394 if( ScreenShot == 2 ){
@@ -3393,6 +3423,12 @@
33933423 }
33943424 }
33953425
3426+ //コンソールを閉じる
3427+ if( strcmp(NewCommand, "exit") == 0 ){
3428+ AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "Closed debug console.");
3429+ Show_Console = false;
3430+ }
3431+
33963432 #ifdef _DEBUG
33973433 //リセット操作
33983434 if( strcmp(NewCommand, "f12") == 0 ){
@@ -3505,13 +3541,13 @@
35053541 }
35063542
35073543 //! @brief screen派生クラスの初期化(クラスの設定)
3508-void InitScreen(opening *Opening, mainmenu *MainMenu, briefing *Briefing, maingame *MainGame, result *Result)
3544+void InitScreen(WindowControl *WindowCtrl, opening *Opening, mainmenu *MainMenu, briefing *Briefing, maingame *MainGame, result *Result)
35093545 {
3510- Opening->SetClass(&GameState, &d3dg, &inputCtrl, &GameSound);
3511- MainMenu->SetClass(&GameState, &d3dg, &inputCtrl, &GameSound);
3512- Briefing->SetClass(&GameState, &d3dg, &inputCtrl);
3513- MainGame->SetClass(&GameState, &d3dg, &inputCtrl, &GameSound);
3514- Result->SetClass(&GameState, &d3dg, &inputCtrl);
3546+ Opening->SetClass(&GameState, WindowCtrl, &d3dg, &inputCtrl, &GameSound);
3547+ MainMenu->SetClass(&GameState, WindowCtrl, &d3dg, &inputCtrl, &GameSound);
3548+ Briefing->SetClass(&GameState, WindowCtrl, &d3dg, &inputCtrl);
3549+ MainGame->SetClass(&GameState, WindowCtrl, &d3dg, &inputCtrl, &GameSound);
3550+ Result->SetClass(&GameState, WindowCtrl, &d3dg, &inputCtrl);
35153551 }
35163552
35173553 //! @brief screen派生クラスの実行
--- trunk/gamemain.h (revision 162)
+++ trunk/gamemain.h (revision 163)
@@ -243,7 +243,7 @@
243243 ~result();
244244 };
245245
246-void InitScreen(opening *Opening, mainmenu *MainMenu, briefing *Briefing, maingame *MainGame, result *Result);
246+void InitScreen(WindowControl *WindowCtrl, opening *Opening, mainmenu *MainMenu, briefing *Briefing, maingame *MainGame, result *Result);
247247 void ProcessScreen(WindowControl *WindowCtrl, opening *Opening, mainmenu *MainMenu, briefing *Briefing, maingame *MainGame, result *Result, unsigned int framecnt);
248248
249249 #endif
\ No newline at end of file
--- trunk/main.cpp (revision 162)
+++ trunk/main.cpp (revision 163)
@@ -119,7 +119,7 @@
119119 briefing Briefing;
120120 maingame MainGame;
121121 result Result;
122- InitScreen(&Opening, &MainMenu, &Briefing, &MainGame, &Result);
122+ InitScreen(&MainWindow, &Opening, &MainMenu, &Briefing, &MainGame, &Result);
123123
124124
125125 #ifdef ENABLE_DEBUGLOG
--- trunk/scene.cpp (revision 162)
+++ trunk/scene.cpp (revision 163)
@@ -34,6 +34,7 @@
3434 //! @brief コンストラクタ
3535 scene::scene()
3636 {
37+ WindowCtrl = NULL;
3738 d3dg = NULL;
3839 inputCtrl = NULL;
3940 framecnt = 0;
@@ -44,9 +45,10 @@
4445 {}
4546
4647 //! @brief クラスを設定
47-void scene::SetClass(StateMachine *in_GameState, D3DGraphics *in_d3dg, InputControl *in_inputCtrl)
48+void scene::SetClass(StateMachine *in_GameState, WindowControl *in_WindowCtrl, D3DGraphics *in_d3dg, InputControl *in_inputCtrl)
4849 {
4950 GameState = in_GameState;
51+ WindowCtrl = in_WindowCtrl;
5052 d3dg = in_d3dg;
5153 inputCtrl = in_inputCtrl;
5254 }
@@ -219,9 +221,10 @@
219221 {}
220222
221223 //! @brief 3Dシーンクラスを設定
222-void D3Dscene::SetClass(StateMachine *in_GameState, D3DGraphics *in_d3dg, InputControl *in_inputCtrl, SoundManager *in_GameSound)
224+void D3Dscene::SetClass(StateMachine *in_GameState, WindowControl *in_WindowCtrl, D3DGraphics *in_d3dg, InputControl *in_inputCtrl, SoundManager *in_GameSound)
223225 {
224226 GameState = in_GameState;
227+ WindowCtrl = in_WindowCtrl;
225228 d3dg = in_d3dg;
226229 inputCtrl = in_inputCtrl;
227230 GameSound = in_GameSound;
--- trunk/scene.h (revision 162)
+++ trunk/scene.h (revision 163)
@@ -40,15 +40,16 @@
4040 class scene
4141 {
4242 protected:
43- class StateMachine *GameState; //!< ゲーム全体の状態遷移クラス
44- class D3DGraphics *d3dg; //!< 描画クラス
45- class InputControl *inputCtrl; //!< 入力取得クラス
46- unsigned int framecnt; //!< フレーム数のカウント
43+ class StateMachine *GameState; //!< ゲーム全体の状態遷移クラス
44+ class WindowControl *WindowCtrl; //!< ウィンドウ制御クラス
45+ class D3DGraphics *d3dg; //!< 描画クラス
46+ class InputControl *inputCtrl; //!< 入力取得クラス
47+ unsigned int framecnt; //!< フレーム数のカウント
4748
4849 public:
4950 scene();
5051 ~scene();
51- virtual void SetClass(StateMachine *in_GameState, D3DGraphics *in_d3dg, InputControl *in_inputCtrl);
52+ virtual void SetClass(StateMachine *in_GameState, WindowControl *in_WindowCtrl, D3DGraphics *in_d3dg, InputControl *in_inputCtrl);
5253 virtual int Create();
5354 virtual int Recovery();
5455 virtual void Input();
@@ -93,7 +94,7 @@
9394 public:
9495 D3Dscene();
9596 ~D3Dscene();
96- virtual void SetClass(StateMachine *in_GameState, D3DGraphics *in_d3dg, InputControl *in_inputCtrl, SoundManager *in_GameSound);
97+ virtual void SetClass(StateMachine *in_GameState, WindowControl *in_WindowCtrl, D3DGraphics *in_d3dg, InputControl *in_inputCtrl, SoundManager *in_GameSound);
9798 virtual void Process();
9899 virtual void Sound();
99100 virtual bool RenderMain();
--- trunk/window.cpp (revision 162)
+++ trunk/window.cpp (revision 163)
@@ -135,6 +135,41 @@
135135 return DefWindowProc(hWnd, msg, wParam, lParam);
136136 }
137137
138+//! @brief ウィンドウの表示モード切り替え
139+//! @param fullscreen false:ウィンドウ表示 true:フルスクリーン用表示
140+//! @return 成功:true 失敗:false
141+bool WindowControl::ChangeWindowMode(bool fullscreen)
142+{
143+ if( hWnd == NULL ){ return false; }
144+
145+ DWORD dwStyle;
146+ RECT Rect;
147+ int width, height;
148+
149+ //ウィンドウサイズを取得
150+ GetClientRect(hWnd, &Rect);
151+
152+ if( fullscreen == false ){
153+ ChangeDisplaySettings(NULL, 0); //ディスプレイ解像度を戻す
154+
155+ dwStyle = WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX;
156+ }
157+ else{
158+ dwStyle = WS_POPUP;
159+ }
160+
161+ //ウィンドウサイズを計算
162+ AdjustWindowRect(&Rect, dwStyle, FALSE);
163+ width = Rect.right - Rect.left;
164+ height = Rect.bottom - Rect.top;
165+
166+ //反映
167+ SetWindowLong(hWnd, GWL_STYLE, dwStyle);
168+ SetWindowPos(hWnd, NULL, 0, 0, width, height, SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW);
169+
170+ return true;
171+}
172+
138173 //! @brief ウィンドウハンドルを取得
139174 //! @return ウィンドウハンドル
140175 HWND WindowControl::GethWnd()
--- trunk/window.h (revision 162)
+++ trunk/window.h (revision 163)
@@ -60,6 +60,7 @@
6060 ~WindowControl();
6161 void SetParam(HINSTANCE in_hInstance, int in_nCmdShow);
6262 bool InitWindow(char* title, int width, int height, bool fullscreen);
63+ bool ChangeWindowMode(bool fullscreen);
6364 HWND GethWnd();
6465 int CheckMainLoop();
6566 void ErrorInfo(char *str);