rewrite gpathtable and path resolution

This commit is contained in:
Ondřej Novák 2025-01-30 22:39:52 +01:00
parent ccebc91f0d
commit 4a0c7d4fd0
125 changed files with 889 additions and 901 deletions

View file

@ -21,8 +21,8 @@
extern "C" extern "C"
{ {
#include <strlite.h> #include <libs/strlite.h>
#include <inicfg.h> #include <libs/inicfg.h>
} }
#include "Pathname.h" #include "Pathname.h"
#include <malloc.h> #include <malloc.h>

View file

@ -12,7 +12,7 @@ else()
set(STANDARD_LIBRARIES "pthread") set(STANDARD_LIBRARIES "pthread")
endif() endif()
include_directories(platform libs) include_directories(.)
include_directories( ${SDL2_INCLUDE_DIRS}) include_directories( ${SDL2_INCLUDE_DIRS})

View file

@ -1,29 +1,29 @@
#include <process.h> #include <process.h>
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <pcx.h> #include <libs/pcx.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <io.h> #include <io.h>
#include <conio.h> #include <conio.h>
#include <graph.h> #include <graph.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <strlists.h> #include <strlists.h>
#include <strlite.h> #include <libs/strlite.h>
#include <direct.h> #include <direct.h>
#include <dos.h> #include <dos.h>
#include <vesa.h> #include <vesa.h>
#include <doserr.h> #include <doserr.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include "setup.h" #include "setup.h"
#include "setvideo.h" #include "setvideo.h"
#include "setuplib.h" #include "setuplib.h"

View file

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <memman.h> #include <libs/memman.h>
#include <string.h> #include <string.h>
#include "setupcpy.h" #include "setupcpy.h"

View file

@ -1,20 +1,20 @@
#include <types.h> #include <libs/types.h>
#include <ctype.h> #include <ctype.h>
#include <io.h> #include <io.h>
#include <dos.h> #include <dos.h>
#include <malloc.h> #include <malloc.h>
#include <direct.h> #include <direct.h>
#include <memman.h> #include <libs/memman.h>
#include <string.h> #include <string.h>
#include <event.h> #include <libs/event.h>
#include <strlite.h> #include <libs/strlite.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <vesa.h> #include <vesa.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include "setuplib.h" #include "setuplib.h"
#include "setupcpy.h" #include "setupcpy.h"
#include "setup.h" #include "setup.h"

View file

@ -1,13 +1,13 @@
#include <types.h> #include <libs/types.h>
#include <vesa.h> #include <vesa.h>
#include <mem.h> #include <mem.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <devices.h> #include <libs/devices.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "setup.h" #include "setup.h"

View file

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <bios.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
@ -100,7 +100,7 @@ static char *transfer_text(char *source,char *target)
if (source==NULL) if (source==NULL)
{ {
puts(orgn); puts(orgn);
error("Chybn<EFBFBD> rod nebo mal<61> po‡et tvar od jednoho slova"); error("Chybn<EFBFBD> rod nebo mal<61> po<EFBFBD>et tvar<61> od jednoho slova");
} }
source++; source++;
} }
@ -111,7 +111,7 @@ static char *transfer_text(char *source,char *target)
if (source==NULL) if (source==NULL)
{ {
puts(orgn); puts(orgn);
error("O‡ek v  se ']'"); error("O<EFBFBD>ek<EFBFBD>v<EFBFBD> se ']'");
} }
} }
source++; source++;
@ -151,22 +151,22 @@ void read_names()
do do
{ {
fprintf(stderr,"Budes zad vat musk  jmna, nebo ensk : (M/Z)");gets(buff); fprintf(stderr,"Budes zad<EFBFBD>vat mu<6D>sk<73> jm<6A>na, nebo <20>ensk<73>: (M/Z)");gets(buff);
fm=toupper(buff[0]); fm=toupper(buff[0]);
} }
while (fm!='M'&& fm!='Z') ; while (fm!='M'&& fm!='Z') ;
fprintf(stderr,"Nynˇ je t©eba zadat n<>kolik jmen, poslednˇ odklepni ENTREM\n"); fprintf(stderr,"Nyn<EFBFBD> je t<>eba zadat n<>kolik jmen, posledn<64> odklepni ENTREM\n");
i=0; i=0;
do do
{ {
fprintf(stderr,"%d.jmno:",i+1);gets(buff); fprintf(stderr,"%d.jm<EFBFBD>no:",i+1);gets(buff);
if (buff[0]) strncpy(sn_nams[i],buff,31); if (buff[0]) strncpy(sn_nams[i],buff,31);
i++; i++;
} }
while(i<SAVE_POSTS && buff[0]); while(i<SAVE_POSTS && buff[0]);
do do
{ {
fprintf(stderr,"Bude¨ chtˇt vyhledat v¨echny texty (pˇsmeno V) nebo jen ty ve kter<65>ch se objevujˇ jmna postav (pˇsmeno P)"); fprintf(stderr,"Bude<EFBFBD> cht<68>t vyhledat v<>echny texty (p<>smeno V) nebo jen ty ve kter<65>ch se objevuj<75> jm<6A>na postav (p<>smeno P)");
gets(buff); gets(buff);
all_print=toupper(buff[0]); all_print=toupper(buff[0]);
} }

View file

@ -1,8 +1,8 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <dos.h> #include <dos.h>
#include <memman.h> #include <libs/memman.h>
static int latest_version(char *wild,int numpos) static int latest_version(char *wild,int numpos)
{ {

View file

@ -1,20 +1,20 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <types.h> #include <libs/types.h>
#include <process.h> #include <process.h>
#include <dos.h> #include <dos.h>
#include <mem.h> #include <mem.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <bios.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "mapy.h" #include "mapy.h"
#include <basicobj.h> #include <libs/basicobj.h>
#include <memman.h> #include <libs/memman.h>
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"
#include "steny.h" #include "steny.h"

View file

@ -1,16 +1,16 @@
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <event.h> #include <libs/event.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <memman.h> #include <libs/memman.h>
#include "mapy.h" #include "mapy.h"
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"

View file

@ -1,21 +1,21 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <memman.h> #include <libs/memman.h>
#include <pcx.h> #include <libs/pcx.h>
#include <dos.h> #include <dos.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include "mapy.h" #include "mapy.h"
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"

View file

@ -3,19 +3,19 @@
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <signal.h> #include <signal.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include "dump.h" #include "dump.h"
#include "mapy.h" #include "mapy.h"
#include "edit_map.h" #include "edit_map.h"

View file

@ -1,17 +1,17 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "mapy.h" #include "mapy.h"
#include <basicobj.h> #include <libs/basicobj.h>
#include "steny.h" #include "steny.h"
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"

View file

@ -1,27 +1,27 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <dos.h> #include <dos.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <wav.h> #include <libs/wav.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include "mapy.h" #include "mapy.h"
#include <basicobj.h> #include <libs/basicobj.h>
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"
#include "save_map.h" #include "save_map.h"
#include "steny.h" #include "steny.h"
#include "mob_edit.h" #include "mob_edit.h"
#include <pcx.h> #include <libs/pcx.h>

View file

@ -1,20 +1,20 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <memman.h> #include <libs/memman.h>
#include <pcx.h> #include <libs/pcx.h>
#include <dos.h> #include <dos.h>
#include "mapy.h" #include "mapy.h"
#include "globals.h" #include "globals.h"

View file

@ -4,15 +4,15 @@
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <direct.h> #include <direct.h>
#include <fcntl.h> #include <fcntl.h>
@ -39,7 +39,7 @@
#define A_MAPITEM 0x800C //itemy #define A_MAPITEM 0x800C //itemy
#define A_MAPMACR 0x800D //Makra multiakce #define A_MAPMACR 0x800D //Makra multiakce
#define A_MAPFLY 0x800E //Letajici predmety #define A_MAPFLY 0x800E //Letajici predmety
#define A_MAPMOBS 0x800F //Potvory v bludi¨ti #define A_MAPMOBS 0x800F //Potvory v bludi<EFBFBD>ti
#define A_MAPVYK 0x8010 //Vyklenky #define A_MAPVYK 0x8010 //Vyklenky
#define A_MOBS 0x8011 //Potvory definice #define A_MOBS 0x8011 //Potvory definice
#define A_MOBSND 0x8012 //Potvory zvuky #define A_MOBSND 0x8012 //Potvory zvuky
@ -179,7 +179,7 @@ int load_map(char *filename)
if (las) if (las)
{ {
if (check_sound_map()) if (check_sound_map())
msg_box("Upozornˆ!",'\x1',"Verze souboru SOUND.DAT neodpovid  verz¡m ostatn¡ch soubor. To me zpsobit poru¨en¡ integrity ukazatel na zvukov soubory!","Pokra‡ovat",NULL); msg_box("Upozorn<EFBFBD>n<EFBFBD>!",'\x1',"Verze souboru SOUND.DAT neodpovid<EFBFBD> verz<72>m ostatn<74>ch soubor<6F>. To m<><6D>e zp<7A>sobit poru<72>en<65> integrity ukazatel<65> na zvukov<6F> soubory!","Pokra<EFBFBD>ovat",NULL);
load_all_shops(); load_all_shops();
las=0; las=0;
} }
@ -332,7 +332,7 @@ void backup_info(EVENT_MSG *msg)
return; return;
} }
c=(char *)msg->data; c=(char *)msg->data;
strcpy(c,"Star˜ soubor byl uloen v adres ©i backup\\..."); strcpy(c,"Star<EFBFBD> soubor byl ulo<6C>en v adres<65><73>i backup\\...");
c=strchr(c,'\0'); c=strchr(c,'\0');
msg->data=(void *)c; msg->data=(void *)c;
msg->msg=-1; msg->msg=-1;
@ -633,10 +633,10 @@ int save_all_map(void)
sprintf(info,"Chyba %02d na pozici %d:%d",-z,x,y); sprintf(info,"Chyba %02d na pozici %d:%d",-z,x,y);
switch (z) switch (z)
{ {
case -1:msg_box(info,'\01',"Chyb¡ definice stˆny!","OK",NULL);break; case -1:msg_box(info,'\01',"Chyb<EFBFBD> definice st<73>ny!","OK",NULL);break;
case -2:msg_box(info,'\01',"Chodba vede do neexistuj¡c¡ho sektoru!","OK",NULL);break; case -2:msg_box(info,'\01',"Chodba vede do neexistuj<EFBFBD>c<EFBFBD>ho sektoru!","OK",NULL);break;
case -3:msg_box(info,'\01',"Schody jsou ¨patnˆ spojen se sousedn¡m¡ sektory!","OK",NULL);break; case -3:msg_box(info,'\01',"Schody jsou <EFBFBD>patn<EFBFBD> spojen<65> se sousedn<64>m<EFBFBD> sektory!","OK",NULL);break;
case -4:msg_box(info,'\01',"Ud lost v neexistuj¡c¡m sektoru!","OK",NULL);break; case -4:msg_box(info,'\01',"Ud<EFBFBD>lost v neexistuj<75>c<EFBFBD>m sektoru!","OK",NULL);break;
} }
if (!backup) if (!backup)
{ {
@ -649,7 +649,7 @@ int save_all_map(void)
} }
if (save_map(filename)) if (save_map(filename))
{ {
sprintf(info,"Nedok u uloit soubor %s.",filename); sprintf(info,"Nedok<EFBFBD><EFBFBD>u ulo<6C>it soubor %s.",filename);
msg_box("Chyba I/O",'\01',info,"!Panika!",NULL); msg_box("Chyba I/O",'\01',info,"!Panika!",NULL);
} }
else txt=pripona(filename,TXT); else txt=pripona(filename,TXT);

