Skip to content

Commit e97087b

Browse files
committed
Remove pause window
1 parent b31cea9 commit e97087b

File tree

3 files changed

+0
-94
lines changed

3 files changed

+0
-94
lines changed

src/game.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4
188188
fontSetCurrent(font);
189189

190190
screenshotHandlerConfigure(KEY_F12, gameTakeScreenshot);
191-
pauseHandlerConfigure(-1, nullptr);
192191

193192
tileDisable();
194193

src/input.cc

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ typedef struct TickerListNode {
3939
} TickerListNode;
4040

4141
static int dequeueInputEvent();
42-
static void pauseGame();
43-
static int pauseHandlerDefaultImpl();
4442
static void screenshotBlitter(unsigned char* src, int src_pitch, int a3, int x, int y, int width, int height, int dest_x, int dest_y);
4543
static void buildNormalizedQwertyKeys();
4644
static void _GNW95_process_key(KeyboardData* data);
@@ -73,18 +71,12 @@ static int _input_mx;
7371
// 0x6AC754
7472
static int _input_my;
7573

76-
// 0x6AC75C
77-
static bool gPaused;
78-
7974
// 0x6AC760
8075
static int gScreenshotKeyCode;
8176

8277
// 0x6AC764
8378
static int _using_msec_timer;
8479

85-
// 0x6AC768
86-
static int gPauseKeyCode;
87-
8880
// 0x6AC76C
8981
static ScreenshotHandler* gScreenshotHandler;
9082

@@ -94,9 +86,6 @@ static int gInputEventQueueReadIndex;
9486
// 0x6AC774
9587
static unsigned char* gScreenshotBuffer;
9688

97-
// 0x6AC778
98-
static PauseHandler* gPauseHandler;
99-
10089
// 0x6AC77C
10190
static int gInputEventQueueWriteIndex;
10291

@@ -137,9 +126,6 @@ int inputInit(int a1)
137126
_input_mx = -1;
138127
_input_my = -1;
139128
gRunLoopDisabled = 0;
140-
gPaused = false;
141-
gPauseKeyCode = KEY_ALT_P;
142-
gPauseHandler = pauseHandlerDefaultImpl;
143129
gScreenshotHandler = screenshotHandlerDefaultImpl;
144130
gTickerListHead = nullptr;
145131
gScreenshotKeyCode = KEY_ALT_C;
@@ -223,11 +209,6 @@ void enqueueInputEvent(int a1)
223209
return;
224210
}
225211

226-
if (a1 == gPauseKeyCode) {
227-
pauseGame();
228-
return;
229-
}
230-
231212
if (a1 == gScreenshotKeyCode) {
232213
takeScreenshot();
233214
return;
@@ -290,10 +271,6 @@ void inputEventQueueReset()
290271
// 0x4C8D1C
291272
void tickersExecute()
292273
{
293-
if (gPaused) {
294-
return;
295-
}
296-
297274
if (gRunLoopDisabled) {
298275
return;
299276
}
@@ -363,74 +340,6 @@ void tickersDisable()
363340
gRunLoopDisabled = true;
364341
}
365342

366-
// 0x4C8DFC
367-
static void pauseGame()
368-
{
369-
if (!gPaused) {
370-
gPaused = true;
371-
372-
int win = gPauseHandler();
373-
374-
while (inputGetInput() != KEY_ESCAPE) {
375-
}
376-
377-
gPaused = false;
378-
windowDestroy(win);
379-
}
380-
}
381-
382-
// 0x4C8E38
383-
static int pauseHandlerDefaultImpl()
384-
{
385-
int windowWidth = fontGetStringWidth("Paused") + 32;
386-
int windowHeight = 3 * fontGetLineHeight() + 16;
387-
388-
int win = windowCreate((rectGetWidth(&_scr_size) - windowWidth) / 2,
389-
(rectGetHeight(&_scr_size) - windowHeight) / 2,
390-
windowWidth,
391-
windowHeight,
392-
256,
393-
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
394-
if (win == -1) {
395-
return -1;
396-
}
397-
398-
windowDrawBorder(win);
399-
400-
unsigned char* windowBuffer = windowGetBuffer(win);
401-
fontDrawText(windowBuffer + 8 * windowWidth + 16,
402-
"Paused",
403-
windowWidth,
404-
windowWidth,
405-
_colorTable[31744]);
406-
407-
_win_register_text_button(win,
408-
(windowWidth - fontGetStringWidth("Done") - 16) / 2,
409-
windowHeight - 8 - fontGetLineHeight() - 6,
410-
-1,
411-
-1,
412-
-1,
413-
KEY_ESCAPE,
414-
"Done",
415-
0);
416-
417-
windowRefresh(win);
418-
419-
return win;
420-
}
421-
422-
// 0x4C8F34
423-
void pauseHandlerConfigure(int keyCode, PauseHandler* handler)
424-
{
425-
gPauseKeyCode = keyCode;
426-
427-
if (handler == nullptr) {
428-
handler = pauseHandlerDefaultImpl;
429-
}
430-
431-
gPauseHandler = handler;
432-
}
433-
434343
// 0x4C8F4C
435344
void takeScreenshot()
436345
{

src/input.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ namespace fallout {
55

66
typedef void(TickerProc)();
77

8-
typedef int(PauseHandler)();
98
typedef int(ScreenshotHandler)(int width, int height, unsigned char* buffer, unsigned char* palette);
109

1110
int inputInit(int a1);
@@ -20,7 +19,6 @@ void tickersAdd(TickerProc* fn);
2019
void tickersRemove(TickerProc* fn);
2120
void tickersEnable();
2221
void tickersDisable();
23-
void pauseHandlerConfigure(int keyCode, PauseHandler* fn);
2422
void takeScreenshot();
2523
int screenshotHandlerDefaultImpl(int width, int height, unsigned char* data, unsigned char* palette);
2624
void screenshotHandlerConfigure(int keyCode, ScreenshotHandler* handler);

0 commit comments

Comments
 (0)