summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMakefile36
-rwxr-xr-xMegamanX5/Makefile8
-rwxr-xr-xToD/Makefile8
-rwxr-xr-xVP/Makefile20
-rw-r--r--VP/main_dump.cpp2
-rw-r--r--Xenogears/Decrypt.cpp9
-rwxr-xr-xXenogears/Makefile26
-rw-r--r--Xenogears/main_dump.cpp3
-rw-r--r--Xenogears/script-comp.cpp2
-rw-r--r--Xenogears/script-dec.cpp2
-rw-r--r--includes/cdreader.h2
-rw-r--r--includes/gettext.h58
-rw-r--r--includes/lzss.h14
-rwxr-xr-xlib/Makefile4
-rw-r--r--lib/dteutils.cpp2
-rw-r--r--lib/lzss.cpp30
-rw-r--r--lzss-main.cpp4
-rw-r--r--psxdev/Makefile2
-rw-r--r--str-player.cpp8
-rw-r--r--tile-convert.cpp5
20 files changed, 157 insertions, 88 deletions
diff --git a/Makefile b/Makefile
index 0582435..7420f0b 100755
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,19 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -Werror -Iincludes `sdl-config --cflags` -DHAVE_ZLIB
-LDFLAGS=-lz `sdl-config --libs`
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -Iincludes `sdl-config --cflags` -DHAVE_ZLIB `baltisot-config --cflags`
+LDFLAGS=-lz `sdl-config --libs` `baltisot-config --libs`
CXX=g++
-SUBDIRS = psxdev generic lib Xenogears VP MegamanX5 ToD
-TARGET = lzss dlzss cd-tool str-player crypto-search bgrep dte-tool tile-convert
+SUBDIRS = psxdev lib Xenogears VP MegamanX5
+TARGET = lzss dlzss cd-tool str-player crypto-search bgrep tile-convert
all: subdirs ${TARGET}
subdirs:
for d in ${SUBDIRS} ; do make -C $$d || exit -1 ; done
-lzss: includes/lzss.h includes/generic.h lzss-main.o generic/generic.a lib/lib.a Makefile
- ${CXX} -DLZSS_MAIN lzss-main.o lib/lib.a generic/generic.a -o lzss ${LDFLAGS}
+lzss: includes/lzss.h lzss-main.o lib/lib.a Makefile
+ ${CXX} -DLZSS_MAIN lzss-main.o lib/lib.a -o lzss ${LDFLAGS}
dlzss: lzss Makefile
ln -fs lzss dlzss
@@ -21,23 +21,23 @@ dlzss: lzss Makefile
yazedc: yazedc-main.o lib/lib.a Makefile
${CXX} yazedc-main.o lib/lib.a -DYAZEDC_MAIN -o yazedc ${LDFLAGS}
-cd-tool: includes/cdutils.h includes/generic.h includes/yazedc.h cd-tool.o lib/lib.a generic/generic.a Makefile
- ${CXX} cd-tool.o lib/lib.a generic/generic.a -o cd-tool ${LDFLAGS}
+cd-tool: includes/cdutils.h includes/yazedc.h cd-tool.o lib/lib.a Makefile
+ ${CXX} cd-tool.o lib/lib.a -o cd-tool ${LDFLAGS}
-dte-tool: includes/generic.h includes/dte.h dtemain.o lib/lib.a generic/generic.a Makefile
- ${CXX} dtemain.o lib/lib.a generic/generic.a -o dte-tool ${LDFLAGS}
+dte-tool: includes/dte.h dtemain.o lib/lib.a Makefile
+ ${CXX} dtemain.o lib/lib.a -o dte-tool ${LDFLAGS}
-str-player: str-player.o includes/generic.h includes/cdutils.h includes/yazedc.h lib/lib.a generic/generic.a psxdev/psxdev.a Makefile
- ${CXX} str-player.o psxdev/psxdev.a lib/lib.a generic/generic.a -o str-player ${LDFLAGS}
+str-player: str-player.o includes/cdutils.h includes/yazedc.h lib/lib.a psxdev/psxdev.a Makefile
+ ${CXX} str-player.o psxdev/psxdev.a lib/lib.a -o str-player ${LDFLAGS}
-crypto-search: crypto-search.o includes/generic.h lib/lib.a generic/generic.a Makefile
- ${CXX} crypto-search.o lib/lib.a generic/generic.a -o crypto-search ${LDFLAGS}
+crypto-search: crypto-search.o lib/lib.a Makefile
+ ${CXX} crypto-search.o lib/lib.a -o crypto-search ${LDFLAGS}
-bgrep: bgrep.o includes/generic.h generic/generic.a Makefile
- ${CXX} bgrep.o generic/generic.a -o bgrep ${LDFLAGS}
+bgrep: bgrep.o Makefile
+ ${CXX} bgrep.o -o bgrep ${LDFLAGS}
-tile-convert: tile-convert.o generic/generic.a Makefile
- ${CXX} tile-convert.o generic/generic.a -o tile-convert ${LDFLAGS}
+tile-convert: tile-convert.o Makefile
+ ${CXX} tile-convert.o -o tile-convert ${LDFLAGS}
clean:
for d in ${SUBDIRS} ; do make -C $$d clean || exit -1 ; done
diff --git a/MegamanX5/Makefile b/MegamanX5/Makefile
index 831126c..2fb326d 100755
--- a/MegamanX5/Makefile
+++ b/MegamanX5/Makefile
@@ -1,16 +1,16 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I../includes
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes `baltisot-config --cflags`
CXX=g++
LIBS=-lz
-LDFLAGS=${LIBS}
+LDFLAGS=${LIBS} `baltisot-config --libs`
TARGET = unarc
all: ${TARGET}
-unarc: unarc.o ../includes/generic.h Makefile
- ${CXX} ${LDFLAGS} unarc.o ../generic/generic.a -o unarc
+unarc: unarc.o Makefile
+ ${CXX} ${LDFLAGS} unarc.o -o unarc
clean:
rm -f *.o ${TARGET} compil.c
diff --git a/ToD/Makefile b/ToD/Makefile
index fafd7ac..5a0edcd 100755
--- a/ToD/Makefile
+++ b/ToD/Makefile
@@ -1,16 +1,16 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I../includes
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I../includes `baltisot-config --cflags`
CXX=g++
LIBS=-lz
-LDFLAGS=${LIBS}
+LDFLAGS=${LIBS} `baltisot-config --libs`
TARGET = c_dumper
all: ${TARGET}
-c_dumper: c_dumper.o ../includes/generic.h Makefile
- ${CXX} ${LDFLAGS} c_dumper.o ../generic/generic.a -o c_dumper
+c_dumper: c_dumper.o Makefile
+ ${CXX} ${LDFLAGS} c_dumper.o -o c_dumper
clean:
rm -f *.o ${TARGET} compil.c
diff --git a/VP/Makefile b/VP/Makefile
index 815eb9d..bc2acb3 100755
--- a/VP/Makefile
+++ b/VP/Makefile
@@ -1,26 +1,26 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I../includes -DHAVE_ZLIB
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes -DHAVE_ZLIB `baltisot-config --cflags`
CXX=g++
LIBS=-lz
-LDFLAGS=${LIBS}
+LDFLAGS=${LIBS} `baltisot-config --libs`
TARGET = main_dump VP-CD1.sqr decomp-slz unarc
all: ${TARGET}
-main_dump: main_dump.o ../includes/cdutils.h ../includes/generic.h ../lib/lib.a ../generic/generic.a Makefile
- ${CXX} ${LDFLAGS} main_dump.o ../lib/lib.a ../generic/generic.a -o main_dump
+main_dump: main_dump.o ../includes/cdutils.h ../lib/lib.a Makefile
+ ${CXX} ${LDFLAGS} main_dump.o ../lib/lib.a -o main_dump
-decomp-slz: decomp-slz.o ../includes/generic.h ../includes/lzss.h Makefile
- ${CXX} ${LDFLAGS} decomp-slz.o ../lib/lib.a ../generic/generic.a -o decomp-slz
+decomp-slz: decomp-slz.o ../includes/lzss.h Makefile
+ ${CXX} ${LDFLAGS} decomp-slz.o ../lib/lib.a -o decomp-slz
-unarc: unarc.o ../includes/generic.h Makefile
- ${CXX} ${LDFLAGS} unarc.o ../generic/generic.a -o unarc
+unarc: unarc.o Makefile
+ ${CXX} ${LDFLAGS} unarc.o -o unarc
-search-script: search-script.o ../includes/generic.h Makefile
- ${CXX} ${LDFLAGS} search-script.o ../generic/generic.a -o search-script
+search-script: search-script.o Makefile
+ ${CXX} ${LDFLAGS} search-script.o -o search-script
clean:
rm -f *.o ${TARGET}
diff --git a/VP/main_dump.cpp b/VP/main_dump.cpp
index 421db66..9fa4dfa 100644
--- a/VP/main_dump.cpp
+++ b/VP/main_dump.cpp
@@ -32,7 +32,7 @@
#include "generic.h"
#include "Input.h"
#include "Output.h"
-#include "String.h"
+#include "BString.h"
#include "Main.h"
#include "cdabstract.h"
diff --git a/Xenogears/Decrypt.cpp b/Xenogears/Decrypt.cpp
index 5f606a7..8bee7c3 100644
--- a/Xenogears/Decrypt.cpp
+++ b/Xenogears/Decrypt.cpp
@@ -1,5 +1,10 @@
-#include<stdio.h>
-#include<string.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "generic.h"
+#include "Input.h"
+#include "Output.h"
#include "Main.h"
CODE_BEGINS
diff --git a/Xenogears/Makefile b/Xenogears/Makefile
index 5fbefb7..2069324 100755
--- a/Xenogears/Makefile
+++ b/Xenogears/Makefile
@@ -1,33 +1,33 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -I../includes -DHAVE_ZLIB
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes -DHAVE_ZLIB `baltisot-config --cflags`
CXX=g++
CC=gcc
-LEX=flex
+LEX=flex -l
LIBS=-lz
#-lefence
-LDFLAGS=${LIBS}
+LDFLAGS=${LIBS} `baltisot-config --libs`
#`pkg-config --libs glib-2.0`
TARGET = reinsert main_dump Decrypt script-comp script-dec XenoCD1.sqr XenoCD2.sqr compil compil-2
all: ${TARGET}
-main_dump: main_dump.o ../includes/cdutils.h ../includes/generic.h ../includes/yazedc.h ../lib/lib.a ../generic/generic.a Makefile
- ${CXX} main_dump.o ../lib/lib.a ../generic/generic.a -o main_dump ${LDFLAGS}
+main_dump: main_dump.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile
+ ${CXX} main_dump.o ../lib/lib.a -o main_dump ${LDFLAGS}
-reinsert: reinsert.o ../includes/cdutils.h ../includes/generic.h ../includes/yazedc.h ../lib/lib.a ../generic/generic.a Makefile
- ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a ../generic/generic.a -o reinsert
+reinsert: reinsert.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile
+ ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a -o reinsert
-Decrypt: Decrypt.o ../includes/generic.h ../generic/generic.a Makefile
- ${CXX} ${LDFLAGS} Decrypt.o ../generic/generic.a -o Decrypt
+Decrypt: Decrypt.o Makefile
+ ${CXX} ${LDFLAGS} Decrypt.o -o Decrypt
-script-comp: script-comp.o ../includes/generic.h ../includes/lzss.h ../lib/lib.a ../generic/generic.a Makefile
- ${CXX} ${LDFLAGS} script-comp.o ../lib/lib.a ../generic/generic.a -o script-comp
+script-comp: script-comp.o ../includes/lzss.h ../lib/lib.a Makefile
+ ${CXX} ${LDFLAGS} script-comp.o ../lib/lib.a -o script-comp
-script-dec: script-dec.o ../includes/generic.h ../includes/lzss.h ../lib/lib.a ../generic/generic.a Makefile
- ${CXX} ${LDFLAGS} script-dec.o ../lib/lib.a ../generic/generic.a -o script-dec
+script-dec: script-dec.o ../includes/lzss.h ../lib/lib.a Makefile
+ ${CXX} ${LDFLAGS} script-dec.o ../lib/lib.a -o script-dec
compil: compil.o
${CC} ${LDFLAGS} compil.o -o compil
diff --git a/Xenogears/main_dump.cpp b/Xenogears/main_dump.cpp
index 79b805d..c39a9fe 100644
--- a/Xenogears/main_dump.cpp
+++ b/Xenogears/main_dump.cpp
@@ -281,5 +281,4 @@ void file_dump(unsigned long debut, unsigned long taille, long num, int seq)
f_out = 0;
printm(M_BARE, " (*) Dumped file number %4ld - type \"" + sequences[seq].name + "\" \r", num);
}
-
-} * Application = new Appli();
+CODE_ENDS
diff --git a/Xenogears/script-comp.cpp b/Xenogears/script-comp.cpp
index ca6fb09..964b350 100644
--- a/Xenogears/script-comp.cpp
+++ b/Xenogears/script-comp.cpp
@@ -15,7 +15,7 @@ lzss * lzss_o;
void process_one_file(Handle * f, Handle * d, Handle * f_part, int n) {
String nom_du_fichier;
char zeros[4] = {0, 0, 0, 0}, * datas;
- long script_position, true_length, delta, data_length;
+ int script_position, true_length, delta, data_length;
printm(M_BARE, " Copying header\n");
f->seek(0x14c);
diff --git a/Xenogears/script-dec.cpp b/Xenogears/script-dec.cpp
index a829231..7fcc023 100644
--- a/Xenogears/script-dec.cpp
+++ b/Xenogears/script-dec.cpp
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <unistd.h>
#include "lzss.h"
-#include "String.h"
+#include "BString.h"
#include "Input.h"
#include "Output.h"
#include "Main.h"
diff --git a/includes/cdreader.h b/includes/cdreader.h
index 2dd76ca..8ebe362 100644
--- a/includes/cdreader.h
+++ b/includes/cdreader.h
@@ -4,7 +4,7 @@
#include <sys/types.h>
#include <time.h>
-#include <String.h>
+#include <BString.h>
#include <Handle.h>
class cdreader : public Handle {
diff --git a/includes/gettext.h b/includes/gettext.h
new file mode 100644
index 0000000..c37de7f
--- /dev/null
+++ b/includes/gettext.h
@@ -0,0 +1,58 @@
+#ifndef __GETTEXT_H__
+#define __GETTEXT_H__
+
+#ifndef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+#endif
+
+#ifndef dgettext
+# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
+#endif
+
+#ifndef dcgettext
+# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+#endif
+
+#ifndef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+#endif
+
+#ifndef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+#endif
+
+#ifndef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+#endif
+
+#ifndef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+#endif
+
+#ifndef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
+#endif
+
+#ifndef bind_text_domain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+#endif
+
+#ifndef setlocale
+# define setlocale(category, locale)
+#endif
+
+#ifndef LC_ALL
+# define LC_ALL 0
+#endif
+
+#ifndef gettext_noop
+# define gettext_noop(String) String
+#endif
+
+#define _(Text) dgettext ("bleh", Text)
+#define N_(Text) Text
+
+#endif
diff --git a/includes/lzss.h b/includes/lzss.h
index 37d3ed6..14aa345 100644
--- a/includes/lzss.h
+++ b/includes/lzss.h
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * aint with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -57,10 +57,10 @@ class lzss : public Base {
static const scheme_t schemes[];
int tolerate, blockb;
- long blk, bitmap_count;
+ int blk, bitmap_count;
- unsigned long lzss_decomp(Handle * f_source, Handle * f_cible, long true_length = -1);
- void lzss_comp(Handle * f_source, Handle * f_cible, long * delta = NULL);
+ unsigned int lzss_decomp(Handle * f_source, Handle * f_cible, int true_length = -1);
+ void lzss_comp(Handle * f_source, Handle * f_cible, int * delta = NULL);
Byte swap_bits(Byte);
@@ -73,9 +73,9 @@ class lzss : public Base {
unsigned int shift(unsigned int, int);
void compute_limits(void);
- unsigned char lzss_rd(unsigned char *, long);
- long lzss_comp_strstr(unsigned char *, unsigned char *, long *, long);
- unsigned char * lzss_memcomp(unsigned char *, long *, long *);
+ unsigned char lzss_rd(unsigned char *, int);
+ int lzss_comp_strstr(unsigned char *, unsigned char *, int *, int);
+ unsigned char * lzss_memcomp(unsigned char *, int *, int *);
};
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 24c068e..8dda356 100755
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,9 +1,9 @@
#!/usr/bin/make -f
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -Werror -I../includes -DHAVE_ZLIB -DUSE_CDREADER -DDEBUG
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -Werror -I../includes -DHAVE_ZLIB -DUSE_CDREADER -DDEBUG `baltisot-config --cflags`
CXX=g++
-OBJECTS = cdutils.o lzss.o yazedc.o dteutils.o cdreader.o cdabstract.o
+OBJECTS = cdutils.o lzss.o yazedc.o cdreader.o cdabstract.o
TARGET = lib.a
all: ${TARGET}
diff --git a/lib/dteutils.cpp b/lib/dteutils.cpp
index 0f52667..85a7df2 100644
--- a/lib/dteutils.cpp
+++ b/lib/dteutils.cpp
@@ -24,7 +24,7 @@
#include "generic.h"
#include "Handle.h"
-class thingtree {
+class thingtree : public Base {
public:
static void addstring(const String, long);
static long look(const String);
diff --git a/lib/lzss.cpp b/lib/lzss.cpp
index f31b2f2..530c6d9 100644
--- a/lib/lzss.cpp
+++ b/lib/lzss.cpp
@@ -81,13 +81,13 @@ void lzss::compute_limits(void) {
lzss_maxptr += scheme.one_jump;
if (scheme.l_mask_1 & scheme.j_mask_1) {
- printm(M_ERROR, "Masks are overlapping for value 1\n");
- exit(-1);
+ printm(M_ERROR, "Masks are overlapping for value 1\n");
+ exit(-1);
}
if (scheme.l_mask_2 & scheme.j_mask_2) {
- printm(M_ERROR, "Masks are overlapping for value 2\n");
- exit(-1);
+ printm(M_ERROR, "Masks are overlapping for value 2\n");
+ exit(-1);
}
if (shift(scheme.l_mask_1, scheme.l_shft_1) & shift(scheme.l_mask_2, scheme.l_shft_2)) {
@@ -103,7 +103,7 @@ void lzss::compute_limits(void) {
printm(M_INFO, "Computed values: maxsize = %i, maxptr = 0x%06x\n", lzss_maxsize, lzss_maxptr);
}
-unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_length)
+unsigned int lzss::lzss_decomp(Handle * f_source, Handle * f_cible, int true_length)
{
unsigned char bitmap, fbitmap;
unsigned char valeur;
@@ -119,13 +119,13 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l
int loop_length;
int whole_count;
int i, j;
- long length, reads;
+ int length, reads;
compute_limits();
f_source->read(&length, 4);
if (true_length >= 0) {
- length = true_length;
+ length = true_length;
}
whole_count = 0;
@@ -251,13 +251,13 @@ unsigned long lzss::lzss_decomp(Handle * f_source, Handle * f_cible, long true_l
return length;
}
-unsigned char lzss::lzss_rd(unsigned char * t, long p) {
+unsigned char lzss::lzss_rd(unsigned char * t, int p) {
return ((p < 0) ? 0 : (t[p]));
}
-long lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, long * l, long sp) {
+int lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, int * l, int sp) {
char redo[256];
- long length, i, p, ptr, maxlength;
+ int length, i, p, ptr, maxlength;
i = 1;
redo[0] = p = 0;
@@ -300,10 +300,10 @@ long lzss::lzss_comp_strstr(unsigned char * needle, unsigned char * r, long * l,
return ptr;
}
-unsigned char * lzss::lzss_memcomp(unsigned char * r, long * l, long * delta) {
+unsigned char * lzss::lzss_memcomp(unsigned char * r, int * l, int * delta) {
unsigned char bitmap, * comp;
- long ptr, needle, needle_length, comp_ptr, bitmap_ptr, val1, val2;
- long jump, farest, remaining;
+ int ptr, needle, needle_length, comp_ptr, bitmap_ptr, val1, val2;
+ int jump, farest, remaining;
int j;
comp = (unsigned char *) malloc(3 * *l);
@@ -425,8 +425,8 @@ unsigned char * lzss::lzss_memcomp(unsigned char * r, long * l, long * delta) {
return comp;
}
-void lzss::lzss_comp(Handle * f_source, Handle * f_cible, long * delta) {
- long length = f_source->GetSize(), l;
+void lzss::lzss_comp(Handle * f_source, Handle * f_cible, int * delta) {
+ int length = f_source->GetSize(), l;
unsigned char * r = (unsigned char *) malloc(length), * c;
f_source->read(r, length);
diff --git a/lzss-main.cpp b/lzss-main.cpp
index 87d2a0f..ed07eec 100644
--- a/lzss-main.cpp
+++ b/lzss-main.cpp
@@ -18,8 +18,8 @@
*/
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#include <stdlib.h>
#include <getopt.h>
#include "Input.h"
#include "Output.h"
@@ -158,7 +158,7 @@ void dump(void) {
}
virtual int startup() throw (GeneralException) {
- long length = -1;
+ int length = -1;
Handle * f1, * f2;
int p, show = 0;
int c, s, t;
diff --git a/psxdev/Makefile b/psxdev/Makefile
index bca0c5a..3a62c72 100644
--- a/psxdev/Makefile
+++ b/psxdev/Makefile
@@ -4,7 +4,7 @@ OBJECTS = xadecode.o bs.o idctfst.o jfdctint.o vlc.o
TARGETS = psxdev.a
CC=gcc
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes `baltisot-config --cflags`
# -Werror
# -pedantic-errors
diff --git a/str-player.cpp b/str-player.cpp
index 3343881..b1a814a 100644
--- a/str-player.cpp
+++ b/str-player.cpp
@@ -8,10 +8,11 @@
#include "generic.h"
#include "cdutils.h"
#include "psxdev/xadecode.h"
+#include "Main.h"
/*
- From the SONY documentation:
+ From the documentation:
32 bytes header:
@@ -67,6 +68,7 @@ void mixaudio(void *unused, Uint8 *stream, int len) {
audio_len -= len;
}
+CODE_BEGINS
void process_one_sector(Handle * f) {
Byte sector[2336];
STR_Header * h;
@@ -190,7 +192,7 @@ void process_one_sector(Handle * f) {
// printm(M_BARE, "---------------------------------\n\n");
}
-int main(int argc, char ** argv) {
+virtual int startup() throw (GeneralException) {
Handle * file = 0;
int c;
@@ -232,4 +234,6 @@ int main(int argc, char ** argv) {
SDL_CloseAudio();
SDL_Quit();
+ return 0;
}
+CODE_ENDS
diff --git a/tile-convert.cpp b/tile-convert.cpp
index 86d6612..eb9dd71 100644
--- a/tile-convert.cpp
+++ b/tile-convert.cpp
@@ -1,10 +1,13 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
#include <unistd.h>
#include <SDL/SDL.h>
#include "generic.h"
-#include "Main.h"
#include "Image.h"
#include "Input.h"
#include "Output.h"
+#include "Main.h"
int IMG_SX = 128, IMG_SY = 128, BLOC_SX = 128, BLOC_SY = 128;