View file

@ -3,17 +3,17 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <strlists.h> #include <strlists.h>
#include <strlite.h> #include <libs/strlite.h>
#include "steny.h" #include "steny.h"
#include "globals.h" #include "globals.h"

View file

@ -1,23 +1,23 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <dos.h> #include <dos.h>
#include <types.h> #include <libs/types.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include <wav_mem.h> #include <libs/wav_mem.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include "mapy.h" #include "mapy.h"
#include <basicobj.h> #include <libs/basicobj.h>
#include <direct.h> #include <direct.h>
#include "globals.h" #include "globals.h"
#include "edit_map.h" #include "edit_map.h"

View file

@ -4,7 +4,7 @@
#include <stdio.h> #include <stdio.h>
/*#include "..\types.h"*/ /*#include "..\types.h"*/
#include "pcx.h" #include "pcx.h"
#include <memman.h> #include <libs/memman.h>
/*#include "..\bgraph.h"*/ /*#include "..\bgraph.h"*/

View file

@ -3,9 +3,9 @@
#include <malloc.h> #include <malloc.h>
#include <mem.h> #include <mem.h>
#include <math.h> #include <math.h>
#include <types.h> #include <libs/types.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include "..\game\engine1.h" #include "..\game\engine1.h"
#include "pcx.h" #include "pcx.h"
@ -254,7 +254,7 @@ void help()
{ {
printf("ONS Podlahar (C)1997 \n" printf("ONS Podlahar (C)1997 \n"
"\n" "\n"
"Pouit¡: PODLAHY <obrazek1.pcx> <obrazek2.pcx> <rv> <gv> <bv> \n" "Pou<EFBFBD>it<EFBFBD>: PODLAHY <obrazek1.pcx> <obrazek2.pcx> <rv> <gv> <bv> \n"
"\n" "\n"
"<obrazek1.pcx> <obrazek2.pcx>\n" "<obrazek1.pcx> <obrazek2.pcx>\n"
" soubory s texturami ve formatu pcx. Textura musi mit velikost 500x320\n\n" " soubory s texturami ve formatu pcx. Textura musi mit velikost 500x320\n\n"

View file

@ -1,4 +1,4 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <malloc.h> #include <malloc.h>
@ -47,44 +47,44 @@ char pr_name=0,pr_type=0,pr_sound=0,pr_umist=0,pr_zbran=0,pr_hmotn=0,pr_popis=0;
char grp_sort=0,pr_number=0,pr_cena=0; char grp_sort=0,pr_number=0,pr_cena=0;
char _typy_zbrani[]= char _typy_zbrani[]=
"Me\0" "Me<EFBFBD>\0"
"Sekera\0" "Sekera\0"
"Kladivo\0" "Kladivo\0"
"Hl\0" "H<EFBFBD>l\0"
"D<EFBFBD>ka\0" "D<EFBFBD>ka\0"
"St©eln \0" "St<EFBFBD>eln<EFBFBD>\0"
"Ostatnˇ\0"; "Ostatn<EFBFBD>\0";
char _typy_veci[]= char _typy_veci[]=
"Nespecifikov no\0" "Nespecifikov<EFBFBD>no\0"
"Zbra¤ tv ©ˇ v tv ©\0" "Zbra<EFBFBD> tv<74><76><EFBFBD> v tv<74><76>\0"
"Vrhacˇ zbra¤\0" "Vrhac<EFBFBD> zbra<72>\0"
"St©eln  zbra¤\0" "St<EFBFBD>eln<EFBFBD> zbra<72>\0"
"Zbroj\0" "Zbroj\0"
"Svitek / Hlka\0" "Svitek / H<EFBFBD>lka\0"
"Lektvar\0" "Lektvar\0"
"Voda\0" "Voda\0"
"Jˇdlo\0" "J<EFBFBD>dlo\0"
"Speci lnˇ\0" "Speci<EFBFBD>ln<EFBFBD>\0"
"Runa\0" "Runa\0"
"Penˇze\0" "Pen<EFBFBD>ze\0"
"Svitek s textem\0" "Svitek s textem\0"
"Prach\0" "Prach\0"
"Ostatnˇ\0"; "Ostatn<EFBFBD>\0";
char _umisteni_veci[]= char _umisteni_veci[]=
"Nikam\0" "Nikam\0"
"Zavazadlo\0" "Zavazadlo\0"
"Na t<>lo (naho©e)\0" "Na t<>lo (naho<EFBFBD>e)\0"
"Na t<>lo (dole)\0" "Na t<>lo (dole)\0"
"Na hlavu\0" "Na hlavu\0"
"Na nohy\0" "Na nohy\0"
"Kutna\0" "Kutna\0"
"Na krk\0" "Na krk\0"
"Do ruky\0" "Do ruky\0"
"Obouru\0" "Obouru<EFBFBD>\0"
"Prsten\0" "Prsten\0"
"›ˇp\0"; "<EFBFBD><EFBFBD>p\0";
long load_section(FILE *f,void **section, int *sct_type,long *sect_size) long load_section(FILE *f,void **section, int *sct_type,long *sect_size)
@ -149,14 +149,14 @@ char *find_str(char *sound,int number,long listsize)
void print_polozka(int num,TITEM *t) void print_polozka(int num,TITEM *t)
{ {
if (pr_number) printf("%3dł",num); if (pr_number) printf("%3d<EFBFBD>",num);
if (pr_name) printf("%-32sł",t->jmeno); if (pr_name) printf("%-32s<EFBFBD>",t->jmeno);
if (pr_type) printf("%-20sł",find_str(_typy_veci,t->druh+1,sizeof(_typy_veci))); if (pr_type) printf("%-20s<EFBFBD>",find_str(_typy_veci,t->druh+1,sizeof(_typy_veci)));
if (pr_umist) printf("%-20sł",find_str(_umisteni_veci,t->umisteni+1,sizeof(_umisteni_veci))); if (pr_umist) printf("%-20s<EFBFBD>",find_str(_umisteni_veci,t->umisteni+1,sizeof(_umisteni_veci)));
if (pr_zbran) printf("%-10sł",isweapon(t->druh)?find_str(_typy_zbrani,t->typ_zbrane+1,sizeof(_typy_zbrani)):" "); if (pr_zbran) printf("%-10s<EFBFBD>",isweapon(t->druh)?find_str(_typy_zbrani,t->typ_zbrane+1,sizeof(_typy_zbrani)):" ");
if (pr_hmotn) printf("%6dł",t->hmotnost); if (pr_hmotn) printf("%6d<EFBFBD>",t->hmotnost);
if (pr_cena) printf("%6dł",t->cena); if (pr_cena) printf("%6d<EFBFBD>",t->cena);
if (pr_sound) printf("%-12sł",find_str(sound,t->sound,listsize)); if (pr_sound) printf("%-12s<EFBFBD>",find_str(sound,t->sound,listsize));
if (pr_popis) printf("%s",t->popis); if (pr_popis) printf("%s",t->popis);
puts(""); puts("");
} }

View file

@ -1,10 +1,10 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <dos.h> #include <dos.h>
#include <mem.h> #include <mem.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include "flc.h" #include "flc.h"
#include "anipack.h" #include "anipack.h"
#include <conio.h> #include <conio.h>

View file

@ -1,7 +1,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#define ERR_PARM 1 #define ERR_PARM 1
#define ERR_STR 2 #define ERR_STR 2

View file

@ -63,9 +63,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#include "flc.h" #include "flc.h"
#include "lzw.h" #include "lzw.h"

View file

@ -1,4 +1,4 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include "jpegmgif.h" #include "jpegmgif.h"

View file

@ -1,7 +1,7 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <mem.h> #include <mem.h>
#include <conio.h> #include <conio.h>
#include "flc.h" #include "flc.h"

View file

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <memman.h> #include <libs/memman.h>
#define LZW_MAX_CODES 4096 #define LZW_MAX_CODES 4096

View file

@ -1,4 +1,4 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <conio.h> #include <conio.h>
@ -75,7 +75,7 @@ int find_free_channel()
{ {
int i; int i;
for(i=0;i<256;i++) if (chaninfo[i].snd==NULL) return i; for(i=0;i<256;i++) if (chaninfo[i].snd==NULL) return i;
printf("Nemohu pridat zvuk. Jiz je zaplneno vsech %d kanal\n",CHANNELS); printf("Nemohu pridat zvuk. Jiz je zaplneno vsech %d kanal<EFBFBD>\n",CHANNELS);
return -1; return -1;
} }
@ -194,7 +194,7 @@ void open_wav(char *wav)
wavinf=(struct t_wave *)malloc(get_chunk_size(snd)); wavinf=(struct t_wave *)malloc(get_chunk_size(snd));
if (wavinf==NULL) if (wavinf==NULL)
{ {
puts("Nedostatek pam<61>ti."); puts("Nedostatek pam<61>ti.");
return; return;
} }
read_chunk(snd,wavinf); read_chunk(snd,wavinf);
@ -480,7 +480,7 @@ void call_script(char *script_name)
else strcpy(c,SND_NAME); else strcpy(c,SND_NAME);
if (scr==NULL) if (scr==NULL)
{ {
printf("Nemohu otev©ˇt script: %s\n",script_name); printf("Nemohu otev<EFBFBD><EFBFBD>t script: %s\n",script_name);
exit(1); exit(1);
} }
snf=fopen(snd_name,"r"); snf=fopen(snd_name,"r");
@ -488,7 +488,7 @@ void call_script(char *script_name)
open_files(name); open_files(name);
if (i!=1) if (i!=1)
{ {
printf("Chyba ve script souboru: %s. Prvni musˇ b<>t jmno cˇlovho souboru.\n",scr); printf("Chyba ve script souboru: %s. Prvni mus<EFBFBD> b<>t jm<6A>no c<>lov<6F>ho souboru.\n",scr);
exit(1); exit(1);
} }
while ((i=fgetc(scr))!=EOF && i!='\n'); while ((i=fgetc(scr))!=EOF && i!='\n');

View file

@ -63,9 +63,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#include "flc.h" #include "flc.h"
#include "lzw.h" #include "lzw.h"
@ -624,7 +624,7 @@ main(int argc,char *argv[])
"Nula udava ze se nezapisuji jen ty body, ktere se nemeni.\n\n" "Nula udava ze se nezapisuji jen ty body, ktere se nemeni.\n\n"
"Pozn: Bezne neni nutne uvadet parametr colorq protoze stupen ztraty se \n" "Pozn: Bezne neni nutne uvadet parametr colorq protoze stupen ztraty se \n"
"voli podle vysledku predchoziho frame. Je dobre ho uvest pri velkych\n" "voli podle vysledku predchoziho frame. Je dobre ho uvest pri velkych\n"
"vykyvech velikosti frame. Tak zhruba pri ñ10KB. Hodnoty parametru se \n" "vykyvech velikosti frame. Tak zhruba pri <EFBFBD>10KB. Hodnoty parametru se \n"
"voli od 25000-35000, cim vyssi, tim vyssi stupen ztraty"); "voli od 25000-35000, cim vyssi, tim vyssi stupen ztraty");
exit(0); exit(0);
} }

View file

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <pcx.h> #include <libs/pcx.h>
#include <math.h> #include <math.h>
#include <conio.h> #include <conio.h>
#include <mem.h> #include <mem.h>

View file

