diff --git a/build-emscripten.sh b/build-emscripten.sh new file mode 100755 index 0000000..c1fb27e --- /dev/null +++ b/build-emscripten.sh @@ -0,0 +1,12 @@ +java -jar ./JCGO/jcgo.jar mudclient -src ./mudclient204-threadless \ + @JCGO/stdpaths.in + +patch -p0 -i sdl.diff + +emcc -O2 -I ./JCGO/include -I ./JCGO/native -I \ + -fno-strict-aliasing \ + -DJCGO_NOGC -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \ + -DJCGO_INTFIT -DJCGO_UNIX -D_FPU_CONTROL_H -D_IEEEFP_H -DJCGO_UNIFSYS \ + -o mudclient.html jcgo_Out/Main.c -lm -lSDL2 \ + -s ALLOW_MEMORY_GROWTH=1 -s USE_SDL=2 -s ASYNCIFY \ + --preload-file ./data204 diff --git a/build-mingw.sh b/build-mingw.sh index 78b2b28..8fc7f30 100755 --- a/build-mingw.sh +++ b/build-mingw.sh @@ -6,7 +6,8 @@ patch -p0 -i sdl.diff x86_64-w64-mingw32-gcc -O2 -I ./JCGO/include -I ./JCGO/native \ -I ./JCGO/include/tinygc -I ./SDL2-2.0.14/x86_64-w64-mingw32/include \ -fno-strict-aliasing \ - -DGC_THREADS -DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \ + -DGC_THREADS -DGC_GCJ_SUPPORT -DJCGO_USEGCJ -DJCGO_PARALLEL -DJCGO_FPFAST \ + -DJCGO_FASTMATH -DJCGO_INET \ -DJCGO_INTFIT -DJCGO_THREADS -D_IEEEFP_H -DJCGO_WIN32 \ -o mudclient.exe jcgo_Out/Main.c -lm \ -L ./SDL2-2.0.14/x86_64-w64-mingw32/lib -lSDL2 -lwsock32 \ diff --git a/build-mingw32.sh b/build-mingw32.sh new file mode 100755 index 0000000..820d957 --- /dev/null +++ b/build-mingw32.sh @@ -0,0 +1,13 @@ +#java -jar ./JCGO/jcgo.jar mudclient -src ./mudclient204-headless \ +# @JCGO/stdpaths.in + +#patch -p0 -i sdl.diff + +#x86_64-w64-mingw32-gcc -g -I ./JCGO/include -I ./JCGO/native \ +i686-w64-mingw32-gcc -g -I ./JCGO/include -I ./JCGO/native \ + -I ./JCGO/include/boehmgc -I ./SDL2-2.0.14/i686-w64-mingw32/include \ + -DJCGO_NOGC -DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \ + -DJCGO_INTFIT -DJCGO_THREADS -D_IEEEFP_H -DJCGO_WIN32 \ + -o mudclient.exe jcgo_Out/Main.c -lm \ + -L ./SDL2-2.0.14/i686-w64-mingw32/lib -lSDL2 -lwsock32 \ + ./JCGO/libs/x86/mingw/libgcmt.a -no-pie diff --git a/build.sh b/build.sh index eaa8180..d1bed6c 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ patch -p0 -i sdl.diff #-DJCGO_NOGJ gcc -O2 -I ./JCGO/include -I ./JCGO/native -I ./JCGO/include/boehmgc \ -fno-strict-aliasing \ - -DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \ + -DJCGO_USEGCJ -DJGCO_PARALLEL -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \ -DJCGO_INTFIT -DJCGO_THREADS -DJCGO_UNIX -D_IEEEFP_H -DJCGO_UNIFSYS \ -o mudclient jcgo_Out/Main.c -lm -lpthread -lSDL2 \ ./JCGO/libs/amd64/linux/libgcmt.a -no-pie diff --git a/emscripten-sdl.diff b/emscripten-sdl.diff new file mode 100644 index 0000000..e69de29 diff --git a/mudclient204-headless/mudclient.java b/mudclient204-headless/mudclient.java index e481f94..61cf1cf 100644 --- a/mudclient204-headless/mudclient.java +++ b/mudclient204-headless/mudclient.java @@ -3887,14 +3887,6 @@ public class mudclient extends GameConnection { } protected void startGame() { - /* - if (appletMode) { - String s = getDocumentBase().getHost().toLowerCase(); - if (!s.endsWith("jagex.com") && !s.endsWith("jagex.co.uk") && !s.endsWith("runescape.com") && !s.endsWith("runescape.co.uk") && !s.endsWith("runescape.net") && !s.endsWith("runescape.org") && !s.endsWith("penguin") && !s.endsWith("puffin")) { - errorLoadingCodebase = true; - return; - } - }*/ int total_exp = 0; for (int level = 0; level < 99; level++) { int level_1 = level + 1; @@ -3903,35 +3895,11 @@ public class mudclient extends GameConnection { experienceArray[level] = total_exp & 0xffffffc; } - /* - try { - String s1 = getParameter("referid"); - referid = Integer.parseInt(s1); - } catch (Exception Ex) { - } - - try { - String s2 = getParameter("member"); - int j1 = Integer.parseInt(s2); - if (j1 == 1) - members = true; - } catch (Exception Ex) { - } - */ - if (appletMode) super.port = 43594; + maxReadTries = 1000; clientVersion = Version.CLIENT; - /* - try { - String s3 = getParameter("poff"); - int k1 = Integer.parseInt(s3); - super.port += k1; - System.out.println("Offset: " + k1); - } catch (Exception Ex) { - } - */ loadGameConfig(); if (errorLoadingData) return; diff --git a/tinygc-tinygc-2_6/tinygcmt.o b/tinygc-tinygc-2_6/tinygcmt.o index dcfda2c..dfc6d6f 100644 Binary files a/tinygc-tinygc-2_6/tinygcmt.o and b/tinygc-tinygc-2_6/tinygcmt.o differ