remove antenna dependency

This commit is contained in:
sillysagiri 2024-11-02 13:26:10 +07:00
parent 0b0d7c876c
commit 5db84aa14e
3 changed files with 76 additions and 171 deletions

121
build.xml
View File

@ -1,110 +1,65 @@
<project name="dothack">
<property file="config.properties"/>
<taskdef resource="antenna.properties" classpath="${antenna.path}"/>
<target name="clean">
<delete dir="build"/>
</target>
<target name="debug">
<mkdir dir="build/classes_debug"/>
<target name="compile">
<mkdir dir="build/classes"/>
<wtkbuild
<javac
includeAntRuntime="false"
destdir="build/classes_debug"
srcdir="src"
srcdir="src"
destdir="build/classes"
source="1.4"
target="1.4"
debug="true"
preverify="false"
classpath="${midlet.lib}">
classpath="${midlet.j2me};${midlet.lib}">
<compilerarg value="-Xlint:-options"/>
</wtkbuild>
</javac>
<wtkjad
jadfile="build/${project.name}_debug.jad"
name="${project.name}"
vendor="${project.vendor}"
version="${project.version}">
<jar
destfile="build/${project.name}_not_preverified.jar"
manifest="src/MANIFEST"
compress="true"
level="9">
<midlet
name="${midlet.name}"
class="${midlet.class}">
</midlet>
</wtkjad>
<wtkpackage
jarfile="build/${project.name}_debug.jar"
jadfile="build/${project.name}_debug.jad"
libclasspath="${midlet.lib}"
obfuscate="true"
preverify="false">
<!-- include -->
<fileset dir="build/classes_debug"/>
<fileset dir="build/classes"/>
<fileset dir="assets"/>
<!-- using proguard to preverify -->
<argument value="-microedition"/>
<zipfileset src="${midlet.lib}" includes="**/*.class" excludes="example/**/*.class"/>
</jar>
</target>
<!-- proguard args -->
<argument value="-dontshrink -dontoptimize -dontobfuscate -target 1.4"/>
</wtkpackage>
<target name="debug">
<antcall target="compile"/>
<java jar="${proguard.path}" fork="true">
<arg value="-microedition"/>
<arg value="-injars build/${project.name}_not_preverified.jar"/>
<arg value="-outjars build/${project.name}_debug.jar"/>
<arg value="-libraryjars ${midlet.j2me}"/>
<arg value="-dontshrink"/>
<arg value="-dontoptimize"/>
<arg value="-dontobfuscate"/>
<arg value="-target 1.4"/>
</java>
</target>
<target name="release">
<mkdir dir="build/classes_release"/>
<wtkbuild
includeAntRuntime="false"
destdir="build/classes_release"
srcdir="src"
source="1.4"
target="1.4"
debug="false"
preverify="false"
classpath="${midlet.lib}">
<compilerarg value="-Xlint:-options"/>
</wtkbuild>
<wtkjad
jadfile="build/${project.name}_release.jad"
name="${project.name}"
vendor="${project.vendor}"
version="${project.version}">
<midlet
name="${midlet.name}"
class="${midlet.class}">
</midlet>
</wtkjad>
<wtkpackage
jarfile="build/${project.name}_release.jar"
jadfile="build/${project.name}_release.jad"
libclasspath="${midlet.lib}"
obfuscate="true"
preverify="false">
<!-- include -->
<fileset dir="build/classes_release"/>
<fileset dir="assets"/>
<!-- using proguard to preverify -->
<argument value="-microedition"/>
<!-- proguard args -->
<argument value="-target 1.4 -keep 'class * extends javax.microedition.midlet.MIDlet' -repackageclasses '' -optimizationpasses 4 -allowaccessmodification"/>
</wtkpackage>
<antcall target="compile"/>
<java jar="${proguard.path}" fork="true">
<arg value="-microedition"/>
<arg value="-injars build/${project.name}_not_preverified.jar"/>
<arg value="-outjars build/${project.name}_release.jar"/>
<arg value="-libraryjars ${midlet.j2me}"/>
<arg value="-keep class * extends javax.microedition.midlet.MIDlet"/>
<arg value="-repackageclasses"/>
<arg value="-target 1.4"/>
</java>
</target>
</project>

View File