@ -1,6 +1,6 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <mgifmem.h> #include <libs/mgifmem.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <conio.h> #include <conio.h>

View file

@ -1,17 +1,17 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <mgifmem.h> #include <libs/mgifmem.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "lzw.h" #include "lzw.h"
#include "mgifeobj.h" #include "mgifeobj.h"
@ -172,7 +172,7 @@ void build_sample_list(void *list)
} }
str_add(&ls,c); str_add(&ls,c);
} }
if (samples_total==0) str_add(&ls,"< dn˜ zvuk>"); if (samples_total==0) str_add(&ls,"<<EFBFBD><EFBFBD>dn<EFBFBD> zvuk>");
memcpy(list,&ls,sizeof(void **)); memcpy(list,&ls,sizeof(void **));
} }
@ -831,15 +831,15 @@ void warn_size_mistmach(void)
} }
if (size<total_frames) if (size<total_frames)
{ {
msg_box(PRG_HEADER,'\x1',"MGIFEDIT zjistil, e film je del¨i, ne stopy " msg_box(PRG_HEADER,'\x1',"MGIFEDIT zjistil, <EFBFBD>e film je del<65>i, ne<6E> stopy "
"uloen v souboru PRJ. Program tyto stopy dopln¡ na konci. Ke spr vnmu " "ulo<EFBFBD>en<EFBFBD> v souboru PRJ. Program tyto stopy dopln<6C> na konci. Ke spr<70>vn<76>mu "
"um¡stˆn¡ pouij funkci GInsert","Ok",NULL); "um<EFBFBD>st<EFBFBD>n<EFBFBD> pou<6F>ij funkci GInsert","Ok",NULL);
for(i=0;i<samples_total;i++) track_dopln_na_konci(smp_prg+i); for(i=0;i<samples_total;i++) track_dopln_na_konci(smp_prg+i);
} }
if (sizeh>total_frames) if (sizeh>total_frames)
{ {
msg_box(PRG_HEADER,'\x1',"MGIFEDIT zjistil,e film je krat¨¡, ne stopy " msg_box(PRG_HEADER,'\x1',"MGIFEDIT zjistil,<EFBFBD>e film je krat<61><74>, ne<6E> stopy "
"uloen v souboru PRJ. Ke spr vnmu um¡stˆn¡ pouij funkci GDelete","Ok",NULL); "ulo<EFBFBD>en<EFBFBD> v souboru PRJ. Ke spr<70>vn<76>mu um<75>st<73>n<EFBFBD> pou<6F>ij funkci GDelete","Ok",NULL);
} }
} }

View file

@ -1,5 +1,5 @@
#ifndef _MGIFEACT_H #ifndef _MGIFEACT_H
#include <mgifmem.h> #include <libs/mgifmem.h>
#define _MGIFEACT_H #define _MGIFEACT_H

View file

@ -1,24 +1,24 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <mgifmem.h> #include <libs/mgifmem.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "lzw.h" #include "lzw.h"
#include "mgifeobj.h" #include "mgifeobj.h"
#include "mgifedit.h" #include "mgifedit.h"
#include "mgifeact.h" #include "mgifeact.h"
#include "mgifebld.h" #include "mgifebld.h"
#include <wav.h> #include <libs/wav.h>
#include <time.h> #include <time.h>
@ -360,7 +360,7 @@ char build_solo(int smp)
static void error_message(int smp) static void error_message(int smp)
{ {
char *c; char *c;
char *msg="Nastala chyba p©i pr ci se stopou:"; char *msg="Nastala chyba p<EFBFBD>i pr<70>ci se stopou:";
if (smp_prg[smp].user_name!=NULL) if (smp_prg[smp].user_name!=NULL)
{ {
concat(c,msg,smp_prg[smp].user_name); concat(c,msg,smp_prg[smp].user_name);
@ -369,7 +369,7 @@ static void error_message(int smp)
{ {
concat(c,msg,smp_prg[smp].sample_name); concat(c,msg,smp_prg[smp].sample_name);
} }
msg_box(PRG_HEADER,'\x1',msg,"Pokraovat",NULL); msg_box(PRG_HEADER,'\x1',msg,"Pokra<EFBFBD>ovat",NULL);
} }
char build_all_samples() char build_all_samples()
@ -393,7 +393,7 @@ char build_all_samples()
return 0; return 0;
} }
} }
set_value(0,20,"Ukl d m zvukovou stopu..."); set_value(0,20,"Ukl<EFBFBD>d<EFBFBD>m zvukovou stopu...");
save_all(); save_all();
destroy_all(); destroy_all();
exit_wait=0; exit_wait=0;

View file

@ -1,25 +1,25 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include "lzw.h" #include "lzw.h"
#include "mgifeobj.h" #include "mgifeobj.h"
#include "mgifeact.h" #include "mgifeact.h"
#include "mgifedit.h" #include "mgifedit.h"
#include "mgifebld.h" #include "mgifebld.h"
#include <strlists.h> #include <strlists.h>
#include <strlite.h> #include <libs/strlite.h>
#include <direct.h> #include <direct.h>
#include <mgfplay.h> #include <libs/mgfplay.h>
#include <wav.h> #include <libs/wav.h>
void *vga_font=&boldcz; void *vga_font=&boldcz;
void *icones=&ikones; void *icones=&ikones;

View file

@ -2,13 +2,13 @@
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include "mgifeobj.h" #include "mgifeobj.h"
#include "mgifedit.h" #include "mgifedit.h"
#include "mgifeact.h" #include "mgifeact.h"

View file

@ -64,13 +64,13 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#include "lzw.h" #include "lzw.h"
#include <zvuk.h> #include <libs/zvuk.h>
#include <bios.h>
#include <vesa.h> #include <vesa.h>
#include <i86.h> #include <i86.h>
#include <io.h> #include <io.h>

View file

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#define MGIF "MGIF" #define MGIF "MGIF"

View file

@ -63,11 +63,11 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#include <pcx.h> #include <libs/pcx.h>
#include "lzw.h" #include "lzw.h"
#include <math.h> #include <math.h>
#include <conio.h> #include <conio.h>
@ -782,14 +782,14 @@ void script_compress(char *script_name)
else strcpy(c,SND_NAME); else strcpy(c,SND_NAME);
if (scr==NULL) if (scr==NULL)
{ {
printf("Nemohu otev©ˇt script: %s\n",script_name); printf("Nemohu otev<EFBFBD><EFBFBD>t script: %s\n",script_name);
exit(1); exit(1);
} }
snf=fopen(snd_name,"w"); snf=fopen(snd_name,"w");
i=fscanf(scr,"%255s",name); i=fscanf(scr,"%255s",name);
if (i!=1) if (i!=1)
{ {
printf("Chyba ve script souboru: %s. Prvni musˇ b<>t jmno cˇlovho souboru.\n",scr); printf("Chyba ve script souboru: %s. Prvni mus<EFBFBD> b<>t jm<6A>no c<>lov<6F>ho souboru.\n",scr);
exit(1); exit(1);
} }
i=fscanf(scr,"%d",&speed); i=fscanf(scr,"%d",&speed);
@ -860,7 +860,7 @@ main(int argc,char *argv[])
"Nula udava ze se nezapisuji jen ty body, ktere se nemeni.\n\n" "Nula udava ze se nezapisuji jen ty body, ktere se nemeni.\n\n"
"Pozn1: Bezne neni nutne uvadet parametr colorq protoze stupen ztraty se \n" "Pozn1: Bezne neni nutne uvadet parametr colorq protoze stupen ztraty se \n"
"voli podle vysledku predchoziho frame. Je dobre ho uvest pri velkych\n" "voli podle vysledku predchoziho frame. Je dobre ho uvest pri velkych\n"
"vykyvech velikosti frame. Tak zhruba pri ń10KB. Hodnoty parametru se \n" "vykyvech velikosti frame. Tak zhruba pri <EFBFBD>10KB. Hodnoty parametru se \n"
"voli od 25000-35000, cim vyssi, tim vyssi stupen ztraty\n\n" "voli od 25000-35000, cim vyssi, tim vyssi stupen ztraty\n\n"
"Pozn2: Pokud nektere parametry vynechas (treba znakem '-', nebo je na konci\n" "Pozn2: Pokud nektere parametry vynechas (treba znakem '-', nebo je na konci\n"
"neuvedes, dosadi se default hodnoty. Ty jsou zvoleny tak, aby program\n" "neuvedes, dosadi se default hodnoty. Ty jsou zvoleny tak, aby program\n"

View file

@ -1,13 +1,13 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <i86.h> #include <i86.h>
#include <bios.h>
#include "anipack.h" #include "anipack.h"
#include "cinema.h" #include "cinema.h"
#include <memman.h> #include <libs/memman.h>
#define CINEMA ".cnm" #define CINEMA ".cnm"

View file

@ -1,8 +1,8 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <pcx.h> #include <libs/pcx.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h> #include <mem.h>
#include "bitline.h" #include "bitline.h"

View file

@ -1,5 +1,5 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <memman.h> #include <libs/memman.h>
#include "types.h" #include "types.h"
#include "event.h" #include "event.h"
#include <debug.h> #include <debug.h>

View file

@ -9,7 +9,7 @@
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>
extern "C" { extern "C" {
#include <memman.h> #include <libs/memman.h>
} }
#include "Music.h" #include "Music.h"

View file

@ -6,8 +6,8 @@
#include <SHLOBJ.H> #include <SHLOBJ.H>
extern "C" extern "C"
{ {
#include <strlite.h> #include <libs/strlite.h>
#include <inicfg.h> #include <libs/inicfg.h>
} }
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>

View file

@ -12,8 +12,8 @@
extern "C" extern "C"
{ {
#include <strlite.h> #include <libs/strlite.h>
#include <inicfg.h> #include <libs/inicfg.h>
} }
static HWND handles[5]; static HWND handles[5];

View file

@ -1,7 +1,7 @@
#include "skeldal_win.h" #include "skeldal_win.h"
#include "debug.h" #include "debug.h"
#include "resource.h" #include "resource.h"
#include <devices.h> #include <libs/devices.h>
void DXMouseTransform(unsigned short *x, unsigned short *y); void DXMouseTransform(unsigned short *x, unsigned short *y);
void DxLockBuffers(BOOL lock); void DxLockBuffers(BOOL lock);

View file

