From 4211f044edafbf02ca17bd8782c0b6d0154a393e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=A1k?= Date: Fri, 8 Aug 2025 19:44:57 +0200 Subject: [PATCH] adjust several exit states --- game/globmap.c | 2 +- game/inv.c | 4 +- game/realgame.c | 2 +- libs/vesatst.c | 98 ------------------------------------ platform/linux/app_start.cpp | 1 + 5 files changed, 5 insertions(+), 102 deletions(-) delete mode 100644 libs/vesatst.c diff --git a/game/globmap.c b/game/globmap.c index 38fa16e..772bc50 100644 --- a/game/globmap.c +++ b/game/globmap.c @@ -174,7 +174,7 @@ static void error(const char *text) SEND_LOG("(ERROR) %s : %s",popis,text); closemode(); display_error(popis); - exit(0); + exit(1); } static void ex_error(char znak) diff --git a/game/inv.c b/game/inv.c index 95c0341..f173b19 100644 --- a/game/inv.c +++ b/game/inv.c @@ -171,7 +171,7 @@ void load_items() { closemode(); display_error("Selhalo otevreni souboru ITEMS.DAT. Zkotroluj zda vubec existuje."); - exit(0); + exit(1); } do { @@ -966,7 +966,7 @@ void definuj_postavy() { closemode(); display_error("Error in file POSTAVY.DAT. May be missing a parameter in some definition."); - exit(0); + exit(1); } c=strchr(c,'\n')+1; prepocitat_postavu(p); diff --git a/game/realgame.c b/game/realgame.c index df55606..0979053 100644 --- a/game/realgame.c +++ b/game/realgame.c @@ -430,7 +430,7 @@ int load_map(const char *filename) { closemode(); display_error("Bug in temp file. Please purge some status blocks in last load savegame file."); - exit(0); + exit(1); } doNotLoadMapState=0; current_map_hash = fnv1a_hash(filename); diff --git a/libs/vesatst.c b/libs/vesatst.c deleted file mode 100644 index c958aa2..0000000 --- a/libs/vesatst.c +++ /dev/null @@ -1,98 +0,0 @@ -#include "types.h" -#include -#include -#include -#include -#include "bgraph.h" -#include - -MODEinfo vesadata; -word lastbank=0; - -word *mapvesaadr(word *a); -#pragma aux mapvesaadr parm [edi] value [edi] - -void showview32b(word x,word y,word xs,word ys) - { - register longint a; - - if (x>640 || y>480) return; - if (xs==0) xs=640; - if (ys==0) ys=480; - if (x+xs>640) xs=640-x; - if (y+ys>480) ys=480-y; - if (xs>550 && ys>400) - { - redraw32b(screen,lbuffer,NULL); - return; - } - a=(x<<1)+linelen*y; - redrawbox32b(xs,ys,(void *)((char *)screen+a),(void *)a); - } - -int initmode32b() - { - getmodeinfo(&vesadata,0x110); - if (!(vesadata.modeattr & MA_SUPP)) return -1; - setvesamode(0x110,-1); - lbuffer=(word *)0xa0000; - screen=lbuffer; - linelen=640*2; - showview=showview32b; - screen=(void *)malloc(screen_buffer_size); - return 0; - } - - -word *mapvesaadr1(word *a) - { - word bank; - - bank=(int32_t)a>>16; - if (bank!=lastbank) - { - lastbank=bank; - bank=bank; - { - union REGS regs; - regs.w.ax = 0x4f05; - regs.w.bx = 0; - regs.w.dx = bank; - int386 (0x10,®s,®s); // window A - } - } - return (word *)(((int32_t)a & 0xffff)+0xa0000); -} - -void switchvesabank(word bank) -#pragma aux switchvesabank parm [eax] - { - union REGS regs; - regs.w.ax = 0x4f05; - regs.w.bx = 0; - regs.w.dx = bank; - int386 (0x10,®s,®s); // window A - } - - - -void vesatst() - { - int i,j; - word *a; - - a=screen; - for (i=0;i<480;i++) - for(j=i;j