Add RCO object model and expose the menu object tree

- Type system: BaseType (+Int/Float/Unknown) and BaseReferenceType
  (+Event/Image/Text/Ref/Object/Model) for typed record fields.
- Object model: BaseObject/BasePositionObject and all 25 object classes
  (Page, Plane, Button, UButton, Text, Model, Icon, Group, Action,
  XMenu/XMList/XList/XItem, MList/MItem, LList/LItem, IList/IItem,
  Progress, Scroll, Spin, ItemSpin, Edit, Clock) with reflection-based
  field deserialization.
- ObjectFactory + RcoContext materialize 89 objects and 81 images from
  the RCO; RcoFile resolves references and wires entry.obj/vsmxObject.
- Resource builds the live pagetable/animtable/soundtable/texturetable
  into the VSMX tree; Controller tracks input focus.
- Validated on Batman Begins: onAutoPlay still drives playback
  (stream 00003) with the object tree populated.
This commit is contained in:
2026-09-15 22:54:46 -04:00
parent e1b8d09844
commit b18e8447dc
32 changed files with 961 additions and 11 deletions
@@ -406,7 +406,8 @@ public final class Main {
}
RcoFile rco = new RcoFile(data);
System.out.printf("%s: valid=%b compression=%d%n", rcoPath, rco.isValid(), rco.compression());
System.out.printf("%s: valid=%b compression=%d objects=%d images=%d%n",
rcoPath, rco.isValid(), rco.compression(), rco.objects().size(), rco.images().size());
System.out.printf("events (%d):%n", rco.events().size());
for (Map.Entry<Integer, String> event : rco.events().entrySet()) {
@@ -466,7 +467,7 @@ public final class Main {
VsmxNativeObject globals = GlobalVariables.create(interpreter, 854, 480);
VsmxNativeObject controller = Controller.create(interpreter, menuHost, resourceName);
VsmxNativeObject movieplayer = MoviePlayer.create(interpreter, menuHost, controller);
VsmxNativeObject resource = Resource.create(interpreter);
VsmxNativeObject resource = Resource.create(interpreter, null, controller, rco);
VsmxNativeObject math = dev.quoije.umd.rco.vsmx.objects.Math.create(interpreter);
globals.setPropertyValue(Controller.objectName, controller);
globals.setPropertyValue(MoviePlayer.objectName, movieplayer);