Commits
The migration to Kotlin completed long ago; the directory names were stale.
No build changes needed — the Kotlin Gradle plugin auto-detects the new path.
Deobfuscate remaining fields and split Game.kt into modules
See merge request high-level-alchemy/client!6
Remove 1145 unnecessary @JvmField/@JvmStatic annotations now
that no Java code exists. Only @JvmStatic on main() is kept
for JAR manifest entry point.
@JvmField retained on GameShell.width/height to avoid
Canvas.getWidth/getHeight signature clash.
Replace SoundPlayer.setVolume()/getVolume() explicit functions
with Kotlin property access (SoundPlayer.volume = x).
Remove `imageRGB = null!!` which was a guaranteed NPE — the
original Java set a local variable to null as a GC hint, but
Kotlin's non-nullable type made this a crash. Simply removing
the assignment is sufficient since the local goes out of scope.
Add exception.printStackTrace() to startup catch block for
easier debugging of initialization failures.
Complete Java to Kotlin migration (81/81 files)
Closes #1
See merge request high-level-alchemy/client!5
Java→Kotlin: Skins, TiledUtils, Animation, Actor, Npc, Player,
ProducingGraphicsBuffer, GameFrame, BufferTests, Rasterizer, GameShell.
78 Kotlin / 3 Java remaining (Game, MapRegion, CollisionMap).
Renamed obfuscated fields using rs-deob usage analysis:
- Animation: anInt431→delay, aBooleanArray438→noAlpha
- Actor: anInt1596→healthRatio, anInt1597→healthScale
- Player: anInt1743→objectX, anInt1745→objectY,
anInt1768-1771→objectMinTileX/Y, objectMaxTileX/Y
Fixed TypeFace.getDisplayedWidth @xxx@ color code skip — the for-in
loop made idx immutable so the shadowed variable hack never advanced
the loop counter, overcounting width and clipping centered text (e.g.
wilderness "Level: 1" rendered as "evel: 1").
Using openrs2-nonfree 377 branch as reference, renamed all obfuscated
fields and methods in the rendering pipeline before converting to Kotlin:
- Rasterizer3D: reciprocal16 (was anIntArray1469), removed dead code
- Model: 19 field renames (depth buckets, priority sorting, clipping
buffers, lighting info), 4 method renames (renderTriangles,
drawTriangle, drawClippedTriangle, isPointInTriangle)
- Scene: 19 field renames (tile render cycle, viewport bounds, wall
flags, occlusion, culling), plus InteractiveObject.renderPriority
and GroundItemTile.heightOffset
- Animation: transformCount (was anInt433)
- Fix stopMidi NPE on logout when MIDI sequencer not initialized
All three files converted with correct Kotlin bitwise precedence,
compound assignment splits, and @JvmStatic/@JvmField for Java interop.
Convert scene/tile, renderable, and media data holders to Kotlin (Phase 4)
See merge request high-level-alchemy/client!4
17 files: VertexNormal, ModelHeader, Renderable, Item, Projectile,
GameObject, GameAnimableObject, SceneCluster, SpawnObjectNode,
GroundItemTile, InteractiveObject, Wall, WallDecoration,
FloorDecoration, GenericTile, ComplexTile, SceneTile.
GameObject.id renamed to objectId to resolve Node.id shadowing
(same pattern as OnDemandNode.id → fileId from Phase 2).
Rewrite BZip2 decompressor in Kotlin (Phase 3)
See merge request high-level-alchemy/client!3
Convert cache/def/ to Kotlin (Phase 3)
See merge request high-level-alchemy/client!2
Add Kotlin Gradle plugin (migration Phase 1)
Closes #1
See merge request high-level-alchemy/client!1
Remove 1145 unnecessary @JvmField/@JvmStatic annotations now
that no Java code exists. Only @JvmStatic on main() is kept
for JAR manifest entry point.
@JvmField retained on GameShell.width/height to avoid
Canvas.getWidth/getHeight signature clash.
Replace SoundPlayer.setVolume()/getVolume() explicit functions
with Kotlin property access (SoundPlayer.volume = x).
Remove `imageRGB = null!!` which was a guaranteed NPE — the
original Java set a local variable to null as a GC hint, but
Kotlin's non-nullable type made this a crash. Simply removing
the assignment is sufficient since the local goes out of scope.
Add exception.printStackTrace() to startup catch block for
easier debugging of initialization failures.
Java→Kotlin: Skins, TiledUtils, Animation, Actor, Npc, Player,
ProducingGraphicsBuffer, GameFrame, BufferTests, Rasterizer, GameShell.
78 Kotlin / 3 Java remaining (Game, MapRegion, CollisionMap).
Renamed obfuscated fields using rs-deob usage analysis:
- Animation: anInt431→delay, aBooleanArray438→noAlpha
- Actor: anInt1596→healthRatio, anInt1597→healthScale
- Player: anInt1743→objectX, anInt1745→objectY,
anInt1768-1771→objectMinTileX/Y, objectMaxTileX/Y
Fixed TypeFace.getDisplayedWidth @xxx@ color code skip — the for-in
loop made idx immutable so the shadowed variable hack never advanced
the loop counter, overcounting width and clipping centered text (e.g.
wilderness "Level: 1" rendered as "evel: 1").
Using openrs2-nonfree 377 branch as reference, renamed all obfuscated
fields and methods in the rendering pipeline before converting to Kotlin:
- Rasterizer3D: reciprocal16 (was anIntArray1469), removed dead code
- Model: 19 field renames (depth buckets, priority sorting, clipping
buffers, lighting info), 4 method renames (renderTriangles,
drawTriangle, drawClippedTriangle, isPointInTriangle)
- Scene: 19 field renames (tile render cycle, viewport bounds, wall
flags, occlusion, culling), plus InteractiveObject.renderPriority
and GroundItemTile.heightOffset
- Animation: transformCount (was anInt433)
- Fix stopMidi NPE on logout when MIDI sequencer not initialized
All three files converted with correct Kotlin bitwise precedence,
compound assignment splits, and @JvmStatic/@JvmField for Java interop.
17 files: VertexNormal, ModelHeader, Renderable, Item, Projectile,
GameObject, GameAnimableObject, SceneCluster, SpawnObjectNode,
GroundItemTile, InteractiveObject, Wall, WallDecoration,
FloorDecoration, GenericTile, ComplexTile, SceneTile.
GameObject.id renamed to objectId to resolve Node.id shadowing
(same pattern as OnDemandNode.id → fileId from Phase 2).