@ -1,87 +1,11 @@
## sdk & tools
antenna.path=/home/sillysagiri/Documents/antenna/antenna-bin-1.2.1-beta.jar
wtk.home=/home/sillysagiri/Documents/wtk/
wtk.proguard.home=/home/sillysagiri/Documents/proguard-7.6.0/
proguard.path=/home/sillysagiri/Documents/proguard-7.6.0/lib/proguard.jar
# ======================================================== #
## project
project.name=dothack-allscreen
project.vendor=sillysagiri
project.manifest=MANIFEST.MF
project.version=1.0.0
## midlet
midlet.name=dothack
midlet.class=dothack.DotHack
## Specify library here (separated by `;` )
## Specify library here (separated by `:` )
midlet.lib=library/tinygzip/tinylinegzip.jar
## Preprocessor
symbols=
# ======================================================== #
## WTK Properties
## Specifies the version of CLDC to use.
wtk.cldc.version=1.1
## Specifies the version of MIDP to use.
wtk.midp.version=2.0
## Enables or disables the Multimedia API (MMAPI).
wtk.mmapi.enabled=true
## Enables or disables the Wireless Messaging API (WMA) 1.0 (JSR-120).
# wtk.wma.enabled true
## Enables or disables the Wireless Messaging API (WMA) 2.0 (JSR-205).
# wtk.wma2.enabled=true
## Enables or disables the J2ME Web Services API (J2MEWS).
# wtk.j2mews.enabled=true
## Enables or disables the J2ME Bluetooth API (JSR-82).
# wtk.bluetooth.enabled=true
## Enables or disables the J2ME 3D API (JSR-184).
# wtk.java3d.enabled=true
## Enables or disables the J2ME optional PDA packages (JSR-75).
# wtk.optionalpda.enabled=true
## Enables or disables the J2ME location services API (JSR-179).
# wtk.locationservices.enabled=true
## Enables or disables the J2ME content handler API (JSR-211).
# wtk.contenthandler.enabled=true
## Enables or disables the J2ME Security and Trust Services API (JSR-177).
# wtk.satsa.enabled=true
## Enables or disables the J2ME Mobile Internationalization API (JSR-238).
# wtk.miapi.enabled=true
## Enables or disables the J2ME Advanced Multimedia Supplements API (JSR-234).
# wtk.ams.enabled=true
## Enables or disables the J2ME Payment API (JSR-229).
# wtk.papi.enabled=true
## Enables or disables the J2ME Scalable 2D Vector Graphics API (JSR-226).
# wtk.s2dvgapi.enabled=true
## Enables or disables the J2ME Session Initiation Protocol API (JSR-180).
# wtk.sipapi.enabled=true
## Enables all additional libraries (except for CLDC and MIDP) defined for your toolkit.
# wtk.all.enabled=true
## Sets a totally custom BOOTCLASSPATH. Use this property if the set of APIs you need is not covered by the above properties (for example because you are using the system libraries provided another vendor or you have some important additional libraries).
# wtk.midpapi=Varies
# ======================================================== #
midlet.j2me=library/j2me/cldcapi11.jar:library/j2me/microemu-jsr-75.jar:library/j2me/midpapi20.jar

View File

@ -1,17 +1,43 @@
.hack//vol1 is a j2me game originally from old korean game...
the original game runs on the mighty cldc 1.0/midp 1.0 and boasts a stunning resolution of 128x128 pixels
_ _ _ _ _ ____
__| | ___ | |_ | |__ __ _ ___ | | __ (_)|___ \ _ __ ___ ___
/ _` | / _ \ | __|| '_ \ / _` | / __|| |/ /_____ | | __) || '_ ` _ \ / _ \
| (_| || (_) || |_ | | | || (_| || (__ | <|_____|| | / __/ | | | | | || __/
\__,_| \___/ \__||_| |_| \__,_| \___||_|\_\ _/ ||_____||_| |_| |_| \___|
|__/
.hack//vol1 is a j2me game from many of dothack series.
the game runs on cldc 1.0/midp 1.0 with resolution of 128x128 pixels
you can get the game here on archive.net
https://archive.org/details/dh1_ezi
there is also people who translate this to english here
there is also english patch here
https://archive.org/download/dh1_ezi_en
however, due to some native apis used in the original game. the game doesnt work on most emulator.
ive been on a mission to swap out those stubborn native apis for their midp equivalents
however, due to some native api used in the original game. the game doesnt work
on most emulator.
i took on the heroic quest of porting this masterpiece to a more contemporary version of j2me: cldc 1.1/midp 2.0...
plus, i also tried added support for larger screens, like 240x320...
this is a project in progress to decode the game and rewrite the entire codebase
with more contemporary version of j2me cldc 1.1/midp 2.0. swapping out those
native api with midp api equivalents. and support the game with bigger screen
- building
ugh... just peek at the build.sh file for now. i promise ill whip up a more detailed guide soon...after i finish this epic battle with caffeine!
this project is just for entertainment purposes and for gaining more knowledge
about java micro edition.
*** Building tools ***
Requirements:
- c/c++ compiler
most of the tools written in simple single file c++ and can be compiled with
your choice of compiler
*** Building dothack-j2me ***
Requirements:
- JDK 8, (jdk should be able to target java 1.4)
- apache ant
to build debug mode:
ant debug
to build release mode:
ant release