- Timestamp:
- 05/15/08 00:25:32 (6 months ago)
- Location:
- lang/d/koke/trunk
- Files:
-
- 2 modified
-
gamecore.d (modified) (3 diffs)
-
hell2.d (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/d/koke/trunk/gamecore.d
r11602 r11608 72 72 73 73 static const int CONFIG_RELOAD_CHECK_INTERVAL = 40 * 5; // コンフィグ再読み込み確認 74 static const int CONFIG_RELOAD_SHOW_INTERVAL = 40 * 3; // 「コンフィグ読み込んだ」表示時間74 static const int MESSAGE_SHOW_INTERVAL = 40 * 3; // 「コンフィグ読み込んだ」表示時間 75 75 76 76 // 運営レーザー用タイマー数値 … … 281 281 configparser.update(); 282 282 config_reload = 0; 283 message_timer = CONFIG_RELOAD_SHOW_INTERVAL;283 message_timer = MESSAGE_SHOW_INTERVAL; 284 284 message = "CONFIG RELOAD"; 285 285 } … … 436 436 // fps/cpu 437 437 Hell_drawFPS( 8 , getScreenHeight() - 24 ); 438 // Hell_update(); 438 439 440 Hell_drawFont(std.string.toString(Hell_getMouseX()) ~ " / " ~ std.string.toString(Hell_getMouseY()) , 441 8, 442 40, 443 2, 444 255, 255, 255 445 ); 439 446 } 440 447 -
lang/d/koke/trunk/hell2.d
r11602 r11608 106 106 { 107 107 g_videoFlags ^= SDL_FULLSCREEN; 108 // スクリーン初期化 108 _resetScreen(); 109 } 110 111 /** 112 * スクリーン初期化 113 */ 114 void _resetScreen(){ 109 115 if((g_screen = SDL_SetVideoMode(g_width, g_height, g_videoBpp, g_videoFlags)) is null) 110 116 { … … 114 120 glViewport(0, 0, g_width, g_height); 115 121 glClearColor(0.0f, 0.0f, 0.0f, 0.0f); 116 _reloadTexture( );122 _reloadTexture(true); 117 123 Hell_setAlpha(g_alpha_prev); 118 124 } … … 162 168 * テクスチャを全て読み直し 163 169 */ 164 void _reloadTexture( )170 void _reloadTexture(bool resetTexture = true) 165 171 { 166 172 delete g_fontTexture; … … 168 174 foreach(key; g_poolTexture.keys) 169 175 { 176 if(resetTexture) g_poolTexture[key].id = 0; 177 170 178 char[] path = g_poolTexture[key].getPath(); 171 179 int mask[] = g_poolTexture[key].getMaskInfo(); … … 441 449 // イベント更新 442 450 SDL_Event e; 443 while(SDL_PollEvent(&e)) g_quit = (e.type == SDL_QUIT); 451 while(SDL_PollEvent(&e)){ 452 g_quit = (e.type == SDL_QUIT); 453 switch(e.type){ 454 case SDL_VIDEORESIZE: 455 g_width = e.resize.w; 456 g_height = e.resize.h; 457 _resetScreen(); 458 break; 459 default: 460 break; 461 } 462 } 444 463 if(Hell_isPushKey(SDLK_F4)) _reloadTexture(); 445 464 if(Hell_isPushKey(SDLK_F5)) SDL_WM_IconifyWindow(); … … 1122 1141 glMatrixMode(GL_PROJECTION); 1123 1142 glLoadIdentity(); 1124 glOrtho(0 , 640 , 480, 0 , -1 , 1);1143 glOrtho(0 , g_width , g_height , 0 , -1 , 1); 1125 1144 glMatrixMode(GL_MODELVIEW); 1126 1145 glLoadIdentity();
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)