clang-format
This commit is contained in:
parent
4cdff203ae
commit
57f657e1be
|
@ -16,6 +16,7 @@
|
|||
#include "db.h"
|
||||
#include "dbox.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game.h"
|
||||
#include "game_mouse.h"
|
||||
|
@ -45,7 +46,6 @@
|
|||
#include "window_manager.h"
|
||||
#include "word_wrap.h"
|
||||
#include "worldmap.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ static int _get_input_str(int win, int cancelKeyCode, char* text, int maxLength,
|
|||
|
||||
windowRefresh(win);
|
||||
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
|
||||
renderPresent();
|
||||
sharedFpsLimiter.throttle();
|
||||
|
@ -2304,7 +2304,7 @@ static void characterEditorDrawBigNumber(int x, int y, int flags, int value, int
|
|||
windowWidth);
|
||||
windowRefreshRect(windowHandle, &rect);
|
||||
renderPresent();
|
||||
delay_ms(BIG_NUM_ANIMATION_DELAY - (getTicks() - _frame_time));
|
||||
delay_ms(BIG_NUM_ANIMATION_DELAY - (getTicks() - _frame_time));
|
||||
}
|
||||
|
||||
blitBufferToBuffer(numbersGraphicBufferPtr + BIG_NUM_WIDTH * tens,
|
||||
|
@ -3529,9 +3529,9 @@ static int characterEditorEditAge()
|
|||
}
|
||||
|
||||
if (v33 > dbl_50170B) {
|
||||
delay_ms(1000 / _repFtime - (getTicks() - _frame_time));
|
||||
delay_ms(1000 / _repFtime - (getTicks() - _frame_time));
|
||||
} else {
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
}
|
||||
|
||||
keyCode = inputGetInput();
|
||||
|
@ -3545,7 +3545,7 @@ static int characterEditorEditAge()
|
|||
} else {
|
||||
windowRefresh(win);
|
||||
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
}
|
||||
|
||||
renderPresent();
|
||||
|
@ -5271,7 +5271,7 @@ static void characterEditorHandleAdjustSkillButtonPressed(int keyCode)
|
|||
if (!isUsingKeyboard) {
|
||||
unspentSp = pcGetStat(PC_STAT_UNSPENT_SKILL_POINTS);
|
||||
if (repeatDelay >= dbl_5018F0) {
|
||||
delay_ms(1000 / _repFtime - (getTicks() - _frame_time));
|
||||
delay_ms(1000 / _repFtime - (getTicks() - _frame_time));
|
||||
} else {
|
||||
delay_ms(1000 / 24 - (getTicks() - _frame_time));
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "cycle.h"
|
||||
#include "db.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game_mouse.h"
|
||||
#include "input.h"
|
||||
|
@ -21,7 +22,6 @@
|
|||
#include "svga.h"
|
||||
#include "text_font.h"
|
||||
#include "window_manager.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "character_editor.h"
|
||||
#include "color.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game.h"
|
||||
#include "game_sound.h"
|
||||
|
@ -21,7 +22,6 @@
|
|||
#include "text_font.h"
|
||||
#include "window_manager.h"
|
||||
#include "word_wrap.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -909,7 +909,7 @@ int showLoadFileDialog(char* title, char** fileList, char* dest, int fileListLen
|
|||
doubleClickTimer = FILE_DIALOG_DOUBLE_CLICK_DELAY;
|
||||
doubleClickSelectedFileIndex = -2;
|
||||
}
|
||||
|
||||
|
||||
delay_ms(1000 / 24 - (getTicks() - tick));
|
||||
}
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ int showSaveFileDialog(char* title, char** fileList, char* dest, int fileListLen
|
|||
doubleClickTimer = FILE_DIALOG_DOUBLE_CLICK_DELAY;
|
||||
doubleClickSelectedFileIndex = -2;
|
||||
}
|
||||
|
||||
|
||||
delay_ms(1000 / 24 - (getTicks() - tick));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include "delay.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
void delay_ms(int ms) {
|
||||
if (ms <= 0){
|
||||
void delay_ms(int ms)
|
||||
{
|
||||
if (ms <= 0) {
|
||||
return;
|
||||
}
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
void delay_ms(int ms);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "art.h"
|
||||
#include "cycle.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game_mouse.h"
|
||||
#include "game_sound.h"
|
||||
|
@ -21,7 +22,6 @@
|
|||
#include "sfall_config.h"
|
||||
#include "svga.h"
|
||||
#include "window_manager.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -453,7 +453,7 @@ int elevatorSelectLevel(int elevator, int* mapPtr, int* elevationPtr, int* tileP
|
|||
_elevatorBackgroundFrmImage.getWidth());
|
||||
|
||||
windowRefresh(gElevatorWindow);
|
||||
|
||||
|
||||
delay_ms(delay - (getTicks() - tick));
|
||||
|
||||
renderPresent();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "critter.h"
|
||||
#include "cycle.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "dialog.h"
|
||||
#include "display_monitor.h"
|
||||
#include "draw.h"
|
||||
|
@ -40,7 +41,6 @@
|
|||
#include "text_object.h"
|
||||
#include "tile.h"
|
||||
#include "window_manager.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -2971,7 +2971,7 @@ void _gdialog_scroll_subwin(int win, int a2, unsigned char* a3, unsigned char* a
|
|||
windowRefreshRect(win, &rect);
|
||||
v7 += 10;
|
||||
v9 -= 10 * (GAME_DIALOG_WINDOW_WIDTH);
|
||||
|
||||
|
||||
delay_ms(33);
|
||||
|
||||
renderPresent();
|
||||
|
@ -3009,7 +3009,7 @@ void _gdialog_scroll_subwin(int win, int a2, unsigned char* a3, unsigned char* a
|
|||
windowRefreshRect(win, &rect);
|
||||
|
||||
rect.top += 10;
|
||||
|
||||
|
||||
delay_ms(33);
|
||||
|
||||
renderPresent();
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "audio_engine.h"
|
||||
#include "color.h"
|
||||
#include "delay.h"
|
||||
#include "dinput.h"
|
||||
#include "draw.h"
|
||||
#include "kb.h"
|
||||
|
@ -14,7 +15,6 @@
|
|||
#include "touch.h"
|
||||
#include "vcr.h"
|
||||
#include "win32.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "db.h"
|
||||
#include "dbox.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "display_monitor.h"
|
||||
#include "draw.h"
|
||||
#include "file_utils.h"
|
||||
|
@ -55,7 +56,6 @@
|
|||
#include "window_manager.h"
|
||||
#include "word_wrap.h"
|
||||
#include "worldmap.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ int lsgLoadGame(int mode)
|
|||
}
|
||||
|
||||
if (scrollCounter > 14.4) {
|
||||
delay_ms(1000 / scrollVelocity - (getTicks() - start));
|
||||
delay_ms(1000 / scrollVelocity - (getTicks() - start));
|
||||
} else {
|
||||
delay_ms(1000 / 24 - (getTicks() - start));
|
||||
}
|
||||
|
@ -1205,7 +1205,7 @@ int lsgLoadGame(int mode)
|
|||
doubleClickSlot = -1;
|
||||
}
|
||||
|
||||
delay_ms(1000 / 24 - (getTicks() - time));
|
||||
delay_ms(1000 / 24 - (getTicks() - time));
|
||||
}
|
||||
|
||||
if (rc == 1) {
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "audio_engine.h"
|
||||
#include "platform_compat.h"
|
||||
#include "delay.h"
|
||||
#include "platform_compat.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -796,7 +796,7 @@ static int _syncWait()
|
|||
if (((_sync_time + 1000 * compat_timeGetTime()) & 0x80000000) != 0) {
|
||||
result = 1;
|
||||
|
||||
delay_ms(-(_sync_time + 1000 * compat_timeGetTime())/1000 - 3);
|
||||
delay_ms(-(_sync_time + 1000 * compat_timeGetTime()) / 1000 - 3);
|
||||
while (((_sync_time + 1000 * compat_timeGetTime()) & 0x80000000) != 0)
|
||||
;
|
||||
}
|
||||
|
@ -1299,9 +1299,9 @@ static void _MVE_sndSync()
|
|||
}
|
||||
v0 = true;
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
delay_ms(1);
|
||||
#endif
|
||||
#ifdef EMSCRIPTEN
|
||||
delay_ms(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dword_6B3660 != dword_6B3AE4) {
|
||||
|
@ -1324,10 +1324,10 @@ static int _syncWaitLevel(int a1)
|
|||
}
|
||||
|
||||
v2 = _sync_time + a1;
|
||||
do {
|
||||
do {
|
||||
result = v2 + 1000 * compat_timeGetTime();
|
||||
if (result < 0) {
|
||||
delay_ms(-result/1000 - 3);
|
||||
if (result < 0) {
|
||||
delay_ms(-result / 1000 - 3);
|
||||
}
|
||||
result = v2 + 1000 * compat_timeGetTime();
|
||||
} while (result < 0);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "cycle.h"
|
||||
#include "dbox.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game.h"
|
||||
#include "game_mouse.h"
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include "window_manager.h"
|
||||
#include "word_wrap.h"
|
||||
#include "worldmap.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -2001,7 +2001,7 @@ static bool pipboyRest(int hours, int minutes, int duration)
|
|||
pipboyDrawNumber(gameTimeGetHour(), 4, PIPBOY_WINDOW_TIME_X, PIPBOY_WINDOW_TIME_Y);
|
||||
pipboyDrawDate();
|
||||
windowRefresh(gPipboyWindow);
|
||||
|
||||
|
||||
delay_ms(50 - (getTicks() - start));
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "combat.h"
|
||||
#include "combat_ai.h"
|
||||
#include "debug.h"
|
||||
#include "delay.h"
|
||||
#include "draw.h"
|
||||
#include "game.h"
|
||||
#include "game_mouse.h"
|
||||
|
@ -23,7 +24,6 @@
|
|||
#include "text_font.h"
|
||||
#include "text_object.h"
|
||||
#include "window_manager.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -1570,7 +1570,7 @@ static void _DoThing(int eventCode)
|
|||
|
||||
blitBufferToBufferTrans(_preferencesFrmImages[PREFERENCES_WINDOW_FRM_KNOB_ON].getData(), 21, 12, 21, gPreferencesWindowBuffer + PREFERENCES_WINDOW_WIDTH * meta->knobY + v31, PREFERENCES_WINDOW_WIDTH);
|
||||
windowRefresh(gPreferencesWindow);
|
||||
|
||||
|
||||
delay_ms(35 - (getTicks() - tick));
|
||||
|
||||
renderPresent();
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "delay.h"
|
||||
#include "input.h"
|
||||
#include "kb.h"
|
||||
#include "memory.h"
|
||||
#include "mouse.h"
|
||||
#include "svga.h"
|
||||
#include "delay.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
|
Loading…
Reference in New Issue