@ -1,5 +1,5 @@
#include <skeldal_win.h> #include <skeldal_win.h>
#include <zvuk.h> #include <libs/zvuk.h>
extern "C" extern "C"
{ {

View file

@ -1,13 +1,13 @@
#include <stdio.h> #include <stdio.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <conio.h> #include <conio.h>
#include <mem.h> #include <mem.h>
#include <stdlib.h> #include <stdlib.h>
#include <bios.h>
#include <dos.h> #include <dos.h>
#include <i86.h> #include <i86.h>
#include <strlite.h> #include <libs/strlite.h>
#include <memman.h> #include <libs/memman.h>
#define SCRADR 0xb8000 #define SCRADR 0xb8000
#define SCRSIZE (80*25*2) #define SCRSIZE (80*25*2)
@ -124,41 +124,41 @@ char pause=0;
unsigned short *screen; unsigned short *screen;
TDIGIT digits[15]= TDIGIT digits[15]=
{ "ÛßÛ" { "<EFBFBD><EFBFBD><EFBFBD>"
"Û Û" "<EFBFBD> <20>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
" Û" " <EFBFBD>"
" Û" " <EFBFBD>"
" ß", " <EFBFBD>",
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"Ûßß" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
"Û Û" "<EFBFBD> <20>"
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
" ß", " <EFBFBD>",
"Ûßß" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
"Ûßß" "<EFBFBD><EFBFBD><EFBFBD>"
"ÛßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
"ÛßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ß Û" "<EFBFBD> <20>"
" ß", " <EFBFBD>",
"ÛßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ÛßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
"ÛßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßÛ" "<EFBFBD><EFBFBD><EFBFBD>"
"ßßß", "<EFBFBD><EFBFBD><EFBFBD>",
" Ü " " <EFBFBD> "
" Ü " " <EFBFBD> "
" ", " ",
" " " "
"ßßß" "<EFBFBD><EFBFBD><EFBFBD>"
" " " "
}; };
@ -567,8 +567,8 @@ void show_dir(int sel_file,int playing)
color=3+(playing==sel_file?2:0); color=3+(playing==sel_file?2:0);
disp_str(1,17," ",color); disp_str(1,17," ",color);
disp_str(21,17," ",color); disp_str(21,17," ",color);
disp_str(0,17,"È",color); disp_str(0,17,"<EFBFBD>",color);
disp_str(23,17,"É",color); disp_str(23,17,"<EFBFBD>",color);
} }
void play_next(char **next) void play_next(char **next)
{ {

View file

@ -4,7 +4,7 @@
#include <dpmi.h> #include <dpmi.h>
#include <conio.h> #include <conio.h>
#include <mem.h> #include <mem.h>
#include <bios.h>
#include <dos.h> #include <dos.h>

View file

@ -1,4 +1,4 @@
#include <platform.h> #include <platform/platform.h>
#include "advconfig.h" #include "advconfig.h"

View file

@ -3,8 +3,8 @@
#define SKELDAL_GAME_ADVCONFIG_H_ #define SKELDAL_GAME_ADVCONFIG_H_
#include <strlite.h> #include <libs/strlite.h>
#include <config.h> #include <platform/config.h>
void adv_patch_config(INI_CONFIG *srcconfig, TSTR_LIST lst); void adv_patch_config(INI_CONFIG *srcconfig, TSTR_LIST lst);

View file

@ -1,22 +1,23 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <string.h>
#define AUTOMAP_BACK RGB555(8,4,0) #define AUTOMAP_BACK RGB555(8,4,0)
#define AUTOMAP_VODA RGB555(0,15,31) #define AUTOMAP_VODA RGB555(0,15,31)
#define AUTOMAP_LAVA RGB555(31,16,0) #define AUTOMAP_LAVA RGB555(31,16,0)

View file

@ -1,23 +1,24 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include "version.h" #include "version.h"
#include <string.h>
#define ZIVOTY_S 60 #define ZIVOTY_S 60
#define ZIVOTY_E 62 #define ZIVOTY_E 62
#define KONDIC_S 64 #define KONDIC_S 64

View file

@ -1,22 +1,22 @@
//CHARACTER GENERATOR //CHARACTER GENERATOR
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <stddef.h> #include <stddef.h>

View file

@ -4,19 +4,19 @@
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <stddef.h> #include <stddef.h>

View file

@ -1,11 +1,11 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <memman.h> #include <libs/memman.h>
#include "globals.h" #include "globals.h"
#include "engine1.h" #include "engine1.h"

View file

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <mem.h>
uint32_t l; uint32_t l;

View file

@ -1,22 +1,22 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <ctype.h> #include <ctype.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include <mgifmem.h> #include <libs/mgifmem.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <stdarg.h> #include <stdarg.h>
@ -156,14 +156,13 @@ static void dialog_anim(va_list args)
void *anm; void *anm;
void *aptr; void *aptr;
char *ch;
char hid; char hid;
int spdc=0,cntr=rep,tm,tm2; int spdc=0,cntr=rep,tm,tm2;
int32_t scr_linelen2 = GetScreenPitch(); int32_t scr_linelen2 = GetScreenPitch();
loc_anim_render_buffer=PIC_Y*scr_linelen2+PIC_X; loc_anim_render_buffer=PIC_Y*scr_linelen2+PIC_X;
mgif_install_proc(animace_kouzla); mgif_install_proc(animace_kouzla);
concat(ch,pathtable[SR_DIALOGS],block); const char *ch = build_pathname(2,gpathtable[SR_DIALOGS], block);
free(block); free(block);
aptr=load_file(ch); aptr=load_file(ch);
do do

View file

@ -15,15 +15,15 @@
*/ */
#include <types.h> #include <libs/types.h>
#include <ctype.h> #include <ctype.h>
#include <malloc.h> #include <malloc.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <strlite.h> #include <libs/strlite.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
FILE *dlg; FILE *dlg;
int32_t *odstavce=NULL; int32_t *odstavce=NULL;

View file

@ -1,10 +1,10 @@
#include <platform.h> #include <platform/platform.h>
#include <iostream> #include <iostream>
#include <filesystem> #include <filesystem>
#include <regex> #include <regex>
#include <string> #include <string>
#include <optional> #include <optional>
#include <memman.h> #include <libs/memman.h>
int findMaxDumpNumber(const std::string &directoryPath) { int findMaxDumpNumber(const std::string &directoryPath) {
namespace fs = std::filesystem; namespace fs = std::filesystem;

View file

@ -1,7 +1,7 @@
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <mem.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -1,18 +1,19 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include "engine1.h" #include "engine1.h"
#include "globals.h" #include "globals.h"
#include "specproc.h" #include "specproc.h"
#include <string.h>
#define MOB_ZNAKY "FLBLCH" #define MOB_ZNAKY "FLBLCH"
#define MOB_START 1 #define MOB_START 1

View file

@ -1,17 +1,18 @@
#include <platform.h> #include <platform/platform.h>
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h>
#include <bios.h>
#include <memman.h> #include <libs/memman.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include "math.h" #include "math.h"
#include "globals.h" #include "globals.h"
#include "engine1.h" #include "engine1.h"
#include <string.h>
#define CTVR 128 #define CTVR 128
t_points points; t_points points;

View file

@ -1,7 +1,7 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include <libs/types.h>
#include "engine1.h" #include "engine1.h"
#include <bgraph.h> #include <libs/bgraph.h>
#include <string.h> #include <string.h>

View file

@ -1,20 +1,20 @@
#include <platform.h> #include <platform/platform.h>
#include <bios.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <mem.h>
#include <pcx.h> #include <libs/pcx.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <strlite.h> #include <libs/strlite.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <memman.h> #include <libs/memman.h>
#include <fcntl.h> #include <fcntl.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <stdarg.h> #include <stdarg.h>
#include "globals.h" #include "globals.h"
#include "temp_storage.h" #include "temp_storage.h"
@ -107,10 +107,10 @@ int load_org_map(char *filename,TSTENA **sides,TSECTOR **sectors,TMAP_EDIT_INFO
int sect; int sect;
int32_t size,r; int32_t size,r;
char nmapend=1; char nmapend=1;
char *c;
c=find_map_path(filename);
f=fopen_icase(c,"rb");free(c); const char *c=build_pathname(2, gpathtable[SR_MAP],filename);
f=fopen_icase(c,"rb");
if (f==NULL) return -1; if (f==NULL) return -1;
do do
{ {
@ -722,13 +722,6 @@ int load_basic_info()
return res; return res;
} }
static void MakeSaveGameDir(const char *name)
{
char *p=(char *)alloca(strlen(name)+1);
strcpy(p,name);
p[strlen(p)-1]=0;
mkdir(p,0666);
}
static int save_global_events() static int save_global_events()
{ {
@ -754,14 +747,14 @@ static int load_global_events()
int save_game(int slotnum,char *gamename) int save_game(int slotnum,char *gamename)
{ {
char *sn,*ssn,*gn; char *ssn,*gn;
FILE *svf; FILE *svf;
int r; int r;
SEND_LOG("(SAVELOAD) Saving game slot %d",slotnum); SEND_LOG("(SAVELOAD) Saving game slot %d",slotnum);
save_map_state(); save_map_state();
concat(sn,pathtable[SR_SAVES],_SLOT_SAV); const char *sn = build_pathname(2,gpathtable[SR_SAVES],_SLOT_SAV);
MakeSaveGameDir(pathtable[SR_SAVES]); create_directories(gpathtable[SR_SAVES]);
ssn=alloca(strlen(sn)+3); ssn=alloca(strlen(sn)+3);
sprintf(ssn,sn,slotnum); sprintf(ssn,sn,slotnum);
gn=alloca(SAVE_NAME_SIZE); gn=alloca(SAVE_NAME_SIZE);
@ -794,7 +787,7 @@ extern char running_battle;
int load_game(int slotnum) int load_game(int slotnum)
{ {
char *sn,*ssn; char *ssn;
FILE *svf; FILE *svf;
int r,t; int r,t;
@ -803,7 +796,7 @@ int load_game(int slotnum)
battle=0; battle=0;
close_story_file(); close_story_file();
purge_temps(0); purge_temps(0);
concat(sn,pathtable[SR_SAVES],_SLOT_SAV); const char *sn = build_pathname(2, gpathtable[SR_SAVES], _SLOT_SAV);
ssn=alloca(strlen(sn)+3); ssn=alloca(strlen(sn)+3);
sprintf(ssn,sn,slotnum); sprintf(ssn,sn,slotnum);
svf=fopen_icase(ssn,"rb"); svf=fopen_icase(ssn,"rb");
@ -862,10 +855,10 @@ static ENUM_ALL_STATUS_CALLBACK_RESULT load_specific_file_callback(FILE *f, cons
static void load_specific_file(int slot_num,char *filename,void **out,int32_t *size) //call it in task! static void load_specific_file(int slot_num,char *filename,void **out,int32_t *size) //call it in task!
{ {
FILE *slot; FILE *slot;
char *c,*d; char *d;
concat(c,pathtable[SR_SAVES],_SLOT_SAV); const char *c = build_pathname(2, gpathtable[SR_SAVES], _SLOT_SAV);
d=alloca(strlen(c)+2); d=alloca(strlen(c)+6);
sprintf(d,c,slot_num); sprintf(d,c,slot_num);
slot=fopen_icase(d,"rb"); slot=fopen_icase(d,"rb");
if (slot==NULL) if (slot==NULL)
@ -908,10 +901,10 @@ static char load_mode;
void read_slot_list() void read_slot_list()
{ {
int i; int i;
char *mask,*name; char *name;
char slotname[SAVE_NAME_SIZE]; char slotname[SAVE_NAME_SIZE];
if (slot_list==NULL) slot_list=create_list(SLOTS_MAX); if (slot_list==NULL) slot_list=create_list(SLOTS_MAX);
concat(mask,pathtable[SR_SAVES],_SLOT_SAV); const char *mask = build_pathname(2, gpathtable[SR_SAVES],_SLOT_SAV);
name=alloca(strlen(mask)+1); name=alloca(strlen(mask)+1);
for(i=0;i<SLOTS_MAX;i++) for(i=0;i<SLOTS_MAX;i++)
{ {

View file

@ -1,8 +1,9 @@
#include "types.h" #include <libs/types.h>
#include "engine1.h" #include "engine1.h"
#include "temp_storage.h" #include "temp_storage.h"
#include <platform/config.h>
#include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
@ -267,7 +268,11 @@ static __inline int rangrnd(int a, int b) {return rnd(b-a+1)+a;}
#define concat(c,s1,s2) c=strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2) #define concat(c,s1,s2) c=strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2)
#define concat_r(c,s1,s2) strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2) #define local_strdup(c) strcpy((char *)strlen(c)+1, c)
#define concat2(s1,s2) strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+1),s1),s2)
#define concat3(s1,s2,s3) strcat(strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+strlen(s3)+1),s1),s2),s3)
#define concat4(s1,s2,s3,s4) strcat(strcat(strcat(strcpy((char *)alloca(strlen(s1)+strlen(s2)+strlen(s3)+strlen(s4)+1),s1),s2),s3),s4)
#define countof(array) (sizeof(array)/sizeof(array[0]))
#define get_ap(vls) (((vls[VLS_POHYB])>0 && (vls[VLS_POHYB])<15)?1:(vls[VLS_POHYB])/15) #define get_ap(vls) (((vls[VLS_POHYB])>0 && (vls[VLS_POHYB])<15)?1:(vls[VLS_POHYB])/15)
@ -319,7 +324,26 @@ static __inline int rangrnd(int a, int b) {return rnd(b-a+1)+a;}
#define MC_NOAUTOMAP 0x800 //nelze najit automapingem #define MC_NOAUTOMAP 0x800 //nelze najit automapingem
#define MC_NOSUMMON 0x1000 //nelze privolat hrace #define MC_NOSUMMON 0x1000 //nelze privolat hrace
//adresare
typedef enum skeldal_folders_tag {
SR_DATA,
SR_GRAFIKA,
SR_ZVUKY,
SR_FONT,
SR_MAP,
SR_MUSIC,
SR_BGRAFIKA,
SR_ITEMS,
SR_ENEMIES,
SR_VIDEO,
SR_DIALOGS,
SR_SAVES,
SR_WORK,
SR_CD,
SR_COUNT} SKELDAL_FOLDERS_TAG;
#if 0 //adresare
#define SR_DATA 0 #define SR_DATA 0
#define SR_GRAFIKA 1 #define SR_GRAFIKA 1
#define SR_ZVUKY 2 #define SR_ZVUKY 2
@ -336,6 +360,8 @@ static __inline int rangrnd(int a, int b) {return rnd(b-a+1)+a;}
#define SR_CD 14 #define SR_CD 14
#define SR_MAP2 15 #define SR_MAP2 15
#define SR_ORGMUSIC 16 #define SR_ORGMUSIC 16
#define SR_COUNT 17
#endif
//globalni cisla k casovacum //globalni cisla k casovacum
#define TM_BACK_MUSIC 1 #define TM_BACK_MUSIC 1
@ -529,7 +555,7 @@ extern int viewsector; //aktualni sektor vyhledu
extern int viewdir; //aktualni smer vyhledu extern int viewdir; //aktualni smer vyhledu
extern THE_TIMER timer_tree; //strom casovych udalosti extern THE_TIMER timer_tree; //strom casovych udalosti
extern D_ACTION *d_action; //spojovy seznam zpozdenych akci extern D_ACTION *d_action; //spojovy seznam zpozdenych akci
extern char *pathtable[]; //tabulka adresaru extern char *gpathtable[SR_COUNT]; //tabulka adresaru
extern char level_preload; //informace o preloadingu extern char level_preload; //informace o preloadingu
extern char **texty; //globalni tabulka textu extern char **texty; //globalni tabulka textu
extern char **level_texts; //lokalni tabulka textu extern char **level_texts; //lokalni tabulka textu
@ -665,7 +691,7 @@ void build_player_map(void); //je nutne volat po presunem postav
int postavy_propadnout(int sector); int postavy_propadnout(int sector);
void postavy_teleport_effect(int sector,int dir,int postava,char eff); void postavy_teleport_effect(int sector,int dir,int postava,char eff);
void reg_grafiku_postav(void); void reg_grafiku_postav(void);
void play_movie_seq(char *s,int y); void play_movie_seq(const char *s,int y);
void check_postavy_teleport(void); //je-li viewsector=teleport pak presune postavy void check_postavy_teleport(void); //je-li viewsector=teleport pak presune postavy
//builder //builder
@ -1664,11 +1690,9 @@ void check_global_fletna(THE_TIMER *t);
void fletna_glob_add_note(uint8_t note); void fletna_glob_add_note(uint8_t note);
char *find_map_path(const char *filename); //vyhledava jmeno mapy v alternativnich cestach. TMPFILE_RD *enc_open(const char *filename); //dekoduje a otevira TXT soubor (ENC)
//Vysledny retezec je nutne uvolnit (free) !
TMPFILE_RD *enc_open(char *filename); //dekoduje a otevira TXT soubor (ENC)
void enc_close(TMPFILE_RD *fil); void enc_close(TMPFILE_RD *fil);
int load_string_list_ex(char ***list,char *filename); int load_string_list_ex(char ***list,const char *filename);
int smlouvat_nakup(int cena,int ponuka,int posledni,int puvod,int pocet); int smlouvat_nakup(int cena,int ponuka,int posledni,int puvod,int pocet);
int smlouvat_prodej(int cena,int ponuka,int posledni,int puvod,int pocet); int smlouvat_prodej(int cena,int ponuka,int posledni,int puvod,int pocet);
@ -1694,7 +1718,7 @@ char enter_generator(void);
//kniha //kniha
#define add_to_book(odst) add_text_to_book(texty_knihy,odst) #define add_to_book(odst) add_text_to_book(texty_knihy,odst)
void add_text_to_book(char *filename,int odst); void add_text_to_book(const char *filename,int odst);
void write_book(int page); void write_book(int page);
int count_pages(void); int count_pages(void);
void save_book(void); void save_book(void);

View file

@ -1,23 +1,24 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <ctype.h> #include <ctype.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <string.h>
#include <unistd.h> #include <unistd.h>
#define GLOBMAP "GLOBMAP.DAT" #define GLOBMAP "GLOBMAP.DAT"
@ -164,7 +165,7 @@ static int cti_retezec(int znaku,char *text,char mezera,char upcase)
return 0; return 0;
} }
static void error(char *text) static void error(const char *text)
{ {
char popis[300]; char popis[300];
@ -325,12 +326,10 @@ static char proved_prikaz()
break; break;
case OP_ESCAPE: case OP_ESCAPE:
{ {
char *s;
cti_retezec(20,prikaz,1,1); cti_retezec(20,prikaz,1,1);
fclose(glbm); fclose(glbm);
s=find_map_path(prikaz); const char *s = build_pathname(2, gpathtable[SR_MAP], prikaz);
if ((glbm=fopen_icase(s,"r"))==NULL) error(s); if ((glbm=fopen_icase(s,"r"))==NULL) error(s);
free(s);
return 0; return 0;
} }
default:error(prikaz); default:error(prikaz);
@ -370,13 +369,12 @@ static void preskoc_prikaz(void)
static void do_script(void) static void do_script(void)
{ {
char *s;
char vysledek; char vysledek;
s=find_map_path(GLOBMAP); const char *s=build_pathname(2,gpathtable[SR_MAP], GLOBMAP);
linecounter=0; linecounter=0;
glbm=fopen_icase(s,"r"); glbm=fopen_icase(s,"r");
free(s);
if (glbm==NULL) error("Chyb<EFBFBD> uveden<65> soubor..."); if (glbm==NULL) error("Chyb<EFBFBD> uveden<65> soubor...");
ODD=cti_oddelovac(); ODD=cti_oddelovac();
do do

View file

@ -1,26 +1,26 @@
#include <platform.h> #include <platform/platform.h>
#include <bios.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <mem.h>
#include <pcx.h> #include <libs/pcx.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <memman.h> #include <libs/memman.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include <ctype.h> #include <ctype.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <time.h> #include <time.h>
#include <mgfplay.h> #include <libs/mgfplay.h>
#include <wav.h> #include <libs/wav.h>
#include <fcntl.h> #include <fcntl.h>
#include "globals.h" #include "globals.h"
#include "engine1.h" #include "engine1.h"
@ -1318,21 +1318,6 @@ void check_global_fletna(THE_TIMER *t)
//--------------------------------------- //---------------------------------------
char *find_map_path(const char *filename)
{
char *p1,*p;
if (pathtable[SR_MAP2]!=NULL)
{
concat(p1,pathtable[SR_MAP2],filename);
if (check_file_exists(p1)) goto found;
}
concat(p1,pathtable[SR_MAP],filename);
found:
p=NewArr(char,strlen(p1)+1);
strcpy(p,p1);
return p;
}
static char *load_file_to_string(FILE *f, int *size) { static char *load_file_to_string(FILE *f, int *size) {
fseek(f,0, SEEK_END); fseek(f,0, SEEK_END);
@ -1345,7 +1330,7 @@ static char *load_file_to_string(FILE *f, int *size) {
return c; return c;
} }
TMPFILE_RD *enc_open(char *filename) TMPFILE_RD *enc_open(const char *filename)
{ {
FILE *f; FILE *f;
char *c,*enc; char *c,*enc;
@ -1384,7 +1369,7 @@ void enc_close(TMPFILE_RD *fil)
} }
int load_string_list_ex(TSTR_LIST *list,char *filename) int load_string_list_ex(TSTR_LIST *list,const char *filename)
{ {
char c[1024],*p; char c[1024],*p;
int i,j,lin=0; int i,j,lin=0;
@ -1564,7 +1549,6 @@ typedef struct _hicolpal
void show_jrc_logo(char *filename) void show_jrc_logo(char *filename)
{ {
char *s;
char *pcx;word *pcxw; char *pcx;word *pcxw;
char bnk=1; char bnk=1;
int xp,yp,i; int xp,yp,i;
@ -1574,7 +1558,7 @@ void show_jrc_logo(char *filename)
change_music("?"); change_music("?");
curcolor=0;bar32(0,0,639,479); curcolor=0;bar32(0,0,639,479);
showview(0,0,0,0);sleep_ms(1000); showview(0,0,0,0);sleep_ms(1000);
concat(s,pathtable[SR_VIDEO],filename); const char *s = build_pathname(2, gpathtable[SR_VIDEO],filename);
if (open_pcx(s,A_8BIT,&pcx)) return; if (open_pcx(s,A_8BIT,&pcx)) return;
pcxw=(word *)pcx; pcxw=(word *)pcx;
xp=pcxw[0]; xp=pcxw[0];

View file

@ -1,25 +1,26 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include <assert.h> #include <assert.h>
#include <stddef.h> #include <stddef.h>
#include <string.h>
#define neprezbrojit() (battle && (battle_mode!=MD_PREZBROJIT || select_player!=human_selected-postavy)) #define neprezbrojit() (battle && (battle_mode!=MD_PREZBROJIT || select_player!=human_selected-postavy))
@ -162,7 +163,7 @@ static void items_15to16_correct(void **p,int32_t *s)
void load_items() void load_items()
{ {
char *name; const char *name;
FILE *f; FILE *f;
int sect,i,hs; int sect,i,hs;
int32_t size; int32_t size;
@ -180,8 +181,8 @@ void load_items()
break; break;
} }
} while (1); } while (1);
name=find_map_path(ITEM_FILE); name=build_pathname(2, gpathtable[SR_MAP],ITEM_FILE);
f=fopen_icase(name,"rb");free(name); f=fopen_icase(name,"rb");
if (f==NULL) if (f==NULL)
{ {
closemode(); closemode();
@ -589,10 +590,8 @@ void do_items_specs(void)
if (p->popis[0]==0) add_to_book(p->user_value); if (p->popis[0]==0) add_to_book(p->user_value);
else else
{ {
char *s; const char *s = build_pathname(2, gpathtable[SR_MAP], p->popis);
s=find_map_path(p->popis);
add_text_to_book(s,p->user_value); add_text_to_book(s,p->user_value);
free(s);
} }
play_fx_at(FX_BOOK); play_fx_at(FX_BOOK);
if (game_extras & EX_AUTOOPENBOOK) autoopenaction=1; if (game_extras & EX_AUTOOPENBOOK) autoopenaction=1;
@ -1767,7 +1766,6 @@ char uloz_sip(int id,int xa,int ya,int xr,int yr)
static char MakeItemCombinations(short *itm1, short *itm2) static char MakeItemCombinations(short *itm1, short *itm2)
{ {
short i1=*itm1-1,i2=*itm2-1; short i1=*itm1-1,i2=*itm2-1;
char *fname;
int src1; int src1;
int src2; int src2;
int trg1; int trg1;
@ -1777,14 +1775,9 @@ static char MakeItemCombinations(short *itm1, short *itm2)
FILE *table; FILE *table;
concat(fname,pathtable[SR_MAP],"COMBITEM.DAT"); const char *fname = build_pathname(2,gpathtable[SR_MAP],"COMBITEM.DAT");
table=fopen_icase(fname,"r"); table=fopen_icase(fname,"r");
if (table==0 && pathtable[SR_MAP2][0]) if (table==NULL) return 0;
{
concat(fname,pathtable[SR_MAP2],fname);
table=fopen_icase(fname,"r");
}
if (table==0) return 0;
cnt=fscanf(table,"%d %d -> %d %d",&src1,&src2,&trg1,&trg2); cnt=fscanf(table,"%d %d -> %d %d",&src1,&src2,&trg1,&trg2);
while(cnt>=3) while(cnt>=3)
{ {

View file

@ -1,4 +1,4 @@
#include <platform.h> #include <platform/platform.h>
/* /*
Popis jazyka pro psani textu do knihy Popis jazyka pro psani textu do knihy
@ -43,10 +43,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <string.h> #include <string.h>
#include <strlite.h> #include <libs/strlite.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include "globals.h" #include "globals.h"
#define XMAX 254 #define XMAX 254
@ -550,7 +550,7 @@ static void seek_section(TMPFILE_RD *txt,int sect_number)
exit(1); exit(1);
} }
void add_text_to_book(char *filename,int odst) void add_text_to_book(const char *filename,int odst)
{ {
TMPFILE_RD *fl; TMPFILE_RD *fl;

View file

@ -1,19 +1,19 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <mem.h>
#include <mgifmem.h> #include <libs/mgifmem.h>
#include <event.h> #include <libs/event.h>
//#include <i86.h>
#include <math.h> #include <math.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <stdarg.h> #include <stdarg.h>
#include "engine1.h" #include "engine1.h"
#include "globals.h" #include "globals.h"
#include <string.h>
#define S_jmeno 128 #define S_jmeno 128
#define S_kouzlo 129 #define S_kouzlo 129

View file

@ -1,25 +1,26 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
#include "specproc.h" #include "specproc.h"
#include "temp_storage.h" #include "temp_storage.h"
#include <assert.h> #include <assert.h>
#include <string.h>
TMULTI_ACTION_RECORD *macros; //tabulka make TMULTI_ACTION_RECORD *macros; //tabulka make
TMULTI_ACTION_STATE macro_state_block; TMULTI_ACTION_STATE macro_state_block;
static const TMULTI_ACTION *first_macro; static const TMULTI_ACTION *first_macro;
@ -566,11 +567,9 @@ static int ma_picki(const TMA_TWOP *i,int abs_pos)
static void ma_wbook(const TMA_LOADLEV *l) static void ma_wbook(const TMA_LOADLEV *l)
{ {
char *s; const char *s = build_pathname(2, gpathtable[SR_MAP], l->name);
s=find_map_path(l->name);
add_text_to_book(s,l->start_pos); add_text_to_book(s,l->start_pos);
play_fx_at(FX_BOOK); play_fx_at(FX_BOOK);
free(s);
} }
static void ma_send_experience(int32_t what) static void ma_send_experience(int32_t what)
@ -634,10 +633,10 @@ static void build_trig_group(char mode,int side)
static int ma_play_anim(const char *filename,char cls) static int ma_play_anim(const char *filename,char cls)
{ {
char *a;
unwire_main_functs(); unwire_main_functs();
concat(a,pathtable[SR_VIDEO],filename); const char *a = build_pathname(2, gpathtable[SR_VIDEO],filename);
curcolor=0; curcolor=0;
if (cls) if (cls)
{ {

View file

@ -1,21 +1,21 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <event.h> #include <libs/event.h>
#include <memman.h> #include <libs/memman.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include <stdarg.h> #include <stdarg.h>
#include "engine1.h" #include "engine1.h"
#include <pcx.h> #include <libs/pcx.h>
#include "globals.h" #include "globals.h"
@ -368,21 +368,23 @@ char *get_next_title(signed char control,char *filename)
static TMPFILE_RD *titles=NULL; static TMPFILE_RD *titles=NULL;
static char buffer[81]; static char buffer[81];
char *path,*c; char *c;
const char *path;
switch(control) switch(control)
{ {
case 1:concat(path,pathtable[SR_MAP],filename); case 1:
path = local_strdup(build_pathname(2, gpathtable[SR_MAP],filename));
titles=enc_open(path); titles=enc_open(path);
if (titles==NULL) if (titles==NULL)
{ {
concat(path,pathtable[SR_DATA],filename); const char *path2 = local_strdup(build_pathname(2, gpathtable[SR_DATA],filename));
titles=enc_open(path); titles=enc_open(path2);
if (titles==NULL) if (titles==NULL)
{ {
char popis[300]; char popis[300];
closemode(); closemode();
sprintf(popis,"Soubor nenalezen: %s%s nebo %s%s\n",pathtable[SR_MAP],filename,pathtable[SR_DATA],filename); sprintf(popis,"Soubor nenalezen: %s nebo %s\n",path,path2);
display_error(popis); display_error(popis);
exit(1); exit(1);
} }

View file

@ -1,24 +1,25 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <math.h> #include <math.h>
#include <bios.h>
#include <mem.h>
#include <types.h>
#include <event.h>
#include <memman.h>
#include <devices.h>
#include <bmouse.h>
#include <bgraph.h>
#include <zvuk.h>
#include <strlite.h>
#include "engine1.h"
#include <pcx.h>
#include "globals.h"
#include "inicfg.h"
#include <libs/types.h>
#include <libs/event.h>
#include <libs/memman.h>
#include <libs/devices.h>
#include <libs/bmouse.h>
#include <libs/bgraph.h>
#include <libs/zvuk.h>
#include <libs/strlite.h>
#include "engine1.h"
#include <libs/pcx.h>
#include "globals.h"
#include <libs/inicfg.h>
#include <string.h>
#define A_OPEN_DOOR 1 #define A_OPEN_DOOR 1
#define A_CLOSE_DOOR 2 #define A_CLOSE_DOOR 2
@ -141,16 +142,15 @@ void preload_objects(int ofsts)
{ {
int i; int i;
char lodka=1; char lodka=1;
char c[200];
for(i=1;i<mapsize;i++) if (map_sectors[i].sector_type==S_LODKA) break; for(i=1;i<mapsize;i++) if (map_sectors[i].sector_type==S_LODKA) break;
if (i==mapsize) lodka=0; if (i==mapsize) lodka=0;
sprintf(c,"%sLOADING.MUS",pathtable[SR_WORK]); // const char *c = build_pathname(2, pathname[SR_DATA], "LOADING.MUS");
// change_music(c); // change_music(c);
trans_bar(0,460,640,20,0); trans_bar(0,460,640,20,0);
position(0,460); position(0,460);
set_font(H_FBOLD,RGB555(0,31,0)); set_font(H_FBOLD,RGB555(0,31,0));
sprintf(c,texty[TX_LOAD],mglob.mapname); const char *c = concat2(texty[TX_LOAD], mglob.mapname);
outtext(c); outtext(c);
for(i=0;i<ofsts;i++) for(i=0;i<ofsts;i++)
{ {
@ -165,7 +165,7 @@ void preload_objects(int ofsts)
*/ */
} }
int load_level_texts(char *filename) int load_level_texts(const char *filename)
{ {
int err; int err;
@ -174,21 +174,26 @@ int load_level_texts(char *filename)
return err; return err;
} }
char *pripona(char *filename,char *pripona) char *change_extension_support(char *buffer, const char *filename,char *new_extension)
{ {
char *buff; strcpy(buffer, filename);
char *c; char *sep = buffer;
char *c = buffer;
while (*c) {
if (*c == '/' || *c == '\\') {
sep = c;
}
++c;
}
buff=getmem(strlen(filename)+strlen(pripona)+2); char *dot = strchr(sep, '.');
strcpy(buff,filename); if (dot == NULL) strcat(buffer, new_extension);
c=strrchr(buff,PATH_SEPARATOR_CHR); else strcpy(dot, new_extension);
if (c==NULL) c=buff; return buffer;
c=strchr(c,'.');
if (c!=NULL) *c=0;
strcat(buff,pripona);
return buff;
} }
#define set_file_extension(filename, extension) change_extension_support((char *)alloca(strlen(filename)+strlen(extension)), (filename), (extension))
void show_loading_picture(char *filename) void show_loading_picture(char *filename)
{ {
void *p; void *p;
@ -214,19 +219,18 @@ int load_map(char *filename)
int32_t size,r; int32_t size,r;
char nmapend=1; char nmapend=1;
int ofsts=START_HANDLE; int ofsts=START_HANDLE;
char *c,*d;
char snd_load=0; char snd_load=0;
void *mob_template; void *mob_template;
int32_t mob_size; int32_t mob_size;
int suc; int suc;
map_with_password=0; map_with_password=0;
c=find_map_path(filename); const char *mpath = build_pathname(2, gpathtable[SR_MAP], filename);
schovej_mysku(); schovej_mysku();
if (level_preload) show_loading_picture("LOADING.HI"); if (level_preload) show_loading_picture("LOADING.HI");
change_music("?"); change_music("?");
zobraz_mysku(); zobraz_mysku();
f=fopen_icase(c,"rb"); f=fopen_icase(mpath,"rb");
if (level_fname!=NULL) free(level_fname); if (level_fname!=NULL) free(level_fname);
level_fname=(char *)getmem(strlen(filename)+1); level_fname=(char *)getmem(strlen(filename)+1);
strcpy(level_fname,filename); strcpy(level_fname,filename);
@ -367,9 +371,8 @@ int load_map(char *filename)
memset(minimap,0,sizeof(minimap)); memset(minimap,0,sizeof(minimap));
if (level_preload) preload_objects(ofsts); if (level_preload) preload_objects(ofsts);
end_ptr=ofsts; end_ptr=ofsts;
d=pripona(c,".TXT"); const char *tpath=set_file_extension(mpath,".txt");
free(c); suc=load_level_texts(tpath);
suc=load_level_texts(d);free(d);
if (!suc && level_texts!=NULL) create_playlist(level_texts[0]); if (!suc && level_texts!=NULL) create_playlist(level_texts[0]);
init_tracks(); init_tracks();
change_music(get_next_music_from_playlist()); change_music(get_next_music_from_playlist());

View file

@ -1,23 +1,24 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
#include <bios.h>
#include <mem.h>
#include <types.h>
#include <event.h>
#include <memman.h>
#include <devices.h>
#include <bmouse.h>
#include <bgraph.h>
#include <zvuk.h>
#include <strlite.h>
#include "engine1.h"
#include <pcx.h>
#include "globals.h"
#include <gui.h>
#include <basicobj.h>
#include <libs/types.h>
#include <libs/event.h>
#include <libs/memman.h>
#include <libs/devices.h>
#include <libs/bmouse.h>
#include <libs/bgraph.h>
#include <libs/zvuk.h>
#include <libs/strlite.h>
#include "engine1.h"
#include <libs/pcx.h>
#include "globals.h"
#include <libs/gui.h>
#include <libs/basicobj.h>
#include <string.h>
extern char enable_sort; extern char enable_sort;
extern char autoattack; extern char autoattack;

View file

@ -1,34 +1,34 @@
#include <platform.h> #include <platform/platform.h>
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#include <bios.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <mem.h>
#include <pcx.h> #include <libs/pcx.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <memman.h> #include <libs/memman.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <time.h> #include <time.h>
#include <mgfplay.h> #include <libs/mgfplay.h>
#include <doserr.h> #include <libs/inicfg.h>
#include <inicfg.h>
#include "globals.h" #include "globals.h"
#include "engine1.h" #include "engine1.h"
#include "wizard.h" #include "wizard.h"
#include "version.h" #include "version.h"
#include "default_font.h" #include "default_font.h"
#include "advconfig.h"
#include <unistd.h> #include <unistd.h>
#define CONFIG_NAME SKELDALINI #define CONFIG_NAME SKELDALINI
@ -36,25 +36,7 @@
#define INI_INT 2 #define INI_INT 2
#define ERR_GENERAL 1 #define ERR_GENERAL 1
char def_path[]=""; char *gpathtable[SR_COUNT];
char graph_path[]="graphics" PATH_SEPARATOR;
char basc_graph[]="graphics" PATH_SEPARATOR "basic" PATH_SEPARATOR;
char item_graph[]="graphics" PATH_SEPARATOR "items" PATH_SEPARATOR;
char sample_path[]="samples" PATH_SEPARATOR;
char font_path[]="font" PATH_SEPARATOR;
char map_path[]="maps" PATH_SEPARATOR;
char music_path[]="music" PATH_SEPARATOR;
char org_music_path[]="music" PATH_SEPARATOR;
char temp_path[]="?";
char enemies_path[]="graphics" PATH_SEPARATOR "enemies" PATH_SEPARATOR;
char video_path[]="video" PATH_SEPARATOR;
char dialogs_path[]="graphics" PATH_SEPARATOR "dialogs" PATH_SEPARATOR;
char saves_path[]="";
char work_path[]="";
char cd_path[]="";
char map2_path[]="";
char plugins_path[]="";
char *pathtable[]={def_path,graph_path,sample_path,font_path,map_path,music_path,temp_path,basc_graph,item_graph,enemies_path,video_path,dialogs_path,saves_path,work_path,cd_path,map2_path,plugins_path,org_music_path};
/* /*
char *pathtable[]= char *pathtable[]=
@ -868,9 +850,9 @@ void reg_grafiku_postav(void)
void cti_texty(void) void cti_texty(void)
{ {
char path[80];int err; int err;
texty=(TSTR_LIST)create_list(4); texty=(TSTR_LIST)create_list(4);
sprintf(path,"%s%s",pathtable[SR_DATA],TEXTY); const char *path = build_pathname(2,gpathtable[SR_DATA], TEXTY);
if ((err=load_string_list_ex(&texty,path))!=0) if ((err=load_string_list_ex(&texty,path))!=0)
{ {
char buff[256]; char buff[256];
@ -1005,9 +987,8 @@ static void patch_error(int err)
showview(0,460,640,20); showview(0,460,640,20);
} }
void init_skeldal(void) void init_skeldal(const INI_CONFIG *cfg)
{ {
char c[MAX_FILESYSTEM_PATH],d[MAX_FILESYSTEM_PATH];
int verr; int verr;
boldcz=LoadDefaultFont(); boldcz=LoadDefaultFont();
@ -1032,11 +1013,11 @@ void init_skeldal(void)
/* /*
install_dos_error(device_error,(char *)getmem(4096)+4096);*/ install_dos_error(device_error,(char *)getmem(4096)+4096);*/
swap_error=swap_error_exception; swap_error=swap_error_exception;
snprintf(d,sizeof(d),"%s%s",pathtable[SR_DATA],"SKELDAL.DDL"); const char *ddlfile = local_strdup(build_pathname(2, gpathtable[SR_DATA],"SKELDAL.DDL"));
init_manager(d,c); init_manager(ddlfile, NULL);
SEND_LOG("(GAME) Memory manager initialized. Using DDL: '%s' Temp dir: '%s'",d,c); SEND_LOG("(GAME) Memory manager initialized. Using DDL: '%s'",ddlfile);
texty_knihy=find_map_path("kniha.txt"); texty_knihy=strdup(build_pathname(2,gpathtable[SR_MAP],"kniha.txt"));
install_gui(); install_gui();
@ -1202,6 +1183,7 @@ void enter_game(void)
parm[ebx] value [eax] parm[ebx] value [eax]
*/ */
/*
static int do_config_skeldal(int num,int numdata,char *txt) static int do_config_skeldal(int num,int numdata,char *txt)
{ {
switch (num) switch (num)
@ -1241,16 +1223,15 @@ static int do_config_skeldal(int num,int numdata,char *txt)
break; break;
case 26:refresh=numdata;break; case 26:refresh=numdata;break;
default:num-=CESTY_POS; default:num-=CESTY_POS;
mman_pathlist[num]=(char *)getmem(strlen(txt)+1); gpathtable[num] = strdup(txt);
strcpy(mman_pathlist[num],txt);
SEND_LOG("(GAME) Directory '%s' has been assigned to group nb. %d",txt,num); SEND_LOG("(GAME) Directory '%s' has been assigned to group nb. %d",txt,num);
break; break;
} }
return 0; return 0;
} }
*/
/*
static void config_skeldal(const char *line) static void config_skeldal(const char *line)
{ {
int ndata=0,i,maxi; int ndata=0,i,maxi;
@ -1289,7 +1270,8 @@ static void config_skeldal(const char *line)
do_config_skeldal(i,ndata,data); do_config_skeldal(i,ndata,data);
} }
} }
*/
/*
static void configure(char *filename) static void configure(char *filename)
{ {
SEND_LOG("(GAME) Reading config. file '%s'",filename); SEND_LOG("(GAME) Reading config. file '%s'",filename);
@ -1307,7 +1289,7 @@ static void configure(char *filename)
process_ini(cur_config,config_skeldal); process_ini(cur_config,config_skeldal);
} }
*/
static int update_config(void) static int update_config(void)
{ {
SEND_LOG("(GAME) Updating config. file '%s'",CONFIG_NAME); SEND_LOG("(GAME) Updating config. file '%s'",CONFIG_NAME);
@ -1339,7 +1321,7 @@ void set_verify(char state);
"mov ah,2eh"\ "mov ah,2eh"\
"int 21h" "int 21h"
*/ */
void play_movie_seq(char *s,int y) void play_movie_seq(const char *s,int y)
{ {
int hic=full_video?SMD_HICOLOR+128:SMD_HICOLOR,cc=full_video?SMD_256+128:SMD_256; int hic=full_video?SMD_HICOLOR+128:SMD_HICOLOR,cc=full_video?SMD_256+128:SMD_256;
word *lbuffer=GetScreenAdr(); word *lbuffer=GetScreenAdr();
@ -1364,10 +1346,9 @@ void play_movie_seq(char *s,int y)
void play_anim(int anim_num) void play_anim(int anim_num)
{ {
char *s;
char *t,*z; char *t,*z;
TSTR_LIST titl=NULL; TSTR_LIST titl=NULL;
concat(s,pathtable[SR_VIDEO],texty[anim_num]); const char *s = build_pathname(2,gpathtable[SR_VIDEO], texty[anim_num]);
if (snd_devnum==DEV_NOSOUND || titles_on) if (snd_devnum==DEV_NOSOUND || titles_on)
{ {
concat(t,s," "); concat(t,s," ");
@ -1663,6 +1644,7 @@ static void start(va_list args)
while (!exit_wait); while (!exit_wait);
} }
#if 0
static void start_from_mapedit(va_list args) static void start_from_mapedit(va_list args)
//#pragma aux start_from_mapedit parm[] //#pragma aux start_from_mapedit parm[]
{ {
@ -1671,6 +1653,7 @@ static void start_from_mapedit(va_list args)
new_game(argc-1,argv+1); new_game(argc-1,argv+1);
exit_wait=1; exit_wait=1;
} }
#endif
void disable_intro(void) void disable_intro(void)
{ {
@ -1679,64 +1662,42 @@ void disable_intro(void)
} }
void new_configure(const INI_CONFIG *) {
}
int main(int argc,char *argv[]) int main(int argc,char *argv[])
{ {
char *c,rm; def_mman_group_table(gpathtable);
if (argc>=3) rm=!strcmp(argv[1],"12345678");else rm=0;
argv;
c=getcwd(NULL,0);
pathtable[SR_SAVES]=getmem(strlen(c)+2);
strcpy(pathtable[SR_SAVES],c);
strcat(pathtable[SR_SAVES],PATH_SEPARATOR);
free(c);
// set_verify(0);
mman_pathlist=pathtable;
zoom_speed(1); zoom_speed(1);
turn_speed(1); turn_speed(1);
configure(CONFIG_NAME);
if ((argc>=2 ) && !rm )
{
char *adventure;
char **config=cur_config;
const char *music = mman_pathlist[SR_MUSIC]; INI_CONFIG *cfg = ini_open(CONFIG_NAME);
mman_pathlist[SR_ORGMUSIC]=(char *)getmem(strlen(music)+1); if (cfg == NULL) {
strcpy(mman_pathlist[SR_ORGMUSIC],music); fprintf(stderr, "Failed to open configuration file: %s\n", CONFIG_NAME);
return 1;
}
if (argc >= 2) {
TSTR_LIST adv_config=read_config(argv[1]);;
adv_patch_config(cfg, adv_config);
release_list(adv_config);
}
new_configure(cfg);
adventure=argv[1];
cur_config=NULL;
configure(adventure);
release_list(cur_config);
cur_config=config;
}
#ifdef LOGFILE
{
int i;
for(i=0;i<(int)(sizeof(pathtable)/sizeof(*pathtable));i++) SEND_LOG("(GAME) LOG: Using directory '%s' as '%s'",pathtable[i],sinit[i+CESTY_POS].heslo);
}
#endif
start_check(); start_check();
purge_temps(1); purge_temps(1);
// textmode_effekt(); // textmode_effekt();
clrscr(); clrscr();
init_skeldal(); init_skeldal(cfg);
//add_task(32768,check_number_1phase,argv[0]); //add_task(32768,check_number_1phase,argv[0]);
if (argc>=3 && rm)
{
add_task(65536,start_from_mapedit,argc,argv);
}
else
add_task(65536,start); add_task(65536,start);
/* position(200,200); /* position(200,200);
@ -1744,8 +1705,10 @@ int main(int argc,char *argv[])
outtext("Ahoj lidi"); outtext("Ahoj lidi");
showview(0,0,0,0);*/ showview(0,0,0,0);*/
escape(); escape();
update_config();
closemode(); closemode();
ini_close(cfg);
return 0; return 0;
} }

View file

@ -1,15 +1,16 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h>
#include <memman.h> #include <libs/memman.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <wav_mem.h> #include <libs/wav_mem.h>
#include <event.h> #include <libs/event.h>
#include "globals.h" #include "globals.h"
#include <math.h> #include <math.h>
#include <strlite.h> #include <libs/strlite.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#define PL_RANDOM 1 #define PL_RANDOM 1
#define PL_FORWARD 2 #define PL_FORWARD 2
@ -379,8 +380,6 @@ const char * end_of_song_callback(void *ctx) {
const char *get_next_music_from_playlist() const char *get_next_music_from_playlist()
{ {
int i,step; int i,step;
static char d[MAX_FILESYSTEM_PATH];
if (cur_playlist==NULL) return NULL; if (cur_playlist==NULL) return NULL;
if (!remain_play) if (!remain_play)
for(i=0;cur_playlist[i]!=NULL;remain_play++,i++) cur_playlist[i][0]=32; for(i=0;cur_playlist[i]!=NULL;remain_play++,i++) cur_playlist[i][0]=32;
@ -397,12 +396,9 @@ const char *get_next_music_from_playlist()
} }
while (step); while (step);
playing_track=i; playing_track=i;
snprintf(d,sizeof(d),"%s%s",pathtable[SR_MUSIC],cur_playlist[i]+1); const char *d = build_pathname(2, gpathtable[SR_MUSIC], cur_playlist[i]+1);
if (!check_file_exists(d)) { if (!check_file_exists(d)) {
snprintf(d,sizeof(d),"%s%s",pathtable[SR_ORGMUSIC],cur_playlist[i]+1); return NULL;
if (!check_file_exists(d)) {
return NULL;
}
} }
cur_playlist[i][0]=33; cur_playlist[i][0]=33;
remain_play--; remain_play--;

View file

@ -1,17 +1,18 @@
#include <platform.h> #include <platform/platform.h>
#include <bios.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <event.h> #include <libs/event.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <memman.h> #include <libs/memman.h>
#include <math.h> #include <math.h>
#include "globals.h" #include "globals.h"
#include <string.h>
#define PRG_COLOR RGB555(0,31,31) #define PRG_COLOR RGB555(0,31,31)
#define PRG_HELP_COLOR RGB555(31,31,0) #define PRG_HELP_COLOR RGB555(31,31,0)

View file

@ -1,13 +1,13 @@
//Toto je hlavni soubor specialnich procedur pro hru BRANY SKELDALU //Toto je hlavni soubor specialnich procedur pro hru BRANY SKELDALU
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <event.h> #include <libs/event.h>
#include <strlite.h> #include <libs/strlite.h>
#include "bgraph.h" #include <libs/bgraph.h>
#include "globals.h" #include "globals.h"
#include "specproc.h" #include "specproc.h"
#include "bmouse.h" #include <libs/bmouse.h>
#include <math.h> #include <math.h>
//#include "i86.h" //#include "i86.h"

View file

@ -1,9 +1,9 @@
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <graph.h> #include <graph.h>
#include <mem.h>
#include <conio.h> #include <conio.h>
#include <bios.h>
#define EVENT_MSG int32_t #define EVENT_MSG int32_t
#include "globals.h" #include "globals.h"
#include <memman.c> #include <memman.c>

View file

@ -1,21 +1,21 @@
#include <platform.h> #include <platform/platform.h>
#include <bios.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <mem.h>
#include <types.h> #include <libs/types.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <event.h> #include <libs/event.h>
#include <devices.h> #include <libs/devices.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <memman.h> #include <libs/memman.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <strlite.h> #include <libs/strlite.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <time.h> #include <time.h>
#include <stdarg.h> #include <stdarg.h>
#include "globals.h" #include "globals.h"

View file

@ -1,29 +1,29 @@
#include <process.h> #include <process.h>
#include <types.h> #include <libs/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <mem.h> #include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <pcx.h> #include <libs/pcx.h>
#include <memman.h> #include <libs/memman.h>
#include <event.h> #include <libs/event.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <io.h> #include <io.h>
#include <conio.h> #include <conio.h>
#include <graph.h> #include <graph.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <strlists.h> #include <strlists.h>
#include <strlite.h> #include <libs/strlite.h>
#include <direct.h> #include <direct.h>
#include <dos.h> #include <dos.h>
#include <vesa.h> #include <vesa.h>
#include <doserr.h> #include <doserr.h>
#include <zvuk.h> #include <libs/zvuk.h>
#include <inicfg.h> #include <libs/inicfg.h>
#include "setup.h" #include "setup.h"
#include "setvideo.h" #include "setvideo.h"
#include "setuplib.h" #include "setuplib.h"

View file

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <memman.h> #include <libs/memman.h>
#include <string.h> #include <string.h>
#include "setupcpy.h" #include "setupcpy.h"

View file

@ -1,20 +1,20 @@
#include <types.h> #include <libs/types.h>
#include <ctype.h> #include <ctype.h>
#include <io.h> #include <io.h>
#include <dos.h> #include <dos.h>
#include <malloc.h> #include <malloc.h>
#include <direct.h> #include <direct.h>
#include <memman.h> #include <libs/memman.h>
#include <string.h> #include <string.h>
#include <event.h> #include <libs/event.h>
#include <strlite.h> #include <libs/strlite.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <vesa.h> #include <vesa.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include "setuplib.h" #include "setuplib.h"
#include "setupcpy.h" #include "setupcpy.h"
#include "setup.h" #include "setup.h"

View file

@ -1,14 +1,14 @@
#include <types.h> #include <libs/types.h>
#include <vesa.h> #include <vesa.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h> #include <mem.h>
#include <stdio.h> #include <stdio.h>
#include <bgraph.h> #include <libs/bgraph.h>
#include <bmouse.h> #include <libs/bmouse.h>
#include <devices.h> #include <libs/devices.h>
#include <gui.h> #include <libs/gui.h>
#include <basicobj.h> #include <libs/basicobj.h>
#include <strlite.h> #include <libs/strlite.h>
#include <strlists.h> #include <strlists.h>
#include "setup.h" #include "setup.h"

View file

@ -1,9 +1,8 @@
#include <platform.h> #include <platform/platform.h>
// toto je include soubor, jenz je pouzit v knihovne GUI.C // toto je include soubor, jenz je pouzit v knihovne GUI.C
#include "types.h" #include "types.h"
#include <stdio.h> #include <stdio.h>
#include <mem.h>
#include <malloc.h> #include <malloc.h>
#include <time.h> #include <time.h>
#include "memman.h" #include "memman.h"
@ -14,6 +13,7 @@
#include "gui.h" #include "gui.h"
#include "basicobj.h" #include "basicobj.h"
#include <stdarg.h> #include <stdarg.h>
#include <string.h>
#define MEMTEXT "Pam<61>t: " #define MEMTEXT "Pam<61>t: "

View file

@ -2,7 +2,7 @@
//#include <vesa.h> //#include <vesa.h>
#include <dpmi.h> #include <dpmi.h>
#include <i86.h> #include <i86.h>
#include <mem.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <malloc.h>
#include <graph.h> #include <graph.h>
@ -35,7 +35,7 @@ void position(word x,word y)
writepos=getadr32(x,y); writepos=getadr32(x,y);
} }
void outtext(char *text) void outtext(const char *text)
{ {
byte pos; byte pos;

View file

@ -97,7 +97,7 @@ void redrawbox16(word xs,word ys,void *screen,void *lbuffer,byte *xlat);
void showview32(word x,word y,word xs,word ys); void showview32(word x,word y,word xs,word ys);
void showview256(word x,word y,word xs,word ys); void showview256(word x,word y,word xs,word ys);
void showview_lo(word x,word y,word xs,word ys); void showview_lo(word x,word y,word xs,word ys);
void outtext(char *text); void outtext(const char *text);
int initmode_dx(char inwindow, char zoom, char monitor, int refresh); int initmode_dx(char inwindow, char zoom, char monitor, int refresh);
int initmode32(void); int initmode32(void);
int initmode32b(void); int initmode32b(void);
@ -111,7 +111,6 @@ void *create_hixlat(void);
void closemode(void); void closemode(void);
void line32(word x1,word y1, word x2, word y2); void line32(word x1,word y1, word x2, word y2);
void position(word x,word y); void position(word x,word y);
void outtext(char *text);
void show_ms_cursor(integer x,integer y); void show_ms_cursor(integer x,integer y);
void *register_ms_cursor(void *cursor); void *register_ms_cursor(void *cursor);
void move_ms_cursor(integer newx,integer newy,char nodraw); void move_ms_cursor(integer newx,integer newy,char nodraw);

View file

@ -1,13 +1,8 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include "types.h"
//#include <vesa.h>
//#include <dpmi.h>
//#include <i86.h>
#include <mem.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h> #include <malloc.h>
//#include <graph.h>
#include "bgraph.h" #include "bgraph.h"
#include "memman.h" #include "memman.h"
@ -55,7 +50,7 @@ void rel_position_x(word x)
} }
void outtext(char *text) void outtext(const char *text)
{ {
byte pos; byte pos;

View file

@ -1,4 +1,4 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include "types.h"
#include "bgraph.h" #include "bgraph.h"

View file

@ -1,4 +1,4 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include "types.h"
#include "bgraph.h" #include "bgraph.h"
#include <debug.h> #include <debug.h>

View file

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h>
#include "memman.h" #include "memman.h"
#include "pcx.h" #include "pcx.h"

View file

@ -1,4 +1,4 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include "types.h"
#include "bgraph.h" #include "bgraph.h"
#include "event.h" #include "event.h"

View file

@ -1,7 +1,6 @@
#include <platform.h> #include <platform/platform.h>
#include "types.h" #include "types.h"
#include <stdio.h> #include <stdio.h>
#include <bios.h>
#include "event.h" #include "event.h"
#include "devices.h" #include "devices.h"
#include <time.h> #include <time.h>

View file

@ -1,8 +1,8 @@
#include "types.h" #include "types.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h>
#include <bios.h>
#include "memman.h" #include "memman.h"
#include "bgraph.h" #include "bgraph.h"

View file

@ -1,5 +1,5 @@
#include <dos.h> #include <dos.h>
#include <bios.h>
#include <stdio.h> #include <stdio.h>
#include <conio.h> #include <conio.h>
#include <malloc.h> #include <malloc.h>

View file

@ -1,19 +1,16 @@
#include <platform.h> #include <platform/platform.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "types.h" #include "types.h"
#include "event.h" #include "event.h"
#include "devices.h" #include "devices.h"
#include <mem.h>
//#include <dpmi.h>
#include <malloc.h> #include <malloc.h>
#include <bios.h>
//#include <i86.h>
#include <time.h> #include <time.h>
#include "memman.h" #include "memman.h"
#include <setjmp.h> #include <setjmp.h>
#include <signal.h> #include <signal.h>
#include <assert.h> #include <assert.h>
#include <string.h>
#define find_event_msg(where,what,res) \ #define find_event_msg(where,what,res) \

View file

@ -133,7 +133,7 @@ static __inline void shift_message(EVENT_MSG *msg) {
void do_events(void); void do_events(void);
void escape(void); void escape(void);
#include <legacy_coroutines.h> #include <platform/legacy_coroutines.h>
/* /*
void *task_sleep(void *param); void *task_sleep(void *param);
//#pragma aux task_sleep parm [eax] value [eax] //#pragma aux task_sleep parm [eax] value [eax]

View file

@ -1,6 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <mem.h>
#include "memman.h" #include "memman.h"
void help() void help()

View file

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <event.h> #include <libs/event.h>
#define LOAD_BUFFER 4096 #define LOAD_BUFFER 4096

Some files were not shown because too many files have changed in this diff Show more