X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=365c0444c34fcb21c0517f25ee98a8008b22ca30;hb=c8d05082e92b7c2c5b722e2b205e96a15a32eec2;hp=d49c423c4df2bc1a077536dae63c67422fbbc7d2;hpb=e962cbff359d8ee0abf003a2c4d0934f2a22f536;p=d2df-sdl.git diff --git a/src/game/g_game.pas b/src/game/g_game.pas index d49c423..365c044 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -92,7 +92,6 @@ procedure g_Game_Update(); procedure g_Game_PreUpdate(); procedure g_Game_Quit(); procedure g_Game_SetupScreenSize(); -procedure g_Game_ChangeResolution(newWidth, newHeight: Word; nowFull, nowMax: Boolean); function g_Game_ModeToText(Mode: Byte): string; function g_Game_TextToMode(Mode: string): Byte; procedure g_Game_ExecuteEvent(Name: String); @@ -449,7 +448,7 @@ uses {$IFDEF ENABLE_HOLMES} g_holmes, {$ENDIF} - e_res, g_textures, g_window, g_menu, + e_res, g_window, g_menu, r_render, r_textures, r_animations, r_gfx, e_input, e_log, g_console, r_console, g_items, g_map, g_panel, g_playermodel, g_gfx, g_options, Math, g_triggers, g_monsters, e_sound, CONFIG, @@ -2267,6 +2266,7 @@ begin g_Weapon_Update(); g_Monsters_Update(); g_GFX_Update(); + r_GFX_Update; g_Player_UpdateAll(); g_Player_UpdatePhysicalObjects(); @@ -2378,7 +2378,7 @@ begin if gResolutionChange then begin e_WriteLog('Changing resolution', TMsgType.Notify); - g_Game_ChangeResolution(gRC_Width, gRC_Height, gRC_FullScreen, gRC_Maximized); + r_Render_Apply; gResolutionChange := False; g_ActiveWindow := nil; end; @@ -2558,7 +2558,6 @@ begin end; end; - g_Frames_CreateWAD(nil, 'FRAMES_TELEPORT', GameWAD+':TEXTURES\TELEPORT', 64, 64, 10, False); g_Frames_CreateWAD(nil, 'FRAMES_PUNCH', GameWAD+':WEAPONS\PUNCH', 64, 64, 4, False); g_Frames_CreateWAD(nil, 'FRAMES_PUNCH_UP', GameWAD+':WEAPONS\PUNCH_UP', 64, 64, 4, False); g_Frames_CreateWAD(nil, 'FRAMES_PUNCH_DN', GameWAD+':WEAPONS\PUNCH_DN', 64, 64, 4, False); @@ -2701,7 +2700,6 @@ begin g_Texture_Delete('TEXTURE_PLAYER_BLUEFLAG_D'); g_Texture_Delete('TEXTURE_PLAYER_TALKBUBBLE'); g_Texture_Delete('TEXTURE_PLAYER_INVULPENTA'); - g_Frames_DeleteByName('FRAMES_TELEPORT'); g_Frames_DeleteByName('FRAMES_PUNCH'); g_Frames_DeleteByName('FRAMES_PUNCH_UP'); g_Frames_DeleteByName('FRAMES_PUNCH_DN'); @@ -2826,11 +2824,6 @@ begin end; end; -procedure g_Game_ChangeResolution(newWidth, newHeight: Word; nowFull, nowMax: Boolean); -begin - sys_SetDisplayMode(newWidth, newHeight, gBPP, nowFull, nowMax); -end; - procedure g_Game_AddPlayer(Team: Byte = TEAM_NONE); begin if ((not gGameOn) and (gState <> STATE_INTERCUSTOM)) @@ -6307,16 +6300,7 @@ begin g_Game_Quit(); end; 'r_reset': - begin - gRC_Width := Max(1, gRC_Width); - gRC_Height := Max(1, gRC_Height); - gBPP := Max(1, gBPP); - if sys_SetDisplayMode(gRC_Width, gRC_Height, gBPP, gRC_FullScreen, gRC_Maximized) = True then - e_LogWriteln('resolution changed') - else - e_LogWriteln('resolution not changed'); - sys_EnableVSync(gVSync); - end; + r_Render_Apply; 'r_maxfps': begin if Length(p) = 2 then