From 7348e6a4ff9bd4f16ec171b1e7997f5b37eeb8db Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:32:58 -0500 Subject: [PATCH] [decompiler] Update vector ops, reduce casts (#3849) Update the decompiler to use the new vf macros. Also, fix a bunch of silly casting issues where accessing inline fields with an offset of 0 would be better than a cast: ![image](https://github.com/user-attachments/assets/885bbb07-634f-47b8-99f5-5a947941cdde) --------- Co-authored-by: water111 --- decompiler/IR2/Form.cpp | 9 + decompiler/IR2/Form.h | 1 + decompiler/IR2/FormExpressionAnalysis.cpp | 62 +++- decompiler/IR2/OpenGoalMapping.cpp | 14 +- goal_src/jak3/engine/ai/enemy.gc | 4 +- goal_src/jak3/engine/ambient/ambient.gc | 2 +- goal_src/jak3/engine/anim/aligner.gc | 14 +- goal_src/jak3/engine/anim/joint-exploder.gc | 4 +- goal_src/jak3/engine/anim/joint-mod-h.gc | 15 +- goal_src/jak3/engine/anim/joint-mod.gc | 36 +- goal_src/jak3/engine/camera/cam-combiner.gc | 10 +- goal_src/jak3/engine/camera/cam-states-dbg.gc | 14 +- goal_src/jak3/engine/camera/cam-states.gc | 29 +- goal_src/jak3/engine/camera/cam-update.gc | 2 +- goal_src/jak3/engine/camera/camera.gc | 47 +-- goal_src/jak3/engine/collide/collide-cache.gc | 10 +- goal_src/jak3/engine/collide/collide-debug.gc | 20 +- .../jak3/engine/collide/collide-edge-grab.gc | 24 +- .../engine/collide/collide-shape-rider.gc | 19 +- goal_src/jak3/engine/collide/collide-shape.gc | 54 +-- goal_src/jak3/engine/collide/collide-touch.gc | 13 +- .../jak3/engine/common-obs/collectables.gc | 14 +- goal_src/jak3/engine/common-obs/crates.gc | 2 +- goal_src/jak3/engine/common-obs/debris.gc | 18 +- goal_src/jak3/engine/common-obs/elevator.gc | 2 +- goal_src/jak3/engine/common-obs/gem-pool.gc | 4 +- .../jak3/engine/common-obs/generic-obs.gc | 6 +- .../engine/common-obs/metalhead-projectile.gc | 2 +- goal_src/jak3/engine/common-obs/water-flow.gc | 4 +- goal_src/jak3/engine/common-obs/water.gc | 2 +- .../jak3/engine/debug/collision-editor.gc | 13 +- goal_src/jak3/engine/debug/debug.gc | 8 +- goal_src/jak3/engine/debug/manipulator.gc | 35 +- goal_src/jak3/engine/draw/drawable.gc | 22 +- goal_src/jak3/engine/game/game-save.gc | 8 +- goal_src/jak3/engine/geometry/geometry.gc | 22 +- .../engine/gfx/background/hfrag/hfrag-work.gc | 6 +- .../jak3/engine/gfx/background/hfrag/hfrag.gc | 4 +- .../jak3/engine/gfx/foreground/merc/emerc.gc | 2 +- .../jak3/engine/gfx/foreground/merc/merc.gc | 2 +- .../gfx/generic/lightning/lightning-new.gc | 4 +- .../engine/gfx/generic/lightning/lightning.gc | 6 +- goal_src/jak3/engine/gfx/mood/mood-funcs2.gc | 13 +- goal_src/jak3/engine/gfx/mood/mood-tables2.gc | 8 +- goal_src/jak3/engine/gfx/mood/mood.gc | 21 +- .../sprite/particles/sparticle-launcher.gc | 57 +-- goal_src/jak3/engine/level/region.gc | 4 +- goal_src/jak3/engine/load/load-dgo.gc | 34 +- goal_src/jak3/engine/load/loader.gc | 14 +- goal_src/jak3/engine/math/quaternion.gc | 4 +- goal_src/jak3/engine/nav/nav-control.gc | 54 ++- goal_src/jak3/engine/nav/nav-enemy.gc | 6 +- goal_src/jak3/engine/nav/nav-engine.gc | 14 +- goal_src/jak3/engine/nav/nav-mesh.gc | 30 +- goal_src/jak3/engine/physics/cloth.gc | 48 +-- goal_src/jak3/engine/physics/ragdoll-edit.gc | 2 +- goal_src/jak3/engine/physics/ragdoll.gc | 21 +- goal_src/jak3/engine/physics/rigid-body.gc | 16 +- goal_src/jak3/engine/physics/trajectory.gc | 4 +- .../process-drawable/process-drawable.gc | 10 +- goal_src/jak3/engine/sound/speech.gc | 2 +- .../jak3/engine/spatial-hash/actor-hash.gc | 5 +- .../jak3/engine/target/board/board-states.gc | 10 +- .../jak3/engine/target/board/target-board.gc | 24 +- .../engine/target/collide-reaction-target.gc | 8 +- goal_src/jak3/engine/target/flut/flut.gc | 2 +- .../jak3/engine/target/flut/target-flut.gc | 6 +- .../jak3/engine/target/gun/gun-blue-shot.gc | 14 +- .../jak3/engine/target/gun/gun-dark-shot.gc | 2 +- .../jak3/engine/target/gun/gun-yellow-shot.gc | 2 +- .../jak3/engine/target/indax/target-indax.gc | 2 +- goal_src/jak3/engine/target/logic-target.gc | 33 +- .../jak3/engine/target/mech/mech-states.gc | 8 +- goal_src/jak3/engine/target/mech/mech.gc | 2 +- .../jak3/engine/target/mech/target-mech.gc | 26 +- goal_src/jak3/engine/target/pilot-states.gc | 4 +- goal_src/jak3/engine/target/target-darkjak.gc | 6 +- goal_src/jak3/engine/target/target-death.gc | 10 +- goal_src/jak3/engine/target/target-gun.gc | 22 +- goal_src/jak3/engine/target/target-handler.gc | 2 +- .../jak3/engine/target/target-invisible.gc | 2 +- goal_src/jak3/engine/target/target-launch.gc | 4 +- goal_src/jak3/engine/target/target-tube.gc | 2 +- goal_src/jak3/engine/target/target-turret.gc | 4 +- goal_src/jak3/engine/target/target2.gc | 4 +- goal_src/jak3/engine/ui/bigmap.gc | 20 +- goal_src/jak3/engine/ui/hud-classes.gc | 125 +++---- goal_src/jak3/engine/ui/minimap.gc | 12 +- .../jak3/engine/ui/progress/progress-draw.gc | 4 +- .../city/blow-tower/blow-tower-extra.gc | 12 +- .../levels/city/blow-tower/blow-tower-obs2.gc | 6 +- .../city/blow-tower/blow-tower-shared.gc | 2 +- .../levels/city/blow-tower/cty-blow-tower.gc | 2 +- goal_src/jak3/levels/city/bombbot/bombbot.gc | 20 +- .../jak3/levels/city/common/height-map.gc | 28 +- goal_src/jak3/levels/city/common/nav-graph.gc | 2 +- goal_src/jak3/levels/city/ctywide-obs.gc | 10 +- .../city/destroy-grid/cty-destroy-grid.gc | 8 +- goal_src/jak3/levels/city/farm/ctyfarm-obs.gc | 4 +- goal_src/jak3/levels/city/hijack/billiards.gc | 2 +- .../jak3/levels/city/hijack/kg-vehicles.gc | 4 +- .../levels/city/onintent/onintent-part.gc | 2 +- .../levels/city/port/attack/ctyport-attack.gc | 6 +- .../jak3/levels/city/port/attack/h-torpedo.gc | 4 +- .../levels/city/protect/assault-enemies.gc | 11 +- .../jak3/levels/city/protect/assault-task.gc | 4 +- .../levels/city/protect/protect-gunship.gc | 12 +- .../levels/city/protect/roboguard-city.gc | 2 +- .../levels/city/sniper/cty-sniper-turret.gc | 9 +- .../levels/city/traffic/citizen/citizen.gc | 6 +- .../levels/city/traffic/citizen/civilian.gc | 6 +- .../jak3/levels/city/traffic/citizen/guard.gc | 2 +- .../levels/city/traffic/traffic-engine.gc | 8 +- .../city/traffic/vehicle/vehicle-physics.gc | 2 +- .../city/traffic/vehicle/vehicle-util.gc | 18 +- .../levels/city/traffic/vehicle/vehicle.gc | 45 +-- .../jak3/levels/city/vinroom/power-game.gc | 4 +- goal_src/jak3/levels/comb/comb-mood.gc | 4 +- goal_src/jak3/levels/comb/comb-obs.gc | 4 +- goal_src/jak3/levels/comb/combx-obs.gc | 4 +- goal_src/jak3/levels/comb/h-sled.gc | 10 +- goal_src/jak3/levels/comb/railx-mood.gc | 6 +- goal_src/jak3/levels/common/ai/ashelin/ash.gc | 6 +- goal_src/jak3/levels/common/elec-gate.gc | 10 +- .../common/enemy/darkprec/dp-bipedal-shot.gc | 2 +- .../levels/common/enemy/hover/hover-enemy.gc | 2 +- .../common/enemy/hover/hover-formation.gc | 4 +- .../common/enemy/hover/hover-nav-control.gc | 32 +- .../levels/common/enemy/hover/robo-hover.gc | 8 +- goal_src/jak3/levels/common/enemy/mantis.gc | 4 +- .../common/enemy/prebot-eco-creature.gc | 4 +- .../jak3/levels/common/enemy/roboguard.gc | 10 +- goal_src/jak3/levels/common/enemy/spyder.gc | 2 +- .../levels/common/hvehicle/squad-control.gc | 2 +- .../levels/common/hvehicle/turret-control.gc | 2 +- .../levels/common/hvehicle/vehicle-hud.gc | 8 +- goal_src/jak3/levels/common/race/race-hud.gc | 30 +- goal_src/jak3/levels/common/race/race-mesh.gc | 38 +- .../jak3/levels/desert/boss/deswalk-obs.gc | 16 +- .../levels/desert/boss/terraformer-setup.gc | 18 +- .../jak3/levels/desert/chase/desert-chase.gc | 10 +- .../jak3/levels/desert/chase/desert-jump.gc | 14 +- goal_src/jak3/levels/desert/chase/marauder.gc | 12 +- .../jak3/levels/desert/chase/wcar-catapult.gc | 4 +- .../levels/desert/chase/wcar-marauder-b.gc | 2 +- .../jak3/levels/desert/des-bbush-tasks.gc | 16 +- .../jak3/levels/desert/des-burning-bush.gc | 8 +- goal_src/jak3/levels/desert/des-bush.gc | 8 +- goal_src/jak3/levels/desert/des-cactus.gc | 12 +- goal_src/jak3/levels/desert/desert-mood.gc | 6 +- goal_src/jak3/levels/desert/desert-scenes.gc | 6 +- .../jak3/levels/desert/hover/des-beast-2.gc | 9 +- .../jak3/levels/desert/hover/des-beast.gc | 11 +- .../jak3/levels/desert/hover/desert-hover.gc | 8 +- goal_src/jak3/levels/desert/hover/mh-flyer.gc | 15 +- .../jak3/levels/desert/hover/scorpion-gun.gc | 33 +- .../desert/lizard/desert-lizard-task.gc | 8 +- .../levels/desert/oasis/ash-oasis-course.gc | 6 +- .../jak3/levels/desert/race/course-race.gc | 6 +- .../jak3/levels/desert/race/kleever-rider.gc | 4 +- .../levels/desert/rescue/neo-satellite.gc | 12 +- .../levels/desert/rescue/rope-prim-system.gc | 26 +- .../jak3/levels/desert/rescue/rope-system.gc | 66 ++-- .../levels/desert/rescue/wland-passenger.gc | 2 +- .../levels/desert/wvehicle/w-parking-spot.gc | 2 +- .../desert/wvehicle/was-squad-control.gc | 32 +- .../jak3/levels/desert/wvehicle/wcar-fox.gc | 6 +- .../levels/desert/wvehicle/wcar-marauder.gc | 2 +- .../levels/desert/wvehicle/wcar-mirage.gc | 6 +- .../jak3/levels/desert/wvehicle/wcar-rhino.gc | 2 +- .../levels/desert/wvehicle/wcar-scorpion.gc | 10 +- .../jak3/levels/desert/wvehicle/wcar-snake.gc | 6 +- .../jak3/levels/desert/wvehicle/wcar-toad.gc | 6 +- .../levels/desert/wvehicle/wcar-turtle.gc | 8 +- .../levels/desert/wvehicle/wcar-x-ride.gc | 6 +- goal_src/jak3/levels/desert/wvehicle/wcar.gc | 13 +- .../levels/desert/wvehicle/wvehicle-ai.gc | 4 +- .../levels/desert/wvehicle/wvehicle-hud.gc | 8 +- .../desert/wvehicle/wvehicle-physics.gc | 6 +- .../levels/desert/wvehicle/wvehicle-race.gc | 10 +- .../levels/desert/wvehicle/wvehicle-util.gc | 2 +- .../jak3/levels/desert/wvehicle/wvehicle.gc | 23 +- .../levels/factory/car/hvehicle-effects.gc | 2 +- .../levels/factory/car/hvehicle-physics.gc | 4 +- .../jak3/levels/factory/car/hvehicle-util.gc | 20 +- goal_src/jak3/levels/factory/car/hvehicle.gc | 12 +- .../jak3/levels/factory/car/wcar-faccar.gc | 2 +- goal_src/jak3/levels/factory/conveyor.gc | 2 +- goal_src/jak3/levels/factory/fac-gunturret.gc | 2 +- .../levels/factory/fac-robotank-turret.gc | 4 +- goal_src/jak3/levels/factory/fac-robotank.gc | 4 +- goal_src/jak3/levels/factory/fac-tower.gc | 4 +- .../jak3/levels/factory/factory-boss-setup.gc | 16 +- goal_src/jak3/levels/factory/factory-hud.gc | 8 +- .../jak3/levels/factory/factory-manager.gc | 4 +- goal_src/jak3/levels/factory/factory-part.gc | 2 +- goal_src/jak3/levels/factory/factoryc-obs2.gc | 5 +- goal_src/jak3/levels/factory/h-warf.gc | 9 +- goal_src/jak3/levels/factory/lfaccity-mood.gc | 2 +- goal_src/jak3/levels/factory/lfacrm1-mood.gc | 10 +- goal_src/jak3/levels/factory/missile-bot.gc | 17 +- goal_src/jak3/levels/forest/for-turret.gc | 62 ++-- .../jak3/levels/forest/forest-kill-plants.gc | 10 +- goal_src/jak3/levels/forest/forest-part.gc | 8 +- .../jak3/levels/forest/forest-ring-chase.gc | 8 +- goal_src/jak3/levels/forest/forest-tasks.gc | 10 +- goal_src/jak3/levels/forest/foresta-obs.gc | 2 +- goal_src/jak3/levels/forest/neo-spawner.gc | 4 +- goal_src/jak3/levels/glider/glider-hud.gc | 13 +- goal_src/jak3/levels/glider/glider-ring.gc | 2 +- goal_src/jak3/levels/glider/h-glider.gc | 2 +- .../jak3/levels/gungame/gun-dummy-part.gc | 2 +- .../jak3/levels/mhcity/destroy-dark-eco.gc | 8 +- goal_src/jak3/levels/mine/gekko.gc | 8 +- goal_src/jak3/levels/mine/manta.gc | 13 +- goal_src/jak3/levels/mine/mined-mood.gc | 4 +- goal_src/jak3/levels/mine/prebot-part.gc | 8 +- goal_src/jak3/levels/mine/prebot-states.gc | 26 +- goal_src/jak3/levels/mine/rat.gc | 4 +- goal_src/jak3/levels/nest/egg-spider.gc | 18 +- goal_src/jak3/levels/nest/mh-bat.gc | 19 +- .../jak3/levels/nest/mh-centipede-part.gc | 12 +- goal_src/jak3/levels/nest/mh-centipede.gc | 20 +- .../jak3/levels/palace/roof/palroof-part.gc | 2 +- .../jak3/levels/precursor/precura-obs2.gc | 6 +- goal_src/jak3/levels/sewer/kg-hopper.gc | 2 +- .../jak3/levels/sewer/saberfish-spawner.gc | 2 +- goal_src/jak3/levels/sewer/saberfish.gc | 2 +- goal_src/jak3/levels/sewer/sew-platforms.gc | 4 +- .../jak3/levels/sewer/sewer-move-turret.gc | 8 +- .../jak3/levels/stadium/dm-mine-spider.gc | 6 +- goal_src/jak3/levels/stadium/rubble-part.gc | 2 +- goal_src/jak3/levels/temple/flamer-hover.gc | 2 +- goal_src/jak3/levels/temple/hover-training.gc | 8 +- goal_src/jak3/levels/temple/temple-mood.gc | 2 +- goal_src/jak3/levels/temple/templex-mood.gc | 2 +- goal_src/jak3/levels/volcano/flamer-lava.gc | 2 +- goal_src/jak3/levels/volcano/spiky-frog.gc | 2 +- goal_src/jak3/levels/volcano/volcano-obs.gc | 2 +- goal_src/jak3/levels/volcano/volcano-part.gc | 4 +- .../wascity/bbush/des-bush-time-chase.gc | 10 +- .../jak3/levels/wascity/chase/kanga-lizard.gc | 8 +- goal_src/jak3/levels/wascity/ctymark-obs.gc | 4 +- goal_src/jak3/levels/wascity/traffic-util.gc | 22 +- goal_src/jak3/levels/wascity/wasall-tasks.gc | 2 +- .../jak3/levels/wascity/wascity-turret.gc | 4 +- goal_src/jak3/levels/wascity/wasdef-hud.gc | 4 +- goal_src/jak3/levels/wascity/wasgun-hud.gc | 4 +- .../levels/wascity/wasstadium/nst-tasks.gc | 10 +- .../wascity/wasstadium/wasstada-part.gc | 2 +- .../levels/wascity/wasstadium/wasstadb-obs.gc | 8 +- goal_src/jak3/levels/wascity/waswide-obs.gc | 2 +- .../reference/jak1/engine/anim/aligner_REF.gc | 12 +- .../jak1/engine/anim/joint-mod-h_REF.gc | 7 +- .../reference/jak1/engine/anim/joint_REF.gc | 4 +- .../jak1/engine/camera/cam-combiner_REF.gc | 34 +- .../jak1/engine/camera/cam-states-dbg_REF.gc | 10 +- .../jak1/engine/camera/cam-states_REF.gc | 20 +- .../jak1/engine/camera/camera_REF.gc | 84 ++--- .../engine/collide/collide-edge-grab_REF.gc | 50 +-- .../jak1/engine/collide/collide-func_REF.gc | 100 +++--- .../jak1/engine/collide/collide-mesh_REF.gc | 27 +- .../engine/collide/collide-shape-rider_REF.gc | 16 +- .../jak1/engine/collide/collide-touch_REF.gc | 11 +- .../jak1/engine/collide/main-collide_REF.gc | 18 +- .../engine/common-obs/collectables_REF.gc | 24 +- .../jak1/engine/common-obs/crates_REF.gc | 2 +- .../jak1/engine/common-obs/generic-obs_REF.gc | 8 +- .../jak1/engine/common-obs/nav-enemy_REF.gc | 2 +- .../jak1/engine/common-obs/plat-eco_REF.gc | 2 +- .../engine/common-obs/process-taskable_REF.gc | 18 +- .../jak1/engine/common-obs/ropebridge_REF.gc | 56 +-- .../jak1/engine/common-obs/water_REF.gc | 10 +- .../reference/jak1/engine/debug/debug_REF.gc | 20 +- .../jak1/engine/debug/part-tester_REF.gc | 2 +- .../jak1/engine/draw/drawable_REF.gc | 14 +- .../jak1/engine/draw/process-drawable_REF.gc | 10 +- .../jak1/engine/entity/ambient_REF.gc | 2 +- .../jak1/engine/entity/entity_REF.gc | 2 +- .../reference/jak1/engine/entity/res_REF.gc | 7 +- .../jak1/engine/game/effect-control_REF.gc | 4 +- .../jak1/engine/game/game-save_REF.gc | 9 +- .../jak1/engine/game/projectiles_REF.gc | 14 +- .../jak1/engine/geometry/bounding-box_REF.gc | 20 +- .../jak1/engine/geometry/cylinder_REF.gc | 8 +- .../jak1/engine/geometry/geometry_REF.gc | 146 ++++---- .../engine/gfx/{foreground => }/eye_REF.gc | 8 +- .../jak1/engine/gfx/math-camera_REF.gc | 12 +- .../jak1/engine/gfx/merc/merc_REF.gc | 4 +- .../jak1/engine/gfx/mood/mood-tables_REF.gc | 80 ++--- .../jak1/engine/gfx/mood/mood_REF.gc | 95 ++--- .../jak1/engine/gfx/mood/time-of-day_REF.gc | 6 +- .../jak1/engine/gfx/mood/weather-part_REF.gc | 2 +- .../jak1/engine/gfx/ocean/ocean-mid_REF.gc | 16 +- .../engine/gfx/ocean/ocean-transition_REF.gc | 16 +- .../jak1/engine/gfx/shadow/shadow_REF.gc | 4 +- .../jak1/engine/gfx/sky/sky-tng_REF.gc | 7 +- .../sparticle/sparticle-launcher_REF.gc | 33 +- .../gfx/sprite/sparticle/sparticle_REF.gc | 8 +- .../engine/gfx/sprite/sprite-distort_REF.gc | 6 +- .../jak1/engine/gfx/sprite/sprite_REF.gc | 4 +- .../jak1/engine/gfx/texture/texture_REF.gc | 15 +- .../jak1/engine/gfx/tie/tie-methods_REF.gc | 5 +- .../reference/jak1/engine/level/bsp-h_REF.gc | 2 +- .../reference/jak1/engine/level/bsp_REF.gc | 10 +- .../jak1/engine/level/load-boundary_REF.gc | 2 +- .../reference/jak1/engine/load/loader_REF.gc | 20 +- .../reference/jak1/engine/math/math_REF.gc | 2 +- .../reference/jak1/engine/math/matrix_REF.gc | 94 +++-- .../jak1/engine/math/quaternion_REF.gc | 100 +++--- .../jak1/engine/math/transformq_REF.gc | 14 +- .../jak1/engine/math/vector-h_REF.gc | 14 +- .../reference/jak1/engine/math/vector_REF.gc | 154 ++++---- .../reference/jak1/engine/nav/navigate_REF.gc | 51 ++- .../reference/jak1/engine/ps2/rpc-h_REF.gc | 2 +- .../target/collide-reaction-target_REF.gc | 18 +- .../jak1/engine/target/logic-target_REF.gc | 35 +- .../jak1/engine/target/sidekick_REF.gc | 4 +- .../jak1/engine/target/target-death_REF.gc | 6 +- .../jak1/engine/target/target-handler_REF.gc | 4 +- .../jak1/engine/target/target-part_REF.gc | 12 +- .../jak1/engine/target/target-util_REF.gc | 6 +- .../jak1/engine/target/target2_REF.gc | 14 +- .../reference/jak1/engine/ui/text_REF.gc | 16 +- .../reference/jak1/kernel/gkernel_REF.gc | 3 +- .../jak1/levels/beach/lurkercrab_REF.gc | 2 +- .../jak1/levels/beach/pelican_REF.gc | 2 +- .../jak1/levels/beach/seagull_REF.gc | 4 +- .../jak1/levels/citadel/citadel-part_REF.gc | 4 +- .../jak1/levels/common/blocking-plane_REF.gc | 8 +- .../jak1/levels/finalboss/final-door_REF.gc | 2 +- .../levels/finalboss/robotboss-weapon_REF.gc | 2 +- .../jak1/levels/finalboss/robotboss_REF.gc | 23 +- .../levels/flut_common/target-flut_REF.gc | 24 +- .../jak1/levels/jungle/fisher_REF.gc | 4 +- .../jak1/levels/jungle/jungle-mirrors_REF.gc | 4 +- .../jak1/levels/jungle/jungle-obs_REF.gc | 2 +- .../jak1/levels/jungle/junglesnake_REF.gc | 10 +- .../jak1/levels/jungleb/plant-boss_REF.gc | 4 +- .../levels/lavatube/lavatube-energy_REF.gc | 2 +- .../jak1/levels/lavatube/lavatube-obs_REF.gc | 4 +- .../levels/maincave/driller-lurker_REF.gc | 7 +- .../jak1/levels/maincave/maincave-obs_REF.gc | 6 +- .../levels/maincave/mother-spider-proj_REF.gc | 2 +- .../jak1/levels/maincave/mother-spider_REF.gc | 12 +- .../jak1/levels/misty/mistycannon_REF.gc | 6 +- .../reference/jak1/levels/misty/muse_REF.gc | 10 +- .../jak1/levels/misty/quicksandlurker_REF.gc | 2 +- .../jak1/levels/ogre/ogreboss_REF.gc | 4 +- .../levels/racer_common/racer-states_REF.gc | 2 +- .../levels/racer_common/target-racer_REF.gc | 2 +- .../rolling/rolling-lightning-mole_REF.gc | 2 +- .../levels/rolling/rolling-race-ring_REF.gc | 2 +- .../jak1/levels/rolling/rolling-robber_REF.gc | 2 +- .../jak1/levels/snow/snow-ram-boss_REF.gc | 4 +- .../reference/jak1/levels/sunken/bully_REF.gc | 10 +- .../jak1/levels/sunken/double-lurker_REF.gc | 8 +- .../jak1/levels/sunken/puffer_REF.gc | 2 +- .../jak1/levels/sunken/steam-cap_REF.gc | 12 +- .../levels/sunken/sun-exit-chamber_REF.gc | 4 +- .../jak1/levels/sunken/sunken-fish_REF.gc | 4 +- .../jak1/levels/sunken/target-tube_REF.gc | 2 +- .../jak1/levels/swamp/swamp-bat_REF.gc | 2 +- .../levels/village1/fishermans-boat_REF.gc | 10 +- .../jak1/levels/village1/yakow_REF.gc | 2 +- .../jak1/levels/village2/swamp-blimp_REF.gc | 48 ++- .../jak1/levels/village3/village3-obs_REF.gc | 4 +- .../reference/jak2/engine/ai/enemy_REF.gc | 2 +- .../jak2/engine/ambient/ambient_REF.gc | 2 +- .../reference/jak2/engine/anim/aligner_REF.gc | 12 +- .../jak2/engine/anim/fma-sphere_REF.gc | 4 +- .../jak2/engine/anim/joint-exploder_REF.gc | 4 +- .../jak2/engine/anim/joint-mod-h_REF.gc | 18 +- .../jak2/engine/anim/joint-mod_REF.gc | 30 +- .../reference/jak2/engine/anim/joint_REF.gc | 36 +- .../jak2/engine/camera/cam-combiner_REF.gc | 34 +- .../jak2/engine/camera/cam-debug_REF.gc | 76 ++-- .../jak2/engine/camera/cam-states-dbg_REF.gc | 10 +- .../jak2/engine/camera/cam-states_REF.gc | 24 +- .../jak2/engine/camera/cam-update_REF.gc | 2 +- .../jak2/engine/camera/camera_REF.gc | 64 ++-- .../jak2/engine/collide/collide-cache_REF.gc | 94 ++--- .../jak2/engine/collide/collide-debug_REF.gc | 24 +- .../engine/collide/collide-edge-grab_REF.gc | 48 +-- .../jak2/engine/collide/collide-mesh_REF.gc | 20 +- .../engine/collide/collide-shape-rider_REF.gc | 29 +- .../jak2/engine/collide/collide-shape_REF.gc | 258 +++++++------- .../jak2/engine/collide/collide-touch_REF.gc | 11 +- .../jak2/engine/collide/find-nearest_REF.gc | 2 +- .../jak2/engine/collide/main-collide_REF.gc | 18 +- .../engine/common_objs/blocking-plane_REF.gc | 6 +- .../engine/common_objs/collectables_REF.gc | 12 +- .../jak2/engine/common_objs/conveyor_REF.gc | 26 +- .../jak2/engine/common_objs/crates_REF.gc | 2 +- .../jak2/engine/common_objs/elevator_REF.gc | 2 +- .../engine/common_objs/generic-obs_REF.gc | 4 +- .../jak2/engine/common_objs/projectile_REF.gc | 4 +- .../jak2/engine/common_objs/voicebox_REF.gc | 6 +- .../jak2/engine/common_objs/water-flow_REF.gc | 38 +- .../jak2/engine/common_objs/water_REF.gc | 2 +- .../reference/jak2/engine/debug/debug_REF.gc | 31 +- .../jak2/engine/debug/editable-player_REF.gc | 16 +- .../jak2/engine/debug/editable_REF.gc | 9 +- .../engine/debug/nav/nav-graph-editor_REF.gc | 81 +++-- .../jak2/engine/debug/part-tester_REF.gc | 2 +- .../jak2/engine/draw/drawable_REF.gc | 10 +- .../reference/jak2/engine/entity/res_REF.gc | 6 +- .../jak2/engine/game/effect-control_REF.gc | 4 +- .../jak2/engine/game/game-save_REF.gc | 29 +- .../jak2/engine/game/idle-control_REF.gc | 4 +- .../reference/jak2/engine/game/main_REF.gc | 6 +- .../jak2/engine/geometry/bounding-box_REF.gc | 20 +- .../jak2/engine/geometry/cylinder_REF.gc | 24 +- .../jak2/engine/geometry/geometry_REF.gc | 176 +++++----- .../jak2/engine/gfx/foreground/eye_REF.gc | 14 +- .../engine/gfx/foreground/lightning_REF.gc | 48 +-- .../engine/gfx/foreground/merc/emerc_REF.gc | 3 +- .../engine/gfx/foreground/merc/merc_REF.gc | 2 +- .../jak2/engine/gfx/math-camera_REF.gc | 12 +- .../jak2/engine/gfx/mood/mood-funcs2_REF.gc | 18 +- .../jak2/engine/gfx/mood/mood-funcs_REF.gc | 2 +- .../jak2/engine/gfx/mood/mood-tables2_REF.gc | 8 +- .../jak2/engine/gfx/mood/mood_REF.gc | 22 +- .../jak2/engine/gfx/mood/time-of-day_REF.gc | 8 +- .../jak2/engine/gfx/mood/weather-part_REF.gc | 6 +- .../jak2/engine/gfx/ocean/ocean-mid_REF.gc | 16 +- .../engine/gfx/ocean/ocean-transition_REF.gc | 16 +- .../jak2/engine/gfx/ocean/ocean_REF.gc | 36 +- .../jak2/engine/gfx/sky/sky-tng_REF.gc | 8 +- .../particles/sparticle-launcher_REF.gc | 52 +-- .../engine/gfx/sprite/sprite-distort_REF.gc | 6 +- .../jak2/engine/gfx/sprite/sprite_REF.gc | 4 +- .../engine/gfx/texture/texture-anim_REF.gc | 16 +- .../reference/jak2/engine/level/bsp_REF.gc | 8 +- .../reference/jak2/engine/level/region_REF.gc | 4 +- .../jak2/engine/load/load-dgo_REF.gc | 34 +- .../reference/jak2/engine/load/loader_REF.gc | 18 +- .../reference/jak2/engine/math/math_REF.gc | 2 +- .../reference/jak2/engine/math/matrix_REF.gc | 222 ++++++------ .../jak2/engine/math/quaternion_REF.gc | 100 +++--- .../jak2/engine/math/transformq_REF.gc | 18 +- .../jak2/engine/math/vector-h_REF.gc | 14 +- .../reference/jak2/engine/math/vector_REF.gc | 172 ++++----- .../jak2/engine/nav/nav-control_REF.gc | 306 ++++++++-------- .../jak2/engine/nav/nav-enemy_REF.gc | 52 +-- .../jak2/engine/nav/nav-mesh-h_REF.gc | 30 +- .../reference/jak2/engine/nav/nav-mesh_REF.gc | 112 +++--- .../jak2/engine/physics/chain-physics_REF.gc | 56 +-- .../jak2/engine/physics/rigid-body_REF.gc | 54 +-- .../jak2/engine/physics/trajectory_REF.gc | 14 +- .../process-drawable/process-drawable_REF.gc | 14 +- .../reference/jak2/engine/ps2/rpc-h_REF.gc | 2 +- .../reference/jak2/engine/sound/speech_REF.gc | 2 +- .../engine/spatial-hash/actor-hash_REF.gc | 2 +- .../engine/spatial-hash/collide-hash_REF.gc | 12 +- .../engine/spatial-hash/spatial-hash_REF.gc | 2 +- .../engine/target/board/board-states_REF.gc | 8 +- .../engine/target/board/target-board_REF.gc | 24 +- .../target/collide-reaction-target_REF.gc | 42 +-- .../engine/target/gun/gun-blue-shot_REF.gc | 8 +- .../engine/target/gun/gun-dark-shot_REF.gc | 6 +- .../engine/target/gun/gun-red-shot_REF.gc | 18 +- .../jak2/engine/target/gun/gun-util_REF.gc | 24 +- .../engine/target/gun/gun-yellow-shot_REF.gc | 6 +- .../jak2/engine/target/logic-target_REF.gc | 81 ++--- .../jak2/engine/target/mech/carry-h_REF.gc | 2 +- .../jak2/engine/target/mech/grunt-mech_REF.gc | 22 +- .../jak2/engine/target/mech/mech-part_REF.gc | 6 +- .../engine/target/mech/mech-states_REF.gc | 8 +- .../jak2/engine/target/mech/mech_REF.gc | 2 +- .../jak2/engine/target/sidekick_REF.gc | 6 +- .../jak2/engine/target/target-darkjak_REF.gc | 4 +- .../jak2/engine/target/target-death_REF.gc | 4 +- .../jak2/engine/target/target-gun_REF.gc | 28 +- .../jak2/engine/target/target-handler_REF.gc | 6 +- .../jak2/engine/target/target-part_REF.gc | 28 +- .../jak2/engine/target/target-tube_REF.gc | 2 +- .../engine/target/target-turret-shot_REF.gc | 6 +- .../jak2/engine/target/target-turret_REF.gc | 70 ++-- .../jak2/engine/target/target-util_REF.gc | 8 +- .../jak2/engine/target/target2_REF.gc | 4 +- .../reference/jak2/engine/ui/bigmap_REF.gc | 6 +- .../jak2/engine/ui/hud-classes_REF.gc | 175 ++++----- .../reference/jak2/engine/ui/minimap_REF.gc | 12 +- .../engine/ui/progress/progress-draw_REF.gc | 46 ++- .../reference/jak2/engine/ui/text_REF.gc | 4 +- .../reference/jak2/engine/util/profile_REF.gc | 2 +- .../reference/jak2/kernel/gkernel_REF.gc | 2 +- .../jak2/levels/atoll/ash1-course_REF.gc | 6 +- .../jak2/levels/atoll/atoll-part_REF.gc | 6 +- .../jak2/levels/atoll/sig0-course_REF.gc | 16 +- .../levels/castle/boss/castle-baron_REF.gc | 24 +- .../jak2/levels/castle/roboguard-level_REF.gc | 6 +- .../jak2/levels/city/bombbot/bombbot_REF.gc | 153 ++++---- .../city/burning-bush/ctywide-bbush_REF.gc | 26 +- .../jak2/levels/city/common/height-map_REF.gc | 36 +- .../jak2/levels/city/common/nav-graph_REF.gc | 16 +- .../levels/city/common/pilot-states_REF.gc | 12 +- .../levels/city/common/target-pilot_REF.gc | 4 +- .../jak2/levels/city/common/trail_REF.gc | 10 +- .../jak2/levels/city/ctyport-obs_REF.gc | 52 +-- .../jak2/levels/city/ctywide-obs_REF.gc | 108 +++--- .../jak2/levels/city/ctywide-part_REF.gc | 4 +- .../jak2/levels/city/farm/ctyfarm-obs_REF.gc | 10 +- .../city/kiddogescort/crocesc-states_REF.gc | 8 +- .../city/kiddogescort/crocesc4-course_REF.gc | 18 +- .../city/kiddogescort/hal4-course_REF.gc | 16 +- .../city/kiddogescort/kidesc4-course_REF.gc | 2 +- .../city/market/ashelin/ash4-course_REF.gc | 2 +- .../city/meet-brutter/meet-brutter_REF.gc | 60 ++-- .../levels/city/onintent/onintent-part_REF.gc | 2 +- .../levels/city/package/delivery-task_REF.gc | 8 +- .../levels/city/port/portrun/portrun_REF.gc | 26 +- .../jak2/levels/city/power/ctypower_REF.gc | 8 +- .../levels/city/sack/collection-task_REF.gc | 8 +- .../jak2/levels/city/shuttle/shuttle_REF.gc | 24 +- .../levels/city/slums/kor/kid3-course_REF.gc | 2 +- .../levels/city/slums/kor/kor3-course_REF.gc | 2 +- .../city/traffic/citizen/citizen_REF.gc | 18 +- .../city/traffic/citizen/civilian_REF.gc | 18 +- .../levels/city/traffic/citizen/guard_REF.gc | 112 +++--- .../traffic/citizen/metalhead-grunt_REF.gc | 8 +- .../traffic/citizen/metalhead-predator_REF.gc | 22 +- .../levels/city/traffic/traffic-engine_REF.gc | 91 ++--- .../traffic/vehicle/vehicle-control_REF.gc | 42 +-- .../traffic/vehicle/vehicle-effects_REF.gc | 20 +- .../city/traffic/vehicle/vehicle-guard_REF.gc | 22 +- .../traffic/vehicle/vehicle-physics_REF.gc | 28 +- .../traffic/vehicle/vehicle-states_REF.gc | 16 +- .../city/traffic/vehicle/vehicle-util_REF.gc | 32 +- .../city/traffic/vehicle/vehicle_REF.gc | 45 +-- .../levels/common/ai/ashelin/ash-shot_REF.gc | 6 +- .../jak2/levels/common/ai/ashelin/ash_REF.gc | 14 +- .../jak2/levels/common/ai/bot_REF.gc | 50 +-- .../levels/common/ai/ruffian/ruf-task_REF.gc | 2 +- .../jak2/levels/common/ai/sig/sig-shot_REF.gc | 6 +- .../jak2/levels/common/ai/sig/sig-task_REF.gc | 2 +- .../jak2/levels/common/ai/sig/sig_REF.gc | 18 +- .../jak2/levels/common/battle_REF.gc | 8 +- .../jak2/levels/common/elec-gate_REF.gc | 10 +- .../jak2/levels/common/enemy/centurion_REF.gc | 20 +- .../levels/common/enemy/fodder/fodder_REF.gc | 2 +- .../jak2/levels/common/enemy/grunt_REF.gc | 8 +- .../enemy/guards/crimson-guard-level_REF.gc | 88 ++--- .../jak2/levels/common/enemy/hopper_REF.gc | 6 +- .../levels/common/enemy/hover/flamer_REF.gc | 8 +- .../common/enemy/hover/hover-enemy_REF.gc | 16 +- .../enemy/hover/hover-nav-control_REF.gc | 18 +- .../common/enemy/hover/hover-nav-edit_REF.gc | 8 +- .../jak2/levels/common/enemy/spyder_REF.gc | 22 +- .../levels/common/entities/gun-buoy_REF.gc | 4 +- .../levels/common/entities/spydroid_REF.gc | 4 +- .../levels/common/guard-projectile_REF.gc | 6 +- .../levels/common/metalhead-projectile_REF.gc | 8 +- .../jak2/levels/common/race/race-hud_REF.gc | 60 ++-- .../levels/common/race/race-manager_REF.gc | 38 +- .../jak2/levels/common/race/race-mesh_REF.gc | 56 ++- .../jak2/levels/common/race/race-obs_REF.gc | 2 +- .../levels/common/race/vehicle-racer_REF.gc | 60 ++-- .../jak2/levels/consite/consite-scenes_REF.gc | 14 +- .../jak2/levels/dig/dig-digger_REF.gc | 46 ++- .../reference/jak2/levels/dig/dig-obs_REF.gc | 8 +- .../levels/drill/drill-mech-master_REF.gc | 14 +- .../jak2/levels/drill/drill-obs_REF.gc | 36 +- .../jak2/levels/drill/drill-panel_REF.gc | 2 +- .../reference/jak2/levels/drill/ginsu_REF.gc | 4 +- .../reference/jak2/levels/forest/fish_REF.gc | 74 ++-- .../jak2/levels/forest/pegasus_REF.gc | 2 +- .../jak2/levels/forest/predator_REF.gc | 46 ++- .../reference/jak2/levels/forest/wren_REF.gc | 8 +- .../levels/fortress/dump/fordumpc-obs_REF.gc | 18 +- .../fortress/dump/fort-robotank-turret_REF.gc | 10 +- .../levels/fortress/dump/fort-robotank_REF.gc | 4 +- .../levels/fortress/prison/prison-obs_REF.gc | 2 +- .../jak2/levels/gungame/gun-dummy_REF.gc | 10 +- .../jak2/levels/gungame/gungame-obs_REF.gc | 6 +- .../jak2/levels/hiphog/hiphog-part_REF.gc | 12 +- .../jak2/levels/intro/vortex-data_REF.gc | 2 +- .../mountain/canyon/canyon-scenes_REF.gc | 6 +- .../jak2/levels/mountain/mountain-obs_REF.gc | 41 +-- .../levels/nest/boss/metalkor-extras_REF.gc | 72 ++-- .../levels/nest/boss/metalkor-setup_REF.gc | 8 +- .../levels/nest/boss/metalkor-states_REF.gc | 48 +-- .../jak2/levels/nest/boss/nestb-scenes_REF.gc | 14 +- .../jak2/levels/nest/flying-spider_REF.gc | 4 +- .../reference/jak2/levels/nest/mammoth_REF.gc | 97 +++-- .../reference/jak2/levels/nest/mantis_REF.gc | 22 +- .../jak2/levels/outro/credits_REF.gc | 6 +- .../levels/palace/boss/squid-extras_REF.gc | 29 +- .../levels/palace/boss/squid-setup_REF.gc | 94 ++--- .../levels/palace/boss/squid-states_REF.gc | 6 +- .../levels/palace/cable/palcab-obs_REF.gc | 2 +- .../levels/palace/throne/palace-scenes_REF.gc | 2 +- .../jak2/levels/ruins/mechtest-obs_REF.gc | 10 +- .../jak2/levels/ruins/rapid-gunner_REF.gc | 12 +- .../jak2/levels/sewer/escort/jinx_REF.gc | 18 +- .../jak2/levels/sewer/grim2-course_REF.gc | 2 +- .../jak2/levels/sewer/hosehead_REF.gc | 100 +++--- .../jak2/levels/sewer/jinx2-course_REF.gc | 2 +- .../jak2/levels/sewer/mog2-course_REF.gc | 2 +- .../jak2/levels/sewer/sewer-part_REF.gc | 4 +- .../jak2/levels/sewer/sewer-scenes_REF.gc | 8 +- .../levels/stadium/skate/skatea-obs_REF.gc | 6 +- .../jak2/levels/stadium/stadium-obs_REF.gc | 24 +- .../jak2/levels/strip/strip-obs_REF.gc | 10 +- .../jak2/levels/tomb/target-indax_REF.gc | 2 +- .../jak2/levels/tomb/tomb-beetle_REF.gc | 35 +- .../jak2/levels/tomb/tomb-obs_REF.gc | 28 +- .../jak2/levels/tomb/widow-baron_REF.gc | 6 +- .../jak2/levels/tomb/widow-extras_REF.gc | 32 +- .../jak2/levels/under/jellyfish_REF.gc | 12 +- .../jak2/levels/under/sig5-course_REF.gc | 26 +- .../jak2/levels/under/under-obs_REF.gc | 44 ++- .../levels/under/under-shoot-block_REF.gc | 36 +- .../jak2/levels/under/underb-master_REF.gc | 6 +- .../reference/jak3/engine/ai/enemy_REF.gc | 4 +- .../jak3/engine/ambient/ambient_REF.gc | 2 +- .../reference/jak3/engine/anim/aligner_REF.gc | 14 +- .../jak3/engine/anim/fma-sphere_REF.gc | 4 +- .../jak3/engine/anim/joint-exploder_REF.gc | 12 +- .../jak3/engine/anim/joint-mod-h_REF.gc | 19 +- .../jak3/engine/anim/joint-mod_REF.gc | 58 ++- .../reference/jak3/engine/anim/joint_REF.gc | 34 +- .../jak3/engine/camera/cam-combiner_REF.gc | 10 +- .../jak3/engine/camera/cam-master_REF.gc | 6 +- .../jak3/engine/camera/cam-states-dbg_REF.gc | 26 +- .../jak3/engine/camera/cam-states_REF.gc | 30 +- .../jak3/engine/camera/cam-update_REF.gc | 2 +- .../jak3/engine/camera/camera_REF.gc | 49 ++- .../jak3/engine/collide/collide-cache_REF.gc | 86 ++--- .../jak3/engine/collide/collide-debug_REF.gc | 20 +- .../engine/collide/collide-edge-grab_REF.gc | 56 ++- .../jak3/engine/collide/collide-mesh_REF.gc | 36 +- .../engine/collide/collide-shape-rider_REF.gc | 31 +- .../jak3/engine/collide/collide-shape_REF.gc | 260 +++++++------- .../jak3/engine/collide/collide-touch_REF.gc | 13 +- .../jak3/engine/collide/find-nearest_REF.gc | 4 +- .../jak3/engine/collide/los-control_REF.gc | 4 +- .../jak3/engine/collide/main-collide_REF.gc | 18 +- .../common-obs/collectables-part_REF.gc | 4 +- .../engine/common-obs/collectables_REF.gc | 14 +- .../jak3/engine/common-obs/crates_REF.gc | 2 +- .../jak3/engine/common-obs/debris_REF.gc | 28 +- .../jak3/engine/common-obs/elevator_REF.gc | 2 +- .../jak3/engine/common-obs/gem-pool_REF.gc | 4 +- .../jak3/engine/common-obs/generic-obs_REF.gc | 6 +- .../engine/common-obs/guard-projectile_REF.gc | 6 +- .../common-obs/metalhead-projectile_REF.gc | 8 +- .../jak3/engine/common-obs/projectile_REF.gc | 4 +- .../jak3/engine/common-obs/voicebox_REF.gc | 6 +- .../jak3/engine/common-obs/water-flow_REF.gc | 52 +-- .../jak3/engine/common-obs/water_REF.gc | 2 +- .../jak3/engine/debug/collision-editor_REF.gc | 13 +- .../reference/jak3/engine/debug/debug_REF.gc | 20 +- .../jak3/engine/debug/manipulator_REF.gc | 131 ++++--- .../jak3/engine/draw/drawable_REF.gc | 30 +- .../reference/jak3/engine/entity/res_REF.gc | 7 +- .../jak3/engine/game/effect-control_REF.gc | 4 +- .../jak3/engine/game/game-save_REF.gc | 8 +- .../reference/jak3/engine/game/main_REF.gc | 6 +- .../jak3/engine/geometry/bounding-box_REF.gc | 20 +- .../jak3/engine/geometry/geometry_REF.gc | 132 +++---- .../gfx/background/hfrag/hfrag-work_REF.gc | 6 +- .../engine/gfx/background/hfrag/hfrag_REF.gc | 4 +- .../gfx/background/tie/tie-methods_REF.gc | 15 +- .../engine/gfx/foreground/foreground_REF.gc | 8 +- .../engine/gfx/foreground/merc/emerc_REF.gc | 2 +- .../engine/gfx/foreground/merc/merc_REF.gc | 2 +- .../generic/lightning/lightning-new_REF.gc | 4 +- .../gfx/generic/lightning/lightning_REF.gc | 48 +-- .../jak3/engine/gfx/math-camera_REF.gc | 12 +- .../jak3/engine/gfx/mood/mood-funcs2_REF.gc | 17 +- .../jak3/engine/gfx/mood/mood-tables2_REF.gc | 8 +- .../jak3/engine/gfx/mood/mood_REF.gc | 37 +- .../jak3/engine/gfx/ocean/ocean-mid_REF.gc | 16 +- .../engine/gfx/ocean/ocean-transition_REF.gc | 16 +- .../jak3/engine/gfx/sky/sky-tng_REF.gc | 2 +- .../gfx/sprite/particles/light-trails_REF.gc | 2 +- .../particles/sparticle-launcher_REF.gc | 64 ++-- .../engine/gfx/sprite/sprite-distort_REF.gc | 6 +- .../jak3/engine/gfx/sprite/sprite_REF.gc | 4 +- .../reference/jak3/engine/level/bsp_REF.gc | 8 +- .../reference/jak3/engine/level/region_REF.gc | 4 +- .../jak3/engine/load/load-dgo_REF.gc | 34 +- .../reference/jak3/engine/load/loader_REF.gc | 52 ++- .../reference/jak3/engine/math/math_REF.gc | 2 +- .../reference/jak3/engine/math/matrix_REF.gc | 210 +++++------ .../jak3/engine/math/quaternion_REF.gc | 96 ++--- .../jak3/engine/math/transformq_REF.gc | 16 +- .../jak3/engine/math/vector-h_REF.gc | 14 +- .../reference/jak3/engine/math/vector_REF.gc | 180 +++++----- .../jak3/engine/nav/nav-control_REF.gc | 331 +++++++++--------- .../jak3/engine/nav/nav-enemy_REF.gc | 34 +- .../jak3/engine/nav/nav-engine_REF.gc | 14 +- .../jak3/engine/nav/nav-mesh-h_REF.gc | 30 +- .../reference/jak3/engine/nav/nav-mesh_REF.gc | 92 ++--- .../jak3/engine/physics/chain-physics_REF.gc | 44 +-- .../jak3/engine/physics/cloth_REF.gc | 96 +++-- .../jak3/engine/physics/ragdoll-edit_REF.gc | 2 +- .../jak3/engine/physics/ragdoll_REF.gc | 81 ++--- .../jak3/engine/physics/rigid-body_REF.gc | 70 ++-- .../jak3/engine/physics/trajectory_REF.gc | 14 +- .../process-drawable/process-drawable_REF.gc | 18 +- .../reference/jak3/engine/sound/speech_REF.gc | 2 +- .../engine/spatial-hash/actor-hash_REF.gc | 21 +- .../engine/spatial-hash/collide-hash_REF.gc | 12 +- .../engine/spatial-hash/spatial-hash_REF.gc | 10 +- .../engine/target/board/board-states_REF.gc | 10 +- .../engine/target/board/target-board_REF.gc | 40 +-- .../target/collide-reaction-target_REF.gc | 8 +- .../jak3/engine/target/flut/flut-racer_REF.gc | 16 +- .../jak3/engine/target/flut/flut_REF.gc | 2 +- .../engine/target/flut/target-flut_REF.gc | 48 +-- .../engine/target/gun/gun-blue-shot_REF.gc | 22 +- .../engine/target/gun/gun-dark-shot_REF.gc | 10 +- .../engine/target/gun/gun-red-shot_REF.gc | 44 +-- .../jak3/engine/target/gun/gun-util_REF.gc | 8 +- .../engine/target/gun/gun-yellow-shot_REF.gc | 14 +- .../engine/target/indax/target-indax_REF.gc | 4 +- .../jak3/engine/target/logic-target_REF.gc | 81 ++--- .../jak3/engine/target/mech/mech-part_REF.gc | 6 +- .../engine/target/mech/mech-states_REF.gc | 8 +- .../jak3/engine/target/mech/mech_REF.gc | 2 +- .../engine/target/mech/target-mech_REF.gc | 68 ++-- .../jak3/engine/target/pilot-states_REF.gc | 12 +- .../jak3/engine/target/sidekick_REF.gc | 6 +- .../jak3/engine/target/target-darkjak_REF.gc | 10 +- .../jak3/engine/target/target-death_REF.gc | 22 +- .../jak3/engine/target/target-gun_REF.gc | 22 +- .../jak3/engine/target/target-handler_REF.gc | 6 +- .../engine/target/target-invisible_REF.gc | 2 +- .../jak3/engine/target/target-launch_REF.gc | 4 +- .../jak3/engine/target/target-lightjak_REF.gc | 12 +- .../jak3/engine/target/target-part_REF.gc | 28 +- .../jak3/engine/target/target-tube_REF.gc | 2 +- .../engine/target/target-turret-shot_REF.gc | 6 +- .../jak3/engine/target/target-turret_REF.gc | 10 +- .../jak3/engine/target/target-util_REF.gc | 8 +- .../jak3/engine/target/target2_REF.gc | 4 +- .../reference/jak3/engine/ui/bigmap_REF.gc | 10 +- .../jak3/engine/ui/hud-classes_REF.gc | 125 +++---- .../reference/jak3/engine/ui/minimap_REF.gc | 12 +- .../engine/ui/progress/progress-draw_REF.gc | 4 +- .../reference/jak3/engine/util/profile_REF.gc | 6 +- .../reference/jak3/kernel/gkernel_REF.gc | 4 +- .../city/blow-tower/blow-tower-extra_REF.gc | 16 +- .../city/blow-tower/blow-tower-obs2_REF.gc | 28 +- .../city/blow-tower/blow-tower-obs_REF.gc | 4 +- .../city/blow-tower/blow-tower-shared_REF.gc | 6 +- .../city/blow-tower/cty-blow-tower_REF.gc | 2 +- .../jak3/levels/city/bombbot/bombbot_REF.gc | 236 ++++++------- .../levels/city/common/guard-states_REF.gc | 12 +- .../levels/city/common/guard-tazer_REF.gc | 30 +- .../jak3/levels/city/common/height-map_REF.gc | 36 +- .../jak3/levels/city/common/nav-graph_REF.gc | 10 +- .../jak3/levels/city/common/trail_REF.gc | 10 +- .../jak3/levels/city/ctyport-obs_REF.gc | 16 +- .../jak3/levels/city/ctywide-obs_REF.gc | 70 ++-- .../jak3/levels/city/ctywide-part_REF.gc | 8 +- .../city/destroy-grid/cty-destroy-grid_REF.gc | 54 +-- .../jak3/levels/city/farm/ctyfarm-obs_REF.gc | 4 +- .../jak3/levels/city/hijack/billiards_REF.gc | 2 +- .../levels/city/hijack/kg-vehicles_REF.gc | 4 +- .../levels/city/onintent/onintent-part_REF.gc | 6 +- .../city/port/attack/ctyport-attack_REF.gc | 6 +- .../levels/city/port/attack/h-torpedo_REF.gc | 4 +- .../city/protect/assault-enemies_REF.gc | 23 +- .../levels/city/protect/assault-task_REF.gc | 12 +- .../city/protect/protect-gunship_REF.gc | 24 +- .../levels/city/protect/roboguard-city_REF.gc | 2 +- .../city/sniper/cty-sniper-battery_REF.gc | 2 +- .../city/sniper/cty-sniper-turret_REF.gc | 24 +- .../city/traffic/citizen/citizen_REF.gc | 18 +- .../city/traffic/citizen/civilian_REF.gc | 24 +- .../levels/city/traffic/citizen/guard_REF.gc | 66 ++-- .../traffic/citizen/metalhead-grunt_REF.gc | 8 +- .../traffic/citizen/metalhead-predator_REF.gc | 22 +- .../levels/city/traffic/traffic-engine_REF.gc | 32 +- .../traffic/vehicle/vehicle-control_REF.gc | 18 +- .../traffic/vehicle/vehicle-effects_REF.gc | 12 +- .../traffic/vehicle/vehicle-physics_REF.gc | 2 +- .../traffic/vehicle/vehicle-states_REF.gc | 20 +- .../city/traffic/vehicle/vehicle-util_REF.gc | 34 +- .../city/traffic/vehicle/vehicle_REF.gc | 53 +-- .../levels/city/vinroom/power-game_REF.gc | 4 +- .../jak3/levels/comb/comb-field_REF.gc | 18 +- .../jak3/levels/comb/comb-mood_REF.gc | 4 +- .../jak3/levels/comb/comb-obs_REF.gc | 4 +- .../jak3/levels/comb/comb-sentry_REF.gc | 14 +- .../jak3/levels/comb/combx-obs_REF.gc | 4 +- .../reference/jak3/levels/comb/h-sled_REF.gc | 56 +-- .../jak3/levels/comb/railx-mood_REF.gc | 6 +- .../levels/common/ai/ashelin/ash-shot_REF.gc | 6 +- .../jak3/levels/common/ai/ashelin/ash_REF.gc | 14 +- .../jak3/levels/common/ai/bot_REF.gc | 40 +-- .../jak3/levels/common/battle_REF.gc | 8 +- .../jak3/levels/common/elec-gate_REF.gc | 10 +- .../enemy/darkprec/dp-bipedal-shot_REF.gc | 2 +- .../jak3/levels/common/enemy/grunt_REF.gc | 8 +- .../common/enemy/hover/hover-enemy_REF.gc | 10 +- .../common/enemy/hover/hover-formation_REF.gc | 4 +- .../enemy/hover/hover-nav-control_REF.gc | 44 +-- .../common/enemy/hover/robo-hover_REF.gc | 12 +- .../jak3/levels/common/enemy/kg-grunt_REF.gc | 8 +- .../jak3/levels/common/enemy/mantis_REF.gc | 22 +- .../common/enemy/prebot-eco-creature_REF.gc | 4 +- .../jak3/levels/common/enemy/roboguard_REF.gc | 16 +- .../jak3/levels/common/enemy/spyder_REF.gc | 20 +- .../levels/common/enemy/spydroid-orig_REF.gc | 4 +- .../common/hvehicle/squad-control_REF.gc | 14 +- .../common/hvehicle/turret-control_REF.gc | 8 +- .../levels/common/hvehicle/vehicle-hud_REF.gc | 12 +- .../jak3/levels/common/race/race-hud_REF.gc | 34 +- .../levels/common/race/race-manager_REF.gc | 32 +- .../jak3/levels/common/race/race-mesh_REF.gc | 46 +-- .../levels/desert/boss/deswalk-obs_REF.gc | 16 +- .../desert/boss/terraformer-head_REF.gc | 8 +- .../desert/boss/terraformer-setup_REF.gc | 50 ++- .../levels/desert/chase/desert-chase_REF.gc | 8 +- .../levels/desert/chase/desert-jump_REF.gc | 14 +- .../jak3/levels/desert/chase/marauder_REF.gc | 60 ++-- .../levels/desert/chase/wcar-catapult_REF.gc | 4 +- .../desert/chase/wcar-marauder-b_REF.gc | 2 +- .../jak3/levels/desert/des-bbush-tasks_REF.gc | 16 +- .../levels/desert/des-burning-bush_REF.gc | 38 +- .../jak3/levels/desert/des-bush_REF.gc | 24 +- .../jak3/levels/desert/des-cactus_REF.gc | 36 +- .../jak3/levels/desert/desert-mood_REF.gc | 10 +- .../jak3/levels/desert/desert-scenes_REF.gc | 6 +- .../levels/desert/hover/des-beast-2_REF.gc | 15 +- .../jak3/levels/desert/hover/des-beast_REF.gc | 31 +- .../levels/desert/hover/desert-hover_REF.gc | 12 +- .../jak3/levels/desert/hover/mh-flyer_REF.gc | 15 +- .../levels/desert/hover/scorpion-gun_REF.gc | 37 +- .../desert/lizard/desert-lizard-task_REF.gc | 8 +- .../desert/oasis/ash-oasis-course_REF.gc | 6 +- .../levels/desert/race/course-race_REF.gc | 6 +- .../levels/desert/race/kleever-rider_REF.gc | 4 +- .../levels/desert/rescue/neo-satellite_REF.gc | 12 +- .../desert/rescue/rope-prim-system_REF.gc | 26 +- .../levels/desert/rescue/rope-system_REF.gc | 70 ++-- .../desert/rescue/wland-passenger_REF.gc | 20 +- .../desert/wvehicle/w-parking-spot_REF.gc | 2 +- .../desert/wvehicle/was-squad-control_REF.gc | 40 +-- .../levels/desert/wvehicle/wcar-fox_REF.gc | 6 +- .../desert/wvehicle/wcar-marauder_REF.gc | 2 +- .../levels/desert/wvehicle/wcar-mirage_REF.gc | 6 +- .../desert/wvehicle/wcar-projectiles_REF.gc | 10 +- .../levels/desert/wvehicle/wcar-rhino_REF.gc | 2 +- .../desert/wvehicle/wcar-scorpion_REF.gc | 10 +- .../levels/desert/wvehicle/wcar-snake_REF.gc | 6 +- .../levels/desert/wvehicle/wcar-toad_REF.gc | 6 +- .../levels/desert/wvehicle/wcar-turtle_REF.gc | 32 +- .../levels/desert/wvehicle/wcar-x-ride_REF.gc | 6 +- .../jak3/levels/desert/wvehicle/wcar_REF.gc | 13 +- .../levels/desert/wvehicle/wvehicle-ai_REF.gc | 12 +- .../desert/wvehicle/wvehicle-hud_REF.gc | 8 +- .../desert/wvehicle/wvehicle-physics_REF.gc | 14 +- .../desert/wvehicle/wvehicle-race_REF.gc | 58 +-- .../desert/wvehicle/wvehicle-util_REF.gc | 18 +- .../levels/desert/wvehicle/wvehicle_REF.gc | 39 +-- .../factory/car/hvehicle-effects_REF.gc | 2 +- .../factory/car/hvehicle-physics_REF.gc | 26 +- .../levels/factory/car/hvehicle-util_REF.gc | 44 +-- .../jak3/levels/factory/car/hvehicle_REF.gc | 52 ++- .../levels/factory/car/wcar-faccar_REF.gc | 2 +- .../jak3/levels/factory/conveyor_REF.gc | 26 +- .../jak3/levels/factory/fac-gunturret_REF.gc | 20 +- .../levels/factory/fac-robotank-turret_REF.gc | 4 +- .../jak3/levels/factory/fac-robotank_REF.gc | 22 +- .../jak3/levels/factory/fac-tower_REF.gc | 10 +- .../levels/factory/factory-boss-setup_REF.gc | 20 +- .../jak3/levels/factory/factory-hud_REF.gc | 12 +- .../levels/factory/factory-manager_REF.gc | 86 ++--- .../jak3/levels/factory/factory-part_REF.gc | 6 +- .../jak3/levels/factory/factoryc-obs2_REF.gc | 17 +- .../levels/factory/ffight-projectile_REF.gc | 6 +- .../levels/factory/ftank-projectile_REF.gc | 6 +- .../levels/factory/fturret-projectile_REF.gc | 6 +- .../jak3/levels/factory/h-warf_REF.gc | 28 +- .../jak3/levels/factory/lfaccity-mood_REF.gc | 2 +- .../jak3/levels/factory/lfacrm1-mood_REF.gc | 10 +- .../jak3/levels/factory/missile-bot_REF.gc | 33 +- .../levels/factory/warf-projectile_REF.gc | 18 +- .../jak3/levels/forest/for-turret-shot_REF.gc | 6 +- .../jak3/levels/forest/for-turret_REF.gc | 62 ++-- .../levels/forest/forest-kill-plants_REF.gc | 10 +- .../jak3/levels/forest/forest-part_REF.gc | 24 +- .../levels/forest/forest-ring-chase_REF.gc | 8 +- .../jak3/levels/forest/forest-tasks_REF.gc | 10 +- .../jak3/levels/forest/foresta-obs_REF.gc | 2 +- .../jak3/levels/forest/neo-spawner_REF.gc | 4 +- .../jak3/levels/glider/glider-hud_REF.gc | 17 +- .../jak3/levels/glider/glider-manager_REF.gc | 12 +- .../jak3/levels/glider/glider-ring_REF.gc | 20 +- .../jak3/levels/glider/h-glider_REF.gc | 48 +-- .../jak3/levels/gungame/gun-dummy-part_REF.gc | 6 +- .../jak3/levels/gungame/gun-dummy_REF.gc | 10 +- .../levels/gungame/gungame-manager_REF.gc | 6 +- .../jak3/levels/hiphog/hiphog-part_REF.gc | 16 +- .../levels/mhcity/destroy-dark-eco_REF.gc | 44 ++- .../reference/jak3/levels/mine/gekko_REF.gc | 20 +- .../reference/jak3/levels/mine/manta_REF.gc | 21 +- .../jak3/levels/mine/mine-train_REF.gc | 10 +- .../jak3/levels/mine/mined-mood_REF.gc | 4 +- .../jak3/levels/mine/prebot-extras_REF.gc | 4 +- .../jak3/levels/mine/prebot-part_REF.gc | 12 +- .../jak3/levels/mine/prebot-states_REF.gc | 42 +-- .../reference/jak3/levels/mine/rat_REF.gc | 4 +- .../jak3/levels/nest/egg-spider_REF.gc | 48 +-- .../reference/jak3/levels/nest/mh-bat_REF.gc | 27 +- .../jak3/levels/nest/mh-centipede-part_REF.gc | 12 +- .../jak3/levels/nest/mh-centipede_REF.gc | 50 ++- .../levels/palace/roof/palroof-part_REF.gc | 6 +- .../jak3/levels/precursor/precura-obs2_REF.gc | 10 +- .../jak3/levels/precursor/precura-obs_REF.gc | 24 +- .../jak3/levels/precursor/precurc-obs_REF.gc | 12 +- .../jak3/levels/sewer/kg-hopper_REF.gc | 8 +- .../levels/sewer/saberfish-spawner_REF.gc | 10 +- .../jak3/levels/sewer/saberfish_REF.gc | 14 +- .../jak3/levels/sewer/sew-platforms_REF.gc | 4 +- .../levels/sewer/sewer-move-turret_REF.gc | 14 +- .../jak3/levels/stadium/dm-mine-spider_REF.gc | 12 +- .../jak3/levels/stadium/king-rider_REF.gc | 8 +- .../jak3/levels/stadium/rubble-obs_REF.gc | 6 +- .../jak3/levels/stadium/rubble-part_REF.gc | 2 +- .../jak3/levels/temple/flamer-hover_REF.gc | 2 +- .../jak3/levels/temple/hover-training_REF.gc | 8 +- .../jak3/levels/temple/temple-mood_REF.gc | 2 +- .../jak3/levels/temple/temple-obs2_REF.gc | 20 +- .../jak3/levels/temple/temple-obs_REF.gc | 24 +- .../jak3/levels/temple/temple-part_REF.gc | 8 +- .../jak3/levels/temple/templed-obs_REF.gc | 10 +- .../jak3/levels/temple/templex-mood_REF.gc | 2 +- .../jak3/levels/title/title-obs_REF.gc | 12 +- .../jak3/levels/volcano/flamer-lava_REF.gc | 10 +- .../jak3/levels/volcano/spiky-frog_REF.gc | 2 +- .../jak3/levels/volcano/volcano-obs_REF.gc | 2 +- .../jak3/levels/volcano/volcano-part_REF.gc | 12 +- .../wascity/bbush/des-bush-time-chase_REF.gc | 10 +- .../levels/wascity/chase/kanga-lizard_REF.gc | 8 +- .../jak3/levels/wascity/ctymark-obs_REF.gc | 16 +- .../jak3/levels/wascity/traffic-util_REF.gc | 48 +-- .../jak3/levels/wascity/wasall-tasks_REF.gc | 2 +- .../jak3/levels/wascity/wascity-turret_REF.gc | 68 ++-- .../jak3/levels/wascity/wasdef-hud_REF.gc | 8 +- .../jak3/levels/wascity/wasdef-manager_REF.gc | 12 +- .../jak3/levels/wascity/wasgun-hud_REF.gc | 4 +- .../jak3/levels/wascity/wasgun-manager_REF.gc | 36 +- .../wascity/wasstadium/nst-tasks_REF.gc | 10 +- .../wascity/wasstadium/sig-rider_REF.gc | 8 +- .../wascity/wasstadium/wasstada-part_REF.gc | 2 +- .../wascity/wasstadium/wasstadb-obs_REF.gc | 8 +- .../wascity/wasstadium/wasstadc-obs_REF.gc | 30 +- .../jak3/levels/wascity/waswide-obs_REF.gc | 2 +- .../jak3/levels/wascity/wlander-male_REF.gc | 20 +- .../test_FormExpressionBuildLong.cpp | 2 +- test/decompiler/test_gkernel_jak1_decomp.cpp | 2 +- 958 files changed, 8680 insertions(+), 10112 deletions(-) rename test/decompiler/reference/jak1/engine/gfx/{foreground => }/eye_REF.gc (99%) diff --git a/decompiler/IR2/Form.cpp b/decompiler/IR2/Form.cpp index 82b0b064274..4657dfe3983 100644 --- a/decompiler/IR2/Form.cpp +++ b/decompiler/IR2/Form.cpp @@ -2148,6 +2148,15 @@ DerefToken to_token(const FieldReverseLookupOutput::Token& in) { } } +std::vector to_tokens(const std::vector& in) { + std::vector ret; + ret.reserve(in.size()); + for (auto& x : in) { + ret.push_back(to_token(x)); + } + return ret; +} + DerefElement::DerefElement(Form* base, bool is_addr_of, DerefToken token) : m_base(base), m_is_addr_of(is_addr_of), m_tokens({std::move(token)}) { m_base->parent_element = this; diff --git a/decompiler/IR2/Form.h b/decompiler/IR2/Form.h index f8ae80a3a4a..0e5e18fe3d0 100644 --- a/decompiler/IR2/Form.h +++ b/decompiler/IR2/Form.h @@ -1274,6 +1274,7 @@ class DerefToken { }; DerefToken to_token(const FieldReverseLookupOutput::Token& in); +std::vector to_tokens(const std::vector& in); class DerefElement : public FormElement { public: diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index d9cc82f9d29..b33db0d80f2 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -489,6 +489,38 @@ Form* cast_form(Form* in, return pool.form(new_type, in); } +Form* cast_form_from(Form* in, + const TypeSpec& old_type, + const TypeSpec& new_type, + FormPool& pool, + const Env& env, + bool tc_pass = false) { + auto& ts = env.dts->ts; + + // sometimes, accessing a field is a no-op but changes the type. For example, accessing an inlined + // structure at the start of a structure. To detect this, look up all the possible derefs with no + // deref or offset, then find the highest scoring one that is the right type. + FieldReverseLookupInput lookup_input; + lookup_input.deref = std::nullopt; + lookup_input.offset = 0; + lookup_input.stride = 0; + lookup_input.base_type = old_type; + auto lookup_result = ts.reverse_field_multi_lookup(lookup_input); + if (lookup_result.success) { + for (auto& result : lookup_result.results) { + if (result.result_type == new_type) { + // it's a match! + auto form = pool.form(in, result.addr_of, to_tokens(result.tokens)); + form->try_as_element()->inline_nested(); + return form; + } + } + } + + // fall back to normal casts. + return cast_form(in, new_type, pool, env, tc_pass); +} + /*! * Pop each variable in the input list into a form. The variables should be given in the order * they are evaluated in the source. It is safe to put the result of these in the same expression. @@ -660,7 +692,7 @@ Form* make_cast_if_needed(Form* in, return try_cast_simplify(in, TypeSpec("time-frame"), pool, env, true); } - return cast_form(in, out_type, pool, env); + return cast_form_from(in, in_type, out_type, pool, env); } std::vector make_casts_if_needed(const std::vector& in, @@ -1605,7 +1637,8 @@ void SimpleExpressionElement::update_from_stack_vector_plus_minus_cross( for (int i = 0; i < 3; i++) { auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg()); if (arg_type.typespec() != TypeSpec("vector")) { - popped_args.at(i) = cast_form(popped_args.at(i), TypeSpec("vector"), pool, env); + popped_args.at(i) = + cast_form_from(popped_args.at(i), arg_type.typespec(), TypeSpec("vector"), pool, env); } } @@ -1629,7 +1662,8 @@ void SimpleExpressionElement::update_from_stack_vector_plus_float_times( auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg()); TypeSpec desired_type(i == 3 ? "float" : "vector"); if (arg_type.typespec() != desired_type) { - popped_args.at(i) = cast_form(popped_args.at(i), desired_type, pool, env); + popped_args.at(i) = + cast_form_from(popped_args.at(i), arg_type.typespec(), desired_type, pool, env); } } @@ -1654,7 +1688,8 @@ void SimpleExpressionElement::update_from_stack_vector_float_product( auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg()); TypeSpec desired_type(i == 2 ? "float" : "vector"); if (arg_type.typespec() != desired_type) { - popped_args.at(i) = cast_form(popped_args.at(i), desired_type, pool, env); + popped_args.at(i) = + cast_form_from(popped_args.at(i), arg_type.typespec(), desired_type, pool, env); } } @@ -1680,7 +1715,8 @@ void SimpleExpressionElement::update_from_stack_vectors_in_common(FixedOperatorK for (int i = 0; i < m_expr.args(); i++) { auto arg_type = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(i).var().reg()); if (arg_type.typespec() != TypeSpec("vector")) { - popped_args.at(i) = cast_form(popped_args.at(i), TypeSpec("vector"), pool, env); + popped_args.at(i) = + cast_form_from(popped_args.at(i), arg_type.typespec(), TypeSpec("vector"), pool, env); } } @@ -3554,8 +3590,8 @@ void FunctionCallElement::update_from_stack(const Env& env, auto desired_arg_type = function_type.get_arg(arg_id); if (env.dts->should_attempt_cast_simplify(desired_arg_type, actual_arg_type)) { - arg_forms.push_back(cast_form(val, desired_arg_type, pool, env, - env.dts->ts.tc(desired_arg_type, actual_arg_type))); + arg_forms.push_back(cast_form_from(val, actual_arg_type, desired_arg_type, pool, env, + env.dts->ts.tc(desired_arg_type, actual_arg_type))); } else { arg_forms.push_back(val); } @@ -4449,11 +4485,11 @@ void DerefElement::update_from_stack(const Env& env, } void DerefElement::inline_nested() { - auto as_deref = dynamic_cast(m_base->try_as_single_element()); - if (as_deref) { - if (!m_is_addr_of && !as_deref->is_addr_of()) { - m_tokens.insert(m_tokens.begin(), as_deref->tokens().begin(), as_deref->tokens().end()); - m_base = as_deref->m_base; + auto inner = dynamic_cast(m_base->try_as_single_element()); + if (inner) { + if (!inner->is_addr_of()) { + m_tokens.insert(m_tokens.begin(), inner->tokens().begin(), inner->tokens().end()); + m_base = inner->m_base; } } } @@ -6001,7 +6037,7 @@ void ReturnElement::push_to_stack(const Env& env, FormPool& pool, FormStack& sta as_cast->set_type(func_type); return_code->push_back(as_cast); } else { - return_code = cast_form(return_code, func_type, pool, env); + return_code = cast_form_from(return_code, *return_type, func_type, pool, env); return_code->parent_element = this; } } diff --git a/decompiler/IR2/OpenGoalMapping.cpp b/decompiler/IR2/OpenGoalMapping.cpp index ab1b56a92de..ac8dae8aad2 100644 --- a/decompiler/IR2/OpenGoalMapping.cpp +++ b/decompiler/IR2/OpenGoalMapping.cpp @@ -207,6 +207,13 @@ std::string OpenGOALAsm::full_function_name() { func_name = fmt::format(fmt::runtime(func_name), bc); } } + + // Handle destination masks + if (func.allows_modifier(MOD::DEST_MASK) && m_instr.cop2_dest != 0xff && + m_instr.cop2_dest != 15) { + func_name += m_instr.cop2_dest_to_char(); + } + return func_name; } @@ -270,13 +277,6 @@ std::vector OpenGOALAsm::get_args(const std::vector *target* neck) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) @@ -2896,7 +2896,7 @@ (s3-0 (new 'stack-no-clear 'matrix)) (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) ) - (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion-normalize! (quaternion*! s1-0 (-> s2-0 0 quat) s1-0)) (quaternion->matrix s3-0 s1-0) (if (logtest? (-> s4-0 ragdoll-flags) (ragdoll-flag mirror)) (matrix*! s3-0 s3-0 (-> s4-0 mirror)) diff --git a/goal_src/jak3/engine/ambient/ambient.gc b/goal_src/jak3/engine/ambient/ambient.gc index c22fc7ccca1..67b9be19641 100644 --- a/goal_src/jak3/engine/ambient/ambient.gc +++ b/goal_src/jak3/engine/ambient/ambient.gc @@ -505,7 +505,7 @@ ) (begin (dotimes (s5-2 4) - (when (and (string-charp= (-> self message name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s5-2))) + (when (and (string-charp= (-> self message name) (-> *sound-iop-info* stream-name s5-2 name)) (= (-> self voice-id) (-> *sound-iop-info* stream-id s5-2)) (logtest? (-> *sound-iop-info* stream-status s5-2) (stream-status ss6)) ) diff --git a/goal_src/jak3/engine/anim/aligner.gc b/goal_src/jak3/engine/anim/aligner.gc index cb96fe6adcc..c306fa9632c 100644 --- a/goal_src/jak3/engine/anim/aligner.gc +++ b/goal_src/jak3/engine/anim/aligner.gc @@ -87,25 +87,19 @@ (set! (-> v1-25 0 fvec quad) a2-6) (set! (-> v1-25 0 trans quad) a3-3) ) - (vector*! (the-as vector (-> this transform)) (-> s5-1 bone transform trans) (-> this process root scale)) - ) - (vector-! - (the-as vector (-> this delta)) - (the-as vector (-> this transform)) - (the-as vector (-> this transform 1)) + (vector*! (-> this transform 0 trans) (-> s5-1 bone transform trans) (-> this process root scale)) ) + (vector-! (-> this delta trans) (-> this transform 0 trans) (-> this transform 1 trans)) (set-vector! (-> this align scale) - (vector-length (the-as vector (-> this matrix))) + (vector-length (-> this matrix 0 rvec)) (vector-length (-> this matrix 0 uvec)) (vector-length (-> this matrix 0 fvec)) 1.0 ) (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) (let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) - (quaternion-normalize! - (matrix->quaternion (-> this align quat) (matrix*! a2-7 (the-as matrix (-> this matrix)) a2-7)) - ) + (quaternion-normalize! (matrix->quaternion (-> this align quat) (matrix*! a2-7 (-> this matrix 0) a2-7))) ) (let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) ) diff --git a/goal_src/jak3/engine/anim/joint-exploder.gc b/goal_src/jak3/engine/anim/joint-exploder.gc index 05d64168d50..f4a160b53c8 100644 --- a/goal_src/jak3/engine/anim/joint-exploder.gc +++ b/goal_src/jak3/engine/anim/joint-exploder.gc @@ -399,9 +399,9 @@ (v1-8 (set! sv-48 (remove-joint-from-list this arg0 s2-0)) (set! sv-64 (-> this lists data)) - (add-joint-to-list this (the-as joint-exploder-list sv-64) s2-0) + (add-joint-to-list this (-> sv-64 0) s2-0) (set! s2-0 sv-48) - (update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80) + (update-bbox-for-joint this (-> sv-64 0) sv-80) (set! (-> arg0 bbox-valid?) s0-0) (set! (-> arg0 bbox min quad) (-> s1-0 min quad)) (vector-copy! (-> arg0 bbox max) (-> s1-0 max)) diff --git a/goal_src/jak3/engine/anim/joint-mod-h.gc b/goal_src/jak3/engine/anim/joint-mod-h.gc index e5a1f120f61..105e8066bde 100644 --- a/goal_src/jak3/engine/anim/joint-mod-h.gc +++ b/goal_src/jak3/engine/anim/joint-mod-h.gc @@ -375,7 +375,7 @@ Unlike jak 2, this actually multiplies the scale, instead of adding." "Callback for joint-mod-add-local. See comment on that type." (let ((s4-0 (the-as joint-mod-add-local (-> bone-cspace param1)))) (if (logtest? (-> s4-0 flags) (joint-mod-base-flags trans)) - (vector+! (-> joint-transform trans) (-> joint-transform trans) (the-as vector (-> s4-0 transform))) + (vector+! (-> joint-transform trans) (-> joint-transform trans) (-> s4-0 transform trans)) ) (when (logtest? (-> s4-0 flags) (joint-mod-base-flags quat)) (quaternion*! (-> joint-transform quat) (-> joint-transform quat) (-> s4-0 transform quat)) @@ -485,9 +485,9 @@ Then, apply the normal parented transform." "Callback for joint-mod-blend-local. See comment on that type." (let ((gp-0 (the-as joint-mod-blend-local (-> bone-cspace param1)))) (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) + (-> gp-0 blend-transform trans) (-> joint-transform trans) - (the-as vector (-> gp-0 transform)) + (-> gp-0 transform trans) (-> gp-0 blend) ) (vector-lerp! @@ -560,18 +560,13 @@ Then, apply the normal parented transform." (matrix*! (-> s3-0 mat2) (-> s3-0 mat1) (-> bone-cspace parent bone transform)) (set-vector! (-> s3-0 vec) - (vector-length (the-as vector (-> s3-0 mat2))) + (vector-length (-> s3-0 mat2 rvec)) (vector-length (-> s3-0 mat2 uvec)) (vector-length (-> s3-0 mat2 fvec)) 1.0 ) (vector*! (-> gp-0 blend-transform scale) (-> s3-0 vec) (-> joint-transform scale)) - (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) - (-> s3-0 mat2 trans) - (the-as vector (-> gp-0 transform)) - f30-0 - ) + (vector-lerp! (-> gp-0 blend-transform trans) (-> s3-0 mat2 trans) (-> gp-0 transform trans) f30-0) (vector-lerp! (-> gp-0 blend-transform scale) (-> gp-0 blend-transform scale) (-> gp-0 transform scale) f26-0) (quaternion-slerp! (-> gp-0 blend-transform quat) diff --git a/goal_src/jak3/engine/anim/joint-mod.gc b/goal_src/jak3/engine/anim/joint-mod.gc index 5157f4e217d..ce4a06eac6d 100644 --- a/goal_src/jak3/engine/anim/joint-mod.gc +++ b/goal_src/jak3/engine/anim/joint-mod.gc @@ -114,12 +114,12 @@ (.mov.vf.w vf6 vf0) (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-768 rvec quad) vf6) - (vector-length (the-as vector sv-768)) + (vector-length (-> sv-768 rvec)) (+ -4.096 f0-12 f30-0) (let ((f0-15 (+ 4.096 (fabs (- f30-0 f0-12))))) (cond ((< f0-15 f0-15) - (vector-normalize! (the-as vector sv-768) f0-15) + (vector-normalize! (-> sv-768 rvec) f0-15) (let ((v1-39 s1-0)) (let ((a0-21 s2-0)) (.mov.vf.w vf6 vf0) @@ -131,8 +131,8 @@ ) ) ((< f0-15 f0-15) - (vector-normalize! (the-as vector sv-768) f0-15) - (vector+! s1-0 s2-0 (the-as vector sv-768)) + (vector-normalize! (-> sv-768 rvec) f0-15) + (vector+! s1-0 s2-0 (-> sv-768 rvec)) ) ) ) @@ -214,10 +214,10 @@ (* f30-1 f30-1) (let ((s0-2 (new 'stack-no-clear 'quaternion))) (vector-flatten! s2-4 sv-352 sv-364) - (vector-flatten! (the-as vector s1-2) s3-1 sv-364) + (vector-flatten! (-> s1-2 vec) s3-1 sv-364) (vector-normalize! s2-4 1.0) - (vector-normalize! (the-as vector s1-2) 1.0) - (quaternion-from-two-vectors! s0-2 s2-4 (the-as vector s1-2)) + (vector-normalize! (-> s1-2 vec) 1.0) + (quaternion-from-two-vectors! s0-2 s2-4 (-> s1-2 vec)) (quaternion*! sv-372 s0-2 sv-372) ) ) @@ -742,9 +742,7 @@ (set! sv-148 (new 'stack-no-clear 'quaternion)) (set! sv-152 (new 'stack-no-clear 'vector)) (set! sv-156 (new 'stack-no-clear 'vector)) - (set! sv-160 - (&-> (-> gp-0 process node-list data (-> gp-0 base-joint) bone) transform quad (-> gp-0 base-nose)) - ) + (set! sv-160 (&-> gp-0 process node-list data (-> gp-0 base-joint) bone transform quad (-> gp-0 base-nose))) (set! sv-164 (< (vector-dot (-> s3-0 rvec) (vector-cross! (new 'stack-no-clear 'vector) (-> s3-0 uvec) (-> s3-0 fvec))) 0.0 @@ -897,7 +895,7 @@ ) (let* ((s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) - (the-as vector (-> gp-0 process node-list data 0 bone transform)) + (-> gp-0 process node-list data 0 bone transform rvec) 1.0 ) ) @@ -1087,11 +1085,7 @@ (set! (-> v1-15 x) (/ 1.0 (-> v1-15 x))) (set! (-> v1-15 y) (/ 1.0 (-> v1-15 y))) (set! (-> v1-15 z) (/ 1.0 (-> v1-15 z))) - (vector-float*! - (the-as vector (-> arg0 bone transform)) - (the-as vector (-> arg0 bone transform)) - (-> v1-15 x) - ) + (vector-float*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) (-> v1-15 x)) (vector-float*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) (-> v1-15 y)) (vector-float*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) (-> v1-15 z)) ) @@ -1105,12 +1099,12 @@ ) (cond ((logtest? (-> s5-0 track-mode) (track-mode no-rotate)) - (vector-normalize! (the-as vector (-> arg0 bone transform)) (-> s3-0 x)) + (vector-normalize! (-> arg0 bone transform rvec) (-> s3-0 x)) (vector-normalize! (-> arg0 bone transform uvec) (-> s3-0 y)) (vector-normalize! (-> arg0 bone transform fvec) (-> s3-0 z)) ) (else - (vector-float*! (the-as vector (-> arg0 bone transform)) (the-as vector (-> arg0 bone transform)) (-> s3-0 x)) + (vector-float*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) (-> s3-0 x)) (vector-float*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) (-> s3-0 y)) (vector-float*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) (-> s3-0 z)) ) @@ -1323,7 +1317,7 @@ (let* ((t9-2 vector-normalize-copy!) (a0-3 (new 'stack-no-clear 'vector)) (v1-3 (abs (-> s5-0 nose))) - (s3-0 (t9-2 a0-3 (the-as vector (&-> (-> arg0 bone) transform quad v1-3)) 1.0)) + (s3-0 (t9-2 a0-3 (the-as vector (&-> arg0 bone transform quad v1-3)) 1.0)) (s1-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 target) (-> arg0 bone transform trans)) 1.0 @@ -1339,7 +1333,7 @@ (a0-7 (-> s4-1 rvec)) (v1-11 (abs (-> s5-0 ear))) ) - (t9-5 a0-7 (the-as vector (&-> (-> arg0 bone) transform quad v1-11)) 1.0) + (t9-5 a0-7 (the-as vector (&-> arg0 bone transform quad v1-11)) 1.0) ) (if (logtest? (-> s5-0 flags) (joint-mod-polar-flags negate-ear)) (vector-negate! (-> s4-1 rvec) (-> s4-1 rvec)) @@ -1348,7 +1342,7 @@ (a0-9 (-> s4-1 uvec)) (v1-18 (abs (-> s5-0 up))) ) - (t9-7 a0-9 (the-as vector (&-> (-> arg0 bone) transform quad v1-18)) 1.0) + (t9-7 a0-9 (the-as vector (&-> arg0 bone transform quad v1-18)) 1.0) ) (if (logtest? (-> s5-0 flags) (joint-mod-polar-flags negate-up)) (vector-negate! (-> s4-1 uvec) (-> s4-1 uvec)) diff --git a/goal_src/jak3/engine/camera/cam-combiner.gc b/goal_src/jak3/engine/camera/cam-combiner.gc index 4fe4aed4495..8daffee272a 100644 --- a/goal_src/jak3/engine/camera/cam-combiner.gc +++ b/goal_src/jak3/engine/camera/cam-combiner.gc @@ -50,7 +50,7 @@ (let ((s4-0 (new-stack-vector0))) 0.0 (let ((s3-0 (new-stack-matrix0))) - (vector-! (-> s2-0 0) (the-as vector (-> sv-144 inv-mat)) (the-as vector (-> gp-0 inv-mat))) + (vector-! (-> s2-0 0) (-> sv-144 inv-mat rvec) (-> gp-0 inv-mat rvec)) (vector-! (-> s2-0 1) (-> sv-144 inv-mat uvec) (-> gp-0 inv-mat uvec)) (vector-! (-> s2-0 2) (-> sv-144 inv-mat fvec) (-> gp-0 inv-mat fvec)) (let ((f0-6 (vector-length (-> s2-0 0))) @@ -70,14 +70,14 @@ ) ) (vector-normalize! s4-0 1.0) - (let ((f0-9 (fabs (vector-dot (the-as vector (-> sv-144 inv-mat)) s4-0))) + (let ((f0-9 (fabs (vector-dot (-> sv-144 inv-mat rvec) s4-0))) (f1-3 (fabs (vector-dot (-> sv-144 inv-mat uvec) s4-0))) (f2-3 (fabs (vector-dot (-> sv-144 inv-mat fvec) s4-0))) ) (cond ((and (< f0-9 f1-3) (< f0-9 f2-3)) - (vector-flatten! (-> s2-0 0) (the-as vector (-> sv-144 inv-mat)) s4-0) - (vector-flatten! (-> s2-0 1) (the-as vector (-> gp-0 inv-mat)) s4-0) + (vector-flatten! (-> s2-0 0) (-> sv-144 inv-mat rvec) s4-0) + (vector-flatten! (-> s2-0 1) (-> gp-0 inv-mat rvec) s4-0) ) ((< f1-3 f2-3) (vector-flatten! (-> s2-0 0) (-> sv-144 inv-mat uvec) s4-0) @@ -126,7 +126,7 @@ (matrix-axis-sin-cos! s3-0 s4-0 (sin f30-1) (cos f30-1)) ) ) - (matrix*! (-> self inv-camera-rot) (the-as matrix gp-0) s3-0) + (matrix*! (-> self inv-camera-rot) (-> gp-0 inv-mat) s3-0) ) ) ) diff --git a/goal_src/jak3/engine/camera/cam-states-dbg.gc b/goal_src/jak3/engine/camera/cam-states-dbg.gc index 9a9d6334082..c9253a2143f 100644 --- a/goal_src/jak3/engine/camera/cam-states-dbg.gc +++ b/goal_src/jak3/engine/camera/cam-states-dbg.gc @@ -67,14 +67,14 @@ (matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y))) (vector-matrix*! s4-0 s4-0 s3-0) ) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) s4-0 (-> *camera* local-down)) ) (set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z))) (if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0) ) (set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0) - (vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking))) + (vector-matrix*! (-> self trans) gp-0 (-> self tracking inv-mat)) ) ) (suspend) @@ -103,7 +103,7 @@ ) (init-vf0-vector) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (the-as vector (-> *mouse* pos)) (-> *mouse* pos 1)) + (vector-! v1-0 (-> *mouse* pos 0) (-> *mouse* pos 1)) (if (< (-> *camera* interest-dist) 409.6) (set! (-> *camera* interest-dist) 409.6) ) @@ -395,18 +395,18 @@ ) (when (not (-> *setting-control* cam-current mouse-input)) (if *amy-cam* - (matrix-rotate-y! (the-as matrix (-> self tracking)) 32768.0) + (matrix-rotate-y! (-> self tracking inv-mat) 32768.0) ) (cam-free-floating-move - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self trans) gp-0 (the-as int (-> *CAMERA-bank* joypad)) ) (when *amy-cam* - (matrix-rotate-y! (the-as matrix (-> self tracking)) 32768.0) + (matrix-rotate-y! (-> self tracking inv-mat) 32768.0) (let ((a1-4 (matrix-rotate-x! (new 'stack-no-clear 'matrix) 16384.0))) - (matrix*! (the-as matrix (-> self tracking)) a1-4 (the-as matrix (-> self tracking))) + (matrix*! (-> self tracking inv-mat) a1-4 (-> self tracking inv-mat)) ) ) ) diff --git a/goal_src/jak3/engine/camera/cam-states.gc b/goal_src/jak3/engine/camera/cam-states.gc index 905adcc88cd..95c024de231 100644 --- a/goal_src/jak3/engine/camera/cam-states.gc +++ b/goal_src/jak3/engine/camera/cam-states.gc @@ -86,7 +86,7 @@ (cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f) (when (!= (-> gp-0 w) 0.0) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) ) @@ -113,7 +113,7 @@ ) ((-> self cam-entity) (cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) (-> self trans) 'trans) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (cam-curve-setup (-> self trans)) ((-> cam-fixed enter)) @@ -186,7 +186,7 @@ ) (vector-reset! (-> self tracking inv-mat trans)) (let ((gp-0 (new 'stack-no-clear 'vector))) - (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (the-as matrix (-> self tracking))) + (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (-> self tracking inv-mat)) (vector+! (-> self trans) (-> self trans) gp-0) ) ) @@ -431,7 +431,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -563,23 +563,19 @@ ) ) (matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y)) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (if (< (vector-dot (-> self tracking inv-mat uvec) (-> *camera* local-down)) 0.0) + (forward-down->inv-matrix (-> self tracking inv-mat) (-> self tracking inv-mat fvec) (-> *camera* local-down)) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) - (-> self tracking inv-mat fvec) - (-> *camera* local-down) - ) - (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat fvec) (vector-negate! (new-stack-vector0) (-> *camera* local-down)) ) ) ) (matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x))) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) ) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat fvec)))) @@ -726,10 +722,10 @@ (vector-! gp-0 s5-0 gp-0) (vector-negate! gp-0 gp-0) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) - (vector-into-frustum-nosmooth! (the-as matrix (-> self tracking)) (-> self trans) (-> self fov)) + (vector-into-frustum-nosmooth! (-> self tracking inv-mat) (-> self trans) (-> self fov)) ) ) ) @@ -750,7 +746,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -1256,7 +1252,7 @@ ((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) (set! (-> self blend-from-type) (camera-blend-from-type unknown-0)) (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) ) (else (set! (-> self blend-from-type) (camera-blend-from-type unknown-2)) @@ -2057,7 +2053,6 @@ (set! sv-816 (-> (the-as (inline-array tracking-spline) (-> *camera* target-spline)) 0 point s2-2)) (set! sv-832 arg0) (let ((a2-21 (camera-master-method-16 *camera* #t))) - (set! f30-1 (s0-3 (the-as vector sv-816) sv-832 (the-as pat-surface a2-21))) ) ) (< f30-1 0.0) diff --git a/goal_src/jak3/engine/camera/cam-update.gc b/goal_src/jak3/engine/camera/cam-update.gc index 0d42583bd9e..afa9542252e 100644 --- a/goal_src/jak3/engine/camera/cam-update.gc +++ b/goal_src/jak3/engine/camera/cam-update.gc @@ -54,7 +54,7 @@ (vector-matrix*! (-> s5-0 yon-bottom-right) (-> s5-0 yon-bottom-right) arg3) (when (= arg2 1.0) (let ((v1-4 *fog-texture-work*)) - (vector-! (the-as vector (-> v1-4 corner)) (-> s5-0 yon-top-left) (-> arg3 trans)) + (vector-! (-> v1-4 corner 0) (-> s5-0 yon-top-left) (-> arg3 trans)) (vector-! (-> v1-4 corner 1) (-> s5-0 yon-top-right) (-> arg3 trans)) (vector-! (-> v1-4 corner 2) (-> s5-0 yon-bottom-left) (-> arg3 trans)) (vector-! (-> v1-4 corner 3) (-> s5-0 yon-bottom-right) (-> arg3 trans)) diff --git a/goal_src/jak3/engine/camera/camera.gc b/goal_src/jak3/engine/camera/camera.gc index d517fa7388d..9ef06d6bfa7 100644 --- a/goal_src/jak3/engine/camera/camera.gc +++ b/goal_src/jak3/engine/camera/camera.gc @@ -442,7 +442,7 @@ (s2-1 (cond (v0-10 - (vector+! (the-as vector (-> this vec)) (the-as vector (&+ s2-1 0)) (the-as vector v0-10)) + (vector+! (-> this vec 0) (the-as vector (&+ s2-1 0)) (the-as vector v0-10)) (vector+! (-> this vec 1) (the-as vector (&+ s2-1 16)) (the-as vector v0-10)) ) (else @@ -466,7 +466,7 @@ ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-! v1-14 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-14)) - (vector-! v1-14 (the-as vector (-> this vec)) arg2) + (vector-! v1-14 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-14)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) @@ -474,13 +474,13 @@ ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-! v1-14 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-14)) - (vector-! v1-14 (the-as vector (-> this vec)) arg2) + (vector-! v1-14 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-14)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) ) (else - (vector-! (-> this vec 1) (-> this vec 1) (the-as vector (-> this vec))) + (vector-! (-> this vec 1) (-> this vec 1) (-> this vec 0)) (set! (-> this vec 1 w) (vector-normalize-ret-len! (-> this vec 1) 1.0)) ) ) @@ -491,7 +491,7 @@ (defmethod cam-index-method-10 ((this cam-index) (arg0 vector)) (let ((s5-0 (new-stack-vector0))) 0.0 - (vector-! s5-0 arg0 (the-as vector (-> this vec))) + (vector-! s5-0 arg0 (-> this vec 0)) (cond ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-flatten! s5-0 s5-0 (-> *camera* local-down)) @@ -548,8 +548,8 @@ (set! (-> this summed-len) (- (-> this summed-len) (-> this point arg0 tp-length))) (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 arg0))) - (the-as vector (-> this point v1-11)) - (the-as vector (-> this point arg0)) + (-> this point v1-11 position) + (-> this point arg0 position) ) ) (set! (-> this point arg0 tp-length) @@ -694,7 +694,7 @@ (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) arg0 - (the-as vector (-> this point s2-0)) + (-> this point s2-0 position) ) (set! (-> this point s2-0 tp-length) (vector-normalize-ret-len! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) 1.0) @@ -741,19 +741,14 @@ (cond ((= (-> arg3 cur-pt) (-> this end-point)) (set! (-> arg3 partial-pt) 0.0) - (vector+! arg1 arg1 (the-as vector (-> this point (-> arg3 cur-pt)))) + (vector+! arg1 arg1 (-> this point (-> arg3 cur-pt) position)) (return arg1) ) ((begin (set! f0-4 (+ (-> arg3 partial-pt) (/ arg0 (-> this point (-> arg3 cur-pt) tp-length)))) (< f0-4 1.0)) (set! (-> arg3 partial-pt) f0-4) (let ((s2-0 (new 'stack-no-clear 'vector))) (let ((v1-13 (-> this point (-> arg3 cur-pt) next))) - (vector-lerp! - s2-0 - (the-as vector (-> this point (-> arg3 cur-pt))) - (the-as vector (-> this point v1-13)) - f0-4 - ) + (vector-lerp! s2-0 (-> this point (-> arg3 cur-pt) position) (-> this point v1-13 position) f0-4) ) (vector+! arg1 arg1 s2-0) ) @@ -782,11 +777,7 @@ (defmethod tracking-spline-method-20 ((this tracking-spline) (arg0 vector) (arg1 int)) (let ((s3-0 (new 'stack-no-clear 'vector))) - (vector-! - s3-0 - (the-as vector (-> this point (-> this used-point))) - (the-as vector (-> this point (-> this end-point))) - ) + (vector-! s3-0 (-> this point (-> this used-point) position) (-> this point (-> this end-point) position)) (let* ((f0-0 (vector-length s3-0)) (f1-1 (* 0.33333334 (- 1.5 (/ f0-0 METER_LENGTH)))) ) @@ -834,7 +825,7 @@ ((< f26-0 0.0) (if (and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* -40.96 f26-0) (new 'static 'vector4w :x #xff :y #xff :w #x80) @@ -844,7 +835,7 @@ ) ((and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* 40.96 f26-0) (new 'static 'vector4w :x #x80 :y #x80 :w #x80) @@ -1017,7 +1008,7 @@ ) (else (vector-reset! (-> self trans)) - (matrix-identity! (the-as matrix (-> self tracking))) + (matrix-identity! (-> self tracking inv-mat)) (set! (-> self fov) 11650.845) (vector-reset! (-> self velocity)) ) @@ -1628,15 +1619,11 @@ ) (init-vf0-vector) (if (-> *camera* settings use-look-at-point) - (set! (-> arg0 follow-pt quad) (-> *camera* settings look-at-point quad)) + (vector-copy! (-> arg0 follow-pt) (-> *camera* settings look-at-point)) ) (let ((s0-0 (new-stack-vector0)) - (s1-0 (new 'stack-no-clear 'matrix)) + (s1-0 (new-stack-matrix0)) ) - (set! (-> s1-0 rvec quad) (the-as uint128 0)) - (set! (-> s1-0 uvec quad) (the-as uint128 0)) - (set! (-> s1-0 fvec quad) (the-as uint128 0)) - (set! (-> s1-0 trans quad) (the-as uint128 0)) (let ((f30-0 (-> arg0 tilt-adjust value))) (cond ((< 0.0001 (-> arg0 point-of-interest-blend value)) @@ -1667,7 +1654,7 @@ ) (else (vector-! s0-0 (-> arg0 follow-pt) arg1) - (set! (-> arg0 looking-interesting quad) (-> arg1 quad)) + (vector-copy! (-> arg0 looking-interesting) arg1) ) ) (vector+! (-> arg0 looking-at) s0-0 arg1) diff --git a/goal_src/jak3/engine/collide/collide-cache.gc b/goal_src/jak3/engine/collide/collide-cache.gc index 31c4cb5138f..4cf02eea831 100644 --- a/goal_src/jak3/engine/collide/collide-cache.gc +++ b/goal_src/jak3/engine/collide/collide-cache.gc @@ -28,7 +28,7 @@ (add-debug-box #t (bucket-id debug) - (the-as vector (-> arg2 bbox)) + (-> arg2 bbox min) (-> arg2 bbox max) (new 'static 'rgba :g #xff :b #xff :a #x80) ) @@ -675,13 +675,13 @@ ) (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) (let ((s0-0 (-> v1-18 prim-core))) - (vector-! (-> s3-0 uvec) (the-as vector s0-0) (-> arg0 start-pos)) + (vector-! (-> s3-0 uvec) (-> s0-0 world-sphere) (-> arg0 start-pos)) (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) ) - (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-0))) + (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-0 world-sphere))) (f1-5 (+ (-> arg0 radius) (-> s0-0 world-sphere w))) ) (when (< f0-7 (* f1-5 f1-5)) @@ -711,13 +711,13 @@ ) (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) (let ((s0-1 (-> v1-39 prim-core))) - (vector-! (-> s3-0 uvec) (the-as vector s0-1) (-> arg0 start-pos)) + (vector-! (-> s3-0 uvec) (-> s0-1 world-sphere) (-> arg0 start-pos)) (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) ) - (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-1))) + (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-1 world-sphere))) (f1-11 (+ (-> arg0 radius) (-> s0-1 world-sphere w))) ) (when (< f0-12 (* f1-11 f1-11)) diff --git a/goal_src/jak3/engine/collide/collide-debug.gc b/goal_src/jak3/engine/collide/collide-debug.gc index 61f605b4641..a8f7304dd37 100644 --- a/goal_src/jak3/engine/collide/collide-debug.gc +++ b/goal_src/jak3/engine/collide/collide-debug.gc @@ -17,7 +17,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-tri gp-0) vertex)) + (-> (the-as collide-cache-tri gp-0) vertex 0) (-> (the-as collide-cache-tri gp-0) vertex 1) (-> (the-as collide-cache-tri gp-0) vertex 2) t1-0 @@ -43,7 +43,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim gp-1) prim-core)) + (-> (the-as collide-cache-prim gp-1) prim-core world-sphere) (-> (the-as collide-cache-prim gp-1) prim-core world-sphere w) t0-1 ) @@ -72,7 +72,7 @@ (vector-normalize! (-> s4-0 rvec) 1.0) (let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris)))) (countdown (s2-0 (-> *collide-cache* num-tris)) - (vector-3pt-cross! (-> s4-0 uvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) + (vector-3pt-cross! (-> s4-0 uvec) (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) (vector-normalize! (-> s4-0 uvec) 1.0) (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (-> s4-0 rvec) (-> s4-0 uvec)))) (let ((v1-9 (-> s3-1 pat))) @@ -85,7 +85,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) t1-0 @@ -95,14 +95,14 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x80) ) ) (when (-> arg0 show-normals?) - (vector+! (-> s4-0 fvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1)) + (vector+! (-> s4-0 fvec) (-> s3-1 vertex 0) (-> s3-1 vertex 1)) (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (-> s3-1 vertex 2)) (vector-float/! (-> s4-0 fvec) (-> s4-0 fvec) 3.0) (add-debug-vector @@ -119,7 +119,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x20 :g #x20 :b #x20 :a #x20) @@ -128,7 +128,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x10) @@ -154,7 +154,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim s5-1) prim-core)) + (-> (the-as collide-cache-prim s5-1) prim-core world-sphere) (-> (the-as collide-cache-prim s5-1) prim-core world-sphere w) t0-5 ) @@ -221,7 +221,7 @@ (add-debug-box #t (bucket-id debug) - (the-as vector (-> s5-0 bbox)) + (-> s5-0 bbox min) (-> s5-0 bbox max) (if (logtest? (current-time) 128) (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20) diff --git a/goal_src/jak3/engine/collide/collide-edge-grab.gc b/goal_src/jak3/engine/collide/collide-edge-grab.gc index 679632d15bb..511f221c60e 100644 --- a/goal_src/jak3/engine/collide/collide-edge-grab.gc +++ b/goal_src/jak3/engine/collide/collide-edge-grab.gc @@ -197,22 +197,14 @@ (-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal) ) (vector-normalize! - (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (-> arg1 world-vertex 0)) 1.0 ) (vector-normalize! - (vector-cross! - (the-as vector (-> arg1 hanging-matrix)) - (-> arg1 hanging-matrix fvec) - (-> arg1 hanging-matrix uvec) - ) + (vector-cross! (-> arg1 hanging-matrix rvec) (-> arg1 hanging-matrix fvec) (-> arg1 hanging-matrix uvec)) 1.0 ) - (vector-cross! - (-> arg1 hanging-matrix fvec) - (the-as vector (-> arg1 hanging-matrix)) - (-> arg1 hanging-matrix uvec) - ) + (vector-cross! (-> arg1 hanging-matrix fvec) (-> arg1 hanging-matrix rvec) (-> arg1 hanging-matrix uvec)) (vector-copy! (-> arg1 hanging-matrix trans) (-> arg1 center-hold)) (transform-vectors! (-> arg1 hanging-matrix) @@ -476,7 +468,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (-> this world-vertex 1) (new 'static 'rgba :r #xff :a #x60) #f @@ -508,7 +500,7 @@ #t (bucket-id debug-no-zbuf1) (-> this adjacent-edge-left-vertex) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (new 'static 'rgba :r #x80 :a #x60) #f (the-as rgba -1) @@ -528,7 +520,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this tri-vertex)) + (-> this tri-vertex 0) (-> this world-vertex 4) (-> this world-vertex 5) (new 'static 'rgba :r #xff :a #x30) @@ -668,7 +660,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this attempts s5-1)) + (-> this attempts s5-1 vector) (meters 0.1) (new 'static 'rgba :a #x40) ) @@ -684,7 +676,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 0) (-> v1-3 vertex 1) (-> v1-3 vertex 2) t1-0 diff --git a/goal_src/jak3/engine/collide/collide-shape-rider.gc b/goal_src/jak3/engine/collide/collide-shape-rider.gc index 5334b9292c5..d25d4e9a5f6 100644 --- a/goal_src/jak3/engine/collide/collide-shape-rider.gc +++ b/goal_src/jak3/engine/collide/collide-shape-rider.gc @@ -21,7 +21,7 @@ (logtest? (-> s5-0 prim-core action) (collide-action rideable)) (logtest? (-> s4-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (let ((f0-4 (- (- (vector-vector-distance (-> s5-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) (-> s5-0 prim-core world-sphere w) ) (-> s4-0 prim-core world-sphere w) @@ -51,7 +51,7 @@ (when (and (logtest? (-> s3-0 prim-core collide-with) s4-0) (logtest? (-> s3-0 prim-core action) (collide-action rideable)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> s3-0 prim-core world-sphere) (-> arg0 prim-core world-sphere)) (-> s3-0 prim-core world-sphere w) ) (-> arg0 prim-core world-sphere w) @@ -83,7 +83,7 @@ (when (and (logtest? s4-0 (-> s3-0 prim-core collide-as)) (logtest? (-> s3-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s3-0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> this prim-core world-sphere) (-> s3-0 prim-core world-sphere)) (-> this prim-core world-sphere w) ) (-> s3-0 prim-core world-sphere w) @@ -105,14 +105,9 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* this))) (when v1-13 (let* ((s4-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-4 (sphere-on-platform-test - s3-1 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s4-1 - (the-as vector (-> arg0 prim-core)) - (-> arg1 best-dist) - ) - ) + (f0-4 + (sphere-on-platform-test s3-1 (-> v1-13 tris 0) s4-1 (-> arg0 prim-core world-sphere) (-> arg1 best-dist)) + ) ) (when (< f0-4 (-> arg1 best-dist)) (set! (-> arg1 best-dist) f0-4) @@ -169,7 +164,7 @@ (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> s4-0 prim-core world-sphere) *actor-list* 256) ) ) (when (logtest? s5-0 (collide-spec player-list)) diff --git a/goal_src/jak3/engine/collide/collide-shape.gc b/goal_src/jak3/engine/collide/collide-shape.gc index 611ead993b3..9487a480f6b 100644 --- a/goal_src/jak3/engine/collide/collide-shape.gc +++ b/goal_src/jak3/engine/collide/collide-shape.gc @@ -221,14 +221,7 @@ (let ((v1-4 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-4) cfg-7 :delay (empty-form)) (let ((s5-0 (new 'stack-no-clear 'collide-tri-result))) - (let ((f0-1 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-4 tris)) - s5-0 - (the-as vector (-> arg0 prim-core)) - (-> arg1 best-dist) - ) - ) + (let ((f0-1 (should-push-away-test s2-0 (-> v1-4 tris 0) s5-0 (-> arg0 prim-core world-sphere) (-> arg1 best-dist))) ) (b! (>= f0-1 (-> arg1 best-dist)) cfg-7 :delay #f) (set! (-> arg1 best-dist) f0-1) @@ -310,7 +303,7 @@ (s4-1 (-> arg1 best-other-tri intersect)) ) (vector-float*! s4-1 s3-0 (-> this prim-core world-sphere w)) - (vector+! s4-1 s4-1 (the-as vector (-> this prim-core))) + (vector+! s4-1 s4-1 (-> this prim-core world-sphere)) (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 quad)) (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s4-1 s3-0) (let* ((a0-8 (vector-normalize! @@ -343,25 +336,20 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg0)))) (when v1-13 (let* ((s3-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-3 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s3-1 - (the-as vector (-> this prim-core)) - (-> arg1 best-dist) - ) - ) + (f0-3 + (should-push-away-test s2-0 (-> v1-13 tris 0) s3-1 (-> this prim-core world-sphere) (-> arg1 best-dist)) + ) ) (when (< f0-3 (-> arg1 best-dist)) (set! (-> arg1 best-dist) f0-3) (set! (-> arg1 best-my-prim) this) (set! (-> arg1 best-other-prim) arg0) (let ((s4-2 (-> arg1 best-other-tri normal))) - (vector-! s4-2 (-> s3-1 intersect) (the-as vector (-> this prim-core))) + (vector-! s4-2 (-> s3-1 intersect) (-> this prim-core world-sphere)) (vector-normalize! s4-2 1.0) (let ((s3-2 (-> arg1 best-other-tri intersect))) (vector-float*! s3-2 s4-2 (-> this prim-core world-sphere w)) - (vector+! s3-2 s3-2 (the-as vector (-> this prim-core))) + (vector+! s3-2 s3-2 (-> this prim-core world-sphere)) (set! (-> arg1 best-other-tri vertex 0 quad) (-> s3-2 quad)) (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s3-2 s4-2) (let* ((a0-23 (vector-normalize! @@ -960,7 +948,7 @@ (move-by-vector! arg0 a1-1) ) (react-to-pat! arg0 (-> arg1 best-other-tri pat)) - (vector-! sv-48 (the-as vector (-> arg1 best-my-prim prim-core)) (-> arg1 best-other-tri intersect)) + (vector-! sv-48 (-> arg1 best-my-prim prim-core world-sphere) (-> arg1 best-other-tri intersect)) (cond ((and (= (-> arg1 best-dist) 0.0) (< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w))) @@ -2155,7 +2143,7 @@ ((-3) (let ((s3-0 (new 'stack-no-clear 'vector))) (vector-orient-by-quat! s3-0 (-> s5-0 local-sphere) (-> this quat)) - (vector+! (the-as vector (-> s5-0 prim-core)) s3-0 (-> this trans)) + (vector+! (-> s5-0 prim-core world-sphere) s3-0 (-> this trans)) ) (set! (-> s5-0 prim-core world-sphere w) (-> s5-0 local-sphere w)) ) @@ -2181,7 +2169,7 @@ (vector+! (-> this trans) (-> this trans) arg0) (let ((v1-1 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> v1-1 prim-core)) (the-as vector (-> v1-1 prim-core)) arg0) + (vector+! (-> v1-1 prim-core world-sphere) (-> v1-1 prim-core world-sphere) arg0) (set! (-> v1-1 prim-core world-sphere w) (-> v1-1 local-sphere w)) (&+! v1-1 80) ) @@ -2196,7 +2184,7 @@ (vector-copy! (-> this trans) arg0) (let ((a1-2 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0) + (vector+! (-> a1-2 prim-core world-sphere) (-> a1-2 prim-core world-sphere) v1-0) (set! (-> a1-2 prim-core world-sphere w) (-> a1-2 local-sphere w)) (&+! a1-2 80) ) @@ -2310,7 +2298,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :r #xff :g #xff :b #xff :a #x40) ) @@ -2322,7 +2310,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (cond ((and (zero? (-> this prim-core collide-as)) (zero? (-> this prim-core collide-with))) @@ -2344,7 +2332,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :b #xff :a #x40) ) @@ -2356,7 +2344,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :g #xff :a #x10) ) @@ -2384,7 +2372,7 @@ (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> this root-prim prim-core world-sphere) *actor-list* 256) ) ) (when (logtest? s4-0 (collide-spec player-list)) @@ -2565,7 +2553,7 @@ (set! *actor-list-length* 0) (b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> s3-0 prim-core world-sphere) *actor-list* 256) ) (label cfg-2) (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) @@ -2846,7 +2834,7 @@ (b! (not s2-0) cfg-10 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg1)))) (when v1-5 - (when (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> this prim-core))) + (when (overlap-test s2-0 (-> v1-5 tris 0) (-> this prim-core world-sphere)) (b! #t cfg-11 :delay (nop!)) (the-as none 0) ) @@ -2889,11 +2877,7 @@ (b! (not s2-0) cfg-9 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-5) cfg-9 :delay (empty-form)) - (b! - (not (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> arg1 prim-core)))) - cfg-9 - :delay (empty-form) - ) + (b! (not (overlap-test s2-0 (-> v1-5 tris 0) (-> arg1 prim-core world-sphere))) cfg-9 :delay (empty-form)) ) ) (b! #t cfg-12 :delay (nop!)) diff --git a/goal_src/jak3/engine/collide/collide-touch.gc b/goal_src/jak3/engine/collide/collide-touch.gc index 9065fe1fa96..da4e7022504 100644 --- a/goal_src/jak3/engine/collide/collide-touch.gc +++ b/goal_src/jak3/engine/collide/collide-touch.gc @@ -480,17 +480,14 @@ (defmethod touching-prims-entry-method-9 ((this touching-prims-entry) (arg0 vector)) (let* ((s4-0 (-> this prim1 cprim)) (v1-0 (-> this prim2 cprim)) - (gp-1 (vector-! - (new 'stack-no-clear 'vector) - (the-as vector (-> v1-0 prim-core)) - (the-as vector (-> s4-0 prim-core)) - ) - ) + (gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> v1-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) + ) ) (let ((f1-2 (- (- (vector-length gp-1) (-> v1-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (/ f1-2 2))) ) - (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + (vector+! arg0 gp-1 (-> s4-0 prim-core world-sphere)) ) arg0 ) @@ -499,7 +496,7 @@ (let ((v1-0 (-> this prim1 cprim)) (a2-0 (-> this prim2 cprim)) ) - (vector+! arg0 (the-as vector (-> a2-0 prim-core)) (the-as vector (-> v1-0 prim-core))) + (vector+! arg0 (-> a2-0 prim-core world-sphere) (-> v1-0 prim-core world-sphere)) ) (vector-float*! arg0 arg0 0.5) arg0 diff --git a/goal_src/jak3/engine/common-obs/collectables.gc b/goal_src/jak3/engine/common-obs/collectables.gc index de31b64f034..9fd4c22d6f9 100644 --- a/goal_src/jak3/engine/common-obs/collectables.gc +++ b/goal_src/jak3/engine/common-obs/collectables.gc @@ -374,7 +374,7 @@ (ja-post) ) (if (nonzero? s5-0) - (spawn s5-0 (the-as vector s4-0)) + (spawn s5-0 (-> s4-0 world-sphere)) ) ) (if (nonzero? (-> this sound)) @@ -585,7 +585,7 @@ (let ((a0-5 (-> self root root-prim prim-core)) (a1-2 (-> (the-as collide-shape v1-1) root-prim prim-core)) ) - (when (< (vector-vector-distance (the-as vector a0-5) (the-as vector a1-2)) (-> *FACT-bank* suck-suck-dist)) + (when (< (vector-vector-distance (-> a0-5 world-sphere) (-> a1-2 world-sphere)) (-> *FACT-bank* suck-suck-dist)) (logior! (-> self flags) (collectable-flag suck-in)) #t ) @@ -614,9 +614,9 @@ (gp-1 (get-trans s4-0 3)) ) (if (and arg1 (rand-vu-percent? 0.25)) - (eco-blue-glow (the-as vector s1-1)) + (eco-blue-glow (-> s1-1 world-sphere)) ) - (let ((f0-0 (vector-vector-distance (the-as vector s1-1) gp-1))) + (let ((f0-0 (vector-vector-distance (-> s1-1 world-sphere) gp-1))) (cond ((and arg3 (< f0-0 8192.0)) (return #t) @@ -668,7 +668,7 @@ (go-virtual wait) ) (arg1 - (add-blue-shake (-> self root trans) (the-as vector s1-1) gp-1) + (add-blue-shake (-> self root trans) (-> s1-1 world-sphere) gp-1) ) ) ) @@ -1470,7 +1470,7 @@ (a1-1 (-> this root root-prim prim-core)) ) (if (nonzero? a0-7) - (spawn a0-7 (the-as vector a1-1)) + (spawn a0-7 (-> a1-1 world-sphere)) ) ) (ja-post) @@ -1664,7 +1664,7 @@ (a1-3 (-> this draw skeleton bones 3)) ) (if (nonzero? a0-7) - (spawn-from-mat a0-7 (the-as matrix a1-3)) + (spawn-from-mat a0-7 (-> a1-3 transform)) ) ) 0 diff --git a/goal_src/jak3/engine/common-obs/crates.gc b/goal_src/jak3/engine/common-obs/crates.gc index b9ffd040d7e..46ada0a0dd4 100644 --- a/goal_src/jak3/engine/common-obs/crates.gc +++ b/goal_src/jak3/engine/common-obs/crates.gc @@ -838,7 +838,7 @@ (when v1-4 (let* ((gp-2 (-> self root root-prim prim-core)) (a1-3 (-> (the-as collide-shape v1-4) root-prim prim-core)) - (f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))) + (f30-0 (vector-vector-distance (-> gp-2 world-sphere) (-> a1-3 world-sphere))) ) (when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel)) (logior! (-> self fact options) (actor-option suck-in)) diff --git a/goal_src/jak3/engine/common-obs/debris.gc b/goal_src/jak3/engine/common-obs/debris.gc index 88b6f67d5aa..65409a88055 100644 --- a/goal_src/jak3/engine/common-obs/debris.gc +++ b/goal_src/jak3/engine/common-obs/debris.gc @@ -138,8 +138,8 @@ (dotimes (i (the-as int (-> debris-box num))) (let ((debris (-> this debris (+ i (-> debris-box start))))) (if (zero? i) - (set-to-point! (-> debris-box bbox) (the-as vector (-> debris root))) - (add-point! (-> debris-box bbox) (the-as vector (-> debris root))) + (set-to-point! (-> debris-box bbox) (-> debris root trans)) + (add-point! (-> debris-box bbox) (-> debris root trans)) ) ) ) @@ -177,7 +177,7 @@ (set! (-> a2-0 y) 4096.0) (set! (-> a2-0 z) 4096.0) (set! (-> a2-0 w) 1.0) - (vector-! (the-as vector a3-0) a1-2 a2-0) + (vector-! (-> a3-0 min) a1-2 a2-0) ) (let ((a1-3 (-> cquery bbox max)) (a0-2 (-> bbox max)) @@ -206,7 +206,7 @@ ) (vector-copy! (-> s1-0 prev-pos) (-> s1-0 root trans)) (+! (-> s1-0 transv y) f0-9) - (vector-v+! (the-as vector (-> s1-0 root)) (the-as vector (-> s1-0 root)) (-> s1-0 transv)) + (vector-v+! (-> s1-0 root trans) (-> s1-0 root trans) (-> s1-0 transv)) (quaternion-vector-angle! s0-0 (-> s1-0 rot-axis) (* (-> s1-0 rot-angle) (seconds-per-frame))) (quaternion*! (-> s1-0 root quat) (-> s1-0 root quat) s0-0) ) @@ -214,7 +214,7 @@ (set! (-> s1-0 rot-angle) (- (-> s1-0 rot-angle) (* (seconds-per-frame) (-> s1-0 rot-angle)))) (when (nonzero? (-> s1-0 params collide-spec)) (let ((s0-1 (new 'stack-no-clear 'vector))) - (vector-! (-> cquery move-dist) (the-as vector (-> s1-0 root)) (-> s1-0 prev-pos)) + (vector-! (-> cquery move-dist) (-> s1-0 root trans) (-> s1-0 prev-pos)) (vector-copy! (-> cquery start-pos) (-> s1-0 prev-pos)) (let ((v1-34 cquery)) (set! (-> v1-34 radius) 2048.0) @@ -299,7 +299,7 @@ (draw-ctrl (-> self debris i draw)) ) (matrix<-transformq+trans! - (the-as matrix (-> draw-ctrl skeleton bones 3)) + (-> draw-ctrl skeleton bones 3 transform) (-> debris root) (-> draw-ctrl skeleton bones 0 transform trans) ) @@ -430,10 +430,10 @@ (set! (-> debris params) params) (let ((joint-transform (-> pdraw node-list data (-> params joints i parent-joint-index) bone transform))) (matrix->quaternion (-> debris root quat) joint-transform) - (matrix->trans joint-transform (the-as vector (-> debris root))) + (matrix->trans joint-transform (-> debris root trans)) (vector-copy! (-> debris root scale) (-> pdraw root scale)) (if (nonzero? (-> params joints i offset)) - (vector-matrix*! (the-as vector (-> debris root)) (-> params joints i offset) joint-transform) + (vector-matrix*! (-> debris root trans) (-> params joints i offset) joint-transform) ) ) (set! debris-scale (-> debris root scale)) @@ -451,7 +451,7 @@ (.svf (&-> debris-scale quad) vf6) (case (-> tuning explosion) ((1) - (vector-! (-> debris transv) (the-as vector (-> debris root)) (-> tuning fountain-rand-transv-lo)) + (vector-! (-> debris transv) (-> debris root trans) (-> tuning fountain-rand-transv-lo)) (let ((s0-2 vector-normalize!)) (set! sv-80 (-> debris transv)) (let ((a1-17 (rand-vu-float-range (-> tuning fountain-rand-transv-hi x) (-> tuning fountain-rand-transv-hi y)))) diff --git a/goal_src/jak3/engine/common-obs/elevator.gc b/goal_src/jak3/engine/common-obs/elevator.gc index e62ab98be9e..a964425b60b 100644 --- a/goal_src/jak3/engine/common-obs/elevator.gc +++ b/goal_src/jak3/engine/common-obs/elevator.gc @@ -140,7 +140,7 @@ (when (< 0.0 f0-5) (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) (vector+! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s5-0 start-pos)) - (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (the-as vector (-> s4-0 prim-core))) + (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s4-0 prim-core world-sphere)) (move-by-vector! (-> gp-0 control) (-> s5-0 move-dist)) ) ) diff --git a/goal_src/jak3/engine/common-obs/gem-pool.gc b/goal_src/jak3/engine/common-obs/gem-pool.gc index 92f94fa617b..4375b8d703c 100644 --- a/goal_src/jak3/engine/common-obs/gem-pool.gc +++ b/goal_src/jak3/engine/common-obs/gem-pool.gc @@ -46,12 +46,12 @@ ) ((= v1-0 1) (let ((a1-1 (task-perm-by-index *game-info* 6))) - (compare-gems arg0 (the-as (pointer float) a1-1)) + (compare-gems arg0 (-> a1-1 user-float)) ) ) ((= v1-0 2) (let ((a1-3 (task-perm-by-index *game-info* 41))) - (compare-gems arg0 (the-as (pointer float) a1-3)) + (compare-gems arg0 (-> a1-3 user-float)) ) ) (else diff --git a/goal_src/jak3/engine/common-obs/generic-obs.gc b/goal_src/jak3/engine/common-obs/generic-obs.gc index 8eae8b1164d..8a344f6313c 100644 --- a/goal_src/jak3/engine/common-obs/generic-obs.gc +++ b/goal_src/jak3/engine/common-obs/generic-obs.gc @@ -219,7 +219,7 @@ ) (let ((s4-0 (-> (the-as process-drawable v1-15) node-list data (-> this joint-track)))) (vector<-cspace! s5-1 s4-0) - (vector-normalize-copy! (-> this dir) (the-as vector (-> s4-0 bone transform)) 1.0) + (vector-normalize-copy! (-> this dir) (-> s4-0 bone transform rvec) 1.0) ) (move-to-point! (the-as collide-shape (-> this root)) s5-1) ) @@ -3099,7 +3099,7 @@ (logtest? (-> s2-0 prim-core action) (collide-action solid)) (logtest? (-> s2-0 prim-core collide-as) arg2) ) - (set! (-> s3-0 y) (vector-vector-distance arg1 (the-as vector (-> s2-0 prim-core)))) + (set! (-> s3-0 y) (vector-vector-distance arg1 (-> s2-0 prim-core world-sphere))) (set! (-> s3-0 y) (fmax 0.0 (- (-> s3-0 y) (-> s2-0 prim-core world-sphere w)))) (when (< (-> s3-0 y) (-> s3-0 x)) (set! (-> s3-0 x) (-> s3-0 y)) @@ -3259,7 +3259,7 @@ ((and (nonzero? s4-0) (type? s4-0 collide-shape)) (vector+! arg1 - (the-as vector (-> (the-as collide-shape s4-0) root-prim prim-core)) + (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere) (rand-vu-sphere-point! arg1 (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere w)) ) ) diff --git a/goal_src/jak3/engine/common-obs/metalhead-projectile.gc b/goal_src/jak3/engine/common-obs/metalhead-projectile.gc index 97bfab60bfb..e1ad10c1873 100644 --- a/goal_src/jak3/engine/common-obs/metalhead-projectile.gc +++ b/goal_src/jak3/engine/common-obs/metalhead-projectile.gc @@ -694,7 +694,7 @@ ) 0.0 (vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere)) - (vector-! (-> a1-3 move-dist) (the-as vector (-> s4-1 root-prim prim-core)) (-> a1-3 start-pos)) + (vector-! (-> a1-3 move-dist) (-> s4-1 root-prim prim-core world-sphere) (-> a1-3 start-pos)) (let ((v1-6 a1-3)) (set! (-> v1-6 radius) 40.96) (set! (-> v1-6 collide-with) (collide-spec backgnd)) diff --git a/goal_src/jak3/engine/common-obs/water-flow.gc b/goal_src/jak3/engine/common-obs/water-flow.gc index 6593e800a6b..c57e825d3f7 100644 --- a/goal_src/jak3/engine/common-obs/water-flow.gc +++ b/goal_src/jak3/engine/common-obs/water-flow.gc @@ -181,7 +181,7 @@ (let ((t9-5 vector-segment-distance-point!) (a3-2 s4-1) ) - (t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2) + (t9-5 s5-0 s0-1 (-> sv-224 start) a3-2) ) (set! (-> arg0 trans y) (-> s4-1 y)) ) @@ -489,7 +489,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-22 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/goal_src/jak3/engine/common-obs/water.gc b/goal_src/jak3/engine/common-obs/water.gc index c0d1e0bb686..cb683e9c873 100644 --- a/goal_src/jak3/engine/common-obs/water.gc +++ b/goal_src/jak3/engine/common-obs/water.gc @@ -257,7 +257,7 @@ ) ((begin (vector-copy! (-> this top 1) (-> this top 0)) - (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (vector<-cspace! (-> this top 0) (-> this process node-list data (-> this joint-index))) (+! (-> this top 0 y) (-> this top-y-offset)) (vector-copy! (-> this bottom 1) (-> this bottom 0)) (set! (-> this bottom 0 quad) (-> this process control trans quad)) diff --git a/goal_src/jak3/engine/debug/collision-editor.gc b/goal_src/jak3/engine/debug/collision-editor.gc index 7039acdbb0e..acc73ce7806 100644 --- a/goal_src/jak3/engine/debug/collision-editor.gc +++ b/goal_src/jak3/engine/debug/collision-editor.gc @@ -811,21 +811,18 @@ (let ((s4-3 (the-as object (-> *collide-cache* tris)))) (countdown (s3-2 (-> *collide-cache* num-tris)) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance - (the-as vector (-> s5-1 prim-core)) - (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) - ) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 0)) ) (add-debug-x #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + (-> (the-as collide-cache-tri s4-3) vertex 0) (new 'static 'rgba :r #xff :g #xff :a #x80) ) (set! gp-1 (the-as int (the-as uint #x800000ff))) ) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1)) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 1)) ) (add-debug-x #t @@ -836,7 +833,7 @@ (set! gp-1 (the-as int (the-as uint #x800000ff))) ) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2)) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 2)) ) (add-debug-x #t @@ -859,7 +856,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere) (-> s5-1 prim-core world-sphere w) (the-as rgba gp-1) ) diff --git a/goal_src/jak3/engine/debug/debug.gc b/goal_src/jak3/engine/debug/debug.gc index 3d544aa3aeb..494fa52d654 100644 --- a/goal_src/jak3/engine/debug/debug.gc +++ b/goal_src/jak3/engine/debug/debug.gc @@ -59,7 +59,7 @@ ) (vector-copy! a1-2 pt) (set! (-> a1-2 w) 1.0) - (when (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-2) + (when (transform-point-qword! (-> s5-0 vector 0) a1-2) (with-dma-buffer-add-bucket ((v1-11 (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -194,9 +194,7 @@ (when (debug-line-clip? sv-128 sv-144 p0 sv-112) (set! (-> sv-128 w) 1.0) (set! (-> sv-144 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s4-0 vector)) sv-128) - (transform-point-qword! (-> s4-0 vector 1) sv-144) - ) + (when (and (transform-point-qword! (-> s4-0 vector 0) sv-128) (transform-point-qword! (-> s4-0 vector 1) sv-144)) (with-dma-buffer-add-bucket ((v1-37 (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -374,7 +372,7 @@ (set! (-> a1-3 w) 1.0) (set! (-> s2-0 w) 1.0) (set! (-> s1-0 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-3) + (when (and (transform-point-qword! (-> s5-0 vector 0) a1-3) (transform-point-qword! (-> s5-0 vector 1) s2-0) (transform-point-qword! (-> s5-0 vector 2) s1-0) ) diff --git a/goal_src/jak3/engine/debug/manipulator.gc b/goal_src/jak3/engine/debug/manipulator.gc index 1da638cfedc..806d30e1904 100644 --- a/goal_src/jak3/engine/debug/manipulator.gc +++ b/goal_src/jak3/engine/debug/manipulator.gc @@ -198,22 +198,17 @@ (let* ((v0-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0) ) - (s4-0 (< (fabs (vector-dot v0-1 (the-as vector (-> this mat)))) 0.9)) + (s4-0 (< (fabs (vector-dot v0-1 (-> this mat rvec))) 0.9)) (s3-0 (< (fabs (vector-dot v0-1 (-> this mat uvec))) 0.9)) (s2-0 (< (fabs (vector-dot v0-1 (-> this mat fvec))) 0.9)) (f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s5-0))) ) (if s4-0 - (draw-axis - s5-0 - (the-as vector (-> this mat)) - f30-1 - (/ f30-1 4) - (if (= (-> this action) (manipulator-action ma1)) - *color-yellow* - *color-red* - ) - ) + (draw-axis s5-0 (-> this mat rvec) f30-1 (/ f30-1 4) (if (= (-> this action) (manipulator-action ma1)) + *color-yellow* + *color-red* + ) + ) ) (if s3-0 (draw-axis s5-0 (-> this mat uvec) f30-1 (/ f30-1 4) (if (= (-> this action) (manipulator-action ma2)) @@ -241,7 +236,7 @@ (let ((v1-26 s5-0)) (let ((a0-13 (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> *math-camera* inv-camera-rot)) + (-> *math-camera* inv-camera-rot rvec) (-> *math-camera* inv-camera-rot uvec) ) ) @@ -384,7 +379,7 @@ (when s2-0 (let ((a1-25 s1-1)) (let ((v1-44 s5-0)) - (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat fvec)))) + (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat fvec)))) (let ((a2-24 f30-1)) (.mov vf7 a2-24) ) @@ -399,7 +394,7 @@ ) (draw-axis s1-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat rvec)) (* 0.15 f30-1) (* 0.15 f30-1) (if (= (-> this action) (manipulator-action ma5)) @@ -421,7 +416,7 @@ (set! s3-0 (and s4-0 s3-0)) (when s3-0 (let ((a0-44 s1-1)) - (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat uvec)))) + (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat uvec)))) (let ((a1-31 f30-1)) (.mov vf7 a1-31) ) @@ -435,7 +430,7 @@ ) (draw-axis s1-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat rvec)) (* 0.15 f30-1) (* 0.15 f30-1) (if (= (-> this action) (manipulator-action ma4)) @@ -512,7 +507,7 @@ ) ((= (-> this action) (manipulator-action ma2)) (cond - ((< (fabs (vector-dot s5-1 (the-as vector (-> this mat)))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + ((< (fabs (vector-dot s5-1 (-> this mat rvec))) (fabs (vector-dot s5-1 (-> this mat fvec)))) (vector-copy! s2-0 (-> this mat fvec)) (vector-copy! s1-0 (-> this mat rvec)) ) @@ -524,7 +519,7 @@ ) ((= (-> this action) (manipulator-action ma3)) (cond - ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (the-as vector (-> this mat))))) + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (-> this mat rvec)))) (vector-copy! s2-0 (-> this mat rvec)) (vector-copy! s1-0 (-> this mat uvec)) ) @@ -643,7 +638,7 @@ (matrix-identity! s5-2) (cond ((= (-> this action) (manipulator-action ma1)) - (matrix-axis-angle! s5-2 (the-as vector (-> this mat)) (* 182.04445 (the float s4-2))) + (matrix-axis-angle! s5-2 (-> this mat rvec) (* 182.04445 (the float s4-2))) ) ((= (-> this action) (manipulator-action ma2)) (matrix-axis-angle! s5-2 (-> this mat uvec) (* 182.04445 (the float s4-2))) @@ -654,7 +649,7 @@ ) (matrix*! (-> this mat) (-> this mat) s5-2) ) - (vector-normalize! (the-as vector (-> this mat)) 1.0) + (vector-normalize! (-> this mat rvec) 1.0) (vector-normalize! (-> this mat uvec) 1.0) (vector-normalize! (-> this mat fvec) 1.0) (matrix->eul (-> this angles) (-> this mat) 21) diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index 22fbad74ff6..5d8af96f64d 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -399,7 +399,7 @@ ) ) (set! (-> arg0 rdists z) (/ 1.0 (- (-> arg0 dists w) (-> arg0 dists z)))) - (set! (-> arg0 dists y) (* 0.5 (-> arg0 dists x))) + (set! (-> arg0 dists y) (/ (-> arg0 dists x) 2)) (set! (-> arg0 rdists y) (/ 1.0 (-> arg0 dists y))) arg0 ) @@ -1003,7 +1003,7 @@ (s3-0 (new 'static 'vector :x -0.696 :y 0.174 :z 0.696)) ) (vector-matrix*! (the-as vector (-> s4-0 title-light-group)) a1-1 s2-1) - (vector-matrix*! (the-as vector (-> s4-0 title-light-group dir1)) s3-0 s2-1) + (vector-matrix*! (-> s4-0 title-light-group dir1 direction) s3-0 s2-1) ) ) (vu-lights<-light-group! arg0 (-> s4-0 title-light-group)) @@ -1015,9 +1015,9 @@ (s2-2 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-1 (-> s4-0 rim-light-group)) ) - (vector-matrix*! (the-as vector (-> s4-1 dir0)) a1-4 s1-0) - (vector-matrix*! (the-as vector (-> s4-1 dir1)) s3-1 s1-0) - (vector-matrix*! (the-as vector (-> s4-1 dir2)) s2-2 s1-0) + (vector-matrix*! (-> s4-1 dir0 direction) a1-4 s1-0) + (vector-matrix*! (-> s4-1 dir1 direction) s3-1 s1-0) + (vector-matrix*! (-> s4-1 dir2 direction) s2-2 s1-0) (vu-lights<-light-group! arg0 s4-1) ) ) @@ -1028,9 +1028,9 @@ (s2-3 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-2 (-> s4-0 rim-light-group2)) ) - (vector-matrix*! (the-as vector (-> s4-2 dir0)) a1-8 s1-1) - (vector-matrix*! (the-as vector (-> s4-2 dir1)) s3-2 s1-1) - (vector-matrix*! (the-as vector (-> s4-2 dir2)) s2-3 s1-1) + (vector-matrix*! (-> s4-2 dir0 direction) a1-8 s1-1) + (vector-matrix*! (-> s4-2 dir1 direction) s3-2 s1-1) + (vector-matrix*! (-> s4-2 dir2 direction) s2-3 s1-1) (vu-lights<-light-group! arg0 s4-2) ) ) @@ -1041,9 +1041,9 @@ (s2-4 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-3 (-> s4-0 rim-light-group3)) ) - (vector-matrix*! (the-as vector (-> s4-3 dir0)) a1-12 s1-2) - (vector-matrix*! (the-as vector (-> s4-3 dir1)) s3-3 s1-2) - (vector-matrix*! (the-as vector (-> s4-3 dir2)) s2-4 s1-2) + (vector-matrix*! (-> s4-3 dir0 direction) a1-12 s1-2) + (vector-matrix*! (-> s4-3 dir1 direction) s3-3 s1-2) + (vector-matrix*! (-> s4-3 dir2 direction) s2-4 s1-2) (vu-lights<-light-group! arg0 s4-3) ) ) diff --git a/goal_src/jak3/engine/game/game-save.gc b/goal_src/jak3/engine/game/game-save.gc index 4b438dc615e..29b592594c8 100644 --- a/goal_src/jak3/engine/game/game-save.gc +++ b/goal_src/jak3/engine/game/game-save.gc @@ -835,7 +835,7 @@ (set! (-> s0-1 elt-count) (+ (length name) 1)) (set! (-> s0-1 elt-size) (the-as uint 1)) ) - (copy-charp<-charp (the-as (pointer uint8) (-> (the-as (inline-array game-save-tag) s1-2) 1)) (-> name data)) + (copy-charp<-charp (-> (the-as (inline-array game-save-tag) s1-2) 1 user-uint8) (-> name data)) (let ((v1-85 (+ (the-as int s1-2) (logand -16 (+ (-> (the-as (inline-array game-save-tag) s1-2) 0 elt-count) 15)) 16) ) @@ -1827,11 +1827,11 @@ (((game-save-elt base-time)) ) (((game-save-elt game-time)) - (load! (-> *display* game-clock) (the-as (pointer uint64) (&+ (the-as game-save-tag s4-0) 16))) + (load! (-> *display* game-clock) (&-> (&+ (the-as game-save-tag s4-0) 16) user-uint64)) (set! (-> *game-info* kiosk-timeout) (-> *display* game-clock frame-counter)) ) (((game-save-elt total-game-time)) - (load! (-> *display* total-game-clock) (the-as (pointer uint64) (&+ (the-as game-save-tag s4-0) 16))) + (load! (-> *display* total-game-clock) (&-> (&+ (the-as game-save-tag s4-0) 16) user-uint64)) (set! (-> *game-info* kiosk-timeout) (-> *display* game-clock frame-counter)) ) (((game-save-elt continue)) @@ -2677,7 +2677,7 @@ 0 (label cfg-5) (set! (-> self result) - (mc-save (-> self card) (-> self which) (&-> (-> self save) type) (the-as int (-> self save info-int32))) + (mc-save (-> self card) (-> self which) (&-> self save type) (the-as int (-> self save info-int32))) ) (when (!= (-> self result) (mc-status-code ok)) (suspend) diff --git a/goal_src/jak3/engine/geometry/geometry.gc b/goal_src/jak3/engine/geometry/geometry.gc index 4e440f0a966..92257f5544e 100644 --- a/goal_src/jak3/engine/geometry/geometry.gc +++ b/goal_src/jak3/engine/geometry/geometry.gc @@ -98,7 +98,7 @@ (.svf (&-> arg0 quad) vf3) (let* ((f0-0 (vector-length arg0)) (f1-1 (vector-dot arg0 arg2)) - (f0-2 (- (* 0.02 f0-0) f1-1)) + (f0-2 (- (/ f0-0 50) f1-1)) ) (vector+float*! arg0 arg0 arg2 (fmin 16384.0 (* 16.0 f0-2))) ) @@ -679,16 +679,16 @@ 0.0 (let ((s5-0 (new-stack-matrix0))) (vector-negate! s4-0 arg1) - (vector-flatten! s4-0 s4-0 (-> arg0 vector 2)) + (vector-flatten! s4-0 s4-0 (-> arg0 fvec)) (vector-normalize! s4-0 1.0) - (let ((f30-0 (vector-dot (-> arg0 vector 1) s4-0))) + (let ((f30-0 (vector-dot (-> arg0 uvec) s4-0))) (when (< f30-0 0.99999) - (vector-cross! s4-0 (-> arg0 vector 1) s4-0) + (vector-cross! s4-0 (-> arg0 uvec) s4-0) (let ((f0-4 (vector-length s4-0))) - (if (< 0.0 (vector-dot s4-0 (-> arg0 vector 2))) + (if (< 0.0 (vector-dot s4-0 (-> arg0 fvec))) (set! f0-4 (- f0-4)) ) - (matrix-axis-sin-cos! s5-0 (-> arg0 vector 2) f0-4 f30-0) + (matrix-axis-sin-cos! s5-0 (-> arg0 fvec) f0-4 f30-0) ) (matrix*! arg0 arg0 s5-0) ) @@ -715,8 +715,8 @@ ) (let ((f30-1 (* 2.0 (acos (-> s5-0 w))))) (set! (-> arg0 quad) (-> s5-0 quad)) - (vector-negate! (the-as vector arg0) (the-as vector arg0)) - (if (= (vector-normalize-ret-len! (the-as vector arg0) 1.0) 0.0) + (vector-negate! (-> arg0 vec) (-> arg0 vec)) + (if (= (vector-normalize-ret-len! (-> arg0 vec) 1.0) 0.0) (set! (-> arg0 y) 1.0) ) f30-1 @@ -725,14 +725,14 @@ ) (defun quaternion-seek ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float) (arg4 float)) - "Strange quaternion rotate toward function. Arg3 is ignored. Arg4 is the max seek amount." + "Strange quaternion rotate toward function. arg3 is ignored. arg4 is the max seek amount." (let ((s5-0 (new-stack-matrix0)) (s4-0 (new-stack-matrix0)) ) (quaternion->matrix s5-0 arg1) (quaternion->matrix s4-0 arg2) (let ((s2-1 (new-stack-quaternion0))) - (quaternion-from-two-vectors-max-angle! s2-1 (-> s5-0 vector 2) (-> s4-0 vector 2) arg4) + (quaternion-from-two-vectors-max-angle! s2-1 (-> s5-0 fvec) (-> s4-0 fvec) arg4) (quaternion-normalize! (quaternion*! arg0 arg0 s2-1)) ) ) @@ -1489,7 +1489,7 @@ ) (while (> s3-0 0) (+! s3-0 -1) - (set! f28-0 (* 0.5 f28-0)) + (set! f28-0 (/ f28-0 2)) (let ((v1-6 (cond ((< f22-0 f20-0) (curve-get-pos! s1-0 s0-1 arg0) diff --git a/goal_src/jak3/engine/gfx/background/hfrag/hfrag-work.gc b/goal_src/jak3/engine/gfx/background/hfrag/hfrag-work.gc index 2f81710a3cb..8f477bebc23 100644 --- a/goal_src/jak3/engine/gfx/background/hfrag/hfrag-work.gc +++ b/goal_src/jak3/engine/gfx/background/hfrag/hfrag-work.gc @@ -151,7 +151,7 @@ (s1-0 (* s4-1 4)) (s0-0 (* s3-1 4)) ) - (setup-mid-vertex-index! this (the-as hfrag-vert-index (-> s2-0 data)) s1-0 s0-0) + (setup-mid-vertex-index! this (-> s2-0 data 0) s1-0 s0-0) (setup-mid-vertex-index! this (-> s2-0 data 1) (+ s1-0 1) s0-0) (setup-mid-vertex-index! this (-> s2-0 data 2) (+ s1-0 2) s0-0) (setup-mid-vertex-index! this (-> s2-0 data 3) (+ s1-0 3) s0-0) @@ -196,7 +196,7 @@ (s1-1 (* s4-2 2)) (s0-1 (* s3-2 2)) ) - (setup-mid-vertex-index! this (the-as hfrag-vert-index (-> s2-1 data)) s1-1 s0-1) + (setup-mid-vertex-index! this (-> s2-1 data 0) s1-1 s0-1) (setup-mid-vertex-index! this (-> s2-1 data 1) (+ s1-1 1) s0-1) (setup-mid-vertex-index! this (-> s2-1 data 2) (+ s1-1 2) s0-1) (setup-mid-vertex-index! this (-> s2-1 data 3) s1-1 (+ s0-1 1)) @@ -225,7 +225,7 @@ (s1-2 (* s4-3 2)) (s0-2 (* s3-3 2)) ) - (setup-near-vertex-index! this (the-as hfrag-vert-index (-> s2-2 data)) s1-2 s0-2) + (setup-near-vertex-index! this (-> s2-2 data 0) s1-2 s0-2) (setup-near-vertex-index! this (-> s2-2 data 1) (+ s1-2 1) s0-2) (setup-near-vertex-index! this (-> s2-2 data 2) (+ s1-2 2) s0-2) (setup-near-vertex-index! this (-> s2-2 data 3) s1-2 (+ s0-2 1)) diff --git a/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc b/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc index b641f89c641..4c3518d6bb7 100644 --- a/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc +++ b/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc @@ -593,7 +593,7 @@ This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." (let ((gp-0 *hfrag-work*)) (let ((s4-0 (-> *level* draw-level *draw-index*))) - (mem-copy! (&-> (-> gp-0 hfrag) type) (&-> this type) 96) + (mem-copy! (&-> gp-0 hfrag type) (&-> this type) 96) (init-work-from-current-hfrag! gp-0) (pick-level-of-detail! gp-0 s4-0) (trim-dma-to-fit-in-memory gp-0) @@ -607,7 +607,7 @@ (generate-montage-texture gp-0) (finalize-dma! gp-0) ) - (set-dirty-mask! (the-as level (-> *level* level)) 10 #x1a000 #xf4000) + (set-dirty-mask! (-> *level* level 0) 10 #x1a000 #xf4000) 0 (none) ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/emerc.gc b/goal_src/jak3/engine/gfx/foreground/merc/emerc.gc index ec5d326c846..99e02431ebd 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/emerc.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/emerc.gc @@ -8,7 +8,7 @@ ;; DECOMP BEGINS (defun emerc-vu1-initialize-chain ((gif-packet dma-gif-packet)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet gif-packet) emerc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> gif-packet dma-vif) emerc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xb :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/merc.gc b/goal_src/jak3/engine/gfx/foreground/merc/merc.gc index 124397af270..53bac41f6f6 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/merc.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/merc.gc @@ -435,7 +435,7 @@ ) (defun merc-vu1-initialize-chain ((arg0 dma-gif-packet) (arg1 int)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet arg0) merc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> arg0 dma-vif) merc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc index e65712f5e7c..c35012da7ad 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc @@ -710,9 +710,9 @@ (f0-14 (/ f30-0 (-> s2-0 uv-repeat-dist))) (f28-1 (+ (- f0-14 (* (the float (the int (/ f0-14 6.0))) 6.0)) (-> this current-uv-shift))) ) - (vector-normalize! (the-as vector arg4) 1.0) + (vector-normalize! (-> arg4 rvec) 1.0) (let* ((a2-4 (-> (camera-matrix) uvec)) - (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (the-as vector arg4) a2-4)) + (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (-> arg4 rvec) a2-4)) (f26-1 6.0) ) (set! sv-160 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (/ f22-0 2))) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc index b714e013ef0..8e853a6e852 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc @@ -347,7 +347,7 @@ (set! sv-36 (-> arg0 process 0 clock)) (when (not (or (= (-> sv-36 time-adjust-ratio) 0.0) (< gp-0 2))) (when (logtest? (-> sv-16 flags) (lightning-spec-flags lsf4)) - (let ((f1-1 (vector-vector-distance (the-as vector (-> sv-24 data)) (-> sv-24 data s4-0)))) + (let ((f1-1 (vector-vector-distance (-> sv-24 data 0) (-> sv-24 data s4-0)))) (set! (-> s5-0 box-size) (* (-> sv-16 box-size) (fmax 1.0 (fmin 5.0 (/ f1-1 (* 4096.0 (the float (-> sv-16 adjust-distance))))))) ) @@ -648,8 +648,8 @@ (set! (-> sv-176 num-dps) (the-as uint (* sv-144 2))) (set! (-> sv-176 kick-offset) (the-as uint 0)) (when sv-32 - (adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-176 shader)) sv-32) - (adgif-shader-update! (the-as adgif-shader (-> sv-176 shader)) sv-32) + (adgif-shader<-texture-simple! (-> sv-176 shader 0 shader) sv-32) + (adgif-shader-update! (-> sv-176 shader 0 shader) sv-32) ) (set! (-> sv-176 shader 0 shader alpha) (new 'static 'gs-miptbp :tbp1 #x48 :tbw2 #x20)) (set! (-> sv-176 shader 0 shader tex0 tfx) 0) diff --git a/goal_src/jak3/engine/gfx/mood/mood-funcs2.gc b/goal_src/jak3/engine/gfx/mood/mood-funcs2.gc index 8adae9fe7a9..86323bf9545 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-funcs2.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-funcs2.gc @@ -220,12 +220,7 @@ ) (let ((f0-5 (get-sphere-interp a0-10 a1-5 61440.0 69632.0))) (set-vector! (-> arg0 times 0) 1.0 1.0 1.0 1.0) - (vector-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) - f0-5 - ) + (vector-lerp! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 0) f0-5) ) ) ) @@ -391,9 +386,9 @@ (set! (-> s5-0 door-target-interp) 0.0) ) (vector4-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) + (-> arg0 times 0) + (-> arg0 times 0) + (-> *level* level-default mood-context times 0) (-> s5-0 door-current-interp) ) (if (not (paused?)) diff --git a/goal_src/jak3/engine/gfx/mood/mood-tables2.gc b/goal_src/jak3/engine/gfx/mood/mood-tables2.gc index 997ca61aeb8..d252dc98b0a 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-tables2.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-tables2.gc @@ -125,13 +125,13 @@ ) (dotimes (data-idx 8) (vector-float*! - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) + (-> *overide-table* mood-fog-table data data-idx fog-color) + (-> *overide-table* mood-fog-table data data-idx fog-color) (-> *overide-table* mood-fog-table data data-idx fog-color w) ) (vector-float*! - (the-as vector (-> *overide-table* mood-color-table data data-idx)) - (the-as vector (-> *overide-table* mood-color-table data data-idx)) + (-> *overide-table* mood-color-table data data-idx lgt-color) + (-> *overide-table* mood-color-table data data-idx lgt-color) (-> *overide-table* mood-color-table data data-idx lgt-color w) ) (vector-float*! diff --git a/goal_src/jak3/engine/gfx/mood/mood.gc b/goal_src/jak3/engine/gfx/mood/mood.gc index 7bc307c41a5..578376a9f4e 100644 --- a/goal_src/jak3/engine/gfx/mood/mood.gc +++ b/goal_src/jak3/engine/gfx/mood/mood.gc @@ -249,7 +249,7 @@ (let ((s1-0 (-> arg0 times))) (set! sv-64 (-> arg0 times 1)) (let ((s0-0 (-> arg0 light-group))) - (vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) + (vector4-lerp! (-> s1-0 0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) (vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0) (vector-copy! (-> arg0 times 2) sv-64) (vector-copy! (-> arg0 times 3) sv-64) @@ -344,11 +344,7 @@ ) ) (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) - (vector+! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (-> *level* level-default mood-context times 1) - ) + (vector+! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 1)) (when arg1 (vector-copy! (-> arg0 times 1) (-> *level* level-default mood-context times 1)) (set! (-> arg0 times 1 w) 1.0) @@ -410,12 +406,7 @@ (defun update-mood-interior-ambient ((arg0 mood-context) (arg1 symbol) (arg2 float)) (update-mood-interior arg0 arg1) (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) - (vector+float*! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (-> *level* level-default mood-context times 1) - arg2 - ) + (vector+float*! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 1) arg2) ) (defbehavior update-mood-flames time-of-day-proc ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float) (arg6 float)) @@ -776,7 +767,7 @@ (a0-14 (-> arg0 times)) (s4-0 (-> arg0 times 1)) ) - (vector4-lerp! (the-as vector a0-14) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) + (vector4-lerp! (-> a0-14 0) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) (vector4-lerp! s4-0 (the-as vector (+ s3-0 0)) (the-as vector (+ s2-0 0)) f30-0) (vector-copy! (-> arg0 times 2) s4-0) (vector-copy! (-> arg0 times 3) s4-0) @@ -1183,8 +1174,8 @@ (dotimes (s4-0 8) (set-vector! s5-0 255.0 255.0 255.0 128.0) (vector4-lerp! - (the-as vector (-> this mood-fog-table data s4-0)) - (the-as vector (-> this mood-fog-table data s4-0)) + (-> this mood-fog-table data s4-0 fog-color) + (-> this mood-fog-table data s4-0 fog-color) s5-0 f30-0 ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc index 8cd8e3a2a6e..6f3bd3658fe 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc @@ -251,13 +251,7 @@ (s5-0 (new 'stack-no-clear 'matrix)) ) (let ((s0-0 (new 'stack-no-clear 'vector))) - (sp-init-fields! - (the-as (pointer float) (-> s2-0 rvec)) - arg2 - (sp-field-id launch-fields-start) - (sp-field-id launch-fields-end) - #t - ) + (sp-init-fields! (&-> s2-0 rvec x) arg2 (sp-field-id launch-fields-start) (sp-field-id launch-fields-end) #t) (matrix-rotate-xyz! s5-0 (-> s2-0 rvec)) (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) (matrix-rotate-xyz! s5-0 (-> s2-0 uvec)) @@ -430,7 +424,7 @@ ) (let* ((a1-2 (-> arg1 init-specs 0)) (a1-3 (sp-init-fields! - (the-as (pointer float) (-> s5-0 rvec)) + (&-> s5-0 rvec x) (the-as (inline-array sp-field-init-spec) a1-2) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -583,7 +577,7 @@ (set! (-> arg2 fade z) 99999.0) (set! sv-80 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) sv-80 (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -625,7 +619,7 @@ (else (set! sv-80 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) sv-80 (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -1008,18 +1002,7 @@ ;; WARN: Return type mismatch object vs none. (defmethod spawn-from-mat ((this sparticle-launch-control) (arg0 matrix)) - (let* ((a2-0 (-> this origin)) - (a3-0 arg0) - (v1-0 (-> a3-0 rvec quad)) - (a0-1 (-> a3-0 uvec quad)) - (a1-1 (-> a3-0 fvec quad)) - (a3-1 (-> a3-0 trans quad)) - ) - (set! (-> a2-0 rvec quad) v1-0) - (set! (-> a2-0 uvec quad) a0-1) - (set! (-> a2-0 fvec quad) a1-1) - (set! (-> a2-0 trans quad) a3-1) - ) + (matrix-copy! (-> this origin) arg0) (let ((s4-0 (-> this group))) (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) (let ((f0-0 (-> s4-0 rotate-x)) @@ -1055,18 +1038,7 @@ ;; WARN: Return type mismatch object vs none. (defmethod spawn-from-cspace ((this sparticle-launch-control) (arg0 cspace)) - (let* ((v1-0 (-> this origin)) - (a3-0 (-> arg0 bone transform)) - (a0-2 (-> a3-0 rvec quad)) - (a1-1 (-> a3-0 uvec quad)) - (a2-0 (-> a3-0 fvec quad)) - (a3-1 (-> a3-0 trans quad)) - ) - (set! (-> v1-0 rvec quad) a0-2) - (set! (-> v1-0 uvec quad) a1-1) - (set! (-> v1-0 fvec quad) a2-0) - (set! (-> v1-0 trans quad) a3-1) - ) + (matrix-copy! (-> this origin) (-> arg0 bone transform)) (let ((s4-0 (-> this group))) (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) (let ((f0-0 (-> s4-0 rotate-x)) @@ -1103,7 +1075,7 @@ ;; WARN: Return type mismatch int vs object. (defmethod spawn ((this sparticle-launch-control) (arg0 vector)) (with-pp - (set! (-> this origin trans quad) (-> arg0 quad)) + (vector-copy! (-> this origin trans) arg0) (if (not (or (is-visible? this arg0) (logtest? (-> this group flags) (sp-group-flag sp1 sp2)) (and (logtest? (-> this group flags) (sp-group-flag sp2 sp11)) @@ -1113,20 +1085,9 @@ ) (return (the-as object 0)) ) - (when (logtest? (-> this group flags) (sp-group-flag sp12)) - (let* ((v1-18 (-> this origin)) - (a3-0 (-> this local-space-binding mat-prev)) - (a0-5 (-> a3-0 rvec quad)) - (a1-2 (-> a3-0 uvec quad)) - (a2-0 (-> a3-0 fvec quad)) - (a3-1 (-> a3-0 trans quad)) - ) - (set! (-> v1-18 rvec quad) a0-5) - (set! (-> v1-18 uvec quad) a1-2) - (set! (-> v1-18 fvec quad) a2-0) - (set! (-> v1-18 trans quad) a3-1) + (if (logtest? (-> this group flags) (sp-group-flag sp12)) + (matrix-copy! (-> this origin) (-> this local-space-binding mat-prev)) ) - ) (let ((s4-0 (the-as int (current-time))) (s5-0 (-> this last-spawn-time)) ) diff --git a/goal_src/jak3/engine/level/region.gc b/goal_src/jak3/engine/level/region.gc index 74ba7143a92..ac11de39188 100644 --- a/goal_src/jak3/engine/level/region.gc +++ b/goal_src/jak3/engine/level/region.gc @@ -580,8 +580,8 @@ (vector-copy! (-> *level* target-pos 1) (-> *level* target-pos 0)) (set! (-> *level* target-pos 0 quad) (-> (target-pos 0) quad)) (when (and *execute-regions* (-> *setting-control* user-current region-mode) (not (paused?))) - (region-tree-execute 'camera (-> *level* camera-pos 1) (the-as vector (-> *level* camera-pos))) - (region-tree-execute 'target (-> *level* target-pos 1) (the-as vector (-> *level* target-pos))) + (region-tree-execute 'camera (-> *level* camera-pos 1) (-> *level* camera-pos 0)) + (region-tree-execute 'target (-> *level* target-pos 1) (-> *level* target-pos 0)) ) 0 (none) diff --git a/goal_src/jak3/engine/load/load-dgo.gc b/goal_src/jak3/engine/load/load-dgo.gc index 88ad36cdfd9..dd383e71361 100644 --- a/goal_src/jak3/engine/load/load-dgo.gc +++ b/goal_src/jak3/engine/load/load-dgo.gc @@ -86,7 +86,7 @@ (set! (-> s2-0 address) dest-addr) (set! (-> s2-0 section) (the-as uint chunk-idx)) (set! (-> s2-0 maxlen) (the-as uint max-len)) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename)) name 48) + (copyn-charp<-string (-> s2-0 basename name) name 48) (call *load-str-rpc* (the-as uint 0) (the-as pointer s2-0) (the-as uint 32)) ) (set! *load-str-lock* #t) @@ -124,10 +124,10 @@ "Start playing a streaming audio." (set! *que-str-lock* #t) (let ((s2-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename)) name 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 3)) "" 48) + (copyn-charp<-string (-> s2-0 basename 0 name) name 48) + (copyn-charp<-string (-> s2-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s2-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s2-0 basename 3 name) "" 48) (set! (-> s2-0 id 0) (the-as uint id)) (set! (-> s2-0 id 1) (the-as uint 0)) (set! (-> s2-0 id 2) (the-as uint 0)) @@ -146,10 +146,10 @@ "Stop playing streaming audio." (set! *que-str-lock* #t) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) name 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) name 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) (set! (-> s4-0 id 0) (the-as uint id)) (set! (-> s4-0 id 1) (the-as uint 0)) (set! (-> s4-0 id 2) (the-as uint 0)) @@ -165,20 +165,20 @@ (when (and (not (check-busy *play-str-rpc*)) (not *que-str-lock*)) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) (if name0 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) name0 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) name0 48) + (copyn-charp<-string (-> s4-0 basename 0 name) "" 48) ) (if name1 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) name1 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) + (copyn-charp<-string (-> s4-0 basename 1 name) name1 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) ) (if name2 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) name2 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) name2 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) ) (if name3 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) name3 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) name3 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) ) (dotimes (v1-14 4) (set! (-> s4-0 id v1-14) (-> ids v1-14)) diff --git a/goal_src/jak3/engine/load/loader.gc b/goal_src/jak3/engine/load/loader.gc index b9cdb672c70..05404aaf27c 100644 --- a/goal_src/jak3/engine/load/loader.gc +++ b/goal_src/jak3/engine/load/loader.gc @@ -598,7 +598,7 @@ (set! (-> s4-4 length) 0) (dotimes (s3-2 3) (when (-> this rec s3-2 name) - (mem-copy! (&-> (-> s4-4 (-> s4-4 length)) type) (&-> (-> this rec s3-2) type) 44) + (mem-copy! (&-> s4-4 (-> s4-4 length) type) (&-> this rec s3-2 type) 44) (+! (-> s4-4 length) 1) ) ) @@ -724,8 +724,8 @@ (if (>= arg3 (-> this rec 0 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec) 0 type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 0 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -733,7 +733,7 @@ (if (>= arg3 (-> this rec 1 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -747,15 +747,15 @@ ) (cond ((< arg3 (-> this rec 0 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec) 0 type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 0 type) 44) (set! (-> this rec 0 name) arg0) (set! (-> this rec 0 parts) arg1) (set! (-> this rec 0 priority) arg3) (set! (-> this rec 0 owner) (process->handle arg2)) ) ((< arg3 (-> this rec 1 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) (set! (-> this rec 1 name) arg0) (set! (-> this rec 1 parts) arg1) (set! (-> this rec 1 priority) arg3) diff --git a/goal_src/jak3/engine/math/quaternion.gc b/goal_src/jak3/engine/math/quaternion.gc index 59c5105e3dc..14fc579fee2 100644 --- a/goal_src/jak3/engine/math/quaternion.gc +++ b/goal_src/jak3/engine/math/quaternion.gc @@ -644,7 +644,7 @@ (defun quaternion-exp! ((arg0 quaternion) (arg1 quaternion)) "Quaternion exponentiation. Unused." - (let ((f30-0 (vector-length (the-as vector arg1)))) + (let ((f30-0 (vector-length (-> arg1 vec)))) (cond ((= f30-0 0.0) (set! (-> arg0 x) 0.0) @@ -981,7 +981,7 @@ (defun vector-rotate-around-axis! ((arg0 vector) (arg1 quaternion) (arg2 float) (arg3 vector)) "Rotate along y so z-axis points to match another. Use arg3 as the max rotation amount." (let ((a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) arg3 arg2))) - (vector-orient-by-quat! arg0 (the-as vector arg1) a2-1) + (vector-orient-by-quat! arg0 (-> arg1 vec) a2-1) ) ) diff --git a/goal_src/jak3/engine/nav/nav-control.gc b/goal_src/jak3/engine/nav/nav-control.gc index ed7fd1e4561..e3de00b438d 100644 --- a/goal_src/jak3/engine/nav/nav-control.gc +++ b/goal_src/jak3/engine/nav/nav-control.gc @@ -270,7 +270,7 @@ (defmethod find-poly-containing-point-1 ((this nav-control) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> v1-0 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> v1-0 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> this state mesh) v1-0) @@ -279,7 +279,7 @@ (defmethod find-poly-containing-point-2 ((this nav-control) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> v1-0 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> v1-0 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> this state mesh) v1-0) @@ -289,7 +289,7 @@ ;; WARN: Return type mismatch object vs symbol. (defmethod is-above-poly-max-height? ((this nav-control) (arg0 vector) (arg1 float)) (let ((a1-1 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> a1-1 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> a1-1 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> this nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (the-as @@ -748,9 +748,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-14 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-10)) ) (set! (-> s5-0 inside-dist) (- (-> a0-13 r) (sqrtf (-> s5-0 dist2)))) @@ -780,12 +780,7 @@ (label cfg-13) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-17 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-17 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-17 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-20 2) (let ((a0-28 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-20)))) @@ -812,7 +807,7 @@ (circle-tangent-directions (-> arg0 current-pos) (-> this sphere-array v1-28) - (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1) ) (set! (-> s5-0 dir-update) #f) @@ -958,9 +953,9 @@ (.svf (&-> v1-55 quad) vf1) ) ) - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-41 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-52) 0 1 @@ -968,7 +963,7 @@ ) (v1-65 (- 1 a1-41)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-65) (-> s5-0 travel-len)) ) ) @@ -1043,9 +1038,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-13 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-9)) ) ) @@ -1070,12 +1065,7 @@ (label cfg-11) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-15 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-15 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-15 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-19 2) (let ((a0-31 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-19)))) @@ -1089,9 +1079,9 @@ ) ) 0 - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-25 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-28) 0 1 @@ -1099,7 +1089,7 @@ ) (v1-32 (- 1 a1-25)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-32) (-> s5-0 travel-len)) ) ) @@ -1732,7 +1722,6 @@ ) ) -;; WARN: Return type mismatch none vs symbol. (defmethod check-sphere-blocked! ((this nav-control) (arg0 vector) (arg1 int)) (if (logtest? (-> this flags) (nav-control-flag output-sphere-hash)) (check-sphere-blocked @@ -2068,10 +2057,9 @@ (set! sv-16 arg0) (let ((gp-0 (new 'stack-no-clear 'nav-poly))) (set! (-> gp-0 vertex1 z) (the-as float arg2)) - (vector-! (the-as vector (-> gp-0 vertex)) arg1 (the-as vector (-> this state mesh bounds))) + (vector-! (-> gp-0 vertex 0) arg1 (the-as vector (-> this state mesh bounds))) (when (or (not (-> gp-0 vertex1 z)) - (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (the-as vector (-> gp-0 vertex))) - ) + (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (-> gp-0 vertex 0))) ) (set! (-> gp-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> gp-0 data 20) (the-as uint 3)) @@ -2082,7 +2070,7 @@ (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) sv-16 - (the-as vector (-> gp-0 vertex)) + (-> gp-0 vertex 0) ) (vector+! sv-16 sv-16 (the-as vector (-> this state mesh bounds))) ) @@ -3323,8 +3311,8 @@ (vector-reset! (-> s5-0 in-dir)) (set! (-> s5-0 best-dir 0 quad) (-> this travel quad)) (set! (-> s5-0 best-dir 0 y) 0.0) - (vector-normalize! (the-as vector (-> s5-0 best-dir)) (-> this nav target-speed)) - (vector-! (-> s5-0 right-dir) (the-as vector (-> s5-0 best-dir)) (-> this velocity)) + (vector-normalize! (-> s5-0 best-dir 0) (-> this nav target-speed)) + (vector-! (-> s5-0 right-dir) (-> s5-0 best-dir 0) (-> this velocity)) (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) 4.0) (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) (dotimes (s4-0 (-> this nav sphere-count)) diff --git a/goal_src/jak3/engine/nav/nav-enemy.gc b/goal_src/jak3/engine/nav/nav-enemy.gc index b1689563b54..c684f97d372 100644 --- a/goal_src/jak3/engine/nav/nav-enemy.gc +++ b/goal_src/jak3/engine/nav/nav-enemy.gc @@ -196,7 +196,7 @@ (if *target* (look-at! (-> *target* neck) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) @@ -447,7 +447,7 @@ (a0-1 arg0) (a1-1 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-0 state mesh bounds))) + (vector-! (-> a1-1 vertex 0) a0-1 (the-as vector (-> v1-0 state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> v1-0 nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> v1-0 state mesh) a1-1) @@ -465,7 +465,7 @@ (a0-1 arg0) (a1-1 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-3 state mesh bounds))) + (vector-! (-> a1-1 vertex 0) a0-1 (the-as vector (-> v1-3 state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> v1-3 nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> v1-3 state mesh) a1-1) diff --git a/goal_src/jak3/engine/nav/nav-engine.gc b/goal_src/jak3/engine/nav/nav-engine.gc index b6add14b4b3..0db73a8524e 100644 --- a/goal_src/jak3/engine/nav/nav-engine.gc +++ b/goal_src/jak3/engine/nav/nav-engine.gc @@ -131,8 +131,8 @@ (set! (-> this mem-mesh) arg0) (cond ((= (-> arg0 work mesh-struct-in-scratch) 1) - (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> (-> this nav-mesh-addr) poly-array))) - (mem-copy! (&-> (-> this nav-mesh-addr) type) (&-> arg0 type) 112) + (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> this nav-mesh-addr poly-array))) + (mem-copy! (&-> this nav-mesh-addr type) (&-> arg0 type) 112) ) (else (set! (-> this nav-mesh-addr) arg0) @@ -463,14 +463,14 @@ (set! (-> gp-0 0 q-size) (the-as uint (* 18 (-> gp-0 0 nav-count)))) (set! (-> gp-0 0 done) 0) (when (> (-> gp-0 0 nav-count) 0) - (upload-nav-to-spr this (the-as nav-engine-spr-buffer gp-0)) + (upload-nav-to-spr this (-> gp-0 0)) (dma-sync (the-as pointer #x1000d400) 0 0) - (reloc-ptrs-to-spad this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-spad this (-> gp-0 0)) (while (< (-> gp-0 0 i-pass) (-> this max-pass-count)) - (do-callbacks this (the-as nav-engine-spr-buffer gp-0)) + (do-callbacks this (-> gp-0 0)) (+! (-> gp-0 0 i-pass) 1) ) - (reloc-ptrs-to-mem this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-mem this (-> gp-0 0)) (dotimes (s4-0 (-> gp-0 0 nav-count)) (let ((a2-1 (-> gp-0 0 spr-addr s4-0 state mesh))) ;; og:preserve-this @@ -481,7 +481,7 @@ ) ) ) - (download-nav-from-spr this (the-as nav-engine-spr-buffer gp-0)) + (download-nav-from-spr this (-> gp-0 0)) (dma-sync (the-as pointer #x1000d000) 0 0) (dotimes (s5-1 (-> gp-0 0 nav-count)) (let ((a2-3 (-> (&+ (-> gp-0 0 mem-addr) (* 288 s5-1)) 31))) diff --git a/goal_src/jak3/engine/nav/nav-mesh.gc b/goal_src/jak3/engine/nav/nav-mesh.gc index 9b2db80592c..d9061aa52db 100644 --- a/goal_src/jak3/engine/nav/nav-mesh.gc +++ b/goal_src/jak3/engine/nav/nav-mesh.gc @@ -1031,7 +1031,7 @@ (defmethod nav-mesh-method-45 ((this nav-mesh) (arg0 nav-poly)) (local-vars (v1-15 int) (sv-16 nav-poly)) - (let ((s4-0 (search-for-point (-> this poly-hash) (the-as vector (-> arg0 vertex)))) + (let ((s4-0 (search-for-point (-> this poly-hash) (-> arg0 vertex 0))) (s3-0 (-> this poly-hash bucket-size)) (s2-0 0) ) @@ -1054,7 +1054,7 @@ (when (and (and (>= (+ (-> v1-5 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-5 vertex2 w) f1-0))) (not (logtest? (-> sv-16 pat) (-> arg0 data 20))) ) - (if (point-in-poly? this sv-16 (the-as vector (-> arg0 vertex))) + (if (point-in-poly? this sv-16 (-> arg0 vertex 0)) (return sv-16) ) ) @@ -1337,7 +1337,7 @@ (sv-52 float) ) (set! sv-16 (the-as nav-poly #f)) - (set! sv-20 (search-for-sphere (-> this poly-hash) (the-as vector (-> arg0 vertex)) 12288.0)) + (set! sv-20 (search-for-sphere (-> this poly-hash) (-> arg0 vertex 0) 12288.0)) (set! (-> arg0 vertex2 x) (the-as float #f)) (let ((s4-0 (-> this poly-hash bucket-size)) (s3-0 sv-20) @@ -1363,7 +1363,7 @@ (when (and (and (>= (+ (-> v1-6 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-6 vertex2 w) f1-0))) (not (logtest? (-> sv-24 pat) (-> arg0 data 20))) ) - (when (point-in-poly? this sv-24 (the-as vector (-> arg0 vertex))) + (when (point-in-poly? this sv-24 (-> arg0 vertex 0)) (set! (-> arg0 vertex2 x) (the-as float #t)) (set! (-> arg0 vertex1 w) 0.0) (set! sv-16 sv-24) @@ -1580,7 +1580,7 @@ (set! sv-72 (-> v1-3 vertex1)) (set! sv-76 (-> v1-3 vertex2)) ) - (vector-3pt-cross! sv-32 (the-as vector sv-68) sv-72 sv-76) + (vector-3pt-cross! sv-32 (-> sv-68 0) sv-72 sv-76) (cond ((= (vector-length sv-32) 0.0) (set! sv-40 (+ sv-40 1)) @@ -1780,7 +1780,7 @@ (let ((s4-0 (new 'stack-no-clear 'vector))) (cond ((= (-> arg0 vertex-count) 3) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ((let* ((v1-2 (-> arg0 vertex2)) (a0-3 (-> arg0 vertex)) @@ -1791,14 +1791,14 @@ ) (< 0.0 f0-3) ) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex2) (-> arg0 vertex3)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex2) (-> arg0 vertex3)) ) (else - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ) (vector-copy! arg2 s4-0) - (set! (-> s4-0 w) (- (vector-dot s4-0 (the-as vector (-> arg0 vertex))))) + (set! (-> s4-0 w) (- (vector-dot s4-0 (-> arg0 vertex 0)))) (vector-copy! s5-0 arg3) (set! (-> s5-0 y) (/ (- (+ (* (-> arg3 x) (-> s4-0 x)) (* (-> arg3 z) (-> s4-0 z)) (-> s4-0 w))) (-> s4-0 y))) ) @@ -1932,8 +1932,8 @@ ) (dotimes (s1-0 (the-as int s2-0)) (when (= (-> arg0 adj-poly v1-1) 255) - (set! (-> gp-0 2 quad) (-> arg0 vertex v1-1 quad)) - (set! (-> gp-0 3 quad) (-> arg0 vertex s1-0 quad)) + (vector-copy! (-> gp-0 2) (-> arg0 vertex v1-1)) + (vector-copy! (-> gp-0 3) (-> arg0 vertex s1-0)) (set! (-> gp-0 2 y) (-> arg2 y)) (set! (-> gp-0 3 y) (-> arg2 y)) (set! (-> gp-0 2 w) 1.0) @@ -2013,7 +2013,7 @@ (defmethod nav-mesh-method-37 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) (let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3))) (set! (-> gp-0 2 vertex3 y) arg2) - (vector-! (the-as vector (-> gp-0 0)) arg0 (the-as vector (-> this bounds))) + (vector-! (-> gp-0 0 vertex0) arg0 (the-as vector (-> this bounds))) (vector-! (-> gp-0 0 vertex1) arg1 (the-as vector (-> this bounds))) (vector-copy! (-> gp-0 2 vertex1) (-> gp-0 0 vertex0)) (set! (-> gp-0 2 vertex2 x) (-> this nearest-y-threshold)) @@ -2021,10 +2021,10 @@ (let ((a1-4 (nav-mesh-method-45 this (the-as nav-poly (-> gp-0 2 vertex1))))) (cond (a1-4 - (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (the-as vector (-> gp-0 0)) (-> gp-0 0 vertex1)) + (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (-> gp-0 0 vertex0) (-> gp-0 0 vertex1)) (until #f (set! (-> gp-0 2 vertex3 z) - (nav-mesh-method-36 this (-> gp-0 0 vertex3) (the-as vector (-> gp-0 1)) (-> gp-0 2 vertex3 y)) + (nav-mesh-method-36 this (-> gp-0 0 vertex3) (-> gp-0 1 vertex0) (-> gp-0 2 vertex3 y)) ) (when (< (-> gp-0 2 vertex3 z) (-> gp-0 2 vertex3 y)) (set! (-> gp-0 2 vertex3 y) (-> gp-0 2 vertex3 z)) @@ -2132,7 +2132,7 @@ ) (defmethod nav-mesh-method-38 ((this nav-mesh) (arg0 nav-poly)) - (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector arg0) (the-as vector (-> this bounds))))) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> arg0 vertex0) (the-as vector (-> this bounds))))) (countdown (s3-0 (-> this nav-control-count)) (let ((v1-2 (-> this nav-control-array s3-0))) (if (-> v1-2 process) diff --git a/goal_src/jak3/engine/physics/cloth.gc b/goal_src/jak3/engine/physics/cloth.gc index 04df0e9d79d..0de9608a365 100644 --- a/goal_src/jak3/engine/physics/cloth.gc +++ b/goal_src/jak3/engine/physics/cloth.gc @@ -57,13 +57,13 @@ (when (> (-> this anchor-points length) 0) (let ((v1-6 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> this anchor-points data)) - (the-as vector (-> this particles data (-> this anchor-points data 0 particle-index))) + (-> this anchor-points data 0 anchor-pos) + (-> this particles data (-> this anchor-points data 0 particle-index) pos) ) ) ) (dotimes (a0-4 (-> this particles length)) - (vector+! (the-as vector (-> this particles data a0-4)) (the-as vector (-> this particles data a0-4)) v1-6) + (vector+! (-> this particles data a0-4 pos) (-> this particles data a0-4 pos) v1-6) ) ) ) @@ -254,7 +254,7 @@ s3-0 (the-as bucket-id s2-0) *temp-string* - (the-as vector (-> this particles data s5-0)) + (-> this particles data s5-0 pos) (font-color red) (the-as vector2h #f) ) @@ -297,7 +297,7 @@ s3-0 (the-as bucket-id s2-0) *temp-string* - (the-as vector (-> this particles data s5-0)) + (-> this particles data s5-0 pos) (the-as font-color s1-0) (the-as vector2h #f) ) @@ -654,8 +654,8 @@ (let ((s4-0 (-> this stick-constraints data s5-0))) 0.0 (let ((f0-1 (vector-vector-distance - (the-as vector (-> this particles data (-> s4-0 particle0))) - (the-as vector (-> this particles data (-> s4-0 particle1))) + (-> this particles data (-> s4-0 particle0) pos) + (-> this particles data (-> s4-0 particle1) pos) ) ) ) @@ -1007,7 +1007,7 @@ (when (< sv-212 (* sv-168 sv-168)) (vector-normalize-copy! sv-216 sv-208 sv-168) (vector-! sv-216 sv-216 sv-208) - (when (and (> sv-40 0) (< (vector-dot sv-216 (the-as vector sv-64)) 0.0)) + (when (and (> sv-40 0) (< (vector-dot sv-216 (-> sv-64 rvec)) 0.0)) ) (vector+float*! (-> sv-68 pos) (-> sv-68 pos) sv-216 (-> sv-68 mass-scale)) (vector+float*! (-> sv-72 pos) (-> sv-72 pos) sv-216 (-> sv-72 mass-scale)) @@ -1317,7 +1317,7 @@ (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index0))) 32) ) ) - (the-as vector sv-16) + (-> sv-16 pos) ) ) (set! sv-84 (vector-! @@ -1326,7 +1326,7 @@ (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index1))) 32) ) ) - (the-as vector sv-16) + (-> sv-16 pos) ) ) (set! sv-88 (new 'stack-no-clear 'vector)) @@ -1476,13 +1476,13 @@ ) (vector-! a2-1 - (the-as vector (-> this particles data t1-0)) - (the-as vector (-> this particles data (+ (-> this cloth-width) 1 t1-0))) + (-> this particles data t1-0 pos) + (-> this particles data (+ (-> this cloth-width) 1 t1-0) pos) ) (vector-! a3-2 - (the-as vector (-> this particles data (+ t1-0 1))) - (the-as vector (-> this particles data (+ t1-0 (-> this cloth-width)))) + (-> this particles data (+ t1-0 1) pos) + (-> this particles data (+ t1-0 (-> this cloth-width)) pos) ) (vector-cross! (-> *normal-array* t0-4) a2-1 a3-2) ) @@ -1493,7 +1493,7 @@ ) (defmethod cloth-system-method-33 ((this cloth-system) (lights vu-lights)) - (vu-lights<-light-group! lights (the-as light-group (-> *time-of-day-context* light-group))) + (vu-lights<-light-group! lights (-> *time-of-day-context* light-group 0)) (none) ) @@ -1782,14 +1782,14 @@ (set! (-> s5-0 face-normal-needs-flip?) #f) (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) - (vu-lights<-light-group! (-> s5-0 lights) (the-as light-group (-> *time-of-day-context* light-group))) + (vu-lights<-light-group! (-> s5-0 lights) (-> *time-of-day-context* light-group 0)) (dotimes (s4-0 (+ (-> this cloth-height) -1)) (let* ((a0-17 (+ sv-16 (/ (+ sv-32 -1) 2) (* (+ sv-24 (/ (+ sv-40 -1) 2)) (+ (-> this cloth-width) -1)))) (s3-0 (-> *normal-array* a0-17)) (s1-0 (-> this particles data (+ sv-16 (* sv-24 (-> this cloth-width))))) (s2-0 (new 'stack-no-clear 'vector)) ) - (vector-! s2-0 (the-as vector s1-0) (math-camera-pos)) + (vector-! s2-0 (-> s1-0 pos) (math-camera-pos)) (set! (-> s5-0 face-normal-needs-flip?) (< 0.0 (vector-dot s2-0 s3-0))) ) (cloth-system-method-30 this sv-16 sv-24 s5-0 0) @@ -1853,14 +1853,14 @@ ) ) (vector-matrix*! - (the-as vector (-> this anchor-points data s4-0)) - (the-as vector (-> this mesh anchor-transforms data s4-0)) + (-> this anchor-points data s4-0 anchor-pos) + (-> this mesh anchor-transforms data s4-0 offset) a2-0 ) ) (vector-float*! - (the-as vector (-> this anchor-points data s4-0)) - (the-as vector (-> this anchor-points data s4-0)) + (-> this anchor-points data s4-0 anchor-pos) + (-> this anchor-points data s4-0 anchor-pos) (/ 1.0 (-> this anchor-points data s4-0 anchor-pos w)) ) (set! (-> this anchor-points data s4-0 anchor-pos w) 1.0) @@ -1882,7 +1882,7 @@ (set! (-> s3-0 w) 1.0) (vector-matrix*! s3-0 - (the-as vector (-> this mesh sphere-transforms data s4-1)) + (-> this mesh sphere-transforms data s4-1 offset) (-> (the-as process-focusable s5-0) node-list data @@ -1910,7 +1910,7 @@ (s5-0 (vector-matrix*! (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) - (the-as vector (-> this mesh disc-transforms data s4-2)) + (-> this mesh disc-transforms data s4-2 offset) (-> (the-as process-focusable s5-0) node-list data @@ -1920,7 +1920,7 @@ ) ) (vector-rotate*! - (the-as vector (-> this disc-collision-constraints data s4-2)) + (-> this disc-collision-constraints data s4-2 normal) (the-as vector (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2))) (-> (the-as process-focusable s5-0) node-list diff --git a/goal_src/jak3/engine/physics/ragdoll-edit.gc b/goal_src/jak3/engine/physics/ragdoll-edit.gc index 0f333026f54..90543886aeb 100644 --- a/goal_src/jak3/engine/physics/ragdoll-edit.gc +++ b/goal_src/jak3/engine/physics/ragdoll-edit.gc @@ -12,7 +12,7 @@ (defun matrix->axis-angle ((arg0 vector) (arg1 matrix)) (let ((s5-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) arg1))) - (vector-normalize-copy! arg0 (the-as vector s5-0) 1.0) + (vector-normalize-copy! arg0 (-> s5-0 vec) 1.0) (set! (-> arg0 w) (* 2.0 (acos (-> s5-0 w)))) ) ) diff --git a/goal_src/jak3/engine/physics/ragdoll.gc b/goal_src/jak3/engine/physics/ragdoll.gc index aadb8976505..5fddb72f682 100644 --- a/goal_src/jak3/engine/physics/ragdoll.gc +++ b/goal_src/jak3/engine/physics/ragdoll.gc @@ -31,12 +31,8 @@ 0 ) (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) - (quaternion*! - (the-as quaternion (-> this ragdoll-joints)) - (-> this rotate-vel) - (the-as quaternion (-> this ragdoll-joints)) - ) - (quaternion-normalize! (the-as quaternion (-> this ragdoll-joints))) + (quaternion*! (-> this ragdoll-joints 0 quat) (-> this rotate-vel) (-> this ragdoll-joints 0 quat)) + (quaternion-normalize! (-> this ragdoll-joints 0 quat)) (set! (-> this stable-joints) 0) (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) (let ((s4-1 (new 'stack-no-clear 'collide-query)) @@ -181,7 +177,7 @@ (quaternion-negate! (-> this rotate-vel) (-> this rotate-vel)) ) (when (< (-> this rotate-vel w) (cos 7281.778)) - (let ((a1-4 (vector-normalize! (the-as vector (-> this rotate-vel)) 1.0))) + (let ((a1-4 (vector-normalize! (-> this rotate-vel vec) 1.0))) (quaternion-vector-angle! (-> this rotate-vel) a1-4 7281.778) ) ) @@ -626,7 +622,7 @@ (let ((v1-60 (new 'stack-no-clear 'vector))) (vector*! v1-60 (-> s3-1 scale) (-> arg2 root scale)) (vector*! v1-60 v1-60 (-> arg1 scale)) - (vector*! (the-as vector (-> arg0 bone transform)) (the-as vector (-> arg0 bone transform)) v1-60) + (vector*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) v1-60) (vector*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) v1-60) (vector*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) v1-60) ) @@ -705,12 +701,9 @@ ((= (-> arg1 node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) (logior! (-> this ragdoll-flags) (ragdoll-flag mirror)) (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2))) - (a1-5 (vector-normalize-copy! - (new 'stack-no-clear 'vector) - (the-as vector (-> arg1 node-list data 2 bone transform)) - 1.0 - ) - ) + (a1-5 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2 bone transform rvec) 1.0) + ) ) (ragdoll-reflect-matrix arg0 a1-5 s4-0) ) diff --git a/goal_src/jak3/engine/physics/rigid-body.gc b/goal_src/jak3/engine/physics/rigid-body.gc index dd96fe38c7c..57ce828f818 100644 --- a/goal_src/jak3/engine/physics/rigid-body.gc +++ b/goal_src/jak3/engine/physics/rigid-body.gc @@ -566,10 +566,10 @@ (set! (-> s5-0 impact-info prim-id) (-> v1-33 prim-id)) ) (set! (-> s5-0 impact-info pat) (-> s5-0 cquery best-other-tri pat)) - (rigid-body-control-method-23 arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 impact-info velocity)) + (rigid-body-control-method-23 arg0 (-> s5-0 impact-info point) (-> s5-0 impact-info velocity)) (when (-> s5-0 rbody2) (init-velocities! (-> s5-0 rbody2)) - (rigid-body-control-method-23 (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 vel)) + (rigid-body-control-method-23 (-> s5-0 rbody2) (-> s5-0 impact-info point) (-> s5-0 vel)) (vector-! (-> s5-0 impact-info velocity) (-> s5-0 impact-info velocity) (-> s5-0 vel)) ) (set! (-> s5-0 impact-info impulse) 0.0) @@ -579,7 +579,7 @@ (set! (-> s5-0 denom) 0.0) (set! (-> s5-0 denom2) 0.0) (b! (>= (-> s5-0 vel-dot-norm) 0.0) cfg-50) - (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> arg0 position)) + (vector-! (-> s5-0 p-body) (-> s5-0 impact-info point) (-> arg0 position)) (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> arg0 inv-i-world)) (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) @@ -590,7 +590,7 @@ (set! f30-1 (cond ((-> s5-0 rbody2) - (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> s5-0 rbody2 position)) + (vector-! (-> s5-0 p-body) (-> s5-0 impact-info point) (-> s5-0 rbody2 position)) (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 rbody2 inv-i-world)) (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) @@ -668,10 +668,10 @@ (vector+float*! (-> s5-0 force) (-> s5-0 force) (-> s5-0 tangent-dir) f0-39) ) ) - (apply-impact! arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (apply-impact! arg0 (-> s5-0 impact-info point) (-> s5-0 force)) (when (-> s5-0 rbody2) (vector-float*! (-> s5-0 force) (-> s5-0 force) -1.0) - (apply-impact! (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (apply-impact! (-> s5-0 rbody2) (-> s5-0 impact-info point) (-> s5-0 force)) ) (rigid-body-control-method-12 arg0 1.0) (init-velocities! arg0) @@ -1102,11 +1102,11 @@ (let ((s5-1 (get-touched-prim s3-0 (-> this root) arg1))) (when s5-1 (set! (-> arg0 prim-id) (-> s5-1 prim-id)) - (vector-! (-> arg0 normal) (-> arg0 point) (the-as vector (-> s5-1 prim-core))) + (vector-! (-> arg0 normal) (-> arg0 point) (-> s5-1 prim-core world-sphere)) (vector-normalize! (-> arg0 normal) 1.0) (vector+float*! (-> arg0 point) - (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere) (-> arg0 normal) (-> s5-1 prim-core world-sphere w) ) diff --git a/goal_src/jak3/engine/physics/trajectory.gc b/goal_src/jak3/engine/physics/trajectory.gc index bcf4bde224b..dd8a6b4cfd0 100644 --- a/goal_src/jak3/engine/physics/trajectory.gc +++ b/goal_src/jak3/engine/physics/trajectory.gc @@ -154,8 +154,8 @@ (defmethod update-from-cspace ((this impact-control)) (when (>= (-> this joint) 0) (vector-copy! (-> this trans 1) (-> this trans 0)) - (vector<-cspace! (the-as vector (-> this trans)) (-> this process 0 node-list data (-> this joint))) - (vector-! (-> this dir) (the-as vector (-> this trans)) (-> this trans 1)) + (vector<-cspace! (-> this trans 0) (-> this process 0 node-list data (-> this joint))) + (vector-! (-> this dir) (-> this trans 0) (-> this trans 1)) ) 0 (none) diff --git a/goal_src/jak3/engine/process-drawable/process-drawable.gc b/goal_src/jak3/engine/process-drawable/process-drawable.gc index 27565abb8f3..d6c5deb0164 100644 --- a/goal_src/jak3/engine/process-drawable/process-drawable.gc +++ b/goal_src/jak3/engine/process-drawable/process-drawable.gc @@ -347,7 +347,7 @@ (set! s5-0 (the-as cspace-array #f)) (goto cfg-13) ) - (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (the-as cspace (-> s5-0 data)) (the-as drawable #f)))) + (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (-> s5-0 data 0) (the-as drawable #f)))) (set! (-> v1-9 bone) (the-as bone (-> s3-1 bones))) ) (let ((v1-10 (-> s5-0 data))) @@ -526,7 +526,7 @@ ) ((zero? jcontrol) (matrix<-transformq+trans! - (the-as matrix (-> this skeleton bones 3)) + (-> this skeleton bones 3 transform) (the-as transformq (-> this process root trans)) (-> this skeleton bones 0 transform trans) ) @@ -543,11 +543,7 @@ (let ((a1-5 (new 'stack-no-clear 'vector))) (vector-copy! a1-5 (-> this bounds)) (set! (-> a1-5 w) 1.0) - (vector-norm-matrix*! - (-> this origin) - a1-5 - (the-as matrix (-> this skeleton bones (-> this origin-joint-index))) - ) + (vector-norm-matrix*! (-> this origin) a1-5 (-> this skeleton bones (-> this origin-joint-index) transform)) ) (let ((f0-2 (-> this bounds w))) (set! (-> this origin w) f0-2) diff --git a/goal_src/jak3/engine/sound/speech.gc b/goal_src/jak3/engine/sound/speech.gc index 22fb24a4ec8..fc230c2c7ee 100644 --- a/goal_src/jak3/engine/sound/speech.gc +++ b/goal_src/jak3/engine/sound/speech.gc @@ -527,7 +527,7 @@ (defmethod speech-control-method-15 ((this speech-control)) (speech-table-reset! this) (let ((s5-0 (-> this channel-array))) - ((method-of-type speech-channel init!) (the-as speech-channel s5-0)) + ((method-of-type speech-channel init!) (-> s5-0 0)) (set! (-> s5-0 0 speech-table) (-> this speech-table)) (set! (-> s5-0 0 gui-channel) (gui-channel guard)) ) diff --git a/goal_src/jak3/engine/spatial-hash/actor-hash.gc b/goal_src/jak3/engine/spatial-hash/actor-hash.gc index 275b2dfe7c7..94e9ac81a41 100644 --- a/goal_src/jak3/engine/spatial-hash/actor-hash.gc +++ b/goal_src/jak3/engine/spatial-hash/actor-hash.gc @@ -144,10 +144,7 @@ ) (cond ((< f0-7 (* f1-2 f1-2)) - ((method-of-type actor-hash-bucket add-actor-cshape) - (the-as actor-hash-bucket (-> this data)) - (the-as collide-shape s4-0) - ) + ((method-of-type actor-hash-bucket add-actor-cshape) (-> this data 0) (the-as collide-shape s4-0)) ) ((let ((f1-5 204800.0)) (< f0-7 (* f1-5 f1-5)) diff --git a/goal_src/jak3/engine/target/board/board-states.gc b/goal_src/jak3/engine/target/board/board-states.gc index e170919fa40..026ba2839e8 100644 --- a/goal_src/jak3/engine/target/board/board-states.gc +++ b/goal_src/jak3/engine/target/board/board-states.gc @@ -89,7 +89,7 @@ (if (logtest? (-> self control status) (collide-status impact-surface)) (+! (-> self board turn-anim-duck-vel) (lerp-scale 0.0 15.0 (-> self control normal-impact-vel) 0.0 81920.0)) ) - (let ((f0-38 (vector-dot (the-as vector (-> self board up-vector)) (-> self board up-vector 1)))) + (let ((f0-38 (vector-dot (-> self board up-vector 0) (-> self board up-vector 1)))) (if (< f0-38 1.0) (+! (-> self board turn-anim-duck-vel) (* (lerp-scale 400.0 0.0 f0-38 0.6 1.0) (seconds-per-frame))) ) @@ -1175,11 +1175,7 @@ (set! (-> self control unknown-word04) (the-as uint #t)) (let ((v1-6 *edge-grab-info*)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> v1-6 world-vertex)) - (-> v1-6 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> v1-6 world-vertex 0) (-> v1-6 world-vertex 1)) 1.0 ) ) @@ -2534,7 +2530,7 @@ (set! (-> self board ride-rot) 32768.0) ) (else - (let ((f0-21 (vector-dot (the-as vector (-> self control c-R-w)) (-> self control edge-grab-edge-dir)))) + (let ((f0-21 (vector-dot (-> self control c-R-w rvec) (-> self control edge-grab-edge-dir)))) (cond ((< 0.7 f0-21) (set! (-> self board ride-mode) (the-as uint 2)) diff --git a/goal_src/jak3/engine/target/board/target-board.gc b/goal_src/jak3/engine/target/board/target-board.gc index d77a21bc45c..7c3d76192c4 100644 --- a/goal_src/jak3/engine/target/board/target-board.gc +++ b/goal_src/jak3/engine/target/board/target-board.gc @@ -651,15 +651,11 @@ (s5-1 (new 'stack-no-clear 'vector)) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> gp-1 world-vertex 1) - (the-as vector (-> gp-1 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-1 world-vertex 1) (-> gp-1 world-vertex 0)) 1.0 ) (vector+float*! s5-1 (-> self control trans) (-> self control c-R-w fvec) (* 40960.0 (seconds-per-frame))) - (let ((f0-2 (vector-segment-overlap s5-1 (the-as vector (-> gp-1 world-vertex)) (-> gp-1 world-vertex 1)))) + (let ((f0-2 (vector-segment-overlap s5-1 (-> gp-1 world-vertex 0) (-> gp-1 world-vertex 1)))) (if (and (time-elapsed? (-> self board ride-time) (seconds 0.4)) (>= f0-2 0.0) (>= 1.0 f0-2) @@ -2357,11 +2353,7 @@ ) (set! (-> self control ground-pat) (-> s4-0 edge-tri-pat)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (vector-copy! (-> self control edge-grab-across-edge-dir) (-> s4-0 hanging-matrix rvec)) @@ -2371,11 +2363,7 @@ (set! (-> s4-0 world-vertex 0 quad) (-> s4-0 world-vertex 1 quad)) (vector-copy! (-> s4-0 world-vertex 1) s3-2) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (vector-copy! s3-2 (-> s4-0 adjacent-edge-left-vertex)) @@ -2568,10 +2556,10 @@ ) ) (let ((s3-9 (-> self board ride-vertex (-> self board ride-vertex-base)))) - (if (not (or (vector= s3-9 (the-as vector (-> self board ride-vertex-old))) + (if (not (or (vector= s3-9 (-> self board ride-vertex-old 0)) (vector= s3-9 (-> self board ride-vertex-old 1)) (vector= s3-9 (-> self board ride-vertex-old 2)) - (vector= (&+ s3-9 16) (the-as vector (-> self board ride-vertex-old))) + (vector= (&+ s3-9 16) (-> self board ride-vertex-old 0)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 1)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 2)) ) diff --git a/goal_src/jak3/engine/target/collide-reaction-target.gc b/goal_src/jak3/engine/target/collide-reaction-target.gc index e6c4d8e3ddd..758dfdfb2d8 100644 --- a/goal_src/jak3/engine/target/collide-reaction-target.gc +++ b/goal_src/jak3/engine/target/collide-reaction-target.gc @@ -290,7 +290,7 @@ (set! (-> arg0 normal-impact-vel) (- (vector-dot (-> arg0 transv) sv-84))) (set! sv-96 (logior sv-96 (collide-status impact-surface))) (if (nonzero? (-> arg0 current-surface impact-hook)) - ((-> arg0 current-surface impact-hook) arg0 (the-as (pointer float) (-> sv-88 rvec)) sv-84) + ((-> arg0 current-surface impact-hook) arg0 (&-> sv-88 rvec x) sv-84) ) (when (not sv-240) (let ((f0-21 (- 1.0 (-> arg0 current-surface impact-fric)))) @@ -572,11 +572,7 @@ (let ((gp-0 *edge-grab-info*)) (when (-> gp-0 found-edge?) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) (vector-copy! (-> self control edge-grab-across-edge-dir) (-> gp-0 hanging-matrix rvec)) diff --git a/goal_src/jak3/engine/target/flut/flut.gc b/goal_src/jak3/engine/target/flut/flut.gc index 8675aa17f11..95caada0d87 100644 --- a/goal_src/jak3/engine/target/flut/flut.gc +++ b/goal_src/jak3/engine/target/flut/flut.gc @@ -282,7 +282,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/goal_src/jak3/engine/target/flut/target-flut.gc b/goal_src/jak3/engine/target/flut/target-flut.gc index 96b18abbbe4..78dbe284583 100644 --- a/goal_src/jak3/engine/target/flut/target-flut.gc +++ b/goal_src/jak3/engine/target/flut/target-flut.gc @@ -453,7 +453,7 @@ (set! (-> a0-0 y) 10240.0) (set! (-> a0-0 z) 10240.0) (set! (-> a0-0 w) 1.0) - (vector-! (the-as vector a1-0) v1-2 a0-0) + (vector-! (-> a1-0 min) v1-2 a0-0) ) (let ((a1-2 (-> gp-0 bbox max)) (v1-3 (-> s5-0 trans)) @@ -3154,7 +3154,7 @@ (compute-alignment! (-> self align)) (let ((s5-13 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s5-13 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s5-13 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) s5-13 (-> self clock frames-per-second)) ) ) @@ -3264,7 +3264,7 @@ (compute-alignment! (-> self align)) (let ((s5-14 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s5-14 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s5-14 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) s5-14 (-> self clock frames-per-second)) ) ) diff --git a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc index d0508136094..58f611221cf 100644 --- a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc @@ -890,7 +890,7 @@ (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this constraints 0 dir)) (* 48 (+ s4-0 1))))) (-> sv-96 quad) ) - (vector+float*! (the-as vector s0-0) (the-as vector s1-0) sv-96 f30-0) + (vector+float*! (-> s0-0 pt) (-> s1-0 pt) sv-96 f30-0) ) ) ) @@ -904,11 +904,11 @@ (+ (the-as uint (-> this constraints 0 dir)) (* 48 arg0)) (let* ((s3-1 (-> this constraints arg0)) (s2-1 (-> this constraints (+ arg0 1))) - (s1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-1) (the-as vector s3-1))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 pt) (-> s3-1 pt))) ) 0.0 (vector-normalize-ret-len! s1-2 1.0) - (vector+float*! (the-as vector s2-1) (the-as vector s3-1) s1-2 (-> this constraints arg0 length)) + (vector+float*! (-> s2-1 pt) (-> s3-1 pt) s1-2 (-> this constraints arg0 length)) ) (+! arg0 1) ) @@ -1259,7 +1259,7 @@ (set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) ) ((> (-> arg0 num-pts) 0) - (let* ((f0-2 (vector-vector-distance (the-as vector (-> arg0 pts)) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) + (let* ((f0-2 (vector-vector-distance (-> arg0 pts 0) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) (f0-3 (+ 16384.0 f0-2)) ) (set! (-> *blue-light-test-big* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) @@ -1838,8 +1838,8 @@ (set! (-> s5-1 y) 0.0) (dotimes (v1-1 12) (vector+! - (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) - (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + (-> *blue-2-lightning-shape* constraints v1-1 pt) + (-> *blue-2-lightning-shape* constraints v1-1 pt) s5-1 ) ) @@ -1900,7 +1900,7 @@ (vector-! (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) (-> *lightning-pts-cache* s5-3) - (the-as vector (-> *blue-2-lightning-shape* constraints (+ s5-3 -1))) + (-> *blue-2-lightning-shape* constraints (+ s5-3 -1) pt) ) (vector-normalize! (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) diff --git a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc index cbc7543aac8..33fd8f0ccfa 100644 --- a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc @@ -2445,7 +2445,7 @@ (set! (-> self obj-radius) (fmax (-> self obj-radius) - (+ (vector-vector-distance (the-as vector (-> arg0 prim-core)) *gravity-origin-pos*) + (+ (vector-vector-distance (-> arg0 prim-core world-sphere) *gravity-origin-pos*) (-> arg0 prim-core world-sphere w) ) ) diff --git a/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc b/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc index f17631f1b5e..0b94054b562 100644 --- a/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc @@ -1842,7 +1842,7 @@ ) ) (when v1-16 - (vector-! s3-0 s2-0 (the-as vector (-> v1-16 prim-core))) + (vector-! s3-0 s2-0 (-> v1-16 prim-core world-sphere)) (vector-normalize! s3-0 1.0) (on-impact this (process->handle arg0)) (set-time! (-> this delay-attack)) diff --git a/goal_src/jak3/engine/target/indax/target-indax.gc b/goal_src/jak3/engine/target/indax/target-indax.gc index 813fcb822f9..0b5f17fd34b 100644 --- a/goal_src/jak3/engine/target/indax/target-indax.gc +++ b/goal_src/jak3/engine/target/indax/target-indax.gc @@ -322,7 +322,7 @@ (vector-normalize! (vector-! s2-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 diff --git a/goal_src/jak3/engine/target/logic-target.gc b/goal_src/jak3/engine/target/logic-target.gc index e5a3257b51b..1f840602c60 100644 --- a/goal_src/jak3/engine/target/logic-target.gc +++ b/goal_src/jak3/engine/target/logic-target.gc @@ -832,7 +832,7 @@ (set! (-> a1-0 y) 10240.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-35) a0-13 a1-0) + (vector-! (-> v1-35 min) a0-13 a1-0) ) (let ((v1-37 (-> gp-0 bbox max)) (a0-15 (-> self control trans)) @@ -1133,7 +1133,7 @@ (-> self control dynam gravity-normal) (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> self control collision-spheres 1 prim-core)) + (-> self control collision-spheres 1 prim-core world-sphere) (-> self control wall-contact-pt) ) ) @@ -1506,7 +1506,7 @@ (set! (-> a1-0 y) 6144.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-1 a1-0) + (vector-! (-> v1-0 min) a0-1 a1-0) ) (let ((v1-2 (-> gp-0 bbox max)) (a0-3 (-> self control trans)) @@ -2155,7 +2155,7 @@ (vector-copy! (-> s5-0 center-hold-old) (-> s5-0 center-hold)) (let ((gp-0 (new 'stack-no-clear 'bone))) (matrix-copy! (-> gp-0 transform) (-> (the-as process-drawable a0-7) node-list data 0 bone transform)) - (vector-matrix*! (-> gp-0 scale) (the-as vector (-> s5-0 pilot-edge-grab)) (-> gp-0 transform)) + (vector-matrix*! (-> gp-0 scale) (-> s5-0 pilot-edge-grab local-pos) (-> gp-0 transform)) (vector-rotate*! (the-as vector (&+ gp-0 80)) (-> s5-0 pilot-edge-grab local-dir) (-> gp-0 transform)) (vector-copy! (-> s5-0 center-hold) (-> gp-0 scale)) (vector-copy! (-> self control edge-grab-edge-dir) (-> (&+ gp-0 80) transform rvec)) @@ -2176,11 +2176,7 @@ ) (set! (-> self control ground-pat) (-> s5-0 edge-tri-pat)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> s5-0 world-vertex)) - (-> s5-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s5-0 world-vertex 0) (-> s5-0 world-vertex 1)) 1.0 ) ) @@ -2298,7 +2294,7 @@ (vector-copy! (-> gp-0 center-hold-old) (-> gp-0 center-hold)) (let ((s5-0 (new 'stack-no-clear 'bone))) (matrix-copy! (-> s5-0 transform) (-> (the-as process-drawable a0-7) node-list data 0 bone transform)) - (vector-matrix*! (-> s5-0 scale) (the-as vector (-> gp-0 pilot-edge-grab)) (-> s5-0 transform)) + (vector-matrix*! (-> s5-0 scale) (-> gp-0 pilot-edge-grab local-pos) (-> s5-0 transform)) (vector-rotate*! (the-as vector (&+ s5-0 80)) (-> gp-0 pilot-edge-grab local-dir) (-> s5-0 transform)) (vector-copy! (-> gp-0 center-hold) (-> s5-0 scale)) (vector-copy! (-> self control edge-grab-edge-dir) (-> (&+ s5-0 80) transform rvec)) @@ -2318,11 +2314,7 @@ (edge-grab-info-method-10 gp-0) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) ) @@ -2463,7 +2455,7 @@ ) ) ) - (vector<-cspace! s5-0 (the-as cspace (-> self node-list data))) + (vector<-cspace! s5-0 (-> self node-list data 0)) (if (not (and (logtest? (-> self water flags) (water-flag under-water)) (not (logtest? (-> self water flags) (water-flag swim-ground))) ) @@ -2502,7 +2494,7 @@ ) (logtest? (-> self water flags) (water-flag mud)) ) - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) (set! (-> self control camera-pos y) (-> self water base-height)) ) ((focus-test? self tube) @@ -2512,7 +2504,7 @@ (vector-copy! (-> self control camera-pos) (-> self control trans)) ) (else - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) ) ) ) @@ -2582,10 +2574,7 @@ ) (vector-matrix*! (-> self control ctrl-to-head-offset) (-> *TARGET-bank* head-offset) a2-5) ) - (vector<-cspace! - (the-as vector (&-> (-> self control) sidekick-root bone)) - (-> self control sidekick-root parent) - ) + (vector<-cspace! (the-as vector (&-> self control sidekick-root bone)) (-> self control sidekick-root parent)) (let ((gp-0 (new-stack-vector0)) (s5-0 (new-stack-vector0)) ) diff --git a/goal_src/jak3/engine/target/mech/mech-states.gc b/goal_src/jak3/engine/target/mech/mech-states.gc index 2110537189a..001d7333976 100644 --- a/goal_src/jak3/engine/target/mech/mech-states.gc +++ b/goal_src/jak3/engine/target/mech/mech-states.gc @@ -383,7 +383,7 @@ (set! (-> self mech walk-anim-leg) 1) (set! s5-0 jakb-mech-punch-l-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 7 6963.2 @@ -394,7 +394,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-r-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 17 6963.2 @@ -405,7 +405,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-b-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 39 11141.12 @@ -416,7 +416,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-u-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 39 11141.12 diff --git a/goal_src/jak3/engine/target/mech/mech.gc b/goal_src/jak3/engine/target/mech/mech.gc index 11134f99c10..5e08555ef8d 100644 --- a/goal_src/jak3/engine/target/mech/mech.gc +++ b/goal_src/jak3/engine/target/mech/mech.gc @@ -178,7 +178,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/goal_src/jak3/engine/target/mech/target-mech.gc b/goal_src/jak3/engine/target/mech/target-mech.gc index cd7699b6454..07bb4923496 100644 --- a/goal_src/jak3/engine/target/mech/target-mech.gc +++ b/goal_src/jak3/engine/target/mech/target-mech.gc @@ -120,15 +120,11 @@ ) (defmethod draw ((this hud-heatmeter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (the int (+ 25.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (the int (+ 25.0 (* -100.0 (-> this offset))))) (set! (-> this sprites 0 pos z) #xfffff0) (set-as-offset-from! (-> this sprites 1) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ (the int (* 0.128 (the float (-> this values 0 current)))) -63) 1 ) @@ -854,7 +850,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 @@ -1026,7 +1022,7 @@ (set! (-> a0-0 y) 10240.0) (set! (-> a0-0 z) 10240.0) (set! (-> a0-0 w) 1.0) - (vector-! (the-as vector a1-0) v1-2 a0-0) + (vector-! (-> a1-0 min) v1-2 a0-0) ) (let ((a1-2 (-> gp-0 bbox max)) (v1-3 (-> s5-0 trans)) @@ -1186,13 +1182,7 @@ (set! (-> self mech jump-thrust) 0.0) (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) (set! (-> self mech state-impact? 0) #f) - ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) - self - -1 - 0.0 - (collide-spec) - ) + ((method-of-type impact-control initialize) (-> self mech state-impact 0) self -1 0.0 (collide-spec)) (set! (-> self mech shield-max) 100.0) (set! (-> self mech shield-value) arg1) (set! (-> self mech entity) (entity-by-type mech)) @@ -1317,13 +1307,11 @@ (lambda :behavior target () (let ((gp-0 (ppointer->process (-> self parent)))) - ((method-of-type impact-control update-from-cspace) - (the-as impact-control (-> (the-as target gp-0) mech state-impact)) - ) + ((method-of-type impact-control update-from-cspace) (-> (the-as target gp-0) mech state-impact 0)) (when (-> (the-as target gp-0) mech state-impact? 0) (let ((a1-0 (new 'stack-no-clear 'collide-query))) ((method-of-type impact-control impact-control-method-11) - (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + (-> (the-as target gp-0) mech state-impact 0) a1-0 (the-as process gp-0) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) diff --git a/goal_src/jak3/engine/target/pilot-states.gc b/goal_src/jak3/engine/target/pilot-states.gc index 2c195e38e90..cd35c6e3b62 100644 --- a/goal_src/jak3/engine/target/pilot-states.gc +++ b/goal_src/jak3/engine/target/pilot-states.gc @@ -250,9 +250,9 @@ (vector-copy! (-> gp-0 accel-array 3) (-> gp-0 accel-array 2)) (vector-copy! (-> gp-0 accel-array 2) (-> gp-0 accel-array 1)) (vector-copy! (-> gp-0 accel-array 1) (-> gp-0 accel-array 0)) - (get-linear-accel! s5-0 (the-as vector (-> gp-0 accel-array))) + (get-linear-accel! s5-0 (-> gp-0 accel-array 0)) (vector-reset! (-> s4-0 0)) - (vector+float*! (-> s4-0 0) (-> s4-0 0) (the-as vector (-> gp-0 accel-array)) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 0) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 1) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 2) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 3) 1.0) diff --git a/goal_src/jak3/engine/target/target-darkjak.gc b/goal_src/jak3/engine/target/target-darkjak.gc index 96938875cee..f5f57efa30a 100644 --- a/goal_src/jak3/engine/target/target-darkjak.gc +++ b/goal_src/jak3/engine/target/target-darkjak.gc @@ -576,12 +576,12 @@ (s4-0 (-> this ball-pos 1)) ) (vector-float*! s3-0 s3-0 (* 0.75 (-> this root root-prim local-sphere w))) - (vector+! (the-as vector s5-0) (-> this root trans) s3-0) + (vector+! (-> s5-0 0) (-> this root trans) s3-0) (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) 0.0) (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) 0.0) (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) 0.0) (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) 0.0) - (spawn (-> this part) (the-as vector s5-0)) + (spawn (-> this part) (-> s5-0 0)) (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) (the-as float #x1)) (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) (the-as float #x1)) @@ -604,7 +604,7 @@ ) ) ) - (setup-bolts! this (the-as vector s5-0) s4-0) + (setup-bolts! this (-> s5-0 0) s4-0) ) (none) ) diff --git a/goal_src/jak3/engine/target/target-death.gc b/goal_src/jak3/engine/target/target-death.gc index 27fef54b919..93413c04be3 100644 --- a/goal_src/jak3/engine/target/target-death.gc +++ b/goal_src/jak3/engine/target/target-death.gc @@ -1359,7 +1359,7 @@ (logclear! (-> self focus-status) (focus-status dead hit)) (logclear! (-> self target-flags) (target-flags disable-attacks)) ) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) (target-exit) ) :trans (behavior () @@ -1817,7 +1817,7 @@ (compute-alignment! (-> self align)) (let ((gp-0 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-0 (-> self clock frames-per-second)) ) ) @@ -2183,11 +2183,7 @@ ) (cond ((-> *setting-control* user-current death-info) - (mem-copy! - (the-as pointer (-> self death-resetter)) - (&-> (-> *setting-control* user-current death-info) node) - 16 - ) + (mem-copy! (the-as pointer (-> self death-resetter)) (&-> *setting-control* user-current death-info node) 16) ) (else (set! (-> self death-resetter continue) #f) diff --git a/goal_src/jak3/engine/target/target-gun.gc b/goal_src/jak3/engine/target/target-gun.gc index 3dfe8a0f737..761148fd9ca 100644 --- a/goal_src/jak3/engine/target/target-gun.gc +++ b/goal_src/jak3/engine/target/target-gun.gc @@ -220,10 +220,7 @@ (set! (-> self skel interp-select 1) 0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) (set! (-> self gun combo-window-state) #f) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (reset-to-collide-spec (-> self gun track-target 1) (collide-spec jak player-list)) (add-connection *pad-engine* self target-gun-marking-menu self #f #f) ) @@ -271,10 +268,7 @@ (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun turn-fast-hold-time) 0) (set! (-> self gun gun-delay-fire) 0.0) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (set! (-> self gun fire-dir-rot) 0.0) (set! (-> self control unknown-float003) 0.0) (set! (-> self gun blue-whine-volume) 0.0) @@ -1679,7 +1673,7 @@ (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) (vector-copy! (-> self gun track-trans) (get-trans gp-0 3)) - (when ((method-of-type focus focus-on!) (the-as focus (-> self gun track-target)) gp-0) + (when ((method-of-type focus focus-on!) (-> self gun track-target 0) gp-0) (set-time! (-> self gun track-start-time)) (if (not (time-elapsed? (-> self control time-of-last-nonzero-input) (seconds 0.2))) (set-time! (-> self gun track-press-start-time)) @@ -1731,7 +1725,7 @@ ) (set! (-> self gun track?) (gun-track-flags gutflags-1 gutflags-2)) (set! (-> self gun track-target-hold-time) 0) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) ) (else (let ((a0-67 (get-search-info-flag (the-as process-focusable s5-2)))) @@ -1987,7 +1981,7 @@ gp-0 (current-time) ) - ((method-of-type focus focus-on!) (the-as focus (-> self gun track-target)) gp-0) + ((method-of-type focus focus-on!) (-> self gun track-target 0) gp-0) (focus-on! (-> self gun track-target 1) gp-0) (vector-copy! (-> self gun track-trans) (get-trans gp-0 3)) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) @@ -2591,10 +2585,10 @@ ) (matrix-rotate-xyz! gp-0 a1-5) (matrix->quaternion s5-0 gp-0) - (vector+! (the-as vector (-> self gun gun-pos)) (-> *edge-grab-info* center-hold) s4-0) + (vector+! (-> self gun gun-pos trans) (-> *edge-grab-info* center-hold) s4-0) (vector+float*! - (the-as vector (-> self gun gun-pos)) - (the-as vector (-> self gun gun-pos)) + (-> self gun gun-pos trans) + (-> self gun gun-pos trans) (-> self node-list data 0 bone transform fvec) 778.24 ) diff --git a/goal_src/jak3/engine/target/target-handler.gc b/goal_src/jak3/engine/target/target-handler.gc index 9076d959bf7..df90e714ec5 100644 --- a/goal_src/jak3/engine/target/target-handler.gc +++ b/goal_src/jak3/engine/target/target-handler.gc @@ -1748,7 +1748,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 diff --git a/goal_src/jak3/engine/target/target-invisible.gc b/goal_src/jak3/engine/target/target-invisible.gc index 75ce1e0fcc0..2018eb1a4fe 100644 --- a/goal_src/jak3/engine/target/target-invisible.gc +++ b/goal_src/jak3/engine/target/target-invisible.gc @@ -397,7 +397,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/goal_src/jak3/engine/target/target-launch.gc b/goal_src/jak3/engine/target/target-launch.gc index 164a36af2d9..57323387b8d 100644 --- a/goal_src/jak3/engine/target/target-launch.gc +++ b/goal_src/jak3/engine/target/target-launch.gc @@ -41,7 +41,7 @@ (let ((gp-0 (new 'stack-no-clear 'quaternion))) (set! (-> gp-0 quad) (-> self control unknown-vector37 quad)) (set! (-> gp-0 y) 0.0) - (vector-normalize! (the-as vector gp-0) 1.0) + (vector-normalize! (-> gp-0 vec) 1.0) (let ((f30-0 (vector-normalize-ret-len! s5-0 1.0))) 0.0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) @@ -59,7 +59,7 @@ (let ((f0-6 (- 1.0 f0-5))) (vector+float*! (-> self control trans) - (the-as vector (-> self control unknown-quat39)) + (-> self control unknown-quat39 vec) (-> self control unknown-vector37) f0-6 ) diff --git a/goal_src/jak3/engine/target/target-tube.gc b/goal_src/jak3/engine/target/target-tube.gc index 0c3d61c7c59..8153ccd9362 100644 --- a/goal_src/jak3/engine/target/target-tube.gc +++ b/goal_src/jak3/engine/target/target-tube.gc @@ -985,7 +985,7 @@ (compute-alignment! (-> self align)) (let ((gp-2 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-2 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-2 (-> self clock frames-per-second)) ) ) diff --git a/goal_src/jak3/engine/target/target-turret.gc b/goal_src/jak3/engine/target/target-turret.gc index 8bcf214fb8a..5390e1213b7 100644 --- a/goal_src/jak3/engine/target/target-turret.gc +++ b/goal_src/jak3/engine/target/target-turret.gc @@ -777,7 +777,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special @@ -960,7 +960,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/goal_src/jak3/engine/target/target2.gc b/goal_src/jak3/engine/target/target2.gc index c119ee5eab8..8b25b465d67 100644 --- a/goal_src/jak3/engine/target/target2.gc +++ b/goal_src/jak3/engine/target/target2.gc @@ -1132,7 +1132,7 @@ ) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s3-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s3-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) s3-0) ) (suspend) @@ -1182,7 +1182,7 @@ (until (ja-done? 0) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) gp-0) ) (suspend) diff --git a/goal_src/jak3/engine/ui/bigmap.gc b/goal_src/jak3/engine/ui/bigmap.gc index 0c82851a2ab..4f4fffd6c67 100644 --- a/goal_src/jak3/engine/ui/bigmap.gc +++ b/goal_src/jak3/engine/ui/bigmap.gc @@ -269,7 +269,7 @@ ) ) (if (and v1-4 (nonzero? (-> v1-4 root))) - (set! (-> arg1 last-world-pos quad) (-> v1-4 root trans quad)) + (vector-copy! (-> arg1 last-world-pos) (-> v1-4 root trans)) ) ) ) @@ -287,13 +287,13 @@ ) ) (if a0-13 - (set! (-> arg1 last-world-pos quad) (-> a0-13 root trans quad)) - (set! (-> arg1 last-world-pos quad) (-> (the-as entity-actor (-> arg1 position)) extra trans quad)) + (vector-copy! (-> arg1 last-world-pos) (-> a0-13 root trans)) + (vector-copy! (-> arg1 last-world-pos) (-> (the-as entity-actor (-> arg1 position)) extra trans)) ) ) ) (else - (set! (-> arg1 last-world-pos quad) (-> arg1 position quad)) + (vector-copy! (-> arg1 last-world-pos) (-> arg1 position)) ) ) (let ((f30-0 (-> arg1 class scale)) @@ -318,7 +318,7 @@ (if (logtest? (-> arg1 class flags) (minimap-flag goal)) (set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6))) ) - (bigmap-method-18 this (the-as (pointer int32) sv-80)) + (bigmap-method-18 this (&-> sv-80 x)) (cond ((get-horizontal-flip-flag *blit-displays-work*) (set! f26-0 (- f26-0)) @@ -332,8 +332,8 @@ (let ((f0-12 (* 20.0 f26-0 f30-0)) (f1-8 (* 20.0 f28-0 f30-0)) ) - (set! (-> s2-0 x) (the float (the int (- (-> s0-0 x) (* 0.5 f0-12))))) - (set! (-> s2-0 y) (the float (the int (- (-> s0-0 y) (* 0.5 f1-8))))) + (set! (-> s2-0 x) (the float (the int (- (-> s0-0 x) (/ f0-12 2))))) + (set! (-> s2-0 y) (the float (the int (- (-> s0-0 y) (/ f1-8 2))))) (set! (-> s3-2 x) (+ (-> s2-0 x) f0-12)) (set! (-> s3-2 y) (+ (-> s2-0 y) f1-8)) ) @@ -562,7 +562,7 @@ (let ((s0-3 (new 'stack 'vector4w))) 0.0 (set! (-> s0-3 quad) (-> this pos quad)) - (bigmap-method-18 this (the-as (pointer int32) s0-3)) + (bigmap-method-18 this (&-> s0-3 x)) (let ((f0-15 (cond ((get-horizontal-flip-flag *blit-displays-work*) (set! f30-0 (- f30-0)) @@ -605,7 +605,7 @@ ) ) ) - (vector-matrix*! (the-as vector (-> this corner)) (the-as vector (-> this corner)) sv-104) + (vector-matrix*! (-> this corner 0) (-> this corner 0) sv-104) (vector-matrix*! (-> this corner 1) (-> this corner 1) sv-104) (vector-matrix*! (-> this corner 2) (-> this corner 2) sv-104) (vector-matrix*! (-> this corner 3) (-> this corner 3) sv-104) @@ -682,7 +682,7 @@ (let* ((f0-63 (s5-1 *temp-string* s3-1 #t 44 (bucket-id hud-draw-hud-alpha))) (v1-142 s3-1) (a0-106 (- 256 (the int (* 200.0 f30-2)))) - (a1-52 (- 208 (the int (* 0.5 f0-63)))) + (a1-52 (- 208 (the int (/ f0-63 2)))) ) (set! (-> v1-142 origin x) (the float a0-106)) (set! (-> v1-142 origin y) (the float a1-52)) diff --git a/goal_src/jak3/engine/ui/hud-classes.gc b/goal_src/jak3/engine/ui/hud-classes.gc index 78ce59be75a..ff73cabf77b 100644 --- a/goal_src/jak3/engine/ui/hud-classes.gc +++ b/goal_src/jak3/engine/ui/hud-classes.gc @@ -13,7 +13,7 @@ (the int (+ (- 512.0 (* 20.0 (-> *video-params* relative-x-scale))) (* 140.0 (-> this offset)))) (the int (+ 281.0 (* 140.0 (-> this offset)))) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) 11 -11) (set! (-> this sprites 0 color w) (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) ) @@ -43,8 +43,8 @@ (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3) - (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 2 -3) + (draw-1 *minimap* s4-0 (-> this sprites 2 pos) #t) ) ) ((= (-> *setting-control* user-current race-minimap) 1) @@ -58,8 +58,8 @@ (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 0 -20) - (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 0 -20) + (draw-sprite2 *minimap* s4-2 (-> this sprites 2 pos) #t) ) ) ) @@ -129,9 +129,9 @@ (the int (+ (* -130.0 (-> this offset)) (* 18.0 (-> *video-params* relative-x-scale)))) (the int (+ 305.0 (* 130.0 (-> this offset)))) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 3)) 21 23) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 3)) 20 20) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 3)) 10 64) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 3 pos) 21 23) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 3 pos) 20 20) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 3 pos) 10 64) (set! (-> this sprites 1 scale-y) (* -0.098000005 (the float (-> this values 5 current)))) (cond ((nonzero? (-> this values 5 current)) @@ -152,7 +152,7 @@ (set! (-> this sprites 1 color z) 128) ) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 3)) 40 59) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 3 pos) 40 59) (set! (-> this sprites 2 scale-y) (* -0.096999995 (the float (-> this values 2 current)))) (cond ((nonzero? (-> this values 2 current)) @@ -216,7 +216,7 @@ ) (set-as-offset-from! (-> this sprites (+ s4-0 7)) - (the-as vector4w (-> this sprites 3)) + (-> this sprites 3 pos) (the int (-> v1-38 x)) (+ (the int (-> v1-38 y)) 1) ) @@ -232,7 +232,7 @@ ) (let ((s4-1 15)) (while (>= s4-1 s5-0) - (set-as-offset-from! (-> this sprites (+ s5-0 7)) (the-as vector4w (-> this sprites 3)) -200 0) + (set-as-offset-from! (-> this sprites (+ s5-0 7)) (-> this sprites 3 pos) -200 0) (+! s5-0 1) ) ) @@ -306,7 +306,7 @@ (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) 150 ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -28 20) + (set-as-offset-from! (-> this sprites 0) (-> this icons 0 pos) -28 20) (set! (-> this sprites 0 scale-x) 0.86) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 45) @@ -367,7 +367,7 @@ (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) 270 ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -20 -39) + (set-as-offset-from! (-> this sprites 0) (-> this icons 0 pos) -20 -39) (set! (-> this sprites 0 scale-x) 0.62) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 -5) @@ -420,12 +420,12 @@ (defmethod draw ((this hud-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 32.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 140 ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -12 8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -12 8) ((method-of-type hud draw) this) 0 (none) @@ -456,7 +456,7 @@ (defmethod draw ((this hud-timer)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) (the int (+ 50.0 (* -100.0 (-> this offset)))) ) @@ -468,20 +468,15 @@ (let ((s5-5 20) (s4-0 -42) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) s4-0 -24) (let ((s4-1 (+ s4-0 s5-5))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) s4-1 -24) (let ((s4-2 (+ s4-1 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this sprites 0 pos) s4-2 -24) (let ((s4-3 (+ s4-2 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this sprites 0 pos) s4-3 -24) (let ((a2-13 (+ s4-3 s5-5))) - (set-as-offset-from! - (the-as hud-sprite (-> this strings 4 pos)) - (the-as vector4w (-> this sprites)) - a2-13 - -24 - ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 4 pos)) (-> this sprites 0 pos) a2-13 -24) ) ) ) @@ -560,12 +555,12 @@ (defmethod draw ((this hud-big-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) (the int (+ 50.0 (* -100.0 (-> this offset)))) ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -7 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -7 -24) ((method-of-type hud draw) this) 0 (none) @@ -597,13 +592,13 @@ (defmethod draw ((this hud-goal)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) (let ((v1-4 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond ((= v1-4 (language-enum korean)) @@ -658,14 +653,10 @@ ) (defmethod draw ((this hud-miss)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 448.0 (* 130.0 (-> this offset)))) - 70 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 448.0 (* 130.0 (-> this offset)))) 70) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 40 -40) (let ((v1-3 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond ((= v1-3 (language-enum korean)) @@ -731,13 +722,13 @@ (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) 256 (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y))) ) (set-as-offset-from! (-> this sprites 1) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42) 0 ) @@ -1098,7 +1089,7 @@ (the int (+ 40.0 (* -100.0 (-> this offset)))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- (the int (+ 507.0 (* 130.0 (-> this offset)))) (the int (* (the float sv-32) (-> *video-params* relative-x-scale))) ) @@ -1109,27 +1100,23 @@ ((zero? (-> this values 0 current)) (set! f30-0 0.0) (set! (-> this strings 0 pos x) 0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -3 0) ) (else - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) sv-48 sv-56) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) sv-48 sv-56) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ sv-32 -70) (+ sv-40 61) ) - (set-as-offset-from! - (-> this sprites 14) - (the-as vector4w (-> this sprites)) - (+ sv-32 -68) - (+ (if (= sv-80 20) - 122 - 97 - ) - sv-40 - ) - ) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) (+ sv-32 -68) (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) (set! (-> this sprites 14 scale-x) 1.0) (let ((s5-0 (the int (+ 0.1 (* (the float sv-80) (/ (the float (-> this values 1 current)) (the float sv-72))))))) (if (and (zero? s5-0) (nonzero? (-> this values 1 current))) @@ -1146,17 +1133,13 @@ (draw (-> this sprites 14) s3-0 (-> this level) #f) (+! (-> this sprites 14 pos y) -5) (if (= s2-0 (+ (/ sv-80 2) -1)) - (set-as-offset-from! - (-> this sprites 14) - (the-as vector4w (-> this sprites)) - (+ sv-32 -83) - (+ (if (= sv-80 20) - 122 - 97 - ) - sv-40 - ) - ) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) (+ sv-32 -83) (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) ) ) ) @@ -1165,7 +1148,7 @@ ) ) (set! (-> this sprites 14 scale-x) 0.0) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w sv-64) -4 -4) + (set-as-offset-from! (-> this sprites 15) (-> sv-64 pos) -4 -4) (dotimes (v1-125 12) (set! (-> this sprites (+ v1-125 2) scale-x) 0.0) ) @@ -1211,7 +1194,7 @@ (-> *gun-arrow-table* (+ (* s4-1 2) 1)) (-> *gun-arrow-table* (* s4-1 2)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1262,7 +1245,7 @@ (-> *gun-arrow-table* (+ (* s4-2 2) 7)) (-> *gun-arrow-table* (+ (* s4-2 2) 6)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1313,7 +1296,7 @@ (-> *gun-arrow-table* (+ (* s4-3 2) 13)) (-> *gun-arrow-table* (+ (* s4-3 2) 12)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1364,7 +1347,7 @@ (-> *gun-arrow-table* (+ (* s4-4 2) 19)) (-> *gun-arrow-table* (+ (* s4-4 2) 18)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) diff --git a/goal_src/jak3/engine/ui/minimap.gc b/goal_src/jak3/engine/ui/minimap.gc index 75d1093c0db..139b4f5d800 100644 --- a/goal_src/jak3/engine/ui/minimap.gc +++ b/goal_src/jak3/engine/ui/minimap.gc @@ -2344,7 +2344,7 @@ (set-vector! (-> arg0 corner 2) (- f0-12) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-12 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-228) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-228) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-228) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-228) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-228) @@ -2485,7 +2485,7 @@ (set-vector! (-> arg0 corner 2) (- f0-11) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-11 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-140) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-140) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-140) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-140) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-140) @@ -2628,7 +2628,7 @@ (set-vector! (-> arg0 corner 2) f0-8 0.0 f0-8 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 (* 2.0 f0-8) 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -2798,7 +2798,7 @@ (set-vector! (-> arg0 corner 2) 0.0 0.0 (- f0-7) 1.0) (set-vector! (-> arg0 corner 3) f0-7 0.0 0.0 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -2962,7 +2962,7 @@ (set! (-> arg0 corner 3 x) (/ (-> this map-inv-scale) -4)) (set! (-> arg0 corner 3 z) (/ (-> this map-inv-scale) -4)) (set! (-> arg0 corner 3 w) 1.0) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) (-> arg0 mat)) @@ -3631,7 +3631,7 @@ (set-vector! (-> gp-0 corner 2) (- f0-29) 0.0 0.0 1.0) (set-vector! (-> gp-0 corner 3) 0.0 0.0 f0-29 1.0) ) - (vector-matrix*! (the-as vector (-> gp-0 corner)) (the-as vector (-> gp-0 corner)) s1-1) + (vector-matrix*! (-> gp-0 corner 0) (-> gp-0 corner 0) s1-1) (vector-matrix*! (-> gp-0 corner 1) (-> gp-0 corner 1) s1-1) (vector-matrix*! (-> gp-0 corner 2) (-> gp-0 corner 2) s1-1) (vector-matrix*! (-> gp-0 corner 3) (-> gp-0 corner 3) s1-1) diff --git a/goal_src/jak3/engine/ui/progress/progress-draw.gc b/goal_src/jak3/engine/ui/progress/progress-draw.gc index 87efdc2a01b..084e0705fed 100644 --- a/goal_src/jak3/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak3/engine/ui/progress/progress-draw.gc @@ -3674,11 +3674,11 @@ ) (set! (-> this sprites 0 pos z) #xffffff) (set! (-> this sprites 0 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160) + (set-hud-piece-position! (-> this sprites 0) 240 160) (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s2-0 (-> *level* level-default) #t) + ((method-of-type hud-sprite draw) (-> this sprites 0) s2-0 (-> *level* level-default) #t) ) (let ((a0-16 arg1)) (set! (-> a0-16 flags) (font-flags kerning middle middle-vert large)) diff --git a/goal_src/jak3/levels/city/blow-tower/blow-tower-extra.gc b/goal_src/jak3/levels/city/blow-tower/blow-tower-extra.gc index 4777ea46d44..8af5ce1ba3c 100644 --- a/goal_src/jak3/levels/city/blow-tower/blow-tower-extra.gc +++ b/goal_src/jak3/levels/city/blow-tower/blow-tower-extra.gc @@ -24,9 +24,9 @@ (the int (+ 15.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 2) (let* ((f0-9 (the float (-> this sprites 2 color x))) (f26-0 (the float (-> this sprites 2 color y))) (f30-0 (the float (-> this sprites 2 color z))) @@ -104,9 +104,9 @@ ) (defmethod draw ((this hud-hellcat)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set-hud-piece-position! (-> this sprites 0) 5 366) (set! (-> this sprites 0 pos z) #xffffff) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 9) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 9) (set! (-> this sprites 1 pos z) #xffffff) (let ((f0-1 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) @@ -160,7 +160,7 @@ (defmethod draw ((this hud-pickup-arrows)) (set! (-> this sprites 0 color w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set-hud-piece-position! (-> this sprites 0) 32 208) (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) (set! (-> this sprites 1 color w) 0) (set-hud-piece-position! (-> this sprites 1) 480 208) diff --git a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc index dcb83597445..40ff3c2f14d 100644 --- a/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc +++ b/goal_src/jak3/levels/city/blow-tower/blow-tower-obs2.gc @@ -283,7 +283,7 @@ (s5-0 (-> this rotation-matrix)) (f0-8 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-5)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-0)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-0 rvec)) 0.0) (set! f0-8 (* -1.0 f0-8)) ) (set! (-> this me-to-focus-angle) f0-8) @@ -2669,7 +2669,7 @@ (v1-1 (new 'stack-no-clear 'vector)) ) (let ((a1-1 (new 'stack-no-clear 'vector))) - (vector-! v1-1 a0-2 (the-as vector (-> this main-joint-movement))) + (vector-! v1-1 a0-2 (-> this main-joint-movement 0)) (let ((a2-1 v1-1)) (.lvf vf1 (&-> v1-1 quad)) (let ((f0-0 (-> pp clock frames-per-second))) @@ -2876,7 +2876,7 @@ (dotimes (s4-0 (-> s5-0 length)) (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) (when s3-0 - (vector-! (the-as vector (-> sv-64 vertex)) (the-as vector sv-76) (the-as vector (-> s3-0 bounds))) + (vector-! (-> sv-64 vertex 0) (the-as vector sv-76) (the-as vector (-> s3-0 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) diff --git a/goal_src/jak3/levels/city/blow-tower/blow-tower-shared.gc b/goal_src/jak3/levels/city/blow-tower/blow-tower-shared.gc index c4259d3cd30..69891334e1a 100644 --- a/goal_src/jak3/levels/city/blow-tower/blow-tower-shared.gc +++ b/goal_src/jak3/levels/city/blow-tower/blow-tower-shared.gc @@ -229,7 +229,7 @@ (defun process-xform-list ((arg0 xform) (arg1 xform) (arg2 (inline-array xform)) (arg3 int)) (let ((s5-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (-> arg1 root)))) (dotimes (s2-0 arg3) - (let ((a1-3 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> arg2 s2-0))))) + (let ((a1-3 (matrix<-transformq! (new 'stack-no-clear 'matrix) (-> arg2 s2-0 root)))) (matrix*! s5-0 a1-3 s5-0) ) ) diff --git a/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc b/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc index a51bb4a4d09..f3fd2d68492 100644 --- a/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc +++ b/goal_src/jak3/levels/city/blow-tower/cty-blow-tower.gc @@ -1502,7 +1502,7 @@ (let ((gp-0 (new 'stack-no-clear 'quaternion))) (if (send-event a0-5 'get-cam-info (-> self trans) gp-0) (forward-up->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (vector-z-quaternion! (new 'stack-no-clear 'vector) gp-0) (vector-y-quaternion! (new 'stack-no-clear 'vector) gp-0) ) diff --git a/goal_src/jak3/levels/city/bombbot/bombbot.gc b/goal_src/jak3/levels/city/bombbot/bombbot.gc index 0515c140060..49bfbd4bc0c 100644 --- a/goal_src/jak3/levels/city/bombbot/bombbot.gc +++ b/goal_src/jak3/levels/city/bombbot/bombbot.gc @@ -17,13 +17,9 @@ (defmethod draw ((this bombbot-hud)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 62 -9) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 62 -9) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (* 0.01 (the float (-> this values 0 current))))) (set! (-> this sprites 1 color x) 0) @@ -562,7 +558,7 @@ ) 0.0 (vector-copy! (-> a1-2 start-pos) (-> v1-4 world-sphere)) - (vector-! (-> a1-2 move-dist) (the-as vector a0-5) (the-as vector v1-4)) + (vector-! (-> a1-2 move-dist) (-> a0-5 world-sphere) (-> v1-4 world-sphere)) ) (let ((v1-5 a1-2)) (set! (-> v1-5 radius) 40.96) @@ -1409,7 +1405,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 24576.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -2557,7 +2553,7 @@ (-> self root trans) (-> self root trans) (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-1)) (-> self root trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self city-path node gp-1 position) (-> self root trans)) (-> *bombbot-nav-enemy-info* run-travel-speed) ) ) @@ -2577,7 +2573,7 @@ (nav-enemy-method-187 self) ) ) - (if (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-1))) 32768.0) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self city-path node gp-1 position)) 32768.0) (set! (-> self current-node) (the-as uint @@ -4018,7 +4014,7 @@ (set! (-> a2-2 y) -8192.0) (set! (-> a2-2 z) 40960.0) (set! (-> a2-2 w) 1.0) - (vector-! (the-as vector v1-10) a0-6 a2-2) + (vector-! (-> v1-10 min) a0-6 a2-2) ) (let ((v1-12 (-> a1-2 bbox max)) (a0-8 (-> this root trans)) @@ -4908,7 +4904,7 @@ (let ((v1-114 (the int (* 0.000030517578 (vector-vector-xz-distance (-> s2-0 root trans) - (the-as vector (-> s2-0 city-path node (+ (-> s2-0 city-path node-count) -1))) + (-> s2-0 city-path node (+ (-> s2-0 city-path node-count) -1) position) ) ) ) diff --git a/goal_src/jak3/levels/city/common/height-map.gc b/goal_src/jak3/levels/city/common/height-map.gc index 506d3f773f2..0002e25e6b0 100644 --- a/goal_src/jak3/levels/city/common/height-map.gc +++ b/goal_src/jak3/levels/city/common/height-map.gc @@ -131,7 +131,7 @@ (s4-0 (-> this x-dim)) (s3-0 (-> this z-dim)) ) - (let ((s2-0 (&-> (-> this data) 0))) + (let ((s2-0 (&-> this data 0))) (set! (-> s5-0 0 min z) (-> this z-offset)) (countdown (s1-0 s3-0) (let ((s0-0 s2-0)) @@ -144,16 +144,8 @@ (+! (-> s5-0 0 min x) f28-0) (set! s0-0 (&-> s0-0 1)) (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) - (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s5-0 0)) - (-> s5-0 0 max) - *color-red* - #f - (the-as rgba -1) - ) + (if (and (point-in-bbox? (-> s5-0 1) (-> s5-0 0 min)) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line #t (bucket-id debug) (-> s5-0 0 min) (-> s5-0 0 max) *color-red* #f (the-as rgba -1)) ) ) ) @@ -161,7 +153,7 @@ (&+! s2-0 s4-0) ) ) - (let ((s2-1 (&-> (-> this data) 0))) + (let ((s2-1 (&-> this data 0))) (set! (-> s5-0 0 min x) (-> this x-offset)) (countdown (s1-1 s4-0) (let ((s0-1 (the-as pointer s2-1))) @@ -178,16 +170,8 @@ (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> this y-scale))) ) - (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s5-0 0)) - (-> s5-0 0 max) - *color-blue* - #f - (the-as rgba -1) - ) + (if (and (point-in-bbox? (-> s5-0 1) (-> s5-0 0 min)) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line #t (bucket-id debug) (-> s5-0 0 min) (-> s5-0 0 max) *color-blue* #f (the-as rgba -1)) ) ) ) diff --git a/goal_src/jak3/levels/city/common/nav-graph.gc b/goal_src/jak3/levels/city/common/nav-graph.gc index ce59c44101e..7b55d113498 100644 --- a/goal_src/jak3/levels/city/common/nav-graph.gc +++ b/goal_src/jak3/levels/city/common/nav-graph.gc @@ -1013,7 +1013,7 @@ (let ((a0-10 (-> v1-16 nav-mesh)) (a1-5 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-5 vertex)) s3-0 (the-as vector (-> a0-10 bounds))) + (vector-! (-> a1-5 vertex 0) s3-0 (the-as vector (-> a0-10 bounds))) (set! (-> a1-5 vertex1 x) 40960.0) (set! (-> a1-5 data 20) (the-as uint 2)) (if (nav-mesh-method-45 a0-10 a1-5) diff --git a/goal_src/jak3/levels/city/ctywide-obs.gc b/goal_src/jak3/levels/city/ctywide-obs.gc index 3fa0145075f..b2e5d0fe108 100644 --- a/goal_src/jak3/levels/city/ctywide-obs.gc +++ b/goal_src/jak3/levels/city/ctywide-obs.gc @@ -1681,7 +1681,7 @@ (.mul.x.vf.xyz acc vf5 vf7) (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-18 quad) vf6) - (t9-4 (the-as matrix a0-6) (vector-! a1-3 v1-18 gp-0) (-> *camera* local-down)) + (t9-4 (-> a0-6 inv-mat) (vector-! a1-3 v1-18 gp-0) (-> *camera* local-down)) ) ) ) @@ -1919,7 +1919,7 @@ (.mul.x.vf.xyz acc vf5 vf7) (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-35 quad) vf6) - (t9-6 (the-as matrix a0-27) (vector-! a1-13 v1-35 gp-1) (-> *camera* local-down)) + (t9-6 (-> a0-27 inv-mat) (vector-! a1-13 v1-35 gp-1) (-> *camera* local-down)) ) ) ) @@ -2930,10 +2930,10 @@ (defmethod draw ((this board-score-hud)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (set-hud-piece-position! (-> this sprites 0) 447 70) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/city/destroy-grid/cty-destroy-grid.gc b/goal_src/jak3/levels/city/destroy-grid/cty-destroy-grid.gc index 4cfe911771b..5a5cff83ff2 100644 --- a/goal_src/jak3/levels/city/destroy-grid/cty-destroy-grid.gc +++ b/goal_src/jak3/levels/city/destroy-grid/cty-destroy-grid.gc @@ -30,9 +30,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 6 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 6 2) (set! (-> this sprites 3 scale-x) 1.2) (set! (-> this sprites 3 scale-y) 1.25) ((method-of-type hud draw) this) @@ -713,7 +713,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) diff --git a/goal_src/jak3/levels/city/farm/ctyfarm-obs.gc b/goal_src/jak3/levels/city/farm/ctyfarm-obs.gc index d6b881fa89a..77350be355e 100644 --- a/goal_src/jak3/levels/city/farm/ctyfarm-obs.gc +++ b/goal_src/jak3/levels/city/farm/ctyfarm-obs.gc @@ -1257,7 +1257,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4035) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) @@ -1488,7 +1488,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4043) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) diff --git a/goal_src/jak3/levels/city/hijack/billiards.gc b/goal_src/jak3/levels/city/hijack/billiards.gc index a41d24b3628..ad87f86fb20 100644 --- a/goal_src/jak3/levels/city/hijack/billiards.gc +++ b/goal_src/jak3/levels/city/hijack/billiards.gc @@ -98,7 +98,7 @@ ) (set! (-> s3-0 w) 1.0) ) - (vector+! (the-as vector (-> this billiards data s5-0)) (-> this min-xyz) s4-0) + (vector+! (-> this billiards data s5-0 pos) (-> this min-xyz) s4-0) ) ) (billiard-table-method-14 this) diff --git a/goal_src/jak3/levels/city/hijack/kg-vehicles.gc b/goal_src/jak3/levels/city/hijack/kg-vehicles.gc index eaf7793dafa..50d773a9e21 100644 --- a/goal_src/jak3/levels/city/hijack/kg-vehicles.gc +++ b/goal_src/jak3/levels/city/hijack/kg-vehicles.gc @@ -507,7 +507,7 @@ (set! (-> this draw lod-set lod 0 dist) 1228800.0) (dotimes (s5-0 (-> this sled billiards length)) (let ((f30-0 (vector-vector-xz-distance - (the-as vector (-> this sled billiards data s5-0)) + (-> this sled billiards data s5-0 pos) (the-as vector (+ (the-as uint (-> this sled billiards data 0 prev-pos)) (* 48 s5-0))) ) ) @@ -558,7 +558,7 @@ (quaternion-copy! (-> s4-2 root quat) (-> this root quat)) (-> this sled billiards data s5-2) (let ((s3-3 (new 'stack-no-clear 'vector))) - (vector-matrix*! s3-3 (the-as vector (-> this sled billiards data s5-2)) (-> this sled mat)) + (vector-matrix*! s3-3 (-> this sled billiards data s5-2 pos) (-> this sled mat)) (vector-copy! (-> s4-2 root trans) s3-3) ) ) diff --git a/goal_src/jak3/levels/city/onintent/onintent-part.gc b/goal_src/jak3/levels/city/onintent/onintent-part.gc index 54436ad092f..7e9e7ae7db7 100644 --- a/goal_src/jak3/levels/city/onintent/onintent-part.gc +++ b/goal_src/jak3/levels/city/onintent/onintent-part.gc @@ -1462,6 +1462,6 @@ ) ) (sparticle-turn-to-vel arg0 arg1 (the-as sprite-vec-data-3d arg2)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 rvec)) (none) ) diff --git a/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc b/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc index b173dca343d..d6beb8124b1 100644 --- a/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc +++ b/goal_src/jak3/levels/city/port/attack/ctyport-attack.gc @@ -2986,12 +2986,12 @@ (the int (+ 65.0 (* 18.0 (-> *video-params* relative-x-scale)) (* -130.0 (-> this offset)))) (the int (+ 350.0 (* 130.0 (-> this offset)))) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 5 -25) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 5 5) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 5 -25) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 5 5) (logior! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) (logior! (-> this sprites 2 flags) (hud-sprite-flags hsf3 hsf4)) (logior! (-> this sprites 3 flags) (hud-sprite-flags hsf3)) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1110 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1110 0) (logior! (-> this sprites 1 flags) (hud-sprite-flags hsf3 hsf5)) (set! (-> this sprites 2 scale-x) 1.4) (set! (-> this sprites 1 scale-x) 1.4) diff --git a/goal_src/jak3/levels/city/port/attack/h-torpedo.gc b/goal_src/jak3/levels/city/port/attack/h-torpedo.gc index a9d58975066..c7cba18c6dc 100644 --- a/goal_src/jak3/levels/city/port/attack/h-torpedo.gc +++ b/goal_src/jak3/levels/city/port/attack/h-torpedo.gc @@ -250,7 +250,7 @@ ) (defun spt-func-nuke-water-splash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) ) @@ -1614,7 +1614,7 @@ (quaternion-normalize! s1-0) (quaternion->matrix s5-0 s1-0) (vector-copy! (-> s5-0 trans) (-> this rbody matrix trans)) - (vector-matrix*! (-> s3-0 0 saved-pt) (the-as vector (-> this info camera look-pos-array)) s5-0) + (vector-matrix*! (-> s3-0 0 saved-pt) (-> this info camera look-pos-array 0) s5-0) (vector+float*! (-> s3-0 0 saved-pt) (-> s3-0 0 saved-pt) s2-0 0.0) ) (let ((v1-18 (-> s3-0 0 tracking))) diff --git a/goal_src/jak3/levels/city/protect/assault-enemies.gc b/goal_src/jak3/levels/city/protect/assault-enemies.gc index bed3a2eece0..f352cbb94a0 100644 --- a/goal_src/jak3/levels/city/protect/assault-enemies.gc +++ b/goal_src/jak3/levels/city/protect/assault-enemies.gc @@ -1794,16 +1794,13 @@ (let ((f30-0 0.3)) (dotimes (s3-1 (the-as int (-> this city-path node-count))) (when (!= s3-1 (-> this current-node)) - (let ((s2-1 - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> this city-path node s3-1)) (-> this root trans)) - ) - ) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> this city-path node s3-1 position) (-> this root trans)))) 0.0 (set! (-> s2-1 y) 0.0) (vector-normalize! s2-1 1.0) (let ((f28-0 (vector-dot s4-4 s2-1))) (when (and (< f30-0 f28-0) - (< 40960.0 (vector-vector-xz-distance (-> this root trans) (the-as vector (-> this city-path node s3-1)))) + (< 40960.0 (vector-vector-xz-distance (-> this root trans) (-> this city-path node s3-1 position))) ) (set! f30-0 f28-0) (set! s5-0 s3-1) @@ -1967,7 +1964,7 @@ (-> self root trans) (-> self root trans) (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-0)) (-> self root trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self city-path node gp-0 position) (-> self root trans)) (-> *bombbot-nav-enemy-info* run-travel-speed) ) ) @@ -1987,7 +1984,7 @@ (nav-enemy-method-187 self) ) ) - (when (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-0))) 24576.0) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self city-path node gp-0 position)) 24576.0) (set! (-> self current-node) (the-as uint gp-0)) (set! (-> self next-node) (assault-bombbot-method-209 self)) ) diff --git a/goal_src/jak3/levels/city/protect/assault-task.gc b/goal_src/jak3/levels/city/protect/assault-task.gc index 7de35c7285b..a15dccd9def 100644 --- a/goal_src/jak3/levels/city/protect/assault-task.gc +++ b/goal_src/jak3/levels/city/protect/assault-task.gc @@ -213,7 +213,7 @@ ) ) ) - (quaternion->matrix (the-as matrix (-> s5-1 0 tracking)) s4-1) + (quaternion->matrix (-> s5-1 0 tracking inv-mat) s4-1) ) ) ) @@ -260,7 +260,7 @@ (let ((v1-11 (-> v1-10 slave))) (when v1-11 (vector-copy! (-> self original-cam-point) (-> v1-11 0 saved-pt)) - (matrix->quaternion (-> self original-cam-quat) (the-as matrix (-> v1-11 0 tracking))) + (matrix->quaternion (-> self original-cam-quat) (-> v1-11 0 tracking inv-mat)) ) ) ) diff --git a/goal_src/jak3/levels/city/protect/protect-gunship.gc b/goal_src/jak3/levels/city/protect/protect-gunship.gc index 264ad6ad319..2c9b1ca8df7 100644 --- a/goal_src/jak3/levels/city/protect/protect-gunship.gc +++ b/goal_src/jak3/levels/city/protect/protect-gunship.gc @@ -1123,10 +1123,10 @@ ) ) ) - (vector<-cspace! (the-as vector (-> s5-0 span-pts-start data)) (-> this node-list data 4)) + (vector<-cspace! (-> s5-0 span-pts-start data 0) (-> this node-list data 4)) (vector+float*! - (the-as vector (-> s5-0 span-pts-start data)) - (the-as vector (-> s5-0 span-pts-start data)) + (-> s5-0 span-pts-start data 0) + (-> s5-0 span-pts-start data 0) (-> this node-list data 4 bone transform fvec) 819.2 ) @@ -1295,7 +1295,7 @@ (dotimes (s4-0 (-> s5-0 length)) (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) (when s3-0 - (vector-! (the-as vector (-> sv-64 vertex)) sv-76 (the-as vector (-> s3-0 bounds))) + (vector-! (-> sv-64 vertex 0) sv-76 (the-as vector (-> s3-0 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) @@ -1908,7 +1908,7 @@ (let ((f0-7 (vector-vector-distance-squared (-> self dest-pos) - (the-as vector (-> (the-as process-focusable s3-1) root root-prim prim-core)) + (-> (the-as process-focusable s3-1) root root-prim prim-core world-sphere) ) ) (f1-4 f30-0) @@ -1948,7 +1948,7 @@ (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s5-1 mask)) (not (focus-test? s5-1 disable dead inactive)) (-> s5-1 control root-prim) - (< (vector-vector-distance-squared (-> self dest-pos) (the-as vector (-> s5-1 control root-prim prim-core))) + (< (vector-vector-distance-squared (-> self dest-pos) (-> s5-1 control root-prim prim-core world-sphere)) (* f30-0 f30-0) ) ) diff --git a/goal_src/jak3/levels/city/protect/roboguard-city.gc b/goal_src/jak3/levels/city/protect/roboguard-city.gc index ea1cf1fd95f..a2b47a3b309 100644 --- a/goal_src/jak3/levels/city/protect/roboguard-city.gc +++ b/goal_src/jak3/levels/city/protect/roboguard-city.gc @@ -1946,7 +1946,7 @@ (s5-1 (-> this rotation-matrix)) (f0-1 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-6)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-1 rvec)) 0.0) (set! f0-1 (* -1.0 f0-1)) ) (set! (-> this me-to-focus-angle) f0-1) diff --git a/goal_src/jak3/levels/city/sniper/cty-sniper-turret.gc b/goal_src/jak3/levels/city/sniper/cty-sniper-turret.gc index d81cbe35a1d..1e117e369ab 100644 --- a/goal_src/jak3/levels/city/sniper/cty-sniper-turret.gc +++ b/goal_src/jak3/levels/city/sniper/cty-sniper-turret.gc @@ -359,19 +359,19 @@ (with-pp (if (odd? (-> this num-buttons)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- 256 (* 48 (/ (+ (-> this num-buttons) -1) 2))) (- 32 (the int (* 48.0 (-> this offset)))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- 232 (* 48 (+ (/ (-> this num-buttons) 2) -1))) (- 32 (the int (* 48.0 (-> this offset)))) ) ) (let ((s5-0 1)) (while (< s5-0 (-> this num-buttons)) - (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) (* 48 s5-0) 0) + (set-as-offset-from! (-> this sprites s5-0) (-> this sprites 0 pos) (* 48 s5-0) 0) (+! s5-0 1) ) ) @@ -2204,7 +2204,7 @@ (else (vector+! (new 'static 'vector :w 1.0) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (-> this pos-cam-offset) ) ) @@ -3178,6 +3178,7 @@ ) (defmethod init-from-entity! ((this cty-sniper-turret) (arg0 entity-actor)) + "Set up a newly created process from the entity that created it." (local-vars (sv-16 res-tag)) ;; og:preserve-this added (stack-size-set! (-> this main-thread) 1024) diff --git a/goal_src/jak3/levels/city/traffic/citizen/citizen.gc b/goal_src/jak3/levels/city/traffic/citizen/citizen.gc index 4c39acd5a42..2535acd0991 100644 --- a/goal_src/jak3/levels/city/traffic/citizen/citizen.gc +++ b/goal_src/jak3/levels/city/traffic/citizen/citizen.gc @@ -264,7 +264,7 @@ (defmethod citizen-method-199 ((this citizen) (arg0 nav-segment)) (vehicle-controller-method-11 (-> this controller)) - (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (the-as vector (-> arg0 vertex))) + (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (-> arg0 vertex 0)) 0 (none) ) @@ -1282,7 +1282,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f @@ -1385,7 +1385,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f diff --git a/goal_src/jak3/levels/city/traffic/citizen/civilian.gc b/goal_src/jak3/levels/city/traffic/citizen/civilian.gc index 343e296942f..f128dcbce15 100644 --- a/goal_src/jak3/levels/city/traffic/citizen/civilian.gc +++ b/goal_src/jak3/levels/city/traffic/citizen/civilian.gc @@ -522,7 +522,7 @@ (a0-8 (-> self danger-pos)) (a1-5 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-5 vertex)) (the-as vector a0-8) (the-as vector (-> v1-6 state mesh bounds))) + (vector-! (-> a1-5 vertex 0) (the-as vector a0-8) (the-as vector (-> v1-6 state mesh bounds))) (set! (-> a1-5 vertex1 x) (-> v1-6 nearest-y-threshold)) (set! (-> a1-5 data 20) (the-as uint 2)) (set! sv-352 (nav-mesh-method-45 (-> v1-6 state mesh) a1-5)) @@ -1370,7 +1370,7 @@ (s4-0 (new 'stack-no-clear 'matrix)) (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) ) - (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion-normalize! (quaternion*! s1-0 (-> s2-0 0 quat) s1-0)) (quaternion->matrix s4-0 s1-0) (if (logtest? (-> s3-0 ragdoll-flags) (ragdoll-flag mirror)) (matrix*! s4-0 s4-0 (-> s3-0 mirror)) @@ -1529,7 +1529,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) diff --git a/goal_src/jak3/levels/city/traffic/citizen/guard.gc b/goal_src/jak3/levels/city/traffic/citizen/guard.gc index e5cc8278e36..fa55d764d7f 100644 --- a/goal_src/jak3/levels/city/traffic/citizen/guard.gc +++ b/goal_src/jak3/levels/city/traffic/citizen/guard.gc @@ -1506,7 +1506,7 @@ (a0-8 s1-0) (a1-7 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-7 vertex)) a0-8 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-7 vertex 0) a0-8 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-7 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-7 data 20) (the-as uint 2)) (set! sv-816 (nav-mesh-method-45 (-> v1-14 state mesh) a1-7)) diff --git a/goal_src/jak3/levels/city/traffic/traffic-engine.gc b/goal_src/jak3/levels/city/traffic/traffic-engine.gc index 92419eddebc..0df52fc1912 100644 --- a/goal_src/jak3/levels/city/traffic/traffic-engine.gc +++ b/goal_src/jak3/levels/city/traffic/traffic-engine.gc @@ -320,9 +320,9 @@ (let ((v1-29 s0-0)) (set! (-> s4-0 vec2 x) (* 1024.0 (the float (-> v1-29 speed-limit)))) ) - (vector-! (-> s4-0 vec0) (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) + (vector-! (-> s4-0 vec0) (-> arg1 vertex 1) (-> arg1 vertex 0)) (vector-normalize! (-> s4-0 vec0) 1.0) - (vector+float*! (-> s4-0 params position) (the-as vector (-> arg1 vertex)) (-> s4-0 vec0) arg2) + (vector+float*! (-> s4-0 params position) (-> arg1 vertex 0) (-> s4-0 vec0) arg2) (let ((f0-6 (* (+ -0.5 (rand-vu)) (* 256.0 (the float (-> s0-0 width)))))) (+! (-> s4-0 params position x) (* -1.0 (-> s4-0 vec0 z) f0-6)) (+! (-> s4-0 params position z) (* (-> s4-0 vec0 x) f0-6)) @@ -542,7 +542,7 @@ (let ((s3-0 0)) (dotimes (s2-0 (-> s4-0 segment-count)) (let ((s1-0 (-> s4-0 segment-array s2-0))) - (vector-vector-distance (the-as vector (-> s1-0 vertex)) (-> s1-0 vertex 1)) + (vector-vector-distance (-> s1-0 vertex 0) (-> s1-0 vertex 1)) (when (< (-> s1-0 spawn-spacing) 0.0) (inspect s1-0) #t @@ -1460,7 +1460,7 @@ gp-0 (lambda ((arg0 traffic-find-segment-struct) (arg1 nav-segment)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) + (vector-! v1-0 (-> arg1 vertex 1) (-> arg1 vertex 0)) (let ((a2-1 v1-0) (a3-1 v1-0) (f0-0 (-> arg1 length)) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc index c49f5bceb43..554478deb1d 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc @@ -64,7 +64,7 @@ (when (= (-> s4-0 prim-core prim-type) -1) (let ((a1-1 (-> s4-0 prim-core))) (if (< (- (-> a1-1 world-sphere y) (-> a1-1 world-sphere w)) (-> this water-height)) - (vehicle-method-95 this (the-as vector a1-1) arg0) + (vehicle-method-95 this (-> a1-1 world-sphere) arg0) ) ) ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc index f94843fe5ca..8b8bdcf16ce 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc @@ -268,15 +268,15 @@ (and (< (-> s5-0 floats 2) -8192.0) (not (logtest? (-> *target* focus-status) (focus-status edge-grab)))) ) (matrix-4x4-inverse! (-> s5-0 mat 2) (-> s5-0 mat 1)) - (vector-matrix*! (the-as vector (-> s5-0 mat)) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) + (vector-matrix*! (-> s5-0 mat 0 rvec) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) (set! (-> s5-0 floats 0) 81920.0) (dotimes (s2-1 (-> this info rider grab-rail-count)) (let ((s1-0 (-> this info rider grab-rail-array s2-1))) - (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 mat 0 trans) (-> s5-0 mat 0 rvec) (-> s1-0 local-pos 0)) (when #t (let ((f30-0 (vector-segment-distance-point! - (the-as vector (-> s5-0 mat)) - (the-as vector (-> s1-0 local-pos)) + (-> s5-0 mat 0 rvec) + (-> s1-0 local-pos 0) (-> s1-0 local-pos 1) (-> s5-0 mat 0 trans) ) @@ -285,7 +285,7 @@ (when (< f30-0 (-> s5-0 floats 0)) (set! (-> s5-0 floats 0) f30-0) (set! (-> s5-0 vec 0 quad) (-> s5-0 mat 0 trans quad)) - (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (-> s1-0 local-pos 0)) (vector-normalize! (-> s5-0 vec 1) 1.0) (set! s3-0 #t) (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 f30-0))) @@ -502,11 +502,7 @@ (defmethod vehicle-method-113 ((this vehicle) (arg0 vector) (arg1 int) (arg2 int)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector+! - v1-0 - (the-as vector (-> this info rider seat-array arg1)) - (-> this info rider rider-hand-offset arg2) - ) + (vector+! v1-0 (-> this info rider seat-array arg1 position) (-> this info rider rider-hand-offset arg2)) (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) ) 0 @@ -743,7 +739,7 @@ (set-vector! (-> s4-1 0 fvec) 0.0 1.0 0.0 1.0) (mem-copy! (the-as pointer (-> s4-1 1)) (the-as pointer s5-1) 64) (dotimes (s3-0 2) - (vector-matrix*! (the-as vector (-> s4-1 0)) (-> this info particles exhaust-local-pos s3-0) s5-1) + (vector-matrix*! (-> s4-1 0 rvec) (-> this info particles exhaust-local-pos s3-0) s5-1) (vector-rotate*! (-> s4-1 0 uvec) (-> this info particles exhaust-local-dir s3-0) s5-1) (vector-cross! (-> s4-1 0 trans) (-> s4-1 0 uvec) (-> s4-1 0 fvec)) (vector-normalize! (-> s4-1 0 trans) 1.0) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc index 072313fefa4..70831f9ad56 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc @@ -404,14 +404,10 @@ (let ((v1-83 (-> this cam-view))) (cond ((zero? v1-83) - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (the-as vector (-> this info camera look-pos-array)) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-pos-array 0) (the-as matrix (-> s4-0 1))) ) ((= v1-83 1) - (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 32768.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -420,7 +416,7 @@ ) ) ((= v1-83 2) - (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 16384.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -429,11 +425,7 @@ ) ) ((= v1-83 3) - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (-> this info camera look-right) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-right) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) -16384.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -442,11 +434,7 @@ ) ) (else - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (the-as vector (-> this info camera look-pos-array)) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-pos-array 0) (the-as matrix (-> s4-0 1))) ) ) ) @@ -478,10 +466,10 @@ (set! (-> v1-96 action-mask) (collide-action solid)) ) (vector-copy! (-> s4-0 0 start-pos) (-> this rbody position)) - (vector-! (-> s4-0 0 move-dist) (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos)) + (vector-! (-> s4-0 0 move-dist) (-> s4-0 1 bbox min) (-> s4-0 0 start-pos)) (let ((f0-23 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-0 0)))) (if (>= f0-23 0.0) - (vector+float*! (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) + (vector+float*! (-> s4-0 1 bbox min) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) ) ) ) @@ -520,7 +508,7 @@ (set! (-> a0-72 rvec w) 1.0) ) (matrix-copy! (-> v1-132 0) (-> this rbody matrix)) - (vector-rotate*! s5-1 (the-as vector (-> v1-132 1)) (-> v1-132 0)) + (vector-rotate*! s5-1 (-> v1-132 1 rvec) (-> v1-132 0)) ) (persist-with-delay *setting-control* @@ -1057,10 +1045,10 @@ s0-0 ) (set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad)) - (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (the-as vector (-> s5-0 1))) + (vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> s5-0 1 point)) ) (else - (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (-> arg0 root trans)) + (vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> arg0 root trans)) ) ) ) @@ -1134,7 +1122,7 @@ (vector-copy! s3-1 (-> s5-0 0 velocity)) (vector-normalize! s3-1 1.0) (vector-float*! s3-1 s3-1 (-> s5-0 0 impulse)) - (apply-impact! (-> this rbody) (the-as vector (-> s5-0 0)) s3-1) + (apply-impact! (-> this rbody) (-> s5-0 0 point) s3-1) (rigid-body-control-method-12 (-> this rbody) 1.0) (init-velocities! (-> this rbody)) (when #f @@ -1144,15 +1132,8 @@ (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-84 prim1 cprim prim-core world-sphere quad)) (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-84 prim2 cprim prim-core world-sphere quad)) ) - (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 0)) *color-blue*) - (add-debug-vector - #t - (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 0)) - s3-1 - (meters 0.00024414062) - *color-blue* - ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 0 point) *color-blue*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> s5-0 0 point) s3-1 (meters 0.00024414062) *color-blue*) ) ) ) diff --git a/goal_src/jak3/levels/city/vinroom/power-game.gc b/goal_src/jak3/levels/city/vinroom/power-game.gc index 5c21282d129..904c9b7162e 100644 --- a/goal_src/jak3/levels/city/vinroom/power-game.gc +++ b/goal_src/jak3/levels/city/vinroom/power-game.gc @@ -1710,7 +1710,7 @@ (format *stdcon* "press L1 to fail, R1 to complete~%") ) (let ((v1-7 (-> this center))) - (vector+! (the-as vector (-> this corner)) v1-7 (new 'static 'vector :x -131072.0 :z -114688.0 :w 1.0)) + (vector+! (-> this corner 0) v1-7 (new 'static 'vector :x -131072.0 :z -114688.0 :w 1.0)) (vector+! (-> this corner 1) v1-7 (new 'static 'vector :x 131072.0 :z 114688.0 :w 1.0)) ) (dotimes (s5-0 17) @@ -3517,7 +3517,7 @@ (let ((f30-0 (-> *power-game* 0 cam-cur cam-y-angle))) (vector-rotate-x! gp-0 gp-0 (- (-> *power-game* 0 cam-cur cam-pos-x-angle))) (vector-rotate-y! gp-0 gp-0 f30-0) - (vector+! (the-as vector (&-> self root)) (the-as vector s5-0) gp-0) + (vector+! (the-as vector (&-> self root)) (-> s5-0 cam-pos) gp-0) (set-vector! gp-0 0.0 0.0 1.0 1.0) (vector-rotate-x! gp-0 gp-0 (-> *power-game* 0 cam-cur cam-x-angle)) (vector-rotate-y! gp-0 gp-0 (+ 32768.0 f30-0)) diff --git a/goal_src/jak3/levels/comb/comb-mood.gc b/goal_src/jak3/levels/comb/comb-mood.gc index 7bfd5787def..871f36715a4 100644 --- a/goal_src/jak3/levels/comb/comb-mood.gc +++ b/goal_src/jak3/levels/comb/comb-mood.gc @@ -44,8 +44,8 @@ (s5-1 (-> arg0 current-fog fog-dists)) ) (vector4-lerp! - (the-as vector a1-4) - (the-as vector a1-4) + (-> a1-4 fog-color) + (-> a1-4 fog-color) (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) f30-1 ) diff --git a/goal_src/jak3/levels/comb/comb-obs.gc b/goal_src/jak3/levels/comb/comb-obs.gc index 1a7eff3aa58..e54202c9745 100644 --- a/goal_src/jak3/levels/comb/comb-obs.gc +++ b/goal_src/jak3/levels/comb/comb-obs.gc @@ -917,8 +917,8 @@ (let ((v1-13 (-> this root root-prim))) (update-bolt this - (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core)) - (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core)) + (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core world-sphere) + (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core world-sphere) ) ) 0 diff --git a/goal_src/jak3/levels/comb/combx-obs.gc b/goal_src/jak3/levels/comb/combx-obs.gc index 52c3819a6b1..aa6a9261b1d 100644 --- a/goal_src/jak3/levels/comb/combx-obs.gc +++ b/goal_src/jak3/levels/comb/combx-obs.gc @@ -138,8 +138,8 @@ (s5-1 (-> arg0 current-fog fog-dists)) ) (vector4-lerp! - (the-as vector a1-4) - (the-as vector a1-4) + (-> a1-4 fog-color) + (-> a1-4 fog-color) (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) f30-1 ) diff --git a/goal_src/jak3/levels/comb/h-sled.gc b/goal_src/jak3/levels/comb/h-sled.gc index b1cee500c54..857219ba454 100644 --- a/goal_src/jak3/levels/comb/h-sled.gc +++ b/goal_src/jak3/levels/comb/h-sled.gc @@ -29,9 +29,9 @@ (defmethod draw ((this hud-sled-health)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set-hud-piece-position! (-> this sprites 0) 5 366) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 6) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) @@ -128,9 +128,9 @@ ) (init-vf0-vector) (let ((s4-0 (new 'stack-no-clear 'h-sled-stack-var0))) - (vector-! (the-as vector (-> s4-0 vec)) (-> arg2 vertex 2) (-> arg2 vertex 1)) - (vector-! (-> s4-0 vec 1) (the-as vector (-> arg2 vertex)) (-> arg2 vertex 2)) - (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (the-as vector (-> arg2 vertex))) + (vector-! (-> s4-0 vec 0) (-> arg2 vertex 2) (-> arg2 vertex 1)) + (vector-! (-> s4-0 vec 1) (-> arg2 vertex 0) (-> arg2 vertex 2)) + (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (-> arg2 vertex 0)) (set! (-> s4-0 byte0) -1) (set! (-> s4-0 float1) -1.0) (dotimes (v1-5 3) diff --git a/goal_src/jak3/levels/comb/railx-mood.gc b/goal_src/jak3/levels/comb/railx-mood.gc index 0f2b1efc41a..b4a7dbb4fa4 100644 --- a/goal_src/jak3/levels/comb/railx-mood.gc +++ b/goal_src/jak3/levels/comb/railx-mood.gc @@ -70,7 +70,7 @@ (s0-0 (new 'static 'vector :x -0.8451 :y -0.2182 :z -0.488)) ) (vector-matrix*! (the-as vector (-> s1-0 0)) a1-3 s5-0) - (vector-matrix*! (the-as vector (-> s1-0 0 dir1)) s0-0 s5-0) + (vector-matrix*! (-> s1-0 0 dir1 direction) s0-0 s5-0) ) (set! (-> s1-0 0 ambi extra x) 0.2) (set! (-> s1-0 0 dir0 extra x) 0.8) @@ -88,8 +88,8 @@ (let ((a1-6 (new 'static 'vector :x 0.44725248 :y 0.77455187 :z 0.44725248)) (s4-1 (new 'static 'vector :x -0.44725248 :y -0.77455187 :z -0.44725248)) ) - (vector-matrix*! (the-as vector (-> gp-0 dir0)) a1-6 s5-0) - (vector-matrix*! (the-as vector (-> gp-0 dir1)) s4-1 s5-0) + (vector-matrix*! (-> gp-0 dir0 direction) a1-6 s5-0) + (vector-matrix*! (-> gp-0 dir1 direction) s4-1 s5-0) ) ) (set! (-> gp-0 ambi extra x) 0.2) diff --git a/goal_src/jak3/levels/common/ai/ashelin/ash.gc b/goal_src/jak3/levels/common/ai/ashelin/ash.gc index d9d76e04f0a..41e5de35085 100644 --- a/goal_src/jak3/levels/common/ai/ashelin/ash.gc +++ b/goal_src/jak3/levels/common/ai/ashelin/ash.gc @@ -1409,9 +1409,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 8 2) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/common/elec-gate.gc b/goal_src/jak3/levels/common/elec-gate.gc index 9fcb96df560..c56b399d6c5 100644 --- a/goal_src/jak3/levels/common/elec-gate.gc +++ b/goal_src/jak3/levels/common/elec-gate.gc @@ -378,7 +378,7 @@ (when gp-0 (when (not (focus-test? gp-0 disable dead ignore grabbed pilot-riding pilot mech teleporting invulnerable)) (let* ((v1-5 (get-trans gp-0 0)) - (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (the-as vector (-> self dividing-wall)))) + (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self dividing-wall pos))) (s5-0 (-> self plane (if (< 0.0 (vector-dot a1-2 (-> self dividing-wall dir))) 0 1 @@ -785,10 +785,10 @@ (defmethod spawn-particles ((this elec-gate) (arg0 sparticle-launch-control)) (if (-> this part-spawner-left) - (spawn arg0 (the-as vector (&-> (-> this part-spawner-left child) 8))) + (spawn arg0 (the-as vector (&-> this part-spawner-left child 8))) ) (if (-> this part-spawner-right) - (spawn arg0 (the-as vector (&-> (-> this part-spawner-right child) 8))) + (spawn arg0 (the-as vector (&-> this part-spawner-right child 8))) ) 0 (none) @@ -895,10 +895,10 @@ (vector-cross! v1-31 v1-31 *up-vector*) (set! (-> this dividing-wall pos quad) (-> s5-3 quad)) (vector-copy! (-> this dividing-wall dir) v1-31) - (vector+float*! (the-as vector (-> this plane)) s5-3 v1-31 12288.0) + (vector+float*! (-> this plane 0 pos) s5-3 v1-31 12288.0) (vector-copy! (-> this plane 0 dir) v1-31) (vector-float*! v1-31 v1-31 -1.0) - (vector+float*! (the-as vector (-> this plane 1)) s5-3 v1-31 12288.0) + (vector+float*! (-> this plane 1 pos) s5-3 v1-31 12288.0) (vector-copy! (-> this plane 1 dir) v1-31) ) (set! (-> this wall-xz) diff --git a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc index b734588a0cc..b9de4f70b63 100644 --- a/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc +++ b/goal_src/jak3/levels/common/enemy/darkprec/dp-bipedal-shot.gc @@ -68,7 +68,7 @@ (vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere)) (vector-! (-> a1-3 move-dist) - (the-as vector (-> (the-as collide-shape s4-1) root-prim prim-core)) + (-> (the-as collide-shape s4-1) root-prim prim-core world-sphere) (-> a1-3 start-pos) ) (let ((v1-6 a1-3)) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc b/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc index c5eed276741..a0136a22201 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-enemy.gc @@ -112,7 +112,7 @@ (v1-22 (new 'stack-no-clear 'vector)) ) (let ((a1-12 (new 'stack-no-clear 'vector))) - (vector-! v1-22 a0-18 (the-as vector (-> self main-joint-movement))) + (vector-! v1-22 a0-18 (-> self main-joint-movement 0)) (let ((a2-9 v1-22)) (.lvf vf1 (&-> v1-22 quad)) (let ((f0-20 (-> self clock frames-per-second))) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc b/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc index e2157bc86f6..195db7a0ad6 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-formation.gc @@ -439,7 +439,7 @@ (s4-1 0) ) (let ((s2-0 (new 'stack-no-clear 'vector))) - (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (the-as vector (-> this offset)) 0.0)) + (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (-> this offset 0) 0.0)) (vector-copy! (-> s5-0 pos-table s4-1) s2-0) (+! s4-1 1) ) @@ -601,7 +601,7 @@ (set! (-> a0-2 y) 10240.0) (set! (-> a0-2 z) 24576.0) (set! (-> a0-2 w) 1.0) - (vector+! a1-2 (the-as vector v1-3) a0-2) + (vector+! a1-2 (-> v1-3 0) a0-2) ) (vector-copy! (-> gp-0 center) (-> gp-0 entity extra trans)) (quaternion-copy! (-> gp-0 focus-quat) *unity-quaternion*) diff --git a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc index 6b23fca95bf..75c68ea409b 100644 --- a/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc +++ b/goal_src/jak3/levels/common/enemy/hover/hover-nav-control.gc @@ -507,9 +507,7 @@ (vector-copy! (-> gp-0 curve-matrix uvec) arg2) (set! (-> gp-0 pos-index 0) arg3) (set! (-> gp-0 pos-index 1) arg4) - (set! (-> gp-0 dist) - (vector-vector-distance (the-as vector (-> gp-0 curve-matrix)) (-> gp-0 curve-matrix uvec)) - ) + (set! (-> gp-0 dist) (vector-vector-distance (-> gp-0 curve-matrix rvec) (-> gp-0 curve-matrix uvec))) (if (not (-> arg0 segment-list)) (set! (-> arg0 tail-segment) gp-0) ) @@ -1151,7 +1149,7 @@ (set! sv-48 (-> this nav network)) (cond ((< (vector-vector-distance arg0 arg1) 13107.2) - (nav-network-method-23 (-> this nav) s5-0 (the-as vector (hover-nav-control-method-17 this)) arg1 -1 -1) + (nav-network-method-23 (-> this nav) s5-0 (-> (hover-nav-control-method-17 this) world-sphere) arg1 -1 -1) (hover-nav-control-method-31 this) ) (else @@ -1249,7 +1247,7 @@ (nav-network-method-23 (-> this nav) s5-0 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> sv-48 (-> s5-0 segment-list pos-index 0) pos) -1 (-> s5-0 segment-list pos-index 0) @@ -1286,7 +1284,7 @@ (vector-copy! (-> v1-0 curve-matrix fvec) arg0) ) (else - (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (the-as vector (-> v1-0 curve-matrix))) + (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (-> v1-0 curve-matrix rvec)) (vector-float*! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix fvec) 0.5) ) ) @@ -1296,7 +1294,7 @@ (vector-! (-> v1-0 curve-matrix trans) (-> (the-as hover-nav-path-segment a2-6) curve-matrix uvec) - (the-as vector (-> v1-0 curve-matrix)) + (-> v1-0 curve-matrix rvec) ) (vector-float*! (-> v1-0 curve-matrix trans) (-> v1-0 curve-matrix trans) -0.5) ) @@ -1442,7 +1440,7 @@ (else (let ((f30-0 (path-control-method-29 s5-1 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> s3-0 current-index) (the-as float #f) ) @@ -1450,7 +1448,7 @@ ) (if (< (path-control-method-29 s5-1 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (+ (-> s3-0 current-index) 1) (the-as float #f) ) @@ -1474,11 +1472,13 @@ (t0-1 -1) (t1-0 -1) ) - (s1-2 s2-2 s0-0 (the-as vector sv-128) a3-4 t0-1 t1-0) + (s1-2 s2-2 s0-0 (-> sv-128 world-sphere) a3-4 t0-1 t1-0) ) ) (let ((s2-3 (new 'stack-no-clear 'vector))) - (if (and (< (path-control-method-29 s5-1 (the-as vector s4-0) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) 12288.0) + (if (and (< (path-control-method-29 s5-1 (-> s4-0 world-sphere) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) + 12288.0 + ) (< (vector-vector-distance s2-3 (get-point-at-percent-along-path! s5-1 (new 'stack-no-clear 'vector) 1.0 'interp) @@ -1503,7 +1503,7 @@ (+! s3-1 -1) ) ) - (nav-network-method-23 (-> this nav) (-> this path-info) (the-as vector s4-0) s2-4 -1 -1) + (nav-network-method-23 (-> this nav) (-> this path-info) (-> s4-0 world-sphere) s2-4 -1 -1) ) ) ) @@ -1511,7 +1511,7 @@ (hover-nav-control-method-31 this) ) (arg0 - (hover-nav-control-method-30 this (the-as vector (hover-nav-control-method-17 this)) arg0) + (hover-nav-control-method-30 this (-> (hover-nav-control-method-17 this) world-sphere) arg0) ) ) 0 @@ -1589,7 +1589,7 @@ (local-vars (sv-48 vector) (sv-128 float) (sv-144 float)) (let ((s5-0 (-> this root))) (let ((s4-0 (hover-nav-control-method-17 this))) - (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s4-0) (-> s5-0 trans)))) + (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 world-sphere) (-> s5-0 trans)))) (set! sv-48 (vector-! (new 'stack-no-clear 'vector) (-> this dest-pos) v1-2)) ) (when (not (logtest? (-> this flags) (hover-nav-flags hnf0))) @@ -1603,12 +1603,12 @@ (set! sv-144 (the-as float 0.0)) (let* ((t0-0 (hover-nav-control-method-33 this)) (f0-4 (s2-0 s1-0 s0-0 sv-128 sv-144 t0-0)) - (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (the-as vector s4-0) s3-0 (/ f0-4 f30-0))) + (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (-> s4-0 world-sphere) s3-0 (/ f0-4 f30-0))) (s4-1 (nav-network-method-27 (-> this nav) (new 'stack-no-clear 'vector) (-> this root process) - (the-as vector s4-0) + (-> s4-0 world-sphere) t0-2 (-> s4-0 world-sphere w) ) diff --git a/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc b/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc index db5b42aa448..1a79b7c008d 100644 --- a/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc +++ b/goal_src/jak3/levels/common/enemy/hover/robo-hover.gc @@ -1409,11 +1409,7 @@ (let ((s3-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (vector-normalize-copy! - (new 'stack-no-clear 'vector) - (the-as vector (-> this node-list data arg2 bone transform)) - 1.0 - ) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg2 bone transform rvec) 1.0) (* 273.06668 arg3) ) ) @@ -1773,7 +1769,7 @@ (set! (-> v1-23 param2) (the-as basic 1)) ) (quaternion-from-two-vectors! - (the-as quaternion (-> this wrist-quat)) + (-> this wrist-quat 0) (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 14 bone transform uvec) 1.0) (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 15 bone transform uvec) 1.0) ) diff --git a/goal_src/jak3/levels/common/enemy/mantis.gc b/goal_src/jak3/levels/common/enemy/mantis.gc index e24e85322c8..b43b4e0e6ca 100644 --- a/goal_src/jak3/levels/common/enemy/mantis.gc +++ b/goal_src/jak3/levels/common/enemy/mantis.gc @@ -1548,8 +1548,8 @@ (vector-reset! s5-1) (dotimes (s4-1 (-> *collide-cache* num-tris)) (let* ((v1-16 (-> *collide-cache* tris s4-1)) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) - (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (-> v1-16 vertex 0))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (-> v1-16 vertex 0))) (s3-0 (new 'stack-no-clear 'vector)) ) (vector-normalize! s2-1 1.0) diff --git a/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc b/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc index 6fd1be01b89..9d0c9e3f168 100644 --- a/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc +++ b/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc @@ -1391,7 +1391,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-3 y) 0.0) (vector-normalize! gp-3 12288.0) (vector+! gp-3 gp-3 (-> self root trans)) @@ -1406,7 +1406,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-5 y) 0.0) (vector-normalize! gp-5 4096.0) (vector+! gp-5 gp-5 (-> self root trans)) diff --git a/goal_src/jak3/levels/common/enemy/roboguard.gc b/goal_src/jak3/levels/common/enemy/roboguard.gc index b5e1ea3d429..01975d2e01f 100644 --- a/goal_src/jak3/levels/common/enemy/roboguard.gc +++ b/goal_src/jak3/levels/common/enemy/roboguard.gc @@ -957,7 +957,7 @@ (set! (-> s5-1 uvec y) 0.0) (vector-normalize! (-> s5-1 uvec) 1.0) (vector-normalize-copy! (-> s5-1 fvec) (-> s5-1 rvec) 1.0) - (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (the-as vector (-> self upper-rotation-matrix))) + (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (-> self upper-rotation-matrix rvec)) (set! (-> self arm-rot-mult arg1) (* (-> self arm-rot-mult arg1) (vector-dot (-> s5-1 uvec) (-> self upper-rotation-matrix fvec))) ) @@ -1601,8 +1601,8 @@ "Common implementation of post. Runs ja-post." (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) (vector-rotate-around-y! - (the-as vector (-> this upper-rotation-matrix)) - (the-as vector (-> this rotation-matrix)) + (-> this upper-rotation-matrix rvec) + (-> this rotation-matrix rvec) (-> this torso-angle) ) (vector-copy! (-> this upper-rotation-matrix uvec) (-> this rotation-matrix uvec)) @@ -1627,7 +1627,7 @@ (s5-1 (-> this rotation-matrix)) (f0-3 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-9)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-1 rvec)) 0.0) (set! f0-3 (* -1.0 f0-3)) ) (set! (-> this me-to-focus-angle) f0-3) @@ -1717,7 +1717,7 @@ (cspace<-parented-transformq-joint! arg0 arg1) (quaternion-vector-angle! (the-as quaternion s4-0) - (the-as vector (-> (the-as roboguard s3-0) upper-rotation-matrix)) + (-> (the-as roboguard s3-0) upper-rotation-matrix rvec) (* (-> (the-as roboguard s3-0) arm-rot (the-as int s2-0)) (-> (the-as roboguard s3-0) arm-rot-mult (the-as int s2-0)) ) diff --git a/goal_src/jak3/levels/common/enemy/spyder.gc b/goal_src/jak3/levels/common/enemy/spyder.gc index 600ace31b1a..686463871f9 100644 --- a/goal_src/jak3/levels/common/enemy/spyder.gc +++ b/goal_src/jak3/levels/common/enemy/spyder.gc @@ -742,7 +742,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 22528.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) diff --git a/goal_src/jak3/levels/common/hvehicle/squad-control.gc b/goal_src/jak3/levels/common/hvehicle/squad-control.gc index 987ec83976f..fd834d762ac 100644 --- a/goal_src/jak3/levels/common/hvehicle/squad-control.gc +++ b/goal_src/jak3/levels/common/hvehicle/squad-control.gc @@ -176,7 +176,7 @@ (logior! (-> s5-1 0 flags) (squad-target-flag updated)) (cond ((or (logtest? (-> s5-1 0 flags) (squad-target-flag force-visible)) - (probe-backgnd-collision this arg0 (the-as vector (-> s4-0 1))) + (probe-backgnd-collision this arg0 (-> s4-0 1 position)) ) (logior! (-> s5-1 0 flags) (squad-target-flag visible-now visible-recently visible-ever)) (set-time! (-> s5-1 0 last-seen-time)) diff --git a/goal_src/jak3/levels/common/hvehicle/turret-control.gc b/goal_src/jak3/levels/common/hvehicle/turret-control.gc index 634efbf26b9..3ac463d4a1b 100644 --- a/goal_src/jak3/levels/common/hvehicle/turret-control.gc +++ b/goal_src/jak3/levels/common/hvehicle/turret-control.gc @@ -480,7 +480,7 @@ (logior! (-> s4-0 params options) (projectile-options po16)) (matrix-copy! (-> s4-0 mat0) (-> arg0 node-list data (-> this info joint-index) bone transform)) (dotimes (s3-0 (-> this info barrel-count)) - (vector-matrix*! (-> s4-0 vec2) (the-as vector (-> this info barrel-array s3-0)) (-> s4-0 mat0)) + (vector-matrix*! (-> s4-0 vec2) (-> this info barrel-array s3-0 local-pos) (-> s4-0 mat0)) (vector-copy! (-> s4-0 vec3) (-> s4-0 mat0 fvec)) (set! (-> s4-0 params pos quad) (-> s4-0 vec2 quad)) (vector-float*! (-> s4-0 params vel) (-> s4-0 vec3) (-> this info shot-speed)) diff --git a/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc b/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc index 2ed808186a2..ccd595aa4bb 100644 --- a/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc +++ b/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc @@ -16,13 +16,9 @@ (defmethod draw ((this hud-vehicle-health)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (+ (the int (* -100.0 (-> this offset))) 5) - 366 - ) + (set-hud-piece-position! (-> this sprites 0) (+ (the int (* -100.0 (-> this offset))) 5) 366) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 6) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) diff --git a/goal_src/jak3/levels/common/race/race-hud.gc b/goal_src/jak3/levels/common/race/race-hud.gc index b1b8aa122fb..32a80807020 100644 --- a/goal_src/jak3/levels/common/race/race-hud.gc +++ b/goal_src/jak3/levels/common/race/race-hud.gc @@ -8,11 +8,7 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-race-timer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 266 - (the int (+ 50.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 266 (the int (+ 50.0 (* -100.0 (-> this offset))))) (let ((s5-0 (new 'stack-no-clear 'array 'time-frame 5))) (set! (-> s5-0 0) (the-as time-frame (min #x1b773f (-> *game-info* race-timer)))) (set! (-> s5-0 2) (the-as time-frame (/ (-> s5-0 0) #x4650))) @@ -27,7 +23,7 @@ (format (-> this strings 1 text) "~2,'0D:" (-> s5-0 3)) (format (-> this strings 2 text) "~2,'0D" (-> s5-0 4)) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 -22) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -40 -22) (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this strings 0 pos) 40 0) (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 33 0) ((method-of-type hud draw) this) @@ -69,16 +65,12 @@ ) (defmethod draw ((this hud-race-lap-counter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 504 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 504 (the int (+ 20.0 (* -100.0 (-> this offset))))) (set! (-> this strings 0 scale) 0.55) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 5) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -20 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -50 0) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -40 5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -20 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) -50 0) ((method-of-type hud draw) this) 0 (none) @@ -126,11 +118,7 @@ (defmethod draw ((this hud-race-position)) (local-vars (s4-0 int)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 20 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 20 (the int (+ 20.0 (* -100.0 (-> this offset))))) (let ((s5-0 (-> this values 0 current))) (dotimes (v1-2 16) (set! (-> this sprites v1-2 scale-x) 0.0) @@ -138,7 +126,7 @@ ) (set! (-> this sprites s5-0 scale-x) 0.8) (set! (-> this sprites s5-0 scale-y) 0.8) - (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) 0 0) + (set-as-offset-from! (-> this sprites s5-0) (-> this sprites 0 pos) 0 0) 0 (let ((v1-14 (-> *common-text* language-id))) (cond @@ -166,7 +154,7 @@ (when (!= s4-0 -1) (set-as-offset-from! (-> this sprites s4-0) - (the-as vector4w (-> this sprites s5-0)) + (-> this sprites s5-0 pos) (if (zero? s5-0) 28 52 diff --git a/goal_src/jak3/levels/common/race/race-mesh.gc b/goal_src/jak3/levels/common/race/race-mesh.gc index d793a6a9f73..52a9ef9f93c 100644 --- a/goal_src/jak3/levels/common/race/race-mesh.gc +++ b/goal_src/jak3/levels/common/race/race-mesh.gc @@ -171,7 +171,7 @@ (mem-copy! (the-as pointer (-> gp-0 2)) (the-as pointer (-> this samples v1-7)) 32) ) (let ((f30-0 (- arg2 (the float s1-0)))) - (vector-lerp! (-> arg0 pos) (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 1)) f30-0) + (vector-lerp! (-> arg0 pos) (-> gp-0 0 pos) (-> gp-0 1 pos) f30-0) (quaternion-slerp! (-> arg0 quat) (-> gp-0 0 quat) (-> gp-0 1 quat) f30-0) (set! (-> arg0 stick-x) (the int (+ 0.5 (* (the float (-> gp-0 1 stick-x)) f30-0) (* (the float (-> gp-0 0 stick-x)) (- 1.0 f30-0)))) @@ -186,11 +186,11 @@ ) ) (set! (-> arg0 flags) (-> gp-0 0 flags)) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 1)) (the-as vector (-> gp-0 0))) - (vector-float*! (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 4)) 15.0) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 2)) (the-as vector (-> gp-0 1))) - (vector-float*! (the-as vector (-> gp-0 3 quat)) (the-as vector (-> gp-0 4)) 15.0) - (vector-lerp! arg1 (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 3 quat)) f30-0) + (vector-! (-> gp-0 4 pos) (-> gp-0 1 pos) (-> gp-0 0 pos)) + (vector-float*! (-> gp-0 3 pos) (-> gp-0 4 pos) 15.0) + (vector-! (-> gp-0 4 pos) (-> gp-0 2 pos) (-> gp-0 1 pos)) + (vector-float*! (-> gp-0 3 quat vec) (-> gp-0 4 pos) 15.0) + (vector-lerp! arg1 (-> gp-0 3 pos) (-> gp-0 3 quat vec) f30-0) ) ) ) @@ -473,25 +473,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) - (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (vector-! v1-11 (-> arg1 slice-corners 2) (-> arg1 slice-corners 0)) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s4-0 (new 'stack-no-clear 'vector)) (s3-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s4-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 1) (-> arg1 slice-corners 0)) (vector-cross! s3-0 s4-0 v1-11) ) (else - (vector-! s4-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 3) (-> arg1 slice-corners 0)) (vector-cross! s3-0 v1-11 s4-0) ) ) (vector-normalize! s3-0 1.0) (set-vector! s4-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (the-as vector (-> arg1 slice-corners)) s3-0))) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (-> arg1 slice-corners 0) s3-0))) (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s4-0 f0-10) ) ) @@ -526,7 +526,7 @@ (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 112) (while (nonzero? s1-0) (+! s1-0 -1) - (let ((a1-7 (-> (&-> (-> s4-0 slice-table) 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) + (let ((a1-7 (-> (&-> s4-0 slice-table 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) (when (race-mesh-method-19 this (the-as int a1-7) s2-0) (if (or (= (-> arg0 slice-id) -1) (< (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg0 search-sphere)) @@ -576,25 +576,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) - (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (vector-! v1-11 (-> arg1 slice-corners 2) (-> arg1 slice-corners 0)) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s5-0 (new 'stack-no-clear 'vector)) (s4-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s5-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-! s5-0 (-> arg1 slice-corners 1) (-> arg1 slice-corners 0)) (vector-cross! s4-0 s5-0 v1-11) ) (else - (vector-! s5-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-! s5-0 (-> arg1 slice-corners 3) (-> arg1 slice-corners 0)) (vector-cross! s4-0 v1-11 s5-0) ) ) (vector-normalize! s4-0 1.0) (set-vector! s5-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (the-as vector (-> arg1 slice-corners)) s4-0))) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (-> arg1 slice-corners 0) s4-0))) (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s5-0 f0-10) ) ) @@ -635,7 +635,7 @@ (when (not (logtest? a2-4 a1-2)) (set! (-> arg0 cell-bits 0 data a0-1) (logior a2-4 a1-2)) (let* ((v1-5 (the-as object (+ (the-as uint (-> this hash cells)) (* v1-3 4)))) - (s3-0 (&-> (-> this hash slice-table) 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) + (s3-0 (&-> this hash slice-table 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) (s1-0 (-> (the-as race-mesh-hash-cell v1-5) slice-count)) ) (when (nonzero? s1-0) @@ -752,7 +752,7 @@ (defmethod race-mesh-method-14 ((this race-mesh) (arg0 race-mesh-slice-query)) (let* ((f30-0 (vector-line-distance-point! (-> arg0 pt-on-slice) - (the-as vector (-> arg0 slice-corners)) + (-> arg0 slice-corners 0) (-> arg0 slice-corners 1) (the-as vector #f) ) diff --git a/goal_src/jak3/levels/desert/boss/deswalk-obs.gc b/goal_src/jak3/levels/desert/boss/deswalk-obs.gc index 0aec6048ffb..ffddcdab64a 100644 --- a/goal_src/jak3/levels/desert/boss/deswalk-obs.gc +++ b/goal_src/jak3/levels/desert/boss/deswalk-obs.gc @@ -1068,7 +1068,7 @@ (gp-2 (new 'stack-no-clear 'vector)) (s5-3 (-> s5-2 ragdoll)) ) - (vector-! gp-2 (the-as vector (-> s4-0 prim-core)) v1-46) + (vector-! gp-2 (-> s4-0 prim-core world-sphere) v1-46) (set! (-> gp-2 y) 0.0) (vector-normalize! gp-2 (lerp-scale 4096.0 16384.0 f30-0 2.0 16.0)) (dotimes (v1-47 (the-as int (-> s5-3 num-joints))) @@ -1830,13 +1830,9 @@ (defmethod draw ((this hud-deswalk)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (let ((f30-0 (the float (-> this values 0 current)))) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 8 67) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 8 67) (set! (-> this sprites 4 scale-x) (* 0.164 f30-0)) (cond ((< 90.0 f30-0) @@ -1865,9 +1861,9 @@ ) ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 9 66) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 66) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 66) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 9 66) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -51 66) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 66) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/boss/terraformer-setup.gc b/goal_src/jak3/levels/desert/boss/terraformer-setup.gc index 22a8135f1cd..364029b20dd 100644 --- a/goal_src/jak3/levels/desert/boss/terraformer-setup.gc +++ b/goal_src/jak3/levels/desert/boss/terraformer-setup.gc @@ -794,7 +794,7 @@ ) ) (set-time! (-> self state-time)) - (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-3 y) 0.0) (vector-normalize! gp-3 12288.0) (vector+! gp-3 gp-3 (-> self root trans)) @@ -971,7 +971,7 @@ ) :trans (behavior () (ja :num! (loop!)) - (vector<-cspace! (-> self root trans) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self root trans) (-> self node-list data 0)) ) :code sleep-code :post (behavior () @@ -1159,7 +1159,7 @@ ) (set! (-> self sand-drop-part) (create-launch-control (-> *part-group-id-table* 436) self)) (set! (-> self water-drop-part) (create-launch-control (-> *part-group-id-table* 439) self)) - ((method-of-type cam-float-seeker init) (the-as cam-float-seeker (-> self foot-lock)) 0.0 0.005 0.04 0.9) + ((method-of-type cam-float-seeker init) (-> self foot-lock lock) 0.0 0.005 0.04 0.9) (set! (-> self foot-lock initialized) #f) (set! (-> self foot-marks) (new 'process 'terraformer-foot-mark-pt-array)) (cond @@ -1666,7 +1666,7 @@ (set! (-> a1-26 y) 327680.0) (set! (-> a1-26 z) 32768.0) (set! (-> a1-26 w) 1.0) - (vector-! (the-as vector a2-30) a0-30 a1-26) + (vector-! (-> a2-30 min) a0-30 a1-26) ) (let ((a1-27 (-> s5-4 bbox max)) (a0-31 (new 'stack-no-clear 'vector)) @@ -1712,7 +1712,7 @@ ) ) ) - ((method-of-type cam-float-seeker update!) (the-as cam-float-seeker (-> self foot-lock)) 0.0) + ((method-of-type cam-float-seeker update!) (-> self foot-lock lock) 0.0) (if (-> self foot-lock initialized) (vector-lerp! gp-0 @@ -2924,13 +2924,9 @@ (defmethod draw ((this hud-terraformer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 4 48) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 4 48) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/chase/desert-chase.gc b/goal_src/jak3/levels/desert/chase/desert-chase.gc index bb9795a38da..b2df80712e2 100644 --- a/goal_src/jak3/levels/desert/chase/desert-chase.gc +++ b/goal_src/jak3/levels/desert/chase/desert-chase.gc @@ -768,7 +768,7 @@ ;; og:preserve-this (set! (-> gp-0 target-handle) v1-5) ) - (set! (-> gp-0 target-pos quad) (-> arg1 quad)) + (vector-copy! (-> gp-0 target-pos) arg1) (set! (-> gp-0 ignore-handle) (process->handle this)) (let* ((v1-13 *game-info*) (a0-27 (+ (-> v1-13 attack-id) 1)) @@ -1125,13 +1125,9 @@ (defmethod draw ((this hud-desert-chase-marauders)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 482.0 (* 130.0 (-> this offset)))) - 25 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 482.0 (* 130.0 (-> this offset)))) 25) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 45) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/chase/desert-jump.gc b/goal_src/jak3/levels/desert/chase/desert-jump.gc index e5077ae430c..9c5589a52c4 100644 --- a/goal_src/jak3/levels/desert/chase/desert-jump.gc +++ b/goal_src/jak3/levels/desert/chase/desert-jump.gc @@ -380,9 +380,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 10) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 10) (let ((f30-1 (the float (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) @@ -438,13 +438,9 @@ (defmethod draw ((this hud-desert-catapult-count)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 482.0 (* 130.0 (-> this offset)))) - 25 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 482.0 (* 130.0 (-> this offset)))) 25) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 60) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 60) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/chase/marauder.gc b/goal_src/jak3/levels/desert/chase/marauder.gc index 7ae59532465..4588f5bdef9 100644 --- a/goal_src/jak3/levels/desert/chase/marauder.gc +++ b/goal_src/jak3/levels/desert/chase/marauder.gc @@ -8,13 +8,9 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-marauder)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 195 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 195) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -10 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -10 33) ((method-of-type hud draw) this) 0 (none) @@ -577,8 +573,8 @@ (-> arg3 param 1) (vector+! (-> this root trans) (-> this root trans) (the-as vector v1-1)) (vector+! - (the-as vector (-> this jump-info traj)) - (the-as vector (-> this jump-info traj)) + (-> this jump-info traj initial-position) + (-> this jump-info traj initial-position) (the-as vector v1-1) ) (vector+! (-> this jump-info start-pos) (-> this jump-info start-pos) (the-as vector v1-1)) diff --git a/goal_src/jak3/levels/desert/chase/wcar-catapult.gc b/goal_src/jak3/levels/desert/chase/wcar-catapult.gc index aaff744530a..ce305a78513 100644 --- a/goal_src/jak3/levels/desert/chase/wcar-catapult.gc +++ b/goal_src/jak3/levels/desert/chase/wcar-catapult.gc @@ -1836,7 +1836,7 @@ (let* ((s5-0 (-> this node-list data 3 bone transform)) (s4-0 (-> this node-list data 3 bone transform fvec)) (a1-4 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg1 point) (-> this root trans)) 1.0)) - (f0-1 (vector-dot (the-as vector s5-0) a1-4)) + (f0-1 (vector-dot (-> s5-0 rvec) a1-4)) (s5-1 (< 0.0 f0-1)) (s4-1 (< (vector-vector-angle-safe s4-0 a1-4) 5461.3335)) (a1-6 (new 'stack 'debris-tuning (the-as uint 1))) @@ -2100,7 +2100,7 @@ (set! (-> this draw lod-set lod 0 dist) 1105920.0) (set! (-> this rider-hand-joint-array 0) 3) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc b/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc index 4305cf42bdf..39cd74ad9ef 100644 --- a/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc +++ b/goal_src/jak3/levels/desert/chase/wcar-marauder-b.gc @@ -309,7 +309,7 @@ (set! (-> this draw lod-set lod 0 dist) 1105920.0) (set! (-> this rider-hand-joint-array 0) 3) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/des-bbush-tasks.gc b/goal_src/jak3/levels/desert/des-bbush-tasks.gc index 6b264c80c48..5cfba0c5658 100644 --- a/goal_src/jak3/levels/desert/des-bbush-tasks.gc +++ b/goal_src/jak3/levels/desert/des-bbush-tasks.gc @@ -39,7 +39,7 @@ (defmethod draw ((this hud-wasbbv-goal)) (local-vars (v1-7 int) (s5-0 int)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) @@ -97,8 +97,8 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) (set! (-> this strings 1 scale) 0.65) (case (-> *setting-control* user-default language) (((language-enum korean)) @@ -132,7 +132,7 @@ (defmethod draw ((this hud-wasbbv-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 70 ) @@ -168,8 +168,8 @@ (format (clear *temp-string*) (lookup-text! *common-text* (-> *wasbbv-hud-info* score-text) #f)) (s5-1 s4-1 s3-0 *temp-string*) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 40 -40) (let ((v1-9 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond @@ -219,7 +219,7 @@ (defmethod draw ((this hud-wasbbv-counter)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 95 ) @@ -247,7 +247,7 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (-> this sprites 0 pos) 32 -8) ) ((method-of-type hud draw) this) 0 diff --git a/goal_src/jak3/levels/desert/des-burning-bush.gc b/goal_src/jak3/levels/desert/des-burning-bush.gc index 656d73e3a99..514a60346bc 100644 --- a/goal_src/jak3/levels/desert/des-burning-bush.gc +++ b/goal_src/jak3/levels/desert/des-burning-bush.gc @@ -466,11 +466,7 @@ (.svf (&-> v1-10 quad) vf6) ) (vector-! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 vec1)) - (forward-down->inv-matrix - (the-as matrix (-> *camera* slave 0 tracking)) - (-> gp-0 vec3) - (-> *camera* local-down) - ) + (forward-down->inv-matrix (-> *camera* slave 0 tracking inv-mat) (-> gp-0 vec3) (-> *camera* local-down)) ) (matrix-copy! (-> gp-0 mat) (-> self node-list data 3 bone transform)) (matrix->trans (-> gp-0 mat) (-> gp-0 vec2)) @@ -873,7 +869,7 @@ (.mul.x.vf.xyz acc vf5 vf7) (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-23 quad) vf6) - (t9-3 (the-as matrix a0-7) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) + (t9-3 (-> a0-7 inv-mat) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) ) ) ) diff --git a/goal_src/jak3/levels/desert/des-bush.gc b/goal_src/jak3/levels/desert/des-bush.gc index 122512fcae2..4ca6195fcef 100644 --- a/goal_src/jak3/levels/desert/des-bush.gc +++ b/goal_src/jak3/levels/desert/des-bush.gc @@ -1042,7 +1042,7 @@ ) (vector-! a1-0 a1-0 (-> self root trans)) (let ((a0-12 (-> self root quat))) - (when (desert-chase-ring-cleared? (the-as vector a0-12) a1-0 self) + (when (desert-chase-ring-cleared? (-> a0-12 vec) a1-0 self) (if (-> self is-final?) (sound-play "ring-final") (sound-play "ring-pass") @@ -1297,10 +1297,10 @@ (defmethod draw ((this hud-spider-killed)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 65 125) + (set-hud-piece-position! (-> this sprites 0) 65 125) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/des-cactus.gc b/goal_src/jak3/levels/desert/des-cactus.gc index 96825f1adfd..781f9f7a608 100644 --- a/goal_src/jak3/levels/desert/des-cactus.gc +++ b/goal_src/jak3/levels/desert/des-cactus.gc @@ -75,9 +75,9 @@ (set! (-> s5-0 7 x) 2730.6667) (set! (-> s5-0 7 z) (sin (/ (-> s5-0 7 x) 2))) (set! (-> s5-0 7 y) (cos (/ (-> s5-0 7 x) 2))) - (vector-rotate90-around-y! (the-as vector (-> s5-0 6)) (-> this spring-pos)) - (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (* -1.0 (-> s5-0 7 z))) - (vector-rotate*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (the-as matrix (-> s5-0 2))) + (vector-rotate90-around-y! (-> s5-0 6 vec) (-> this spring-pos)) + (vector-float*! (-> s5-0 6 vec) (-> s5-0 6 vec) (* -1.0 (-> s5-0 7 z))) + (vector-rotate*! (-> s5-0 6 vec) (-> s5-0 6 vec) (the-as matrix (-> s5-0 2))) (set! (-> s5-0 0 x) (-> s5-0 6 x)) (set! (-> s5-0 0 y) (-> s5-0 6 y)) (set! (-> s5-0 0 z) (-> s5-0 6 z)) @@ -92,7 +92,7 @@ (set! (-> s5-0 0 w) (sqrtf (- f0-25 v1-16))) ) (quaternion-copy! (-> this jmods 0 rotation) (-> s5-0 0)) - (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) 1.0) + (vector-float*! (-> s5-0 6 vec) (-> s5-0 6 vec) 1.0) (set! (-> s5-0 0 x) (-> s5-0 6 x)) (set! (-> s5-0 0 y) (-> s5-0 6 y)) (set! (-> s5-0 0 z) (-> s5-0 6 z)) @@ -461,7 +461,7 @@ ) (set! (-> this exploder-anim) (the-as uint 8)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmods)) + (-> this jmods 0) this (the-as uint 4) (joint-mod-base-flags attached) @@ -570,7 +570,7 @@ ) (set! (-> this exploder-anim) (the-as uint 8)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmods)) + (-> this jmods 0) this (the-as uint 4) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/desert-mood.gc b/goal_src/jak3/levels/desert/desert-mood.gc index eb1fdbc0a8b..54e4f076c2a 100644 --- a/goal_src/jak3/levels/desert/desert-mood.gc +++ b/goal_src/jak3/levels/desert/desert-mood.gc @@ -38,7 +38,7 @@ (defun init-mood-desertg ((arg0 mood-context)) - (let ((v1-1 (&-> (-> arg0 state) 4))) + (let ((v1-1 (&-> arg0 state 4))) (set! (-> v1-1 0) (the-as uint 8192000.0)) (set! (-> v1-1 1) (the-as uint 221184.0)) (set! (-> v1-1 2) (the-as uint 8601600.0)) @@ -72,7 +72,7 @@ (when (and (= (-> *level* level arg2 status) 'active) (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) ) - (let ((v1-8 (&-> (-> arg0 state) 4))) + (let ((v1-8 (&-> arg0 state 4))) (set! (-> v1-8 0) (the-as uint 8192000.0)) (set! (-> v1-8 1) (the-as uint 221184.0)) (set! (-> v1-8 2) (the-as uint 8601600.0)) @@ -84,7 +84,7 @@ ) (set! (-> arg0 times 7 w) 1.0) (light-group-lerp! - (the-as light-group (-> arg0 light-group)) + (-> arg0 light-group 0) (the-as (pointer light-group) (-> arg0 light-group)) (-> arg0 light-group 2) f0-5 diff --git a/goal_src/jak3/levels/desert/desert-scenes.gc b/goal_src/jak3/levels/desert/desert-scenes.gc index ecae7821e57..32847b33f0a 100644 --- a/goal_src/jak3/levels/desert/desert-scenes.gc +++ b/goal_src/jak3/levels/desert/desert-scenes.gc @@ -872,7 +872,7 @@ ) (defun spt-func-part-desert-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-track-root arg0 arg1 (the-as vector arg2)) + (sparticle-track-root arg0 arg1 (-> arg2 launchrot)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) ) @@ -935,7 +935,7 @@ ) (defun spt-func-spt-func-part-desert-barrier-puffs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -1027,7 +1027,7 @@ ) (defun spt-func-spt-func-part-desert-barrier-sparks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) diff --git a/goal_src/jak3/levels/desert/hover/des-beast-2.gc b/goal_src/jak3/levels/desert/hover/des-beast-2.gc index f1bc9d3eb30..738dee2dd0c 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast-2.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast-2.gc @@ -522,12 +522,7 @@ (if (= s5-0 (-> self des-path node-count)) (go-virtual die) ) - (vector-lerp! - gp-0 - (the-as vector (-> self des-path node s4-0)) - (the-as vector (-> self des-path node s5-0)) - f30-0 - ) + (vector-lerp! gp-0 (-> self des-path node s4-0 position) (-> self des-path node s5-0 position) f30-0) ) (seek-toward-heading-vec! (-> self root) @@ -742,7 +737,7 @@ (let* ((a1-30 (-> sv-512 gp-8)) (a2-9 (-> sv-512 (+ gp-8 1))) (s5-8 (new 'stack-no-clear 'vector)) - (f0-47 (vector-segment-distance-point! sv-516 (the-as vector a1-30) (the-as vector a2-9) s5-8)) + (f0-47 (vector-segment-distance-point! sv-516 (-> a1-30 position) (-> a2-9 position) s5-8)) ) (when (or (= sv-504 -1) (< f0-47 sv-500)) (set! sv-500 f0-47) diff --git a/goal_src/jak3/levels/desert/hover/des-beast.gc b/goal_src/jak3/levels/desert/hover/des-beast.gc index ee728be9542..dfee768dc38 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast.gc @@ -1482,12 +1482,7 @@ (if (= v1-9 (-> self des-path node-count)) (set! v1-9 0) ) - (vector-lerp! - gp-0 - (the-as vector (-> self des-path node a1-0)) - (the-as vector (-> self des-path node v1-9)) - f0-8 - ) + (vector-lerp! gp-0 (-> self des-path node a1-0 position) (-> self des-path node v1-9 position) f0-8) ) (seek-toward-heading-vec! (-> self root) @@ -2163,8 +2158,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this des-path node s5-0)) - (the-as vector (-> this des-path node (+ s5-0 1))) + (-> this des-path node s5-0 position) + (-> this des-path node (+ s5-0 1) position) *color-red* #f (the-as rgba -1) diff --git a/goal_src/jak3/levels/desert/hover/desert-hover.gc b/goal_src/jak3/levels/desert/hover/desert-hover.gc index 03c7906e1c0..0ef11fc2736 100644 --- a/goal_src/jak3/levels/desert/hover/desert-hover.gc +++ b/goal_src/jak3/levels/desert/hover/desert-hover.gc @@ -13,13 +13,9 @@ (defmethod draw ((this hud-beast)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/hover/mh-flyer.gc b/goal_src/jak3/levels/desert/hover/mh-flyer.gc index 13b8f8fdbde..8e214608417 100644 --- a/goal_src/jak3/levels/desert/hover/mh-flyer.gc +++ b/goal_src/jak3/levels/desert/hover/mh-flyer.gc @@ -1000,7 +1000,7 @@ (vector-length-max! s5-0 655360.0) (vector-v++! s4-0 s5-0) ) - (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (-> self rotation-matrix rvec))) (f0-6 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-21) 245760.0 -245760.0)) ) (seek! (-> self pitch-angle) f0-6 (* 32768.0 (seconds-per-frame))) @@ -1009,17 +1009,10 @@ gp-0 (the-as quaternion *y-vector*) (-> self pitch-angle) - (the-as vector (-> self rotation-matrix)) + (-> self rotation-matrix rvec) ) (let* ((v1-25 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) - (f0-12 (lerp-scale - -15473.777 - 15473.777 - (vector-dot (the-as vector (-> self rotation-matrix)) v1-25) - 131072.0 - -131072.0 - ) - ) + (f0-12 (lerp-scale -15473.777 15473.777 (vector-dot (-> self rotation-matrix rvec) v1-25) 131072.0 -131072.0)) ) (seek! (-> self bank-angle) f0-12 (* 10922.667 (seconds-per-frame))) ) @@ -1174,7 +1167,7 @@ ) (let ((a1-10 (-> self des-path node (-> self path-pos)))) (vector-copy! (-> self move-dest) (-> a1-10 position)) - (if (< (vector-vector-distance (-> self root trans) (the-as vector a1-10)) 327680.0) + (if (< (vector-vector-distance (-> self root trans) (-> a1-10 position)) 327680.0) (+! (-> self path-pos) 1) ) ) diff --git a/goal_src/jak3/levels/desert/hover/scorpion-gun.gc b/goal_src/jak3/levels/desert/hover/scorpion-gun.gc index 8bf0ef7972f..2a2ec72bbad 100644 --- a/goal_src/jak3/levels/desert/hover/scorpion-gun.gc +++ b/goal_src/jak3/levels/desert/hover/scorpion-gun.gc @@ -532,7 +532,7 @@ (defmethod draw ((this hud-scorpion-gun)) (set! (-> this sprites 0 color w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set-hud-piece-position! (-> this sprites 0) 32 208) (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) (set! (-> this sprites 1 color w) 0) (set-hud-piece-position! (-> this sprites 1) 480 208) @@ -1042,9 +1042,9 @@ ) (when (logtest? (process-mask enemy projectile) (-> s1-0 mask)) (if #f - (add-debug-sphere #t (bucket-id debug) (the-as vector s0-0) (-> s0-0 world-sphere w) *color-red*) + (add-debug-sphere #t (bucket-id debug) (-> s0-0 world-sphere) (-> s0-0 world-sphere w) *color-red*) ) - (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (the-as vector s0-0) (-> gp-0 trans))) + (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (-> s0-0 world-sphere) (-> gp-0 trans))) (f28-0 (vector-length a1-7)) ) (when (< f28-0 1024000.0) @@ -1097,7 +1097,7 @@ ) (let ((s5-4 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as process-focusable s4-2) root root-prim prim-core)) + (-> (the-as process-focusable s4-2) root root-prim prim-core world-sphere) (-> gp-1 trans) ) ) @@ -1845,22 +1845,21 @@ (s3-0 (-> gp-0 path node (-> gp-0 prev-pos))) (s4-0 (new 'stack-no-clear 'inline-array 'vector 1)) ) - (let ((f30-1 (vector-segment-distance-point! (-> self trans) (the-as vector s3-0) (the-as vector s5-0) (-> s4-0 0))) - ) + (let ((f30-1 (vector-segment-distance-point! (-> self trans) (-> s3-0 position) (-> s5-0 position) (-> s4-0 0)))) (set! (-> gp-0 curr-pos) - (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (the-as vector s3-0) (-> s4-0 0)) - (vector-vector-distance (the-as vector s3-0) (the-as vector s5-0)) + (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (-> s3-0 position) (-> s4-0 0)) + (vector-vector-distance (-> s3-0 position) (-> s5-0 position)) ) ) ) (let ((s3-1 (new 'stack-no-clear 'inline-array 'vector 2))) - (vector-! (-> s3-1 1) (the-as vector s5-0) (-> s4-0 0)) + (vector-! (-> s3-1 1) (-> s5-0 position) (-> s4-0 0)) (vector+float*! (-> s3-1 0) (-> s4-0 0) (-> s3-1 1) (lerp-scale 0.0 1.0 f30-1 122880.0 20480.0)) (send-event (handle->process (-> self scorp)) 'ai-set-target-position (-> s3-1 0)) ) ) (send-event (handle->process (-> self scorp)) 'ai-set-target-speed #x48700000) - (when (< (vector-vector-distance (the-as vector s5-0) (-> s4-0 0)) 40960.0) + (when (< (vector-vector-distance (-> s5-0 position) (-> s4-0 0)) 40960.0) (+! (-> gp-0 prev-pos) 1) (+! (-> gp-0 next-pos) 1) (when (>= (-> gp-0 next-pos) (the-as int (-> gp-0 path node-count))) @@ -1882,8 +1881,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> self path-info path node gp-1)) - (the-as vector (-> self path-info path node (+ gp-1 1))) + (-> self path-info path node gp-1 position) + (-> self path-info path node (+ gp-1 1) position) *color-red* #f (the-as rgba -1) @@ -2004,7 +2003,7 @@ ) (let ((f30-0 0.0)) (dotimes (s4-0 (the-as int (-> gp-0 path node-count))) - (let ((f0-0 (vector-vector-distance (target-pos 0) (the-as vector (-> gp-0 path node s4-0))))) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> gp-0 path node s4-0 position)))) (when (or (= s5-0 -1) (< f0-0 f30-0)) (set! s5-0 s4-0) (set! f30-0 f0-0) @@ -2064,8 +2063,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 node s4-1)) - (the-as vector (-> s5-0 node (+ s4-1 1))) + (-> s5-0 node s4-1 position) + (-> s5-0 node (+ s4-1 1) position) *color-red* #f (the-as rgba -1) @@ -2079,7 +2078,7 @@ s2-1 (the-as bucket-id s1-1) *temp-string* - (the-as vector (-> s5-0 node s4-1)) + (-> s5-0 node s4-1 position) (font-color red) (the-as vector2h #f) ) @@ -2207,7 +2206,7 @@ (when v1-8 (let ((gp-0 (new 'stack-no-clear 'vector))) (if (send-event (handle->process v1-8) 'get-cam-info (-> self trans) gp-0) - (forward-up->inv-matrix (the-as matrix (-> self tracking)) gp-0 *y-vector*) + (forward-up->inv-matrix (-> self tracking inv-mat) gp-0 *y-vector*) ) ) ) diff --git a/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc b/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc index d2497e5e06d..6b592e44ada 100644 --- a/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc +++ b/goal_src/jak3/levels/desert/lizard/desert-lizard-task.gc @@ -125,13 +125,9 @@ ) (defmethod draw ((this hud-desert-lizards)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) 3) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 45) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc b/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc index 9956dc2702d..d3a94f38c4e 100644 --- a/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc +++ b/goal_src/jak3/levels/desert/oasis/ash-oasis-course.gc @@ -200,7 +200,7 @@ :skip-to -1 :on-set (lambda ((arg0 ashelin-oasis)) (bot-method-223 arg0) - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (let ((v1-6 25)) (set! (-> arg0 hit-points) (the float v1-6)) (set! (-> arg0 enemy-info default-hit-points) (the float v1-6)) @@ -236,9 +236,9 @@ (logior! (-> arg0 bot-flags) (bot-flag bf06)) (logior! (-> arg0 bot-flags) (bot-flag bf20)) (let ((s5-0 (-> arg0 course spots))) - (vector-! (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1))) + (vector-! (the-as vector (-> arg0 frontline)) (-> s5-0 2 center) (-> s5-0 1 center)) (vector-normalize! (-> arg0 frontline) 1.0) - (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 1))))) + (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (-> s5-0 1 center)))) ) (set-frontline arg0) (let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0))) diff --git a/goal_src/jak3/levels/desert/race/course-race.gc b/goal_src/jak3/levels/desert/race/course-race.gc index ea9cd1edfd4..147ac74aa11 100644 --- a/goal_src/jak3/levels/desert/race/course-race.gc +++ b/goal_src/jak3/levels/desert/race/course-race.gc @@ -695,7 +695,7 @@ (defmethod draw ((this hud-wasbbv-goal-time)) (local-vars (v1-7 int) (s5-0 int)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) @@ -731,8 +731,8 @@ (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) (s4-0 s3-0 s2-0 *temp-string*) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/desert/race/kleever-rider.gc b/goal_src/jak3/levels/desert/race/kleever-rider.gc index 2688c7334c0..dc268efede3 100644 --- a/goal_src/jak3/levels/desert/race/kleever-rider.gc +++ b/goal_src/jak3/levels/desert/race/kleever-rider.gc @@ -51,7 +51,7 @@ (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 y) (seconds-per-frame)) - (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 rvec))) (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) @@ -233,7 +233,7 @@ (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 y) (seconds-per-frame)) - (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 rvec))) (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) diff --git a/goal_src/jak3/levels/desert/rescue/neo-satellite.gc b/goal_src/jak3/levels/desert/rescue/neo-satellite.gc index e7a2ca36f35..b72dc005b03 100644 --- a/goal_src/jak3/levels/desert/rescue/neo-satellite.gc +++ b/goal_src/jak3/levels/desert/rescue/neo-satellite.gc @@ -2170,7 +2170,7 @@ (let ((s5-0 (the-as neo-sat (handle->process (-> this parent-handle))))) (the-as vector (when (not (and (-> s5-0 next-state) (= (-> s5-0 next-state name) 'neo-sat-sit-and-spin))) (dotimes (s4-0 (-> this knots length)) - (let* ((f0-0 (neo-sat-method-218 s5-0 (the-as vector (-> this knots data s4-0)))) + (let* ((f0-0 (neo-sat-method-218 s5-0 (-> this knots data s4-0 pos))) (f0-1 (+ 614.4 f0-0)) ) (set! (-> this knots data s4-0 pos y) (fmax (-> this knots data s4-0 pos y) f0-1)) @@ -2202,9 +2202,7 @@ (when (and (-> this next-state) (= (-> this next-state name) 'neo-sat-sit-and-spin)) (let ((f30-1 (- (-> a1-3 y) (neo-sat-method-218 this a1-3)))) (dotimes (s2-0 (-> gp-1 knots length)) - (set! (-> gp-1 knots data s2-0 pos y) - (+ f30-1 (neo-sat-method-218 this (the-as vector (-> gp-1 knots data s2-0)))) - ) + (set! (-> gp-1 knots data s2-0 pos y) (+ f30-1 (neo-sat-method-218 this (-> gp-1 knots data s2-0 pos)))) (set! (-> gp-1 knots data s2-0 prev-pos y) (-> gp-1 knots data s2-0 pos y)) ) ) @@ -2297,7 +2295,7 @@ 0.0 (let ((f0-2 0.0)) (dotimes (a2-3 (-> a0-15 knots length)) - (vector+float*! (the-as vector (-> a0-15 knots data a2-3)) a1-3 v1-5 (* (the float a2-3) f0-2)) + (vector+float*! (-> a0-15 knots data a2-3 pos) a1-3 v1-5 (* (the float a2-3) f0-2)) (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> a0-15 knots data 0 prev-pos)) (* a2-3 64)))) (-> a0-15 knots data a2-3 pos quad) ) @@ -2618,7 +2616,7 @@ (defun spt-func-part-neo-sat-shockwave-hot ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) - (sparticle-height-set arg0 arg1 (the-as vector arg2)) + (sparticle-height-set arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -3496,7 +3494,7 @@ (s3-0 (new 'stack-no-clear 'collide-query)) ) (vector-copy! (-> s3-0 start-pos) (-> v1-18 pos)) - (vector-! (-> s3-0 move-dist) (the-as vector a0-8) (the-as vector v1-18)) + (vector-! (-> s3-0 move-dist) (-> a0-8 pos) (-> v1-18 pos)) (let ((v1-19 s3-0)) (set! (-> v1-19 radius) 40.96) (set! (-> v1-19 collide-with) (collide-spec jak player-list)) diff --git a/goal_src/jak3/levels/desert/rescue/rope-prim-system.gc b/goal_src/jak3/levels/desert/rescue/rope-prim-system.gc index 5ff3b054c91..a25f54aca8f 100644 --- a/goal_src/jak3/levels/desert/rescue/rope-prim-system.gc +++ b/goal_src/jak3/levels/desert/rescue/rope-prim-system.gc @@ -64,11 +64,11 @@ (vector-copy! sv-112 (-> this knots data s5-0 pos)) (cond ((< s5-0 (+ (-> this knots length) -1)) - (vector-! sv-116 (the-as vector (-> this knots data (+ s5-0 1))) sv-112) - (set! sv-136 (vector-vector-distance sv-112 (the-as vector (-> this knots data (+ s5-0 1))))) + (vector-! sv-116 (-> this knots data (+ s5-0 1) pos) sv-112) + (set! sv-136 (vector-vector-distance sv-112 (-> this knots data (+ s5-0 1) pos))) ) (else - (vector-! sv-116 sv-112 (the-as vector (-> this knots data (+ s5-0 -1)))) + (vector-! sv-116 sv-112 (-> this knots data (+ s5-0 -1) pos)) ) ) (let ((f0-7 (/ f30-0 (-> this uv-repeat-dist)))) @@ -206,7 +206,7 @@ (call-parent-method this) (let ((v1-1 (handle->process (-> this proc)))) (vector<-cspace! - (the-as vector (-> this knots data)) + (-> this knots data 0 pos) (-> (the-as process-drawable v1-1) node-list data (-> this info joint-info-array 0 joint-index)) ) ) @@ -236,14 +236,14 @@ ) (s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as process-drawable s4-0) - node-list - data - (-> this info joint-info-array 0 joint-index) - bone - transform - ) - ) + (-> (the-as process-drawable s4-0) + node-list + data + (-> this info joint-info-array 0 joint-index) + bone + transform + rvec + ) 1.0 ) ) @@ -270,7 +270,7 @@ (a0-15 (-> this knots data s5-2)) (s2-1 (new 'stack-no-clear 'vector)) ) - (vector-! s2-1 (the-as vector a0-15) (the-as vector v1-18)) + (vector-! s2-1 (-> a0-15 pos) (-> v1-18 pos)) (vector-normalize! s2-1 1.0) (let ((s3-1 (-> this joint-mods data s5-2))) (let ((s1-0 matrix-u-f-compose) diff --git a/goal_src/jak3/levels/desert/rescue/rope-system.gc b/goal_src/jak3/levels/desert/rescue/rope-system.gc index 64457619f24..79ff4e66ed5 100644 --- a/goal_src/jak3/levels/desert/rescue/rope-system.gc +++ b/goal_src/jak3/levels/desert/rescue/rope-system.gc @@ -95,13 +95,13 @@ (let* ((s1-0 (-> this knot-constraints data s5-0)) (s4-0 (-> this knots data s5-0)) (s3-0 (-> this knots data (+ s5-0 1))) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-0) (the-as vector s4-0))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 pos) (-> s4-0 pos))) ) 0.0 (vector-normalize-ret-len! s2-1 1.0) (let ((f30-0 (-> this knot-constraints data s5-0 length))) - (vector-normalize! (the-as vector s1-0) 1.0) - (let ((f0-3 (vector-dot s2-1 (the-as vector s1-0)))) + (vector-normalize! (-> s1-0 dir) 1.0) + (let ((f0-3 (vector-dot s2-1 (-> s1-0 dir)))) (when (< f0-3 0.999) (let ((s0-0 (new 'stack-no-clear 'vector))) 0.0 @@ -123,7 +123,7 @@ ) ) ) - (vector-cross! s0-0 s2-1 (the-as vector s1-0)) + (vector-cross! s0-0 s2-1 (-> s1-0 dir)) (vector-normalize! s0-0 1.0) (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s0-0) ) @@ -131,7 +131,7 @@ (if (< s5-0 (+ (-> this knot-constraints length) -1)) (set! (-> this knot-constraints data (+ s5-0 1) dir quad) (-> s2-1 quad)) ) - (vector+float*! (the-as vector s3-0) (the-as vector s4-0) s2-1 f30-0) + (vector+float*! (-> s3-0 pos) (-> s4-0 pos) s2-1 f30-0) ) ) ) @@ -172,13 +172,13 @@ (let* ((s1-0 (-> this knot-constraints data s5-0)) (s3-0 (-> this knots data s5-0)) (s2-0 (-> this knots data (+ s5-0 1))) - (s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-0) (the-as vector s3-0))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 pos) (-> s3-0 pos))) ) 0.0 (vector-normalize-ret-len! s4-1 1.0) (let ((f30-0 (-> this knot-constraints data s5-0 length))) - (vector-normalize! (the-as vector s1-0) 1.0) - (let ((f0-3 (vector-dot s4-1 (the-as vector s1-0)))) + (vector-normalize! (-> s1-0 dir) 1.0) + (let ((f0-3 (vector-dot s4-1 (-> s1-0 dir)))) (when (< f0-3 0.999) (let ((s0-0 (new 'stack-no-clear 'vector))) 0.0 @@ -200,7 +200,7 @@ ) ) ) - (vector-cross! s0-0 s4-1 (the-as vector s1-0)) + (vector-cross! s0-0 s4-1 (-> s1-0 dir)) (vector-normalize! s0-0 1.0) (let* ((f0-7 (-> this knots data s5-0 mass)) (f2-3 (-> this knots data (+ s5-0 1) mass)) @@ -291,9 +291,9 @@ (a0-42 s3-0) (f0-11 f30-0) ) - (vector+float*! v1-49 (the-as vector a0-42) sv-240 f0-11) + (vector+float*! v1-49 (-> a0-42 pos) sv-240 f0-11) ) - (vector+float*! s1-1 (the-as vector s2-0) sv-256 f30-0) + (vector+float*! s1-1 (-> s2-0 pos) sv-256 f30-0) (let ((s0-3 add-debug-text-3d)) (set! sv-272 (the-as symbol #f)) (set! sv-288 583) @@ -328,14 +328,14 @@ (s0-4 sv-320 (the-as bucket-id sv-336) a2-11 a3-10 (the-as font-color t0-8) (the-as vector2h t1-6)) ) ) - (vector-lerp! (the-as vector s3-0) (the-as vector s3-0) s1-1 f28-0) + (vector-lerp! (-> s3-0 pos) (-> s3-0 pos) s1-1 f28-0) ) (let ((t9-25 vector-lerp!) (a0-51 s2-0) (a1-24 s2-0) (a3-12 f26-0) ) - (t9-25 (the-as vector a0-51) (the-as vector a1-24) sv-368 a3-12) + (t9-25 (-> a0-51 pos) (-> a1-24 pos) sv-368 a3-12) ) ) ) @@ -354,14 +354,7 @@ (t0-9 6) (t1-7 #f) ) - (s1-2 - s0-5 - (the-as bucket-id sv-384) - a2-14 - (the-as vector a3-13) - (the-as font-color t0-9) - (the-as vector2h t1-7) - ) + (s1-2 s0-5 (the-as bucket-id sv-384) a2-14 (-> a3-13 pos) (the-as font-color t0-9) (the-as vector2h t1-7)) ) ) (let ((s1-3 add-debug-text-3d) @@ -379,29 +372,22 @@ (t0-10 6) (t1-8 #f) ) - (s1-3 - s0-6 - (the-as bucket-id sv-416) - a2-15 - (the-as vector a3-14) - (the-as font-color t0-10) - (the-as vector2h t1-8) - ) + (s1-3 s0-6 (the-as bucket-id sv-416) a2-15 (-> a3-14 pos) (the-as font-color t0-10) (the-as vector2h t1-8)) ) ) - (vector-! s4-1 (the-as vector s2-0) (the-as vector s3-0)) + (vector-! s4-1 (-> s2-0 pos) (-> s3-0 pos)) (vector-normalize! s4-1 1.0) - (rope-system-method-16 this (the-as vector s3-0) (the-as vector s2-0) s5-0) + (rope-system-method-16 this (-> s3-0 pos) (-> s2-0 pos) s5-0) (when (< s5-0 (+ (-> this knot-constraints length) -1)) (cond ((logtest? (-> this flags) (rope-system-flag rs4)) (vector-lerp! - (the-as vector (-> this knot-constraints data (+ s5-0 1))) - (the-as vector (-> this knot-constraints data (+ s5-0 1))) + (-> this knot-constraints data (+ s5-0 1) dir) + (-> this knot-constraints data (+ s5-0 1) dir) s4-1 (* (-> this angular-mass-seek-rate) (seconds-per-frame)) ) - (vector-normalize! (the-as vector (-> this knot-constraints data (+ s5-0 1))) 1.0) + (vector-normalize! (-> this knot-constraints data (+ s5-0 1) dir) 1.0) ) (else (let ((v1-78 (-> this knot-constraints data (+ s5-0 1)))) @@ -424,11 +410,11 @@ (dotimes (s5-0 (+ (-> this knots length) -1)) (let* ((s4-0 (-> this knots data s5-0)) (s3-0 (-> this knots data (+ s5-0 1))) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-0) (the-as vector s4-0))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 pos) (-> s4-0 pos))) ) 0.0 (vector-normalize-ret-len! s2-1 1.0) - (vector+float*! (the-as vector s3-0) (the-as vector s4-0) s2-1 (-> this knot-constraints data s5-0 length)) + (vector+float*! (-> s3-0 pos) (-> s4-0 pos) s2-1 (-> this knot-constraints data s5-0 length)) ) ) #f @@ -467,7 +453,7 @@ (let ((a1-0 (-> this knots data s5-0)) (a2-0 (-> this knots data (+ s5-0 1))) ) - (rope-system-method-16 this (the-as vector a1-0) (the-as vector a2-0) s5-0) + (rope-system-method-16 this (-> a1-0 pos) (-> a2-0 pos) s5-0) ) ) #f @@ -522,11 +508,7 @@ (defmethod rope-system-method-23 ((this rope-system)) (dotimes (s5-0 (-> this knot-constraints length)) (let ((s4-0 (-> this knot-constraints data s5-0))) - (vector-! - (-> s4-0 dir) - (the-as vector (-> this knots data (+ s5-0 1))) - (the-as vector (-> this knots data s5-0)) - ) + (vector-! (-> s4-0 dir) (-> this knots data (+ s5-0 1) pos) (-> this knots data s5-0 pos)) (set! (-> s4-0 length) (vector-normalize-ret-len! (-> s4-0 dir) 1.0)) ) ) diff --git a/goal_src/jak3/levels/desert/rescue/wland-passenger.gc b/goal_src/jak3/levels/desert/rescue/wland-passenger.gc index 5e349662673..8a287c5ce55 100644 --- a/goal_src/jak3/levels/desert/rescue/wland-passenger.gc +++ b/goal_src/jak3/levels/desert/rescue/wland-passenger.gc @@ -896,7 +896,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) diff --git a/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc b/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc index afcf361c603..32aec47dd34 100644 --- a/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc +++ b/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc @@ -52,7 +52,7 @@ ) (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) (when (>= f30-0 0.0) - (vector+float*! (the-as vector (-> gp-0 vec)) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (vector+float*! (-> gp-0 vec 0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) (vector-copy! (-> gp-0 vec 1) (-> gp-0 cquery best-other-tri normal)) (when (< (-> gp-0 vec 1 y) (cos 3640.889)) (vector-reset! (-> gp-0 vec 1)) diff --git a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc index 2e17a4c0af7..03421816a3f 100644 --- a/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc +++ b/goal_src/jak3/levels/desert/wvehicle/was-squad-control.gc @@ -226,20 +226,20 @@ ) (set! (-> s5-1 1 rvec quad) (-> (the-as process-drawable s4-0) root trans quad)) (vector+float*! - (the-as vector (-> s5-1 1)) - (the-as vector (-> s5-1 1)) + (-> s5-1 1 rvec) + (-> s5-1 1 rvec) (-> s5-1 2 uvec) (* (cos (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) ) (vector+float*! - (the-as vector (-> s5-1 1)) - (the-as vector (-> s5-1 1)) + (-> s5-1 1 rvec) + (-> s5-1 1 rvec) (-> s5-1 2 fvec) (* (sin (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) ) - (when (nav-mesh-method-11 (-> this nav-mesh) (the-as vector (-> s5-1 1))) - (when (nav-mesh-method-12 (-> this nav-mesh) (the-as vector (-> s5-1 1)) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) - (when (or (= (vector-vector-distance-squared (the-as vector (-> s5-1 1)) (-> s5-1 1 uvec)) 0.0) + (when (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 rvec)) + (when (nav-mesh-method-12 (-> this nav-mesh) (-> s5-1 1 rvec) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) + (when (or (= (vector-vector-distance-squared (-> s5-1 1 rvec) (-> s5-1 1 uvec)) 0.0) (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 uvec)) ) (let ((s4-5 (new 'stack-no-clear 'cquery-with-5vec))) @@ -248,7 +248,7 @@ (vector-copy! (-> s4-5 cquery start-pos) (-> s4-5 vec 0)) (vector-reset! (-> s4-5 vec 1)) (set! (-> s4-5 vec 1 y) 1.0) - (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (the-as vector (-> s4-5 vec))) + (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (-> s4-5 vec 0)) (set! (-> s4-5 vec 2 y) 0.0) (vector-normalize! (-> s4-5 vec 2) 1.0) (set-vector! (-> s4-5 cquery move-dist) 0.0 -614400.0 0.0 1.0) @@ -264,11 +264,11 @@ ) (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-5 cquery)))) (when (>= f30-0 0.0) - (vector+float*! (the-as vector (-> s4-5 vec)) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) + (vector+float*! (-> s4-5 vec 0) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) (set! (-> s5-1 3 rvec quad) (-> s4-5 vec 0 quad)) (set! (-> s5-1 3 rvec w) 20480.0) (let ((f0-31 1024000.0)) - (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (the-as vector (-> s4-5 vec)))) + (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (-> s4-5 vec 0))) (not (sphere-in-view-frustum? (the-as sphere (-> s5-1 3)))) ) (vector-copy! (-> s4-5 vec 1) (-> s4-5 cquery best-other-tri normal)) @@ -277,7 +277,7 @@ (set! (-> s4-5 vec 1 y) 1.0) ) (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s4-5 vec 2) (-> s4-5 vec 1)) - (spawn-unit this (the-as vector (-> s4-5 vec)) (the-as quaternion (-> s5-1 2))) + (spawn-unit this (-> s4-5 vec 0) (the-as quaternion (-> s5-1 2))) ) ) ) @@ -334,9 +334,9 @@ ) (set! (-> s5-1 0 trans y) 0.0) (vector-normalize! (-> s5-1 0 trans) 1.0) - (vector-rotate-around-y! (the-as vector (-> s5-1 1)) (-> s5-1 0 trans) 14563.556) + (vector-rotate-around-y! (-> s5-1 1 rvec) (-> s5-1 0 trans) 14563.556) (vector-rotate-around-y! (-> s5-1 1 uvec) (-> s5-1 0 trans) -14563.556) - (set! (-> s5-1 1 rvec w) (- (vector-dot (the-as vector (-> s5-1 1)) (-> s5-1 0 uvec)))) + (set! (-> s5-1 1 rvec w) (- (vector-dot (-> s5-1 1 rvec) (-> s5-1 0 uvec)))) (set! (-> s5-1 1 uvec w) (- (vector-dot (-> s5-1 1 uvec) (-> s5-1 0 uvec)))) (dotimes (s4-1 10) (let* ((s2-0 (handle->process (-> this units s4-1))) @@ -352,9 +352,9 @@ (set! (-> s5-1 0 rvec quad) (-> (the-as process-focusable s3-0) root trans quad)) (when (not (logtest? (-> (the-as process-focusable s3-0) draw status) (draw-control-status on-screen))) (let ((f0-8 614400.0)) - (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (the-as vector (-> s5-1 0)))) - (or (< (vector4-dot (the-as vector (-> s5-1 1)) (the-as vector (-> s5-1 0))) 0.0) - (< (vector4-dot (-> s5-1 1 uvec) (the-as vector (-> s5-1 0))) 0.0) + (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (-> s5-1 0 rvec))) + (or (< (vector4-dot (-> s5-1 1 rvec) (-> s5-1 0 rvec)) 0.0) + (< (vector4-dot (-> s5-1 1 uvec) (-> s5-1 0 rvec)) 0.0) ) ) (zero? (-> this target-count)) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc index a234d535e56..01029ec59b0 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc @@ -71,7 +71,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -80,7 +80,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -89,7 +89,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc index c2af3e02a40..0ba35a1ccb2 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-marauder.gc @@ -436,7 +436,7 @@ (setup-draw-masks this (the-as int (-> this info setup look-select))) (+! (-> this info setup look-select) 1) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc index a27a25925cb..d6c124579e0 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc @@ -165,7 +165,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 17) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -174,7 +174,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -183,7 +183,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc index d6f314555a4..4d3019b9b52 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc @@ -213,7 +213,7 @@ (init (-> this jmod-gun-kick) this (the-as uint 10) (joint-mod-base-flags attached trans)) (vector-copy! (-> this turret-local-pos) (new 'static 'vector :y 10485.76 :z 12288.0 :w 1.0)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 4) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc index 368c86a6ed1..8d13dcb998e 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc @@ -164,7 +164,7 @@ ) ) (vector-copy! (-> gp-0 mat fvec) (-> gp-0 gun-local-dir)) - (vector-cross! (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) + (vector-cross! (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) (vector+float*! (-> gp-0 mat trans) (-> gp-0 gun-local-pos) (-> gp-0 gun-local-dir) -12288.0) (if (logtest? (-> *part-group-id-table* 227 flags) (sp-group-flag sp13)) (part-tracker-spawn @@ -284,7 +284,7 @@ (init (-> this jmod-gun-tilt) this (the-as uint 5) (joint-mod-base-flags attached trans quat)) (init (-> this jmod-gun-kick) this (the-as uint 6) (joint-mod-base-flags attached trans)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 7) (joint-mod-base-flags attached) @@ -294,7 +294,7 @@ (init (-> this jmod-axles 3) this (the-as uint 16) (joint-mod-base-flags attached)) (vector-copy! (-> this turret-local-pos) (new 'static 'vector :y 10485.76 :z -10240.0 :w 1.0)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 9) (joint-mod-base-flags attached) @@ -303,7 +303,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 12) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 20) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 10) (joint-mod-base-flags attached trans) @@ -312,7 +312,7 @@ (init (-> this jmod-shock-mids 2) this (the-as uint 13) (joint-mod-base-flags attached trans)) (init (-> this jmod-shock-mids 3) this (the-as uint 21) (joint-mod-base-flags attached trans)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-bots)) + (-> this jmod-shock-bots 0) this (the-as uint 11) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc index 7e29340a77a..bebca4a2a72 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc @@ -71,7 +71,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 17) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -80,7 +80,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -89,7 +89,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc index e98337d06cc..e7df19cdbc0 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc @@ -464,7 +464,7 @@ (set! (-> this rider-hand-joint-array 0) 14) (set! (-> this shoot-delay) (the-as uint 300)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -473,14 +473,14 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 10) (joint-mod-base-flags attached) ) (init (-> this jmod-shock-tops 1) this (the-as uint 12) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-bots)) + (-> this jmod-shock-bots 0) this (the-as uint 11) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc index f75f6221b6b..7da9b5be743 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc @@ -144,8 +144,8 @@ (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) (set! (-> s5-1 mat trans x) (seconds-per-frame)) (vector-matrix*! (-> s5-1 mat uvec) (new 'static 'vector :y 20480.0 :z -8192.0 :w 1.0) (-> this rbody matrix)) - (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (the-as vector (-> s5-1 mat))) - (vector-! (-> s5-1 mat fvec) (the-as vector (-> s5-1 mat)) (-> this ant-tip-vel)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (-> s5-1 mat rvec)) + (vector-! (-> s5-1 mat fvec) (-> s5-1 mat rvec) (-> this ant-tip-vel)) (vector-copy! (-> this ant-tip-vel) (-> s5-1 mat rvec)) (vector-float*! (-> s5-1 mat fvec) (-> s5-1 mat fvec) (/ 1.0 (-> s5-1 mat trans x))) (vector+float*! @@ -238,7 +238,7 @@ (alloc-rbody-control! this *v-turtle-constants*) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -247,7 +247,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-antenna)) + (-> this jmod-antenna 0) this (the-as uint 9) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc index 84a73964bfe..449a93e056f 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc @@ -71,7 +71,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -80,7 +80,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -89,7 +89,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar.gc b/goal_src/jak3/levels/desert/wvehicle/wcar.gc index 8e3789593f6..386c932bd4a 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar.gc @@ -3833,17 +3833,12 @@ (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) ) - (vector-matrix*! (the-as vector (-> s5-0 vec0)) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) + (vector-matrix*! (-> s5-0 vec0 0) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) 0 (vector-copy! (-> s5-0 vec0 2) (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0)) (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (- (-> s5-0 vec0 7 y) (-> s5-0 vec0 7 x))) - (vector+float*! - (-> s5-0 vec0 1) - (the-as vector (-> s5-0 vec0)) - (-> s5-0 vec0 3) - (+ 16384.0 (-> s5-0 vec0 7 x)) - ) + (vector+float*! (-> s5-0 vec0 1) (-> s5-0 vec0 0) (-> s5-0 vec0 3) (+ 16384.0 (-> s5-0 vec0 7 x))) (let ((s4-0 (new 'stack 'boxed-array collide-shape 128))) (set! (-> s4-0 length) (fill-actor-list-for-sphere *actor-hash* @@ -3869,7 +3864,7 @@ ) (when a0-14 (vector-copy! (-> s5-0 vec0 6) (get-trans a0-14 3)) - (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (the-as vector (-> s5-0 vec0))) + (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (-> s5-0 vec0 0)) (matrix-transpose! (-> s5-0 mat1) (-> s5-0 mat0)) (vector-matrix*! (-> s5-0 vec0 2) (-> s5-0 vec0 5) (-> s5-0 mat1)) (set! (-> s5-0 vec0 2 x) 0.0) @@ -4080,7 +4075,7 @@ (vector-copy! (-> s5-1 vec1 1) (-> s5-1 vec0 9)) (set! (-> s5-1 vec1 1 x) (* (-> s5-1 vec1 1 x) (-> s3-1 x-scale))) (set! (-> s5-1 vec1 0 x) (* (-> s5-1 vec1 0 x) (-> s3-1 x-scale))) - (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (the-as vector (-> s5-1 vec1))) + (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (-> s5-1 vec1 0)) (set! (-> s5-1 float2) (- (-> s5-1 vec0 8 data s4-1) (* (atan (-> s5-1 vec1 2 x) (-> s5-1 vec1 2 y)) (-> s3-1 x-scale))) ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc index b4a171ff6aa..1a9f38a7f9e 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc @@ -150,7 +150,7 @@ (set! (-> gp-0 ground-normal-sum y) 0.0) (set! (-> gp-0 ground-pos y) 0.0) (set! (-> gp-0 wsphere z) (nearest-dist2-between-moving-points - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 mat fvec) (-> gp-0 mat trans) @@ -164,7 +164,7 @@ (vector+float*! (-> gp-0 p-body) (-> gp-0 ground-normal-sum) (-> gp-0 ground-pos) 0.0) (vector-! (-> gp-0 world-normal) (-> gp-0 axis) (-> gp-0 p-body)) (vector-normalize! (-> gp-0 world-normal) 1.0) - (vector+float*! (-> gp-0 velocity) (the-as vector (-> gp-0 mat)) (-> gp-0 world-normal) 163840.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 mat rvec) (-> gp-0 world-normal) 163840.0) (set! (-> gp-0 wheel-axis x) (/ (-> gp-0 wheel-axis x) 2)) 0 ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc index 5511ef28d7b..a549db6760e 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc @@ -16,7 +16,7 @@ (defmethod draw ((this hud-vehicle-turbo)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (* -100.0 (-> this offset))) 336) + (set-hud-piece-position! (-> this sprites 0) (the int (* -100.0 (-> this offset))) 336) (let* ((f0-5 (the float (the int (-> *game-info* vehicle-turbo-ready)))) (f0-7 (* 120.0 (fmax 0.33 f0-5))) (v1-5 (-> *game-info* race-number-turbos)) @@ -36,10 +36,10 @@ ) ) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 32 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 32 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 32 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 32 0) (dotimes (s5-0 3) - (set-as-offset-from! (-> this sprites (+ s5-0 3)) (the-as vector4w (-> this sprites s5-0)) 0 0) + (set-as-offset-from! (-> this sprites (+ s5-0 3)) (-> this sprites s5-0 pos) 0 0) ) ((method-of-type hud draw) this) 0 diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc index 4e8017f53db..fe8e2e69272 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc @@ -426,12 +426,12 @@ (-> (the-as wvehicle-physics-work arg1) ground-pos) (-> sv-16 position) ) - (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (-> arg1 probe-work-array))) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (-> arg1 probe-work-array 0 local-pos)) (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) (set! (-> arg1 probe-work-array 0 world-normal z) (/ (/ (-> s1-2 side-vel) -2) - (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (-> arg1 probe-work-array)) (-> arg1 normal)))) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (-> arg1 probe-work-array 0 local-pos) (-> arg1 normal)))) ) ) (set! (-> arg1 probe-work-array 0 world-normal w) 0.0) @@ -469,7 +469,7 @@ ) (vector-float*! (-> arg1 force) - (the-as vector (-> arg1 probe-work-array)) + (-> arg1 probe-work-array 0 local-pos) (-> arg1 probe-work-array 0 world-normal z) ) (vector+float*! diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc index cda96d05db0..62b1b8fcd82 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc @@ -97,7 +97,7 @@ (set! (-> s3-0 velocity x) 819200.0) (quaternion-copy! (the-as quaternion (-> s3-0 force)) (-> s5-0 path-sample quat)) (vector-float*! (-> s3-0 mat fvec) (-> s5-0 lin-velocity) f28-0) - (vector-! (-> s3-0 mat trans) (the-as vector (-> s5-0 path-sample)) (-> s4-0 position)) + (vector-! (-> s3-0 mat trans) (-> s5-0 path-sample pos) (-> s4-0 position)) (.lvf vf1 (&-> (-> s3-0 mat trans) quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) @@ -126,8 +126,8 @@ (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) - (vector-! (the-as vector (-> s3-0 mat)) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) - (vector-float*! (the-as vector (-> s3-0 mat)) (the-as vector (-> s3-0 mat)) 16.0) + (vector-! (-> s3-0 mat rvec) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) + (vector-float*! (-> s3-0 mat rvec) (-> s3-0 mat rvec) 16.0) (let* ((v1-31 (-> s3-0 mat)) (f0-10 (-> s3-0 velocity x)) (f0-12 (* f0-10 f0-10)) @@ -140,7 +140,7 @@ (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-32 vf1) (if (< f0-12 v1-32) - (vector-normalize! (the-as vector (-> s3-0 mat)) (-> s3-0 velocity x)) + (vector-normalize! (-> s3-0 mat rvec) (-> s3-0 velocity x)) ) ) (let ((a1-10 (-> s4-0 lin-velocity))) @@ -314,7 +314,7 @@ (let ((f0-35 (+ (-> s4-0 path-t) (* 1.875 (/ 1.0 (-> gp-0 vec13 z)) (-> gp-0 vec13 y))))) (race-path-method-11 (-> s4-0 path) (-> gp-0 sample) (-> gp-0 vec12) f0-35) ) - (vector-! (-> gp-0 vec6) (the-as vector (-> s4-0 path-sample)) (-> gp-0 vec0)) + (vector-! (-> gp-0 vec6) (-> s4-0 path-sample pos) (-> gp-0 vec0)) (let* ((f0-36 (-> gp-0 float5)) (f1-24 1.0) (f2-8 40960.0) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc index 71113b51d8a..31b74c6a989 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc @@ -321,7 +321,7 @@ ) (defmethod wvehicle-method-171 ((this wvehicle) (arg0 vector) (arg1 int)) - (vector-matrix*! arg0 (the-as vector (-> this info rider attach-point-array arg1)) (-> this rbody matrix)) + (vector-matrix*! arg0 (-> this info rider attach-point-array arg1 local-pos) (-> this rbody matrix)) 0 (none) ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc index 5ab2b0bdea5..84c75833f60 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc @@ -352,15 +352,14 @@ ) (set! (-> this engine-rpm) (-> s4-0 mat uvec x)) (set! (-> s4-0 mat uvec w) (the-as float (current-time))) - (vector-! (the-as vector (-> s4-0 mat)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (vector-! (-> s4-0 mat rvec) (-> this rbody lin-velocity) (-> this surface-velocity)) (when (not (logtest? (-> this v-flags) (vehicle-flag in-air))) - (let ((f0-12 (* (/ (fmax 0.0 (vector-dot (the-as vector (-> s4-0 mat)) (-> this rbody matrix fvec))) - (-> this avg-drive-wheel-radius) - ) - (-> this gear-ratio) - (-> this final-drive-ratio) - ) - ) + (let ((f0-12 + (* (/ (fmax 0.0 (vector-dot (-> s4-0 mat rvec) (-> this rbody matrix fvec))) (-> this avg-drive-wheel-radius)) + (-> this gear-ratio) + (-> this final-drive-ratio) + ) + ) ) (set! (-> s4-0 mat uvec y) (* 9.549297 f0-12)) ) @@ -458,7 +457,7 @@ (s4-0 (new 'stack-no-clear 'matrix)) ) (set! (-> s4-0 rvec z) (-> this controls throttle)) - (set! (-> s4-0 uvec x) (vector-dot (the-as vector (-> this rbody matrix)) (-> this rbody ang-velocity))) + (set! (-> s4-0 uvec x) (vector-dot (-> this rbody matrix rvec) (-> this rbody ang-velocity))) (set! (-> s4-0 rvec w) (-> this rbody matrix fvec y)) (set! (-> s4-0 uvec y) (+ (-> s4-0 rvec w) (* -1.0 (-> s4-0 uvec x)))) (if (and (< (cos 12743.111) (-> s4-0 rvec w)) @@ -699,7 +698,7 @@ (s5-0 (new 'stack-no-clear 'inline-array 'matrix 2)) ) (set! (-> s5-0 0 trans z) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) - (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (the-as vector (-> this rbody matrix)))) + (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix rvec))) (set! (-> s5-0 0 trans y) (/ (* 2.0 (fabs (-> s5-0 0 trans w))) (fmax 409.6 (-> s5-0 0 trans z)))) (set! (-> s5-0 0 trans x) (/ (-> s4-0 handling tire-steering-speed-factor) @@ -870,11 +869,11 @@ ;; WARN: Return type mismatch symbol vs none. (defmethod alloc-rbody-control! ((this wvehicle) (arg0 rigid-body-object-constants)) (let ((s4-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) - (vector-y-quaternion! (the-as vector (-> s4-0 0)) (-> this root quat)) + (vector-y-quaternion! (-> s4-0 0 vec) (-> this root quat)) (vector+float*! (-> this root trans) (-> this root trans) - (the-as vector (-> s4-0 0)) + (-> s4-0 0 vec) (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) ) (quaternion-axis-angle! diff --git a/goal_src/jak3/levels/factory/car/hvehicle-effects.gc b/goal_src/jak3/levels/factory/car/hvehicle-effects.gc index 501efd28331..4768d885be8 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-effects.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-effects.gc @@ -28,7 +28,7 @@ (fmax 0.0 (* (-> this power-level) (-> this force-scale) (-> this engine-thrust))) ) (set! (-> s5-0 work vec0 w) (-> this fog-fade)) - (quaternion-rotate-local-z! (the-as quaternion (-> s5-0 work)) (-> this root quat) 5461.3335) + (quaternion-rotate-local-z! (-> s5-0 work quat0) (-> this root quat) 5461.3335) (dotimes (s4-0 2) (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) (vehicle-draw-thruster (-> this info particle-common) (the-as vehicle-draw-thruster-params (-> s5-0 work))) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-physics.gc b/goal_src/jak3/levels/factory/car/hvehicle-physics.gc index 4eb0413021e..6632ad0962a 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-physics.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-physics.gc @@ -378,7 +378,7 @@ (quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0))) (vector-copy! (-> gp-0 dir) (-> s1-1 2)) ) - (let ((f0-14 (vector-dot (the-as vector (-> gp-0 mat)) (-> gp-0 dir)))) + (let ((f0-14 (vector-dot (-> gp-0 mat rvec) (-> gp-0 dir)))) (set! sv-1040 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) (let ((f1-11 f0-14)) (set! sv-1044 (+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 mat fvec) (-> s5-0 ang-velocity))))) @@ -437,7 +437,7 @@ (set! f0-35 (* f0-35 (-> s4-0 handling air-steering-factor))) ) (vector+float*! (-> gp-0 world-pos) (-> s5-0 position) (-> gp-0 mat fvec) 7782.4) - (vector-float*! (-> gp-0 force) (the-as vector (-> gp-0 mat)) (* 2.0 f0-35)) + (vector-float*! (-> gp-0 force) (-> gp-0 mat rvec) (* 2.0 f0-35)) ) ) (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-util.gc b/goal_src/jak3/levels/factory/car/hvehicle-util.gc index bad879e43de..ab020b67b6d 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle-util.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle-util.gc @@ -53,7 +53,7 @@ (vector-reset! (-> gp-0 mat fvec)) (cond ((logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) - (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (-> gp-0 mat rvec)) (let ((f0-5 (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)))) (vector+float*! (-> gp-0 force) (-> this turn-enter-point) (-> this turn-enter-dir) (- f0-5)) (vector-copy! (-> gp-0 velocity) (-> this turn-enter-dir)) @@ -84,7 +84,7 @@ (if (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) ) - (vector-! (-> gp-0 world-pos) (the-as vector (-> gp-0 mat)) (-> this dest-circle)) + (vector-! (-> gp-0 world-pos) (-> gp-0 mat rvec) (-> this dest-circle)) (vector-normalize! (-> gp-0 world-pos) 1.0) (set! (-> gp-0 velocity x) (- (-> gp-0 world-pos z))) (set! (-> gp-0 velocity y) 0.0) @@ -95,7 +95,7 @@ (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> this dest-circle w)) (vector+! (-> gp-0 force) (-> this dest-circle) (-> gp-0 world-pos)) (when (logtest? (-> this flags) (vehicle-controller-flag attached)) - (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (-> gp-0 mat rvec)) (when (and (< (vector-dot (-> this turn-exit-dir) (-> gp-0 steering-axis)) 0.0) (>= (vector-dot (-> this turn-exit-dir) (-> gp-0 mat trans)) (cos 8192.0)) ) @@ -120,7 +120,7 @@ ) (countdown (s4-1 (fill-actor-list-for-sphere (-> this traffic object-hash) - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (* 1.5 f30-1) s3-1 @@ -137,7 +137,7 @@ (when (and v1-70 (not (logtest? (-> v1-70 v-flags) (vehicle-flag dead))) (nonzero? (-> v1-70 flight-level-index))) (vector-copy! (-> gp-0 lift-dir) (-> v1-70 root trans)) (vector-copy! (-> gp-0 normal) (-> v1-70 root transv)) - (vector-! (-> gp-0 tmp) (the-as vector (-> gp-0 mat)) (-> gp-0 lift-dir)) + (vector-! (-> gp-0 tmp) (-> gp-0 mat rvec) (-> gp-0 lift-dir)) (.lvf vf1 (&-> (-> gp-0 tmp) quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) @@ -173,7 +173,7 @@ ) (when (< (cos 8192.0) (- (vector-dot (-> gp-0 mat trans) (-> gp-0 axis)))) (when (< (nearest-dist2-between-moving-points - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 lift-dir) (-> gp-0 normal) @@ -195,7 +195,7 @@ ) ) (when (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) - (vector-! (-> gp-0 world-pos) (-> gp-0 force) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-pos) (-> gp-0 force) (-> gp-0 mat rvec)) (.lvf vf1 (&-> (-> gp-0 world-pos) quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) @@ -229,7 +229,7 @@ ) (cond ((logtest? (-> this flags) (vehicle-controller-flag direct-mode)) - (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (-> gp-0 mat rvec)) (vector-normalize! (-> gp-0 world-normal) (-> gp-0 dir x)) (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 3.0) @@ -240,11 +240,11 @@ ) ) (else - (vector+float*! (-> gp-0 local-pos) (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) 0.4) + (vector+float*! (-> gp-0 local-pos) (-> gp-0 mat rvec) (-> gp-0 mat uvec) 0.4) (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-enter-point)) (cond ((< (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)) 0.0) - (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (-> gp-0 mat rvec)) ) ((begin (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-exit-point)) diff --git a/goal_src/jak3/levels/factory/car/hvehicle.gc b/goal_src/jak3/levels/factory/car/hvehicle.gc index 3069486cabf..ff074602f95 100644 --- a/goal_src/jak3/levels/factory/car/hvehicle.gc +++ b/goal_src/jak3/levels/factory/car/hvehicle.gc @@ -860,9 +860,7 @@ ) (else (let ((f1-3 - (* 0.000024414063 - (vector-dot (the-as vector (-> this node-list data 0 bone transform)) (-> this target-acceleration)) - ) + (* 0.000024414063 (vector-dot (-> this node-list data 0 bone transform rvec) (-> this target-acceleration))) ) ) (+! (-> this controls steering) (* 0.1 (- f1-3 (-> this controls steering)))) @@ -1017,7 +1015,7 @@ (set! (-> s5-0 velocity x) (get-inv-mass arg0)) (init-rbody-impact-from-tshape! this (the-as rigid-body-impact (-> s5-0 mat)) arg1) (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) - (rigid-body-control-method-23 (-> this rbody) (the-as vector (-> s5-0 mat)) (-> s5-0 mat fvec)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 mat rvec) (-> s5-0 mat fvec)) (vector-copy! (-> s5-0 mat fvec) (-> this root transv)) ) (let ((v1-17 (-> arg0 root))) @@ -1067,7 +1065,7 @@ (impulse-handler this) (let ((a2-4 (new 'stack-no-clear 'vector))) (vector-float*! a2-4 (-> s5-0 mat uvec) (* -1.0 (-> s5-0 mat trans x))) - (apply-impact! (-> this rbody) (the-as vector (-> s5-0 mat)) a2-4) + (apply-impact! (-> this rbody) (-> s5-0 mat rvec) a2-4) ) (rigid-body-control-method-12 (-> this rbody) 1.0) (init-velocities! (-> this rbody)) @@ -1078,11 +1076,11 @@ (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-75 prim1 cprim prim-core world-sphere quad)) (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-75 prim2 cprim prim-core world-sphere quad)) ) - (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 mat)) *color-blue*) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 mat rvec) *color-blue*) (add-debug-vector #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 mat)) + (-> s5-0 mat rvec) (-> s5-0 mat uvec) (-> s5-0 mat trans x) *color-blue* diff --git a/goal_src/jak3/levels/factory/car/wcar-faccar.gc b/goal_src/jak3/levels/factory/car/wcar-faccar.gc index db96204eb39..82629b2a330 100644 --- a/goal_src/jak3/levels/factory/car/wcar-faccar.gc +++ b/goal_src/jak3/levels/factory/car/wcar-faccar.gc @@ -353,7 +353,7 @@ (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) ) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 14) (joint-mod-base-flags attached) diff --git a/goal_src/jak3/levels/factory/conveyor.gc b/goal_src/jak3/levels/factory/conveyor.gc index 0775b289554..a0ef9f17134 100644 --- a/goal_src/jak3/levels/factory/conveyor.gc +++ b/goal_src/jak3/levels/factory/conveyor.gc @@ -330,7 +330,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-19 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/goal_src/jak3/levels/factory/fac-gunturret.gc b/goal_src/jak3/levels/factory/fac-gunturret.gc index 52bac00ed95..7d616c08bd1 100644 --- a/goal_src/jak3/levels/factory/fac-gunturret.gc +++ b/goal_src/jak3/levels/factory/fac-gunturret.gc @@ -431,7 +431,7 @@ (vector-flatten! s4-0 s4-0 (-> this init-mat uvec)) (vector-normalize! s4-0 1.0) (set! (-> this desired-twist) - (atan (vector-dot (the-as vector (-> this init-mat)) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) + (atan (vector-dot (-> this init-mat rvec) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) ) (cond (#t diff --git a/goal_src/jak3/levels/factory/fac-robotank-turret.gc b/goal_src/jak3/levels/factory/fac-robotank-turret.gc index 96da73c689f..fb80e57ca09 100644 --- a/goal_src/jak3/levels/factory/fac-robotank-turret.gc +++ b/goal_src/jak3/levels/factory/fac-robotank-turret.gc @@ -410,7 +410,7 @@ (format 0 "Fix Los control update~%") ) (if *target* - (look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self) + (look-at! (-> *target* neck) (-> self root root-prim prim-core world-sphere) 'attacking self) ) (set! (-> self aim-pos 0 quad) (-> self aim-pos 1 quad)) (vector-copy! (-> self aim-pos 1) (get-trans gp-0 0)) @@ -418,7 +418,7 @@ (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0)))) ) (let ((v1-24 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0))))) - (vector-! s5-2 (-> self aim-pos 1) (the-as vector (-> self aim-pos))) + (vector-! s5-2 (-> self aim-pos 1) (-> self aim-pos 0)) (vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second))) (set! (-> s5-2 y) 0.0) (vector+! s5-2 (-> self aim-pos 1) s5-2) diff --git a/goal_src/jak3/levels/factory/fac-robotank.gc b/goal_src/jak3/levels/factory/fac-robotank.gc index f7a7fdeb35f..fa29bd3bb17 100644 --- a/goal_src/jak3/levels/factory/fac-robotank.gc +++ b/goal_src/jak3/levels/factory/fac-robotank.gc @@ -358,8 +358,8 @@ (quaternion-rotate-local-x! s4-2 s4-2 f30-4) ) ) - (vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-2) - (vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4) + (vector-orient-by-quat! (-> self pov-cam-offset 0) (-> self pov-cam-offset 1) s4-2) + (vector+! (-> self pov-cam-offset 0) (-> self pov-cam-offset 0) s3-4) ) ) ) diff --git a/goal_src/jak3/levels/factory/fac-tower.gc b/goal_src/jak3/levels/factory/fac-tower.gc index 56b4754fae5..f15f229a256 100644 --- a/goal_src/jak3/levels/factory/fac-tower.gc +++ b/goal_src/jak3/levels/factory/fac-tower.gc @@ -612,8 +612,8 @@ ) (set! (-> s3-0 quad) (-> s2-0 fvec quad)) (set! (-> s3-0 y) 0.0) - (vector-normalize! (the-as vector s3-0) 1.0) - (vector-rotate-around-axis! (the-as vector s3-0) s3-0 (-> this pitch) (-> s2-0 rvec)) + (vector-normalize! (-> s3-0 vec) 1.0) + (vector-rotate-around-axis! (-> s3-0 vec) s3-0 (-> this pitch) (-> s2-0 rvec)) (let ((a0-11 s4-0)) (let ((v1-11 s5-0)) (let ((a1-5 409600.0)) diff --git a/goal_src/jak3/levels/factory/factory-boss-setup.gc b/goal_src/jak3/levels/factory/factory-boss-setup.gc index fd1955d6397..f942816b3b0 100644 --- a/goal_src/jak3/levels/factory/factory-boss-setup.gc +++ b/goal_src/jak3/levels/factory/factory-boss-setup.gc @@ -1965,14 +1965,10 @@ (defmethod draw ((this hud-factory-boss)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 0 0) (let ((f30-0 (* 25.0 (the float (- 4 (-> this values 0 current)))))) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 8 67) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 8 67) (set! (-> this sprites 5 scale-x) (* 0.164 f30-0)) (cond ((< 50.0 f30-0) @@ -1995,9 +1991,9 @@ ) ) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 9 66) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -51 66) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 4 66) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 9 66) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) -51 66) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 4 66) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/factory/factory-hud.gc b/goal_src/jak3/levels/factory/factory-hud.gc index 10da456ef87..ef6d8a26fbe 100644 --- a/goal_src/jak3/levels/factory/factory-hud.gc +++ b/goal_src/jak3/levels/factory/factory-hud.gc @@ -8,13 +8,9 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-factory-damage)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -71 -5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -71 -5) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) diff --git a/goal_src/jak3/levels/factory/factory-manager.gc b/goal_src/jak3/levels/factory/factory-manager.gc index 599bd06d56f..f89a0f231a1 100644 --- a/goal_src/jak3/levels/factory/factory-manager.gc +++ b/goal_src/jak3/levels/factory/factory-manager.gc @@ -1833,13 +1833,13 @@ ((= *fac-wave* 2) (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-tower-01 factoryb-minimap))) (set! (-> this sprites 0 angle) 16384.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 455 225) + (set-hud-piece-position! (-> this sprites 0) 455 225) (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) ) (else (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) (set! (-> this sprites 0 angle) 0.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 488 225) + (set-hud-piece-position! (-> this sprites 0) 488 225) (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) ) ) diff --git a/goal_src/jak3/levels/factory/factory-part.gc b/goal_src/jak3/levels/factory/factory-part.gc index 7a9f6e9dc3a..e3303bea701 100644 --- a/goal_src/jak3/levels/factory/factory-part.gc +++ b/goal_src/jak3/levels/factory/factory-part.gc @@ -583,7 +583,7 @@ ) (defun spt-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (live-func-curve arg0 arg1 (the-as vector arg2)) + (live-func-curve arg0 arg1 (-> arg2 launchrot)) (spt-func-relative-pos arg0 arg1 (the-as sprite-vec-data-3d arg2)) (sparticle-torch-spline-align arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) diff --git a/goal_src/jak3/levels/factory/factoryc-obs2.gc b/goal_src/jak3/levels/factory/factoryc-obs2.gc index 17d69d06c73..22e85925a20 100644 --- a/goal_src/jak3/levels/factory/factoryc-obs2.gc +++ b/goal_src/jak3/levels/factory/factoryc-obs2.gc @@ -1273,10 +1273,7 @@ ) ) (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) - (let ((s4-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> self node-list data 3 bone transform))) - ) - ) + (let ((s4-1 (vector-negate! (new 'stack-no-clear 'vector) (-> self node-list data 3 bone transform rvec)))) (set! (-> s4-1 y) 0.0) (vector-xz-normalize! s4-1 1.0) (when (send-event diff --git a/goal_src/jak3/levels/factory/h-warf.gc b/goal_src/jak3/levels/factory/h-warf.gc index c45549baac0..3c3c3baf2fc 100644 --- a/goal_src/jak3/levels/factory/h-warf.gc +++ b/goal_src/jak3/levels/factory/h-warf.gc @@ -1017,7 +1017,6 @@ (.add.x.vf.w vf6 vf0 vf0) (.mul.x.vf.xyz acc vf5 vf7) (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) - (.add.x.vf.w vf6 vf0 vf0) (.svf (&-> a1-9 quad) vf6) ) (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) @@ -1260,10 +1259,10 @@ (when (and (< 0.0 (-> this rbody matrix uvec y)) (and (logtest? (-> this v-flags) (vehicle-flag riding)) (not (-> this bounce-state?))) ) - (vector-! (the-as vector (-> s2-2 mat)) (-> this root trans) *h-warf-center-of-level*) + (vector-! (-> s2-2 mat rvec) (-> this root trans) *h-warf-center-of-level*) (set! (-> s2-2 mat rvec y) 0.0) - (vector-normalize! (the-as vector (-> s2-2 mat)) 1.0) - (set! (-> s2-2 world-pos x) (h-warf-method-163 this (the-as vector (-> s2-2 mat)))) + (vector-normalize! (-> s2-2 mat rvec) 1.0) + (set! (-> s2-2 world-pos x) (h-warf-method-163 this (-> s2-2 mat rvec))) (set! (-> s2-2 world-normal x) (-> s2-2 world-pos x)) (vector-reset! s3-0) (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) @@ -1466,7 +1465,7 @@ (vector-normalize! s3-1 1.0) (vector-float*! s4-0 - (the-as vector (-> this rbody matrix)) + (-> this rbody matrix rvec) (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-3) ) ) diff --git a/goal_src/jak3/levels/factory/lfaccity-mood.gc b/goal_src/jak3/levels/factory/lfaccity-mood.gc index 5028ff96b99..881958c288a 100644 --- a/goal_src/jak3/levels/factory/lfaccity-mood.gc +++ b/goal_src/jak3/levels/factory/lfaccity-mood.gc @@ -174,7 +174,7 @@ (dotimes (s4-0 (-> this particles length)) (cond ((-> this particles data s4-0 inited?) - (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (the-as vector (-> this particles data s4-0)) s5-0)) + (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (-> this particles data s4-0 original-pos) s5-0)) (a1-4 (-> this actor-group 0 data s4-0 actor)) ) (when a1-4 diff --git a/goal_src/jak3/levels/factory/lfacrm1-mood.gc b/goal_src/jak3/levels/factory/lfacrm1-mood.gc index 4dae169bb41..7aeabd8305e 100644 --- a/goal_src/jak3/levels/factory/lfacrm1-mood.gc +++ b/goal_src/jak3/levels/factory/lfacrm1-mood.gc @@ -40,9 +40,9 @@ (set! (-> a1-0 0 dir2 extra x) 0.0) (set! (-> a1-0 0 ambi extra x) 0.3) (light-group-lerp! - (the-as light-group a1-0) + (-> a1-0 0) (the-as (pointer light-group) a1-0) - (the-as light-group a2-1) + (-> a2-1 0) (-> (the-as lfacrm1-states v1-0) door-current-interp) ) ) @@ -59,9 +59,9 @@ (else (let ((gp-0 (the-as object (-> arg0 state)))) (vector4-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) + (-> arg0 times 0) + (-> arg0 times 0) + (-> *level* level-default mood-context times 0) (-> (the-as lfacrm1-states gp-0) door-current-interp) ) (set! (-> arg0 times 1 w) 1.0) diff --git a/goal_src/jak3/levels/factory/missile-bot.gc b/goal_src/jak3/levels/factory/missile-bot.gc index 14c88f11278..5ea1893251b 100644 --- a/goal_src/jak3/levels/factory/missile-bot.gc +++ b/goal_src/jak3/levels/factory/missile-bot.gc @@ -851,7 +851,7 @@ (update! (-> this main-wobble) a1-4) ) ) - (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this main-wobble)) 1.0))) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this main-wobble value) 1.0))) (quaternion-from-two-vectors! (-> this main-jm quat) (new 'static 'vector :y 1.0) a2-5) ) (let ((t9-13 (method-of-type nav-enemy enemy-common-post))) @@ -903,10 +903,7 @@ ((zero? v1-85) (vector<-cspace! s5-1 (-> this node-list data 3)) (+! (-> s5-1 y) 8192.0) - (let ((v0-33 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble)) 819.2) - ) - ) + (let ((v0-33 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 0 value) 819.2))) (vector+! s5-1 s5-1 v0-33) ) (set! sv-304 s4-0) @@ -930,10 +927,7 @@ (vector-normalize! s5-1 4096.0) (vector+! s5-1 s5-1 s2-0) (+! (-> s5-1 y) 4096.0) - (let ((v0-36 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 1)) 819.2) - ) - ) + (let ((v0-36 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 1 value) 819.2))) (vector+! s5-1 s5-1 v0-36) ) (set! sv-304 s4-0) @@ -957,10 +951,7 @@ (vector-normalize! s5-1 4096.0) (vector+! s5-1 s5-1 s1-0) (+! (-> s5-1 y) 4096.0) - (let ((v0-39 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 2)) 819.2) - ) - ) + (let ((v0-39 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 2 value) 819.2))) (vector+! s5-1 s5-1 v0-39) ) (set! sv-304 s4-0) diff --git a/goal_src/jak3/levels/forest/for-turret.gc b/goal_src/jak3/levels/forest/for-turret.gc index c9bc1d12c53..0b978627e7a 100644 --- a/goal_src/jak3/levels/forest/for-turret.gc +++ b/goal_src/jak3/levels/forest/for-turret.gc @@ -90,9 +90,9 @@ (dotimes (v1-3 30) (set! (-> this sprites v1-3 color w) (the int (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp)))) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 44 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 44 44) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 44 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 44 44) (set! sv-80 (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp))) (let ((v1-8 (new 'stack-no-clear 'vector))) (set! (-> v1-8 x) 255.0) @@ -123,22 +123,22 @@ (set! (-> a0-23 color quad) (-> sv-92 quad)) ) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 13 6) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 25 10) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 34 19) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 39 32) - (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites)) 39 47) - (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites)) 34 59) - (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites)) 25 67) - (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites)) 13 71) - (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites)) -1 71) - (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites)) -14 67) - (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites)) -22 59) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites)) -27 47) - (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites)) -27 32) - (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites)) -22 19) - (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites)) -14 10) - (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites)) -1 6) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 13 6) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 25 10) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) 34 19) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 0 pos) 39 32) + (set-as-offset-from! (-> this sprites 8) (-> this sprites 0 pos) 39 47) + (set-as-offset-from! (-> this sprites 9) (-> this sprites 0 pos) 34 59) + (set-as-offset-from! (-> this sprites 10) (-> this sprites 0 pos) 25 67) + (set-as-offset-from! (-> this sprites 11) (-> this sprites 0 pos) 13 71) + (set-as-offset-from! (-> this sprites 12) (-> this sprites 0 pos) -1 71) + (set-as-offset-from! (-> this sprites 13) (-> this sprites 0 pos) -14 67) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) -22 59) + (set-as-offset-from! (-> this sprites 15) (-> this sprites 0 pos) -27 47) + (set-as-offset-from! (-> this sprites 16) (-> this sprites 0 pos) -27 32) + (set-as-offset-from! (-> this sprites 17) (-> this sprites 0 pos) -22 19) + (set-as-offset-from! (-> this sprites 18) (-> this sprites 0 pos) -14 10) + (set-as-offset-from! (-> this sprites 19) (-> this sprites 0 pos) -1 6) (let ((f0-27 (the float (-> this values 1 current)))) (cond ((>= f0-27 100.0) @@ -180,15 +180,15 @@ ) ) ) - (set-as-offset-from! (-> this sprites 20) (the-as vector4w (-> this sprites)) 0 45) - (set-as-offset-from! (-> this sprites 22) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 24) (the-as vector4w (-> this sprites)) 2 44) - (set-as-offset-from! (-> this sprites 26) (the-as vector4w (-> this sprites)) 2 45) - (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites)) 0 14) - (set-as-offset-from! (-> this sprites 23) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 25) (the-as vector4w (-> this sprites)) -30 44) - (set-as-offset-from! (-> this sprites 27) (the-as vector4w (-> this sprites)) -30 14) - (set-as-offset-from! (-> this sprites 29) (the-as vector4w (-> this sprites)) -26 18) + (set-as-offset-from! (-> this sprites 20) (-> this sprites 0 pos) 0 45) + (set-as-offset-from! (-> this sprites 22) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 24) (-> this sprites 0 pos) 2 44) + (set-as-offset-from! (-> this sprites 26) (-> this sprites 0 pos) 2 45) + (set-as-offset-from! (-> this sprites 21) (-> this sprites 0 pos) 0 14) + (set-as-offset-from! (-> this sprites 23) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 25) (-> this sprites 0 pos) -30 44) + (set-as-offset-from! (-> this sprites 27) (-> this sprites 0 pos) -30 14) + (set-as-offset-from! (-> this sprites 29) (-> this sprites 0 pos) -26 18) (set! (-> this sprites 29 color x) 32) (set! (-> this sprites 29 color y) 230) (set! (-> this sprites 29 color z) 32) @@ -294,7 +294,7 @@ ) (set! sv-384 (the int (* -70.0 (sin sv-240)))) (let ((a3-36 (+ (the int (* -70.0 (cos sv-240))) 44))) - (s2-6 s1-2 (the-as vector4w s0-2) sv-384 a3-36) + (s2-6 s1-2 (-> s0-2 0 pos) sv-384 a3-36) ) ) (set! (-> this sprites 28 angle) (+ -8192.0 sv-240)) @@ -329,7 +329,7 @@ ) (('set-hud-pos) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as int (-> arg3 param 0)) (the-as int (+ (-> arg3 param 1) -4)) ) @@ -889,7 +889,7 @@ (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) (let ((s5-4 (joint-node for-turret-lod0-jg elevatebarrel))) (vector-normalize! gp-5 1.0) - (vector-flatten! gp-5 gp-5 (the-as vector (-> s5-4 bone transform))) + (vector-flatten! gp-5 gp-5 (-> s5-4 bone transform rvec)) ) (set! (-> self dest-rotx) (- (vector-x-angle gp-5))) ) diff --git a/goal_src/jak3/levels/forest/forest-kill-plants.gc b/goal_src/jak3/levels/forest/forest-kill-plants.gc index 06201b15c94..5070790b1d4 100644 --- a/goal_src/jak3/levels/forest/forest-kill-plants.gc +++ b/goal_src/jak3/levels/forest/forest-kill-plants.gc @@ -30,9 +30,9 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 8 2) (let ((f30-1 (the float (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) @@ -45,7 +45,7 @@ ) (when (>= 10 (-> this values 0 current)) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites 3)) 20 62) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 3 pos) 20 62) ) ((method-of-type hud draw) this) 0 @@ -91,7 +91,7 @@ (defmethod draw ((this hud-green-eco-gauge)) (set-hud-piece-position! (-> this sprites 1) 256 (- 40 (the int (* 50.0 (-> this offset))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -55 -5) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -55 -5) (set! (-> this sprites 0 pos z) #xfffff1) (set! (-> this sprites 1 pos z) #xfffff2) (let ((f0-5 (if *target* diff --git a/goal_src/jak3/levels/forest/forest-part.gc b/goal_src/jak3/levels/forest/forest-part.gc index 3fb9ab57d09..c1e00518a59 100644 --- a/goal_src/jak3/levels/forest/forest-part.gc +++ b/goal_src/jak3/levels/forest/forest-part.gc @@ -970,7 +970,7 @@ ) (defun spt-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -2124,7 +2124,7 @@ ) (defun spt-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-for-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -2181,7 +2181,7 @@ ) (defun spt-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-for-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -2190,7 +2190,7 @@ (defun spt-func-for-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) diff --git a/goal_src/jak3/levels/forest/forest-ring-chase.gc b/goal_src/jak3/levels/forest/forest-ring-chase.gc index 3a1ff351edc..fcea4c56da7 100644 --- a/goal_src/jak3/levels/forest/forest-ring-chase.gc +++ b/goal_src/jak3/levels/forest/forest-ring-chase.gc @@ -1243,13 +1243,9 @@ (defmethod draw ((this hud-forest-ring-chase)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 150 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 150) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 55) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 5 55) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/forest/forest-tasks.gc b/goal_src/jak3/levels/forest/forest-tasks.gc index b4ae5b95704..3664bbb1153 100644 --- a/goal_src/jak3/levels/forest/forest-tasks.gc +++ b/goal_src/jak3/levels/forest/forest-tasks.gc @@ -8,15 +8,11 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-neo-spawners)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -3 47) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -3 47) (format (clear (-> this strings 1 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -5 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -5 45) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/forest/foresta-obs.gc b/goal_src/jak3/levels/forest/foresta-obs.gc index 46058ac954b..0b95be93f07 100644 --- a/goal_src/jak3/levels/forest/foresta-obs.gc +++ b/goal_src/jak3/levels/forest/foresta-obs.gc @@ -104,7 +104,7 @@ (-> arg1 quat) (quaternion-vector-angle! (the-as quaternion (new 'stack-no-clear 'vector)) - (the-as vector (-> (the-as for-log s4-0) shakers (the-as int s3-0))) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) axis) (-> (the-as for-log s4-0) shakers (the-as int s3-0) shake) ) ) diff --git a/goal_src/jak3/levels/forest/neo-spawner.gc b/goal_src/jak3/levels/forest/neo-spawner.gc index 6d2dd8bde5b..edb09ed146c 100644 --- a/goal_src/jak3/levels/forest/neo-spawner.gc +++ b/goal_src/jak3/levels/forest/neo-spawner.gc @@ -53,11 +53,11 @@ ) (('set-hud-pos) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as int (+ (-> arg3 param 0) -16)) (the-as int (-> arg3 param 1)) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 2 2) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 2 2) (set! (-> this sprites 0 pos z) (the-as int (-> arg3 param 2))) (set! v0-0 (+ (-> this sprites 0 pos z) 1)) (set! (-> this sprites 1 pos z) (the-as int v0-0)) diff --git a/goal_src/jak3/levels/glider/glider-hud.gc b/goal_src/jak3/levels/glider/glider-hud.gc index 133f62f1094..e8969682b6d 100644 --- a/goal_src/jak3/levels/glider/glider-hud.gc +++ b/goal_src/jak3/levels/glider/glider-hud.gc @@ -8,19 +8,10 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-glider-altitude)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) - (set-as-offset-from! - (-> this sprites 1) - (the-as vector4w (-> this sprites)) - (+ (the int (* 120.0 f0-4)) -60) - 0 - ) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) (+ (the int (* 120.0 f0-4)) -60) 0) ) (set! (-> this sprites 1 pos z) #xfffff1) ((method-of-type hud draw) this) diff --git a/goal_src/jak3/levels/glider/glider-ring.gc b/goal_src/jak3/levels/glider/glider-ring.gc index 8dd83d53f12..254bcdcd551 100644 --- a/goal_src/jak3/levels/glider/glider-ring.gc +++ b/goal_src/jak3/levels/glider/glider-ring.gc @@ -446,7 +446,7 @@ (set! (-> self blinky-gone?) #t) ) (when (and (-> self shootable) (not (or (-> self shot) (-> self blinky-gone?)))) - (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (the-as cspace (-> self node-list data))))) + (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 0)))) (set! (-> *part-id-table* 2555 init-specs 10 initial-valuef) (the float (-> self center-joint))) (spawn (-> self blinky-part) a1-10) ) diff --git a/goal_src/jak3/levels/glider/h-glider.gc b/goal_src/jak3/levels/glider/h-glider.gc index c5c41f5c0d8..a3b359fdabd 100644 --- a/goal_src/jak3/levels/glider/h-glider.gc +++ b/goal_src/jak3/levels/glider/h-glider.gc @@ -1127,7 +1127,7 @@ (vector-normalize! s3-1 1.0) (vector-float*! s4-0 - (the-as vector (-> this rbody matrix)) + (-> this rbody matrix rvec) (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-4) ) ) diff --git a/goal_src/jak3/levels/gungame/gun-dummy-part.gc b/goal_src/jak3/levels/gungame/gun-dummy-part.gc index d612c38f954..695c14c8d9a 100644 --- a/goal_src/jak3/levels/gungame/gun-dummy-part.gc +++ b/goal_src/jak3/levels/gungame/gun-dummy-part.gc @@ -744,7 +744,7 @@ (arg3 sparticle-launcher) (arg4 sparticle-launch-state) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 x-y-z-sx)) (check-drop-group-center arg0 arg1 (the-as sparticle-launchinfo arg2)) (spt-func-ground-spark-bounce arg0 arg1 arg2 arg3 arg4) (none) diff --git a/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc b/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc index 9c541b69c66..d1480e8e9e7 100644 --- a/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc +++ b/goal_src/jak3/levels/mhcity/destroy-dark-eco.gc @@ -21,13 +21,9 @@ (defmethod draw ((this hud-eco-egg)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/mine/gekko.gc b/goal_src/jak3/levels/mine/gekko.gc index f2fc330b6c7..979b0e3b036 100644 --- a/goal_src/jak3/levels/mine/gekko.gc +++ b/goal_src/jak3/levels/mine/gekko.gc @@ -2137,11 +2137,11 @@ (vector-reset! s2-1) (vector-reset! s1-1) (dotimes (s0-1 4) - (vector+! s2-1 s2-1 (the-as vector (-> gp-0 foot s0-1))) + (vector+! s2-1 s2-1 (-> gp-0 foot s0-1 ground-pos)) (when (> s0-1 0) (set! sv-1072 (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> gp-0 foot s0-1)) (the-as vector (-> gp-0 foot))) + (vector-! (new 'stack-no-clear 'vector) (-> gp-0 foot s0-1 ground-pos) (-> gp-0 foot 0 ground-pos)) 1.0 ) ) @@ -2928,8 +2928,8 @@ (s4-3 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) ) (dotimes (s3-1 4) - (vector-orient-by-quat! s5-3 (the-as vector (-> *gekko-foot-offset* s3-1)) (-> this root quat)) - (vector+float*! (the-as vector (-> this foot s3-1)) (-> this root trans) s5-3 (-> this scale)) + (vector-orient-by-quat! s5-3 (-> *gekko-foot-offset* s3-1 ground-pos) (-> this root quat)) + (vector+float*! (-> this foot s3-1 ground-pos) (-> this root trans) s5-3 (-> this scale)) (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this foot 0 ground-normal)) (* 96 s3-1)))) (-> s4-3 quad) ) diff --git a/goal_src/jak3/levels/mine/manta.gc b/goal_src/jak3/levels/mine/manta.gc index 34ebbc3709d..0c7e214ee8b 100644 --- a/goal_src/jak3/levels/mine/manta.gc +++ b/goal_src/jak3/levels/mine/manta.gc @@ -1198,11 +1198,11 @@ ) (defmethod manta-method-195 ((this manta)) - (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (the-as vector (-> this move-matrix))))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this move-matrix rvec)))) (set! (-> s5-1 y) (-> this attack-y-offset)) (vector-normalize! s5-1 (-> this move-force)) (vector-copy! (-> this move-matrix fvec) s5-1) - (vector+! (-> this move-matrix uvec) (the-as vector (-> this move-matrix)) s5-1) + (vector+! (-> this move-matrix uvec) (-> this move-matrix rvec) s5-1) ) (vector-! (-> this move-matrix trans) (-> this focus-pos) (-> this move-matrix uvec)) (vector-normalize! (-> this move-matrix trans) 24576.0) @@ -1403,7 +1403,7 @@ (when (logtest? (the-as collide-spec s4-0) (-> v1-27 root-prim prim-core collide-as)) (when (!= v1-27 (-> this root)) (let* ((s2-1 - (vector-! (new 'stack-no-clear 'vector) (the-as vector s5-0) (the-as vector (-> v1-27 root-prim prim-core))) + (vector-! (new 'stack-no-clear 'vector) (-> s5-0 world-sphere) (-> v1-27 root-prim prim-core world-sphere)) ) (f0-3 (vector-length s2-1)) ) @@ -1428,10 +1428,7 @@ (defmethod manta-method-201 ((this manta) (arg0 float)) (let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 2))) (set! (-> gp-0 0 rvec quad) (-> this move-vel quad)) - (vector-normalize! - (the-as vector (-> gp-0 0)) - (vector-vector-distance (-> this dest-pos) (-> this root trans)) - ) + (vector-normalize! (-> gp-0 0 rvec) (vector-vector-distance (-> this dest-pos) (-> this root trans))) (let ((v1-2 (-> gp-0 1))) (set! (-> v1-2 rvec x) 0.0) (set! (-> v1-2 rvec y) 0.0) @@ -1458,7 +1455,7 @@ ) (vector-float*! (-> gp-0 0 fvec) (-> gp-0 0 uvec) 4.0) (vector-float*! (-> gp-0 0 trans) (-> gp-0 0 uvec) 0.5) - (vector-orient-by-quat! (-> gp-0 1 fvec) (the-as vector (-> gp-0 1)) (-> this root quat)) + (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 rvec) (-> this root quat)) (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 fvec)) (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 uvec) (-> this root quat)) diff --git a/goal_src/jak3/levels/mine/mined-mood.gc b/goal_src/jak3/levels/mine/mined-mood.gc index 79332c18637..c7fe4e19783 100644 --- a/goal_src/jak3/levels/mine/mined-mood.gc +++ b/goal_src/jak3/levels/mine/mined-mood.gc @@ -50,9 +50,7 @@ (else (let ((s5-0 (the-as mined-states (-> arg0 state)))) (let ((s4-1 (-> *level* level arg2 bsp light-hash))) - (set! (-> s5-0 light 0) - (set-mined-filter-light! "light-3802" s4-1 (the-as vector (-> s5-0 filter)) (-> s5-0 light 0)) - ) + (set! (-> s5-0 light 0) (set-mined-filter-light! "light-3802" s4-1 (-> s5-0 filter 0) (-> s5-0 light 0))) (set! (-> s5-0 light 1) (set-mined-filter-light! "light-3803" s4-1 (-> s5-0 filter 1) (-> s5-0 light 1))) ) (set! (-> arg0 times 0 w) 1.0) diff --git a/goal_src/jak3/levels/mine/prebot-part.gc b/goal_src/jak3/levels/mine/prebot-part.gc index e84bcee9f0c..941c79d6660 100644 --- a/goal_src/jak3/levels/mine/prebot-part.gc +++ b/goal_src/jak3/levels/mine/prebot-part.gc @@ -67,7 +67,7 @@ (defun spt-func-pillar-rocks-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) @@ -550,7 +550,7 @@ ) (defun spt-func-part-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-pillar-rocks-bounce1 arg0 arg1 arg2) (none) ) @@ -610,7 +610,7 @@ ) (defun spt-func-part-prebot-eco-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-pillar-rocks-bounce2 arg0 arg1 arg2) (none) ) @@ -1599,6 +1599,6 @@ ) (defun spt-func-part-prebot-eco-pillar-shatter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) diff --git a/goal_src/jak3/levels/mine/prebot-states.gc b/goal_src/jak3/levels/mine/prebot-states.gc index ddd834db5b9..a6a458923bf 100644 --- a/goal_src/jak3/levels/mine/prebot-states.gc +++ b/goal_src/jak3/levels/mine/prebot-states.gc @@ -30,7 +30,7 @@ ) (else (set! (-> s4-1 neck-angle target) (fmin 1.0 (* 0.00012207031 (acos f30-0)))) - (if (< (vector-dot s3-1 (the-as vector (-> arg0 bone transform))) 0.0) + (if (< (vector-dot s3-1 (-> arg0 bone transform rvec)) 0.0) (set! (-> s4-1 neck-angle target) (- (-> s4-1 neck-angle target))) ) ) @@ -162,7 +162,7 @@ (update! (-> self light-pulse) (-> self light-pulse-flicker value)) ) (let ((a0-27 (new 'stack-no-clear 'vector))) - (vector+! a0-27 (-> self light-flash value) (the-as vector (-> self light-pulse))) + (vector+! a0-27 (-> self light-flash value) (-> self light-pulse value)) (set! (-> a0-27 x) (fmax 0.0 (-> a0-27 x))) (set! (-> a0-27 y) (fmax 0.0 (-> a0-27 y))) (set! (-> a0-27 z) (fmax 0.0 (-> a0-27 z))) @@ -1416,7 +1416,7 @@ ) ) (else - (let ((f0-14 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-14 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-0 1024.0) ) (if (< f0-14 (* f1-0 f1-0)) @@ -1592,7 +1592,7 @@ (dotimes (gp-12 2) (send-event (handle->process (-> self swords gp-12)) 'scale #x3ff33333) ) - (let ((f0-46 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-46 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-15 1024.0) ) (when (< f0-46 (* f1-15 f1-15)) @@ -2059,7 +2059,7 @@ ) (ja :num! (seek!)) (when (ja-done? 0) - (let ((f0-18 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-18 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-0 1024.0) ) (cond @@ -2117,7 +2117,7 @@ (= v1-174 prebot-swords-vertical-hold-ja) ) ) - (let ((f0-25 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-25 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-3 1024.0) ) (< f0-25 (* f1-3 f1-3)) @@ -2404,12 +2404,8 @@ ) (defmethod draw ((this hud-prebot)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 150 - ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) -9 70) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 150) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) -9 70) (case (-> this values 0 current) ((1) (set! (-> this sprites 4 scale-x) 6.0) @@ -2433,9 +2429,9 @@ 0 ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -8 68) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 68) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -12 68) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) -8 68) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -51 68) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -12 68) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/mine/rat.gc b/goal_src/jak3/levels/mine/rat.gc index bfaf7484a2b..d15bea3dd4c 100644 --- a/goal_src/jak3/levels/mine/rat.gc +++ b/goal_src/jak3/levels/mine/rat.gc @@ -1330,7 +1330,7 @@ (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) (let ((gp-0 (-> (the-as ragdoll-proc (-> self ragdoll-proc process 0)) ragdoll))) (enable-ragdoll! gp-0 self) - (quaternion-copy! (-> self root quat) (the-as quaternion (-> gp-0 ragdoll-joints))) + (quaternion-copy! (-> self root quat) (-> gp-0 ragdoll-joints 0 quat)) ) (let ((a1-6 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-6 from) (process->ppointer self)) @@ -1585,7 +1585,7 @@ (vector+! (-> arg0 bone transform trans) (-> arg0 bone transform trans) - (the-as vector (-> (the-as rat gp-0) roll-transform)) + (-> (the-as rat gp-0) roll-transform trans) ) ) (none) diff --git a/goal_src/jak3/levels/nest/egg-spider.gc b/goal_src/jak3/levels/nest/egg-spider.gc index 4a48e275420..80a16704041 100644 --- a/goal_src/jak3/levels/nest/egg-spider.gc +++ b/goal_src/jak3/levels/nest/egg-spider.gc @@ -146,8 +146,8 @@ ) (defun spt-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -206,8 +206,8 @@ ) (defun spt-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -263,8 +263,8 @@ ) (defun spt-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -321,8 +321,8 @@ ) (defun spt-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -1594,7 +1594,7 @@ (let ((a1-2 (new 'stack-no-clear 'nav-poly))) (set! (-> a1-2 vertex1 x) 122880.0) (set! (-> a1-2 data 20) (the-as uint 2)) - (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (vector-! (-> a1-2 vertex 0) s3-0 (the-as vector (-> s4-0 bounds))) (vector-copy! s3-0 (-> a1-2 vertex 0)) (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) (when a1-3 diff --git a/goal_src/jak3/levels/nest/mh-bat.gc b/goal_src/jak3/levels/nest/mh-bat.gc index a8995f054e3..db62eb4101b 100644 --- a/goal_src/jak3/levels/nest/mh-bat.gc +++ b/goal_src/jak3/levels/nest/mh-bat.gc @@ -1061,7 +1061,7 @@ (let ((s5-0 (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) (s4-0 (vector-flatten! (new 'stack-no-clear 'vector) (-> self root transv) (-> self rotation-matrix fvec))) ) - (vector-flatten! s5-0 s5-0 (the-as vector (-> self rotation-matrix))) + (vector-flatten! s5-0 s5-0 (-> self rotation-matrix rvec)) (set! (-> s5-0 y) (fmax 0.0 (-> s5-0 y))) (seek! (-> self flap-interp) @@ -1114,7 +1114,7 @@ (vector-length-max! s5-0 327680.0) (vector-v++! s4-0 s5-0) ) - (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (-> self rotation-matrix rvec))) (f0-3 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-13) 245760.0 -245760.0)) ) (seek! (-> self pitch-angle) f0-3 (* 32768.0 (seconds-per-frame))) @@ -1123,17 +1123,10 @@ gp-0 (the-as quaternion *y-vector*) (-> self pitch-angle) - (the-as vector (-> self rotation-matrix)) + (-> self rotation-matrix rvec) ) (let* ((v1-17 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) - (f0-9 (lerp-scale - -15473.777 - 15473.777 - (vector-dot (the-as vector (-> self rotation-matrix)) v1-17) - 163840.0 - -163840.0 - ) - ) + (f0-9 (lerp-scale -15473.777 15473.777 (vector-dot (-> self rotation-matrix rvec) v1-17) 163840.0 -163840.0)) ) (seek! (-> self bank-angle) f0-9 (* 10922.667 (seconds-per-frame))) ) @@ -1531,14 +1524,14 @@ (.svf (&-> a0-2 quad) vf1) ) (let ((s3-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> s3-0 vertex)) v1-1 (the-as vector (-> s5-0 bounds))) + (vector-! (-> s3-0 vertex 0) v1-1 (the-as vector (-> s5-0 bounds))) (set! (-> s3-0 vertex1 x) 40960000.0) (set! (-> s3-0 data 20) (the-as uint 3)) (let ((a2-0 (nav-mesh-method-45 s5-0 s3-0))) (when a2-0 (clamp-vector-to-mesh-cross-gaps s5-0 - (the-as vector (-> s3-0 vertex)) + (-> s3-0 vertex 0) a2-0 s4-0 2048.0 diff --git a/goal_src/jak3/levels/nest/mh-centipede-part.gc b/goal_src/jak3/levels/nest/mh-centipede-part.gc index a3506154843..e1ec26b7e45 100644 --- a/goal_src/jak3/levels/nest/mh-centipede-part.gc +++ b/goal_src/jak3/levels/nest/mh-centipede-part.gc @@ -179,7 +179,7 @@ ) (defun spt-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -306,7 +306,7 @@ ) (defun spt-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -363,7 +363,7 @@ ) (defun spt-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -372,7 +372,7 @@ (defun spt-func-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) @@ -640,7 +640,7 @@ ) (defun spt-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -696,7 +696,7 @@ ) (defun spt-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) diff --git a/goal_src/jak3/levels/nest/mh-centipede.gc b/goal_src/jak3/levels/nest/mh-centipede.gc index b30103b53c3..cbb20179a73 100644 --- a/goal_src/jak3/levels/nest/mh-centipede.gc +++ b/goal_src/jak3/levels/nest/mh-centipede.gc @@ -1768,7 +1768,7 @@ ) (when s3-0 (get-intersect-point s5-1 s2-0 (-> self root) s4-0) - (vector-! s5-1 s5-1 (the-as vector (-> s3-0 prim-core))) + (vector-! s5-1 s5-1 (-> s3-0 prim-core world-sphere)) (set! (-> s5-1 y) 0.0) (.lvf vf1 (&-> s5-1 quad)) (.add.w.vf.x vf2 vf0 vf0) @@ -2791,7 +2791,7 @@ (set! (-> gp-0 y) (fmax (-> gp-0 y) (+ 16384.0 (-> self landing-position y)))) (vector-! gp-0 gp-0 (-> s5-0 0 trans)) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> s5-0 0 tracking)) gp-0 (new 'static 'vector :y -1.0)) + (forward-down->inv-matrix (-> s5-0 0 tracking inv-mat) gp-0 (new 'static 'vector :y -1.0)) ) ) ) @@ -3086,12 +3086,8 @@ ) (defmethod draw ((this hud-mh-centipede)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 452.0 (* 130.0 (-> this offset)))) - 130 - ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 0 37) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 452.0 (* 130.0 (-> this offset)))) 130) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 0 37) (set! (-> this sprites 4 scale-x) (* 0.164 (the float (-> this values 1 current)))) (cond ((< 75 (-> this values 1 current)) @@ -3127,11 +3123,11 @@ 0 ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 1 36) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -59 36) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 36) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 1 36) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -59 36) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -4 36) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 15) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 5 15) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/palace/roof/palroof-part.gc b/goal_src/jak3/levels/palace/roof/palroof-part.gc index 0d9497e9654..aa9390615c6 100644 --- a/goal_src/jak3/levels/palace/roof/palroof-part.gc +++ b/goal_src/jak3/levels/palace/roof/palroof-part.gc @@ -186,7 +186,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4061) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) diff --git a/goal_src/jak3/levels/precursor/precura-obs2.gc b/goal_src/jak3/levels/precursor/precura-obs2.gc index a44e90ee91e..495eca6628f 100644 --- a/goal_src/jak3/levels/precursor/precura-obs2.gc +++ b/goal_src/jak3/levels/precursor/precura-obs2.gc @@ -345,7 +345,7 @@ (a0-26 s1-0) (a1-6 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-6 vertex)) (the-as vector a0-26) (the-as vector (-> v1-28 state mesh bounds))) + (vector-! (-> a1-6 vertex 0) (-> a0-26 world-sphere) (the-as vector (-> v1-28 state mesh bounds))) (set! (-> a1-6 vertex1 x) (-> v1-28 nearest-y-threshold)) (set! (-> a1-6 data 20) (the-as uint 2)) (let ((a2-4 (nav-mesh-method-45 (-> v1-28 state mesh) a1-6))) @@ -353,7 +353,7 @@ (a2-4 (clamp-vector-to-mesh-cross-gaps s2-0 - (the-as vector s1-0) + (-> s1-0 world-sphere) a2-4 s3-0 204.8 @@ -389,7 +389,7 @@ (a0-41 (-> self root root-prim prim-core)) (a1-9 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-9 vertex)) (the-as vector a0-41) (the-as vector (-> v1-44 state mesh bounds))) + (vector-! (-> a1-9 vertex 0) (-> a0-41 world-sphere) (the-as vector (-> v1-44 state mesh bounds))) (set! (-> a1-9 vertex1 x) (-> v1-44 nearest-y-threshold)) (set! (-> a1-9 data 20) (the-as uint 2)) (let ((v1-46 (nav-mesh-method-45 (-> v1-44 state mesh) a1-9))) diff --git a/goal_src/jak3/levels/sewer/kg-hopper.gc b/goal_src/jak3/levels/sewer/kg-hopper.gc index d84969a05c9..212402f2e10 100644 --- a/goal_src/jak3/levels/sewer/kg-hopper.gc +++ b/goal_src/jak3/levels/sewer/kg-hopper.gc @@ -628,7 +628,7 @@ (a0-3 s5-0) (a1-2 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-2 vertex)) a0-3 (the-as vector (-> v1-8 state mesh bounds))) + (vector-! (-> a1-2 vertex 0) a0-3 (the-as vector (-> v1-8 state mesh bounds))) (set! (-> a1-2 vertex1 x) (-> v1-8 nearest-y-threshold)) (set! (-> a1-2 data 20) (the-as uint 2)) (let ((s4-0 (nav-mesh-method-45 (-> v1-8 state mesh) a1-2))) diff --git a/goal_src/jak3/levels/sewer/saberfish-spawner.gc b/goal_src/jak3/levels/sewer/saberfish-spawner.gc index c19172a5ef1..c357419576b 100644 --- a/goal_src/jak3/levels/sewer/saberfish-spawner.gc +++ b/goal_src/jak3/levels/sewer/saberfish-spawner.gc @@ -351,7 +351,7 @@ (let ((a0-4 (-> this nav-mesh-jumps data s4-0 mesh))) (when a0-4 (when (or (= arg1 (saberfish-find-behavior none)) (= (-> this nav-mesh-jumps data s4-0 in-water?) sv-88)) - (vector-! (the-as vector (-> sv-64 vertex)) sv-84 (the-as vector (-> a0-4 bounds))) + (vector-! (-> sv-64 vertex 0) sv-84 (the-as vector (-> a0-4 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) diff --git a/goal_src/jak3/levels/sewer/saberfish.gc b/goal_src/jak3/levels/sewer/saberfish.gc index 98b88c2cd5c..9bc0e4055f3 100644 --- a/goal_src/jak3/levels/sewer/saberfish.gc +++ b/goal_src/jak3/levels/sewer/saberfish.gc @@ -2665,7 +2665,7 @@ (if (not a0-2) (return (the-as nav-poly #f)) ) - (vector-! (the-as vector (-> gp-0 vertex)) (-> this root trans) (the-as vector (-> a0-2 bounds))) + (vector-! (-> gp-0 vertex 0) (-> this root trans) (the-as vector (-> a0-2 bounds))) (set! (-> gp-0 vertex1 x) 40960.0) (set! (-> gp-0 data 20) (the-as uint 3)) (nav-mesh-method-45 a0-2 gp-0) diff --git a/goal_src/jak3/levels/sewer/sew-platforms.gc b/goal_src/jak3/levels/sewer/sew-platforms.gc index 08cd09ba1e9..4fade9901d2 100644 --- a/goal_src/jak3/levels/sewer/sew-platforms.gc +++ b/goal_src/jak3/levels/sewer/sew-platforms.gc @@ -688,7 +688,7 @@ ) (defmethod sew-move-plat-method-37 ((this sew-move-plat)) - (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (the-as vector (-> this positions))))) + (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 0)))) (logand (+ (-> this dest-pos-index) 1) 1) (if (< f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 1))) 0 @@ -798,7 +798,7 @@ (set! (-> this current-pos-index) 0) (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) - (get-point-at-percent-along-path! (-> this path) (the-as vector (-> this positions)) 0.0 'interp) + (get-point-at-percent-along-path! (-> this path) (-> this positions 0) 0.0 'interp) (get-point-at-percent-along-path! (-> this path) (-> this positions 1) 1.0 'interp) (vector-copy! (-> this basetrans) (-> this root trans)) (set! (-> this current-pos-index) (sew-move-plat-method-37 this)) diff --git a/goal_src/jak3/levels/sewer/sewer-move-turret.gc b/goal_src/jak3/levels/sewer/sewer-move-turret.gc index d864b593d1b..713b3691dbf 100644 --- a/goal_src/jak3/levels/sewer/sewer-move-turret.gc +++ b/goal_src/jak3/levels/sewer/sewer-move-turret.gc @@ -38,7 +38,7 @@ ) (vector-! gp-1 (target-pos 0) (-> self root trans)) (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) - (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + (f1-2 (fabs (vector-dot gp-1 (-> self node-list data 5 bone transform rvec)))) ) (if (and (< 4096.0 f0-1) (>= 81920.0 f1-2) (< f30-0 450560.0)) (go-virtual active) @@ -69,7 +69,7 @@ ) (vector-! gp-1 (target-pos 0) (-> self root trans)) (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) - (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + (f1-2 (fabs (vector-dot gp-1 (-> self node-list data 5 bone transform rvec)))) ) (when (or (>= 0.0 f0-1) (< 81920.0 f1-2) (>= f30-0 450560.0)) (if (nonzero? (-> self sound-id)) @@ -127,7 +127,7 @@ (set! f1-1 (* 0.2 (- 45.0 f0-0) f1-1)) ) ) - (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-1) + (vector+float*! s4-0 s4-0 (-> this node-list data arg0 bone transform rvec) f1-1) ) ) (else @@ -140,7 +140,7 @@ (set! f1-2 (* 0.2 (- 90.0 f0-0) f1-2)) ) ) - (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-2) + (vector+float*! s4-0 s4-0 (-> this node-list data arg0 bone transform rvec) f1-2) ) ) ) diff --git a/goal_src/jak3/levels/stadium/dm-mine-spider.gc b/goal_src/jak3/levels/stadium/dm-mine-spider.gc index 3d0398212e7..eb7da972b71 100644 --- a/goal_src/jak3/levels/stadium/dm-mine-spider.gc +++ b/goal_src/jak3/levels/stadium/dm-mine-spider.gc @@ -659,7 +659,7 @@ (vector-copy! (-> a1-3 start-pos) (-> this root root-prim prim-core world-sphere)) (vector-! (-> a1-3 move-dist) - (the-as vector (-> (the-as collide-shape s3-1) root-prim prim-core)) + (-> (the-as collide-shape s3-1) root-prim prim-core world-sphere) (-> a1-3 start-pos) ) (let ((v1-6 a1-3)) @@ -1302,7 +1302,7 @@ (let ((a1-2 (new 'stack-no-clear 'nav-poly))) (set! (-> a1-2 vertex1 x) 122880.0) (set! (-> a1-2 data 20) (the-as uint 2)) - (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (vector-! (-> a1-2 vertex 0) s3-0 (the-as vector (-> s4-0 bounds))) (vector-copy! s3-0 (-> a1-2 vertex 0)) (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) (when a1-3 @@ -1527,7 +1527,7 @@ (cond ((and (= arg0 3) (type? gp-0 collide-shape)) (let ((v0-1 (new 'static 'vector))) - (vector+! v0-1 (the-as vector (-> gp-0 root-prim prim-core)) (new 'static 'vector :y 16384.0 :w 1.0)) + (vector+! v0-1 (-> gp-0 root-prim prim-core world-sphere) (new 'static 'vector :y 16384.0 :w 1.0)) (set! (-> v0-1 w) 1638.4) v0-1 ) diff --git a/goal_src/jak3/levels/stadium/rubble-part.gc b/goal_src/jak3/levels/stadium/rubble-part.gc index 9ef4c4ba7c1..1d5b5fd15ee 100644 --- a/goal_src/jak3/levels/stadium/rubble-part.gc +++ b/goal_src/jak3/levels/stadium/rubble-part.gc @@ -232,7 +232,7 @@ (defun spt-func-part-rub-elec-gate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (spt-func-match-part-def arg0 arg1 arg2) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) diff --git a/goal_src/jak3/levels/temple/flamer-hover.gc b/goal_src/jak3/levels/temple/flamer-hover.gc index 070e8e25aa7..05eee1cab78 100644 --- a/goal_src/jak3/levels/temple/flamer-hover.gc +++ b/goal_src/jak3/levels/temple/flamer-hover.gc @@ -171,7 +171,7 @@ (vector-normalize! s5-1 2048.0) (vector/! s5-1 s5-1 (-> this root scale)) (vector-rotate-around-z! s5-1 s5-1 (-> this flit-angle)) - (vector-seek! (the-as vector (-> this flit-joint transform)) s5-1 (* 32768.0 (seconds-per-frame))) + (vector-seek! (-> this flit-joint transform trans) s5-1 (* 32768.0 (seconds-per-frame))) ) (update-trans! (-> this sound) (-> this root trans)) (update-vol! (-> this sound) (-> this sound-volume)) diff --git a/goal_src/jak3/levels/temple/hover-training.gc b/goal_src/jak3/levels/temple/hover-training.gc index 080b8dded98..ae554d20c7c 100644 --- a/goal_src/jak3/levels/temple/hover-training.gc +++ b/goal_src/jak3/levels/temple/hover-training.gc @@ -13,13 +13,9 @@ (defmethod draw ((this hud-hover)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/temple/temple-mood.gc b/goal_src/jak3/levels/temple/temple-mood.gc index eb209bb72c1..5fc233940a7 100644 --- a/goal_src/jak3/levels/temple/temple-mood.gc +++ b/goal_src/jak3/levels/temple/temple-mood.gc @@ -195,7 +195,7 @@ (set! (-> s5-1 ambi extra x) 0.8) ) (let ((v1-10 (-> arg0 light-group 3))) - (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (-> arg0 times 0) 0.55) (vector+! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> v1-10 ambi color)) diff --git a/goal_src/jak3/levels/temple/templex-mood.gc b/goal_src/jak3/levels/temple/templex-mood.gc index ec161d4fa21..bf15584ddd3 100644 --- a/goal_src/jak3/levels/temple/templex-mood.gc +++ b/goal_src/jak3/levels/temple/templex-mood.gc @@ -34,7 +34,7 @@ (set! (-> s5-1 ambi extra x) 0.8) ) (let ((v1-10 (-> arg0 light-group 3))) - (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (-> arg0 times 0) 0.55) (vector+! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> v1-10 ambi color)) diff --git a/goal_src/jak3/levels/volcano/flamer-lava.gc b/goal_src/jak3/levels/volcano/flamer-lava.gc index 1c749fe28ba..8d449d6fe79 100644 --- a/goal_src/jak3/levels/volcano/flamer-lava.gc +++ b/goal_src/jak3/levels/volcano/flamer-lava.gc @@ -732,7 +732,7 @@ (vector-normalize! s5-2 2048.0) (vector/! s5-2 s5-2 (-> this root scale)) (vector-rotate-around-z! s5-2 s5-2 (-> this flit-angle)) - (vector-seek! (the-as vector (-> this flit-joint transform)) s5-2 (* 32768.0 (seconds-per-frame))) + (vector-seek! (-> this flit-joint transform trans) s5-2 (* 32768.0 (seconds-per-frame))) ) (update-trans! (-> this sound) (-> this root trans)) (update! (-> this sound)) diff --git a/goal_src/jak3/levels/volcano/spiky-frog.gc b/goal_src/jak3/levels/volcano/spiky-frog.gc index 57afe2ed626..07d6d59b96b 100644 --- a/goal_src/jak3/levels/volcano/spiky-frog.gc +++ b/goal_src/jak3/levels/volcano/spiky-frog.gc @@ -969,7 +969,7 @@ (set! (-> a0-2 param0) (lambda ((arg0 cspace) (arg1 transformq)) (let ((v1-0 (-> arg0 param1))) - (vector+! (-> arg1 trans) (-> arg1 trans) (the-as vector (-> (the-as spiky-frog v1-0) roll-transform))) + (vector+! (-> arg1 trans) (-> arg1 trans) (-> (the-as spiky-frog v1-0) roll-transform trans)) (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> (the-as spiky-frog v1-0) roll-transform quat)) ) (quaternion-normalize! (-> arg1 quat)) diff --git a/goal_src/jak3/levels/volcano/volcano-obs.gc b/goal_src/jak3/levels/volcano/volcano-obs.gc index bdaf1d4dfc8..fbbf09329de 100644 --- a/goal_src/jak3/levels/volcano/volcano-obs.gc +++ b/goal_src/jak3/levels/volcano/volcano-obs.gc @@ -672,7 +672,7 @@ (s2-0 (new 'stack-no-clear 'vector)) (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) ) - (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 bone transform)) 1.0))) + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 bone transform rvec) 1.0))) (vector-float*! s2-0 s1-0 diff --git a/goal_src/jak3/levels/volcano/volcano-part.gc b/goal_src/jak3/levels/volcano/volcano-part.gc index 17d3c262217..d025c36a69c 100644 --- a/goal_src/jak3/levels/volcano/volcano-part.gc +++ b/goal_src/jak3/levels/volcano/volcano-part.gc @@ -48,7 +48,7 @@ ) (defun spt-func-part-volcano-embers ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -454,7 +454,7 @@ ) (defun spt-func-part-lava-ball-spout-puff ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) diff --git a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc index d816bf77691..5ff080c90ac 100644 --- a/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc +++ b/goal_src/jak3/levels/wascity/bbush/des-bush-time-chase.gc @@ -1332,14 +1332,14 @@ (defmethod draw ((this freeze-time-hud)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (set-hud-piece-position! (-> this sprites 0) 447 70) (format (clear (-> this strings 0 text)) "~2,'0D" (/ (-> this values 0 current) 100)) (format (clear (-> this strings 2 text)) ":") (format (clear (-> this strings 3 text)) "~2,'0D" (mod (-> this values 0 current) 100)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -15 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) 15 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this sprites 0 pos) 15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) (let ((s5-3 (new 'stack 'font-context diff --git a/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc b/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc index 2719564c1d7..6c87c622452 100644 --- a/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc +++ b/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc @@ -1349,13 +1349,9 @@ ) (defmethod draw ((this hud-kanga-lizard)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 65) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 65) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/wascity/ctymark-obs.gc b/goal_src/jak3/levels/wascity/ctymark-obs.gc index f6e74fbd2e9..45ec35a0325 100644 --- a/goal_src/jak3/levels/wascity/ctymark-obs.gc +++ b/goal_src/jak3/levels/wascity/ctymark-obs.gc @@ -1177,7 +1177,7 @@ (f30-0 (* (rand-vu-float-range 0.0 136.53334) f28-0)) (f0-8 (* (rand-vu-float-range -13.653334 54.613335) f28-0)) ) - (vector-float*! s4-0 (the-as vector (-> s5-0 origin)) f26-0) + (vector-float*! s4-0 (-> s5-0 origin rvec) f26-0) (let ((a1-5 s4-0)) (let ((v1-8 s4-0)) (let ((a0-10 (-> s5-0 origin uvec))) @@ -1488,7 +1488,7 @@ (initialize (-> self part) (-> *part-group-id-table* 253) self) (set! (-> self parts-alive?) #t) ) - (spawn-from-cspace (-> self part) (the-as cspace (-> self node-list data))) + (spawn-from-cspace (-> self part) (-> self node-list data 0)) ) (else (when (-> self parts-alive?) diff --git a/goal_src/jak3/levels/wascity/traffic-util.gc b/goal_src/jak3/levels/wascity/traffic-util.gc index 53858403589..8e52c2b8aaf 100644 --- a/goal_src/jak3/levels/wascity/traffic-util.gc +++ b/goal_src/jak3/levels/wascity/traffic-util.gc @@ -16,18 +16,10 @@ (local-vars (sv-48 (function _varargs_ object))) (dotimes (s5-0 (-> this segment-count)) (let ((s4-0 (-> this segment-array s5-0))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s4-0 vertex)) - (-> s4-0 vertex 1) - *color-white* - #f - *color-black* - ) + (add-debug-line #t (bucket-id debug) (-> s4-0 vertex 0) (-> s4-0 vertex 1) *color-white* #f *color-black*) (let ((s3-1 (vector-float*! (new 'stack-no-clear 'vector) - (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 vertex)) (-> s4-0 vertex 1)) + (vector+! (new 'stack-no-clear 'vector) (-> s4-0 vertex 0) (-> s4-0 vertex 1)) 0.5 ) ) @@ -173,7 +165,7 @@ ) (defmethod debug-draw-grid ((this grid-info) (arg0 rgba)) - (draw-grid (the-as vector (-> this box)) (-> this box max) (-> this dimension-array) arg0) + (draw-grid (-> this box min) (-> this box max) (-> this dimension-array) arg0) 0 (none) ) @@ -411,9 +403,7 @@ (s3-0 (-> v1-18 segment-array 0)) ) (countdown (s2-0 (-> v1-18 segment-count)) - (if (and (= (-> s3-0 tracker-id) sv-24) - (line-sphere-intersection? sv-20 (the-as vector (-> s3-0 vertex)) (-> s3-0 vertex 1)) - ) + (if (and (= (-> s3-0 tracker-id) sv-24) (line-sphere-intersection? sv-20 (-> s3-0 vertex 0) (-> s3-0 vertex 1))) (sv-32 sv-28 s3-0) ) (&+! s3-0 48) @@ -441,7 +431,7 @@ (dotimes (s3-0 16) (let ((s2-0 (-> arg0 suppressor array s3-0))) (when (logtest? (-> s2-0 flags) (traffic-suppression-box-flag in-use)) - (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (the-as vector (-> s2-0 bbox))) + (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (-> s2-0 bbox min)) (lookup-cell-for-point (-> this grid-info) (-> s4-0 2) (-> s2-0 bbox max)) (set! (-> s4-0 0 y) (-> s4-0 1 y)) (countdown (v1-15 (+ (- 1 (-> s4-0 1 y)) (-> s4-0 2 y))) @@ -903,7 +893,7 @@ (let ((s2-1 (-> sv-260 segment-array a2-14))) (set! (-> s2-1 vertex 0 quad) (-> sv-248 quad)) (vector-copy! (-> s2-1 vertex 1) (-> sv-104 pos)) - (set! (-> s2-1 length) (vector-vector-distance (the-as vector (-> s2-1 vertex)) (-> s2-1 vertex 1))) + (set! (-> s2-1 length) (vector-vector-distance (-> s2-1 vertex 0) (-> s2-1 vertex 1))) (let* ((f0-9 (if (logtest? (-> s4-2 flags) (nav-node-flag-byte pedestrian)) 24576.0 49152.0 diff --git a/goal_src/jak3/levels/wascity/wasall-tasks.gc b/goal_src/jak3/levels/wascity/wasall-tasks.gc index 6ac54613afb..16951b77a82 100644 --- a/goal_src/jak3/levels/wascity/wasall-tasks.gc +++ b/goal_src/jak3/levels/wascity/wasall-tasks.gc @@ -617,7 +617,7 @@ (-> v1-4 display?) ) (let ((s4-0 (-> *minimap-class-list* 121))) - (if (< (vector-vector-distance (target-pos 0) (the-as vector s4-0)) 1474560.0) + (if (< (vector-vector-distance (target-pos 0) (-> s4-0 default-position)) 1474560.0) (send-event this 'complete) ) ) diff --git a/goal_src/jak3/levels/wascity/wascity-turret.gc b/goal_src/jak3/levels/wascity/wascity-turret.gc index 53ef8bf893a..c8256f956cc 100644 --- a/goal_src/jak3/levels/wascity/wascity-turret.gc +++ b/goal_src/jak3/levels/wascity/wascity-turret.gc @@ -1318,7 +1318,7 @@ (when (= (-> s0-0 type) maker) ) (if #f - (add-debug-sphere #t (bucket-id debug) (the-as vector sv-896) (-> sv-896 world-sphere w) *color-red*) + (add-debug-sphere #t (bucket-id debug) (-> sv-896 world-sphere) (-> sv-896 world-sphere w) *color-red*) ) (let* ((t9-8 vector-normalize-copy!) (a0-22 (new 'stack-no-clear 'vector)) @@ -1409,7 +1409,7 @@ (let* ((a1-19 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core)) + (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core world-sphere) (-> s5-0 trans) ) ) diff --git a/goal_src/jak3/levels/wascity/wasdef-hud.gc b/goal_src/jak3/levels/wascity/wasdef-hud.gc index c94f29314bb..35b82b10578 100644 --- a/goal_src/jak3/levels/wascity/wasdef-hud.gc +++ b/goal_src/jak3/levels/wascity/wasdef-hud.gc @@ -8,9 +8,9 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-wasdef-damage)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 256 40) + (set-hud-piece-position! (-> this sprites 0) 256 40) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -59 -5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -59 -5) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) diff --git a/goal_src/jak3/levels/wascity/wasgun-hud.gc b/goal_src/jak3/levels/wascity/wasgun-hud.gc index cdbb0c8f18e..00d11168f32 100644 --- a/goal_src/jak3/levels/wascity/wasgun-hud.gc +++ b/goal_src/jak3/levels/wascity/wasgun-hud.gc @@ -20,7 +20,7 @@ ) (+! (-> s5-0 x) -1792.0) (+! (-> s5-0 y) -1840.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (-> s5-0 x)) (the int (-> s5-0 y))) + (set-hud-piece-position! (-> this sprites 0) (the int (-> s5-0 x)) (the int (-> s5-0 y))) ) ) (set! (-> this sprites 0 pos z) #xfffff0) @@ -129,7 +129,7 @@ (s4-2 (new 'stack 'vector4w)) ) (b! (< (-> this minfo s5-3 pos y) (+ -20480.0 (get-base-height *ocean-map*))) cfg-53) - (transform-point-vector! s3-3 (the-as vector (-> this minfo s5-3))) + (transform-point-vector! s3-3 (-> this minfo s5-3 pos)) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) (set! (-> s3-3 x) (- (-> s3-3 x))) ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc b/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc index 818f706bff9..b120e8f43d2 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/nst-tasks.gc @@ -8,13 +8,9 @@ ;; DECOMP BEGINS (defmethod draw ((this hud-nest-cocoons)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 200 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 200) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -25 33) ((method-of-type hud draw) this) 0 (none) @@ -110,7 +106,7 @@ ) ) (cond - ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (the-as vector (-> *minimap-class-list* 9)))) + ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (-> *minimap-class-list* 9 default-position))) (or (= (level-status? *level* 'desert #f) 'active) (= (level-status? *level* 'waswide #f) 'active)) ) (if (not (-> this minimap)) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc index b91b5e4cf94..0577762579a 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstada-part.gc @@ -2042,7 +2042,7 @@ (if (rand-vu-percent? 0.85) (launch-particles (-> *part-id-table* 1967) - :launch-state (the-as sparticle-launch-state (-> self part data)) + :launch-state (-> self part data 0) :launch-control (-> self part) s5-0 ) diff --git a/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc b/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc index 9fe73672563..849ae03b37e 100644 --- a/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc +++ b/goal_src/jak3/levels/wascity/wasstadium/wasstadb-obs.gc @@ -168,13 +168,9 @@ ) (defmethod draw ((this hud-arena-tokens)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 180 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 180) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -14 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -14 33) ((method-of-type hud draw) this) 0 (none) diff --git a/goal_src/jak3/levels/wascity/waswide-obs.gc b/goal_src/jak3/levels/wascity/waswide-obs.gc index c8e6393c92b..abe02dc9a06 100644 --- a/goal_src/jak3/levels/wascity/waswide-obs.gc +++ b/goal_src/jak3/levels/wascity/waswide-obs.gc @@ -295,7 +295,7 @@ (-> arg1 quat) (quaternion-vector-angle! (the-as quaternion (new 'stack-no-clear 'vector)) - (the-as vector (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0))) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) axis) (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) shake) ) ) diff --git a/test/decompiler/reference/jak1/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak1/engine/anim/aligner_REF.gc index 060df670e93..876240caa99 100644 --- a/test/decompiler/reference/jak1/engine/anim/aligner_REF.gc +++ b/test/decompiler/reference/jak1/engine/anim/aligner_REF.gc @@ -89,13 +89,9 @@ (set! (-> v1-23 0 vector 2 quad) a2-6) (set! (-> v1-23 0 vector 3 quad) a3-3) ) - (vector*! (the-as vector (-> this transform)) (-> s5-1 bone transform vector 3) (-> this process root scale)) - ) - (vector-! - (the-as vector (-> this delta)) - (the-as vector (-> this transform)) - (the-as vector (-> this transform 1)) + (vector*! (-> this transform 0 trans) (-> s5-1 bone transform vector 3) (-> this process root scale)) ) + (vector-! (-> this delta trans) (-> this transform 0 trans) (-> this transform 1 trans)) (set-vector! (-> this align scale) (vector-length (the-as vector (-> this matrix))) @@ -105,9 +101,7 @@ ) (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) (let ((a2-8 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) - (quaternion-normalize! - (matrix->quaternion (-> this align quat) (matrix*! a2-8 (the-as matrix (-> this matrix)) a2-8)) - ) + (quaternion-normalize! (matrix->quaternion (-> this align quat) (matrix*! a2-8 (-> this matrix 0) a2-8))) ) (let ((a1-24 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) ) diff --git a/test/decompiler/reference/jak1/engine/anim/joint-mod-h_REF.gc b/test/decompiler/reference/jak1/engine/anim/joint-mod-h_REF.gc index 036842cad35..dfead6c5abf 100644 --- a/test/decompiler/reference/jak1/engine/anim/joint-mod-h_REF.gc +++ b/test/decompiler/reference/jak1/engine/anim/joint-mod-h_REF.gc @@ -807,12 +807,7 @@ (let ((gp-0 (the-as joint-mod-blend-local (-> arg0 param1)))) (cond ((-> gp-0 enable) - (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) - (-> arg1 trans) - (the-as vector (-> gp-0 transform)) - (-> gp-0 blend) - ) + (vector-lerp! (-> gp-0 blend-transform trans) (-> arg1 trans) (-> gp-0 transform trans) (-> gp-0 blend)) (vector-lerp! (-> gp-0 blend-transform scale) (-> arg1 scale) (-> gp-0 transform scale) (-> gp-0 blend)) (quaternion-slerp! (-> gp-0 blend-transform quat) (-> arg1 quat) (-> gp-0 transform quat) (-> gp-0 blend)) (cspace<-parented-transformq-joint! arg0 (-> gp-0 blend-transform)) diff --git a/test/decompiler/reference/jak1/engine/anim/joint_REF.gc b/test/decompiler/reference/jak1/engine/anim/joint_REF.gc index 54de02716d7..55be394eac0 100644 --- a/test/decompiler/reference/jak1/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak1/engine/anim/joint_REF.gc @@ -404,7 +404,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return (the-as joint (-> this data s2-0))) ) @@ -432,7 +432,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return s2-0) ) diff --git a/test/decompiler/reference/jak1/engine/camera/cam-combiner_REF.gc b/test/decompiler/reference/jak1/engine/camera/cam-combiner_REF.gc index 85e7f953991..d71302ad50a 100644 --- a/test/decompiler/reference/jak1/engine/camera/cam-combiner_REF.gc +++ b/test/decompiler/reference/jak1/engine/camera/cam-combiner_REF.gc @@ -229,14 +229,10 @@ (let ((s4-1 (new-stack-vector0))) 0.0 (let ((s3-0 (new-stack-matrix0))) - (vector-! - (the-as vector (-> s1-0 vector)) - (the-as vector (-> sv-160 inv-mat)) - (the-as vector (-> s5-1 inv-mat)) - ) + (vector-! (-> s1-0 vector 0) (the-as vector (-> sv-160 inv-mat)) (the-as vector (-> s5-1 inv-mat))) (vector-! (-> s1-0 vector 1) (-> sv-160 inv-mat vector 1) (-> s5-1 inv-mat vector 1)) (vector-! (-> s1-0 vector 2) (-> sv-160 inv-mat vector 2) (-> s5-1 inv-mat vector 2)) - (let ((f26-0 (vector-length (the-as vector (-> s1-0 vector)))) + (let ((f26-0 (vector-length (-> s1-0 vector 0))) (f28-0 (vector-length (-> s1-0 vector 1))) (f0-13 (vector-length (-> s1-0 vector 2))) ) @@ -245,10 +241,10 @@ (vector-cross! s4-1 (-> s1-0 vector 1) (-> s1-0 vector 2)) ) ((and (< f28-0 f26-0) (< f28-0 f0-13)) - (vector-cross! s4-1 (the-as vector (-> s1-0 vector)) (-> s1-0 vector 2)) + (vector-cross! s4-1 (-> s1-0 vector 0) (-> s1-0 vector 2)) ) (else - (vector-cross! s4-1 (the-as vector (-> s1-0 vector)) (-> s1-0 vector 1)) + (vector-cross! s4-1 (-> s1-0 vector 0) (-> s1-0 vector 1)) ) ) ) @@ -259,38 +255,38 @@ ) (cond ((and (< f0-16 f1-2) (< f0-16 f2-2)) - (vector-flatten! (the-as vector (-> s1-0 vector)) (the-as vector (-> sv-160 inv-mat)) s4-1) + (vector-flatten! (-> s1-0 vector 0) (the-as vector (-> sv-160 inv-mat)) s4-1) (vector-flatten! (-> s1-0 vector 1) (the-as vector (-> s5-1 inv-mat)) s4-1) ) ((< f1-2 f2-2) - (vector-flatten! (the-as vector (-> s1-0 vector)) (-> sv-160 inv-mat vector 1) s4-1) + (vector-flatten! (-> s1-0 vector 0) (-> sv-160 inv-mat vector 1) s4-1) (vector-flatten! (-> s1-0 vector 1) (-> s5-1 inv-mat vector 1) s4-1) ) (else - (vector-flatten! (the-as vector (-> s1-0 vector)) (-> sv-160 inv-mat vector 2) s4-1) + (vector-flatten! (-> s1-0 vector 0) (-> sv-160 inv-mat vector 2) s4-1) (vector-flatten! (-> s1-0 vector 1) (-> s5-1 inv-mat vector 2) s4-1) ) ) ) - (vector-normalize! (the-as vector (-> s1-0 vector)) 1.0) + (vector-normalize! (-> s1-0 vector 0) 1.0) (vector-normalize! (-> s1-0 vector 1) 1.0) - (vector-cross! (-> s1-0 vector 2) (the-as vector (-> s1-0 vector)) (-> s1-0 vector 1)) + (vector-cross! (-> s1-0 vector 2) (-> s1-0 vector 0) (-> s1-0 vector 1)) (if (< (vector-dot (-> s1-0 vector 2) s4-1) 0.0) (vector-negate! s4-1 s4-1) ) - (let ((f28-1 (acos (vector-dot (the-as vector (-> s1-0 vector)) (-> s1-0 vector 1))))) + (let ((f28-1 (acos (vector-dot (-> s1-0 vector 0) (-> s1-0 vector 1))))) (cond ((logtest? (-> *camera* master-options) 8) (logand! (-> *camera* master-options) -25) (when (and (< 8192.0 f28-1) (logtest? (-> *camera* master-options) 2)) - (vector-! (the-as vector (-> s1-0 vector)) (-> *camera* tpos-curr) s2-0) + (vector-! (-> s1-0 vector 0) (-> *camera* tpos-curr) s2-0) (vector-! (-> s1-0 vector 1) s0-0 s2-0) - (vector-flatten! (the-as vector (-> s1-0 vector)) (the-as vector (-> s1-0 vector)) (-> *camera* local-down)) + (vector-flatten! (-> s1-0 vector 0) (-> s1-0 vector 0) (-> *camera* local-down)) (vector-flatten! (-> s1-0 vector 1) (-> s1-0 vector 1) (-> *camera* local-down)) - (when (and (< 4096.0 (vector-normalize-ret-len! (the-as vector (-> s1-0 vector)) 1.0)) + (when (and (< 4096.0 (vector-normalize-ret-len! (-> s1-0 vector 0) 1.0)) (< 4096.0 (vector-normalize-ret-len! (-> s1-0 vector 1) 1.0)) ) - (vector-cross! (-> s1-0 vector 2) (-> s1-0 vector 1) (the-as vector (-> s1-0 vector))) + (vector-cross! (-> s1-0 vector 2) (-> s1-0 vector 1) (-> s1-0 vector 0)) (when (< (vector-dot (-> s1-0 vector 2) s4-1) -0.01) ) ) @@ -309,7 +305,7 @@ (matrix-axis-sin-cos! s3-0 s4-1 (sin f30-1) (cos f30-1)) ) ) - (matrix*! (-> self inv-camera-rot) (the-as matrix s5-1) s3-0) + (matrix*! (-> self inv-camera-rot) (-> s5-1 inv-mat) s3-0) ) ) ) diff --git a/test/decompiler/reference/jak1/engine/camera/cam-states-dbg_REF.gc b/test/decompiler/reference/jak1/engine/camera/cam-states-dbg_REF.gc index 9b33ecef63e..162a2aa5639 100644 --- a/test/decompiler/reference/jak1/engine/camera/cam-states-dbg_REF.gc +++ b/test/decompiler/reference/jak1/engine/camera/cam-states-dbg_REF.gc @@ -71,14 +71,14 @@ (matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y))) (vector-matrix*! s4-0 s4-0 s3-0) ) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) s4-0 (-> *camera* local-down)) ) (set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z))) (if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0) ) (set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0) - (vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking))) + (vector-matrix*! (-> self trans) gp-0 (-> self tracking inv-mat)) ) ) (suspend) @@ -394,7 +394,7 @@ (matrix*! arg0 arg0 (-> s3-0 tm)) ) ) - (matrix-axis-angle! (-> s3-0 tm) (the-as vector (-> arg0 vector)) (- (-> s3-0 rv x))) + (matrix-axis-angle! (-> s3-0 tm) (-> arg0 vector 0) (- (-> s3-0 rv x))) (matrix*! arg0 arg0 (-> s3-0 tm)) (matrix-axis-angle! (-> s3-0 tm) (-> arg0 vector 2) (- (-> s3-0 rv z))) (matrix*! arg0 arg0 (-> s3-0 tm)) @@ -429,7 +429,7 @@ (set! a2-0 (the-as vector #f)) ) (cam-free-floating-move - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self trans) a2-0 (the-as int (-> *CAMERA-bank* joypad)) @@ -608,7 +608,7 @@ (set! (-> gp-0 x) (atan (-> s5-0 y) (vector-xz-length s5-0))) ) (set! (-> gp-0 z) 0.0) - (matrix-rotate-zxy! (the-as matrix (-> self tracking)) gp-0) + (matrix-rotate-zxy! (-> self tracking inv-mat) gp-0) ) (suspend) ) diff --git a/test/decompiler/reference/jak1/engine/camera/cam-states_REF.gc b/test/decompiler/reference/jak1/engine/camera/cam-states_REF.gc index c9d6a5943aa..90e51ef5122 100644 --- a/test/decompiler/reference/jak1/engine/camera/cam-states_REF.gc +++ b/test/decompiler/reference/jak1/engine/camera/cam-states_REF.gc @@ -29,7 +29,7 @@ (cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f) (when (!= (-> gp-0 w) 0.0) (vector-normalize! gp-0 (the-as float 1.0)) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) ) @@ -56,7 +56,7 @@ ) ((-> self cam-entity) (cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) (-> self trans) 'trans) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (cam-curve-setup (-> self trans)) ((-> cam-fixed enter)) @@ -207,7 +207,7 @@ (cond ((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos (the-as float 3640.889)) (vector-dot s5-0 s3-0))) (set! (-> self trans quad) (-> s2-0 quad)) - (vector-negate! (the-as vector (-> self tracking)) (the-as vector (-> s0-0 vector))) + (vector-negate! (the-as vector (-> self tracking)) (-> s0-0 vector 0)) (set! (-> self tracking inv-mat vector 1 quad) (-> s0-0 vector 1 quad)) (vector-negate! (-> self tracking inv-mat vector 2) (-> s0-0 vector 2)) (set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) (the-as float 1.0)))) @@ -349,7 +349,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) #x8000) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -491,23 +491,23 @@ ) ) (matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y)) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) (when (not (logtest? (-> self options) 8)) (if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat vector 2) (-> *camera* local-down) ) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat vector 2) (vector-negate! (new-stack-vector0) (-> *camera* local-down)) ) ) ) (matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x))) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) ) (when (not (logtest? (-> self options) 8)) (let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2)))) @@ -593,7 +593,7 @@ 0 ) (set! (-> self fov) 9830.4) - (matrix-rotate-y! (the-as matrix (-> self tracking)) (the-as float -32768.0)) + (matrix-rotate-y! (-> self tracking inv-mat) (the-as float -32768.0)) ) :exit (behavior () '() @@ -696,7 +696,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) #x8000) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) diff --git a/test/decompiler/reference/jak1/engine/camera/camera_REF.gc b/test/decompiler/reference/jak1/engine/camera/camera_REF.gc index 671986fcbdd..82e3632d4eb 100644 --- a/test/decompiler/reference/jak1/engine/camera/camera_REF.gc +++ b/test/decompiler/reference/jak1/engine/camera/camera_REF.gc @@ -386,7 +386,7 @@ (s3-2 (cond (v0-8 - (vector+! (the-as vector (-> this vec)) (the-as vector (&+ s3-2 0)) (the-as vector v0-8)) + (vector+! (-> this vec 0) (the-as vector (&+ s3-2 0)) (the-as vector v0-8)) (vector+! (-> this vec 1) (the-as vector (&+ s3-2 16)) (the-as vector v0-8)) ) (else @@ -411,7 +411,7 @@ ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-! s4-1 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length s4-1)) - (vector-! s4-1 (the-as vector (-> this vec)) arg2) + (vector-! s4-1 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length s4-1)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) @@ -419,13 +419,13 @@ ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-! s4-1 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length s4-1)) - (vector-! s4-1 (the-as vector (-> this vec)) arg2) + (vector-! s4-1 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length s4-1)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) ) (else - (vector-! (-> this vec 1) (-> this vec 1) (the-as vector (-> this vec))) + (vector-! (-> this vec 1) (-> this vec 1) (-> this vec 0)) (set! (-> this vec 1 w) (vector-normalize-ret-len! (-> this vec 1) 1.0)) ) ) @@ -438,7 +438,7 @@ (defmethod cam-index-method-10 ((this cam-index) (arg0 vector)) (let ((s5-0 (new-stack-vector0))) 0.0 - (vector-! s5-0 arg0 (the-as vector (-> this vec))) + (vector-! s5-0 arg0 (-> this vec 0)) (cond ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-flatten! s5-0 s5-0 (-> *camera* local-down)) @@ -500,8 +500,8 @@ (set! (-> this summed-len) (- (-> this summed-len) (-> this point arg0 tp-length))) (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 arg0))) - (the-as vector (-> this point v1-11)) - (the-as vector (-> this point arg0)) + (-> this point v1-11 position) + (-> this point arg0 position) ) ) (set! (-> this point arg0 tp-length) @@ -564,7 +564,7 @@ (let ((a2-0 (new 'stack-no-clear 'tracking-point))) (set! (-> s5-0 cur-pt) (-> this used-point)) (set! (-> s5-0 partial-pt) (-> this partial-point)) - (tracking-spline-method-19 this (-> this sample-len) (the-as vector a2-0) s5-0) + (tracking-spline-method-19 this (-> this sample-len) (-> a2-0 position) s5-0) ) (if (or (= (-> s5-0 cur-pt) (-> this end-point)) (= (-> s5-0 cur-pt) (-> this next-to-last-point)) @@ -654,7 +654,7 @@ (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) arg0 - (the-as vector (-> this point s2-0)) + (-> this point s2-0 position) ) (set! (-> this point s2-0 tp-length) (vector-normalize-ret-len! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) 1.0) @@ -701,7 +701,7 @@ (cond ((= (-> arg2 cur-pt) (-> this end-point)) (set! (-> arg2 partial-pt) 0.0) - (vector+! arg1 arg1 (the-as vector (-> this point (-> arg2 cur-pt)))) + (vector+! arg1 arg1 (-> this point (-> arg2 cur-pt) position)) (return arg1) ) ((begin (set! f0-4 (+ (-> arg2 partial-pt) (/ arg0 (-> this point (-> arg2 cur-pt) tp-length)))) (< f0-4 1.0)) @@ -710,8 +710,8 @@ (let ((a2-5 (-> this point (-> arg2 cur-pt) next))) (vector-lerp! (the-as vector s5-0) - (the-as vector (-> this point (-> arg2 cur-pt))) - (the-as vector (-> this point a2-5)) + (-> this point (-> arg2 cur-pt) position) + (-> this point a2-5 position) f0-4 ) ) @@ -742,11 +742,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod tracking-spline-method-20 ((this tracking-spline) (arg0 vector) (arg1 int)) (let ((s3-0 (new 'stack-no-clear 'vector))) - (vector-! - s3-0 - (the-as vector (-> this point (-> this used-point))) - (the-as vector (-> this point (-> this end-point))) - ) + (vector-! s3-0 (-> this point (-> this used-point) position) (-> this point (-> this end-point) position)) (let* ((f0-0 (vector-length s3-0)) (f1-1 (* 0.33333334 (- 1.5 (/ f0-0 METER_LENGTH)))) ) @@ -794,26 +790,30 @@ ((< f26-0 0.0) (if (and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* -40.96 f26-0) - (the-as vector4w (new 'static 'inline-array qword 1 - (new 'static 'qword :data (new 'static 'array uint32 4 #xff #xff #x0 #x80)) - ) - ) + (-> (new 'static 'inline-array qword 1 + (new 'static 'qword :data (new 'static 'array uint32 4 #xff #xff #x0 #x80)) + ) + 0 + vector4w + ) ) ) (vector--float*! arg0 arg0 s2-0 f26-0) ) ((and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* 40.96 f26-0) - (the-as vector4w (new 'static 'inline-array qword 1 - (new 'static 'qword :data (new 'static 'array uint32 4 #x80 #x80 #x0 #x80)) - ) - ) + (-> (new 'static 'inline-array qword 1 + (new 'static 'qword :data (new 'static 'array uint32 4 #x80 #x80 #x0 #x80)) + ) + 0 + vector4w + ) ) ) ) @@ -986,7 +986,7 @@ ) (else (vector-reset! (-> self trans)) - (matrix-identity! (the-as matrix (-> self tracking))) + (matrix-identity! (-> self tracking inv-mat)) (set! (-> self fov) 11650.845) (vector-reset! (-> self velocity)) ) @@ -1457,7 +1457,7 @@ (vector-! s3-0 (-> *camera* tpos-curr) arg1) (vector-flatten! s3-0 s3-0 (-> arg0 vector 1)) (vector-normalize! s3-0 1.0) - (let ((f28-0 (vector-dot s3-0 (the-as vector (-> arg0 vector))))) + (let ((f28-0 (vector-dot s3-0 (-> arg0 vector 0)))) (set! sv-128 s2-0) (set! sv-112 (-> arg0 vector)) (let ((f0-6 (* 0.8 (tan (/ arg2 2))))) @@ -1466,26 +1466,26 @@ (.mov vf2 v1-6) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-128 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 vector 2)) (vector-normalize! s2-0 1.0) - (let ((f0-8 (vector-dot s2-0 (the-as vector (-> arg0 vector))))) + (let ((f0-8 (vector-dot s2-0 (-> arg0 vector 0)))) (when (< f0-8 (fabs f28-0)) (if (< f28-0 0.0) - (vector--float*! s2-0 s2-0 (the-as vector (-> arg0 vector)) (* 2.0 f0-8)) + (vector--float*! s2-0 s2-0 (-> arg0 vector 0) (* 2.0 f0-8)) ) (matrix-from-two-vectors! s5-0 s2-0 s3-0) (vector-matrix*! (-> arg0 vector 2) (-> arg0 vector 2) s5-0) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 1) (-> arg0 vector 2)) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 1) (-> arg0 vector 2)) ) ) ) (vector-! s3-0 (-> *camera* tpos-curr) (-> *camera* pitch-off)) (vector-! s3-0 s3-0 arg1) (vector--float*! s3-0 s3-0 (-> *camera* local-down) (-> *camera* foot-offset)) - (vector-flatten! s3-0 s3-0 (the-as vector (-> arg0 vector))) + (vector-flatten! s3-0 s3-0 (-> arg0 vector 0)) (vector-normalize! s3-0 1.0) (let ((f28-1 (vector-dot s3-0 (-> arg0 vector 1)))) (set! sv-160 s2-0) @@ -1496,8 +1496,8 @@ (.mov vf2 v1-23) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-160 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 vector 2)) (vector-normalize! s2-0 1.0) @@ -1511,7 +1511,7 @@ (vector-! s3-0 (-> *camera* tpos-curr) (-> *camera* pitch-off)) (vector-! s3-0 s3-0 arg1) (vector--float*! s3-0 s3-0 (-> *camera* local-down) (-> *camera* head-offset)) - (vector-flatten! s3-0 s3-0 (the-as vector (-> arg0 vector))) + (vector-flatten! s3-0 s3-0 (-> arg0 vector 0)) (vector-normalize! s3-0 1.0) (let ((f28-2 (vector-dot s3-0 (-> arg0 vector 1)))) (let ((s0-1 s2-0)) @@ -1544,13 +1544,13 @@ ) ) ) - (matrix-axis-angle! s5-0 (the-as vector (-> arg0 vector)) f0-34) + (matrix-axis-angle! s5-0 (-> arg0 vector 0) f0-34) ) ) ) (vector-matrix*! (-> arg0 vector 2) (-> arg0 vector 2) s5-0) ) - (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (the-as vector (-> arg0 vector))) + (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (-> arg0 vector 0)) ) ) @@ -1589,11 +1589,11 @@ (vector-normalize! sv-192 (* f28-0 (-> arg0 point-of-interest-blend value))) (let ((v1-3 s1-0)) (let ((a0-5 s1-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-5 quad)) ) (.lvf vf5 (&-> sv-192 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-3 quad) vf6) ) (vector-normalize! s1-0 f28-0) diff --git a/test/decompiler/reference/jak1/engine/collide/collide-edge-grab_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-edge-grab_REF.gc index 4f5e67820a7..54de669039c 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-edge-grab_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-edge-grab_REF.gc @@ -24,14 +24,14 @@ (set! (-> gp-0 cshape) v1-0) (.lvf vf3 (&-> v1-0 trans quad)) ) - (.add.vf vf1 vf1 vf3 :mask #b111) - (.add.vf vf2 vf2 vf3 :mask #b111) + (.add.vf.xyz vf1 vf1 vf3) + (.add.vf.xyz vf2 vf2 vf3) (.svf (&-> gp-0 cache-fill-box min quad) vf1) (.svf (&-> gp-0 cache-fill-box max quad) vf2) (.lvf vf4 (&-> gp-0 local-within-reach-box min quad)) (.lvf vf5 (&-> gp-0 local-within-reach-box max quad)) - (.add.vf vf4 vf4 vf3 :mask #b111) - (.add.vf vf5 vf5 vf3 :mask #b111) + (.add.vf.xyz vf4 vf4 vf3) + (.add.vf.xyz vf5 vf5 vf3) (.ftoi.vf vf6 vf4) (.ftoi.vf vf7 vf5) (.svf (&-> gp-0 within-reach-box min quad) vf4) @@ -163,7 +163,7 @@ (set! (-> arg1 world-vertex 1 quad) (-> s3-0 vertex-ptr 1 0 quad)) (set! (-> arg1 hanging-matrix vector 1 quad) (-> *target* control dynam gravity-normal quad)) (vector-normalize! - (vector-! (-> arg1 hanging-matrix vector 2) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + (vector-! (-> arg1 hanging-matrix vector 2) (-> arg1 world-vertex 1) (-> arg1 world-vertex 0)) 1.0 ) (vector-normalize! @@ -271,14 +271,14 @@ (.outer.product.a.vf acc vf4 vf5) (.outer.product.b.vf vf6 vf5 vf4 acc) (.mul.vf vf7 vf6 vf6) - (.mul.x.vf acc vf0 vf7 :mask #b1000) - (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) - (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf7) + (.add.mul.y.vf.w acc vf0 vf7 acc) + (.add.mul.z.vf.w vf7 vf0 vf7 acc) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) (let ((f1-0 0.707)) (.wait.vf) (nop!) - (.mul.vf vf6 vf6 Q :mask #b111) + (.mul.vf.xyz vf6 vf6 Q) (.mov v1-14 vf6) (b! (>= (the-as float (gpr->fpr (sar (the-as int v1-14) 32))) f1-0) cfg-17) ) @@ -287,7 +287,7 @@ (label cfg-17) (set! (-> this hanging-matrix vector 1 quad) (-> *target* control dynam gravity-normal quad)) (vector-normalize! - (vector-! (-> this hanging-matrix vector 2) (-> this world-vertex 1) (the-as vector (-> this world-vertex))) + (vector-! (-> this hanging-matrix vector 2) (-> this world-vertex 1) (-> this world-vertex 0)) 1.0 ) (vector-normalize! @@ -441,19 +441,19 @@ (.add.vf vf10 vf10 vf1) (.sub.vf vf7 vf5 vf10) (.mul.vf vf7 vf7 vf7) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.z.vf.x vf7 vf7 vf7) (.mov v1-4 vf7) (b! (< f0-0 v1-4) cfg-4) (.sub.vf vf8 vf1 vf5) (.mul.vf vf7 vf8 vf8) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.z.vf.x vf7 vf7 vf7) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b0) (nop!) (.wait.vf) (nop!) - (.mul.vf vf8 vf8 Q :mask #b101) + (.mul.vf.xz vf8 vf8 Q) (.mul.vf vf9 vf8 vf6) - (.add.z.vf vf9 vf9 vf9 :mask #b1) + (.add.z.vf.x vf9 vf9 vf9) (.mov v1-5 vf9) (b! (< v1-5 f1-0) cfg-4) ) @@ -463,7 +463,7 @@ (.mul.vf vf7 vf7 vf7) (set! (-> arg0 split) 0) (.svf (&-> arg0 outward-pt quad) vf10) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.z.vf.x vf7 vf7 vf7) (set! (-> arg0 edge) arg1) (.mov v1-6 vf7) (set! (-> arg0 rating) v1-6) @@ -509,23 +509,23 @@ (.sub.vf vf4 vf1 vf2) (.sub.vf vf5 vf3 vf2) (.mul.vf vf6 vf5 vf5) - (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.add.z.vf.x vf6 vf6 vf6) (.sqrt.vf Q vf6 :ftf #b0) (nop!) (.wait.vf) (nop!) - (.add.vf vf6 vf0 Q :mask #b1) + (.add.vf.x vf6 vf0 Q) (.nop.vf) (.mov v1-1 vf6) (let ((f1-0 v1-1)) (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (.mul.x.vf vf9 vf5 vf8) (.mov v1-2 vf8) (.mul.vf vf10 vf9 vf4) - (.add.z.vf vf10 vf10 vf10 :mask #b1) + (.add.z.vf.x vf10 vf10 vf10) (let ((f2-0 v1-2)) (.mov v1-3 vf10) (let ((f3-0 v1-3)) @@ -539,8 +539,8 @@ ) ) ) - (.mul.x.vf vf7 vf5 vf11 :mask #b111) - (.add.vf vf7 vf7 vf2 :mask #b111) + (.mul.x.vf.xyz vf7 vf5 vf11) + (.add.vf.xyz vf7 vf7 vf2) (.svf (&-> arg1 quad) vf7) (.mov v0-0 vf7) v0-0 @@ -553,7 +553,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (-> this world-vertex 1) (new 'static 'rgba :r #xff :a #x60) #f @@ -583,7 +583,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf) - (the-as vector (-> this tri-vertex)) + (-> this tri-vertex 0) (-> this world-vertex 4) (-> this world-vertex 5) (new 'static 'rgba :r #xff :a #x30) @@ -708,7 +708,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf) - (the-as vector (-> this attempts s5-1)) + (-> this attempts s5-1 vector) 409.6 (new 'static 'rgba :a #x40) ) @@ -726,7 +726,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf) - (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 0) (-> v1-3 vertex 1) (-> v1-3 vertex 2) t1-0 diff --git a/test/decompiler/reference/jak1/engine/collide/collide-func_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-func_REF.gc index d612105ae7e..e6ee22d7b3f 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-func_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-func_REF.gc @@ -25,22 +25,22 @@ (.mul.vf vf3 vf3 vf3) (.mul.vf vf6 vf1 vf1) (.mul.vf vf5 vf2 vf1) - (.add.y.vf vf4 vf4 vf4 :mask #b1) + (.add.y.vf.x vf4 vf4 vf4) (let ((result (the-as float 0))) - (.add.x.vf vf6 vf6 vf6 :mask #b10) - (.sub.x.vf vf6 vf6 vf3 :mask #b100) - (.add.z.vf vf4 vf4 vf4 :mask #b1) - (.add.x.vf vf5 vf5 vf5 :mask #b10) + (.add.x.vf.y vf6 vf6 vf6) + (.sub.x.vf.z vf6 vf6 vf3) + (.add.z.vf.x vf4 vf4 vf4) + (.add.x.vf.y vf5 vf5 vf5) (let ((v1-0 (the-as float 0))) - (.add.z.vf vf6 vf6 vf6 :mask #b10) + (.add.z.vf.y vf6 vf6 vf6) (.div.vf Q vf0 vf4 :fsf #b11 :ftf #b0) - (.add.z.vf vf5 vf5 vf5 :mask #b10) + (.add.z.vf.y vf5 vf5 vf5) (.mov a0-1 vf4) (.mul.x.vf vf7 vf6 vf4) (.mov a1-0 vf6) (.mul.vf vf8 vf5 vf5) (b! (< (the-as int a1-0) 0) cfg-7 :delay (set! a0-2 a0-1)) - (.mul.vf vf4 vf0 Q :mask #b1000) + (.mul.vf.w vf4 vf0 Q) (.sub.vf vf9 vf8 vf7) (b! (= a0-2 v1-0) cfg-6 :delay (.mov v1-1 vf5)) ) @@ -50,11 +50,11 @@ (.add.x.vf vf6 vf5 vf4) (.mov v1-4 vf6) (.mul.vf vf6 vf6 vf6) - (.mul.vf vf9 vf0 Q :mask #b1000) + (.mul.vf.w vf9 vf0 Q) (.sub.vf vf6 vf9 vf6) - (.add.w.vf vf9 vf5 vf9 :mask #b10) + (.add.w.vf.y vf9 vf5 vf9) (.mov a0-3 vf6) - (.mul.w.vf vf9 vf9 vf4 :mask #b10) + (.mul.w.vf.y vf9 vf9 vf4) (b! (< (logand (the-as uint v1-4) (the-as uint a0-3)) 0) cfg-6 :delay (.sub.y.vf vf4 vf0 vf9)) (b! #t cfg-7 :delay (.mov result vf4)) (label cfg-6) @@ -86,12 +86,12 @@ ) (init-vf0-vector) (.lvf vf1 (&-> ray-origin quad)) - (.mov.vf vf1 vf0 :mask #b10) + (.mov.vf.y vf1 vf0) (.lvf vf2 (&-> circle-origin quad)) - (.mov.vf vf2 vf0 :mask #b10) + (.mov.vf.y vf2 vf0) (.sub.vf vf1 vf1 vf2) (.lvf vf2 (&-> ray-dir quad)) - (.mov.vf vf2 vf0 :mask #b10) + (.mov.vf.y vf2 vf0) (raw-ray-sphere-intersect radius) ) ) @@ -130,10 +130,10 @@ (.mov vf14 cyl-len) (.mul.vf vf16 vf15 vf13) (.mul.vf vf17 vf11 vf13) - (.add.x.vf vf16 vf16 vf16 :mask #b10) - (.add.x.vf vf17 vf17 vf17 :mask #b10) - (.add.z.vf vf16 vf16 vf16 :mask #b10) - (.add.z.vf vf17 vf17 vf17 :mask #b10) + (.add.x.vf.y vf16 vf16 vf16) + (.add.x.vf.y vf17 vf17 vf17) + (.add.z.vf.y vf16 vf16 vf16) + (.add.z.vf.y vf17 vf17 vf17) (.mul.y.vf vf1 vf13 vf16) (.add.vf vf18 vf17 vf16) (.sub.x.vf vf19 vf16 vf14) @@ -155,7 +155,7 @@ (.mul.y.vf vf13 vf13 vf16) (.sub.x.vf vf19 vf16 vf14) (.mov a0-4 vf16) - (b! (< (the-as int a0-4) 0) cfg-6 :delay (.add.vf vf12 vf12 vf13 :mask #b111)) + (b! (< (the-as int a0-4) 0) cfg-6 :delay (.add.vf.xyz vf12 vf12 vf13)) (.mov a0-5 vf19) (b! (>= (the-as int a0-5) 0) cfg-6 :delay (.svf (&-> arg6 quad) vf12)) (b! #t cfg-7 :delay (set! v0-1 v1-4)) @@ -197,12 +197,12 @@ (.mul.vf vf8 vf8 vf4) (.mul.vf vf9 vf7 vf4) (.mul.vf vf5 vf4 vf4) - (.add.y.vf vf8 vf8 vf8 :mask #b1) - (.add.y.vf vf9 vf9 vf9 :mask #b1) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf8 vf8 vf8 :mask #b1) - (.add.z.vf vf9 vf9 vf9 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf8 vf8 vf8) + (.add.y.vf.x vf9 vf9 vf9) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf8 vf8 vf8) + (.add.z.vf.x vf9 vf9 vf9) + (.add.z.vf.x vf5 vf5 vf5) (.mov v1-0 vf9) (.mov a2-1 vf8) (.isqrt.vf Q vf0 vf5 :fsf #b11 :ftf #b0) @@ -212,14 +212,14 @@ (cond ((!= f2-0 0.0) (let ((f1-1 (/ f1-0 f2-0))) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.wait.vf) - (.mul.vf vf4 vf4 Q :mask #b111) + (.mul.vf.xyz vf4 vf4 Q) (let ((v0-0 f1-1)) (.mov vf8 v0-0) (.svf (&-> arg1 quad) vf4) (.mul.x.vf acc vf7 vf8) - (.add.mul.w.vf vf7 vf6 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf7 vf6 vf0 acc) (.svf (&-> arg0 quad) vf7) (.mov v1-1 vf7) v0-0 @@ -278,18 +278,18 @@ (.mul.vf vf17 vf9 vf9) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf6 vf4 vf5 acc) - (.add.y.vf vf17 vf17 vf17 :mask #b1) + (.add.y.vf.x vf17 vf17 vf17) (.mul.vf vf7 vf6 vf6) (.mul.vf vf10 vf10 vf6) (.mul.vf vf11 vf9 vf6) - (.add.z.vf vf17 vf17 vf17 :mask #b1) - (.add.y.vf vf7 vf7 vf7 :mask #b1) - (.add.y.vf vf10 vf10 vf10 :mask #b1) - (.add.y.vf vf11 vf11 vf11 :mask #b1) + (.add.z.vf.x vf17 vf17 vf17) + (.add.y.vf.x vf7 vf7 vf7) + (.add.y.vf.x vf10 vf10 vf10) + (.add.y.vf.x vf11 vf11 vf11) (.mov vf18 arg2) - (.add.z.vf vf7 vf7 vf7 :mask #b1) - (.add.z.vf vf10 vf10 vf10 :mask #b1) - (.add.z.vf vf11 vf11 vf11 :mask #b1) + (.add.z.vf.x vf7 vf7 vf7) + (.add.z.vf.x vf10 vf10 vf10) + (.add.z.vf.x vf11 vf11 vf11) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b0) (.mov v1-0 vf11) (.mov a0-1 vf10) @@ -297,9 +297,9 @@ (f3-0 (/ a0-1 f2-0)) ) (.sll v1-1 v1-0 1) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (b! (zero? v1-1) cfg-5 :delay (.wait.vf)) - (.mul.vf vf6 vf6 Q :mask #b111) + (.mul.vf.xyz vf6 vf6 Q) (let ((v0-0 (the-as number f3-0))) (.mov vf12 v0-0) (.svf (&-> arg5 quad) vf6) @@ -316,24 +316,24 @@ (.outer.product.b.vf vf15 vf4 vf19 acc) (.outer.product.a.vf acc vf20 vf21) (.outer.product.b.vf vf16 vf21 vf20 acc) - (.mul.vf vf14 vf14 vf6 :mask #b111) - (.mul.vf vf15 vf15 vf6 :mask #b111) - (.mul.vf vf16 vf16 vf6 :mask #b111) - (.add.x.vf vf14 vf14 vf14 :mask #b10) - (.add.x.vf vf15 vf15 vf15 :mask #b10) - (.add.x.vf vf16 vf16 vf16 :mask #b10) - (.add.z.vf vf14 vf14 vf14 :mask #b10) - (.add.z.vf vf15 vf15 vf15 :mask #b10) - (.add.z.vf vf16 vf16 vf16 :mask #b10) + (.mul.vf.xyz vf14 vf14 vf6) + (.mul.vf.xyz vf15 vf15 vf6) + (.mul.vf.xyz vf16 vf16 vf6) + (.add.x.vf.y vf14 vf14 vf14) + (.add.x.vf.y vf15 vf15 vf15) + (.add.x.vf.y vf16 vf16 vf16) + (.add.z.vf.y vf14 vf14 vf14) + (.add.z.vf.y vf15 vf15 vf15) + (.add.z.vf.y vf16 vf16 vf16) (.mov a0-2 vf14) (.mov a1-1 vf15) (.mov v1-2 vf16) (b! (< (the-as int (logior (logior a0-2 (the-as uint a1-1)) (the-as uint v1-2))) 0) cfg-5 :delay (nop!)) (b! (zero? (the int arg2)) cfg-6 :delay (nop!)) (.wait.vf) - (.mul.vf vf18 vf18 Q :mask #b1) - (.sub.x.vf vf12 vf12 vf18 :mask #b1) - (.max.x.vf vf12 vf12 vf0 :mask #b1) + (.mul.vf.x vf18 vf18 Q) + (.sub.x.vf.x vf12 vf12 vf18) + (.max.x.vf.x vf12 vf12 vf0) (b! #t cfg-6 :delay (.mov v0-0 vf12)) (label cfg-5) (set! v0-0 -859915232) diff --git a/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc index 507ea001fbd..031ee83d7bb 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-mesh_REF.gc @@ -297,11 +297,11 @@ (let ((t1-3 (* t1-2 16))) (.max.vf vf9 vf9 vf3) (let ((t2-4 (* t2-3 16))) - (.mul.x.vf acc vf0 vf7 :mask #b1000) + (.mul.x.vf.w acc vf0 vf7) (let ((t3-0 (* t0-5 16))) - (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) + (.add.mul.y.vf.w acc vf0 vf7 acc) (set! t0-4 (+ t1-3 a2-1)) - (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (.add.mul.z.vf.w vf7 vf0 vf7 acc) (set! t1-1 (+ t2-4 a2-1)) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) (set! t2-2 (+ t3-0 a2-1)) @@ -320,7 +320,7 @@ (.svf (&-> a1-1 bbox4w min quad) vf8) (.wait.vf) (.svf (&-> a1-1 bbox4w max quad) vf9) - (.mul.vf vf6 vf6 Q :mask #b111) + (.mul.vf.xyz vf6 vf6 Q) (nop!) (nop!) (.svf (&-> a1-1 normal quad) vf6) @@ -405,24 +405,19 @@ (nop!) (b! (nonzero? a1-5) cfg-1 :likely-delay (set! s4-0 (+ s4-0 96))) ) - (closest-pt-in-triangle - (the-as vector (-> s5-0 vector)) - arg1 - (the-as matrix (-> s4-0 vertex)) - (-> s4-0 normal) - ) + (closest-pt-in-triangle (-> s5-0 vector 0) arg1 (the-as matrix (-> s4-0 vertex)) (-> s4-0 normal)) (.lvf vf1 (&-> s5-0 vector 0 quad)) (.lvf vf2 (&-> arg1 quad)) (set! v1-0 (-> s5-0 vector 1 quad)) (set! a0-1 (-> s5-0 vector 2 quad)) (.sub.vf vf3 vf2 vf1) - (.mul.w.vf vf4 vf2 vf2 :mask #b1000) + (.mul.w.vf.w vf4 vf2 vf2) (.mul.vf vf3 vf3 vf3) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b10) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) + (.add.w.vf.y vf3 vf0 vf3) (.mov a1-7 vf3) (b! (>= (the-as int a1-7) 0) cfg-1 :delay (set! s4-0 (+ s4-0 96))) ) diff --git a/test/decompiler/reference/jak1/engine/collide/collide-shape-rider_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-shape-rider_REF.gc index 29a3e2d6d10..cccbe39f444 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-shape-rider_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-shape-rider_REF.gc @@ -16,7 +16,7 @@ (logtest? (-> s5-0 prim-core action) (collide-action rider-plat-sticky)) (logtest? (-> s4-0 prim-core action) (collide-action rider-target)) ) - (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (let ((f0-4 (- (- (vector-vector-distance (-> s5-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) (-> s5-0 prim-core world-sphere w) ) (-> s4-0 prim-core world-sphere w) @@ -48,7 +48,7 @@ (when (and (logtest? (-> s1-0 collide-with) s3-0) (logtest? (-> s1-0 prim-core action) (collide-action rider-plat-sticky)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s1-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> s1-0 prim-core world-sphere) (-> arg0 prim-core world-sphere)) (-> s1-0 prim-core world-sphere w) ) (-> arg0 prim-core world-sphere w) @@ -79,7 +79,7 @@ (when (and (logtest? s3-0 (-> s1-0 prim-core collide-as)) (logtest? (-> s1-0 prim-core action) (collide-action rider-target)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s1-0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> this prim-core world-sphere) (-> s1-0 prim-core world-sphere)) (-> this prim-core world-sphere w) ) (-> s1-0 prim-core world-sphere w) @@ -107,7 +107,7 @@ (set! (-> this mesh-cache-id) (-> s2-1 id)) (populate-cache! s3-1 - (the-as collide-mesh-cache-tri (-> this mesh-cache-tris)) + (-> this mesh-cache-tris 0) (-> this cshape process node-list data (-> this transform-index) bone transform) ) ) @@ -121,9 +121,9 @@ (let* ((s2-2 (new 'stack-no-clear 'collide-tri-result)) (f0-4 (sphere-on-platform-test s3-1 - (the-as collide-mesh-cache-tri (-> this mesh-cache-tris)) + (-> this mesh-cache-tris 0) s2-2 - (the-as vector (-> arg0 prim-core)) + (-> arg0 prim-core world-sphere) (-> arg1 best-dist) ) ) @@ -440,8 +440,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-12 quad) vf1) ) (cond diff --git a/test/decompiler/reference/jak1/engine/collide/collide-touch_REF.gc b/test/decompiler/reference/jak1/engine/collide/collide-touch_REF.gc index 4f1edc58069..060d31e93e0 100644 --- a/test/decompiler/reference/jak1/engine/collide/collide-touch_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/collide-touch_REF.gc @@ -484,17 +484,14 @@ (defmethod get-middle-of-bsphere-overlap ((this touching-prims-entry) (arg0 vector)) (let* ((s4-0 (-> this prim1 cprim)) (s3-0 (-> this prim2 cprim)) - (gp-1 (vector-! - (new 'stack-no-clear 'vector) - (the-as vector (-> s3-0 prim-core)) - (the-as vector (-> s4-0 prim-core)) - ) - ) + (gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> s3-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) + ) ) (let ((f1-2 (- (- (vector-length gp-1) (-> s3-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (/ f1-2 2))) ) - (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + (vector+! arg0 gp-1 (-> s4-0 prim-core world-sphere)) ) arg0 ) diff --git a/test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc b/test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc index 1598a230def..1ca2633f70f 100644 --- a/test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc +++ b/test/decompiler/reference/jak1/engine/collide/main-collide_REF.gc @@ -13,9 +13,9 @@ (nop!) (nop!) (.lvf vf1 (&-> arg0 bsphere quad)) - (.add.w.vf vf2 vf1 vf1 :mask #b111) + (.add.w.vf.xyz vf2 vf1 vf1) (let ((v1-0 (-> arg1 min quad))) - (.sub.w.vf vf1 vf1 vf1 :mask #b111) + (.sub.w.vf.xyz vf1 vf1 vf1) (let ((a1-1 (-> arg1 max quad))) (.ftoi.vf vf4 vf2) (nop!) @@ -114,13 +114,13 @@ (nop!) (vitof12.xyzw vf7 vf7) (nop!) - (.add.vf vf8 vf8 vf9 :mask #b111) + (.add.vf.xyz vf8 vf8 vf9) (nop!) (nop!) (.lvf vf9 (&-> arg0 bsphere quad)) (vitof12.xyzw vf10 vf10) (nop!) - (.mul.w.vf vf10 vf10 vf9 :mask #b1) + (.mul.w.vf.x vf10 vf10 vf9) (nop!) (.mul.x.vf acc vf5 vf9) (nop!) @@ -130,9 +130,9 @@ (let ((a1-1 (-> arg2 max quad))) (.add.mul.w.vf vf1 vf8 vf0 acc) (nop!) - (.add.x.vf vf2 vf1 vf10 :mask #b111) + (.add.x.vf.xyz vf2 vf1 vf10) (nop!) - (.sub.x.vf vf1 vf1 vf10 :mask #b111) + (.sub.x.vf.xyz vf1 vf1 vf10) (nop!) (.ftoi.vf vf4 vf2) (nop!) @@ -181,11 +181,11 @@ (.mov vf12 v1-2) (.itof.vf vf12 vf12) (nop!) - (.add.vf vf10 vf10 vf12 :mask #b111) + (.add.vf.xyz vf10 vf10 vf12) (nop!) - (.add.vf vf9 vf9 vf10 :mask #b111) + (.add.vf.xyz vf9 vf9 vf10) (nop!) - (.add.w.vf vf11 vf0 vf9 :mask #b1) + (.add.w.vf.x vf11 vf0 vf9) (nop!) (.mov a3-0 vf11) (nop!) diff --git a/test/decompiler/reference/jak1/engine/common-obs/collectables_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/collectables_REF.gc index 766d6c82ded..dcb126b257a 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/collectables_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/collectables_REF.gc @@ -331,7 +331,7 @@ (let ((a0-5 (-> self root root-prim prim-core)) (a1-2 (-> (the-as collide-shape v1-3) root-prim prim-core)) ) - (if (< (vector-vector-distance (the-as vector a0-5) (the-as vector a1-2)) (-> *FACT-bank* suck-suck-dist)) + (if (< (vector-vector-distance (-> a0-5 world-sphere) (-> a1-2 world-sphere)) (-> *FACT-bank* suck-suck-dist)) (logior! (-> self flags) (collectable-flags suck)) ) ) @@ -362,9 +362,9 @@ (gp-2 (-> v1-6 root-prim prim-core)) ) (if (and arg1 (rand-vu-percent? (the-as float 0.25))) - (eco-blue-glow (the-as vector s2-0)) + (eco-blue-glow (-> s2-0 world-sphere)) ) - (let ((f0-0 (vector-vector-distance (the-as vector s2-0) (the-as vector gp-2)))) + (let ((f0-0 (vector-vector-distance (-> s2-0 world-sphere) (-> gp-2 world-sphere)))) (cond ((and arg3 (< f0-0 8192.0)) (return #t) @@ -386,13 +386,13 @@ (+! (-> self speed w) (* 163840.0 (seconds-per-frame))) (+! (-> self speed y) (* 291271.12 (seconds-per-frame))) (set! (-> self speed y) (fmin (fmin 291271.12 (-> self speed y)) (-> self speed y))) - (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> self base) (the-as vector gp-2)))) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> self base) (-> gp-2 world-sphere)))) (vector-normalize! s5-2 (fmax 0.0 (- (vector-length s5-2) (* (-> self speed w) (seconds-per-frame))))) (vector-rotate-y! s5-2 s5-2 (* (-> self speed y) (-> self speed z) (seconds-per-frame))) (set! (-> self suck-y-offset) (* 2048.0 (sin (* 873.81335 (the float (mod (- (current-time) (-> self suck-time)) 75))))) ) - (vector+! (-> self base) (the-as vector gp-2) s5-2) + (vector+! (-> self base) (-> gp-2 world-sphere) s5-2) ) ) ((and arg2 (and (< (+ 4096.0 (-> *FACT-bank* suck-bounce-dist)) f0-0) @@ -402,7 +402,7 @@ (go-virtual wait) ) (arg1 - (add-blue-shake (-> self root trans) (the-as vector s2-0) (the-as vector gp-2)) + (add-blue-shake (-> self root trans) (-> s2-0 world-sphere) (-> gp-2 world-sphere)) ) ) ) @@ -623,7 +623,7 @@ ) ) ) - (spawn gp-0 (the-as vector s5-0)) + (spawn gp-0 (-> s5-0 world-sphere)) ) (if (nonzero? (-> self sound)) (update! (-> self sound)) @@ -689,7 +689,7 @@ (a1-1 (-> self root root-prim prim-core)) ) (if (nonzero? a0-5) - (spawn a0-5 (the-as vector a1-1)) + (spawn a0-5 (-> a1-1 world-sphere)) ) ) (if (nonzero? (-> self sound)) @@ -894,7 +894,7 @@ (let ((a0-1 (-> this part)) (a1-0 (-> this root root-prim prim-core)) ) - (spawn a0-1 (the-as vector a1-0)) + (spawn a0-1 (-> a1-0 world-sphere)) ) (if (nonzero? (-> this sound)) (update! (-> this sound)) @@ -1032,7 +1032,7 @@ (let ((a0-1 (-> this part)) (a1-0 (-> this root root-prim prim-core)) ) - (spawn a0-1 (the-as vector a1-0)) + (spawn a0-1 (-> a1-0 world-sphere)) ) (if (nonzero? (-> this sound)) (update! (-> this sound)) @@ -1067,7 +1067,7 @@ (let ((a0-1 (-> this part)) (a1-0 (-> this root root-prim prim-core)) ) - (spawn a0-1 (the-as vector a1-0)) + (spawn a0-1 (-> a1-0 world-sphere)) ) (if (nonzero? (-> this sound)) (update! (-> this sound)) @@ -1985,7 +1985,7 @@ :post (behavior () (transform-post) (if (-> self state-object) - (spawn (-> self part) (the-as vector (-> self root root-prim prim-core))) + (spawn (-> self part) (-> self root root-prim prim-core world-sphere)) ) ) ) diff --git a/test/decompiler/reference/jak1/engine/common-obs/crates_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/crates_REF.gc index 80380e2d742..d9abae82444 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/crates_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/crates_REF.gc @@ -759,7 +759,7 @@ (when v1-6 (let* ((gp-2 (-> self root root-prim prim-core)) (a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core)) - (f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))) + (f30-0 (vector-vector-distance (-> gp-2 world-sphere) (-> a1-3 world-sphere))) ) (when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel)) (logior! (-> self fact options) (fact-options can-collect)) diff --git a/test/decompiler/reference/jak1/engine/common-obs/generic-obs_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/generic-obs_REF.gc index c060145e7b2..b44b3042f4e 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/generic-obs_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/generic-obs_REF.gc @@ -1301,7 +1301,7 @@ ) (.lvf vf16 (&-> v1-36 origin quad)) (.lvf vf17 (&-> v1-36 bounds quad)) - (.mul.x.vf vf16 vf16 vf0 :mask #b1000) + (.mul.x.vf.w vf16 vf16 vf0) (.add.vf vf16 vf16 vf17) (.svf (&-> a0-18 quad) vf16) ) @@ -2365,7 +2365,7 @@ ((and (nonzero? s4-0) (type-type? (-> s4-0 type) collide-shape)) (vector+! arg1 - (the-as vector (-> (the-as collide-shape s4-0) root-prim prim-core)) + (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere) (rand-vu-sphere-point! arg1 (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere w)) ) ) @@ -2408,14 +2408,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) diff --git a/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc index 43a2e20fa05..f914643330b 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/nav-enemy_REF.gc @@ -95,7 +95,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> this collide-info root-prim prim-core)) + (-> this collide-info root-prim prim-core world-sphere) (if (logtest? (-> this nav-enemy-flags) (nav-enemy-flags navenmf2)) 'attacking ) diff --git a/test/decompiler/reference/jak1/engine/common-obs/plat-eco_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/plat-eco_REF.gc index e7897c36278..b50a09a4877 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/plat-eco_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/plat-eco_REF.gc @@ -139,7 +139,7 @@ (when v1-6 (let* ((s5-0 (-> self root root-prim prim-core)) (a1-3 (-> (the-as collide-shape v1-6) root-prim prim-core)) - (f30-0 (vector-vector-distance (the-as vector s5-0) (the-as vector a1-3))) + (f30-0 (vector-vector-distance (-> s5-0 world-sphere) (-> a1-3 world-sphere))) ) (when (rand-vu-percent? 0.5) (let ((gp-2 (new 'stack-no-clear 'vector))) diff --git a/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc index 33fb49f96e3..b540636f715 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/process-taskable_REF.gc @@ -153,9 +153,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod process-taskable-method-46 ((this process-taskable)) (when (nonzero? (-> this sound-flava)) - (let ((s5-1 - (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (the-as vector (-> this root root-prim prim-core))) - ) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root root-prim prim-core world-sphere))) ) (set! (-> s5-1 y) (* 4.0 (-> s5-1 y))) (cond @@ -173,9 +171,7 @@ ) ) (when (-> this music) - (let ((s5-3 - (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (the-as vector (-> this root root-prim prim-core))) - ) + (let ((s5-3 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this root root-prim prim-core world-sphere))) ) (set! (-> s5-3 y) (* 4.0 (-> s5-3 y))) (cond @@ -724,7 +720,7 @@ (if *target* (or (not *target*) (< 245760.0 (vector-vector-distance (-> this root trans) (-> *target* control trans)))) (< 60397978000.0 - (vector-vector-distance-squared (the-as vector (-> this root root-prim prim-core)) (camera-pos)) + (vector-vector-distance-squared (-> this root root-prim prim-core world-sphere) (camera-pos)) ) ) ) @@ -907,7 +903,7 @@ ) ) (< (-> (target-pos 0) y) (+ 8192.0 (-> self root root-prim prim-core world-sphere y))) - (< (vector-vector-distance (target-pos 0) (the-as vector (-> self root root-prim prim-core))) 32768.0) + (< (vector-vector-distance (target-pos 0) (-> self root root-prim prim-core world-sphere)) 32768.0) (= (-> *level* loading-level) (-> *level* level-default)) (not (movie?)) (not (level-hint-displayed?)) @@ -1223,11 +1219,7 @@ ) (when #t (set! (-> *camera-other-trans* quad) (-> s5-0 quad)) - (vector-normalize-copy! - (the-as vector (-> *camera-other-matrix* vector)) - (the-as vector (-> s4-0 vector)) - -1.0 - ) + (vector-normalize-copy! (-> *camera-other-matrix* vector 0) (-> s4-0 vector 0) -1.0) (set! (-> *camera-other-matrix* vector 0 w) 0.0) (vector-normalize-copy! (-> *camera-other-matrix* vector 1) (-> s4-0 vector 1) 1.0) (set! (-> *camera-other-matrix* vector 1 w) 0.0) diff --git a/test/decompiler/reference/jak1/engine/common-obs/ropebridge_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/ropebridge_REF.gc index 6a1a19455ea..a1c4a463fc4 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/ropebridge_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/ropebridge_REF.gc @@ -745,7 +745,7 @@ ;; WARN: Function (method 22 ropebridge) has a return type of none, but the expression builder found a return statement. (defmethod set-vel-from-rider ((this ropebridge) (arg0 uint) (arg1 vector) (arg2 int)) (loop - (let ((f0-0 (vector-vector-distance arg1 (the-as vector (-> this spring-point (the-as int arg0)))))) + (let ((f0-0 (vector-vector-distance arg1 (-> this spring-point (the-as int arg0) local-pos)))) (if (< (-> this tuning max-influence-dist) f0-0) (return #f) ) @@ -790,20 +790,20 @@ (let ((v1-1 (-> this tuning gravity))) (.mov vf9 v1-1) ) - (.add.x.vf vf9 vf0 vf9 :mask #b10) - (.mov.vf vf9 vf0 :mask #b1101) + (.add.x.vf.y vf9 vf0 vf9) + (.mov.vf.xzw vf9 vf0) 0 (let ((v1-4 (-> this tuning friction))) (.mov vf12 v1-4) ) - (.add.x.vf vf12 vf0 vf12 :mask #b10) - (.add.x.vf vf12 vf0 vf12 :mask #b100) + (.add.x.vf.y vf12 vf0 vf12) + (.add.x.vf.z vf12 vf0 vf12) 0 (let ((v1-7 (/ 1.0 (-> this tuning spring-mass)))) (.mov vf14 v1-7) ) - (.add.x.vf vf14 vf0 vf14 :mask #b10) - (.add.x.vf vf14 vf0 vf14 :mask #b100) + (.add.x.vf.y vf14 vf0 vf14) + (.add.x.vf.z vf14 vf0 vf14) 0 (let ((v1-11 (+ (-> this tuning num-spring-points) -2))) (let* ((a2-0 (-> this spring-point)) @@ -813,11 +813,11 @@ (label cfg-1) (.lvf vf1 (&-> a1-1 extra-force quad)) (.lvf vf3 (&-> a1-1 local-pos quad)) - (.add.vf vf1 vf1 vf9 :mask #b111) + (.add.vf.xyz vf1 vf1 vf9) (.sub.vf vf5 vf2 vf3) - (.mul.vf vf7 vf5 vf5 :mask #b111) - (.add.y.vf vf7 vf7 vf7 :mask #b1) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.mul.vf.xyz vf7 vf5 vf5) + (.add.y.vf.x vf7 vf7 vf7) + (.add.z.vf.x vf7 vf7 vf7) (.mov a2-1 vf7) (let ((f0-5 (- a2-1 (-> this tuning desired-spring-len)))) (when (< 0.0 f0-5) @@ -827,17 +827,17 @@ (let ((a2-5 (* f0-5 (-> this tuning spring-coefficient)))) (.mov vf10 a2-5) ) - (.mul.x.vf vf10 vf5 vf10 :mask #b111) - (.add.vf vf1 vf1 vf10 :mask #b111) + (.mul.x.vf.xyz vf10 vf5 vf10) + (.add.vf.xyz vf1 vf1 vf10) 0 ) ) (let ((a2-8 (&+ a1-1 48))) (.lvf vf4 (&-> a2-8 local-pos quad)) (.sub.vf vf6 vf4 vf3) - (.mul.vf vf8 vf6 vf6 :mask #b111) - (.add.y.vf vf8 vf8 vf8 :mask #b1) - (.add.z.vf vf8 vf8 vf8 :mask #b1) + (.mul.vf.xyz vf8 vf6 vf6) + (.add.y.vf.x vf8 vf8 vf8) + (.add.z.vf.x vf8 vf8 vf8) (.mov a3-0 vf8) (let ((f0-8 (- a3-0 (-> this tuning desired-spring-len)))) (when (< 0.0 f0-8) @@ -847,15 +847,15 @@ (let ((a3-4 (* f0-8 (-> this tuning spring-coefficient)))) (.mov vf10 a3-4) ) - (.mul.x.vf vf10 vf6 vf10 :mask #b111) - (.add.vf vf1 vf1 vf10 :mask #b111) + (.mul.x.vf.xyz vf10 vf6 vf10) + (.add.vf.xyz vf1 vf1 vf10) 0 ) ) - (.mul.vf vf15 vf1 vf14 :mask #b111) + (.mul.vf.xyz vf15 vf1 vf14) (.lvf vf11 (&-> a1-1 vel quad)) - (.add.vf vf11 vf11 vf15 :mask #b111) - (.mul.vf vf11 vf11 vf12 :mask #b111) + (.add.vf.xyz vf11 vf11 vf15) + (.mul.vf.xyz vf11 vf11 vf12) (.svf (&-> a1-1 vel quad) vf11) (set! a1-1 a2-8) ) @@ -868,16 +868,16 @@ (let ((v1-13 (seconds-per-frame))) (.mov vf13 v1-13) ) - (.add.x.vf vf13 vf0 vf13 :mask #b10) - (.add.x.vf vf13 vf0 vf13 :mask #b100) + (.add.x.vf.y vf13 vf0 vf13) + (.add.x.vf.z vf13 vf0 vf13) 0 (let ((v1-17 (+ (-> this tuning num-spring-points) -2))) (let ((a0-1 (the-as object (&-> this stack 320)))) (label cfg-7) (.lvf vf11 (&-> (the-as (inline-array vector) a0-1) 1 quad)) (.lvf vf3 (&-> (the-as (inline-array vector) a0-1) 0 quad)) - (.mul.vf vf11 vf11 vf13 :mask #b111) - (.add.vf vf3 vf3 vf11 :mask #b111) + (.mul.vf.xyz vf11 vf11 vf13) + (.add.vf.xyz vf3 vf3 vf11) (.svf (&-> (the-as (inline-array vector) a0-1) 0 quad) vf3) (set! a0-1 (-> (the-as (inline-array vector) a0-1) 3)) ) @@ -939,11 +939,11 @@ (let ((v1-3 (the-as ropebridge-spring-point (-> this spring-point)))) (.mov vf2 a1-2) (.add.x.vf vf2 vf0 vf2) - (.mov.vf vf2 vf0 :mask #b1011) + (.mov.vf.xyw vf2 vf0) (countdown (a0-5 (-> this tuning num-spring-points)) (.svf (&-> v1-3 local-pos quad) vf1) (.svf (&-> v1-3 vel quad) vf0) - (.add.vf vf1 vf1 vf2 :mask #b111) + (.add.vf.xyz vf1 vf1 vf2) (&+! v1-3 48) ) ) @@ -970,7 +970,7 @@ (while (< s4-0 (-> arg0 tuning num-springs)) (set! s3-0 (&+ (the-as ropebridge-spring-point s3-0) 48)) (let ((v1-4 (new 'stack-no-clear 'vector))) - (vector-! v1-4 (-> (the-as ropebridge-spring-point s3-0) local-pos) (the-as vector (-> s5-1 0))) + (vector-! v1-4 (-> (the-as ropebridge-spring-point s3-0) local-pos) (-> s5-1 0 local-pos)) (let ((f0-8 (- (atan (-> v1-4 y) (-> v1-4 z)))) (s2-0 (-> arg0 node-list data (+ s4-0 4) bone transform)) ) diff --git a/test/decompiler/reference/jak1/engine/common-obs/water_REF.gc b/test/decompiler/reference/jak1/engine/common-obs/water_REF.gc index 98b60f7fb4d..742cb6aa1c9 100644 --- a/test/decompiler/reference/jak1/engine/common-obs/water_REF.gc +++ b/test/decompiler/reference/jak1/engine/common-obs/water_REF.gc @@ -37,7 +37,7 @@ ;; definition for function birth-func-ocean-height ;; INFO: Return type mismatch int vs none. (defun birth-func-ocean-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! (-> arg2 vector 0 y) (+ (ocean-get-height (the-as vector (-> arg2 vector))) (-> arg1 user-float))) + (set! (-> arg2 vector 0 y) (+ (ocean-get-height (-> arg2 vector 0)) (-> arg1 user-float))) 0 (none) ) @@ -682,7 +682,7 @@ ) ((begin (set! (-> this top 1 quad) (-> this top 0 quad)) - (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (vector<-cspace! (-> this top 0) (-> this process node-list data (-> this joint-index))) (+! (-> this top 0 y) (-> this top-y-offset)) (set! (-> this bottom 1 quad) (-> this bottom 0 quad)) (set! (-> this bottom 0 quad) (-> this process root trans quad)) @@ -695,9 +695,7 @@ ) ) ) - (set! (-> this real-ocean-offset) - (- (ocean-get-height (the-as vector (-> this bottom))) (-> this base-height)) - ) + (set! (-> this real-ocean-offset) (- (ocean-get-height (-> this bottom 0)) (-> this base-height))) (if (not (logtest? (-> this flags) (water-flags wt09))) (set! (-> this ocean-offset) (-> this real-ocean-offset)) (set! (-> this ocean-offset) (lerp (-> this ocean-offset) (-> this real-ocean-offset) 0.2)) @@ -705,7 +703,7 @@ ) ((logtest? (water-flags wt20) (-> this flags)) (let* ((a0-26 (-> this volume process 0)) - (f30-0 (ripple-find-height (the-as process-drawable a0-26) 0 (the-as vector (-> this bottom)))) + (f30-0 (ripple-find-height (the-as process-drawable a0-26) 0 (-> this bottom 0))) ) (set! (-> this real-ocean-offset) (- f30-0 (-> this base-height))) (if (not (logtest? (-> this flags) (water-flags wt09))) diff --git a/test/decompiler/reference/jak1/engine/debug/debug_REF.gc b/test/decompiler/reference/jak1/engine/debug/debug_REF.gc index 75a698bf7cf..bc4a474aac4 100644 --- a/test/decompiler/reference/jak1/engine/debug/debug_REF.gc +++ b/test/decompiler/reference/jak1/engine/debug/debug_REF.gc @@ -30,10 +30,10 @@ (.add.mul.z.vf vf5 vf3 vf5 acc) (.div.vf Q vf9 vf5 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf5 vf5 Q :mask #b111) + (.mul.vf.xyz vf5 vf5 Q) (.add.vf vf5 vf5 vf8) - (.max.x.vf vf5 vf5 vf0 :mask #b1000) - (.min.x.vf vf5 vf5 vf6 :mask #b1000) + (.max.x.vf.w vf5 vf5 vf0) + (.min.x.vf.w vf5 vf5 vf6) (vftoi4.xyzw vf5 vf5) (.svf (&-> arg1 quad) vf5) arg1 @@ -391,7 +391,7 @@ (set! (-> arg2 w) 1.0) (set! (-> arg3 w) 1.0) (set! (-> arg4 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s5-0 vector)) arg2) + (when (and (transform-point-qword! (-> s5-0 vector 0) arg2) (transform-point-qword! (-> s5-0 vector 1) arg3) (transform-point-qword! (-> s5-0 vector 2) arg4) ) @@ -985,7 +985,7 @@ arg0 arg1 (-> arg2 vector 3) - (the-as vector (-> arg2 vector)) + (-> arg2 vector 0) (meters 2) (new 'static 'rgba :r #xff :a #x80) ) @@ -1010,14 +1010,7 @@ ;; definition (debug) for function add-debug-rot-matrix (defun-debug add-debug-rot-matrix ((arg0 symbol) (arg1 bucket-id) (arg2 matrix) (arg3 vector)) - (add-debug-vector - arg0 - arg1 - arg3 - (the-as vector (-> arg2 vector)) - (meters 2) - (new 'static 'rgba :r #xff :a #x80) - ) + (add-debug-vector arg0 arg1 arg3 (-> arg2 vector 0) (meters 2) (new 'static 'rgba :r #xff :a #x80)) (add-debug-vector arg0 arg1 arg3 (-> arg2 vector 1) (meters 2) (new 'static 'rgba :g #xff :a #x80)) (add-debug-vector arg0 arg1 arg3 (-> arg2 vector 2) (meters 2) (new 'static 'rgba :b #xff :a #x80)) arg2 @@ -1336,7 +1329,6 @@ ) ;; definition for method 3 of type debug-vertex-stats -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this debug-vertex-stats)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tlength: ~D~%" (-> this length)) diff --git a/test/decompiler/reference/jak1/engine/debug/part-tester_REF.gc b/test/decompiler/reference/jak1/engine/debug/part-tester_REF.gc index 6f7d1c4c153..3a9f1249205 100644 --- a/test/decompiler/reference/jak1/engine/debug/part-tester_REF.gc +++ b/test/decompiler/reference/jak1/engine/debug/part-tester_REF.gc @@ -64,7 +64,7 @@ (when (!= gp-1 (-> self old-group)) (when (nonzero? (-> self part)) (kill-and-free-particles (-> self part)) - (set! (-> self heap-cur) (&-> (-> self part) type)) + (set! (-> self heap-cur) (&-> self part type)) ) (set! (-> self part) (create-launch-control gp-1 self)) ) diff --git a/test/decompiler/reference/jak1/engine/draw/drawable_REF.gc b/test/decompiler/reference/jak1/engine/draw/drawable_REF.gc index 38caf1ff1c1..54356c53c8b 100644 --- a/test/decompiler/reference/jak1/engine/draw/drawable_REF.gc +++ b/test/decompiler/reference/jak1/engine/draw/drawable_REF.gc @@ -587,7 +587,7 @@ ) (.lvf vf16 (&-> arg1 origin quad)) (.lvf vf17 (&-> arg1 bounds quad)) - (.mul.x.vf vf16 vf16 vf0 :mask #b1000) + (.mul.x.vf.w vf16 vf16 vf0) (.add.vf vf16 vf16 vf17) (.svf (&-> s4-0 quad) vf16) (.lvf vf28 (&-> arg1 color-mult quad)) @@ -604,7 +604,7 @@ (set-vector! a1-1 0.612 0.5 -0.612 0.0) (set-vector! s1-0 -0.696 0.174 0.696 0.0) (vector-matrix*! (the-as vector (-> tod title-light-group)) a1-1 s0-0) - (vector-matrix*! (the-as vector (-> tod title-light-group dir1)) s1-0 s0-0) + (vector-matrix*! (-> tod title-light-group dir1 direction) s1-0 s0-0) ) (set-vector! (-> *time-of-day-context* current-shadow) 0.612 -0.5 -0.612 1.0) ) @@ -718,7 +718,7 @@ ) ) (if *display-lights* - (add-debug-lights #t (bucket-id debug) (the-as (inline-array light) (-> tod light-group)) (-> arg1 origin)) + (add-debug-lights #t (bucket-id debug) (-> tod light-group 0 lights) (-> arg1 origin)) ) (let ((at-0 *math-camera*)) (.lvf vf16 (&-> at-0 plane 0 quad)) @@ -739,15 +739,15 @@ (.mul.w.vf acc vf27 vf0) (.add.mul.x.vf acc vf24 vf15 acc) (.add.mul.y.vf acc vf25 vf15 acc) - (.add.mul.z.vf vf15 vf26 vf15 acc :mask #b111) + (.add.mul.z.vf.xyz vf15 vf26 vf15 acc) (.mul.vf vf28 vf15 vf15) (.max.w.vf vf29 vf0 vf0) (.add.y.vf acc vf28 vf28) - (.add.mul.z.vf vf28 vf29 vf28 acc :mask #b1) + (.add.mul.z.vf.x vf28 vf29 vf28 acc) (.sqrt.vf Q vf28 :ftf #b0) - (.sub.w.vf vf28 vf0 vf15 :mask #b1000) + (.sub.w.vf.w vf28 vf0 vf15) (.wait.vf) - (.add.vf vf15 vf28 Q :mask #b1000) + (.add.vf.w vf15 vf28 Q) (.svf (&-> v1-42 quad) vf15) (when (< 0.0 (+ (-> v1-42 z) (-> arg1 bounds w))) (let ((lod-to-use 0)) diff --git a/test/decompiler/reference/jak1/engine/draw/process-drawable_REF.gc b/test/decompiler/reference/jak1/engine/draw/process-drawable_REF.gc index fd3f3540e14..e950895df36 100644 --- a/test/decompiler/reference/jak1/engine/draw/process-drawable_REF.gc +++ b/test/decompiler/reference/jak1/engine/draw/process-drawable_REF.gc @@ -47,10 +47,10 @@ (.lvf vf2 (&-> (-> arg1 bone) transform vector 3 quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -167,7 +167,7 @@ (set! gp-0 (the-as cspace-array #f)) (goto cfg-16) ) - (let ((v1-10 ((method-of-type cspace reset-and-assign-geo!) (the-as cspace (-> gp-0 data)) #f))) + (let ((v1-10 ((method-of-type cspace reset-and-assign-geo!) (-> gp-0 data 0) #f))) (set! (-> v1-10 bone) (the-as bone (-> s4-1 bones))) (let ((a0-6 (-> gp-0 data))) (set! (-> a0-6 0 param0) cspace<-transformq!) @@ -288,7 +288,7 @@ ) ((zero? (-> this skel)) (matrix<-transformq+trans! - (the-as matrix (-> this draw skeleton bones 3)) + (-> this draw skeleton bones 3 transform) (the-as transformq (-> this root trans)) (-> this draw skeleton bones 0 transform vector 3) ) @@ -299,7 +299,7 @@ (let ((s4-0 (+ s5-0 2))) (+ s4-0 1) ((-> this skel generate-frame-function) - (the-as (inline-array vector) (-> (the-as terrain-context #x70000000) work foreground joint-work mtx-acc)) + (-> (the-as terrain-context #x70000000) work foreground joint-work mtx-acc 0 vector) s4-0 this ) diff --git a/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc b/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc index ebe3eeebc92..25a3842222a 100644 --- a/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/ambient_REF.gc @@ -1035,7 +1035,7 @@ (let ((v1-28 ((method-of-type res-lump lookup-tag-idx) this 'effect-param 'exact 0.0))) (set! (-> this ambient-data user-float 1) (the-as float (if (< (the-as int v1-28) 0) (the-as (pointer res-tag) #f) - (&-> (-> this tag) (-> v1-28 lo)) + (&-> this tag (-> v1-28 lo)) ) ) ) diff --git a/test/decompiler/reference/jak1/engine/entity/entity_REF.gc b/test/decompiler/reference/jak1/engine/entity/entity_REF.gc index c0e89198bff..1de851b463c 100644 --- a/test/decompiler/reference/jak1/engine/entity/entity_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/entity_REF.gc @@ -1166,7 +1166,7 @@ (add-debug-box #t (bucket-id debug) - (the-as vector (-> s3-4 data s2-4)) + (-> s3-4 data s2-4 min) (the-as vector (+ (the-as uint (-> s3-4 data 0 max)) (* s2-4 32))) (if (zero? (-> s4-4 index)) (new 'static 'rgba :g #x80 :b #x80 :a #x80) diff --git a/test/decompiler/reference/jak1/engine/entity/res_REF.gc b/test/decompiler/reference/jak1/engine/entity/res_REF.gc index 702ac0a0025..b04e71717c4 100644 --- a/test/decompiler/reference/jak1/engine/entity/res_REF.gc +++ b/test/decompiler/reference/jak1/engine/entity/res_REF.gc @@ -57,8 +57,8 @@ (set! (-> this allocated-length) data-count) (set! (-> this data-size) data-size) (set! (-> this length) 0) - (set! (-> this data-base) (&-> (-> this tag) data-count)) - (set! (-> this data-top) (&-> (-> this tag) data-count)) + (set! (-> this data-base) (&-> this tag data-count)) + (set! (-> this data-top) (&-> this tag data-count)) this ) ) @@ -75,7 +75,6 @@ ) ;; definition for method 3 of type res-lump -;; INFO: this function exists in multiple non-identical object files ;; INFO: Used lq/sq (defmethod inspect ((this res-lump)) (format #t "[~8x] ~A~%" this (-> this type)) @@ -179,7 +178,7 @@ (goto cfg-73) ) (let ((interp-tag-idx tag-idx) - (tag-ptr (&-> (-> this tag) tag-idx)) + (tag-ptr (&-> this tag tag-idx)) ) (while (not (or (>= interp-tag-idx (-> this length)) (< type-chars (-> (the-as (pointer uint64) (-> (symbol->string (-> tag-ptr 0 name)) data)) 0)) diff --git a/test/decompiler/reference/jak1/engine/game/effect-control_REF.gc b/test/decompiler/reference/jak1/engine/game/effect-control_REF.gc index f0708eda41b..881fdb62138 100644 --- a/test/decompiler/reference/jak1/engine/game/effect-control_REF.gc +++ b/test/decompiler/reference/jak1/engine/game/effect-control_REF.gc @@ -149,13 +149,13 @@ (set! (-> this res) (-> s5-0 extra)) (let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo))) (set! (-> this name) (if (>= (the-as int v1-6) 0) - (&-> (-> s5-0 extra tag) v1-6) + (&-> s5-0 extra tag v1-6) (the-as (pointer res-tag) #f) ) ) ) (if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0)) - (set! (-> this name) (&-> (-> this name) 1)) + (set! (-> this name) (&-> this name 1)) ) (effect-control-method-14 this f30-0 f30-0 f30-0) ) diff --git a/test/decompiler/reference/jak1/engine/game/game-save_REF.gc b/test/decompiler/reference/jak1/engine/game/game-save_REF.gc index 70053b70a44..33e6366360b 100644 --- a/test/decompiler/reference/jak1/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/jak1/engine/game/game-save_REF.gc @@ -424,7 +424,7 @@ (set! (-> s2-0 elt-count) (+ (length arg1) 1)) (set! (-> s2-0 elt-size) (the-as uint 1)) ) - (copy-charp<-charp (the-as (pointer uint8) (-> (the-as (inline-array game-save-tag) s3-2) 1)) (-> arg1 data)) + (copy-charp<-charp (-> (the-as (inline-array game-save-tag) s3-2) 1 user-uint8) (-> arg1 data)) (let ((v1-37 (&+ (the-as pointer s3-2) (+ (logand -16 (+ (-> (the-as (inline-array game-save-tag) s3-2) 0 elt-count) 15)) 16) @@ -461,10 +461,7 @@ (set! (-> s2-1 elt-count) (+ ((method-of-type string length) s3-3) 1)) (set! (-> s2-1 elt-size) (the-as uint 1)) ) - (copy-charp<-charp - (the-as (pointer uint8) (the-as game-save-tag (&+ (the-as game-save-tag s4-1) 16))) - (-> s3-3 data) - ) + (copy-charp<-charp (-> (the-as game-save-tag (&+ (the-as game-save-tag s4-1) 16)) user-uint8) (-> s3-3 data)) ) (let ((v1-50 (&+ (the-as pointer s4-1) (+ (logand -16 (+ (-> (the-as game-save-tag s4-1) elt-count) 15)) 16)))) (let ((a0-24 (the-as game-save-tag (&+ v1-50 0)))) @@ -1593,7 +1590,7 @@ auto-save-post 0 (label cfg-7) (set! (-> self result) - (mc-save (-> self card) (-> self which) (&-> (-> self save) type) (the-as int (-> self save info-int32))) + (mc-save (-> self card) (-> self which) (&-> self save type) (the-as int (-> self save info-int32))) ) (when (!= (-> self result) (mc-status-code ok)) (suspend) diff --git a/test/decompiler/reference/jak1/engine/game/projectiles_REF.gc b/test/decompiler/reference/jak1/engine/game/projectiles_REF.gc index 6a4336275ee..1ec576b1ee5 100644 --- a/test/decompiler/reference/jak1/engine/game/projectiles_REF.gc +++ b/test/decompiler/reference/jak1/engine/game/projectiles_REF.gc @@ -74,11 +74,11 @@ ) (when (the-as collide-shape-moving s4-1) (let* ((s3-1 (-> s4-1 root-prim prim-core)) - (f30-0 (- (vector-vector-distance (-> gp-0 point) (the-as vector s3-1)) (-> s3-1 world-sphere w))) + (f30-0 (- (vector-vector-distance (-> gp-0 point) (-> s3-1 world-sphere)) (-> s3-1 world-sphere w))) ) (when (nonzero? (-> s4-1 root-prim prim-core collide-as)) (let ((s4-2 0) - (v1-8 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-1) (-> gp-0 point)) 1.0)) + (v1-8 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s3-1 world-sphere) (-> gp-0 point)) 1.0)) ) (if (logtest? (process-mask enemy) (-> s5-0 mask)) (set! s4-2 (logior s4-2 1)) @@ -133,7 +133,7 @@ (send-event (-> arg0 process) 'die) ) ) - (vector-! sv-64 (the-as vector (-> arg1 best-from-prim prim-core)) (-> arg1 best-tri intersect)) + (vector-! sv-64 (-> arg1 best-from-prim prim-core world-sphere) (-> arg1 best-tri intersect)) (set! (-> sv-64 w) 1.0) (vector-normalize! sv-64 1.0) (set! (-> arg0 coverage) (vector-dot sv-64 (-> arg1 best-tri normal))) @@ -625,7 +625,7 @@ ;; definition for method 24 of type projectile ;; INFO: Return type mismatch int vs none. (defmethod projectile-method-24 ((this projectile)) - (spawn (-> this part) (the-as vector (-> this root root-prim prim-core))) + (spawn (-> this part) (-> this root root-prim prim-core world-sphere)) 0 (none) ) @@ -1038,11 +1038,11 @@ (set! (-> *part-id-table* 353 init-specs 16 random-rangef) (the-as float 0)) 0 ) - (spawn (-> this part) (the-as vector (-> this root root-prim prim-core))) + (spawn (-> this part) (-> this root root-prim prim-core world-sphere)) ) ) (else - (spawn (-> this part) (the-as vector (-> this root root-prim prim-core))) + (spawn (-> this part) (-> this root root-prim prim-core world-sphere)) ) ) (let ((s5-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) @@ -1281,7 +1281,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod projectile-method-24 ((this projectile-blue)) (if (rand-vu-percent? 0.75) - (eco-blue-glow (the-as vector (-> this root root-prim prim-core))) + (eco-blue-glow (-> this root root-prim prim-core world-sphere)) ) 0 (none) diff --git a/test/decompiler/reference/jak1/engine/geometry/bounding-box_REF.gc b/test/decompiler/reference/jak1/engine/geometry/bounding-box_REF.gc index 10d85bd05a8..ddfc6e93d8a 100644 --- a/test/decompiler/reference/jak1/engine/geometry/bounding-box_REF.gc +++ b/test/decompiler/reference/jak1/engine/geometry/bounding-box_REF.gc @@ -39,8 +39,8 @@ (.add.vf vf5 vf4 vf3) (.min.vf vf1 vf4 vf5) (.max.vf vf2 vf4 vf5) - (.mov.vf vf1 vf0 :mask #b1000) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) + (.mov.vf.w vf2 vf0) (.svf (&-> this min quad) vf1) (.svf (&-> this max quad) vf2) 0 @@ -102,10 +102,10 @@ (.add.vf vf6 vf5 vf4) (.min.vf vf2 vf5 vf6) (.max.vf vf3 vf5 vf6) - (.add.x.vf vf3 vf3 vf1 :mask #b111) - (.sub.x.vf vf2 vf2 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.add.x.vf.xyz vf3 vf3 vf1) + (.sub.x.vf.xyz vf2 vf2 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 @@ -121,10 +121,10 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.w.vf vf2 vf1 vf1 :mask #b111) - (.add.w.vf vf3 vf1 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.sub.w.vf.xyz vf2 vf1 vf1) + (.add.w.vf.xyz vf3 vf1 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 diff --git a/test/decompiler/reference/jak1/engine/geometry/cylinder_REF.gc b/test/decompiler/reference/jak1/engine/geometry/cylinder_REF.gc index a7b3f904337..69ecc48a385 100644 --- a/test/decompiler/reference/jak1/engine/geometry/cylinder_REF.gc +++ b/test/decompiler/reference/jak1/engine/geometry/cylinder_REF.gc @@ -97,8 +97,8 @@ (let ((v1-5 (-> s3-0 vector 3))) (.lvf vf4 (&-> (-> this origin) quad)) (.lvf vf5 (&-> sv-896 vector 0 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-5 quad) vf6) ) (set! sv-912 0) @@ -264,8 +264,8 @@ (let ((v1-5 (-> s3-0 vector 3))) (.lvf vf4 (&-> (-> this origin) quad)) (.lvf vf5 (&-> sv-448 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-5 quad) vf6) ) (set! sv-464 0) diff --git a/test/decompiler/reference/jak1/engine/geometry/geometry_REF.gc b/test/decompiler/reference/jak1/engine/geometry/geometry_REF.gc index b4a159528e1..bc665d8c5fa 100644 --- a/test/decompiler/reference/jak1/engine/geometry/geometry_REF.gc +++ b/test/decompiler/reference/jak1/engine/geometry/geometry_REF.gc @@ -12,7 +12,7 @@ (init-vf0-vector) (.lvf vf1 (&-> src quad)) (.lvf vf2 (&-> plane-normal quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -33,13 +33,13 @@ (init-vf0-vector) (.lvf vf1 (&-> src quad)) (.lvf vf2 (&-> plane-normal quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf acc vf3 vf3 :mask #b111) - (.sub.mul.w.vf vf3 vf1 vf0 acc :mask #b111) + (.add.vf.xyz acc vf3 vf3) + (.sub.mul.w.vf.xyz vf3 vf1 vf0 acc) (.svf (&-> dst quad) vf3) dst ) @@ -56,12 +56,12 @@ (init-vf0-vector) (.lvf vf1 (&-> src quad)) (.lvf vf2 (&-> plane-normal quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf vf3 vf3 vf2 :mask #b111) + (.add.vf.xyz vf3 vf3 vf2) (.svf (&-> dst quad) vf3) dst ) @@ -78,7 +78,7 @@ (init-vf0-vector) (.lvf vf1 (&-> src quad)) (.lvf vf2 (&-> plane-normal quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -99,7 +99,7 @@ (init-vf0-vector) (.lvf vf1 (&-> src quad)) (.lvf vf2 (&-> plane-normal quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -137,12 +137,12 @@ (.sub.vf vf1 vf4 vf3) (.sub.vf vf6 vf5 vf3) (.mul.vf vf2 vf1 vf1) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b0) @@ -152,8 +152,8 @@ (.mul.vf vf1 vf1 Q) (.mul.vf vf7 vf1 vf6) (let ((f1-0 0.0)) - (.add.y.vf vf7 vf7 vf7 :mask #b1) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.y.vf.x vf7 vf7 vf7) + (.add.z.vf.x vf7 vf7 vf7) (.mov v1-1 vf7) (let ((f0-0 v1-1)) (b! (< f0-0 f1-0) cfg-4 :likely-delay (set! f0-0 f1-0)) @@ -166,18 +166,18 @@ ) ) (.mul.x.vf vf1 vf1 vf7) - (b! (= arg3 #f) cfg-6 :delay (.mov.vf vf8 vf0 :mask #b1000)) - (.add.vf vf8 vf3 vf1 :mask #b111) + (b! (= arg3 #f) cfg-6 :delay (.mov.vf.w vf8 vf0)) + (.add.vf.xyz vf8 vf3 vf1) (.svf (&-> arg3 quad) vf8) (label cfg-6) (.sub.vf vf2 vf6 vf1) (.mul.vf vf2 vf2 vf2) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.mov v0-0 vf2) v0-0 @@ -226,27 +226,27 @@ (.lvf vf1 (&-> arg2 vec quad)) (.lvf vf6 (&-> arg1 quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.mul.w.vf acc vf0 vf6) (.add.mul.x.vf acc vf2 vf6 acc) (.add.mul.y.vf acc vf3 vf6 acc) @@ -260,9 +260,9 @@ ;; INFO: Used lq/sq (defun forward-down->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) (vector-normalize-copy! (-> arg0 vector 2) arg1 1.0) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 2) arg2) - (vector-normalize! (the-as vector (-> arg0 vector)) 1.0) - (vector-cross! (-> arg0 vector 1) arg1 (the-as vector (-> arg0 vector))) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 2) arg2) + (vector-normalize! (-> arg0 vector 0) 1.0) + (vector-cross! (-> arg0 vector 1) arg1 (-> arg0 vector 0)) (vector-normalize! (-> arg0 vector 1) 1.0) (set! (-> arg0 vector 3 quad) (the-as uint128 0)) (set! (-> arg0 vector 0 w) 0.0) @@ -277,9 +277,9 @@ (defun forward-down-nopitch->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) (vector-normalize-copy! (-> arg0 vector 1) arg2 1.0) (vector-negate! (-> arg0 vector 1) (-> arg0 vector 1)) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 1) arg1) - (vector-normalize! (the-as vector (-> arg0 vector)) 1.0) - (vector-cross! (-> arg0 vector 2) (the-as vector (-> arg0 vector)) (-> arg0 vector 1)) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 1) arg1) + (vector-normalize! (-> arg0 vector 0) 1.0) + (vector-cross! (-> arg0 vector 2) (-> arg0 vector 0) (-> arg0 vector 1)) (vector-normalize! (-> arg0 vector 2) 1.0) (set! (-> arg0 vector 3 quad) (the-as uint128 0)) (set! (-> arg0 vector 0 w) 0.0) @@ -599,12 +599,12 @@ (.outer.product.a.vf acc vf2 vf1) (.outer.product.b.vf vf4 vf1 vf2 acc) (.mul.vf vf5 vf4 vf4) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.isqrt.vf Q vf0 vf5 :fsf #b11 :ftf #b0) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.wait.vf) - (.mul.vf vf4 vf4 Q :mask #b111) + (.mul.vf.xyz vf4 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -625,7 +625,7 @@ (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) (.lvf vf3 (&-> arg3 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.sub.vf vf3 vf3 vf1) (.outer.product.a.vf acc vf2 vf3) @@ -684,13 +684,13 @@ (.outer.product.a.vf acc vf9 vf10) (.outer.product.b.vf vf16 vf10 vf9 acc) (.mul.vf vf12 vf15 vf1) - (.add.x.vf vf11 vf11 vf11 :mask #b10) + (.add.x.vf.y vf11 vf11 vf11) (.mul.vf vf13 vf16 vf1) - (.add.x.vf vf12 vf12 vf12 :mask #b10) - (.add.x.vf vf13 vf13 vf13 :mask #b10) - (.add.z.vf vf11 vf11 vf11 :mask #b10) - (.add.z.vf vf12 vf12 vf12 :mask #b10) - (.add.z.vf vf13 vf13 vf13 :mask #b10) + (.add.x.vf.y vf12 vf12 vf12) + (.add.x.vf.y vf13 vf13 vf13) + (.add.z.vf.y vf11 vf11 vf11) + (.add.z.vf.y vf12 vf12 vf12) + (.add.z.vf.y vf13 vf13 vf13) (.mov v1-0 vf11) (.mov a1-1 vf12) (.mov a0-1 vf13) @@ -704,17 +704,17 @@ (b! (nonzero? v1-3) cfg-3 :delay (set! v1-4 (+ v1-3 -1))) ) (.sub.vf vf17 vf5 vf2) - (.mov.vf vf18 vf0 :mask #b1000) + (.mov.vf.w vf18 vf0) (.outer.product.a.vf acc vf17 vf1) (.outer.product.b.vf vf18 vf1 vf17 acc) (.outer.product.a.vf acc vf1 vf18) (.outer.product.b.vf vf18 vf18 vf1 acc) - (.add.vf vf18 vf18 vf2 :mask #b111) + (.add.vf.xyz vf18 vf18 vf2) (b! #t cfg-24 :delay (.svf (&-> arg0 quad) vf18)) (nop!) (label cfg-3) (b! (nonzero? v1-4) cfg-6 :delay (set! v1-5 (+ v1-4 -1))) - (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 1) arg0) + (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 1) arg0) (goto cfg-24) (label cfg-6) (b! (nonzero? v1-5) cfg-9 :delay (set! v1-6 (+ v1-5 -1))) @@ -722,7 +722,7 @@ (goto cfg-24) (label cfg-9) (b! (nonzero? v1-6) cfg-14 :delay (set! v1-7 (+ v1-6 -1))) - (let ((f30-0 (vector-segment-distance-point! arg1 (-> arg2 vector 1) (the-as vector (-> arg2 vector)) arg0)) + (let ((f30-0 (vector-segment-distance-point! arg1 (-> arg2 vector 1) (-> arg2 vector 0) arg0)) (s3-0 (new 'stack-no-clear 'vector)) ) (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 1) (-> arg2 vector 2) s3-0) f30-0) @@ -732,20 +732,20 @@ (goto cfg-24) (label cfg-14) (b! (nonzero? v1-7) cfg-17 :delay (set! v1-10 (+ v1-7 -1))) - (vector-segment-distance-point! arg1 (-> arg2 vector 2) (the-as vector (-> arg2 vector)) arg0) + (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 0) arg0) (goto cfg-24) (label cfg-17) (b! (nonzero? v1-10) cfg-22 :delay (nop!)) - (let ((f30-1 (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 1) arg0)) + (let ((f30-1 (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 1) arg0)) (s3-1 (new 'stack-no-clear 'vector)) ) - (if (< (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 2) s3-1) f30-1) + (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 2) s3-1) f30-1) (set! (-> arg0 quad) (-> s3-1 quad)) ) ) (goto cfg-24) (label cfg-22) - (let ((f30-2 (vector-segment-distance-point! arg1 (-> arg2 vector 2) (the-as vector (-> arg2 vector)) arg0)) + (let ((f30-2 (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 0) arg0)) (s3-2 (new 'stack-no-clear 'vector)) ) (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 1) s3-2) f30-2) @@ -795,13 +795,13 @@ (.mul.vf vf3 vf3 vf1) (.nop.vf) (.mul.vf vf4 vf4 vf1) - (.add.x.vf vf2 vf2 vf2 :mask #b10) - (.add.x.vf vf3 vf3 vf3 :mask #b10) - (.add.x.vf vf4 vf4 vf4 :mask #b10) + (.add.x.vf.y vf2 vf2 vf2) + (.add.x.vf.y vf3 vf3 vf3) + (.add.x.vf.y vf4 vf4 vf4) (.nop.vf) - (.add.z.vf vf2 vf2 vf2 :mask #b10) - (.add.z.vf vf3 vf3 vf3 :mask #b10) - (.add.z.vf vf4 vf4 vf4 :mask #b10) + (.add.z.vf.y vf2 vf2 vf2) + (.add.z.vf.y vf3 vf3 vf3) + (.add.z.vf.y vf4 vf4 vf4) (.nop.vf) (.mov a0-1 vf2) (.mov a1-1 vf3) @@ -888,11 +888,11 @@ (.sub.vf vf5 vf4 vf3) (.mul.x.vf vf1 vf1 vf2) (.mul.x.vf vf5 vf5 vf2) - (.mul.vf vf5 vf5 vf5 :mask #b101) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.mul.vf.xz vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.sqrt.vf Q vf5 :ftf #b0) (.wait.vf) - (.mul.vf vf1 vf0 Q :mask #b1000) + (.mul.vf.w vf1 vf0 Q) (.nop.vf) (.nop.vf) (.svf (&-> a1-2 quad) vf1) @@ -1113,7 +1113,7 @@ (.lvf vf6 (&-> s4-0 quad)) ) (.sll v1-8 v1-7 4) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf1 vf0 vf0) (let ((v1-9 (+ v1-8 (the-as int arg2)))) (nop!) (nop!) @@ -1127,11 +1127,11 @@ ) (.mul.x.vf acc vf2 vf6) (nop!) - (.add.mul.y.vf acc vf3 vf6 acc :mask #b111) + (.add.mul.y.vf.xyz acc vf3 vf6 acc) (nop!) - (.add.mul.z.vf acc vf4 vf6 acc :mask #b111) + (.add.mul.z.vf.xyz acc vf4 vf6 acc) (nop!) - (.add.mul.w.vf vf1 vf5 vf6 acc :mask #b111) + (.add.mul.w.vf.xyz vf1 vf5 vf6 acc) (nop!) (nop!) (nop!) diff --git a/test/decompiler/reference/jak1/engine/gfx/foreground/eye_REF.gc b/test/decompiler/reference/jak1/engine/gfx/eye_REF.gc similarity index 99% rename from test/decompiler/reference/jak1/engine/gfx/foreground/eye_REF.gc rename to test/decompiler/reference/jak1/engine/gfx/eye_REF.gc index babaa1116b6..0c81c8a48d2 100644 --- a/test/decompiler/reference/jak1/engine/gfx/foreground/eye_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/eye_REF.gc @@ -890,8 +890,8 @@ (convert-eye-data s0-0 (-> s4-0 eye-anim-data data (* s2-1 2) dword)) (vector4-lerp! (the-as vector (+ (the-as uint (-> *eye-control-array* data 0 left)) (* 96 (-> s5-0 eye-slot)))) - (the-as vector (-> s1-0 data)) - (the-as vector (-> s0-0 data)) + (-> s1-0 data 0) + (-> s0-0 data 0) f30-0 ) (vector4-lerp! @@ -904,8 +904,8 @@ (convert-eye-data s0-0 (-> s4-0 eye-anim-data data (+ (* s2-1 2) 1) dword)) (vector4-lerp! (the-as vector (+ (the-as uint (-> *eye-control-array* data 0 right)) (* 96 (-> s5-0 eye-slot)))) - (the-as vector (-> s1-0 data)) - (the-as vector (-> s0-0 data)) + (-> s1-0 data 0) + (-> s0-0 data 0) f30-0 ) (vector4-lerp! diff --git a/test/decompiler/reference/jak1/engine/gfx/math-camera_REF.gc b/test/decompiler/reference/jak1/engine/gfx/math-camera_REF.gc index 14f89dcc422..c6e8d57f9d3 100644 --- a/test/decompiler/reference/jak1/engine/gfx/math-camera_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/math-camera_REF.gc @@ -341,10 +341,10 @@ (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-7 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-7 63)) ) @@ -387,10 +387,10 @@ (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-7 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (vftoi4.xyzw vf28 vf28) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-7 63)) @@ -434,10 +434,10 @@ (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-7 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-7 63)) (.mov v0-0 vf23) diff --git a/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc b/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc index 9f815cd98d1..08268ef6805 100644 --- a/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/merc/merc_REF.gc @@ -76,6 +76,7 @@ ) ;; definition for method 3 of type merc-fragment-control +;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this merc-fragment-control)) (format #t "[~8x] ~A~%" this 'merc-fragment-control) (format #t "~Tunsigned-four-count: ~D~%" (-> this unsigned-four-count)) @@ -123,6 +124,7 @@ ) ;; definition for method 3 of type merc-ctrl +;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this merc-ctrl)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) @@ -385,7 +387,7 @@ ;; definition for function merc-vu1-initialize-chain ;; INFO: Used lq/sq (defun merc-vu1-initialize-chain ((arg0 dma-gif-packet)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet arg0) merc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> arg0 dma-vif) merc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/test/decompiler/reference/jak1/engine/gfx/mood/mood-tables_REF.gc b/test/decompiler/reference/jak1/engine/gfx/mood/mood-tables_REF.gc index a6943ea3fdc..7738fd45457 100644 --- a/test/decompiler/reference/jak1/engine/gfx/mood/mood-tables_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/mood/mood-tables_REF.gc @@ -22,8 +22,8 @@ ) (set-vector! (-> arg0 dir1 color) 0.8 0.775 0.7 1.0) (set! (-> arg0 dir1 levels x) arg3) - (vector-matrix*! (the-as vector (-> arg0 dir0)) (the-as vector (-> arg0 dir0)) s4-0) - (vector-matrix*! (the-as vector (-> arg0 dir1)) (the-as vector (-> arg0 dir1)) s4-0) + (vector-matrix*! (-> arg0 dir0 direction) (-> arg0 dir0 direction) s4-0) + (vector-matrix*! (-> arg0 dir1 direction) (-> arg0 dir1 direction) s4-0) ) (let ((v1-4 (-> arg0 dir2))) (set! (-> v1-4 direction x) 0.0) @@ -302,12 +302,12 @@ (set! (-> s5-0 x) (* 2.0 (-> s5-0 x))) (set! (-> s5-0 y) (* 2.0 (-> s5-0 y))) (set! (-> s5-0 z) (* 2.0 (-> s5-0 z))) - (vector+float*! (the-as vector s4-0) (-> arg2 amb-color) (-> arg2 lgt-color) (-> arg2 direction y)) - (vector*! (the-as vector s4-0) (the-as vector s4-0) (-> *ocean-map-village2* far-color)) + (vector+float*! (-> s4-0 fog-color) (-> arg2 amb-color) (-> arg2 lgt-color) (-> arg2 direction y)) + (vector*! (-> s4-0 fog-color) (-> s4-0 fog-color) (-> *ocean-map-village2* far-color)) (set! (-> s4-0 fog-color x) (* 2.0 (-> s4-0 fog-color x))) (set! (-> s4-0 fog-color y) (* 2.0 (-> s4-0 fog-color y))) (set! (-> s4-0 fog-color z) (* 2.0 (-> s4-0 fog-color z))) - (vector4-lerp! s5-0 s5-0 (the-as vector s4-0) 0.5) + (vector4-lerp! s5-0 s5-0 (-> s4-0 fog-color) 0.5) ) (let ((f0-15 (* 0.003921569 (- 255.0 (-> arg0 fog-dists w))))) (vector4-lerp! s5-0 s5-0 (-> arg0 fog-color) f0-15) @@ -652,7 +652,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *village1-mood-lights-table* data))) +(update-mood-shadow-direction (-> *village1-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *village1-mood-lights-table* data 1)) @@ -848,7 +848,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *snow-mood-lights-table* data))) +(update-mood-shadow-direction (-> *snow-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *snow-mood-lights-table* data 1)) @@ -860,10 +860,7 @@ (update-mood-shadow-direction (-> *snow-mood-lights-table* data 3)) ;; failed to figure out what this is: -(update-mood-erase-color - (the-as mood-fog (-> *snow-mood-fog-table* data)) - (the-as mood-lights (-> *snow-mood-lights-table* data)) - ) +(update-mood-erase-color (-> *snow-mood-fog-table* data 0) (-> *snow-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-erase-color (-> *snow-mood-fog-table* data 2) (-> *snow-mood-lights-table* data 1)) @@ -877,7 +874,7 @@ ;; failed to figure out what this is: (update-mood-erase-color2 (-> *snow-mood-fog-table* data 1) - (the-as mood-lights (-> *snow-mood-lights-table* data)) + (-> *snow-mood-lights-table* data 0) (-> *snow-mood-lights-table* data 1) ) @@ -899,14 +896,14 @@ (update-mood-erase-color2 (-> *snow-mood-fog-table* data 7) (-> *snow-mood-lights-table* data 3) - (the-as mood-lights (-> *snow-mood-lights-table* data)) + (-> *snow-mood-lights-table* data 0) ) ;; failed to figure out what this is: (vector4-lerp! (-> *snow-mood-fog-table* data 0 erase-color) (-> *snow-mood-fog-table* data 0 erase-color) - (the-as vector (-> *snow-mood-fog-table* data)) + (-> *snow-mood-fog-table* data 0 fog-color) 0.41 ) @@ -914,7 +911,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 1 erase-color) (-> *snow-mood-fog-table* data 1 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 1)) + (-> *snow-mood-fog-table* data 1 fog-color) 0.41 ) @@ -922,7 +919,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 2 erase-color) (-> *snow-mood-fog-table* data 2 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 2)) + (-> *snow-mood-fog-table* data 2 fog-color) 0.41 ) @@ -930,7 +927,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 3 erase-color) (-> *snow-mood-fog-table* data 3 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 3)) + (-> *snow-mood-fog-table* data 3 fog-color) 0.41 ) @@ -938,7 +935,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 4 erase-color) (-> *snow-mood-fog-table* data 4 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 4)) + (-> *snow-mood-fog-table* data 4 fog-color) 0.41 ) @@ -946,7 +943,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 5 erase-color) (-> *snow-mood-fog-table* data 5 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 5)) + (-> *snow-mood-fog-table* data 5 fog-color) 0.41 ) @@ -954,7 +951,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 6 erase-color) (-> *snow-mood-fog-table* data 6 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 6)) + (-> *snow-mood-fog-table* data 6 fog-color) 0.41 ) @@ -962,7 +959,7 @@ (vector4-lerp! (-> *snow-mood-fog-table* data 7 erase-color) (-> *snow-mood-fog-table* data 7 erase-color) - (the-as vector (-> *snow-mood-fog-table* data 7)) + (-> *snow-mood-fog-table* data 7 fog-color) 0.41 ) @@ -1273,7 +1270,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *misty-mood-lights-table* data))) +(update-mood-shadow-direction (-> *misty-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *misty-mood-lights-table* data 1)) @@ -1404,7 +1401,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *village2-mood-lights-table* data))) +(update-mood-shadow-direction (-> *village2-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *village2-mood-lights-table* data 1)) @@ -1536,7 +1533,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *swamp-mood-lights-table* data))) +(update-mood-shadow-direction (-> *swamp-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *swamp-mood-lights-table* data 1)) @@ -1632,7 +1629,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *sunken-mood-lights-table* data))) +(update-mood-shadow-direction (-> *sunken-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *sunken-mood-lights-table* data 1)) @@ -1745,7 +1742,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *rolling-mood-lights-table* data))) +(update-mood-shadow-direction (-> *rolling-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *rolling-mood-lights-table* data 1)) @@ -1882,7 +1879,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *firecanyon-mood-lights-table* data))) +(update-mood-shadow-direction (-> *firecanyon-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *firecanyon-mood-lights-table* data 1)) @@ -2031,7 +2028,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *ogre-mood-lights-table* data))) +(update-mood-shadow-direction (-> *ogre-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *ogre-mood-lights-table* data 1)) @@ -2100,7 +2097,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *ogre2-mood-lights-table* data))) +(update-mood-shadow-direction (-> *ogre2-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-shadow-direction (-> *ogre2-mood-lights-table* data 1)) @@ -2158,7 +2155,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *ogre3-mood-lights-table* data))) +(update-mood-shadow-direction (-> *ogre3-mood-lights-table* data 0)) ;; definition for symbol *village3-mood-fog-table*, type mood-fog-table (define *village3-mood-fog-table* @@ -2322,7 +2319,7 @@ ) ;; failed to figure out what this is: -(update-mood-shadow-direction (the-as mood-lights (-> *lavatube-mood-lights-table* data))) +(update-mood-shadow-direction (-> *lavatube-mood-lights-table* data 0)) ;; definition for symbol *lavatube-mood-sun-table*, type mood-sun-table (define *lavatube-mood-sun-table* @@ -2429,10 +2426,7 @@ ) ;; failed to figure out what this is: -(update-mood-erase-color - (the-as mood-fog (-> *finalboss-mood-fog-table* data)) - (the-as mood-lights (-> *village1-mood-lights-table* data)) - ) +(update-mood-erase-color (-> *finalboss-mood-fog-table* data 0) (-> *village1-mood-lights-table* data 0)) ;; failed to figure out what this is: (update-mood-erase-color (-> *finalboss-mood-fog-table* data 1) (-> *village1-mood-lights-table* data 1)) @@ -2464,7 +2458,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 0 erase-color) (-> *finalboss-mood-fog-table* data 0 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data)) + (-> *finalboss-mood-fog-table* data 0 fog-color) 0.41 ) @@ -2472,7 +2466,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 1 erase-color) (-> *finalboss-mood-fog-table* data 1 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 1)) + (-> *finalboss-mood-fog-table* data 1 fog-color) 0.41 ) @@ -2480,7 +2474,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 2 erase-color) (-> *finalboss-mood-fog-table* data 2 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 2)) + (-> *finalboss-mood-fog-table* data 2 fog-color) 0.41 ) @@ -2488,7 +2482,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 3 erase-color) (-> *finalboss-mood-fog-table* data 3 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 3)) + (-> *finalboss-mood-fog-table* data 3 fog-color) 1.0 ) @@ -2496,7 +2490,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 4 erase-color) (-> *finalboss-mood-fog-table* data 4 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 4)) + (-> *finalboss-mood-fog-table* data 4 fog-color) 0.41 ) @@ -2504,7 +2498,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 5 erase-color) (-> *finalboss-mood-fog-table* data 5 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 5)) + (-> *finalboss-mood-fog-table* data 5 fog-color) 0.41 ) @@ -2512,7 +2506,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 6 erase-color) (-> *finalboss-mood-fog-table* data 6 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 6)) + (-> *finalboss-mood-fog-table* data 6 fog-color) 0.41 ) @@ -2520,7 +2514,7 @@ (vector4-lerp! (-> *finalboss-mood-fog-table* data 7 erase-color) (-> *finalboss-mood-fog-table* data 7 erase-color) - (the-as vector (-> *finalboss-mood-fog-table* data 7)) + (-> *finalboss-mood-fog-table* data 7 fog-color) 0.41 ) diff --git a/test/decompiler/reference/jak1/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak1/engine/gfx/mood/mood_REF.gc index 7e23c8c2e11..d18ed04f421 100644 --- a/test/decompiler/reference/jak1/engine/gfx/mood/mood_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/mood/mood_REF.gc @@ -69,21 +69,21 @@ (.lvf vf1 (&-> arg0 times 0 quad)) (nop!) (.lvf vf2 (&-> arg0 times 1 quad)) - (.mul.w.vf vf1 vf1 vf1 :mask #b111) + (.mul.w.vf.xyz vf1 vf1 vf1) (.lvf vf3 (&-> arg0 times 2 quad)) - (.mul.w.vf vf2 vf2 vf2 :mask #b111) + (.mul.w.vf.xyz vf2 vf2 vf2) (.lvf vf4 (&-> arg0 times 3 quad)) - (.mul.w.vf vf3 vf3 vf3 :mask #b111) + (.mul.w.vf.xyz vf3 vf3 vf3) (.lvf vf5 (&-> arg0 times 4 quad)) - (.mul.w.vf vf4 vf4 vf4 :mask #b111) + (.mul.w.vf.xyz vf4 vf4 vf4) (.lvf vf6 (&-> arg0 times 5 quad)) - (.mul.w.vf vf5 vf5 vf5 :mask #b111) + (.mul.w.vf.xyz vf5 vf5 vf5) (.lvf vf7 (&-> arg0 times 6 quad)) - (.mul.w.vf vf6 vf6 vf6 :mask #b111) + (.mul.w.vf.xyz vf6 vf6 vf6) (.lvf vf8 (&-> arg0 times 7 quad)) - (.mul.w.vf vf7 vf7 vf7 :mask #b111) + (.mul.w.vf.xyz vf7 vf7 vf7) (nop!) - (.mul.w.vf vf8 vf8 vf8 :mask #b111) + (.mul.w.vf.xyz vf8 vf8 vf8) (nop!) (vftoi12.xyzw vf1 vf1) (nop!) @@ -270,9 +270,9 @@ (set! (-> arg0 sky-times s5-0) (- 1.0 f30-0)) (set! (-> arg0 sky-times s4-0) f30-0) (vector4-lerp! - (the-as vector (-> arg0 current-sun)) - (the-as vector (-> arg0 mood-sun-table data s5-0)) - (the-as vector (-> arg0 mood-sun-table data s4-0)) + (-> arg0 current-sun sun-color) + (-> arg0 mood-sun-table data s5-0 sun-color) + (-> arg0 mood-sun-table data s4-0 sun-color) f30-0 ) (vector4-lerp! @@ -384,9 +384,9 @@ ) (else (vector4-lerp! - (the-as vector (-> arg0 current-fog)) - (the-as vector (-> arg1 current-fog)) - (the-as vector (-> arg2 current-fog)) + (-> arg0 current-fog fog-color) + (-> arg1 current-fog fog-color) + (-> arg2 current-fog fog-color) arg3 ) (vector4-lerp! @@ -403,9 +403,9 @@ ) (vector4-lerp! (-> arg0 current-prt-color) (-> arg1 current-prt-color) (-> arg2 current-prt-color) arg3) (vector4-lerp! - (the-as vector (-> arg0 current-sun)) - (the-as vector (-> arg1 current-sun)) - (the-as vector (-> arg2 current-sun)) + (-> arg0 current-sun sun-color) + (-> arg1 current-sun sun-color) + (-> arg2 current-sun sun-color) arg3 ) (vector4-lerp! @@ -1163,7 +1163,7 @@ (let ((f30-0 (fmax 0.0 (-> *math-camera* camera-rot vector 1 z)))) (let ((a2-4 (new 'stack-no-clear 'vector))) (set-vector! a2-4 0.0 32.0 48.0 128.0) - (vector4-lerp! (the-as vector (-> arg0 current-fog)) (the-as vector (-> arg0 current-fog)) a2-4 (/ f30-0 2)) + (vector4-lerp! (-> arg0 current-fog fog-color) (-> arg0 current-fog fog-color) a2-4 (/ f30-0 2)) ) (let ((f0-7 (-> arg0 current-fog fog-dists w)) (f1-1 255.0) @@ -1974,7 +1974,7 @@ (while (>= s1-0 s2-0) (let ((f28-0 (-> *palette-fade-controls* control s2-0 fade))) (set! (-> arg0 times s2-0 w) f28-0) - (vector-! s3-0 (the-as vector (-> *palette-fade-controls* control s2-0)) (-> *target* control trans)) + (vector-! s3-0 (-> *palette-fade-controls* control s2-0 trans) (-> *target* control trans)) (let* ((f3-0 (vector-length s3-0)) (f28-1 (* f28-0 (fmax 0.0 (fmin 1.0 (- 1.0 (/ f3-0 (meters 20))))))) ) @@ -2327,27 +2327,27 @@ f30-3 ) (vector-lerp! - (the-as vector (-> arg0 mood-lights-table data)) + (-> arg0 mood-lights-table data 0 direction) s5-1 - (the-as vector (-> arg0 mood-lights-table data)) + (-> arg0 mood-lights-table data 0 direction) f30-3 ) (vector-lerp! - (the-as vector (-> arg0 mood-lights-table data 1)) + (-> arg0 mood-lights-table data 1 direction) s5-1 - (the-as vector (-> arg0 mood-lights-table data 1)) + (-> arg0 mood-lights-table data 1 direction) f30-3 ) (vector-lerp! - (the-as vector (-> arg0 mood-lights-table data 2)) + (-> arg0 mood-lights-table data 2 direction) s5-1 - (the-as vector (-> arg0 mood-lights-table data 2)) + (-> arg0 mood-lights-table data 2 direction) f30-3 ) (vector-lerp! - (the-as vector (-> arg0 mood-lights-table data 3)) + (-> arg0 mood-lights-table data 3 direction) s5-1 - (the-as vector (-> arg0 mood-lights-table data 3)) + (-> arg0 mood-lights-table data 3 direction) f30-3 ) ) @@ -2487,20 +2487,10 @@ (vector4-lerp! (the-as vector (-> s5-2 0)) (the-as vector (-> s4-2 0)) (the-as vector (-> s5-2 0)) f30-1) (vector4-lerp! (-> s5-2 0 dir0 color) (-> s4-2 0 dir0 color) (-> s5-2 0 dir0 color) f30-1) (vector4-lerp! (-> s5-2 0 dir0 levels) (-> s4-2 0 dir0 levels) (-> s5-2 0 dir0 levels) f30-1) - (vector4-lerp! - (the-as vector (-> s5-2 0 dir1)) - (the-as vector (-> s4-2 0 dir1)) - (the-as vector (-> s5-2 0 dir1)) - f30-1 - ) + (vector4-lerp! (-> s5-2 0 dir1 direction) (-> s4-2 0 dir1 direction) (-> s5-2 0 dir1 direction) f30-1) (vector4-lerp! (-> s5-2 0 dir1 color) (-> s4-2 0 dir1 color) (-> s5-2 0 dir1 color) f30-1) (vector4-lerp! (-> s5-2 0 dir1 levels) (-> s4-2 0 dir1 levels) (-> s5-2 0 dir1 levels) f30-1) - (vector4-lerp! - (the-as vector (-> s5-2 0 ambi)) - (the-as vector (-> s4-2 0 ambi)) - (the-as vector (-> s5-2 0 ambi)) - f30-1 - ) + (vector4-lerp! (-> s5-2 0 ambi direction) (-> s4-2 0 ambi direction) (-> s5-2 0 ambi direction) f30-1) (vector4-lerp! (-> s5-2 0 ambi color) (-> s4-2 0 ambi color) (-> s5-2 0 ambi color) f30-1) (vector4-lerp! (-> s5-2 0 ambi levels) (-> s4-2 0 ambi levels) (-> s5-2 0 ambi levels) f30-1) (vector4-lerp! (-> arg0 current-shadow) (-> *ogre2-mood* current-shadow) (-> arg0 current-shadow) f30-1) @@ -2542,35 +2532,20 @@ (vector4-lerp! (the-as vector (-> s5-3 0)) (the-as vector (-> s4-3 0)) (the-as vector (-> s5-3 0)) f30-3) (vector4-lerp! (-> s5-3 0 dir0 color) (-> s4-3 0 dir0 color) (-> s5-3 0 dir0 color) f30-3) (vector4-lerp! (-> s5-3 0 dir0 levels) (-> s4-3 0 dir0 levels) (-> s5-3 0 dir0 levels) f30-3) - (vector4-lerp! - (the-as vector (-> s5-3 0 dir1)) - (the-as vector (-> s4-3 0 dir1)) - (the-as vector (-> s5-3 0 dir1)) - f30-3 - ) + (vector4-lerp! (-> s5-3 0 dir1 direction) (-> s4-3 0 dir1 direction) (-> s5-3 0 dir1 direction) f30-3) (vector4-lerp! (-> s5-3 0 dir1 color) (-> s4-3 0 dir1 color) (-> s5-3 0 dir1 color) f30-3) (vector4-lerp! (-> s5-3 0 dir1 levels) (-> s4-3 0 dir1 levels) (-> s5-3 0 dir1 levels) f30-3) - (vector4-lerp! - (the-as vector (-> s5-3 0 dir2)) - (the-as vector (-> s4-3 0 dir2)) - (the-as vector (-> s5-3 0 dir1)) - f30-3 - ) + (vector4-lerp! (-> s5-3 0 dir2 direction) (-> s4-3 0 dir2 direction) (-> s5-3 0 dir1 direction) f30-3) (vector4-lerp! (-> s5-3 0 dir2 color) (-> s4-3 0 dir2 color) (-> s5-3 0 dir1 color) f30-3) (vector4-lerp! (-> s5-3 0 dir2 levels) (-> s4-3 0 dir2 levels) (-> s5-3 0 dir1 levels) f30-3) - (vector4-lerp! - (the-as vector (-> s5-3 0 ambi)) - (the-as vector (-> s4-3 0 ambi)) - (the-as vector (-> s5-3 0 ambi)) - f30-3 - ) + (vector4-lerp! (-> s5-3 0 ambi direction) (-> s4-3 0 ambi direction) (-> s5-3 0 ambi direction) f30-3) (vector4-lerp! (-> s5-3 0 ambi color) (-> s4-3 0 ambi color) (-> s5-3 0 ambi color) f30-3) (vector4-lerp! (-> s5-3 0 ambi levels) (-> s4-3 0 ambi levels) (-> s5-3 0 ambi levels) f30-3) (vector4-lerp! (-> arg0 current-shadow) (-> *ogre3-mood* current-shadow) (-> arg0 current-shadow) f30-3) (vector4-lerp! - (the-as vector (-> arg0 current-fog)) - (the-as vector (-> *ogre3-mood* current-fog)) - (the-as vector (-> arg0 current-fog)) + (-> arg0 current-fog fog-color) + (-> *ogre3-mood* current-fog fog-color) + (-> arg0 current-fog fog-color) f30-3 ) (vector4-lerp! diff --git a/test/decompiler/reference/jak1/engine/gfx/mood/time-of-day_REF.gc b/test/decompiler/reference/jak1/engine/gfx/mood/time-of-day_REF.gc index ec062195374..3c82e7bc8c0 100644 --- a/test/decompiler/reference/jak1/engine/gfx/mood/time-of-day_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/mood/time-of-day_REF.gc @@ -406,9 +406,9 @@ f30-0 ) (vector4-lerp! - (the-as vector (-> arg0 current-sun)) - (the-as vector (-> arg0 moods 0 current-sun)) - (the-as vector (-> arg0 moods 1 current-sun)) + (-> arg0 current-sun sun-color) + (-> arg0 moods 0 current-sun sun-color) + (-> arg0 moods 1 current-sun sun-color) f30-0 ) (vector4-lerp! diff --git a/test/decompiler/reference/jak1/engine/gfx/mood/weather-part_REF.gc b/test/decompiler/reference/jak1/engine/gfx/mood/weather-part_REF.gc index f979418f4c0..1855d991c29 100644 --- a/test/decompiler/reference/jak1/engine/gfx/mood/weather-part_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/mood/weather-part_REF.gc @@ -534,7 +534,7 @@ (let ((s5-0 (the int (-> arg1 user-float)))) (let* ((a1-1 (math-camera-pos)) (a2-1 (-> *sky-parms* upload-data sun (/ s5-0 4))) - (v1-3 (vector+float*! (new 'stack-no-clear 'vector) a1-1 (the-as vector a2-1) 4096.0)) + (v1-3 (vector+float*! (new 'stack-no-clear 'vector) a1-1 (-> a2-1 pos) 4096.0)) ) (set! (-> arg2 vector 0 x) (-> v1-3 x)) (set! (-> arg2 vector 0 y) (-> v1-3 y)) diff --git a/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc b/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc index 8175b0a21bf..ec621a18ba6 100644 --- a/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-mid_REF.gc @@ -424,8 +424,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-2 vf1) (when (< a3-2 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -440,8 +440,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-6 vf1) (when (< a3-6 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -456,8 +456,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-10 vf1) (when (< a3-10 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -469,8 +469,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (when (< v1-10 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc b/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc index ea834cc354b..0912bf92b10 100644 --- a/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/ocean/ocean-transition_REF.gc @@ -433,8 +433,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-2 vf1) (when (< a3-2 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -449,8 +449,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-6 vf1) (when (< a3-6 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -465,8 +465,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a3-10 vf1) (when (< a3-10 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -478,8 +478,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (when (< v1-10 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak1/engine/gfx/shadow/shadow_REF.gc b/test/decompiler/reference/jak1/engine/gfx/shadow/shadow_REF.gc index daa995e7fff..89538dd713a 100644 --- a/test/decompiler/reference/jak1/engine/gfx/shadow/shadow_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/shadow/shadow_REF.gc @@ -90,14 +90,14 @@ ((< (-> s0-0 w) 0.0) (.lvf vf1 (&-> v1-9 vel-sxvel quad)) (.lvf vf2 (&-> s0-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-9 vel-sxvel quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> v1-9 vel-sxvel quad)) (.lvf vf2 (&-> s0-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-9 vel-sxvel quad) vf1) (.mov v1-11 vf1) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/sky/sky-tng_REF.gc b/test/decompiler/reference/jak1/engine/gfx/sky/sky-tng_REF.gc index 35a459c1265..e093d1135fb 100644 --- a/test/decompiler/reference/jak1/engine/gfx/sky/sky-tng_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/sky/sky-tng_REF.gc @@ -566,12 +566,7 @@ (set! (-> s5-0 (+ v1-24 4) col quad) (-> arg2 quad)) ) (dotimes (s3-1 4) - (vector4-lerp! - (the-as vector (-> s5-0 (+ s3-1 8))) - (the-as vector (-> s5-0 s3-1)) - (the-as vector (-> s5-0 (+ s3-1 4))) - f30-0 - ) + (vector4-lerp! (-> s5-0 (+ s3-1 8) pos) (-> s5-0 s3-1 pos) (-> s5-0 (+ s3-1 4) pos) f30-0) (vector4-lerp! (-> s5-0 (+ s3-1 8) stq) (-> s5-0 s3-1 stq) (-> s5-0 (+ s3-1 4) stq) f30-0) (set! (-> s5-0 (+ s3-1 8) col quad) (-> arg2 quad)) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle-launcher_REF.gc b/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle-launcher_REF.gc index d92b49e0cf2..ff3fda8d7f5 100644 --- a/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle-launcher_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle-launcher_REF.gc @@ -34,7 +34,6 @@ ) ;; definition for method 3 of type sparticle-launcher -;; INFO: this function exists in multiple non-identical object files ;; INFO: Return type mismatch int vs sparticle-launcher. (defmethod inspect ((this sparticle-launcher)) (format #t "~X: sparticle-launcher~%" this) @@ -460,7 +459,7 @@ (s3-0 (new 'stack-no-clear 'vector)) ) (sp-init-fields! - (the-as (pointer float) (-> s5-0 launchrot)) + (&-> s5-0 launchrot x) arg2 (sp-field-id launch-fields-start) (sp-field-id launch-fields-end) @@ -515,14 +514,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-1 vf1) ) (else (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-2 vf1) ) @@ -624,8 +623,8 @@ (set! (-> s5-0 rot) (the float (sar (shl (the int (-> s5-0 rot)) 48) 48))) (.lvf vf4 (&-> s5-0 color quad)) (.lvf vf5 (&-> s5-0 x-y-z-sx quad)) - (.min.x.vf vf4 vf4 vf31 :mask #b111) - (.add.vf vf5 vf5 vf30 :mask #b111) + (.min.x.vf.xyz vf4 vf4 vf31) + (.add.vf.xyz vf5 vf5 vf30) (.svf (&-> s5-0 color quad) vf4) (.svf (&-> s5-0 x-y-z-sx quad) vf5) (when (not *death-adgif*) @@ -651,8 +650,8 @@ (.lvf vf4 (&-> (-> *time-of-day-context* current-prt-color) quad)) (.lvf vf5 (&-> s5-0 color quad)) (.lvf vf6 (&-> gp-0 fade quad)) - (.mul.vf vf5 vf5 vf4 :mask #b111) - (.mul.vf vf6 vf6 vf4 :mask #b111) + (.mul.vf.xyz vf5 vf5 vf4) + (.mul.vf.xyz vf6 vf6 vf4) (.svf (&-> s5-0 color quad) vf5) (.svf (&-> gp-0 fade quad) vf6) (.mov v1-25 vf6) @@ -664,7 +663,7 @@ (.lvf vf3 (&-> s5-0 color quad)) (.svf (&-> v1-26 x-y-z-sx quad) vf1) (.svf (&-> v1-26 flag-rot-sy quad) vf2) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (.svf (&-> v1-26 color quad) vf3) ) (.mov v1-27 vf3) @@ -719,7 +718,7 @@ (set! (-> arg2 fade y) 99999.0) (set! (-> arg2 fade z) 99999.0) (let ((a1-2 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) (the-as (inline-array sp-field-init-spec) a1-1) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -764,7 +763,7 @@ ) (else (let ((a1-3 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) (the-as (inline-array sp-field-init-spec) a1-1) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -840,14 +839,14 @@ ((< (-> s3-0 w) 0.0) (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-9 vf1) ) (else (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-10 vf1) ) @@ -1190,14 +1189,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-3 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> v1-3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-3 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1257,14 +1256,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-14 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-14 qx-qy-qz-sy quad) vf1) (.mov v1-15 vf1) ) (else (.lvf vf1 (&-> v1-14 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-14 qx-qy-qz-sy quad) vf1) (.mov v1-16 vf1) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle_REF.gc b/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle_REF.gc index 5a2f6374087..7f0314b9e86 100644 --- a/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/sprite/sparticle/sparticle_REF.gc @@ -537,9 +537,9 @@ (let ((gp-0 (-> arg1 rotvel3d)) (s5-0 (new 'stack-no-clear 'quaternion)) ) - (vector-angle<-quaternion! (the-as vector s5-0) gp-0) + (vector-angle<-quaternion! (-> s5-0 vec) gp-0) (set! (-> s5-0 w) (* 12516.455 (-> s5-0 w))) - (quaternion-vector-angle! gp-0 (the-as vector s5-0) (-> s5-0 w)) + (quaternion-vector-angle! gp-0 (-> s5-0 vec) (-> s5-0 w)) ) 0 (none) @@ -551,9 +551,9 @@ (let ((gp-0 (-> arg1 rotvel3d)) (s5-0 (new 'stack-no-clear 'quaternion)) ) - (vector-angle<-quaternion! (the-as vector s5-0) gp-0) + (vector-angle<-quaternion! (-> s5-0 vec) gp-0) (set! (-> s5-0 w) (* 8691.982 (-> s5-0 w))) - (quaternion-vector-angle! gp-0 (the-as vector s5-0) (-> s5-0 w)) + (quaternion-vector-angle! gp-0 (-> s5-0 vec) (-> s5-0 w)) ) 0 (none) diff --git a/test/decompiler/reference/jak1/engine/gfx/sprite/sprite-distort_REF.gc b/test/decompiler/reference/jak1/engine/gfx/sprite/sprite-distort_REF.gc index 706bb63d2fe..ca59e5843d5 100644 --- a/test/decompiler/reference/jak1/engine/gfx/sprite/sprite-distort_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/sprite/sprite-distort_REF.gc @@ -235,11 +235,11 @@ (TODO.VCLIP vf10 vf10) (b! (zero? (-> sv-16 flag)) cfg-21 :delay (nop!)) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) + (.mul.vf.xyz vf2 vf2 Q) (.cfc2.i v1-25 Clipping) (b! (logtest? v1-25 63) cfg-21 :delay (.add.vf vf1 vf1 vf9)) - (.max.x.vf vf1 vf1 vf0 :mask #b1000) + (.max.x.vf.w vf1 vf1 vf0) (.svf (&-> (the-as vector a0-1) quad) vf1) (.svf (&-> (the-as vector sv-48) quad) vf2) (set! (-> (the-as vector a0-1) w) 255.0) diff --git a/test/decompiler/reference/jak1/engine/gfx/sprite/sprite_REF.gc b/test/decompiler/reference/jak1/engine/gfx/sprite/sprite_REF.gc index f2f267a6050..90881381a6a 100644 --- a/test/decompiler/reference/jak1/engine/gfx/sprite/sprite_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/sprite/sprite_REF.gc @@ -449,14 +449,14 @@ ((< (-> arg1 w) 0.0) (.lvf vf1 (&-> arg0 qx-qy-qz-sy quad)) (.lvf vf2 (&-> arg1 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 qx-qy-qz-sy quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> arg0 qx-qy-qz-sy quad)) (.lvf vf2 (&-> arg1 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 qx-qy-qz-sy quad) vf1) (.mov v1-1 vf1) ) diff --git a/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc index 43f114f2ef5..08bb01eb55e 100644 --- a/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/texture/texture_REF.gc @@ -723,7 +723,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod allocate-defaults! ((this texture-pool)) (allocate-segment! this (-> this segment-common) #x1c000) - (allocate-segment! this (the-as texture-pool-segment (-> this segment)) #x62000) + (allocate-segment! this (-> this segment 0) #x62000) (set! *sky-base-vram-word* (allocate-vram-words! this #x7000)) (set! *sky-base-block* (/ *sky-base-vram-word* 64)) (set! *sky-base-page* (sar *sky-base-vram-word* 11)) @@ -1116,7 +1116,7 @@ ) ) (upload-now! page 2) - (update-vram-pages pool (the-as texture-pool-segment (-> pool segment)) page 2) + (update-vram-pages pool (-> pool segment 0) page 2) (let ((page-seg-2-size (logand -4096 (+ (-> page segment 2 size) 4095)))) (cond ((< (the-as uint #x24000) page-seg-2-size) @@ -1156,7 +1156,7 @@ ) ) (upload-now! page 2) - (update-vram-pages pool (the-as texture-pool-segment (-> pool segment)) page 2) + (update-vram-pages pool (-> pool segment 0) page 2) (cond ((< (the-as uint #x24000) seg2-size) (set! (-> page segment 2 size) (+ -147456 seg2-size)) @@ -1390,13 +1390,8 @@ (when tfrag-page (set! (-> level upload-size 0) 0) (if (< distance 81920.0) - (+! (-> level upload-size 0) (upload-vram-pages - this - (the-as texture-pool-segment (-> this segment)) - tfrag-page - 2 - (the-as bucket-id tfrag-bucket) - ) + (+! (-> level upload-size 0) + (upload-vram-pages this (-> this segment 0) tfrag-page 2 (the-as bucket-id tfrag-bucket)) ) ) (cond diff --git a/test/decompiler/reference/jak1/engine/gfx/tie/tie-methods_REF.gc b/test/decompiler/reference/jak1/engine/gfx/tie/tie-methods_REF.gc index 83d58bda2f6..88e8ffa5557 100644 --- a/test/decompiler/reference/jak1/engine/gfx/tie/tie-methods_REF.gc +++ b/test/decompiler/reference/jak1/engine/gfx/tie/tie-methods_REF.gc @@ -232,7 +232,6 @@ ;; ERROR: function was not converted to expressions. Cannot decompile. ;; definition for method 9 of type drawable-tree-instance-tie -;; INFO: this function exists in multiple non-identical object files (defmethod login ((this drawable-tree-instance-tie)) (if (nonzero? (-> this prototypes prototype-array-tie)) (login (-> this prototypes prototype-array-tie)) @@ -299,9 +298,7 @@ (set! sv-16 (-> (the-as drawable-inline-array-node v1-16) length)) (when (nonzero? sv-16) (let* ((v1-21 (logand (the-as int *gsf-buffer*) 8191)) - (v1-23 - (logand (the-as int (&- (logand (the-as int (&-> (-> s4-1 data) -512)) 8191) (the-as uint v1-21))) 8191) - ) + (v1-23 (logand (the-as int (&- (logand (the-as int (&-> s4-1 data -512)) 8191) (the-as uint v1-21))) 8191)) ) (set! *instance-tie-work-copy* (the-as instance-tie-work (+ (the-as int *gsf-buffer*) v1-23))) ) diff --git a/test/decompiler/reference/jak1/engine/level/bsp-h_REF.gc b/test/decompiler/reference/jak1/engine/level/bsp-h_REF.gc index 9b82d57927d..d1e04d47092 100644 --- a/test/decompiler/reference/jak1/engine/level/bsp-h_REF.gc +++ b/test/decompiler/reference/jak1/engine/level/bsp-h_REF.gc @@ -109,7 +109,7 @@ (format #t "~Tdrawable-trees: ~A~%" (-> this drawable-trees)) (format #t "~Tpat: #x~X~%" (-> this pat)) (format #t "~Tpat-length: ~D~%" (-> this pat-length)) - (inspect-bsp-tree this (the-as bsp-node (-> this nodes))) + (inspect-bsp-tree this (-> this nodes 0)) this ) diff --git a/test/decompiler/reference/jak1/engine/level/bsp_REF.gc b/test/decompiler/reference/jak1/engine/level/bsp_REF.gc index f78297cf14c..0095653ae68 100644 --- a/test/decompiler/reference/jak1/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak1/engine/level/bsp_REF.gc @@ -129,7 +129,7 @@ ) ) ) - (mem-usage-bsp-tree this (the-as bsp-node (-> this nodes)) mem-use flags) + (mem-usage-bsp-tree this (-> this nodes 0) mem-use flags) this ) @@ -408,10 +408,10 @@ (label cfg-1) (b! (< (the-as int next-node) 0) cfg-4 :delay (set! real-node next-node)) (.lvf vf2 (&-> real-node plane quad)) - (.mul.vf vf2 vf2 vf1 :mask #b111) - (.add.x.vf vf2 vf2 vf2 :mask #b10) - (.add.z.vf vf2 vf2 vf2 :mask #b10) - (.sub.w.vf vf2 vf2 vf2 :mask #b10) + (.mul.vf.xyz vf2 vf2 vf1) + (.add.x.vf.y vf2 vf2 vf2) + (.add.z.vf.y vf2 vf2 vf2) + (.sub.w.vf.y vf2 vf2 vf2) (.mov v1-1 vf2) (let ((a2-0 (-> real-node front-flags))) (b! (>= (the-as int v1-1) 0) cfg-1 :delay (set! next-node (the-as bsp-node (-> real-node front)))) diff --git a/test/decompiler/reference/jak1/engine/level/load-boundary_REF.gc b/test/decompiler/reference/jak1/engine/level/load-boundary_REF.gc index 5c550491771..d3c6e5634b2 100644 --- a/test/decompiler/reference/jak1/engine/level/load-boundary_REF.gc +++ b/test/decompiler/reference/jak1/engine/level/load-boundary_REF.gc @@ -1282,7 +1282,7 @@ (a3-0 (-> arg0 data (-> arg0 data s5-0 v2))) (s4-0 (new 'stack-no-clear 'vector)) ) - (normal-of-plane s4-0 (the-as vector a1-0) (the-as vector a2-0) (the-as vector a3-0)) + (normal-of-plane s4-0 (-> a1-0 v) (-> a2-0 v) (-> a3-0 v)) (if (or (!= (-> s4-0 x) 0.0) (!= (-> s4-0 z) 0.0)) (format 0 "ERROR in the load-boundary code : tell Eddie!!!~%") ) diff --git a/test/decompiler/reference/jak1/engine/load/loader_REF.gc b/test/decompiler/reference/jak1/engine/load/loader_REF.gc index ca27055835c..970f3a8193d 100644 --- a/test/decompiler/reference/jak1/engine/load/loader_REF.gc +++ b/test/decompiler/reference/jak1/engine/load/loader_REF.gc @@ -565,7 +565,7 @@ ) (cond (s4-4 - (mem-copy! (&-> (-> this last-preload-stream) type) (&-> s4-4 type) 44) + (mem-copy! (&-> this last-preload-stream type) (&-> s4-4 type) 44) (str-play-queue (-> s4-4 name)) ) (else @@ -684,11 +684,11 @@ (let ((v1-5 s5-0)) (cond ((zero? v1-5) - (mem-copy! (&+ (the-as pointer (-> this rec)) -4) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&+ (the-as pointer (-> this rec)) -4) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) ) ((= v1-5 1) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) ) ) ) @@ -743,8 +743,8 @@ (if (>= arg3 (-> this rec 0 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec) 0 type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 0 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -752,7 +752,7 @@ (if (>= arg3 (-> this rec 1 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -766,15 +766,15 @@ ) (cond ((< arg3 (-> this rec 0 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec) 0 type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 0 type) 44) (set! (-> this rec 0 name) arg0) (set! (-> this rec 0 parts) arg1) (set! (-> this rec 0 priority) arg3) (set! (-> this rec 0 owner) (process->handle arg2)) ) ((< arg3 (-> this rec 1 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) (set! (-> this rec 1 name) arg0) (set! (-> this rec 1 parts) arg1) (set! (-> this rec 1 priority) arg3) diff --git a/test/decompiler/reference/jak1/engine/math/math_REF.gc b/test/decompiler/reference/jak1/engine/math/math_REF.gc index 8a42882fec8..06bad036a0e 100644 --- a/test/decompiler/reference/jak1/engine/math/math_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/math_REF.gc @@ -131,7 +131,7 @@ (init-vf0-vector) (TODO.VRGET vf1) (.sqrt.vf Q vf1 :ftf #b0) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (TODO.VRXOR vf2) (TODO.VRNEXT vf1) (.sub.w.vf vf1 vf1 vf0) diff --git a/test/decompiler/reference/jak1/engine/math/matrix_REF.gc b/test/decompiler/reference/jak1/engine/math/matrix_REF.gc index 03fe446c74b..4e8b58c637f 100644 --- a/test/decompiler/reference/jak1/engine/math/matrix_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/matrix_REF.gc @@ -2,7 +2,6 @@ (in-package goal) ;; definition for method 3 of type matrix -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this matrix)) (format #t "[~8x] matrix~%" this) (format @@ -41,7 +40,6 @@ ) ;; definition for method 3 of type matrix3 -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this matrix3)) (format #t "[~8x] matrix3~%" this) (format #t "~T[~F] [~F] [~F]~%" (-> this data 0) (-> this data 1) (-> this data 2)) @@ -286,15 +284,15 @@ (.lvf vf1 (&-> dst vector 0 quad)) (.lvf vf2 (&-> dst vector 1 quad)) (.lvf vf3 (&-> dst vector 2 quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1000) - (.sub.vf vf2 vf2 vf2 :mask #b1000) - (.sub.vf vf3 vf3 vf3 :mask #b1000) + (.sub.vf.w vf1 vf1 vf1) + (.sub.vf.w vf2 vf2 vf2) + (.sub.vf.w vf3 vf3 vf3) (.lvf vf8 (&-> src vector 3 quad)) (.mul.x.vf acc vf1 vf8) (.add.mul.y.vf acc vf2 vf8 acc) (.add.mul.z.vf vf4 vf3 vf8 acc) (.sub.vf vf4 vf0 vf4) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.svf (&-> dst vector 0 quad) vf1) (.svf (&-> dst vector 1 quad) vf2) (.svf (&-> dst vector 2 quad) vf3) @@ -369,87 +367,87 @@ (nop!) (.mul.z.vf vf15 vf25 vf24) (nop!) - (.mul.z.vf vf26 vf7 vf25 :mask #b10) + (.mul.z.vf.y vf26 vf7 vf25) (nop!) - (.mul.z.vf vf27 vf11 vf24 :mask #b1) + (.mul.z.vf.x vf27 vf11 vf24) (nop!) - (.mul.y.vf vf28 vf9 vf25 :mask #b1) + (.mul.y.vf.x vf28 vf9 vf25) (nop!) - (.mul.z.vf vf29 vf14 vf23 :mask #b1) + (.mul.z.vf.x vf29 vf14 vf23) (nop!) - (.mul.z.vf vf30 vf8 vf25 :mask #b1) + (.mul.z.vf.x vf30 vf8 vf25) (nop!) - (.mul.y.vf vf31 vf7 vf25 :mask #b100) + (.mul.y.vf.z vf31 vf7 vf25) (nop!) - (.add.y.vf vf16 vf27 vf26 :mask #b1) + (.add.y.vf.x vf16 vf27 vf26) (nop!) (.sub.vf vf1 vf0 vf1) (nop!) - (.add.x.vf vf17 vf29 vf30 :mask #b1) + (.add.x.vf.x vf17 vf29 vf30) (nop!) - (.sub.z.vf vf18 vf28 vf31 :mask #b1) + (.sub.z.vf.x vf18 vf28 vf31) (nop!) - (.sub.y.vf vf23 vf14 vf15 :mask #b100) + (.sub.y.vf.z vf23 vf14 vf15) (nop!) - (.sub.z.vf vf26 vf15 vf13 :mask #b1) + (.sub.z.vf.x vf26 vf15 vf13) (nop!) - (.sub.x.vf vf29 vf13 vf14 :mask #b10) + (.sub.x.vf.y vf29 vf13 vf14) (nop!) - (.sub.vf vf19 vf16 vf17 :mask #b1) + (.sub.vf.x vf19 vf16 vf17) (nop!) - (.sub.z.vf vf24 vf12 vf11 :mask #b10) + (.sub.z.vf.y vf24 vf12 vf11) (nop!) - (.sub.x.vf vf27 vf10 vf12 :mask #b100) + (.sub.x.vf.z vf27 vf10 vf12) (nop!) - (.sub.y.vf vf30 vf11 vf10 :mask #b1) + (.sub.y.vf.x vf30 vf11 vf10) (nop!) - (.add.vf vf20 vf19 vf18 :mask #b1) + (.add.vf.x vf20 vf19 vf18) (nop!) - (.sub.y.vf vf25 vf8 vf9 :mask #b100) + (.sub.y.vf.z vf25 vf8 vf9) (nop!) - (.sub.z.vf vf28 vf9 vf7 :mask #b1) + (.sub.z.vf.x vf28 vf9 vf7) (nop!) - (.sub.x.vf vf31 vf7 vf8 :mask #b10) + (.sub.x.vf.y vf31 vf7 vf8) (nop!) (.div.vf Q vf0 vf20 :fsf #b11 :ftf #b0) (nop!) - (.sub.w.vf vf3 vf3 vf3 :mask #b1000) + (.sub.w.vf.w vf3 vf3 vf3) (nop!) - (.sub.w.vf vf4 vf4 vf4 :mask #b1000) + (.sub.w.vf.w vf4 vf4 vf4) (nop!) - (.sub.w.vf vf5 vf5 vf5 :mask #b1000) + (.sub.w.vf.w vf5 vf5 vf5) (nop!) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (nop!) (.wait.vf) (nop!) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (nop!) - (.add.x.vf vf2 vf0 vf2 :mask #b111) + (.add.x.vf.xyz vf2 vf0 vf2) (nop!) - (.mul.z.vf vf3 vf2 vf23 :mask #b1) + (.mul.z.vf.x vf3 vf2 vf23) (nop!) - (.mul.x.vf vf4 vf2 vf26 :mask #b1) + (.mul.x.vf.x vf4 vf2 vf26) (nop!) - (.mul.y.vf vf5 vf2 vf29 :mask #b1) + (.mul.y.vf.x vf5 vf2 vf29) (nop!) - (.mul.y.vf vf3 vf2 vf24 :mask #b10) + (.mul.y.vf.y vf3 vf2 vf24) (nop!) - (.mul.z.vf vf4 vf2 vf27 :mask #b10) + (.mul.z.vf.y vf4 vf2 vf27) (nop!) - (.mul.x.vf vf5 vf2 vf30 :mask #b10) + (.mul.x.vf.y vf5 vf2 vf30) (nop!) - (.mul.z.vf vf3 vf2 vf25 :mask #b100) + (.mul.z.vf.z vf3 vf2 vf25) (nop!) - (.mul.x.vf vf4 vf2 vf28 :mask #b100) + (.mul.x.vf.z vf4 vf2 vf28) (nop!) - (.mul.y.vf vf5 vf2 vf31 :mask #b100) + (.mul.y.vf.z vf5 vf2 vf31) (nop!) (.mul.x.vf acc vf3 vf1) (.svf (&-> dst vector 0 quad) vf3) (.add.mul.y.vf acc vf4 vf1 acc) (.svf (&-> dst vector 1 quad) vf4) - (.add.mul.z.vf vf6 vf5 vf1 acc :mask #b111) + (.add.mul.z.vf.xyz vf6 vf5 vf1 acc) (.svf (&-> dst vector 2 quad) vf5) (nop!) (.svf (&-> dst vector 3 quad) vf6) @@ -825,9 +823,9 @@ (.lvf vf10 (&-> arg0 vector 0 quad)) (.outer.product.a.vf acc vf11 vf12) (.outer.product.b.vf vf13 vf12 vf11 acc) - (.mul.vf vf13 vf13 vf10 :mask #b111) - (.add.y.vf vf13 vf13 vf13 :mask #b1) - (.add.z.vf vf13 vf13 vf13 :mask #b1) + (.mul.vf.xyz vf13 vf13 vf10) + (.add.y.vf.x vf13 vf13 vf13) + (.add.z.vf.x vf13 vf13 vf13) (.mov v0-0 vf13) v0-0 ) @@ -922,15 +920,15 @@ (.outer.product.b.vf vf13 vf12 vf11 acc) (.outer.product.a.vf acc vf12 vf10) (.outer.product.b.vf vf14 vf10 vf12 acc) - (.mul.vf vf1 vf10 vf13 :mask #b111) + (.mul.vf.xyz vf1 vf10 vf13) (.outer.product.a.vf acc vf10 vf11) (.outer.product.b.vf vf15 vf11 vf10 acc) (.nop.vf) - (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak1/engine/math/quaternion_REF.gc b/test/decompiler/reference/jak1/engine/math/quaternion_REF.gc index 0308e749133..44f60eb57a5 100644 --- a/test/decompiler/reference/jak1/engine/math/quaternion_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/quaternion_REF.gc @@ -162,8 +162,8 @@ ) (.lvf vf1 (&-> arg1 vec quad)) (.sub.vf vf2 vf2 vf2) - (.sub.vf vf2 vf2 vf1 :mask #b111) - (.add.vf vf2 vf2 vf1 :mask #b1000) + (.sub.vf.xyz vf2 vf2 vf1) + (.add.vf.w vf2 vf2 vf1) (.svf (&-> arg0 vec quad) vf2) arg0 ) @@ -200,9 +200,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 vec quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -219,9 +219,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 vec quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v1-1 vf1) (sqrtf v1-1) @@ -239,9 +239,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 vec quad)) (.mul.vf vf2 vf1 vf1) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) (.mul.vf vf2 vf1 Q) @@ -266,12 +266,12 @@ (.lvf vf1 (&-> arg1 vec quad)) (.mul.vf vf2 vf1 vf1) (.sub.vf vf3 vf3 vf3) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) - (.sub.vf vf3 vf3 vf1 :mask #b111) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) + (.sub.vf.xyz vf3 vf3 vf1) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) - (.add.vf vf3 vf3 vf1 :mask #b1000) + (.add.vf.w vf3 vf3 vf1) (.wait.vf) (.mul.vf vf3 vf3 Q) (.nop.vf) @@ -293,9 +293,9 @@ (.lvf vf1 (&-> arg0 vec quad)) (.lvf vf2 (&-> arg1 vec quad)) (.mul.vf vf1 vf1 vf2) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -314,16 +314,16 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 vec quad)) (.lvf vf2 (&-> arg2 vec quad)) - (.sub.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.w vf4 vf0 vf0) (.mul.vf vf3 vf1 vf2) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf4 vf2 vf1 acc) (.mul.w.vf acc vf1 vf2) (.add.mul.w.vf acc vf2 vf1 acc) - (.sub.mul.w.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.z.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.x.vf acc vf0 vf3 acc :mask #b1000) + (.sub.mul.w.vf.w acc vf0 vf3 acc) + (.sub.mul.z.vf.w acc vf0 vf3 acc) + (.sub.mul.y.vf.w acc vf0 vf3 acc) + (.sub.mul.x.vf.w acc vf0 vf3 acc) (.add.mul.w.vf vf1 vf4 vf0 acc) (.svf (&-> arg0 vec quad) vf1) arg0 @@ -398,27 +398,27 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 vec quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.svf (&-> arg0 vector 3 quad) vf0) (.svf (&-> arg0 vector 0 quad) vf2) (.svf (&-> arg0 vector 1 quad) vf3) @@ -514,7 +514,7 @@ (vf7 :class vf) ) (let ((v1-0 (new-stack-matrix0))) - (let* ((f0-1 (vector-dot (the-as vector (-> arg1 vector)) (the-as vector (-> arg1 vector)))) + (let* ((f0-1 (vector-dot (-> arg1 vector 0) (-> arg1 vector 0))) (f1-1 (vector-dot (-> arg1 vector 1) (-> arg1 vector 1))) (f2-1 (vector-dot (-> arg1 vector 2) (-> arg1 vector 2))) (f0-3 (/ 1.0 (sqrtf f0-1))) @@ -580,7 +580,7 @@ ;; definition for function quaternion-exp! (defun quaternion-exp! ((arg0 quaternion) (arg1 quaternion)) - (let ((f30-0 (vector-length (the-as vector arg1)))) + (let ((f30-0 (vector-length (-> arg1 vec)))) (cond ((= f30-0 0.0) (set! (-> arg0 x) 0.0) @@ -590,7 +590,7 @@ ) (else (let ((s5-0 (new 'stack-no-clear 'vector))) - (sincos-rad! (the-as (pointer float) s5-0) f30-0) + (sincos-rad! (&-> s5-0 x) f30-0) (let ((f0-6 (/ (-> s5-0 x) f30-0))) (set! (-> arg0 x) (* (-> arg1 x) f0-6)) (set! (-> arg0 y) (* (-> arg1 y) f0-6)) @@ -722,17 +722,17 @@ (.lvf vf1 (&-> gp-0 quad)) (.lvf vf2 (&-> s5-0 quad)) ) - (.mul.x.vf vf4 vf0 vf1 :mask #b1000) - (.add.vf vf4 vf0 vf2 :mask #b111) - (.sub.vf vf4 vf0 vf4 :mask #b110) - (.add.vf vf3 vf0 vf1 :mask #b111) - (.mul.x.vf vf3 vf0 vf2 :mask #b1000) + (.mul.x.vf.w vf4 vf0 vf1) + (.add.vf.xyz vf4 vf0 vf2) + (.sub.vf.yz vf4 vf0 vf4) + (.add.vf.xyz vf3 vf0 vf1) + (.mul.x.vf.w vf3 vf0 vf2) (.outer.product.a.vf acc vf1 vf1) (.outer.product.b.vf vf6 vf0 vf0 acc) (.outer.product.a.vf acc vf2 vf2) (.outer.product.b.vf vf5 vf0 vf0 acc) - (.mul.x.vf vf6 vf0 vf6 :mask #b1000) - (.mul.x.vf vf5 vf0 vf5 :mask #b1000) + (.mul.x.vf.w vf6 vf0 vf6) + (.mul.x.vf.w vf5 vf0 vf5) (.mul.vf acc vf6 vf4) (.add.mul.vf vf7 vf5 vf3 acc) (.svf (&-> arg0 vec quad) vf7) @@ -858,7 +858,7 @@ (let ((s0-0 (t9-0 a0-1 1.0))) (quaternion-from-two-vectors-max-angle! s5-0 - (vector-z-quaternion! (the-as vector (new 'stack-no-clear 'quaternion)) arg1) + (vector-z-quaternion! (-> (new 'stack-no-clear 'quaternion) vec) arg1) s0-0 arg3 ) diff --git a/test/decompiler/reference/jak1/engine/math/transformq_REF.gc b/test/decompiler/reference/jak1/engine/math/transformq_REF.gc index 28062a33981..c57365a76df 100644 --- a/test/decompiler/reference/jak1/engine/math/transformq_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/transformq_REF.gc @@ -125,7 +125,7 @@ ) (let ((dir-z (-> rot-mat vector 2))) (vector-normalize! (vector-flatten! (-> rot-mat vector 1) grav dir-z) 1.0) - (vector-cross! (the-as vector (-> rot-mat vector)) (-> rot-mat vector 1) dir-z) + (vector-cross! (-> rot-mat vector 0) (-> rot-mat vector 1) dir-z) ) (let ((a1-5 (matrix-rotate-z! (new 'stack-no-clear 'matrix) arg0))) (matrix*! rot-mat a1-5 rot-mat) @@ -233,7 +233,7 @@ (.lvf vf3 (&-> arg0 vector 0 quad)) (.lvf vf4 (&-> arg0 vector 1 quad)) (.lvf vf5 (&-> arg0 vector 2 quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) @@ -294,14 +294,14 @@ (.lvf vf3 (&-> arg0 vector 0 quad)) (.lvf vf4 (&-> arg0 vector 1 quad)) (.lvf vf5 (&-> arg0 vector 2 quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) (.mul.x.vf acc vf3 vf6) (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> arg0 vector 3 quad) vf2) (.svf (&-> arg0 vector 0 quad) vf3) (.svf (&-> arg0 vector 1 quad) vf4) @@ -328,11 +328,11 @@ (.lvf vf3 (&-> arg0 vector 0 quad)) (.lvf vf4 (&-> arg0 vector 1 quad)) (.lvf vf5 (&-> arg0 vector 2 quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) - (.add.vf vf2 vf2 vf6 :mask #b111) + (.add.vf.xyz vf2 vf2 vf6) (.svf (&-> arg0 vector 3 quad) vf2) (.svf (&-> arg0 vector 0 quad) vf3) (.svf (&-> arg0 vector 1 quad) vf4) @@ -360,7 +360,7 @@ (set! (-> v1-0 z) (/ 1.0 (-> arg2 z))) (.lvf vf1 (&-> arg1 scale quad)) (.lvf vf2 (&-> arg1 trans quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.lvf vf4 (&-> arg0 vector 0 quad)) (.lvf vf5 (&-> arg0 vector 1 quad)) (.lvf vf6 (&-> arg0 vector 2 quad)) diff --git a/test/decompiler/reference/jak1/engine/math/vector-h_REF.gc b/test/decompiler/reference/jak1/engine/math/vector-h_REF.gc index 2fa4966c07b..d21be1a837f 100644 --- a/test/decompiler/reference/jak1/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/vector-h_REF.gc @@ -696,8 +696,8 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -721,11 +721,11 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.w.vf vf3 vf0 vf0 :mask #b1) - (.mul.x.vf acc vf3 vf1 :mask #b1) - (.add.mul.y.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.z.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.w.vf vf1 vf3 vf1 acc :mask #b1) + (.add.w.vf.x vf3 vf0 vf0) + (.mul.x.vf.x acc vf3 vf1) + (.add.mul.y.vf.x acc vf3 vf1 acc) + (.add.mul.z.vf.x acc vf3 vf1 acc) + (.add.mul.w.vf.x vf1 vf3 vf1 acc) (.mov v0-0 vf1) v0-0 ) diff --git a/test/decompiler/reference/jak1/engine/math/vector_REF.gc b/test/decompiler/reference/jak1/engine/math/vector_REF.gc index f5383c92915..d2ce2109762 100644 --- a/test/decompiler/reference/jak1/engine/math/vector_REF.gc +++ b/test/decompiler/reference/jak1/engine/math/vector_REF.gc @@ -16,8 +16,8 @@ (init-vf0-vector) (.mov vf6 arg2) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> arg0 quad) vf5) arg0 ) @@ -41,9 +41,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -62,9 +62,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.w.vf acc vf4 vf0 :mask #b111) - (.sub.mul.x.vf vf6 vf5 vf7 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.w.vf.xyz acc vf4 vf0) + (.sub.mul.x.vf.xyz vf6 vf5 vf7 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -82,19 +82,19 @@ (init-vf0-vector) (.lvf vf5 (&-> arg2 quad)) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b1) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf6 vf0 vf0) (.lvf vf4 (&-> arg1 quad)) (let ((v1-0 (/ (-> arg1 x) (-> arg2 x)))) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b10) + (.mul.vf.y vf6 vf4 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b10) (.mov vf7 v1-0) ) - (.add.x.vf vf6 vf0 vf7 :mask #b1) + (.add.x.vf.x vf6 vf0 vf7) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b100) + (.mul.vf.z vf6 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf6) @@ -111,8 +111,8 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.mov vf2 arg2) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -133,9 +133,9 @@ (.lvf vf2 (&-> arg2 quad)) (.mov vf3 v1-0) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf1 vf3) - (.add.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.add.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -154,9 +154,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -175,9 +175,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.w.vf acc vf1 vf0) - (.sub.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.sub.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -195,9 +195,9 @@ (.mov vf3 arg2) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0) (.lvf vf1 (&-> arg1 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.wait.vf) - (.mul.vf vf4 vf1 Q :mask #b111) + (.mul.vf.xyz vf4 vf1 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -213,8 +213,8 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) - (.sub.vf vf4 vf0 vf1 :mask #b111) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.xyz vf4 vf0 vf1) + (.add.x.vf.w vf4 vf0 vf0) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -227,7 +227,7 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.vf vf1 vf0 vf1 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf1) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -250,10 +250,10 @@ (.lvf vf2 (&-> arg1 quad)) (.sub.vf vf1 vf2 vf1) (.abs.vf vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf1 acc :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf3 vf0 vf1 acc) + (.add.w.vf.x vf3 vf0 vf3) (.mov v0-0 vf3) v0-0 ) @@ -272,12 +272,12 @@ (.mov vf4 arg2) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg0 quad)) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.sub.x.vf vf5 vf0 vf4 :mask #b1) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.min.x.vf vf3 vf3 vf4 :mask #b111) - (.max.x.vf vf3 vf3 vf5 :mask #b111) - (.add.vf vf1 vf2 vf3 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.sub.x.vf.x vf5 vf0 vf4) + (.sub.vf.xyz vf3 vf1 vf2) + (.min.x.vf.xyz vf3 vf3 vf4) + (.max.x.vf.xyz vf3 vf3 vf5) + (.add.vf.xyz vf1 vf2 vf3) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -470,8 +470,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -490,8 +490,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -512,11 +512,11 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v0-0 vf1) v0-0 ) @@ -547,13 +547,13 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -572,8 +572,8 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -594,12 +594,12 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -618,7 +618,7 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -635,16 +635,16 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -665,19 +665,19 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) - (.add.w.vf vf2 vf0 vf2 :mask #b1) + (.add.w.vf.x vf2 vf0 vf2) (.mov v1-1 vf2) (let ((v0-0 (sqrtf v1-1))) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -838,10 +838,10 @@ (.lvf vf1 (&-> a quad)) (.lvf vf2 (&-> b quad)) (.mov vf4 alpha) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> out quad) vf3) out ) @@ -873,10 +873,10 @@ (.mov vf4 a1-1) ) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-2 quad) vf3) ) ) @@ -1084,13 +1084,13 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.add.y.vf vf3 vf3 vf3 :mask #b1) - (.add.z.vf vf3 vf3 vf3 :mask #b1) - (.add.w.vf vf4 vf0 vf4 :mask #b1) + (.sub.vf.xyz vf3 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.w.vf.w vf4 vf4 vf4) + (.add.y.vf.x vf3 vf3 vf3) + (.add.z.vf.x vf3 vf3 vf3) + (.add.w.vf.x vf4 vf0 vf4) (.mov a0-1 vf4) (.mov v1-0 vf3) (>= a0-1 v1-0) diff --git a/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc b/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc index fe2d0f566e0..e9f0d12a2d0 100644 --- a/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc +++ b/test/decompiler/reference/jak1/engine/nav/navigate_REF.gc @@ -331,11 +331,11 @@ ) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.sub.vf.yw vf1 vf1 vf1) (.lvf vf3 (&-> arg3 quad)) - (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.sub.vf.yw vf2 vf2 vf2) (.lvf vf12 (&-> arg0 quad)) - (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf.yw vf3 vf3 vf3) (.sub.vf vf4 vf2 vf1) (.sub.vf vf9 vf1 vf12) (.sub.vf vf5 vf3 vf2) @@ -448,11 +448,11 @@ (when (>= arg3 f0-3) (.lvf vf1 (&-> v1-5 quad)) (.lvf vf2 (&-> a1-5 quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.sub.vf.yw vf1 vf1 vf1) (.lvf vf3 (&-> a0-2 quad)) - (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.sub.vf.yw vf2 vf2 vf2) (.lvf vf12 (&-> arg2 quad)) - (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf.yw vf3 vf3 vf3) (.sub.vf vf4 vf2 vf1) (.sub.vf vf9 vf1 vf12) (.sub.vf vf5 vf3 vf2) @@ -846,19 +846,19 @@ ) ) ) - (.min.vf vf1 vf3 vf4 :mask #b111) + (.min.vf.xyz vf1 vf3 vf4) (.lvf vf6 (&-> arg0 quad)) - (.add.y.vf vf7 vf3 vf4 :mask #b10) + (.add.y.vf.y vf7 vf3 vf4) (.svf (&-> s2-0 0 quad) vf3) - (.max.vf vf2 vf3 vf4 :mask #b111) + (.max.vf.xyz vf2 vf3 vf4) (.svf (&-> s2-0 1 quad) vf4) - (.min.vf vf1 vf1 vf5 :mask #b111) + (.min.vf.xyz vf1 vf1 vf5) (.svf (&-> s2-0 2 quad) vf5) - (.max.vf vf2 vf2 vf5 :mask #b111) - (.mul.x.vf vf7 vf7 vf7 :mask #b10) + (.max.vf.xyz vf2 vf2 vf5) + (.mul.x.vf.y vf7 vf7 vf7) (.svf (&-> s2-0 3 quad) vf1) (.svf (&-> s2-0 4 quad) vf2) - (.sub.y.vf vf7 vf6 vf7 :mask #b10) + (.sub.y.vf.y vf7 vf6 vf7) (.mov v1-10 vf7) (let ((v1-11 (the-as number (sar (the-as int v1-10) 32)))) (when (and (>= arg2 (fabs (the-as float v1-11))) @@ -1648,7 +1648,7 @@ (set! (-> s4-0 vector 0 quad) (-> this vertex (-> arg0 vertex 0) quad)) (set! (-> s4-0 vector 1 quad) (-> this vertex (-> arg0 vertex 1) quad)) (set! (-> s4-0 vector 2 quad) (-> this vertex (-> arg0 vertex 2) quad)) - (normal-of-plane s3-0 (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) (-> s4-0 vector 2)) + (normal-of-plane s3-0 (-> s4-0 vector 0) (-> s4-0 vector 1) (-> s4-0 vector 2)) (closest-pt-in-triangle arg1 arg2 s4-0 s3-0) ) (none) @@ -1929,7 +1929,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf) - (the-as vector (-> this shape root-prim prim-core)) + (-> this shape root-prim prim-core world-sphere) (-> this shape nav-radius) (new 'static 'rgba :g #xff :b #xff :a #x20) ) @@ -2456,9 +2456,9 @@ (f1-0 (-> sv-208 w)) ) (when (< f0-10 (* f1-0 f1-0)) - (vector-! (the-as vector (-> gp-0 temp-dir)) arg1 (the-as vector sv-208)) + (vector-! (-> gp-0 temp-dir 0) arg1 (the-as vector sv-208)) (set! (-> gp-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> gp-0 temp-dir)) (-> gp-0 in-dir))) + (if (< 0.0 (vector-dot (-> gp-0 temp-dir 0) (-> gp-0 in-dir))) (+! (-> gp-0 initial-ignore-mask) (ash 1 s0-0)) ) (set! (-> gp-0 inside-dist) (- (-> sv-208 w) (sqrtf (-> gp-0 dist2)))) @@ -2486,7 +2486,7 @@ ) (+! (-> gp-0 initial-ignore-mask) (ash 1 (-> gp-0 i-first-sphere))) (let ((a1-9 (-> this sphere (-> gp-0 i-first-sphere)))) - (circle-tangent-directions arg1 a1-9 (the-as vector (-> gp-0 temp-dir)) (-> gp-0 temp-dir 1)) + (circle-tangent-directions arg1 a1-9 (-> gp-0 temp-dir 0) (-> gp-0 temp-dir 1)) ) (dotimes (v1-31 2) (let ((a0-28 (vector-dot (-> gp-0 right-dir) (-> gp-0 temp-dir v1-31)))) @@ -2508,12 +2508,7 @@ (b! #t cfg-31 :delay (nop!)) (label cfg-22) (+! (-> gp-0 ignore-mask) (ash 1 v1-38)) - (circle-tangent-directions - arg1 - (-> this sphere v1-38) - (the-as vector (-> gp-0 temp-dir)) - (-> gp-0 temp-dir 1) - ) + (circle-tangent-directions arg1 (-> this sphere v1-38) (-> gp-0 temp-dir 0) (-> gp-0 temp-dir 1)) (set! (-> gp-0 dir-update) #f) (dotimes (v1-40 2) (let ((f0-23 (-> gp-0 sign)) @@ -2560,18 +2555,18 @@ ) (vector-normalize! (-> gp-0 away-dir) 1.0) (let ((f30-2 (/ (-> gp-0 inside-sphere-dist) (-> s2-1 w)))) - (vector-lerp! (the-as vector (-> gp-0 best-dir)) (the-as vector (-> gp-0 best-dir)) (-> gp-0 away-dir) f30-2) + (vector-lerp! (-> gp-0 best-dir 0) (-> gp-0 best-dir 0) (-> gp-0 away-dir) f30-2) (vector-lerp! (-> gp-0 best-dir 1) (-> gp-0 best-dir 1) (-> gp-0 away-dir) f30-2) ) ) - (vector-normalize! (the-as vector (-> gp-0 best-dir)) 1.0) + (vector-normalize! (-> gp-0 best-dir 0) 1.0) (vector-normalize! (-> gp-0 best-dir 1) 1.0) ) - (let ((f30-3 (vector-dot (-> gp-0 in-dir) (the-as vector (-> gp-0 best-dir)))) + (let ((f30-3 (vector-dot (-> gp-0 in-dir) (-> gp-0 best-dir 0))) (f28-0 (vector-dot (-> gp-0 in-dir) (-> gp-0 best-dir 1))) ) (when (< (fmax f30-3 f28-0) (cos 1820.4445)) - (set! f30-3 (vector-dot arg3 (the-as vector (-> gp-0 best-dir)))) + (set! f30-3 (vector-dot arg3 (-> gp-0 best-dir 0))) (set! f28-0 (vector-dot arg3 (-> gp-0 best-dir 1))) ) (vector-float*! diff --git a/test/decompiler/reference/jak1/engine/ps2/rpc-h_REF.gc b/test/decompiler/reference/jak1/engine/ps2/rpc-h_REF.gc index 9e0a8300a82..3e3a6a3bfc5 100644 --- a/test/decompiler/reference/jak1/engine/ps2/rpc-h_REF.gc +++ b/test/decompiler/reference/jak1/engine/ps2/rpc-h_REF.gc @@ -36,7 +36,7 @@ (set! (-> v0-0 elt-count) arg1) (set! (-> v0-0 elt-used) (the-as uint 0)) (set! (-> v0-0 busy) #f) - (set! (-> v0-0 base) (logand -64 (&-> (-> v0-0 data) 63))) + (set! (-> v0-0 base) (logand -64 (&-> v0-0 data 63))) v0-0 ) ) diff --git a/test/decompiler/reference/jak1/engine/target/collide-reaction-target_REF.gc b/test/decompiler/reference/jak1/engine/target/collide-reaction-target_REF.gc index baace6a70aa..769906c856e 100644 --- a/test/decompiler/reference/jak1/engine/target/collide-reaction-target_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/collide-reaction-target_REF.gc @@ -288,7 +288,7 @@ (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0)) ) (set! (-> arg0 poly-normal quad) (-> arg1 best-tri normal quad)) - (collide-shape-moving-angle-set! arg0 sv-84 (the-as vector (-> sv-88 vector))) + (collide-shape-moving-angle-set! arg0 sv-84 (-> sv-88 vector 0)) (if (< (-> arg0 poly-angle) -0.2) (set! sv-96 (logior sv-96 16)) ) @@ -319,10 +319,10 @@ (let ((f30-0 (- 1.0 (-> arg0 surf impact-fric)))) (when (< f30-0 1.0) (let ((s3-1 (new-stack-vector0)) - (f28-0 (vector-dot (-> arg0 dynam gravity-normal) (the-as vector (-> sv-88 vector)))) + (f28-0 (vector-dot (-> arg0 dynam gravity-normal) (-> sv-88 vector 0))) ) 0.0 - (vector-! s3-1 (the-as vector (-> sv-88 vector)) (vector-float*! s3-1 (-> arg0 dynam gravity-normal) f28-0)) + (vector-! s3-1 (-> sv-88 vector 0) (vector-float*! s3-1 (-> arg0 dynam gravity-normal) f28-0)) (let* ((f0-20 (vector-length s3-1)) (f1-9 f0-20) ) @@ -330,8 +330,8 @@ (set! f28-0 (* f28-0 f30-0)) ) (vector+! - (the-as vector (-> sv-88 vector)) - (vector-float*! (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal) f28-0) + (-> sv-88 vector 0) + (vector-float*! (-> sv-88 vector 0) (-> arg0 dynam gravity-normal) f28-0) (vector-float*! s3-1 s3-1 (/ f0-20 f1-9)) ) ) @@ -368,10 +368,10 @@ (#f (sound-play "cursor-options") (set! sv-104 (logior sv-104 8192)) - (vector-reflect-flat-above! arg2 (the-as vector (-> sv-88 vector)) sv-84) + (vector-reflect-flat-above! arg2 (-> sv-88 vector 0) sv-84) ) (else - (vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84) + (vector-reflect-flat! arg2 (-> sv-88 vector 0) sv-84) ) ) (cond @@ -393,7 +393,7 @@ (set! sv-104 (logand -65 sv-104)) (let ((s3-4 (vector-cross! (new 'stack-no-clear 'vector) (-> arg0 poly-normal) (-> arg0 ground-poly-normal)))) (vector-normalize! s3-4 1.0) - (vector-float*! arg2 s3-4 (vector-dot (the-as vector (-> sv-88 vector)) s3-4)) + (vector-float*! arg2 s3-4 (vector-dot (-> sv-88 vector 0) s3-4)) ) (vector+! arg2 arg2 (-> arg0 poly-normal)) ) @@ -405,7 +405,7 @@ (if (= (-> arg1 best-from-prim prim-id) 6) (set! (-> arg0 local-normal quad) (-> sv-84 quad)) ) - (vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84) + (vector-reflect-flat! arg2 (-> sv-88 vector 0) sv-84) (vector+! arg2 arg2 sv-84) (set! (-> arg0 ground-touch-point w) 0.0) (when (not (or (logtest? sv-104 15) (nonzero? (-> arg0 poly-pat event)))) diff --git a/test/decompiler/reference/jak1/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak1/engine/target/logic-target_REF.gc index d4b7907e2b6..b73e901e2f5 100644 --- a/test/decompiler/reference/jak1/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/logic-target_REF.gc @@ -783,7 +783,7 @@ (-> self control dynam gravity-normal) (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> self control unknown-sphere-array00 1 prim-core)) + (-> self control unknown-sphere-array00 1 prim-core world-sphere) (-> self control unknown-vector70) ) ) @@ -1264,7 +1264,7 @@ ) (set! (-> self control ground-pat) (the-as pat-surface (-> s5-0 edge-tri-pat))) (vector-normalize! - (vector-! (-> self control unknown-vector100) (the-as vector (-> s5-0 world-vertex)) (-> s5-0 world-vertex 1)) + (vector-! (-> self control unknown-vector100) (-> s5-0 world-vertex 0) (-> s5-0 world-vertex 1)) 1.0 ) (let ((gp-1 (vector-cross! @@ -1322,7 +1322,7 @@ (debug-draw gp-0) ) (vector-normalize! - (vector-! (-> self control unknown-vector100) (the-as vector (-> gp-0 world-vertex)) (-> gp-0 world-vertex 1)) + (vector-! (-> self control unknown-vector100) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) (vector-cross! @@ -1445,45 +1445,36 @@ (< (fabs (- (-> gp-0 y) (-> self control trans y))) 8192.0) ) ) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> gp-0 quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> gp-0 quad)) ) (else (let ((v1-11 (-> self water flags))) (cond ((and (logtest? v1-11 (water-flags wt09)) (logtest? v1-11 (water-flags wt11 wt12))) - (vector<-cspace! - (the-as vector (&-> (-> self control) unknown-qword00)) - (the-as cspace (-> self node-list data)) - ) + (vector<-cspace! (the-as vector (&-> self control unknown-qword00)) (-> self node-list data 0)) (if (not (and (logtest? (-> self water flags) (water-flags wt12)) (not (logtest? (-> self water flags) (water-flags wt04))) ) ) (set! (-> self control unknown-float30) (- (-> self water base-height) (-> self water swim-height))) ) - (&-> (-> self control) unknown-qword00) + (&-> self control unknown-qword00) ) ((and (logtest? (-> self water flags) (water-flags wt09)) (logtest? (water-flags wt18) (-> self water flags))) - (vector<-cspace! - (the-as vector (&-> (-> self control) unknown-qword00)) - (the-as cspace (-> self node-list data)) - ) + (vector<-cspace! (the-as vector (&-> self control unknown-qword00)) (-> self node-list data 0)) (set! (-> self control unknown-float30) (-> self water base-height)) ) ((logtest? (-> self control root-prim prim-core action) (collide-action racer)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) ) ((logtest? (-> self control root-prim prim-core action) (collide-action tube)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control shadow-pos quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control shadow-pos quad)) ) ((logtest? (-> self draw status) (draw-status hidden no-anim)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) ) (else - (vector<-cspace! - (the-as vector (&-> (-> self control) unknown-qword00)) - (the-as cspace (-> self node-list data)) - ) + (vector<-cspace! (the-as vector (&-> self control unknown-qword00)) (-> self node-list data 0)) ) ) ) @@ -1952,7 +1943,7 @@ (quaternion-identity! (-> self control unknown-quaternion00)) (quaternion-identity! (-> self control dir-targ)) (set! (-> self control transv quad) (the-as uint128 0)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) ) (target-exit) (target-timed-invulnerable-off self) @@ -2050,7 +2041,7 @@ (backup-collide-with-as (-> self control)) (set! (-> self game) *game-info*) (move-to-point! (-> self control) (-> arg0 trans)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> arg0 trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> arg0 trans quad)) (set! (-> self control unknown-cpad-info00) (-> *cpad-list* cpads 0)) (set! (-> self control unknown-surface01) (new 'process 'surface)) (set! (-> self control unknown-surface01 name) 'current) diff --git a/test/decompiler/reference/jak1/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak1/engine/target/sidekick_REF.gc index 4455ac226e7..aa7b6129493 100644 --- a/test/decompiler/reference/jak1/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/sidekick_REF.gc @@ -43,8 +43,8 @@ (.lvf vf5 (&-> s5-0 vector 2 quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) + (.mul.vf.xyz vf2 vf2 Q) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) diff --git a/test/decompiler/reference/jak1/engine/target/target-death_REF.gc b/test/decompiler/reference/jak1/engine/target/target-death_REF.gc index c3b94327da1..7843afdc563 100644 --- a/test/decompiler/reference/jak1/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target-death_REF.gc @@ -78,7 +78,7 @@ (quaternion-copy! (-> self control unknown-quaternion00) (-> arg0 quat)) (move-to-point! (-> self control) (-> arg0 trans)) (rot->dir-targ! (-> self control)) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) (cond ((not (string= (-> arg0 name) "default")) (set! *external-cam-mode* #f) @@ -885,7 +885,7 @@ ) (move-to-point! (-> self control) s4-1) ) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) (send-event *camera* 'teleport) (go target-stance) ) @@ -988,7 +988,7 @@ (compute-alignment! (-> self align)) (let ((s5-0 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s5-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01)) + (vector-matrix*! s5-0 (-> self align delta trans) (-> self control unknown-matrix01)) (vector-float*! (-> self control transv) s5-0 (-> *display* frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak1/engine/target/target-handler_REF.gc b/test/decompiler/reference/jak1/engine/target/target-handler_REF.gc index cce07475339..a725442eca8 100644 --- a/test/decompiler/reference/jak1/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target-handler_REF.gc @@ -739,7 +739,7 @@ ) ) (('launch) - (mem-copy! (&-> (-> self control) unknown-pointer00) (the-as pointer arg3) 72) + (mem-copy! (&-> self control unknown-pointer00) (the-as pointer arg3) 72) #t ) (('powerup) @@ -911,7 +911,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control unknown-sphere-array00 0 prim-core)) + (-> self control unknown-sphere-array00 0 prim-core world-sphere) (-> self control unknown-vector72) ) (the-as float 1.0) diff --git a/test/decompiler/reference/jak1/engine/target/target-part_REF.gc b/test/decompiler/reference/jak1/engine/target/target-part_REF.gc index f7f14ae0812..5d2ad363b92 100644 --- a/test/decompiler/reference/jak1/engine/target/target-part_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target-part_REF.gc @@ -63,14 +63,14 @@ ((< (-> s4-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s4-1 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s4-1 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-12 vf1) ) @@ -112,14 +112,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) @@ -156,14 +156,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 vec quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-5 vf1) ) diff --git a/test/decompiler/reference/jak1/engine/target/target-util_REF.gc b/test/decompiler/reference/jak1/engine/target/target-util_REF.gc index a0b1436b5bd..d948041298e 100644 --- a/test/decompiler/reference/jak1/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target-util_REF.gc @@ -1277,7 +1277,7 @@ ) ((logtest? (state-flags falling-into-pool-of-bad) (-> gp-0 state-flags)) (let ((s5-0 (the-as object (new 'static 'vector)))) - (set! (-> (the-as vector s5-0) quad) (-> (&-> (-> gp-0 control) unknown-qword00) 0)) + (set! (-> (the-as vector s5-0) quad) (-> (&-> gp-0 control unknown-qword00) 0)) (set! (-> (the-as vector s5-0) y) (fmax (-> (the-as vector s5-0) y) (-> gp-0 alt-cam-pos y))) (add-debug-sphere *display-camera-marks* @@ -1293,11 +1293,11 @@ (add-debug-sphere *display-camera-marks* (bucket-id debug-no-zbuf) - (the-as vector (&-> (-> gp-0 control) unknown-qword00)) + (the-as vector (&-> gp-0 control unknown-qword00)) 819.2 (new 'static 'rgba :r #xff :a #x80) ) - (&-> (-> gp-0 control) unknown-qword00) + (&-> gp-0 control unknown-qword00) ) ) ) diff --git a/test/decompiler/reference/jak1/engine/target/target2_REF.gc b/test/decompiler/reference/jak1/engine/target/target2_REF.gc index c11bbb8a072..43d974d100a 100644 --- a/test/decompiler/reference/jak1/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak1/engine/target/target2_REF.gc @@ -548,11 +548,11 @@ ) (set! sv-48 s5-1) (let ((v0-3 (camera-pos))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> v0-3 quad)) ) (.lvf vf5 (&-> s5-1 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-48 quad) vf6) (let ((t1-0 (if (>= (-> self fact eco-level) (-> *FACT-bank* eco-level-max)) 56 @@ -699,11 +699,11 @@ ) (set! sv-48 s5-1) (let ((v0-4 (camera-pos))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> v0-4 quad)) ) (.lvf vf5 (&-> s5-1 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-48 quad) vf6) (let ((t1-0 (if (>= (-> self fact eco-level) (-> *FACT-bank* eco-level-max)) 120 @@ -1255,7 +1255,7 @@ (target-compute-edge-rider) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s4-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01)) + (vector-matrix*! s4-0 (-> self align delta trans) (-> self control unknown-matrix01)) (move-by-vector! (-> self control) s4-0) ) (suspend) @@ -1284,7 +1284,7 @@ (until (ja-done? 0) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control unknown-matrix01)) (move-by-vector! (-> self control) gp-0) ) (suspend) @@ -2751,7 +2751,7 @@ (send-event (ppointer->process (-> self sidekick)) 'matrix 'normal) (send-event (ppointer->process (-> self sidekick)) 'shadow #t) (let ((gp-0 (joint-node eichar-lod0-jg main)) - (a1-2 (&-> (-> self control) unknown-qword00)) + (a1-2 (&-> self control unknown-qword00)) ) (cond ((not (-> self control unknown-spoolanim00)) diff --git a/test/decompiler/reference/jak1/engine/ui/text_REF.gc b/test/decompiler/reference/jak1/engine/ui/text_REF.gc index 8abc57e0071..fe2c9f54d99 100644 --- a/test/decompiler/reference/jak1/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak1/engine/ui/text_REF.gc @@ -239,22 +239,10 @@ ) ) (set-vector! s5-0 128 128 128 128) - (add-debug-line2d - #t - (bucket-id debug-no-zbuf) - (the-as vector (-> gp-0 vector)) - (-> gp-0 vector 1) - (the-as vector s5-0) - ) + (add-debug-line2d #t (bucket-id debug-no-zbuf) (-> gp-0 vector 0) (-> gp-0 vector 1) (the-as vector s5-0)) (add-debug-line2d #t (bucket-id debug-no-zbuf) (-> gp-0 vector 1) (-> gp-0 vector 2) (the-as vector s5-0)) (add-debug-line2d #t (bucket-id debug-no-zbuf) (-> gp-0 vector 2) (-> gp-0 vector 3) (the-as vector s5-0)) - (add-debug-line2d - #t - (bucket-id debug-no-zbuf) - (-> gp-0 vector 3) - (the-as vector (-> gp-0 vector)) - (the-as vector s5-0) - ) + (add-debug-line2d #t (bucket-id debug-no-zbuf) (-> gp-0 vector 3) (-> gp-0 vector 0) (the-as vector s5-0)) ) 0 (none) diff --git a/test/decompiler/reference/jak1/kernel/gkernel_REF.gc b/test/decompiler/reference/jak1/kernel/gkernel_REF.gc index d6c2a656269..f887aba8d90 100644 --- a/test/decompiler/reference/jak1/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak1/kernel/gkernel_REF.gc @@ -550,7 +550,6 @@ ) ;; definition for method 3 of type dead-pool-heap -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this dead-pool-heap)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) @@ -846,7 +845,7 @@ (set! (-> s4-0 prev) a1-3) (set! (-> this alive-list prev) s4-0) (set! (-> s4-0 process) - (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> (-> s4-0 process) type)))) + (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> s4-0 process type)))) ) ) ) diff --git a/test/decompiler/reference/jak1/levels/beach/lurkercrab_REF.gc b/test/decompiler/reference/jak1/levels/beach/lurkercrab_REF.gc index ba7b4b61250..9cab3c86b94 100644 --- a/test/decompiler/reference/jak1/levels/beach/lurkercrab_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/lurkercrab_REF.gc @@ -473,7 +473,7 @@ nav-enemy-default-event-handler (let ((a0-0 (-> self part)) (a1-0 (-> self collide-info root-prim prim-core)) ) - (spawn a0-0 (the-as vector a1-0)) + (spawn a0-0 (-> a1-0 world-sphere)) ) (nav-enemy-travel-post) ) diff --git a/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc b/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc index c69050d4a60..51b15e3de64 100644 --- a/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/pelican_REF.gc @@ -586,7 +586,7 @@ :post (behavior () (when *target* (if *target* - (look-at-enemy! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'nothing self) + (look-at-enemy! (-> *target* neck) (-> self root root-prim prim-core world-sphere) 'nothing self) ) (if (nonzero? (-> self neck)) (set-target! (-> self neck) (target-pos 5)) diff --git a/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc b/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc index 5c7394fd305..a5fec0c20fc 100644 --- a/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc +++ b/test/decompiler/reference/jak1/levels/beach/seagull_REF.gc @@ -594,8 +594,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-0 quad) vf1) ) (vector+! a1-1 a0-2 v1-0) diff --git a/test/decompiler/reference/jak1/levels/citadel/citadel-part_REF.gc b/test/decompiler/reference/jak1/levels/citadel/citadel-part_REF.gc index e642de507c2..ff1b0cd7c4f 100644 --- a/test/decompiler/reference/jak1/levels/citadel/citadel-part_REF.gc +++ b/test/decompiler/reference/jak1/levels/citadel/citadel-part_REF.gc @@ -617,14 +617,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 vector 1 quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 vector 1 quad) vf1) (.mov v1-5 vf1) ) (else (.lvf vf1 (&-> arg2 vector 1 quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 vector 1 quad) vf1) (.mov v1-6 vf1) ) diff --git a/test/decompiler/reference/jak1/levels/common/blocking-plane_REF.gc b/test/decompiler/reference/jak1/levels/common/blocking-plane_REF.gc index 6eccea76a3b..e9566ef96db 100644 --- a/test/decompiler/reference/jak1/levels/common/blocking-plane_REF.gc +++ b/test/decompiler/reference/jak1/levels/common/blocking-plane_REF.gc @@ -67,14 +67,12 @@ (vector+! (-> self root trans) s5-0 gp-0) (vector-float*! (-> self root trans) (-> self root trans) 0.5) (+! (-> self root trans y) 61440.0) - (vector-! (the-as vector (-> s4-2 vector)) gp-0 s5-0) - (set! (-> self root scale x) - (* 0.00024414062 (vector-normalize-ret-len! (the-as vector (-> s4-2 vector)) 1.0)) - ) + (vector-! (-> s4-2 vector 0) gp-0 s5-0) + (set! (-> self root scale x) (* 0.00024414062 (vector-normalize-ret-len! (-> s4-2 vector 0) 1.0))) (set! (-> self root scale y) 30.0) (set! (-> self root scale z) 0.0) (set! (-> s4-2 vector 1 quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) - (vector-cross! (-> s4-2 vector 2) (the-as vector (-> s4-2 vector)) (-> s4-2 vector 1)) + (vector-cross! (-> s4-2 vector 2) (-> s4-2 vector 0) (-> s4-2 vector 1)) (vector-normalize! (-> s4-2 vector 2) 1.0) (matrix->quaternion (-> self root quat) s4-2) ) diff --git a/test/decompiler/reference/jak1/levels/finalboss/final-door_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/final-door_REF.gc index 15ba3b2c147..edc7885c006 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/final-door_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/final-door_REF.gc @@ -278,7 +278,7 @@ (eval-position! gp-1 f0-2 (-> self root trans)) ) (transform-post) - (spawn (-> self part) (the-as vector (-> self root root-prim prim-core))) + (spawn (-> self part) (-> self root root-prim prim-core world-sphere)) (suspend) (if (nonzero? (-> self skel)) (ja :num! (loop! 0.5)) diff --git a/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc index 1a1f6e5b174..42bdc53259a 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/robotboss-weapon_REF.gc @@ -32,7 +32,7 @@ (s5-0 (new 'stack-no-clear 'vector)) (f30-0 (+ (-> this radius-secondary) (-> arg0 world-sphere w))) ) - (vector-! gp-0 (the-as vector arg0) (-> this origin)) + (vector-! gp-0 (-> arg0 world-sphere) (-> this origin)) (vector-flatten! s5-0 gp-0 (-> this axis)) (vector-normalize! s5-0 (-> this radius-primary)) (vector-! arg1 gp-0 s5-0) diff --git a/test/decompiler/reference/jak1/levels/finalboss/robotboss_REF.gc b/test/decompiler/reference/jak1/levels/finalboss/robotboss_REF.gc index e668eab37aa..d43a9780d51 100644 --- a/test/decompiler/reference/jak1/levels/finalboss/robotboss_REF.gc +++ b/test/decompiler/reference/jak1/levels/finalboss/robotboss_REF.gc @@ -63,11 +63,7 @@ (vector<-cspace! s4-1 (joint-node robotboss-basic-lod0-jg camera)) (set! (-> *camera-other-trans* quad) (-> s4-1 quad)) ) - (vector-normalize-copy! - (the-as vector (-> *camera-other-matrix* vector)) - (the-as vector (-> s5-1 vector)) - (the-as float -1.0) - ) + (vector-normalize-copy! (-> *camera-other-matrix* vector 0) (-> s5-1 vector 0) (the-as float -1.0)) (set! (-> *camera-other-matrix* vector 0 w) 0.0) (vector-normalize-copy! (-> *camera-other-matrix* vector 1) (-> s5-1 vector 1) (the-as float 1.0)) (set! (-> *camera-other-matrix* vector 1 w) 0.0) @@ -295,7 +291,7 @@ (set! (-> gp-0 x) 0.0) (vector-matrix*! gp-0 gp-0 s4-0) (vector+! (-> self root trans) gp-0 (-> self entity extra trans)) - (vector-negate! (the-as vector (-> s4-0 vector)) (the-as vector (-> s4-0 vector))) + (vector-negate! (-> s4-0 vector 0) (-> s4-0 vector 0)) (vector-negate! (-> s4-0 vector 2) (-> s4-0 vector 2)) (matrix->quaternion (-> self root quat) s4-0) ) @@ -1360,19 +1356,14 @@ (set! (-> s1-0 dest w) 1.0) ) (dotimes (s1-1 s3-0) - (vector-! s4-0 (the-as vector (-> arg0 info s3-0)) (the-as vector (-> arg0 info s1-1))) + (vector-! s4-0 (-> arg0 info s3-0 dest) (-> arg0 info s1-1 dest)) (let ((f0-13 (vector-length-squared s4-0))) (if (< f0-13 1073741800.0) - (vector+float*! - (the-as vector (-> arg0 info s3-0)) - (the-as vector (-> arg0 info s1-1)) - s4-0 - (/ 32768.0 (sqrtf f0-13)) - ) + (vector+float*! (-> arg0 info s3-0 dest) (-> arg0 info s1-1 dest) s4-0 (/ 32768.0 (sqrtf f0-13))) ) ) ) - (vector+! s5-0 s5-0 (the-as vector (-> arg0 info s3-0))) + (vector+! s5-0 s5-0 (-> arg0 info s3-0 dest)) (let* ((f30-2 60.0) (v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) (v1-28 (the-as number (logior #x3f800000 v1-27))) @@ -1391,7 +1382,7 @@ (vector-float*! s5-0 s5-0 0.16666667) (vector-! s5-0 (-> self entity extra trans) s5-0) (dotimes (v1-53 6) - (vector+! (the-as vector (-> arg0 info v1-53)) (the-as vector (-> arg0 info v1-53)) s5-0) + (vector+! (-> arg0 info v1-53 dest) (-> arg0 info v1-53 dest) s5-0) (+! (-> arg0 info v1-53 dest y) 2048.0) ) ) @@ -1686,7 +1677,7 @@ ) (robotboss-yellow-eco-on) (robotboss-redshot-fill-array gp-1) - (robotboss-redshot (the-as redshot-launch-info (-> gp-1 info)) #t) + (robotboss-redshot (-> gp-1 info 0) #t) (let* ((v1-127 (+ s5-0 (the int (* f30-1 (the float (-> self dda red-shots-rnd)))))) (s5-1 (+ (min 6 v1-127) -1)) ) diff --git a/test/decompiler/reference/jak1/levels/flut_common/target-flut_REF.gc b/test/decompiler/reference/jak1/levels/flut_common/target-flut_REF.gc index 80a2228c564..06f26faee7e 100644 --- a/test/decompiler/reference/jak1/levels/flut_common/target-flut_REF.gc +++ b/test/decompiler/reference/jak1/levels/flut_common/target-flut_REF.gc @@ -775,11 +775,10 @@ (-> self control) (the-as uint 6) ) - (< 0.0 - (vector-dot - (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self control trans-old)) (-> self control trans)) - ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old 0) (-> self control trans)) + ) ) ) (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) @@ -1408,11 +1407,10 @@ (-> self control) (the-as uint 6) ) - (< 0.0 - (vector-dot - (-> self control dynam gravity-normal) - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self control trans-old)) (-> self control trans)) - ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old 0) (-> self control trans)) + ) ) ) (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) @@ -1660,7 +1658,7 @@ ) (move-to-point! (-> self control) s4-1) ) - (set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad)) + (set! (-> (&-> self control unknown-qword00) 0) (-> self control trans quad)) (send-event *camera* 'teleport) (go target-flut-stance) ) @@ -1803,7 +1801,7 @@ (compute-alignment! (-> self align)) (let ((gp-5 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-5 (the-as vector (-> self align delta)) (-> self control unknown-matrix01)) + (vector-matrix*! gp-5 (-> self align delta trans) (-> self control unknown-matrix01)) (vector-float*! (-> self control transv) gp-5 (-> *display* frames-per-second)) ) ) @@ -1830,7 +1828,7 @@ :exit (-> target-flut-start exit) :code (behavior ((arg0 handle)) (set! (-> self control transv quad) (the-as uint128 0)) - (set! (-> self alt-cam-pos quad) (-> (&-> (-> self control) unknown-qword00) 0)) + (set! (-> self alt-cam-pos quad) (-> (&-> self control unknown-qword00) 0)) (logior! (-> self state-flags) (state-flags use-alt-cam-pos)) (set-time! (-> self state-time)) (let ((gp-0 (new 'stack-no-clear 'vector))) diff --git a/test/decompiler/reference/jak1/levels/jungle/fisher_REF.gc b/test/decompiler/reference/jak1/levels/jungle/fisher_REF.gc index 96f0d5000ec..bfdea6f5873 100644 --- a/test/decompiler/reference/jak1/levels/jungle/fisher_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/fisher_REF.gc @@ -1571,7 +1571,7 @@ (set! (-> self paddle) (fmax 0.0 (fmin 1.0 (-> self paddle)))) (vector-lerp! (-> self paddle-pos) - (the-as vector (-> self paddle-end)) + (-> self paddle-end 0) (the-as vector (&-> self stack 288)) (-> self paddle) ) @@ -2017,7 +2017,7 @@ ) (+! (-> s5-0 y) 2457.6) (vector-normalize! (vector-rotate-y! s4-0 s4-0 16384.0) (-> *FISHER-bank* width)) - (vector-! (the-as vector (-> this paddle-end)) s5-0 s4-0) + (vector-! (-> this paddle-end 0) s5-0 s4-0) (vector+! (the-as vector (&-> this stack 288)) s5-0 s4-0) ) (set! (-> this music) 'fishgame) diff --git a/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc b/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc index a652fd428d0..901ed4ad426 100644 --- a/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/jungle-mirrors_REF.gc @@ -696,7 +696,7 @@ (let ((v1-2 (-> self change-event-from))) (set! (-> self trans quad) (-> (the-as periscope (-> v1-2 0)) reflector-trans quad)) (matrix-rotate-yx! - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> (the-as periscope (-> v1-2 0)) turn) (-> (the-as periscope (-> v1-2 0)) tilt) ) @@ -783,7 +783,7 @@ ) (+! f30-0 (* (-> s5-0 y) (-> *display* time-adjust-ratio))) (set! f28-0 (fmax -12743.111 (fmin 12743.111 (+ f28-0 (* (-> s5-0 x) (-> *display* time-adjust-ratio)))))) - (matrix-rotate-yx! (the-as matrix (-> self tracking)) f30-0 f28-0) + (matrix-rotate-yx! (-> self tracking inv-mat) f30-0 f28-0) ) (suspend) ) diff --git a/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc b/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc index 279715db344..c846be0b2ca 100644 --- a/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/jungle-obs_REF.gc @@ -61,7 +61,7 @@ (else (transform-post) (if *target* - (look-at-enemy! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) #f self) + (look-at-enemy! (-> *target* neck) (-> self root root-prim prim-core world-sphere) #f self) ) ) ) diff --git a/test/decompiler/reference/jak1/levels/jungle/junglesnake_REF.gc b/test/decompiler/reference/jak1/levels/jungle/junglesnake_REF.gc index 58979244e11..52aa866b615 100644 --- a/test/decompiler/reference/jak1/levels/jungle/junglesnake_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungle/junglesnake_REF.gc @@ -251,8 +251,8 @@ junglesnake-default-event-handler (vector-normalize-copy! (-> s3-1 vector 1) a1-7 1.0) ) (set! (-> s3-1 vector 1 w) 0.0) - (vector-normalize! (vector-cross! (-> s3-1 vector 2) (the-as vector (-> s3-1 vector)) (-> s3-1 vector 1)) 1.0) - (vector-normalize! (vector-cross! (the-as vector (-> s3-1 vector)) (-> s3-1 vector 1) (-> s3-1 vector 2)) 1.0) + (vector-normalize! (vector-cross! (-> s3-1 vector 2) (-> s3-1 vector 0) (-> s3-1 vector 1)) 1.0) + (vector-normalize! (vector-cross! (-> s3-1 vector 0) (-> s3-1 vector 1) (-> s3-1 vector 2)) 1.0) ) ) (cond @@ -391,7 +391,7 @@ junglesnake-default-event-handler (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) @@ -441,7 +441,7 @@ junglesnake-default-event-handler (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) @@ -486,7 +486,7 @@ junglesnake-default-event-handler (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) diff --git a/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc b/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc index 634135c0c32..00efa74244d 100644 --- a/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc +++ b/test/decompiler/reference/jak1/levels/jungleb/plant-boss_REF.gc @@ -261,8 +261,8 @@ (defbehavior plant-boss-post plant-boss () (when *target* (let ((gp-0 (-> *target* control root-prim prim-core))) - (set-target! (-> self neck) (the-as vector gp-0)) - (set-target! (-> self body) (the-as vector gp-0)) + (set-target! (-> self neck) (-> gp-0 world-sphere)) + (set-target! (-> self body) (-> gp-0 world-sphere)) ) ) (transform-post) diff --git a/test/decompiler/reference/jak1/levels/lavatube/lavatube-energy_REF.gc b/test/decompiler/reference/jak1/levels/lavatube/lavatube-energy_REF.gc index 71360ab91c9..6c87d071faf 100644 --- a/test/decompiler/reference/jak1/levels/lavatube/lavatube-energy_REF.gc +++ b/test/decompiler/reference/jak1/levels/lavatube/lavatube-energy_REF.gc @@ -405,7 +405,7 @@ ) (vector-! gp-0 (target-pos 0) (-> self root trans)) (quaternion->matrix s5-0 (-> self root quat)) - (vector-dot gp-0 (the-as vector (-> s5-0 vector))) + (vector-dot gp-0 (-> s5-0 vector 0)) ) ) diff --git a/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc b/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc index d8314b0f4a2..25745fdea37 100644 --- a/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/lavatube/lavatube-obs_REF.gc @@ -525,11 +525,11 @@ (set! (-> self leak s5-1 first-frame) #f) (let ((s4-1 (new 'stack-no-clear 'matrix))) (matrix-transpose! s4-1 gp-0) - (vector-matrix*! (the-as vector (-> self leak s5-1)) (the-as vector (-> self leak s5-1)) s4-1) + (vector-matrix*! (-> self leak s5-1 offset) (-> self leak s5-1 offset) s4-1) ) ) (let ((s4-2 (new 'stack-no-clear 'vector))) - (vector-matrix*! s4-2 (the-as vector (-> self leak s5-1)) gp-0) + (vector-matrix*! s4-2 (-> self leak s5-1 offset) gp-0) (vector+! s4-2 s4-2 (-> self root trans)) (spawn (-> self part) s4-2) ) diff --git a/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc b/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc index 56fae2e4dd3..1d64b53d19e 100644 --- a/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/driller-lurker_REF.gc @@ -473,12 +473,7 @@ (when (and arg1 *target*) (set-target! (-> this neck) (target-pos 5)) (if *target* - (look-at-enemy! - (-> *target* neck) - (the-as vector (-> this root-overeride root-prim prim-core)) - 'attacking - this - ) + (look-at-enemy! (-> *target* neck) (-> this root-overeride root-prim prim-core world-sphere) 'attacking this) ) ) (let ((f30-3 (-> this drill-speed))) diff --git a/test/decompiler/reference/jak1/levels/maincave/maincave-obs_REF.gc b/test/decompiler/reference/jak1/levels/maincave/maincave-obs_REF.gc index 461e75d02f2..36e81e77314 100644 --- a/test/decompiler/reference/jak1/levels/maincave/maincave-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/maincave-obs_REF.gc @@ -510,7 +510,7 @@ (cond ((< gp-0 a0-1) (when (sphere-in-view-frustum? (the-as sphere (-> self root root-prim prim-core))) - (launch-particles (-> *part-id-table* 704) (the-as vector (-> self launch-pos))) + (launch-particles (-> *part-id-table* 704) (-> self launch-pos 0)) (launch-particles (-> *part-id-table* 705) (the-as vector (&-> self stack 112))) ) (when (-> self should-play-sound?) @@ -626,8 +626,8 @@ (set! (-> v1-53 0 z) 0.0) (set! (-> v1-53 0 w) 1.0) ) - (vector-rotate-around-y! (the-as vector s4-1) (the-as vector s4-1) f30-0) - (vector+! (the-as vector s4-1) (the-as vector s4-1) (-> this root trans)) + (vector-rotate-around-y! (-> s4-1 0) (-> s4-1 0) f30-0) + (vector+! (-> s4-1 0) (-> s4-1 0) (-> this root trans)) ) (let ((s4-2 (the-as object (&-> this stack 112)))) (set-vector! (the-as vector s4-2) -6144.0 0.0 0.0 1.0) diff --git a/test/decompiler/reference/jak1/levels/maincave/mother-spider-proj_REF.gc b/test/decompiler/reference/jak1/levels/maincave/mother-spider-proj_REF.gc index 3a02b34e5f1..6320592357b 100644 --- a/test/decompiler/reference/jak1/levels/maincave/mother-spider-proj_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/mother-spider-proj_REF.gc @@ -237,7 +237,7 @@ ;; definition for method 24 of type mother-spider-proj (defmethod projectile-method-24 ((this mother-spider-proj)) (with-pp - (spawn (-> this part) (the-as vector (-> this root root-prim prim-core))) + (spawn (-> this part) (-> this root root-prim prim-core world-sphere)) (let ((s5-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> s5-0 command) (sound-command set-param)) (set! (-> s5-0 id) (-> this sound-id)) diff --git a/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc b/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc index 17d3242fe58..94b013fa2cd 100644 --- a/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc +++ b/test/decompiler/reference/jak1/levels/maincave/mother-spider_REF.gc @@ -94,8 +94,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) ) (when (>= (fill-and-probe-using-line-sphere @@ -625,7 +625,7 @@ (case (-> this mode) ((1 2) (if *target* - (look-at-enemy! (-> *target* neck) (the-as vector (-> this root root-prim prim-core)) 'attacking this) + (look-at-enemy! (-> *target* neck) (-> this root root-prim prim-core world-sphere) 'attacking this) ) ) ) @@ -714,8 +714,8 @@ (.mov at-0 f0-7) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-20 quad) vf1) ) (when (>= (fill-and-probe-using-line-sphere @@ -1609,7 +1609,7 @@ (set! (-> arg0 vector 0 y) (-> arg0 vector 2 x)) ) ) - (vector-cross! (-> arg0 vector 1) (the-as vector (-> arg0 vector)) (-> arg0 vector 2)) + (vector-cross! (-> arg0 vector 1) (-> arg0 vector 0) (-> arg0 vector 2)) (vector-normalize! (-> arg0 vector 1) 1.0) (set! (-> arg0 vector 0 w) 0.0) (set! (-> arg0 vector 1 w) 0.0) diff --git a/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc b/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc index d981d7f87eb..7d696582188 100644 --- a/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/mistycannon_REF.gc @@ -877,10 +877,10 @@ (t2-0 (new 'stack-no-clear 'collide-tri-result)) ) 0.0 - (vector-! a2-1 (the-as vector v1-5) (the-as vector a1-2)) + (vector-! a2-1 (-> v1-5 world-sphere) (-> a1-2 world-sphere)) (when (< (fill-and-probe-using-line-sphere *collide-cache* - (the-as vector a1-2) + (-> a1-2 world-sphere) a2-1 40.96 (collide-kind background) @@ -1638,7 +1638,7 @@ (a0-1 (-> self tracking)) (v1-2 (-> (the-as mistycannon (-> v1-0 0)) rotate)) ) - (t9-0 (the-as matrix a0-1) (the float (sar (shl (the int (+ (-> v1-2 min) (-> v1-2 value))) 48) 48)) 3640.889) + (t9-0 (-> a0-1 inv-mat) (the float (sar (shl (the int (+ (-> v1-2 min) (-> v1-2 value))) 48) 48)) 3640.889) ) ) (suspend) diff --git a/test/decompiler/reference/jak1/levels/misty/muse_REF.gc b/test/decompiler/reference/jak1/levels/misty/muse_REF.gc index a30c5f1f3c5..05eb01e4884 100644 --- a/test/decompiler/reference/jak1/levels/misty/muse_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/muse_REF.gc @@ -67,15 +67,15 @@ ;; definition for function analyze-point-on-path-segment ;; INFO: Used lq/sq (defun analyze-point-on-path-segment ((arg0 point-on-path-segment-info)) - (vector-! (-> arg0 dir) (-> arg0 segment 1) (the-as vector (-> arg0 segment))) + (vector-! (-> arg0 dir) (-> arg0 segment 1) (-> arg0 segment 0)) (vector-normalize! (-> arg0 dir) 1.0) - (set! (-> arg0 segment-length) (vector-vector-distance (the-as vector (-> arg0 segment)) (-> arg0 segment 1))) + (set! (-> arg0 segment-length) (vector-vector-distance (-> arg0 segment 0) (-> arg0 segment 1))) (let ((s5-0 (new 'stack-no-clear 'vector))) - (vector-! s5-0 (the-as vector (-> arg0 segment)) (-> arg0 point)) + (vector-! s5-0 (-> arg0 segment 0) (-> arg0 point)) (vector+*! s5-0 s5-0 (-> arg0 dir) (- (vector-dot s5-0 (-> arg0 dir)))) (vector+! (-> arg0 nearest-point) (-> arg0 point) s5-0) (set! (-> arg0 distance-to-segment) (vector-length s5-0)) - (vector-! s5-0 (-> arg0 point) (the-as vector (-> arg0 segment))) + (vector-! s5-0 (-> arg0 point) (-> arg0 segment 0)) (set! (-> arg0 parametric-index) (/ (vector-dot (-> arg0 dir) s5-0) (-> arg0 segment-length))) ) (cond @@ -116,7 +116,7 @@ (dotimes (s3-0 s5-0) (let ((f22-0 (the float s3-0))) (let ((f20-0 (the float (+ s3-0 1)))) - (eval-path-curve-div! (-> self path) (the-as vector (-> gp-0 segment)) f22-0 'interp) + (eval-path-curve-div! (-> self path) (-> gp-0 segment 0) f22-0 'interp) (eval-path-curve-div! (-> self path) (-> gp-0 segment 1) f20-0 'interp) ) (set! (-> gp-0 point quad) (-> s4-0 quad)) diff --git a/test/decompiler/reference/jak1/levels/misty/quicksandlurker_REF.gc b/test/decompiler/reference/jak1/levels/misty/quicksandlurker_REF.gc index 16aef2899cb..1f2772f1c22 100644 --- a/test/decompiler/reference/jak1/levels/misty/quicksandlurker_REF.gc +++ b/test/decompiler/reference/jak1/levels/misty/quicksandlurker_REF.gc @@ -349,7 +349,7 @@ (while (not (time-elapsed? (-> self state-time) (seconds 4))) (fill-cache-integrate-and-collide! (-> self root) (-> self root transv) (-> self root root-prim collide-with)) (if (or (logtest? (-> self root status) (cshape-moving-flags twall)) - (< (vector-vector-distance (-> self root trans) (the-as vector (-> self root trans-old))) 40.96) + (< (vector-vector-distance (-> self root trans) (-> self root trans-old 0)) 40.96) ) (go quicksandlurker-missile-impact) ) diff --git a/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc b/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc index 27054ba91f1..4fdd8f39a09 100644 --- a/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc +++ b/test/decompiler/reference/jak1/levels/ogre/ogreboss_REF.gc @@ -670,7 +670,7 @@ :frame-num 0.0 ) (until (ja-done? 0) - (when (< 81920.0 (vector-vector-distance (the-as vector (-> self root root-prim prim-core)) (target-pos 0))) + (when (< 81920.0 (vector-vector-distance (-> self root root-prim prim-core world-sphere) (target-pos 0))) (ja-channel-push! 1 (seconds 0.1)) (go ogreboss-super-boulder-roll) ) @@ -908,7 +908,7 @@ (vector+*! (-> self root trans) (-> self src-pos) (-> self side-dir) (-> self side-pos)) (transform-post) (find-ground-and-draw-shadow - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (the-as vector #f) (the-as float 49152.0) (collide-kind background) diff --git a/test/decompiler/reference/jak1/levels/racer_common/racer-states_REF.gc b/test/decompiler/reference/jak1/levels/racer_common/racer-states_REF.gc index c655bf0d324..312e34d47f2 100644 --- a/test/decompiler/reference/jak1/levels/racer_common/racer-states_REF.gc +++ b/test/decompiler/reference/jak1/levels/racer_common/racer-states_REF.gc @@ -1042,7 +1042,7 @@ :exit (-> target-racing-start exit) :code (behavior ((arg0 handle)) (set! (-> self control transv quad) (the-as uint128 0)) - (set! (-> self alt-cam-pos quad) (-> (&-> (-> self control) unknown-qword00) 0)) + (set! (-> self alt-cam-pos quad) (-> (&-> self control unknown-qword00) 0)) (logior! (-> self state-flags) (state-flags use-alt-cam-pos)) (set-time! (-> self state-time)) (let ((gp-0 (new 'stack-no-clear 'vector))) diff --git a/test/decompiler/reference/jak1/levels/racer_common/target-racer_REF.gc b/test/decompiler/reference/jak1/levels/racer_common/target-racer_REF.gc index 22e1416c05b..ea4cff3dc8d 100644 --- a/test/decompiler/reference/jak1/levels/racer_common/target-racer_REF.gc +++ b/test/decompiler/reference/jak1/levels/racer_common/target-racer_REF.gc @@ -1336,7 +1336,7 @@ (seek! (-> self control unknown-float81) 0.0 (* 2.0 (seconds-per-frame))) (seek! (-> self racer mult-rotx) 1.0 (* 16.0 (seconds-per-frame))) (let ((f0-77 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) - (vector-! (new 'stack-no-clear 'vector) (-> self control trans) (the-as vector (-> self control trans-old))) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans) (-> self control trans-old 0)) (let* ((v1-128 (-> self racer bounce)) (f1-36 (cond ((= v1-128 1) diff --git a/test/decompiler/reference/jak1/levels/rolling/rolling-lightning-mole_REF.gc b/test/decompiler/reference/jak1/levels/rolling/rolling-lightning-mole_REF.gc index 938bca41d80..28da7d05911 100644 --- a/test/decompiler/reference/jak1/levels/rolling/rolling-lightning-mole_REF.gc +++ b/test/decompiler/reference/jak1/levels/rolling/rolling-lightning-mole_REF.gc @@ -355,7 +355,7 @@ (quaternion->matrix s5-0 (-> self collide-info quat)) (set! (-> self run-blend-interp) (acos (vector-dot (-> s5-0 vector 2) (-> gp-0 vector 2)))) (set! (-> self run-blend-interp) (/ (-> self run-blend-interp) (-> self flee-info blend_interp_angle))) - (if (< (vector-dot (-> s5-0 vector 2) (the-as vector (-> gp-0 vector))) 0.0) + (if (< (vector-dot (-> s5-0 vector 2) (-> gp-0 vector 0)) 0.0) (set! (-> self run-blend-interp) (- (-> self run-blend-interp))) ) ) diff --git a/test/decompiler/reference/jak1/levels/rolling/rolling-race-ring_REF.gc b/test/decompiler/reference/jak1/levels/rolling/rolling-race-ring_REF.gc index ecf3710d8ef..9f6e494b5ee 100644 --- a/test/decompiler/reference/jak1/levels/rolling/rolling-race-ring_REF.gc +++ b/test/decompiler/reference/jak1/levels/rolling/rolling-race-ring_REF.gc @@ -1040,7 +1040,7 @@ ) (+! (-> this rot-y) (res-lump-float arg0 'rotoffset)) (set-vector! (-> this cyl axis) (cos (-> this rot-y)) 0.0 (- (sin (-> this rot-y))) 1.0) - (vector+float*! (the-as vector (-> this cyl)) (-> this root trans) (-> this cyl axis) -2048.0) + (vector+float*! (-> this cyl origin) (-> this root trans) (-> this cyl axis) -2048.0) (set! (-> this cyl radius) 24576.0) (set! (-> this cyl length) 4096.0) (cond diff --git a/test/decompiler/reference/jak1/levels/rolling/rolling-robber_REF.gc b/test/decompiler/reference/jak1/levels/rolling/rolling-robber_REF.gc index 5b0e6a5f195..026854e9b6f 100644 --- a/test/decompiler/reference/jak1/levels/rolling/rolling-robber_REF.gc +++ b/test/decompiler/reference/jak1/levels/rolling/rolling-robber_REF.gc @@ -223,7 +223,7 @@ (matrix->quaternion (-> self root quat) s5-0) (set! (-> self run-blend-interp) (acos (vector-dot gp-0 (-> self facing)))) (set! (-> self run-blend-interp) (* 0.0002746582 (-> self run-blend-interp))) - (if (< (vector-dot (-> self facing) (the-as vector (-> s5-0 vector))) 0.0) + (if (< (vector-dot (-> self facing) (-> s5-0 vector 0)) 0.0) (set! (-> self run-blend-interp) (- (-> self run-blend-interp))) ) (let ((v0-10 (-> self facing))) diff --git a/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc b/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc index a98c9df9a98..bb965e9e490 100644 --- a/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc +++ b/test/decompiler/reference/jak1/levels/snow/snow-ram-boss_REF.gc @@ -511,7 +511,7 @@ ) ) (if (-> this launched?) - (spawn (-> this part2) (the-as vector (-> this root root-prim prim-core))) + (spawn (-> this part2) (-> this root root-prim prim-core world-sphere)) ) (let ((s5-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) (set! (-> s5-0 command) (sound-command set-param)) @@ -1359,7 +1359,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self collide-info root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self collide-info root-prim)) prims 0 prim-core world-sphere) 'attacking self ) diff --git a/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc b/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc index 2e96533c756..52bd9a19d73 100644 --- a/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/bully_REF.gc @@ -431,8 +431,8 @@ (.mov at-0 f0-8) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-4 quad) vf1) ) (let ((s4-0 (new 'stack-no-clear 'check-vector-collision-with-nav-spheres-info))) @@ -532,7 +532,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) @@ -603,7 +603,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) @@ -688,7 +688,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) diff --git a/test/decompiler/reference/jak1/levels/sunken/double-lurker_REF.gc b/test/decompiler/reference/jak1/levels/sunken/double-lurker_REF.gc index f2524246e0a..e4aa1bf4b48 100644 --- a/test/decompiler/reference/jak1/levels/sunken/double-lurker_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/double-lurker_REF.gc @@ -739,8 +739,8 @@ (.mov at-0 f0-4) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-7 quad) vf1) ) (let ((gp-0 #f)) @@ -884,8 +884,8 @@ (.mov at-0 f0-4) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-7 quad) vf1) ) (let ((gp-0 #f)) diff --git a/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc b/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc index de2031e5130..144450449d0 100644 --- a/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/puffer_REF.gc @@ -652,7 +652,7 @@ (if *target* (look-at-enemy! (-> *target* neck) - (the-as vector (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core)) + (-> (the-as collide-shape-prim-group (-> self root root-prim)) prims 0 prim-core world-sphere) 'attacking self ) diff --git a/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc b/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc index c552e0f55b6..923026a14b2 100644 --- a/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/steam-cap_REF.gc @@ -562,8 +562,8 @@ (.mov at-0 f0-17) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-21 quad) vf1) (vector+! a1-10 v1-42 a0-21) ) @@ -614,8 +614,8 @@ (.mov at-1 f1-27) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-26 quad) vf1) (vector+! a1-14 v1-61 a0-26) ) @@ -656,8 +656,8 @@ (a0-35 (new 'stack-no-clear 'vector)) (s5-1 (new 'stack-no-clear 'vector)) ) - (vector-! v1-77 (the-as vector (&-> this stack 176)) (the-as vector (-> this control-pt))) - (vector-! a0-35 (the-as vector (&-> this stack 208)) (the-as vector (-> this control-pt))) + (vector-! v1-77 (the-as vector (&-> this stack 176)) (-> this control-pt 0 trans)) + (vector-! a0-35 (the-as vector (&-> this stack 208)) (-> this control-pt 0 trans)) (vector-cross! s5-1 v1-77 a0-35) (vector-normalize! s5-1 1.0) (forward-up-nopitch->quaternion diff --git a/test/decompiler/reference/jak1/levels/sunken/sun-exit-chamber_REF.gc b/test/decompiler/reference/jak1/levels/sunken/sun-exit-chamber_REF.gc index 1858f20875a..c39b02f3365 100644 --- a/test/decompiler/reference/jak1/levels/sunken/sun-exit-chamber_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/sun-exit-chamber_REF.gc @@ -281,8 +281,8 @@ (.mov at-0 f0-11) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-6 quad) vf1) (vector+! a1-5 v1-13 a0-6) ) diff --git a/test/decompiler/reference/jak1/levels/sunken/sunken-fish_REF.gc b/test/decompiler/reference/jak1/levels/sunken/sunken-fish_REF.gc index a9543039ef5..006bc6c6f1f 100644 --- a/test/decompiler/reference/jak1/levels/sunken/sunken-fish_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/sunken-fish_REF.gc @@ -214,8 +214,8 @@ (.mov at-0 f0-1) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-16 quad) vf1) ) (sunkenfisha-method-23 self) diff --git a/test/decompiler/reference/jak1/levels/sunken/target-tube_REF.gc b/test/decompiler/reference/jak1/levels/sunken/target-tube_REF.gc index 3c04cebb87c..ddec90f4ed4 100644 --- a/test/decompiler/reference/jak1/levels/sunken/target-tube_REF.gc +++ b/test/decompiler/reference/jak1/levels/sunken/target-tube_REF.gc @@ -857,7 +857,7 @@ (compute-alignment! (-> self align)) (let ((gp-2 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control unknown-matrix01)) + (vector-matrix*! gp-2 (-> self align delta trans) (-> self control unknown-matrix01)) (vector-float*! (-> self control transv) gp-2 (-> *display* frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc b/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc index 1bf37aef46f..35d8ccda64b 100644 --- a/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc +++ b/test/decompiler/reference/jak1/levels/swamp/swamp-bat_REF.gc @@ -210,7 +210,7 @@ swamp-bat-slave-event-handler (set! (-> self idle-path y-axis z) (* 12288.0 f30-0 f28-1)) ) (set! (-> self idle-path y-axis w) 1.0) - (vector+! (-> self idle-position) (the-as vector (-> self idle-path)) (-> self idle-path x-axis)) + (vector+! (-> self idle-position) (-> self idle-path origin) (-> self idle-path x-axis)) (set! (-> self path-point-count) (the float (+ (-> self parent-process 0 path-list (-> self path-select) curve num-cverts) -1)) ) diff --git a/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc b/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc index 035741d55bd..b672f882549 100644 --- a/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc +++ b/test/decompiler/reference/jak1/levels/village1/fishermans-boat_REF.gc @@ -662,11 +662,7 @@ (rigid-body-method-13 (-> this rbody) s5-0 s4-0) (vector-float*! s4-0 s1-0 (* -1.0 (-> this info drag-factor) f30-0)) (rigid-body-method-13 (-> this rbody) s5-0 s4-0) - (vector-float*! - s4-0 - (the-as vector (-> s3-0 vector)) - (* -0.5 (vector-dot (the-as vector (-> s3-0 vector)) s1-0)) - ) + (vector-float*! s4-0 (-> s3-0 vector 0) (* -0.5 (vector-dot (-> s3-0 vector 0) s1-0))) (rigid-body-method-13 (-> this rbody) s5-0 s4-0) ) ) @@ -1548,7 +1544,7 @@ (fishermans-boat-reset-physics) (transform-post) (when *target* - (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) + (vector<-cspace! (-> self old-target-pos trans) (-> *target* node-list data 3)) (send-event *target* 'trans 'restore (-> self old-target-pos)) (send-event *target* 'end-mode) (update-transforms! (-> self root-overlay)) @@ -1664,7 +1660,7 @@ (fishermans-boat-reset-physics) (transform-post) (when *target* - (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) + (vector<-cspace! (-> self old-target-pos trans) (-> *target* node-list data 3)) (send-event *target* 'trans 'restore (-> self old-target-pos)) (send-event *target* 'end-mode) (update-transforms! (-> self root-overlay)) diff --git a/test/decompiler/reference/jak1/levels/village1/yakow_REF.gc b/test/decompiler/reference/jak1/levels/village1/yakow_REF.gc index f05465ab53f..e2e353133ce 100644 --- a/test/decompiler/reference/jak1/levels/village1/yakow_REF.gc +++ b/test/decompiler/reference/jak1/levels/village1/yakow_REF.gc @@ -259,7 +259,7 @@ yakow-default-event-handler (defbehavior yakow-common-post yakow () (update-direction-from-time-of-day (-> self draw shadow-ctrl)) (if *target* - (look-at-enemy! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) #f self) + (look-at-enemy! (-> *target* neck) (-> self root root-prim prim-core world-sphere) #f self) ) (ja-post) (none) diff --git a/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc b/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc index 0423ae1a960..66017aa78fc 100644 --- a/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc +++ b/test/decompiler/reference/jak1/levels/village2/swamp-blimp_REF.gc @@ -1309,10 +1309,10 @@ (cos (* (-> self rot-speed) (the float (- (current-time) (-> self state-time))))) 1.0 ) - (vector-cross! (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1) s5-0) + (vector-cross! (-> gp-0 vector 0) (-> gp-0 vector 1) s5-0) ) - (vector-normalize! (the-as vector (-> gp-0 vector)) 1.0) - (vector-cross! (-> gp-0 vector 2) (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1)) + (vector-normalize! (-> gp-0 vector 0) 1.0) + (vector-cross! (-> gp-0 vector 2) (-> gp-0 vector 0) (-> gp-0 vector 1)) (matrix->quaternion (-> self root quat) gp-0) ) ) @@ -1392,10 +1392,10 @@ (set! (-> self old-scale) (-> self root scale y)) (set! (-> self root scale y) (* 0.0000020345053 (vector-normalize-ret-len! (-> gp-1 vector 1) 1.0))) (set-vector! s5-0 0.0 -1.0 0.0 1.0) - (vector-cross! (the-as vector (-> gp-1 vector)) (-> gp-1 vector 1) s5-0) + (vector-cross! (-> gp-1 vector 0) (-> gp-1 vector 1) s5-0) ) - (vector-normalize! (the-as vector (-> gp-1 vector)) 1.0) - (vector-cross! (-> gp-1 vector 2) (the-as vector (-> gp-1 vector)) (-> gp-1 vector 1)) + (vector-normalize! (-> gp-1 vector 0) 1.0) + (vector-cross! (-> gp-1 vector 2) (-> gp-1 vector 0) (-> gp-1 vector 1)) (matrix->quaternion (-> self root quat) gp-1) ) ) @@ -1599,41 +1599,33 @@ (cond ((= s5-0 (-> *SWAMP_BLIMP-bank* arm-index)) (vector+! - (the-as vector (-> self pos-oscillator)) - (the-as vector (-> self pos-oscillator)) + (-> self pos-oscillator target) + (-> self pos-oscillator target) (-> (the-as swamp-rope s4-0) other-pos) ) - (vector-! - (the-as vector (-> self pos-oscillator)) - (the-as vector (-> self pos-oscillator)) - (-> self root trans) - ) + (vector-! (-> self pos-oscillator target) (-> self pos-oscillator target) (-> self root trans)) ) ((swamp-rope-method-20 (the-as swamp-rope s4-0)) (vector+! - (the-as vector (-> self pos-oscillator)) - (the-as vector (-> self pos-oscillator)) + (-> self pos-oscillator target) + (-> self pos-oscillator target) (-> (the-as swamp-rope s4-0) other-pos) ) - (vector-! - (the-as vector (-> self pos-oscillator)) - (the-as vector (-> self pos-oscillator)) - (-> self trans-at-init) - ) + (vector-! (-> self pos-oscillator target) (-> self pos-oscillator target) (-> self trans-at-init)) (+! gp-0 1) ) (else (vector-! - (the-as vector (-> self gondola-tilt-oscillator)) - (the-as vector (-> self gondola-tilt-oscillator)) + (-> self gondola-tilt-oscillator target) + (-> self gondola-tilt-oscillator target) (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> (the-as swamp-rope s4-0) parent-rp)) ) ) (vector+! - (the-as vector (-> self gondola-tilt-oscillator)) - (the-as vector (-> self gondola-tilt-oscillator)) + (-> self gondola-tilt-oscillator target) + (-> self gondola-tilt-oscillator target) (-> self root trans) ) ) @@ -1642,8 +1634,8 @@ ) ) (vector-float*! - (the-as vector (-> self pos-oscillator)) - (the-as vector (-> self pos-oscillator)) + (-> self pos-oscillator target) + (-> self pos-oscillator target) (/ 1.0 (the float (+ gp-0 1))) ) (set! (-> self pos-oscillator target y) 0.0) @@ -1661,9 +1653,9 @@ ) (else (set! (-> self gondola-tilt-oscillator target y) 0.0) - (vector-normalize! (the-as vector (-> self gondola-tilt-oscillator)) 1.0) + (vector-normalize! (-> self gondola-tilt-oscillator target) 1.0) (set! (-> self gondola-tilt-oscillator target y) (the float (+ gp-0 1))) - (vector-normalize! (the-as vector (-> self gondola-tilt-oscillator)) 1.0) + (vector-normalize! (-> self gondola-tilt-oscillator target) 1.0) ) ) gp-0 diff --git a/test/decompiler/reference/jak1/levels/village3/village3-obs_REF.gc b/test/decompiler/reference/jak1/levels/village3/village3-obs_REF.gc index ffb77f67e01..ed988a45c68 100644 --- a/test/decompiler/reference/jak1/levels/village3/village3-obs_REF.gc +++ b/test/decompiler/reference/jak1/levels/village3/village3-obs_REF.gc @@ -268,7 +268,7 @@ (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* - (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) + (vector<-cspace! (-> self old-target-pos trans) (-> *target* node-list data 3)) (send-event *target* 'trans 'restore (-> self old-target-pos)) (send-event *target* 'end-mode) (update-transforms! (-> self root)) @@ -310,7 +310,7 @@ (remove-setting! 'sound-flava) (send-event *target* 'blend-shape #f) (when *target* - (vector<-cspace! (the-as vector (-> self old-target-pos)) (-> *target* node-list data 3)) + (vector<-cspace! (-> self old-target-pos trans) (-> *target* node-list data 3)) (send-event *target* 'trans 'restore (-> self old-target-pos)) (send-event *target* 'end-mode) (update-transforms! (-> self root)) diff --git a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc index c023049da12..b2964e96717 100644 --- a/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc +++ b/test/decompiler/reference/jak2/engine/ai/enemy_REF.gc @@ -317,7 +317,7 @@ (if *target* (look-at! (-> *target* neck) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (if (logtest? (-> self enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) diff --git a/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc b/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc index b23a499fa40..df339b769ee 100644 --- a/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc +++ b/test/decompiler/reference/jak2/engine/ambient/ambient_REF.gc @@ -476,7 +476,7 @@ ) (begin (dotimes (s5-2 4) - (when (and (string-charp= (-> self message name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s5-2))) + (when (and (string-charp= (-> self message name) (-> *sound-iop-info* stream-name s5-2 name)) (= (-> self voice-id) (-> *sound-iop-info* stream-id s5-2)) (logtest? (-> *sound-iop-info* stream-status s5-2) (stream-status ststatus-six)) ) diff --git a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc index 6fda6f9ee39..3326723dfc6 100644 --- a/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/aligner_REF.gc @@ -81,13 +81,9 @@ (set! (-> v1-25 0 quad 2) a2-6) (set! (-> v1-25 0 trans quad) a3-3) ) - (vector*! (the-as vector (-> this transform)) (-> s5-1 bone transform trans) (-> this process root scale)) - ) - (vector-! - (the-as vector (-> this delta)) - (the-as vector (-> this transform)) - (the-as vector (-> this transform 1)) + (vector*! (-> this transform 0 trans) (-> s5-1 bone transform trans) (-> this process root scale)) ) + (vector-! (-> this delta trans) (-> this transform 0 trans) (-> this transform 1 trans)) (set-vector! (-> this align scale) (vector-length (the-as vector (-> this matrix))) @@ -97,9 +93,7 @@ ) (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) (let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) - (quaternion-normalize! - (matrix->quaternion (-> this align quat) (matrix*! a2-7 (the-as matrix (-> this matrix)) a2-7)) - ) + (quaternion-normalize! (matrix->quaternion (-> this align quat) (matrix*! a2-7 (-> this matrix 0) a2-7))) ) (let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) ) diff --git a/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc b/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc index 27083982fea..6f911086166 100644 --- a/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/fma-sphere_REF.gc @@ -108,8 +108,8 @@ (.mov at-0 f0-1) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-12 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc index 05bcbb105ad..8df317472b1 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-exploder_REF.gc @@ -516,9 +516,9 @@ (when v1-8 (set! sv-48 (remove-joint-from-list this arg0 s2-0)) (set! sv-64 (-> this lists)) - (add-joint-to-list this (the-as joint-exploder-list sv-64) s2-0) + (add-joint-to-list this (-> sv-64 0) s2-0) (set! s2-0 sv-48) - (update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80) + (update-bbox-for-joint this (-> sv-64 0) sv-80) (set! (-> arg0 bbox-valid?) s0-0) (set! (-> arg0 bbox min quad) (-> s1-0 min quad)) (set! (-> arg0 bbox max quad) (-> s1-0 max quad)) diff --git a/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc index b12a9fedc95..32431d8bc97 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-mod-h_REF.gc @@ -369,7 +369,7 @@ Unlike jak 2, this actually multiplies the scale, instead of adding." (let ((s4-0 (the-as joint-mod-add-local (-> arg0 param1)))) (when (-> s4-0 enable) (if (-> s4-0 add-translation) - (vector+! (-> arg1 trans) (-> arg1 trans) (the-as vector (-> s4-0 transform))) + (vector+! (-> arg1 trans) (-> arg1 trans) (-> s4-0 transform trans)) ) (if (-> s4-0 add-rotation) (quaternion-normalize! (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> s4-0 transform quat))) @@ -503,12 +503,7 @@ Then, apply the normal parented transform." (let ((gp-0 (the-as joint-mod-blend-local (-> arg0 param1)))) (cond ((-> gp-0 enable) - (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) - (-> arg1 trans) - (the-as vector (-> gp-0 transform)) - (-> gp-0 blend) - ) + (vector-lerp! (-> gp-0 blend-transform trans) (-> arg1 trans) (-> gp-0 transform trans) (-> gp-0 blend)) (vector-lerp! (-> gp-0 blend-transform scale) (-> arg1 scale) (-> gp-0 transform scale) (-> gp-0 blend)) (quaternion-slerp! (-> gp-0 blend-transform quat) (-> arg1 quat) (-> gp-0 transform quat) (-> gp-0 blend)) (cspace<-parented-transformq-joint! arg0 (-> gp-0 blend-transform)) @@ -667,19 +662,14 @@ Then, apply the normal parented transform." (matrix*! s2-0 s0-0 (-> arg0 parent bone transform)) (set-vector! s1-0 - (vector-length (the-as vector (-> s2-0 vector))) + (vector-length (-> s2-0 vector 0)) (vector-length (-> s2-0 vector 1)) (vector-length (-> s2-0 vector 2)) 1.0 ) (vector*! (-> gp-0 blend-transform scale) s1-0 (-> arg1 scale)) ) - (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) - (-> s2-0 trans) - (the-as vector (-> gp-0 transform)) - f30-0 - ) + (vector-lerp! (-> gp-0 blend-transform trans) (-> s2-0 trans) (-> gp-0 transform trans) f30-0) (vector-lerp! (-> gp-0 blend-transform scale) (-> gp-0 blend-transform scale) (-> gp-0 transform scale) f28-0) (quaternion-slerp! (-> gp-0 blend-transform quat) diff --git a/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc index a8e37479297..17f86000b7b 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint-mod_REF.gc @@ -108,9 +108,9 @@ ) (.lvf vf4 (&-> v1-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (if (-> gp-0 callback) @@ -140,22 +140,22 @@ (set! sv-784 (new 'stack-no-clear 'vector)) (.lvf vf4 (&-> s0-0 quad)) (.lvf vf5 (&-> sv-736 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-784 quad) vf6) (set! sv-832 (new 'stack-no-clear 'vector)) (let ((v1-49 sv-752)) (.lvf vf4 (&-> s0-0 quad)) (.lvf vf5 (&-> v1-49 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-832 quad) vf6) (let ((s0-1 (new 'stack-no-clear 'vector))) (.lvf vf4 (&-> s1-0 quad)) (.lvf vf5 (&-> sv-752 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> s0-1 quad) vf6) (set! sv-928 (new 'stack-no-clear 'quaternion)) (let ((s1-1 (new 'stack-no-clear 'quaternion))) @@ -201,11 +201,11 @@ (vector-orient-by-quat! sv-784 sv-784 sv-928) (let ((v1-74 sv-832)) (let ((a0-46 s2-3)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-46 quad)) ) (.lvf vf5 (&-> sv-784 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-74 quad) vf6) ) (set! sv-800 quaternion-from-two-vectors!) @@ -514,8 +514,8 @@ (s0-0 (matrix->trans gp-0 (new 'stack-no-clear 'vector))) ) (set! (-> gp-0 vector 1 quad) (-> s5-0 twist-max quad)) - (vector-cross! (-> gp-0 vector 2) (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1)) - (vector-cross! (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1) (-> gp-0 vector 2)) + (vector-cross! (-> gp-0 vector 2) (-> gp-0 vector 0) (-> gp-0 vector 1)) + (vector-cross! (-> gp-0 vector 0) (-> gp-0 vector 1) (-> gp-0 vector 2)) (set! (-> gp-0 vector 0 w) 0.0) (set! (-> gp-0 vector 1 w) 0.0) (set! (-> gp-0 vector 2 w) 0.0) @@ -977,7 +977,7 @@ (s4-0 (new 'stack-no-clear 'matrix)) ) (let ((s2-0 (new 'stack-no-clear 'vector))) - (vector-normalize-copy! (the-as vector (-> s4-0 vector)) (the-as vector (-> arg0 bone transform)) 1.0) + (vector-normalize-copy! (-> s4-0 vector 0) (the-as vector (-> arg0 bone transform)) 1.0) (vector-normalize-copy! (-> s4-0 vector 1) (-> arg0 bone transform vector 1) 1.0) (vector-normalize-copy! (-> s4-0 vector 2) (-> arg0 bone transform vector 2) 1.0) (set-vector! (-> s4-0 trans) 0.0 0.0 0.0 1.0) @@ -1422,7 +1422,7 @@ ) (vector-reset! (-> arg0 bone transform trans)) (set! (-> arg0 bone transform trans w) 1.0) - (vector-float*! (the-as vector (-> s3-0 vector)) (the-as vector (-> s3-0 vector)) (-> s5-0 scale x)) + (vector-float*! (-> s3-0 vector 0) (-> s3-0 vector 0) (-> s5-0 scale x)) (vector-float*! (-> s3-0 vector 1) (-> s3-0 vector 1) (-> s5-0 scale y)) (vector-float*! (-> s3-0 vector 2) (-> s3-0 vector 2) (-> s5-0 scale z)) (set! (-> s3-0 vector 0 w) 0.0) diff --git a/test/decompiler/reference/jak2/engine/anim/joint_REF.gc b/test/decompiler/reference/jak2/engine/anim/joint_REF.gc index 4ac5c03ad73..72e0eb5f26c 100644 --- a/test/decompiler/reference/jak2/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak2/engine/anim/joint_REF.gc @@ -389,7 +389,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return (the-as basic (-> this data s2-0))) ) @@ -416,7 +416,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return s2-0) ) @@ -1247,7 +1247,7 @@ (set! (-> gp-0 quad 2) a1-1) (set! (-> gp-0 trans quad) a2-1) ) - (vector-normalize! (the-as vector (-> gp-0 vector)) 1.0) + (vector-normalize! (-> gp-0 vector 0) 1.0) (vector-normalize! (-> gp-0 vector 1) 1.0) (vector-normalize! (-> gp-0 vector 2) 1.0) gp-0 @@ -1542,40 +1542,40 @@ (let ((a2-0 (-> arg0 bone))) (.add.vf vf6 vf5 vf5) (let ((f1-0 (-> t0-0 scale x))) - (.add.w.vf vf2 vf0 vf5 :mask #b1) + (.add.w.vf.x vf2 vf0 vf5) (.lvf vf15 (&-> arg1 trans quad)) - (.add.z.vf vf2 vf0 vf5 :mask #b10) + (.add.z.vf.y vf2 vf0 vf5) (.lvf vf1 (&-> arg1 scale quad)) (let ((f4-0 (/ f0-0 f1-0))) (.lvf vf7 (&-> t0-0 transform quad 0)) - (.sub.y.vf vf2 vf0 vf5 :mask #b100) + (.sub.y.vf.z vf2 vf0 vf5) (.lvf vf8 (&-> t0-0 transform quad 1)) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (.lvf vf9 (&-> t0-0 transform quad 2)) - (.sub.z.vf vf3 vf0 vf5 :mask #b1) + (.sub.z.vf.x vf3 vf0 vf5) (.lvf vf10 (&-> t0-0 transform trans quad)) - (.add.w.vf vf3 vf0 vf5 :mask #b10) + (.add.w.vf.y vf3 vf0 vf5) (let ((f2-0 (-> t0-0 scale y))) - (.add.x.vf vf3 vf0 vf5 :mask #b100) + (.add.x.vf.z vf3 vf0 vf5) (.svf (&-> a2-0 scale quad) vf1) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (let ((f3-0 (-> t0-0 scale z))) - (.add.y.vf vf4 vf0 vf5 :mask #b1) + (.add.y.vf.x vf4 vf0 vf5) (let ((v1-1 (-> t0-0 scale w))) - (.sub.x.vf vf4 vf0 vf5 :mask #b10) + (.sub.x.vf.y vf4 vf0 vf5) (let ((t1-0 (the-as uint128 f4-0))) - (.add.w.vf vf4 vf0 vf5 :mask #b100) + (.add.w.vf.z vf4 vf0 vf5) (let ((f4-1 (/ f0-0 f2-0))) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf6 vf2) (.outer.product.b.vf vf2 vf2 vf6 acc) (.outer.product.a.vf acc vf6 vf3) (.outer.product.b.vf vf3 vf3 vf6 acc) (.outer.product.a.vf acc vf6 vf4) (.outer.product.b.vf vf4 vf4 vf6 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (let ((t2-0 (the-as uint128 f4-1))) (b! (nonzero? v1-1) cfg-2 :delay (set! f4-2 (/.s f0-0 f3-0))) (.mul.x.vf vf2 vf2 vf1) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-combiner_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-combiner_REF.gc index ff3aa91128e..2438d4f783b 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-combiner_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-combiner_REF.gc @@ -46,14 +46,10 @@ (let ((s4-0 (new-stack-vector0))) 0.0 (let ((s3-0 (new-stack-matrix0))) - (vector-! - (the-as vector (-> s2-0 vector)) - (the-as vector (-> sv-144 inv-mat)) - (the-as vector (-> gp-0 inv-mat)) - ) + (vector-! (-> s2-0 vector 0) (the-as vector (-> sv-144 inv-mat)) (the-as vector (-> gp-0 inv-mat))) (vector-! (-> s2-0 vector 1) (-> sv-144 inv-mat vector 1) (-> gp-0 inv-mat vector 1)) (vector-! (-> s2-0 vector 2) (-> sv-144 inv-mat vector 2) (-> gp-0 inv-mat vector 2)) - (let ((f0-6 (vector-length (the-as vector (-> s2-0 vector)))) + (let ((f0-6 (vector-length (-> s2-0 vector 0))) (f1-0 (vector-length (-> s2-0 vector 1))) (f2-0 (vector-length (-> s2-0 vector 2))) ) @@ -62,10 +58,10 @@ (vector-cross! s4-0 (-> s2-0 vector 1) (-> s2-0 vector 2)) ) ((and (< f1-0 f0-6) (< f1-0 f2-0)) - (vector-cross! s4-0 (the-as vector (-> s2-0 vector)) (-> s2-0 vector 2)) + (vector-cross! s4-0 (-> s2-0 vector 0) (-> s2-0 vector 2)) ) (else - (vector-cross! s4-0 (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1)) + (vector-cross! s4-0 (-> s2-0 vector 0) (-> s2-0 vector 1)) ) ) ) @@ -76,38 +72,38 @@ ) (cond ((and (< f0-9 f1-3) (< f0-9 f2-3)) - (vector-flatten! (the-as vector (-> s2-0 vector)) (the-as vector (-> sv-144 inv-mat)) s4-0) + (vector-flatten! (-> s2-0 vector 0) (the-as vector (-> sv-144 inv-mat)) s4-0) (vector-flatten! (-> s2-0 vector 1) (the-as vector (-> gp-0 inv-mat)) s4-0) ) ((< f1-3 f2-3) - (vector-flatten! (the-as vector (-> s2-0 vector)) (-> sv-144 inv-mat vector 1) s4-0) + (vector-flatten! (-> s2-0 vector 0) (-> sv-144 inv-mat vector 1) s4-0) (vector-flatten! (-> s2-0 vector 1) (-> gp-0 inv-mat vector 1) s4-0) ) (else - (vector-flatten! (the-as vector (-> s2-0 vector)) (-> sv-144 inv-mat vector 2) s4-0) + (vector-flatten! (-> s2-0 vector 0) (-> sv-144 inv-mat vector 2) s4-0) (vector-flatten! (-> s2-0 vector 1) (-> gp-0 inv-mat vector 2) s4-0) ) ) ) - (vector-normalize! (the-as vector (-> s2-0 vector)) 1.0) + (vector-normalize! (-> s2-0 vector 0) 1.0) (vector-normalize! (-> s2-0 vector 1) 1.0) - (vector-cross! (-> s2-0 vector 2) (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1)) + (vector-cross! (-> s2-0 vector 2) (-> s2-0 vector 0) (-> s2-0 vector 1)) (if (< (vector-dot (-> s2-0 vector 2) s4-0) 0.0) (vector-negate! s4-0 s4-0) ) - (let ((f30-0 (acos (vector-dot (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1))))) + (let ((f30-0 (acos (vector-dot (-> s2-0 vector 0) (-> s2-0 vector 1))))) (cond ((logtest? (-> *camera* master-options) (cam-master-options-u32 SET_COMBINER_AXIS)) (logclear! (-> *camera* master-options) (cam-master-options-u32 SET_COMBINER_AXIS FLIP_COMBINER)) (when (and (< 8192.0 f30-0) (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))) - (vector-! (the-as vector (-> s2-0 vector)) (-> *camera* tpos-curr) s1-0) + (vector-! (-> s2-0 vector 0) (-> *camera* tpos-curr) s1-0) (vector-! (-> s2-0 vector 1) s0-0 s1-0) - (vector-flatten! (the-as vector (-> s2-0 vector)) (the-as vector (-> s2-0 vector)) (-> *camera* local-down)) + (vector-flatten! (-> s2-0 vector 0) (-> s2-0 vector 0) (-> *camera* local-down)) (vector-flatten! (-> s2-0 vector 1) (-> s2-0 vector 1) (-> *camera* local-down)) - (when (and (< 4096.0 (vector-normalize-ret-len! (the-as vector (-> s2-0 vector)) 1.0)) + (when (and (< 4096.0 (vector-normalize-ret-len! (-> s2-0 vector 0) 1.0)) (< 4096.0 (vector-normalize-ret-len! (-> s2-0 vector 1) 1.0)) ) - (vector-cross! (-> s2-0 vector 2) (-> s2-0 vector 1) (the-as vector (-> s2-0 vector))) + (vector-cross! (-> s2-0 vector 2) (-> s2-0 vector 1) (-> s2-0 vector 0)) (when (< (vector-dot (-> s2-0 vector 2) s4-0) -0.01) ) ) @@ -126,7 +122,7 @@ (matrix-axis-sin-cos! s3-0 s4-0 (sin f30-1) (cos f30-1)) ) ) - (matrix*! (-> self inv-camera-rot) (the-as matrix gp-0) s3-0) + (matrix*! (-> self inv-camera-rot) (-> gp-0 inv-mat) s3-0) ) ) ) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-debug_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-debug_REF.gc index 350d895a5df..ae7705047d8 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-debug_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-debug_REF.gc @@ -302,10 +302,7 @@ (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) - (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) - (the-as vector4w (+ 64 #x70000000)) - ) + (camera-line2d (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (the-as vector4w (+ 64 #x70000000))) ) (when (and (< arg2 0.0) (< 0.0 arg3)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) @@ -317,7 +314,7 @@ (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 y) ) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) ) @@ -326,7 +323,7 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) 20) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) @@ -334,7 +331,7 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) 20) @@ -342,7 +339,7 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) 20) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 0 x) (+ (the int (* f26-0 f30-0)) 20)) @@ -350,7 +347,7 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 x) (+ (the int (* f26-0 f30-0)) 20)) (set! (-> (the-as cam-dbg-scratch #x70000000) plotvec 1 y) (+ (the int (* f28-0 f24-0)) 20)) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (let ((v1-64 (-> arg5 quad))) @@ -368,7 +365,7 @@ (+ (the int (* f28-0 (- (arg4 (+ arg0 (* f30-0 (/ (the float s3-1) (* f26-0 f30-0))))) arg2))) 20) ) (camera-line2d - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) plotvec)) + (-> (the-as cam-dbg-scratch #x70000000) plotvec 0) (-> (the-as cam-dbg-scratch #x70000000) plotvec 1) ) (+! s3-1 1) @@ -403,7 +400,7 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) linevec 1 w) (the-as int 1.0)) (transform-float-point (the-as vector (-> (the-as cam-dbg-scratch #x70000000) linevec)) - (the-as vector4w (-> (the-as cam-dbg-scratch #x70000000) linevec4w)) + (-> (the-as cam-dbg-scratch #x70000000) linevec4w 0) ) (transform-float-point (the-as vector (-> (the-as cam-dbg-scratch #x70000000) linevec 1)) @@ -503,16 +500,16 @@ ;; definition for function camera-cross (defun camera-cross ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector4w) (arg4 meters)) - (vector-normalize-copy! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg0 arg4) + (vector-normalize-copy! (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) arg0 arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) @@ -520,20 +517,20 @@ arg3 ) (vector-cross! - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) arg1 ) - (vector-normalize! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg4) + (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) @@ -541,20 +538,20 @@ arg3 ) (vector-cross! - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) arg0 ) - (vector-normalize! (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) arg4) + (vector-normalize! (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) arg4) (vector+! (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (vector-! (-> (the-as cam-dbg-scratch #x70000000) crossvec 2) arg2 - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) crossvec)) + (-> (the-as cam-dbg-scratch #x70000000) crossvec 0) ) (camera-line (-> (the-as cam-dbg-scratch #x70000000) crossvec 1) @@ -581,14 +578,14 @@ (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4 y) (-> arg0 min y)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5 quad) (-> arg0 max quad)) (set! (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5 z) (-> arg0 min z)) - (camera-line-draw (-> arg0 min) (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec))) + (camera-line-draw (-> arg0 min) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 0)) (camera-line-draw (-> arg0 min) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 1)) (camera-line-draw (-> arg0 min) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 2)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 3)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4)) (camera-line-draw (-> arg0 max) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5)) (camera-line-draw - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec)) + (-> (the-as cam-dbg-scratch #x70000000) bboxvec 0) (-> (the-as cam-dbg-scratch #x70000000) bboxvec 4) ) (camera-line-draw @@ -609,7 +606,7 @@ ) (camera-line-draw (-> (the-as cam-dbg-scratch #x70000000) bboxvec 5) - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) bboxvec)) + (-> (the-as cam-dbg-scratch #x70000000) bboxvec 0) ) 0 (none) @@ -769,12 +766,7 @@ ;; definition for function camera-fov-draw (defun camera-fov-draw ((arg0 int) (arg1 int) (arg2 vector) (arg3 float) (arg4 float) (arg5 vector4w)) - (vector+float*! - (the-as vector (-> (the-as cam-dbg-scratch #x70000000) fov-vv)) - arg2 - (the-as vector arg1) - arg3 - ) + (vector+float*! (-> (the-as cam-dbg-scratch #x70000000) fov-vv 0) arg2 (the-as vector arg1) arg3) (vector+float*! (the-as vector (the-as (pointer vector) (+ 352 #x70000000))) arg2 (the-as vector arg0) arg3) (vector+float*! (the-as vector (+ 368 #x70000000)) arg2 (the-as vector arg0) arg4) (vector+float*! (the-as vector (+ 384 #x70000000)) arg2 (the-as vector arg1) arg4) @@ -793,11 +785,7 @@ ;; WARN: Return type mismatch none vs symbol. (defun camera-fov-frame ((arg0 matrix) (arg1 vector) (arg2 float) (arg3 float) (arg4 float) (arg5 vector4w)) (vector-float*! (-> (the-as cam-dbg-scratch #x70000000) fov-vert) (-> arg0 vector 1) (* arg3 (tan arg2))) - (vector-float*! - (-> (the-as cam-dbg-scratch #x70000000) fov-horz) - (the-as vector (-> arg0 vector)) - (* arg4 (tan arg2)) - ) + (vector-float*! (-> (the-as cam-dbg-scratch #x70000000) fov-horz) (-> arg0 vector 0) (* arg4 (tan arg2))) (vector+! (-> (the-as cam-dbg-scratch #x70000000) fov-src) (-> arg0 vector 2) @@ -963,8 +951,8 @@ ) (while (!= s4-0 -134250495) (camera-line - (the-as vector (-> this point s5-0)) - (the-as vector (-> this point s4-0)) + (-> this point s5-0 position) + (-> this point s4-0 position) (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) ) (set! s5-0 s4-0) @@ -975,7 +963,7 @@ (camera-cross (new 'static 'vector :y 1024.0) (new 'static 'vector :z 1024.0) - (the-as vector (-> this point s5-0)) + (-> this point s5-0 position) (new 'static 'vector4w :x #xff :w #x80) (meters 0.25) ) @@ -1123,7 +1111,7 @@ ((= (-> arg0 blend-to-type) (camera-blend-to-type unknown-2)) (let ((f0-2 (/ (-> arg0 fov) 2))) (camera-fov-frame - (the-as matrix (-> *camera-combiner* tracking)) + (-> *camera-combiner* tracking inv-mat) (-> arg0 trans) f0-2 0.75 @@ -1135,7 +1123,7 @@ (else (let ((f0-4 (/ (-> arg0 fov) 2))) (camera-fov-frame - (the-as matrix (-> arg0 tracking)) + (-> arg0 tracking inv-mat) (-> arg0 trans) f0-4 0.75 @@ -1690,7 +1678,7 @@ (let ((s4-0 (new 'stack-no-clear 'vector)) (s5-0 *camera-other-trans*) ) - (vector+float*! s4-0 s5-0 (the-as vector (-> *camera-other-matrix* vector)) 2048.0) + (vector+float*! s4-0 s5-0 (-> *camera-other-matrix* vector 0) 2048.0) (camera-line s5-0 s4-0 (new 'static 'vector4w :x #xff :w #x80)) (vector+float*! s4-0 s5-0 (-> *camera-other-matrix* vector 1) 2048.0) (camera-line s5-0 s4-0 (new 'static 'vector4w :y #xff :w #x80)) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-states-dbg_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-states-dbg_REF.gc index 22388a14fd3..90e4eb55140 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-states-dbg_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-states-dbg_REF.gc @@ -76,14 +76,14 @@ (matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y))) (vector-matrix*! s4-0 s4-0 s3-0) ) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) s4-0 (-> *camera* local-down)) ) (set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z))) (if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0) ) (set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0) - (vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking))) + (vector-matrix*! (-> self trans) gp-0 (-> self tracking inv-mat)) ) ) (suspend) @@ -119,7 +119,7 @@ ;; definition for function cam-mouse-input (defun cam-mouse-input ((arg0 vector) (arg1 vector)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (the-as vector (-> *mouse* pos)) (-> *mouse* pos 1)) + (vector-! v1-0 (-> *mouse* pos 0) (-> *mouse* pos 1)) (cond ((mouse-hold? left) (let ((a0-7 (new 'stack-no-clear 'vector))) @@ -457,7 +457,7 @@ (matrix*! arg0 arg0 (-> s3-0 tm)) ) ) - (matrix-axis-angle! (-> s3-0 tm) (the-as vector (-> arg0 vector)) (- (-> s3-0 rv x))) + (matrix-axis-angle! (-> s3-0 tm) (-> arg0 vector 0) (- (-> s3-0 rv x))) (matrix*! arg0 arg0 (-> s3-0 tm)) (matrix-axis-angle! (-> s3-0 tm) (-> arg0 vector 2) (- (-> s3-0 rv z))) (matrix*! arg0 arg0 (-> s3-0 tm)) @@ -492,7 +492,7 @@ (set! a2-0 (the-as vector #f)) ) (cam-free-floating-move - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self trans) a2-0 (the-as int (-> *CAMERA-bank* joypad)) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-states_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-states_REF.gc index 450f49abb36..38164cd38fe 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-states_REF.gc @@ -57,7 +57,7 @@ (cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f) (when (!= (-> gp-0 w) 0.0) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) ) @@ -85,7 +85,7 @@ ) ((-> self cam-entity) (cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) (-> self trans) 'trans) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (cam-curve-setup (-> self trans)) ((-> cam-fixed enter)) @@ -159,7 +159,7 @@ ) (vector-reset! (-> self tracking inv-mat trans)) (let ((gp-0 (new 'stack-no-clear 'vector))) - (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (the-as matrix (-> self tracking))) + (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (-> self tracking inv-mat)) (vector+! (-> self trans) (-> self trans) gp-0) ) ) @@ -249,7 +249,7 @@ (cond ((and (< (vector-vector-distance s2-0 gp-0) 40960.0) (< (cos 3640.889) (vector-dot s5-0 s3-0))) (set! (-> self trans quad) (-> s2-0 quad)) - (vector-negate! (the-as vector (-> self tracking)) (the-as vector (-> s0-0 vector))) + (vector-negate! (the-as vector (-> self tracking)) (-> s0-0 vector 0)) (set! (-> (the-as vector (-> self tracking inv-mat vector 1)) quad) (-> s0-0 vector 1 quad)) (vector-negate! (-> self tracking inv-mat vector 2) (-> s0-0 vector 2)) (set! (-> self fov) (* 2.0 (atan (/ 12.700255 (* 20.3 (-> s1-0 x))) 1.0))) @@ -420,7 +420,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -566,23 +566,23 @@ ) ) (matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y)) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat vector 2) (-> *camera* local-down) ) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat vector 2) (vector-negate! (new-stack-vector0) (-> *camera* local-down)) ) ) ) (matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x))) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) ) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2)))) @@ -644,7 +644,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -1139,7 +1139,7 @@ ((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) (set! (-> self blend-from-type) (the-as uint 0)) (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) ) (else (set! (-> self blend-from-type) (the-as uint 2)) @@ -2029,7 +2029,7 @@ (set! sv-816 (-> (the-as (inline-array tracking-spline) (-> *camera* target-spline)) 0 point s2-2)) (set! sv-832 arg0) (let ((a2-21 (camera-master-method-16 *camera* #t))) - (set! f30-1 (s0-3 (the-as vector sv-816) sv-832 (the-as pat-surface a2-21))) + (set! f30-1 (s0-3 (-> sv-816 position) sv-832 (the-as pat-surface a2-21))) ) ) (< f30-1 0.0) diff --git a/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc index 51a6f67dee7..12c2d2d2560 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc @@ -51,7 +51,7 @@ (vector-matrix*! (-> s5-0 yon-bottom-left) (-> s5-0 yon-bottom-left) arg3) (vector-matrix*! (-> s5-0 yon-bottom-right) (-> s5-0 yon-bottom-right) arg3) (when (= arg2 1.0) - (vector-! (the-as vector (-> *fog-texture-work* corner)) (-> s5-0 yon-top-left) (-> arg3 trans)) + (vector-! (-> *fog-texture-work* corner 0) (-> s5-0 yon-top-left) (-> arg3 trans)) (vector-! (-> *fog-texture-work* corner 1) (-> s5-0 yon-top-right) (-> arg3 trans)) (vector-! (-> *fog-texture-work* corner 2) (-> s5-0 yon-bottom-left) (-> arg3 trans)) (vector-! (-> *fog-texture-work* corner 3) (-> s5-0 yon-bottom-right) (-> arg3 trans)) diff --git a/test/decompiler/reference/jak2/engine/camera/camera_REF.gc b/test/decompiler/reference/jak2/engine/camera/camera_REF.gc index b3db1fe81d9..11b98adfa04 100644 --- a/test/decompiler/reference/jak2/engine/camera/camera_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/camera_REF.gc @@ -404,7 +404,7 @@ (s3-2 (cond (v0-8 - (vector+! (the-as vector (-> this vec)) (the-as vector (&+ s3-2 0)) (the-as vector v0-8)) + (vector+! (-> this vec 0) (the-as vector (&+ s3-2 0)) (the-as vector v0-8)) (vector+! (-> this vec 1) (the-as vector (&+ s3-2 16)) (the-as vector v0-8)) ) (else @@ -429,7 +429,7 @@ ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-! v1-11 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-11)) - (vector-! v1-11 (the-as vector (-> this vec)) arg2) + (vector-! v1-11 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-11)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) @@ -437,13 +437,13 @@ ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-! v1-11 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-11)) - (vector-! v1-11 (the-as vector (-> this vec)) arg2) + (vector-! v1-11 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-11)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) ) (else - (vector-! (-> this vec 1) (-> this vec 1) (the-as vector (-> this vec))) + (vector-! (-> this vec 1) (-> this vec 1) (-> this vec 0)) (set! (-> this vec 1 w) (vector-normalize-ret-len! (-> this vec 1) 1.0)) ) ) @@ -456,7 +456,7 @@ (defmethod cam-index-method-10 ((this cam-index) (arg0 vector)) (let ((s5-0 (new-stack-vector0))) 0.0 - (vector-! s5-0 arg0 (the-as vector (-> this vec))) + (vector-! s5-0 arg0 (-> this vec 0)) (cond ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-flatten! s5-0 s5-0 (-> *camera* local-down)) @@ -518,8 +518,8 @@ (set! (-> this summed-len) (- (-> this summed-len) (-> this point arg0 tp-length))) (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 arg0))) - (the-as vector (-> this point v1-11)) - (the-as vector (-> this point arg0)) + (-> this point v1-11 position) + (-> this point arg0 position) ) ) (set! (-> this point arg0 tp-length) @@ -672,7 +672,7 @@ (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) arg0 - (the-as vector (-> this point s2-0)) + (-> this point s2-0 position) ) (set! (-> this point s2-0 tp-length) (vector-normalize-ret-len! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) 1.0) @@ -720,7 +720,7 @@ (cond ((= (-> arg2 cur-pt) (-> this end-point)) (set! (-> arg2 partial-pt) 0.0) - (vector+! arg1 arg1 (the-as vector (-> this point (-> arg2 cur-pt)))) + (vector+! arg1 arg1 (-> this point (-> arg2 cur-pt) position)) (return arg1) ) ((begin (set! f0-4 (+ (-> arg2 partial-pt) (/ arg0 (-> this point (-> arg2 cur-pt) tp-length)))) (< f0-4 1.0)) @@ -729,8 +729,8 @@ (let ((a2-5 (-> this point (-> arg2 cur-pt) next))) (vector-lerp! (the-as vector s5-0) - (the-as vector (-> this point (-> arg2 cur-pt))) - (the-as vector (-> this point a2-5)) + (-> this point (-> arg2 cur-pt) position) + (-> this point a2-5 position) f0-4 ) ) @@ -762,11 +762,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod tracking-spline-method-20 ((this tracking-spline) (arg0 vector) (arg1 int)) (let ((s3-0 (new 'stack-no-clear 'vector))) - (vector-! - s3-0 - (the-as vector (-> this point (-> this used-point))) - (the-as vector (-> this point (-> this end-point))) - ) + (vector-! s3-0 (-> this point (-> this used-point) position) (-> this point (-> this end-point) position)) (let* ((f0-0 (vector-length s3-0)) (f1-1 (* 0.33333334 (- 1.5 (/ f0-0 METER_LENGTH)))) ) @@ -814,7 +810,7 @@ ((< f26-0 0.0) (if (and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* -40.96 f26-0) (new 'static 'vector4w :x #xff :y #xff :w #x80) @@ -824,7 +820,7 @@ ) ((and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* 40.96 f26-0) (new 'static 'vector4w :x #x80 :y #x80 :w #x80) @@ -999,7 +995,7 @@ ) (else (vector-reset! (-> self trans)) - (matrix-identity! (the-as matrix (-> self tracking))) + (matrix-identity! (-> self tracking inv-mat)) (set! (-> self fov) 11650.845) (vector-reset! (-> self velocity)) ) @@ -1494,7 +1490,7 @@ (let ((f26-0 (vector-length s3-0))) (vector-flatten! s3-0 s3-0 (-> arg0 vector 1)) (vector-normalize! s3-0 1.0) - (let ((f28-0 (vector-dot s3-0 (the-as vector (-> arg0 vector))))) + (let ((f28-0 (vector-dot s3-0 (-> arg0 vector 0)))) (set! sv-128 s2-0) (set! sv-112 (-> arg0 vector)) (let ((f0-7 (* 0.8 (tan (/ arg2 2))))) @@ -1503,21 +1499,21 @@ (.mov vf2 v1-11) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-128 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 vector 2)) (vector-normalize! s2-0 f26-0) - (vector--float*! s2-0 s2-0 (the-as vector (-> arg0 vector)) 6144.0) + (vector--float*! s2-0 s2-0 (-> arg0 vector 0) 6144.0) (vector-normalize! s2-0 1.0) - (let ((f0-9 (fmax 0.0 (vector-dot s2-0 (the-as vector (-> arg0 vector)))))) + (let ((f0-9 (fmax 0.0 (vector-dot s2-0 (-> arg0 vector 0))))) (when (< f0-9 (fabs f28-0)) (if (< f28-0 0.0) - (vector--float*! s2-0 s2-0 (the-as vector (-> arg0 vector)) (* 2.0 f0-9)) + (vector--float*! s2-0 s2-0 (-> arg0 vector 0) (* 2.0 f0-9)) ) (matrix-from-two-vectors! s5-0 s2-0 s3-0) (vector-matrix*! (-> arg0 vector 2) (-> arg0 vector 2) s5-0) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 1) (-> arg0 vector 2)) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 1) (-> arg0 vector 2)) ) ) ) @@ -1525,7 +1521,7 @@ (vector-! s3-0 (-> *camera* tpos-curr) (-> *camera* pitch-off)) (vector-! s3-0 s3-0 arg1) (vector--float*! s3-0 s3-0 (-> *camera* local-down) (-> *camera* settings foot-offset)) - (vector-flatten! s3-0 s3-0 (the-as vector (-> arg0 vector))) + (vector-flatten! s3-0 s3-0 (-> arg0 vector 0)) (vector-normalize! s3-0 1.0) (let ((f28-1 (vector-dot s3-0 (-> arg0 vector 1)))) (set! sv-160 s2-0) @@ -1536,8 +1532,8 @@ (.mov vf2 v1-32) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-160 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 vector 2)) (vector-normalize! s2-0 1.0) @@ -1551,7 +1547,7 @@ (vector-! s3-0 (-> *camera* tpos-curr) (-> *camera* pitch-off)) (vector-! s3-0 s3-0 arg1) (vector--float*! s3-0 s3-0 (-> *camera* local-down) (-> *camera* settings head-offset)) - (vector-flatten! s3-0 s3-0 (the-as vector (-> arg0 vector))) + (vector-flatten! s3-0 s3-0 (-> arg0 vector 0)) (vector-normalize! s3-0 1.0) (let ((f28-2 (vector-dot s3-0 (-> arg0 vector 1)))) (let ((s0-1 s2-0)) @@ -1584,13 +1580,13 @@ ) ) ) - (matrix-axis-angle! s5-0 (the-as vector (-> arg0 vector)) f0-35) + (matrix-axis-angle! s5-0 (-> arg0 vector 0) f0-35) ) ) ) (vector-matrix*! (-> arg0 vector 2) (-> arg0 vector 2) s5-0) ) - (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (the-as vector (-> arg0 vector))) + (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (-> arg0 vector 0)) ) ) @@ -1633,11 +1629,11 @@ (vector-normalize! sv-208 (* f28-0 (-> arg0 point-of-interest-blend value))) (let ((v1-12 s0-0)) (let ((a0-10 s0-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-10 quad)) ) (.lvf vf5 (&-> sv-208 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-12 quad) vf6) ) (vector-normalize! s0-0 f28-0) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-cache_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-cache_REF.gc index bdc259d7a17..fbc7eaafa9f 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-cache_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-cache_REF.gc @@ -27,7 +27,7 @@ (add-debug-box #t (bucket-id debug2) - (the-as vector (-> arg2 bbox)) + (-> arg2 bbox min) (-> arg2 bbox max) (new 'static 'rgba :g #xff :b #xff :a #x80) ) @@ -102,16 +102,16 @@ (a3-4 (the-as (inline-array collide-cache-tri) (-> this tris (-> this num-tris)))) ) (.mov vf5 v1-24) - (.add.x.vf vf1 vf0 vf5 :mask #b10) + (.add.x.vf.y vf1 vf0 vf5) (set! (-> a3-4 0 clear-flags) (the-as uint128 0)) (set! (-> a3-4 0 prim-index) a2-6) - (.add.x.vf vf3 vf0 vf5 :mask #b10) + (.add.x.vf.y vf3 vf0 vf5) (set! (-> a3-4 1 clear-flags) (the-as uint128 0)) (set! (-> a3-4 1 prim-index) a2-6) (.mov.vf vf2 vf1) (.mov.vf vf4 vf1) - (.add.z.vf vf2 vf0 vf3 :mask #b100) - (.add.x.vf vf4 vf0 vf3 :mask #b1) + (.add.z.vf.z vf2 vf0 vf3) + (.add.x.vf.x vf4 vf0 vf3) (.svf (&-> a3-4 0 vertex 0 quad) vf1) (.svf (&-> a3-4 0 vertex 1 quad) vf2) (.svf (&-> a3-4 0 vertex 2 quad) vf3) @@ -170,9 +170,9 @@ (set! (-> this ignore-processes 0) (the-as process a0-2)) (nop!) (set! (-> this ignore-processes 1) (the-as process a1-1)) - (.mov.vf vf1 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) (nop!) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (set! (-> this ignore-mask) (the-as pat-surface a2-0)) ) ) @@ -293,29 +293,29 @@ (nop!) (.add.vf vf2 vf1 vf3) (set! (-> this ignore-mask) (the-as pat-surface v1-10)) - (.add.y.vf vf8 vf8 vf8 :mask #b1) + (.add.y.vf.x vf8 vf8 vf8) (set! (-> this num-tris) 0) (.min.vf vf4 vf1 vf2) (set! (-> this num-prims) 0) (.max.vf vf5 vf1 vf2) (set! (-> this collide-with) (the-as collide-spec a2-1)) ) - (.sub.w.vf vf10 vf0 vf9 :mask #b111) + (.sub.w.vf.xyz vf10 vf0 vf9) (set! (-> this ignore-processes 0) (the-as process a0-14)) - (.add.z.vf vf8 vf8 vf8 :mask #b1) + (.add.z.vf.x vf8 vf8 vf8) (set! (-> this ignore-processes 1) (the-as process a1-3)) ) ) ) - (.sub.w.vf vf4 vf4 vf9 :mask #b111) + (.sub.w.vf.xyz vf4 vf4 vf9) (nop!) - (.add.w.vf vf5 vf5 vf9 :mask #b111) + (.add.w.vf.xyz vf5 vf5 vf9) (nop!) (.ftoi.vf vf15 vf10) (nop!) (.isqrt.vf Q vf0 vf8 :fsf #b11 :ftf #b0) (nop!) - (.add.w.vf vf11 vf0 vf9 :mask #b111) + (.add.w.vf.xyz vf11 vf0 vf9) (nop!) (nop!) (nop!) @@ -339,7 +339,7 @@ (.svf (&-> arg0 bbox4w max quad) vf7) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (nop!) (.mul.x.vf vf12 vf3 vf8) (nop!) @@ -351,27 +351,27 @@ (nop!) (.abs.vf vf23 vf12) (nop!) - (.add.y.vf vf22 vf22 vf22 :mask #b1) + (.add.y.vf.x vf22 vf22 vf22) (.mov v1-11 vf23) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (nop!) - (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf vf13 vf0 vf12 :mask #b1)) - (.sub.y.vf vf13 vf0 vf12 :mask #b1) + (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf.x vf13 vf0 vf12)) + (.sub.y.vf.x vf13 vf0 vf12) (nop!) (.isqrt.vf Q vf0 vf22 :fsf #b11 :ftf #b0) (nop!) - (.add.x.vf vf13 vf0 vf12 :mask #b10) + (.add.x.vf.y vf13 vf0 vf12) (nop!) (.wait.vf) (nop!) - (.mul.vf vf13 vf13 Q :mask #b11) + (.mul.vf.xy vf13 vf13 Q) (nop!) (label cfg-12) (.outer.product.a.vf acc vf12 vf13) (nop!) - (.add.x.vf vf11 vf11 vf8 :mask #b1) + (.add.x.vf.x vf11 vf11 vf8) (nop!) (.outer.product.b.vf vf14 vf13 vf12 acc) (nop!) @@ -383,23 +383,23 @@ (nop!) (.mov.vf vf19 vf14) (nop!) - (.mov.vf vf17 vf0 :mask #b1110) + (.mov.vf.yzw vf17 vf0) (.svf (&-> arg0 local-box4w max quad) vf16) - (.mov.vf vf18 vf0 :mask #b1101) + (.mov.vf.xzw vf18 vf0) (nop!) - (.mov.vf vf19 vf0 :mask #b1011) + (.mov.vf.xyw vf19 vf0) (nop!) - (.add.x.vf vf17 vf17 vf13 :mask #b10) + (.add.x.vf.y vf17 vf17 vf13) (nop!) - (.add.y.vf vf18 vf18 vf12 :mask #b1) + (.add.y.vf.x vf18 vf18 vf12) (nop!) - (.add.z.vf vf19 vf19 vf12 :mask #b1) + (.add.z.vf.x vf19 vf19 vf12) (nop!) - (.add.x.vf vf17 vf17 vf14 :mask #b100) + (.add.x.vf.z vf17 vf17 vf14) (nop!) - (.add.y.vf vf18 vf18 vf14 :mask #b100) + (.add.y.vf.z vf18 vf18 vf14) (nop!) - (.add.z.vf vf19 vf19 vf13 :mask #b10) + (.add.z.vf.y vf19 vf19 vf13) (nop!) (.mul.x.vf acc vf17 vf1) (nop!) @@ -428,11 +428,11 @@ ) (let ((f0-19 1.0)) (.lvf vf1 (&-> (-> arg0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-20 vf1) (set! (-> arg0 rlength w) (/ f0-19 v1-20)) ) @@ -626,11 +626,11 @@ (s3-0 (new 'stack-no-clear 'matrix)) ) (.lvf vf1 (&-> (-> arg0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-9 vf1) (let ((f0-1 v1-9)) (if (< 0.0 f0-1) @@ -647,13 +647,13 @@ ) (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) (let ((s0-0 (-> v1-18 prim-core))) - (vector-! (-> s3-0 vector 1) (the-as vector s0-0) (-> arg0 start-pos)) + (vector-! (-> s3-0 vector 1) (-> s0-0 world-sphere) (-> arg0 start-pos)) (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 vector 1)) f30-0)) (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) ) - (vector+float*! (the-as vector (-> s3-0 vector)) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) + (vector+float*! (-> s3-0 vector 0) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) ) - (let ((f0-7 (vector-vector-distance-squared (the-as vector (-> s3-0 vector)) (the-as vector s0-0))) + (let ((f0-7 (vector-vector-distance-squared (-> s3-0 vector 0) (-> s0-0 world-sphere))) (f1-5 (+ (-> arg0 radius) (-> s0-0 world-sphere w))) ) (when (< f0-7 (* f1-5 f1-5)) @@ -683,13 +683,13 @@ ) (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) (let ((s0-1 (-> v1-39 prim-core))) - (vector-! (-> s3-0 vector 1) (the-as vector s0-1) (-> arg0 start-pos)) + (vector-! (-> s3-0 vector 1) (-> s0-1 world-sphere) (-> arg0 start-pos)) (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 vector 1)) f30-0)) (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) ) - (vector+float*! (the-as vector (-> s3-0 vector)) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) + (vector+float*! (-> s3-0 vector 0) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) ) - (let ((f0-12 (vector-vector-distance-squared (the-as vector (-> s3-0 vector)) (the-as vector s0-1))) + (let ((f0-12 (vector-vector-distance-squared (-> s3-0 vector 0) (-> s0-1 world-sphere))) (f1-11 (+ (-> arg0 radius) (-> s0-1 world-sphere w))) ) (when (< f0-12 (* f1-11 f1-11)) @@ -790,7 +790,7 @@ (.lvf vf3 (&-> arg0 start-pos quad)) (.lvf vf2 (&-> arg0 move-dist quad)) (set! (-> s5-0 vertex 0 x) (the-as float (-> arg0 ignore-pat))) - (.mul.w.vf vf3 vf0 vf4 :mask #b1000) + (.mul.w.vf.w vf3 vf0 vf4) (.svf (&-> s5-0 vertex 2 quad) vf2) (.svf (&-> s5-0 vertex 1 quad) vf3) (let ((s4-0 (the-as object (-> this prims))) @@ -804,7 +804,7 @@ ((>= (the-as int (-> (the-as collide-cache-prim s4-0) prim-core prim-type)) 0) (let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) + (-> arg0 best-other-tri) (the-as collide-prim-core (-> s5-0 vertex 1)) (-> s5-0 vertex 2) f30-0 @@ -824,7 +824,7 @@ ) (let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere) (the-as collide-cache-prim s4-0) - (the-as collide-tri-result arg0) + (-> arg0 best-other-tri) (the-as collide-prim-core (-> s5-0 vertex 1)) (-> s5-0 vertex 2) f30-0 diff --git a/test/decompiler/reference/jak2/engine/collide/collide-debug_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-debug_REF.gc index 46a1f282e34..991adf7015d 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-debug_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-debug_REF.gc @@ -13,7 +13,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-tri gp-0) vertex)) + (-> (the-as collide-cache-tri gp-0) vertex 0) (-> (the-as collide-cache-tri gp-0) vertex 1) (-> (the-as collide-cache-tri gp-0) vertex 2) t1-0 @@ -39,7 +39,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim gp-1) prim-core)) + (-> (the-as collide-cache-prim gp-1) prim-core world-sphere) (-> (the-as collide-cache-prim gp-1) prim-core world-sphere w) t0-1 ) @@ -81,12 +81,12 @@ (defun col-rend-draw ((arg0 col-rend) (arg1 col-rend-filter)) (let ((s4-0 (new 'stack-no-clear 'matrix))) (set! (-> s4-0 vector 0 quad) (-> (math-camera-matrix) vector 2 quad)) - (vector-normalize! (the-as vector (-> s4-0 vector)) 1.0) + (vector-normalize! (-> s4-0 vector 0) 1.0) (let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris)))) (countdown (s2-0 (-> *collide-cache* num-tris)) - (vector-3pt-cross! (-> s4-0 vector 1) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) + (vector-3pt-cross! (-> s4-0 vector 1) (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) (vector-normalize! (-> s4-0 vector 1) 1.0) - (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1)))) + (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (-> s4-0 vector 0) (-> s4-0 vector 1)))) (let ((v1-9 (-> s3-1 pat))) (cond ((and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-9 (-> arg1 show-pat-set))) @@ -97,7 +97,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) t1-0 @@ -107,14 +107,14 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x80) ) ) (when (-> arg0 show-normals?) - (vector+! (-> s4-0 vector 2) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1)) + (vector+! (-> s4-0 vector 2) (-> s3-1 vertex 0) (-> s3-1 vertex 1)) (vector+! (-> s4-0 vector 2) (-> s4-0 vector 2) (-> s3-1 vertex 2)) (vector-float/! (-> s4-0 vector 2) (-> s4-0 vector 2) 3.0) (add-debug-vector @@ -131,7 +131,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x20 :g #x20 :b #x20 :a #x20) @@ -140,7 +140,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x10) @@ -166,7 +166,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim s5-1) prim-core)) + (-> (the-as collide-cache-prim s5-1) prim-core world-sphere) (-> (the-as collide-cache-prim s5-1) prim-core world-sphere w) t0-5 ) @@ -235,7 +235,7 @@ (add-debug-box #t (bucket-id debug2) - (the-as vector (-> s5-0 bbox)) + (-> s5-0 bbox min) (-> s5-0 bbox max) (if (logtest? (current-time) 128) (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc index 3e53aee61e1..9af2accb53c 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-edge-grab_REF.gc @@ -28,14 +28,14 @@ (set! (-> s5-0 cshape) v1-3) (.lvf vf3 (&-> v1-3 trans quad)) ) - (.add.vf vf1 vf1 vf3 :mask #b111) - (.add.vf vf2 vf2 vf3 :mask #b111) + (.add.vf.xyz vf1 vf1 vf3) + (.add.vf.xyz vf2 vf2 vf3) (.svf (&-> s5-0 cache-fill-box min quad) vf1) (.svf (&-> s5-0 cache-fill-box max quad) vf2) (.lvf vf4 (&-> s5-0 spec local-within-reach-box min quad)) (.lvf vf5 (&-> s5-0 spec local-within-reach-box max quad)) - (.add.vf vf4 vf4 vf3 :mask #b111) - (.add.vf vf5 vf5 vf3 :mask #b111) + (.add.vf.xyz vf4 vf4 vf3) + (.add.vf.xyz vf5 vf5 vf3) (.ftoi.vf vf6 vf4) (.ftoi.vf vf7 vf5) (.svf (&-> s5-0 within-reach-box min quad) vf4) @@ -174,9 +174,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((f0-1 (get-best-hand-point this (-> arg1 right-hand-hold) s0-0 (the-as int s4-0)))) @@ -193,9 +193,9 @@ (.lvf vf5 (&-> v0-2 quad)) ) (.lvf vf4 (&-> sv-656 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-672 quad) vf6) (let ((f0-3 (get-best-hand-point this (-> arg1 left-hand-hold) s0-0 (the-as int s4-0)))) (if (< 491.52 f0-3) @@ -214,7 +214,7 @@ (-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal quad) ) (vector-normalize! - (vector-! (-> arg1 hanging-matrix vector 2) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + (vector-! (-> arg1 hanging-matrix vector 2) (-> arg1 world-vertex 1) (-> arg1 world-vertex 0)) 1.0 ) (vector-normalize! @@ -326,8 +326,8 @@ (-> (the-as collide-shape-moving (-> arg0 process 0 root)) dynam gravity-normal quad) ) (vector-normalize! (vector-! (-> s4-0 vector 2) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) 1.0) - (vector-normalize! (vector-cross! (the-as vector (-> s4-0 vector)) (-> s4-0 vector 2) (-> s4-0 vector 1)) 1.0) - (vector-cross! (-> s4-0 vector 2) (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1)) + (vector-normalize! (vector-cross! (-> s4-0 vector 0) (-> s4-0 vector 2) (-> s4-0 vector 1)) 1.0) + (vector-cross! (-> s4-0 vector 2) (-> s4-0 vector 0) (-> s4-0 vector 1)) (vector-average! (-> s4-0 trans) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) (transform-vectors! s4-0 s5-0 (-> arg0 spec local-player-spheres) 6) (let ((a1-11 (new 'stack-no-clear 'collide-query))) @@ -482,23 +482,23 @@ (.sub.vf vf4 vf1 vf2) (.sub.vf vf5 vf3 vf2) (.mul.vf vf6 vf5 vf5) - (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.add.z.vf.x vf6 vf6 vf6) (.sqrt.vf Q vf6 :ftf #b0) (nop!) (.wait.vf) (nop!) - (.add.vf vf6 vf0 Q :mask #b1) + (.add.vf.x vf6 vf0 Q) (.nop.vf) (.mov v1-1 vf6) (let ((f1-0 v1-1)) (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (.mul.x.vf vf9 vf5 vf8) (.mov v1-2 vf8) (.mul.vf vf10 vf9 vf4) - (.add.z.vf vf10 vf10 vf10 :mask #b1) + (.add.z.vf.x vf10 vf10 vf10) (let ((f2-0 v1-2)) (.mov v1-3 vf10) (let ((f3-0 v1-3)) @@ -512,8 +512,8 @@ ) ) ) - (.mul.x.vf vf7 vf5 vf11 :mask #b111) - (.add.vf vf7 vf7 vf2 :mask #b111) + (.mul.x.vf.xyz vf7 vf5 vf11) + (.add.vf.xyz vf7 vf7 vf2) (.svf (&-> arg1 quad) vf7) 0.0 ) @@ -525,7 +525,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (-> this world-vertex 1) (new 'static 'rgba :r #xff :a #x60) #f @@ -557,7 +557,7 @@ #t (bucket-id debug-no-zbuf1) (-> this adjacent-edge-left-vertex) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (new 'static 'rgba :r #x80 :a #x60) #f (the-as rgba -1) @@ -577,7 +577,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this tri-vertex)) + (-> this tri-vertex 0) (-> this world-vertex 4) (-> this world-vertex 5) (new 'static 'rgba :r #xff :a #x30) @@ -723,7 +723,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this attempts s5-1)) + (-> this attempts s5-1 vector) (meters 0.1) (new 'static 'rgba :a #x40) ) @@ -741,7 +741,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 0) (-> v1-3 vertex 1) (-> v1-3 vertex 2) t1-0 diff --git a/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc index 6184cf988f9..59391291f7e 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-mesh_REF.gc @@ -393,11 +393,11 @@ (let ((t1-3 (* t1-2 16))) (.max.vf vf9 vf9 vf3) (let ((t2-4 (* t2-3 16))) - (.mul.x.vf acc vf0 vf7 :mask #b1000) + (.mul.x.vf.w acc vf0 vf7) (let ((t3-0 (* t0-5 16))) - (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) + (.add.mul.y.vf.w acc vf0 vf7 acc) (set! t0-4 (+ t1-3 a2-1)) - (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (.add.mul.z.vf.w vf7 vf0 vf7 acc) (set! t1-1 (+ t2-4 a2-1)) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) (set! t2-2 (+ t3-0 a2-1)) @@ -416,7 +416,7 @@ (.svf (&-> a1-1 bbox4w min quad) vf8) (.wait.vf) (.svf (&-> a1-1 bbox4w max quad) vf9) - (.mul.vf vf6 vf6 Q :mask #b111) + (.mul.vf.xyz vf6 vf6 Q) (nop!) (nop!) (.svf (&-> a1-1 normal quad) vf6) @@ -512,13 +512,13 @@ (set! v1-0 (-> s5-0 sphere-bbox4w min quad)) (set! a0-1 (-> s5-0 sphere-bbox4w max quad)) (.sub.vf vf3 vf2 vf1) - (.mul.w.vf vf4 vf2 vf2 :mask #b1000) + (.mul.w.vf.w vf4 vf2 vf2) (.mul.vf vf3 vf3 vf3) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b10) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) + (.add.w.vf.y vf3 vf0 vf3) (.mov a1-7 vf3) (b! (>= (the-as int a1-7) 0) cfg-1 :delay (set! s4-0 (+ s4-0 96))) ) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-shape-rider_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-shape-rider_REF.gc index 34b0eccafac..b37b582ff0e 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-shape-rider_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-shape-rider_REF.gc @@ -16,7 +16,7 @@ (logtest? (-> s5-0 prim-core action) (collide-action rideable)) (logtest? (-> s4-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (let ((f0-4 (- (- (vector-vector-distance (-> s5-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) (-> s5-0 prim-core world-sphere w) ) (-> s4-0 prim-core world-sphere w) @@ -49,7 +49,7 @@ (when (and (logtest? (-> s3-0 prim-core collide-with) s4-0) (logtest? (-> s3-0 prim-core action) (collide-action rideable)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> s3-0 prim-core world-sphere) (-> arg0 prim-core world-sphere)) (-> s3-0 prim-core world-sphere w) ) (-> arg0 prim-core world-sphere w) @@ -83,7 +83,7 @@ (when (and (logtest? s4-0 (-> s3-0 prim-core collide-as)) (logtest? (-> s3-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s3-0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> this prim-core world-sphere) (-> s3-0 prim-core world-sphere)) (-> this prim-core world-sphere w) ) (-> s3-0 prim-core world-sphere w) @@ -105,14 +105,9 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* this))) (when v1-13 (let* ((s4-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-4 (sphere-on-platform-test - s3-1 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s4-1 - (the-as vector (-> arg0 prim-core)) - (-> arg1 best-dist) - ) - ) + (f0-4 + (sphere-on-platform-test s3-1 (-> v1-13 tris 0) s4-1 (-> arg0 prim-core world-sphere) (-> arg1 best-dist)) + ) ) (when (< f0-4 (-> arg1 best-dist)) (set! (-> arg1 best-dist) f0-4) @@ -192,8 +187,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> s4-0 prim-core world-sphere w))) @@ -233,8 +228,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> s4-0 prim-core world-sphere w))) @@ -390,8 +385,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-19 quad) vf1) ) (cond diff --git a/test/decompiler/reference/jak2/engine/collide/collide-shape_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-shape_REF.gc index e7dda1ab878..8936597b3b2 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-shape_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-shape_REF.gc @@ -51,15 +51,15 @@ (.lvf vf1 (&-> a0-1 prim-core world-sphere quad)) (.lvf vf2 (&-> a1-1 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf5 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf5 vf3 vf4) (let ((f0-1 0.0)) - (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.add.w.vf.x vf5 vf0 vf5) (.mov v1-3 vf5) (b! (<= f0-1 v1-3) cfg-8) ) @@ -118,15 +118,15 @@ ) ) (.sub.vf vf3 vf2 vf1) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (set! f0-0 0.0) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) ) (should-push-away-test s4-0 other cquery) @@ -176,15 +176,15 @@ ) ) (.sub.vf vf3 vf2 vf1) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (set! f0-0 0.0) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) ) (should-push-away-test this (the-as collide-shape-prim s4-0) cquery) @@ -214,14 +214,9 @@ (let ((v1-4 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-4) cfg-7 :delay (empty-form)) (let ((s5-0 (new 'stack-no-clear 'collide-tri-result))) - (let ((f0-1 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-4 tris)) - s5-0 - (the-as vector (-> other prim-core)) - (-> cquery best-dist) - ) - ) + (let ((f0-1 + (should-push-away-test s2-0 (-> v1-4 tris 0) s5-0 (-> other prim-core world-sphere) (-> cquery best-dist)) + ) ) (b! (>= f0-1 (-> cquery best-dist)) cfg-7 :delay #f) (set! (-> cquery best-dist) f0-1) @@ -275,21 +270,21 @@ (b! (> (the-as int v1-0) 0) cfg-5 :delay (nop!)) (.lvf vf1 (&-> this prim-core world-sphere quad)) (.lvf vf2 (&-> other prim-core world-sphere quad)) - (.sub.vf vf3 vf2 vf1 :mask #b111) - (.add.w.vf vf5 vf1 vf2 :mask #b1000) - (.mul.vf vf4 vf3 vf3 :mask #b111) - (.mul.x.vf acc vf0 vf4 :mask #b1000) - (.add.mul.y.vf acc vf0 vf4 acc :mask #b1000) - (.add.mul.z.vf vf4 vf0 vf4 acc :mask #b1000) + (.sub.vf.xyz vf3 vf2 vf1) + (.add.w.vf.w vf5 vf1 vf2) + (.mul.vf.xyz vf4 vf3 vf3) + (.mul.x.vf.w acc vf0 vf4) + (.add.mul.y.vf.w acc vf0 vf4 acc) + (.add.mul.z.vf.w vf4 vf0 vf4 acc) (.sqrt.vf Q vf4 :ftf #b11) - (.mov.vf vf3 vf0 :mask #b1000) - (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.mov.vf.w vf3 vf0) + (.add.w.vf.x vf5 vf0 vf5) (let ((f2-0 (-> cquery best-dist))) (.wait.vf) (nop!) - (.add.vf vf4 vf0 Q :mask #b1) - (.sub.x.vf vf6 vf4 vf5 :mask #b1) - (.mul.x.vf vf3 vf3 vf4 :mask #b111) + (.add.vf.x vf4 vf0 Q) + (.sub.x.vf.x vf6 vf4 vf5) + (.mul.x.vf.xyz vf3 vf3 vf4) (.mov v1-3 vf6) (let ((f1-0 v1-3)) (b! (<= f2-0 f1-0) cfg-9) @@ -306,7 +301,7 @@ (s4-1 (-> cquery best-other-tri intersect)) ) (vector-float*! s4-1 s3-0 (-> this prim-core world-sphere w)) - (vector+! s4-1 s4-1 (the-as vector (-> this prim-core))) + (vector+! s4-1 s4-1 (-> this prim-core world-sphere)) (set! (-> cquery best-other-tri vertex 0 quad) (-> s4-1 quad)) (point-in-plane-<-point+normal! (-> cquery best-other-tri vertex 1) s4-1 s3-0) (let* ((a0-8 (vector-normalize! @@ -326,9 +321,9 @@ ) (.lvf vf5 (&-> v1-11 quad)) (.lvf vf4 (&-> s4-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-9 quad) vf6) ) ) @@ -339,25 +334,20 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh other)))) (when v1-13 (let* ((s3-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-3 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s3-1 - (the-as vector (-> this prim-core)) - (-> cquery best-dist) - ) - ) + (f0-3 + (should-push-away-test s2-0 (-> v1-13 tris 0) s3-1 (-> this prim-core world-sphere) (-> cquery best-dist)) + ) ) (when (< f0-3 (-> cquery best-dist)) (set! (-> cquery best-dist) f0-3) (set! (-> cquery best-my-prim) this) (set! (-> cquery num-spheres) (the-as uint other)) (let ((s4-2 (-> cquery best-other-tri normal))) - (vector-! s4-2 (-> s3-1 intersect) (the-as vector (-> this prim-core))) + (vector-! s4-2 (-> s3-1 intersect) (-> this prim-core world-sphere)) (vector-normalize! s4-2 1.0) (let ((s3-2 (-> cquery best-other-tri intersect))) (vector-float*! s3-2 s4-2 (-> this prim-core world-sphere w)) - (vector+! s3-2 s3-2 (the-as vector (-> this prim-core))) + (vector+! s3-2 s3-2 (-> this prim-core world-sphere)) (set! (-> cquery best-other-tri vertex 0 quad) (-> s3-2 quad)) (point-in-plane-<-point+normal! (-> cquery best-other-tri vertex 1) s3-2 s4-2) (let* ((a0-23 (vector-normalize! @@ -377,9 +367,9 @@ ) (.lvf vf5 (&-> v1-23 quad)) (.lvf vf4 (&-> s3-2 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-24 quad) vf6) ) ) @@ -901,7 +891,7 @@ (move-by-vector! arg0 a1-1) ) (react-to-pat! arg0 (-> arg1 best-other-tri pat)) - (vector-! sv-48 (the-as vector (-> arg1 best-my-prim prim-core)) (-> arg1 best-other-tri intersect)) + (vector-! sv-48 (-> arg1 best-my-prim prim-core world-sphere) (-> arg1 best-other-tri intersect)) (cond ((and (= (-> arg1 best-dist) 0.0) (< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w))) @@ -1126,8 +1116,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) (t9-0 this v1-1) ) @@ -1358,8 +1348,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-4 quad) vf1) ) (set! (-> this prev-status) (-> this status)) @@ -1492,8 +1482,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a1-5 quad) vf1) (t9-1 this a1-5) ) @@ -1851,8 +1841,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-1 quad) vf1) ) (fill-cache-for-shape this (+ (vector-length v1-0) arg2) arg1) @@ -1901,21 +1891,21 @@ (a2-1 (-> v1-0 prim-core prim-type)) ) (b! (zero? a0-2) cfg-9 :delay (.lvf vf28 (&-> t0-0 quad))) - (.add.x.vf vf31 vf31 vf28 :mask #b1) + (.add.x.vf.x vf31 vf31 vf28) (let ((a0-3 (-> v1-0 specific 0))) (b! (= a2-1 (prim-type group)) cfg-3 :delay (.lvf vf24 (&-> v1-0 prim-core world-sphere quad))) - (.add.w.vf vf25 vf31 vf24 :mask #b1) - (.add.x.vf vf30 vf24 vf25 :mask #b111) - (b! #t cfg-10 :delay (.sub.x.vf vf29 vf24 vf25 :mask #b111)) + (.add.w.vf.x vf25 vf31 vf24) + (.add.x.vf.xyz vf30 vf24 vf25) + (b! #t cfg-10 :delay (.sub.x.vf.xyz vf29 vf24 vf25)) (label cfg-3) (b! (zero? a0-3) cfg-9 :delay (set! v1-0 (+ v1-0 80))) (+! a0-3 -1) (let ((a2-3 (logand (-> v1-0 prim-core collide-with) arg2))) (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) - (b! (zero? a2-3) cfg-3 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + (b! (zero? a2-3) cfg-3 :delay (.add.w.vf.x vf25 vf31 vf24)) ) - (.add.x.vf vf30 vf24 vf25 :mask #b111) - (.sub.x.vf vf29 vf24 vf25 :mask #b111) + (.add.x.vf.xyz vf30 vf24 vf25) + (.sub.x.vf.xyz vf29 vf24 vf25) (label cfg-6) (b! (zero? a0-3) cfg-10 :delay (set! v1-0 (+ v1-0 80))) (+! a0-3 -1) @@ -1923,11 +1913,11 @@ ) (let ((a2-5 (logand (-> v1-0 prim-core collide-with) arg2))) (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) - (b! (zero? a2-5) cfg-6 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + (b! (zero? a2-5) cfg-6 :delay (.add.w.vf.x vf25 vf31 vf24)) ) ) - (.add.x.vf vf27 vf24 vf25 :mask #b111) - (.sub.x.vf vf26 vf24 vf25 :mask #b111) + (.add.x.vf.xyz vf27 vf24 vf25) + (.sub.x.vf.xyz vf26 vf24 vf25) (.min.vf vf29 vf29 vf26) (.max.vf vf30 vf30 vf27) (b! #t cfg-6 :delay (nop!)) @@ -1935,8 +1925,8 @@ (let ((v0-0 #f)) (b! #t cfg-11 :delay (nop!)) (label cfg-10) - (.mov.vf vf29 vf0 :mask #b1000) - (.mov.vf vf30 vf0 :mask #b1000) + (.mov.vf.w vf29 vf0) + (.mov.vf.w vf30 vf0) (.svf (&-> arg0 min quad) vf29) (.svf (&-> arg0 max quad) vf30) (set! v0-0 #t) @@ -2102,8 +2092,8 @@ (.lvf vf4 (&-> a1-4 quad 2)) ) (.add.mul.y.vf acc vf3 vf1 acc) - (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) - (.mul.vf vf1 vf1 Q :mask #b111) + (.add.mul.z.vf.xyz vf1 vf4 vf1 acc) + (.mul.vf.xyz vf1 vf1 Q) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov a1-5 vf1) ) @@ -2111,7 +2101,7 @@ (when (= a1-0 -2) (.lvf vf1 (&-> s5-0 local-sphere quad)) (.lvf vf2 (&-> this trans quad)) - (.add.vf vf1 vf1 vf2 :mask #b111) + (.add.vf.xyz vf1 vf1 vf2) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov a1-7 vf1) ) @@ -2127,14 +2117,14 @@ ((-3) (let ((s3-0 (new 'stack-no-clear 'vector))) (vector-orient-by-quat! s3-0 (-> s5-0 local-sphere) (-> this quat)) - (vector+! (the-as vector (-> s5-0 prim-core)) s3-0 (-> this trans)) + (vector+! (-> s5-0 prim-core world-sphere) s3-0 (-> this trans)) ) (set! (-> s5-0 prim-core world-sphere w) (-> s5-0 local-sphere w)) ) ((-2) (.lvf vf1 (&-> s5-0 local-sphere quad)) (.lvf vf2 (&-> this trans quad)) - (.add.vf vf1 vf1 vf2 :mask #b111) + (.add.vf.xyz vf1 vf1 vf2) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov v1-8 vf1) ) @@ -2155,7 +2145,7 @@ (vector+! (-> this trans) (-> this trans) arg0) (let ((v1-1 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> v1-1 prim-core)) (the-as vector (-> v1-1 prim-core)) arg0) + (vector+! (-> v1-1 prim-core world-sphere) (-> v1-1 prim-core world-sphere) arg0) (set! (-> v1-1 prim-core world-sphere w) (-> v1-1 local-sphere w)) (&+! v1-1 80) ) @@ -2173,7 +2163,7 @@ (set! (-> this trans quad) (-> arg0 quad)) (let ((a1-2 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0) + (vector+! (-> a1-2 prim-core world-sphere) (-> a1-2 prim-core world-sphere) v1-0) (set! (-> a1-2 prim-core world-sphere w) (-> a1-2 local-sphere w)) (&+! a1-2 80) ) @@ -2295,7 +2285,7 @@ (add-debug-sphere #t (bucket-id debug2) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :r #xff :g #xff :b #xff :a #x40) ) @@ -2309,7 +2299,7 @@ (add-debug-sphere #t (bucket-id debug2) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (cond ((and (zero? (-> this prim-core collide-as)) (zero? (-> this prim-core collide-with))) @@ -2333,7 +2323,7 @@ (add-debug-sphere #t (bucket-id debug2) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :b #xff :a #x40) ) @@ -2347,7 +2337,7 @@ (add-debug-sphere #t (bucket-id debug2) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :g #xff :a #x10) ) @@ -2398,8 +2388,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this root-prim prim-core world-sphere w))) @@ -2439,8 +2429,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-15 world-sphere w) (-> this root-prim prim-core world-sphere w))) @@ -2498,8 +2488,8 @@ (.lvf vf5 (&-> (-> gp-0 cquery) best-other-tri normal quad)) (.sub.vf vf2 vf4 vf3) (.mul.vf vf1 vf5 vf2) - (.add.x.vf vf1 vf1 vf1 :mask #b10) - (.add.z.vf vf1 vf1 vf1 :mask #b10) + (.add.x.vf.y vf1 vf1 vf1) + (.add.z.vf.y vf1 vf1 vf1) (.mov v1-55 vf1) (b! (< (the-as int v1-55) 0) cfg-35 :likely-delay (.sub.vf vf2 vf0 vf2)) (label cfg-35) @@ -2512,8 +2502,8 @@ (.mov at-0 f0-7) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-59 quad) vf1) ) (let ((s0-0 (-> (the-as collide-shape-moving s1-0) status))) @@ -2580,8 +2570,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-3 world-sphere w) (-> s3-0 prim-core world-sphere w))) @@ -2621,8 +2611,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-15 world-sphere w) (-> s3-0 prim-core world-sphere w))) @@ -2653,15 +2643,15 @@ (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) (.lvf vf2 (&-> a2-15 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (let ((v1-28 (-> this process))) (.mov a0-10 vf3) (let ((a1-26 (-> s0-0 process))) @@ -2738,15 +2728,15 @@ (.lvf vf2 (&-> s4-0 prim-core world-sphere quad)) (b! (zero? a0-2) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) ) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-0 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) (b! (< f0-0 a0-3) cfg-1) ) @@ -2797,15 +2787,15 @@ (.lvf vf1 (&-> s4-0 prim-core world-sphere quad)) (b! (zero? a0-3) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) ) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-0 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-4 vf3) (b! (< f0-0 a0-4) cfg-1) ) @@ -2842,7 +2832,7 @@ (b! (not s2-0) cfg-10 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg1)))) (when v1-5 - (when (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> this prim-core))) + (when (overlap-test s2-0 (-> v1-5 tris 0) (-> this prim-core world-sphere)) (b! #t cfg-11 :delay (nop!)) (the-as none 0) ) @@ -2886,11 +2876,7 @@ (b! (not s2-0) cfg-9 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-5) cfg-9 :delay (empty-form)) - (b! - (not (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> arg1 prim-core)))) - cfg-9 - :delay (empty-form) - ) + (b! (not (overlap-test s2-0 (-> v1-5 tris 0) (-> arg1 prim-core world-sphere))) cfg-9 :delay (empty-form)) ) ) (b! #t cfg-12 :delay (nop!)) @@ -2971,8 +2957,8 @@ (.lvf vf5 (&-> a0-7 world-sphere quad)) ) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-176 quad) vf6) (vector-normalize! sv-176 1.0) (when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech)) diff --git a/test/decompiler/reference/jak2/engine/collide/collide-touch_REF.gc b/test/decompiler/reference/jak2/engine/collide/collide-touch_REF.gc index 3364cdcad93..ddf2cd83ef0 100644 --- a/test/decompiler/reference/jak2/engine/collide/collide-touch_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/collide-touch_REF.gc @@ -506,17 +506,14 @@ (defmethod get-middle-of-bsphere-overlap ((this touching-prims-entry) (arg0 vector)) (let* ((s4-0 (-> this prim1 cprim)) (v1-0 (-> this prim2 cprim)) - (gp-1 (vector-! - (new 'stack-no-clear 'vector) - (the-as vector (-> v1-0 prim-core)) - (the-as vector (-> s4-0 prim-core)) - ) - ) + (gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> v1-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) + ) ) (let ((f1-2 (- (- (vector-length gp-1) (-> v1-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (/ f1-2 2))) ) - (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + (vector+! arg0 gp-1 (-> s4-0 prim-core world-sphere)) ) arg0 ) diff --git a/test/decompiler/reference/jak2/engine/collide/find-nearest_REF.gc b/test/decompiler/reference/jak2/engine/collide/find-nearest_REF.gc index 9d55ef7f630..c17c2da5dd8 100644 --- a/test/decompiler/reference/jak2/engine/collide/find-nearest_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/find-nearest_REF.gc @@ -223,7 +223,7 @@ ) (when s3-0 (let* ((s4-2 (the-as structure (-> (the-as collide-shape s3-0) root-prim prim-core))) - (f30-0 (- (vector-vector-distance (-> gp-0 point) (the-as vector s4-2)) + (f30-0 (- (vector-vector-distance (-> gp-0 point) (-> (the-as collide-prim-core s4-2) world-sphere)) (-> (the-as collide-prim-core s4-2) world-sphere w) ) ) diff --git a/test/decompiler/reference/jak2/engine/collide/main-collide_REF.gc b/test/decompiler/reference/jak2/engine/collide/main-collide_REF.gc index b5739875287..c33b13243dc 100644 --- a/test/decompiler/reference/jak2/engine/collide/main-collide_REF.gc +++ b/test/decompiler/reference/jak2/engine/collide/main-collide_REF.gc @@ -14,9 +14,9 @@ (nop!) (nop!) (.lvf vf1 (&-> drawable bsphere quad)) - (.add.w.vf vf2 vf1 vf1 :mask #b111) + (.add.w.vf.xyz vf2 vf1 vf1) (let ((v1-0 (-> bbox min quad))) - (.sub.w.vf vf1 vf1 vf1 :mask #b111) + (.sub.w.vf.xyz vf1 vf1 vf1) (let ((a1-1 (-> bbox max quad))) (.ftoi.vf vf4 vf2) (nop!) @@ -116,13 +116,13 @@ (nop!) (vitof12.xyzw vf7 vf7) (nop!) - (.add.vf vf8 vf8 vf9 :mask #b111) + (.add.vf.xyz vf8 vf8 vf9) (nop!) (nop!) (.lvf vf9 (&-> drawable bsphere quad)) (vitof12.xyzw vf10 vf10) (nop!) - (.mul.w.vf vf10 vf10 vf9 :mask #b1) + (.mul.w.vf.x vf10 vf10 vf9) (nop!) (.mul.x.vf acc vf5 vf9) (nop!) @@ -132,9 +132,9 @@ (let ((a1-1 (-> bbox max quad))) (.add.mul.w.vf vf1 vf8 vf0 acc) (nop!) - (.add.x.vf vf2 vf1 vf10 :mask #b111) + (.add.x.vf.xyz vf2 vf1 vf10) (nop!) - (.sub.x.vf vf1 vf1 vf10 :mask #b111) + (.sub.x.vf.xyz vf1 vf1 vf10) (nop!) (.ftoi.vf vf4 vf2) (nop!) @@ -184,11 +184,11 @@ (.mov vf12 v1-2) (.itof.vf vf12 vf12) (nop!) - (.add.vf vf10 vf10 vf12 :mask #b111) + (.add.vf.xyz vf10 vf10 vf12) (nop!) - (.add.vf vf9 vf9 vf10 :mask #b111) + (.add.vf.xyz vf9 vf9 vf10) (nop!) - (.add.w.vf vf11 vf0 vf9 :mask #b1) + (.add.w.vf.x vf11 vf0 vf9) (nop!) (.mov a3-0 vf11) (nop!) diff --git a/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc index 9d9b234ca7d..066805ca3c5 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/blocking-plane_REF.gc @@ -125,13 +125,13 @@ (vector+! (-> s2-1 trans) s3-0 s4-0) (vector-float*! (-> s2-1 trans) (-> s2-1 trans) 0.5) (+! (-> s2-1 trans y) (/ height 2)) - (vector-! (the-as vector (-> s1-0 vector)) s4-0 s3-0) - (let ((f30-1 (vector-normalize-ret-len! (the-as vector (-> s1-0 vector)) 1.0))) + (vector-! (-> s1-0 vector 0) s4-0 s3-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s1-0 vector 0) 1.0))) (set! (-> s2-1 scale x) (/ f30-1 METER_LENGTH)) (set! (-> s2-1 scale y) (/ height METER_LENGTH)) (set! (-> s2-1 scale z) 0.0) (set! (-> s1-0 vector 1 quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) - (vector-cross! (-> s1-0 vector 2) (the-as vector (-> s1-0 vector)) (-> s1-0 vector 1)) + (vector-cross! (-> s1-0 vector 2) (-> s1-0 vector 0) (-> s1-0 vector 1)) (vector-normalize! (-> s1-0 vector 2) 1.0) (matrix->quaternion (-> s2-1 quat) s1-0) (let ((v1-20 (-> this root root-prim local-sphere))) diff --git a/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc index d6f9891a557..6de55589ebf 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/collectables_REF.gc @@ -421,7 +421,7 @@ (ja-post) ) (if (nonzero? s5-0) - (spawn s5-0 (the-as vector s4-0)) + (spawn s5-0 (-> s4-0 world-sphere)) ) ) (if (nonzero? (-> this sound)) @@ -620,7 +620,7 @@ (let ((a0-5 (-> self root root-prim prim-core)) (a1-2 (-> (the-as collide-shape v1-1) root-prim prim-core)) ) - (when (< (vector-vector-distance (the-as vector a0-5) (the-as vector a1-2)) (-> *FACT-bank* suck-suck-dist)) + (when (< (vector-vector-distance (-> a0-5 world-sphere) (-> a1-2 world-sphere)) (-> *FACT-bank* suck-suck-dist)) (logior! (-> self flags) (collectable-flag suck-in)) #t ) @@ -650,9 +650,9 @@ (gp-1 (get-trans a0-6 3)) ) (if (and arg1 (rand-vu-percent? 0.25)) - (eco-blue-glow (the-as vector s2-1)) + (eco-blue-glow (-> s2-1 world-sphere)) ) - (let ((f0-0 (vector-vector-distance (the-as vector s2-1) gp-1))) + (let ((f0-0 (vector-vector-distance (-> s2-1 world-sphere) gp-1))) (cond ((and arg3 (< f0-0 8192.0)) (return #t) @@ -702,7 +702,7 @@ (go-virtual wait) ) (arg1 - (add-blue-shake (-> self root trans) (the-as vector s2-1) gp-1) + (add-blue-shake (-> self root trans) (-> s2-1 world-sphere) gp-1) ) ) ) @@ -1869,7 +1869,7 @@ (a1-3 (-> this draw skeleton bones 3)) ) (if (nonzero? a0-7) - (spawn-with-matrix a0-7 (the-as matrix a1-3)) + (spawn-with-matrix a0-7 (-> a1-3 transform)) ) ) 0 diff --git a/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc index 3258d46c3ef..b0473ddf74b 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/conveyor_REF.gc @@ -248,8 +248,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) @@ -289,8 +289,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) @@ -320,15 +320,15 @@ (.lvf vf1 (&-> this collide-bounds quad)) (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-10 vf3) (let ((s4-0 (-> v1-23 process))) (b! (< f0-2 a0-10) cfg-27) @@ -394,7 +394,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-19 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc index cc208ca8471..da1b7ee4a24 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/crates_REF.gc @@ -826,7 +826,7 @@ (when v1-4 (let* ((gp-2 (-> (the-as collide-shape-moving (-> self root)) root-prim prim-core)) (a1-3 (-> (the-as collide-shape-moving v1-4) root-prim prim-core)) - (f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))) + (f30-0 (vector-vector-distance (-> gp-2 world-sphere) (-> a1-3 world-sphere))) ) (when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel)) (logior! (-> self fact options) (actor-option suck-in)) diff --git a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc index 3f2ccaf59cf..89d798b0dce 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/elevator_REF.gc @@ -169,7 +169,7 @@ (when (< 0.0 f0-5) (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) (vector+! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s5-0 start-pos)) - (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (the-as vector (-> s4-0 prim-core))) + (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s4-0 prim-core world-sphere)) (move-by-vector! (-> target control) (-> s5-0 move-dist)) ) ) diff --git a/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc index ff442b054a5..b4efb828134 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/generic-obs_REF.gc @@ -3178,7 +3178,7 @@ ) 0.0 (set! (-> a1-2 start-pos quad) (-> v1-4 world-sphere quad)) - (vector-! (-> a1-2 move-dist) (the-as vector a0-5) (the-as vector v1-4)) + (vector-! (-> a1-2 move-dist) (-> a0-5 world-sphere) (-> v1-4 world-sphere)) ) (let ((v1-5 a1-2)) (set! (-> v1-5 radius) 40.96) @@ -3238,7 +3238,7 @@ ((and (nonzero? s4-0) (type? s4-0 collide-shape)) (vector+! arg1 - (the-as vector (-> (the-as collide-shape s4-0) root-prim prim-core)) + (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere) (rand-vu-sphere-point! arg1 (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere w)) ) ) diff --git a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc index cf7695bad55..12dd3a00a71 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/projectile_REF.gc @@ -229,8 +229,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) ) (let ((v1-2 a1-0)) diff --git a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc index c24f3d15ad3..3bf2948b56d 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/voicebox_REF.gc @@ -162,9 +162,9 @@ (.lvf vf5 (&-> a1-4 quad)) ) (.lvf vf4 (&-> v1-15 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (let ((v1-16 *particle-vel*) diff --git a/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc index 79f8f0b1aff..d056908ebf5 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/water-flow_REF.gc @@ -163,9 +163,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-13 quad) vf6) ) 0 @@ -183,9 +183,9 @@ (.lvf vf5 (&-> a0-17 quad)) ) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-15 quad) vf6) ) 0 @@ -244,8 +244,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) @@ -289,8 +289,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) @@ -322,15 +322,15 @@ (.lvf vf1 (&-> this collide-bounds quad)) (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-10 vf3) (let ((s4-0 (-> v1-23 process))) (b! (< f0-2 a0-10) cfg-27) @@ -404,7 +404,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-19 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/test/decompiler/reference/jak2/engine/common_objs/water_REF.gc b/test/decompiler/reference/jak2/engine/common_objs/water_REF.gc index ab9f4fcf098..d9eb0b717d4 100644 --- a/test/decompiler/reference/jak2/engine/common_objs/water_REF.gc +++ b/test/decompiler/reference/jak2/engine/common_objs/water_REF.gc @@ -736,7 +736,7 @@ ) ((begin (set! (-> this top 1 quad) (-> this top 0 quad)) - (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (vector<-cspace! (-> this top 0) (-> this process node-list data (-> this joint-index))) (+! (-> this top 0 y) (-> this top-y-offset)) (set! (-> this bottom 1 quad) (-> this bottom 0 quad)) (set! (-> this bottom 0 quad) (-> this process control trans quad)) diff --git a/test/decompiler/reference/jak2/engine/debug/debug_REF.gc b/test/decompiler/reference/jak2/engine/debug/debug_REF.gc index 18acf237a5c..3db7e004460 100644 --- a/test/decompiler/reference/jak2/engine/debug/debug_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/debug_REF.gc @@ -30,10 +30,10 @@ (.add.mul.z.vf vf5 vf3 vf5 acc) (.div.vf Q vf9 vf5 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf5 vf5 Q :mask #b111) + (.mul.vf.xyz vf5 vf5 Q) (.add.vf vf5 vf5 vf8) - (.max.x.vf vf5 vf5 vf0 :mask #b1000) - (.min.x.vf vf5 vf5 vf6 :mask #b1000) + (.max.x.vf.w vf5 vf5 vf0) + (.min.x.vf.w vf5 vf5 vf6) (vftoi4.xyzw vf5 vf5) (.svf (&-> out quad) vf5) out @@ -51,7 +51,7 @@ ) (set! (-> pt-copy quad) (-> pt quad)) (set! (-> pt-copy w) 1.0) - (when (transform-point-qword! (the-as vector4w (-> s5-0 vector)) pt-copy) + (when (transform-point-qword! (-> s5-0 vector 0) pt-copy) (with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -189,9 +189,7 @@ (when (debug-line-clip? sv-128 sv-144 start var-end) (set! (-> sv-128 w) 1.0) (set! (-> sv-144 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s4-0 vector)) sv-128) - (transform-point-qword! (-> s4-0 vector 1) sv-144) - ) + (when (and (transform-point-qword! (-> s4-0 vector 0) sv-128) (transform-point-qword! (-> s4-0 vector 1) sv-144)) (with-dma-buffer-add-bucket ((buf2 (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -368,7 +366,7 @@ (set! (-> a1-3 w) 1.0) (set! (-> s2-0 w) 1.0) (set! (-> s1-0 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-3) + (when (and (transform-point-qword! (-> s5-0 vector 0) a1-3) (transform-point-qword! (-> s5-0 vector 1) s2-0) (transform-point-qword! (-> s5-0 vector 2) s1-0) ) @@ -1174,7 +1172,7 @@ enable bucket (-> mat trans) - (the-as vector (-> mat vector)) + (-> mat vector 0) line-length (new 'static 'rgba :r #xff :a #x80) ) @@ -1199,14 +1197,7 @@ ;; definition (debug) for function add-debug-rot-matrix (defun-debug add-debug-rot-matrix ((enable symbol) (bucket bucket-id) (mat matrix) (position vector)) - (add-debug-vector - enable - bucket - position - (the-as vector (-> mat vector)) - (meters 2) - (new 'static 'rgba :r #xff :a #x80) - ) + (add-debug-vector enable bucket position (-> mat vector 0) (meters 2) (new 'static 'rgba :r #xff :a #x80)) (add-debug-vector enable bucket position (-> mat vector 1) (meters 2) (new 'static 'rgba :g #xff :a #x80)) (add-debug-vector enable bucket position (-> mat vector 2) (meters 2) (new 'static 'rgba :b #xff :a #x80)) mat @@ -1540,9 +1531,9 @@ (.lvf vf5 (&-> v1-3 quad)) ) (.lvf vf4 (&-> position quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sphere-pos quad) vf6) (let ((color-rgba (logior (logior (logior (shr (shl (the int (* 128.0 (-> light color w))) 56) 32) (shr (shl (the int (* 128.0 (-> light color z))) 56) 40) diff --git a/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc b/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc index 2df1f39c414..2d25787a1b9 100644 --- a/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/editable-player_REF.gc @@ -781,7 +781,7 @@ (while (< s0-6 s1-5) (when (and a0-36 (logtest? (-> a0-36 flags) (editable-flag selected))) (if (= (-> s2-4 w) 0.0) - (editable-method-20 a0-36 s5-4 (the-as vector s4-4) s3-4 s2-4) + (editable-method-20 a0-36 s5-4 (-> s4-4 0) s3-4 s2-4) (editable-method-15 a0-36 s2-4 56) ) ) @@ -807,7 +807,7 @@ (while (< s0-7 s1-6) (when (and a0-40 (logtest? (-> a0-40 flags) (editable-flag selected))) (if (= (-> s2-5 w) 0.0) - (editable-method-20 a0-40 s5-5 (the-as vector s4-5) s3-5 s2-5) + (editable-method-20 a0-40 s5-5 (-> s4-5 0) s3-5 s2-5) (editable-method-15 a0-40 s2-5 56) ) ) @@ -889,7 +889,7 @@ (set! (-> arg0 region) (new 'debug 'editable-region)) ) (sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))) + (let* ((a2-3 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0))) (s3-4 (new 'debug 'editable-sphere a2-3 2048.0 (-> arg0 region))) ) (set! (-> arg0 data s4-3) s3-4) @@ -906,7 +906,7 @@ (set! (-> arg0 region) (new 'debug 'editable-region)) ) (sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))) + (let* ((a2-7 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0))) (s3-6 (new 'debug 'editable-point a2-7 (-> arg0 region))) ) (set! (-> arg0 data s4-4) s3-6) @@ -920,7 +920,7 @@ (let ((s4-5 (editable-array-method-11 arg0))) (when (>= s4-5 0) (sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))) + (let* ((a2-11 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0))) (s3-8 (new 'debug 'editable-sample a2-11 *editable-sample-region*)) ) (set! (-> arg0 data s4-5) s3-8) @@ -946,7 +946,7 @@ (let ((s4-7 (editable-array-method-11 arg0))) (when (>= s4-7 0) (sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))) + (let* ((a2-18 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0))) (s3-13 (new 'debug 'editable-light a2-18 2048.0 *editable-light-region*)) ) (set! (-> arg0 data s4-7) s3-13) @@ -962,7 +962,7 @@ (let ((s4-8 (editable-array-method-11 arg0))) (when (>= s4-8 0) (sound-play-by-spec (static-sound-spec "beep" :fo-curve 1) (new-sound-id) (the-as vector #t)) - (let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos)))) + (let* ((a2-22 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0))) (s3-15 (new 'debug 'editable-entity a2-22 *editable-entity-region*)) ) (set! (-> arg0 data s4-8) s3-15) @@ -977,7 +977,7 @@ (if (and (-> arg0 region) (-> arg0 region locked)) (set! (-> arg0 region) (new 'debug 'editable-region)) ) - (let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (the-as vector (-> arg2 pos))))) + (let ((a1-42 (editable-array-method-17 arg0 (new 'stack-no-clear 'vector) (-> arg2 pos 0)))) (insert-box arg0 a1-42) ) ) diff --git a/test/decompiler/reference/jak2/engine/debug/editable_REF.gc b/test/decompiler/reference/jak2/engine/debug/editable_REF.gc index d9641ec4b4c..29127d83670 100644 --- a/test/decompiler/reference/jak2/engine/debug/editable_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/editable_REF.gc @@ -1363,8 +1363,8 @@ (dotimes (v1-0 6) (set! (-> s4-0 quad v1-0) (the-as uint128 0)) ) - (if (>= (editable-face-method-30 this (the-as (inline-array vector) s4-0)) 3) - (normal-of-plane arg0 (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) (-> s4-0 vector 2)) + (if (>= (editable-face-method-30 this (-> s4-0 vector)) 3) + (normal-of-plane arg0 (-> s4-0 vector 0) (-> s4-0 vector 1) (-> s4-0 vector 2)) ) ) (if (logtest? (-> this flags) (editable-flag orient)) @@ -1574,10 +1574,7 @@ 1.0 ) (vector-normalize! (editable-face-method-31 this (-> sv-368 vector 1)) 1.0) - (vector-normalize! - (vector-cross! (the-as vector (-> sv-368 vector)) (-> sv-368 vector 2) (-> sv-368 vector 1)) - 1.0 - ) + (vector-normalize! (vector-cross! (-> sv-368 vector 0) (-> sv-368 vector 2) (-> sv-368 vector 1)) 1.0) (set! (-> sv-368 trans quad) (-> (edit-get-trans (-> this vertex 0)) quad)) (set! (-> sv-368 trans w) 1.0) (matrix-4x4-inverse! sv-368 sv-368) diff --git a/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc b/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc index 1ca2634a7a3..d5f9480ca15 100644 --- a/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/nav/nav-graph-editor_REF.gc @@ -328,28 +328,25 @@ (let ((v1-23 (-> this nav-graph visnode-array data s3-1))) (when (and (= (-> v1-23 runtime-edge-id) arg0) (not (logtest? (-> v1-23 mysql-save-flag) (mysql-save-flag delete)))) (vector-! - (the-as vector (-> s4-0 vector)) + (-> s4-0 vector 0) (the-as vector (+ (the-as uint (-> this nav-graph node-array data 0 position)) (* 80 (-> v1-23 runtime-node-id))) ) (-> s4-0 trans) ) - (vector-normalize! - (the-as vector (-> s4-0 vector)) - (fmax 15360.0 (+ -15360.0 (vector-length (the-as vector (-> s4-0 vector))))) - ) - (vector-rotate-around-y! (-> s4-0 vector 1) (the-as vector (-> s4-0 vector)) 24576.0) + (vector-normalize! (-> s4-0 vector 0) (fmax 15360.0 (+ -15360.0 (vector-length (-> s4-0 vector 0))))) + (vector-rotate-around-y! (-> s4-0 vector 1) (-> s4-0 vector 0) 24576.0) (vector-normalize! (-> s4-0 vector 1) 16384.0) - (vector-rotate-around-y! (-> s4-0 vector 2) (the-as vector (-> s4-0 vector)) -24576.0) + (vector-rotate-around-y! (-> s4-0 vector 2) (-> s4-0 vector 0) -24576.0) (vector-normalize! (-> s4-0 vector 2) 16384.0) - (vector+! (the-as vector (-> s4-0 vector)) (the-as vector (-> s4-0 vector)) (-> s4-0 trans)) - (vector+! (-> s4-0 vector 2) (-> s4-0 vector 2) (the-as vector (-> s4-0 vector))) - (vector+! (-> s4-0 vector 1) (-> s4-0 vector 1) (the-as vector (-> s4-0 vector))) + (vector+! (-> s4-0 vector 0) (-> s4-0 vector 0) (-> s4-0 trans)) + (vector+! (-> s4-0 vector 2) (-> s4-0 vector 2) (-> s4-0 vector 0)) + (vector+! (-> s4-0 vector 1) (-> s4-0 vector 1) (-> s4-0 vector 0)) (add-debug-line #t (bucket-id debug2) - (the-as vector (-> s4-0 vector)) + (-> s4-0 vector 0) (-> s4-0 vector 1) *color-light-yellow* #f @@ -358,7 +355,7 @@ (add-debug-line #t (bucket-id debug2) - (the-as vector (-> s4-0 vector)) + (-> s4-0 vector 0) (-> s4-0 vector 2) *color-light-yellow* #f @@ -373,12 +370,12 @@ #f (the-as rgba -1) ) - (vector-lerp! (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) (-> s4-0 vector 2) 0.5) + (vector-lerp! (-> s4-0 vector 0) (-> s4-0 vector 1) (-> s4-0 vector 2) 0.5) (add-debug-line #t (bucket-id debug2) (-> s4-0 trans) - (the-as vector (-> s4-0 vector)) + (-> s4-0 vector 0) *color-light-yellow* #f (the-as rgba -1) @@ -462,9 +459,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) (t9-3 a0-8 (the-as bucket-id a1-4) a2-2 (-> gp-0 radius) *color-green*) ) @@ -480,9 +477,9 @@ (.lvf vf5 (&-> s5-1 quad)) (.lvf vf4 (&-> v1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-3 quad) vf6) (t9-4 a0-9 (the-as bucket-id a1-5) a2-3 (-> gp-0 radius) *color-green*) ) @@ -547,8 +544,8 @@ ) (.lvf vf4 (&-> a0-11 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-4 quad) vf5) ) (let ((a1-5 (-> v1-21 1))) @@ -558,8 +555,8 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-5 quad) vf5) ) (add-debug-box #t (bucket-id debug2) (-> v1-21 0) (-> v1-21 1) *color-yellow*) @@ -708,9 +705,9 @@ ) (.lvf vf4 (&-> s4-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) ) (reverse-transform-point! s5-1 s2-0 s3-0 s1-0) @@ -737,9 +734,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector+! @@ -830,7 +827,7 @@ ) ) ((and (-> this next-state) (= (-> this next-state name) 'move-plane)) - (vector-cross! s3-0 *up-vector* (the-as vector (-> (camera-matrix) vector))) + (vector-cross! s3-0 *up-vector* (-> (camera-matrix) vector 0)) (vector-normalize! s3-0 1.0) (set! (-> s2-0 quad) (-> this mouse-hit quad)) (reverse-transform-point! s5-1 s2-0 s3-0 s1-0) @@ -907,7 +904,7 @@ (dotimes (a0-64 4) (set! (-> v1-57 quad a0-64) (the-as uint128 0)) ) - (vector+! (the-as vector (-> v1-57 vector)) s5-1 (new 'static 'vector :x 8192.0 :z 8192.0 :w 1.0)) + (vector+! (-> v1-57 vector 0) s5-1 (new 'static 'vector :x 8192.0 :z 8192.0 :w 1.0)) (vector+! (-> v1-57 vector 1) s5-1 (new 'static 'vector :x 8192.0 :z -8192.0 :w 1.0)) (vector+! (-> v1-57 vector 2) s5-1 (new 'static 'vector :x -8192.0 :z -8192.0 :w 1.0)) (vector+! (-> v1-57 trans) s5-1 (new 'static 'vector :x -8192.0 :z 8192.0 :w 1.0)) @@ -1131,8 +1128,8 @@ (.lvf vf4 (&-> v1-18 quad)) (.lvf vf5 (&-> a0-13 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-144 quad) vf6) (let ((a3-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) s2-0 1.0)) (t0-0 1024.0) @@ -1190,8 +1187,8 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (the-as (pointer uint128) (&-> a1-1 0)) vf5) ) (let ((a1-2 (&+ v1-3 16))) @@ -1201,8 +1198,8 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-2 quad) vf5) ) (add-debug-box #t (bucket-id debug2) (the-as vector (&-> v1-3 x)) (&+ v1-3 16) *color-green*) @@ -2284,12 +2281,12 @@ (set! sv-160 s1-0) (let ((v0-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-3 position) (-> v1-27 position)) 1.0)) ) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-160 quad)) (.lvf vf5 (&-> v0-0 quad)) ) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-176 quad) vf6) (set! sv-112 (+ sv-112 1)) sv-112 @@ -2302,12 +2299,12 @@ (set! sv-192 s0-0) (let ((v0-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> a1-9 position) (-> v1-40 position)) 1.0)) ) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-192 quad)) (.lvf vf5 (&-> v0-1 quad)) ) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-208 quad) vf6) (set! sv-96 (+ sv-96 1)) sv-96 diff --git a/test/decompiler/reference/jak2/engine/debug/part-tester_REF.gc b/test/decompiler/reference/jak2/engine/debug/part-tester_REF.gc index 20e05f52340..c2128625196 100644 --- a/test/decompiler/reference/jak2/engine/debug/part-tester_REF.gc +++ b/test/decompiler/reference/jak2/engine/debug/part-tester_REF.gc @@ -78,7 +78,7 @@ (when (!= gp-1 (-> self old-group)) (when (nonzero? (-> self part)) (kill-and-free-particles (-> self part)) - (set! (-> self heap-cur) (&-> (-> self part) type)) + (set! (-> self heap-cur) (&-> self part type)) ) (set! (-> self part) (create-launch-control gp-1 self)) ) diff --git a/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc b/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc index a5e179f1fba..f38f0a75e99 100644 --- a/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc +++ b/test/decompiler/reference/jak2/engine/draw/drawable_REF.gc @@ -876,7 +876,7 @@ (set-vector! a1-3 0.612 0.5 -0.612 0.0) (set-vector! s2-0 -0.696 0.174 0.696 0.0) (vector-matrix*! (the-as vector (-> tod title-light-group)) a1-3 s1-0) - (vector-matrix*! (the-as vector (-> tod title-light-group dir1)) s2-0 s1-0) + (vector-matrix*! (-> tod title-light-group dir1 direction) s2-0 s1-0) ) ) (vu-lights<-light-group! fg-lights (-> tod title-light-group)) @@ -1046,15 +1046,15 @@ (.mul.w.vf acc vf27 vf0) (.add.mul.x.vf acc vf24 vf15 acc) (.add.mul.y.vf acc vf25 vf15 acc) - (.add.mul.z.vf vf15 vf26 vf15 acc :mask #b111) + (.add.mul.z.vf.xyz vf15 vf26 vf15 acc) (.mul.vf vf28 vf15 vf15) (.max.w.vf vf29 vf0 vf0) (.add.y.vf acc vf28 vf28) - (.add.mul.z.vf vf28 vf29 vf28 acc :mask #b1) + (.add.mul.z.vf.x vf28 vf29 vf28 acc) (.sqrt.vf Q vf28 :ftf #b0) - (.sub.w.vf vf28 vf0 vf15 :mask #b1000) + (.sub.w.vf.w vf28 vf0 vf15) (.wait.vf) - (.add.vf vf15 vf28 Q :mask #b1000) + (.add.vf.w vf15 vf28 Q) (.svf (&-> fg-dist quad) vf15) (when (< 0.0 (+ (-> fg-dist z) (-> dc bounds w))) (let ((lod-idx 0)) diff --git a/test/decompiler/reference/jak2/engine/entity/res_REF.gc b/test/decompiler/reference/jak2/engine/entity/res_REF.gc index e380589b79b..b4322fbc948 100644 --- a/test/decompiler/reference/jak2/engine/entity/res_REF.gc +++ b/test/decompiler/reference/jak2/engine/entity/res_REF.gc @@ -53,8 +53,8 @@ (set! (-> v0-0 allocated-length) arg0) (set! (-> v0-0 data-size) arg1) (set! (-> v0-0 length) 0) - (set! (-> v0-0 data-base) (&-> (-> v0-0 tag) arg0)) - (set! (-> v0-0 data-top) (&-> (-> v0-0 tag) arg0)) + (set! (-> v0-0 data-base) (&-> v0-0 tag arg0)) + (set! (-> v0-0 data-top) (&-> v0-0 tag arg0)) v0-0 ) ) @@ -185,7 +185,7 @@ (goto cfg-73) ) (let ((t3-13 t4-1) - (t4-4 (&-> (-> this tag) t4-1)) + (t4-4 (&-> this tag t4-1)) ) (while (not (or (>= t3-13 (-> this length)) (< t2-4 (-> (&+ (the-as (pointer uint64) (symbol->string (-> t4-4 0 name))) 4) 0)) diff --git a/test/decompiler/reference/jak2/engine/game/effect-control_REF.gc b/test/decompiler/reference/jak2/engine/game/effect-control_REF.gc index cebdf05bed0..f36e263465f 100644 --- a/test/decompiler/reference/jak2/engine/game/effect-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/effect-control_REF.gc @@ -168,13 +168,13 @@ (set! (-> this res) (-> s5-0 extra)) (let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo))) (set! (-> this name) (if (>= (the-as int v1-6) 0) - (&-> (-> s5-0 extra tag) v1-6) + (&-> s5-0 extra tag v1-6) (the-as (pointer res-tag) #f) ) ) ) (if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0)) - (set! (-> this name) (&-> (-> this name) 1)) + (set! (-> this name) (&-> this name 1)) ) (play-effects-from-res-lump this f30-0 f30-0 f30-0) ) diff --git a/test/decompiler/reference/jak2/engine/game/game-save_REF.gc b/test/decompiler/reference/jak2/engine/game/game-save_REF.gc index 2b09a93cb30..a40966bb39b 100644 --- a/test/decompiler/reference/jak2/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/game-save_REF.gc @@ -593,7 +593,7 @@ (set! (-> s1-0 elt-count) (+ (length arg1) 1)) (set! (-> s1-0 elt-size) (the-as uint 1)) ) - (copy-charp<-charp (the-as (pointer uint8) (-> (the-as (inline-array game-save-tag) s2-2) 1)) (-> arg1 data)) + (copy-charp<-charp (-> (the-as (inline-array game-save-tag) s2-2) 1 user-uint8) (-> arg1 data)) (let ((v1-59 (the-as (inline-array game-save-tag) @@ -612,7 +612,7 @@ (set! (-> a0-31 elt-size) (the-as uint 8)) ) (let ((s3-1 (-> v1-59 1))) - (save! (-> *display* base-clock) (the-as (pointer uint64) s3-1)) + (save! (-> *display* base-clock) (&-> s3-1 user-uint64)) (let ((v1-63 (the-as object (&+ s3-1 16)))) (let ((a0-33 (-> (the-as (inline-array game-save-tag) v1-63) 0))) (set! (-> a0-33 elt-type) (game-save-elt game-time)) @@ -620,7 +620,7 @@ (set! (-> a0-33 elt-size) (the-as uint 8)) ) (let ((s3-2 (&+ (the-as game-save-tag v1-63) 16))) - (save! (-> *display* game-clock) (the-as (pointer uint64) s3-2)) + (save! (-> *display* game-clock) (&-> s3-2 user-uint64)) (let ((v1-67 (the-as object (&+ s3-2 16)))) (let ((a0-35 (-> (the-as (inline-array game-save-tag) v1-67) 0))) (set! (-> a0-35 elt-type) (game-save-elt total-game-time)) @@ -628,7 +628,7 @@ (set! (-> a0-35 elt-size) (the-as uint 8)) ) (let ((s3-3 (&+ (the-as game-save-tag v1-67) 16))) - (save! (-> *display* total-game-clock) (the-as (pointer uint64) s3-3)) + (save! (-> *display* total-game-clock) (&-> s3-3 user-uint64)) (let ((v1-71 (the-as object (&+ s3-3 16)))) (let ((a0-37 (-> (the-as (inline-array game-save-tag) v1-71) 0))) (set! (-> a0-37 elt-type) (game-save-elt real-time)) @@ -636,7 +636,7 @@ (set! (-> a0-37 elt-size) (the-as uint 8)) ) (let ((s3-4 (&+ (the-as game-save-tag v1-71) 16))) - (save! (-> *display* real-clock) (the-as (pointer uint64) s3-4)) + (save! (-> *display* real-clock) (&-> s3-4 user-uint64)) (let ((v1-75 (the-as object (&+ s3-4 16)))) (let ((a0-39 (-> (the-as (inline-array game-save-tag) v1-75) 0))) (set! (-> a0-39 elt-type) (game-save-elt frame-time)) @@ -644,7 +644,7 @@ (set! (-> a0-39 elt-size) (the-as uint 8)) ) (let ((s3-5 (&+ (the-as game-save-tag v1-75) 16))) - (save! (-> *display* frame-clock) (the-as (pointer uint64) s3-5)) + (save! (-> *display* frame-clock) (&-> s3-5 user-uint64)) (let ((v1-79 (the-as object (&+ s3-5 16)))) (let ((a0-41 (-> (the-as (inline-array game-save-tag) v1-79) 0))) (set! (-> a0-41 elt-type) (game-save-elt real-frame-time)) @@ -652,7 +652,7 @@ (set! (-> a0-41 elt-size) (the-as uint 8)) ) (let ((s3-6 (&+ (the-as game-save-tag v1-79) 16))) - (save! (-> *display* real-frame-clock) (the-as (pointer uint64) s3-6)) + (save! (-> *display* real-frame-clock) (&-> s3-6 user-uint64)) (let ((v1-83 (the-as object (&+ s3-6 16)))) (let ((a0-43 (-> (the-as (inline-array game-save-tag) v1-83) 0))) (set! (-> a0-43 elt-type) (game-save-elt session-time)) @@ -660,7 +660,7 @@ (set! (-> a0-43 elt-size) (the-as uint 8)) ) (let ((s3-7 (&+ (the-as game-save-tag v1-83) 16))) - (save! (-> *display* session-clock) (the-as (pointer uint64) s3-7)) + (save! (-> *display* session-clock) (&-> s3-7 user-uint64)) (let ((v1-87 (the-as object (&+ s3-7 16)))) (let ((a0-45 (-> (the-as (inline-array game-save-tag) v1-87) 0))) (set! (-> a0-45 elt-type) (game-save-elt bg-time)) @@ -668,7 +668,7 @@ (set! (-> a0-45 elt-size) (the-as uint 8)) ) (let ((s3-8 (&+ (the-as game-save-tag v1-87) 16))) - (save! (-> *display* bg-clock) (the-as (pointer uint64) s3-8)) + (save! (-> *display* bg-clock) (&-> s3-8 user-uint64)) (let ((s3-9 (the-as object (&+ s3-8 16)))) (let ((s4-2 (-> s4-1 name))) (let ((s2-3 (-> (the-as (inline-array game-save-tag) s3-9) 0))) @@ -676,7 +676,7 @@ (set! (-> s2-3 elt-count) (+ (length s4-2) 1)) (set! (-> s2-3 elt-size) (the-as uint 1)) ) - (copy-charp<-charp (the-as (pointer uint8) (&+ (the-as game-save-tag s3-9) 16)) (-> s4-2 data)) + (copy-charp<-charp (-> (&+ (the-as game-save-tag s3-9) 16) user-uint8) (-> s4-2 data)) ) (let ((v1-99 (the-as object @@ -1416,14 +1416,11 @@ (((game-save-elt base-time)) ) (((game-save-elt game-time)) - (load! (-> *display* game-clock) (the-as (pointer uint64) (-> (the-as (inline-array game-save-tag) s4-0) 1))) + (load! (-> *display* game-clock) (&-> (the-as (inline-array game-save-tag) s4-0) 1 user-uint64)) (set! (-> *game-info* kiosk-timeout) (the-as uint (-> *display* game-clock frame-counter))) ) (((game-save-elt total-game-time)) - (load! - (-> *display* total-game-clock) - (the-as (pointer uint64) (-> (the-as (inline-array game-save-tag) s4-0) 1)) - ) + (load! (-> *display* total-game-clock) (&-> (the-as (inline-array game-save-tag) s4-0) 1 user-uint64)) (set! (-> *game-info* kiosk-timeout) (the-as uint (-> *display* game-clock frame-counter))) ) (((game-save-elt continue)) @@ -2258,7 +2255,7 @@ auto-save-post 0 (label cfg-5) (set! (-> self result) - (mc-save (-> self card) (-> self which) (&-> (-> self save) type) (the-as int (-> self save info-int32))) + (mc-save (-> self card) (-> self which) (&-> self save type) (the-as int (-> self save info-int32))) ) (when (!= (-> self result) (mc-status-code ok)) (suspend) diff --git a/test/decompiler/reference/jak2/engine/game/idle-control_REF.gc b/test/decompiler/reference/jak2/engine/game/idle-control_REF.gc index 9267dea5685..3420c1d8720 100644 --- a/test/decompiler/reference/jak2/engine/game/idle-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/idle-control_REF.gc @@ -122,7 +122,7 @@ (+! (-> this counter) 1) (cond ((>= (-> this counter) (-> this target)) - (set! (-> this current) (&-> (-> this current) 1)) + (set! (-> this current) (&-> this current 1)) (set! (-> this counter) 0) (set! (-> this target) 0) 0 @@ -140,7 +140,7 @@ ) (((ic-cmd push)) (ja-channel-push! 1 (the-as time-frame (-> s4-0 param0))) - (set! (-> this current) (&-> (-> this current) 1)) + (set! (-> this current) (&-> this current 1)) (set! (-> this counter) 0) (set! (-> this target) 0) 0 diff --git a/test/decompiler/reference/jak2/engine/game/main_REF.gc b/test/decompiler/reference/jak2/engine/game/main_REF.gc index 371b8c98e4a..eee43b22874 100644 --- a/test/decompiler/reference/jak2/engine/game/main_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/main_REF.gc @@ -273,9 +273,9 @@ (.lvf vf1 (&-> this color-dest quad)) (.lvf vf2 (&-> this color quad)) (.sub.vf vf3 vf1 vf2) - (.add.x.vf vf4 vf4 vf4 :mask #b10) - (.min.w.vf vf4 vf4 vf0 :mask #b10) - (.max.y.vf vf4 vf4 vf0 :mask #b10) + (.add.x.vf.y vf4 vf4 vf4) + (.min.w.vf.y vf4 vf4 vf0) + (.max.y.vf.y vf4 vf4 vf0) (.mul.y.vf vf3 vf3 vf4) (.add.vf vf1 vf2 vf3) (.svf (&-> this extra quad) vf4) diff --git a/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc b/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc index 49659dc6608..e83d80d3063 100644 --- a/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/bounding-box_REF.gc @@ -64,8 +64,8 @@ (.add.vf vf5 vf4 vf3) (.min.vf vf1 vf4 vf5) (.max.vf vf2 vf4 vf5) - (.mov.vf vf1 vf0 :mask #b1000) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) + (.mov.vf.w vf2 vf0) (.svf (&-> this min quad) vf1) (.svf (&-> this max quad) vf2) 0 @@ -142,10 +142,10 @@ (.add.vf vf6 vf5 vf4) (.min.vf vf2 vf5 vf6) (.max.vf vf3 vf5 vf6) - (.add.x.vf vf3 vf3 vf1 :mask #b111) - (.sub.x.vf vf2 vf2 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.add.x.vf.xyz vf3 vf3 vf1) + (.sub.x.vf.xyz vf2 vf2 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 @@ -163,10 +163,10 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.w.vf vf2 vf1 vf1 :mask #b111) - (.add.w.vf vf3 vf1 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.sub.w.vf.xyz vf2 vf1 vf1) + (.add.w.vf.xyz vf3 vf1 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 diff --git a/test/decompiler/reference/jak2/engine/geometry/cylinder_REF.gc b/test/decompiler/reference/jak2/engine/geometry/cylinder_REF.gc index 94882675907..0103011d559 100644 --- a/test/decompiler/reference/jak2/engine/geometry/cylinder_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/cylinder_REF.gc @@ -94,8 +94,8 @@ (let ((v1-6 (-> s3-0 trans))) (.lvf vf4 (&-> (-> this origin) quad)) (.lvf vf5 (&-> sv-896 quad 0)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-6 quad) vf6) ) (dotimes (v1-7 8) @@ -113,9 +113,9 @@ (.mov vf3 v1-19) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-944 quad) vf4) (set! sv-992 (-> s5-0 vert s0-1)) (set! sv-960 (-> s5-0 vert s0-1)) @@ -127,9 +127,9 @@ (.mov vf3 v1-33) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-992 quad) vf4) (set! sv-1040 (-> s5-0 vert (+ s0-1 16))) (set! sv-1008 (-> this origin)) @@ -141,9 +141,9 @@ (.mov vf3 v1-43) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1040 quad) vf4) (set! sv-1088 (-> s5-0 vert (+ s0-1 16))) (set! sv-1056 (-> s5-0 vert (+ s0-1 16))) @@ -155,9 +155,9 @@ (.mov vf3 v1-57) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1088 quad) vf4) ) (dotimes (s2-1 16) @@ -281,8 +281,8 @@ (let ((v1-6 (-> s3-0 trans))) (.lvf vf4 (&-> (-> this origin) quad)) (.lvf vf5 (&-> sv-448 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-6 quad) vf6) ) (dotimes (v1-7 8) diff --git a/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc b/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc index a082c3d0dbc..7b166532344 100644 --- a/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc +++ b/test/decompiler/reference/jak2/engine/geometry/geometry_REF.gc @@ -14,7 +14,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -36,13 +36,13 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf acc vf3 vf3 :mask #b111) - (.sub.mul.w.vf vf3 vf1 vf0 acc :mask #b111) + (.add.vf.xyz acc vf3 vf3) + (.sub.mul.w.vf.xyz vf3 vf1 vf0 acc) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -65,12 +65,12 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf vf3 vf3 vf2 :mask #b111) + (.add.vf.xyz vf3 vf3 vf2) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -88,7 +88,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -153,12 +153,12 @@ (.sub.vf vf1 vf4 vf3) (.sub.vf vf6 vf5 vf3) (.mul.vf vf2 vf1 vf1) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b0) @@ -168,8 +168,8 @@ (.mul.vf vf1 vf1 Q) (.mul.vf vf7 vf1 vf6) (let ((f1-0 (the-as float 0.0))) - (.add.y.vf vf7 vf7 vf7 :mask #b1) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.y.vf.x vf7 vf7 vf7) + (.add.z.vf.x vf7 vf7 vf7) (.mov v1-1 vf7) (let ((f0-0 v1-1)) (b! (< f0-0 f1-0) cfg-4 :likely-delay (set! f0-0 f1-0)) @@ -182,18 +182,18 @@ ) ) (.mul.x.vf vf1 vf1 vf7) - (b! (= arg3 #f) cfg-6 :delay (.mov.vf vf8 vf0 :mask #b1000)) - (.add.vf vf8 vf3 vf1 :mask #b111) + (b! (= arg3 #f) cfg-6 :delay (.mov.vf.w vf8 vf0)) + (.add.vf.xyz vf8 vf3 vf1) (.svf (&-> arg3 quad) vf8) (label cfg-6) (.sub.vf vf2 vf6 vf1) (.mul.vf vf2 vf2 vf2) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.mov v0-0 vf2) v0-0 @@ -289,27 +289,27 @@ (.lvf vf1 (&-> arg2 quad)) (.lvf vf6 (&-> arg1 quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.mul.w.vf acc vf0 vf6) (.add.mul.x.vf acc vf2 vf6 acc) (.add.mul.y.vf acc vf3 vf6 acc) @@ -337,29 +337,29 @@ (.sub.vf vf7 vf7 vf7) (.lvf vf1 (&-> arg2 quad)) (.lvf vf6 (&-> arg1 quad)) - (.sub.vf vf1 vf7 vf1 :mask #b111) + (.sub.vf.xyz vf1 vf7 vf1) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.mul.w.vf acc vf0 vf6) (.add.mul.x.vf acc vf2 vf6 acc) (.add.mul.y.vf acc vf3 vf6 acc) @@ -373,9 +373,9 @@ ;; INFO: Used lq/sq (defun forward-down->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) (vector-normalize-copy! (-> arg0 vector 2) arg1 1.0) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 2) arg2) - (vector-normalize! (the-as vector (-> arg0 vector)) 1.0) - (vector-cross! (-> arg0 vector 1) arg1 (the-as vector (-> arg0 vector))) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 2) arg2) + (vector-normalize! (-> arg0 vector 0) 1.0) + (vector-cross! (-> arg0 vector 1) arg1 (-> arg0 vector 0)) (vector-normalize! (-> arg0 vector 1) 1.0) (set! (-> arg0 trans quad) (the-as uint128 0)) (set! (-> arg0 vector 0 w) 0.0) @@ -390,9 +390,9 @@ (defun forward-down-nopitch->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) (vector-normalize-copy! (-> arg0 vector 1) arg2 1.0) (vector-negate! (-> arg0 vector 1) (-> arg0 vector 1)) - (vector-cross! (the-as vector (-> arg0 vector)) (-> arg0 vector 1) arg1) - (vector-normalize! (the-as vector (-> arg0 vector)) 1.0) - (vector-cross! (-> arg0 vector 2) (the-as vector (-> arg0 vector)) (-> arg0 vector 1)) + (vector-cross! (-> arg0 vector 0) (-> arg0 vector 1) arg1) + (vector-normalize! (-> arg0 vector 0) 1.0) + (vector-cross! (-> arg0 vector 2) (-> arg0 vector 0) (-> arg0 vector 1)) (vector-normalize! (-> arg0 vector 2) 1.0) (set! (-> arg0 trans quad) (the-as uint128 0)) (set! (-> arg0 vector 0 w) 0.0) @@ -821,12 +821,12 @@ (.outer.product.a.vf acc vf2 vf1) (.outer.product.b.vf vf4 vf1 vf2 acc) (.mul.vf vf5 vf4 vf4) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.isqrt.vf Q vf0 vf5 :fsf #b11 :ftf #b0) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.wait.vf) - (.mul.vf vf4 vf4 Q :mask #b111) + (.mul.vf.xyz vf4 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -848,7 +848,7 @@ (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) (.lvf vf3 (&-> arg3 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.sub.vf vf3 vf3 vf1) (.outer.product.a.vf acc vf2 vf3) @@ -917,13 +917,13 @@ (.outer.product.a.vf acc vf9 vf10) (.outer.product.b.vf vf16 vf10 vf9 acc) (.mul.vf vf12 vf15 vf1) - (.add.x.vf vf11 vf11 vf11 :mask #b10) + (.add.x.vf.y vf11 vf11 vf11) (.mul.vf vf13 vf16 vf1) - (.add.x.vf vf12 vf12 vf12 :mask #b10) - (.add.x.vf vf13 vf13 vf13 :mask #b10) - (.add.z.vf vf11 vf11 vf11 :mask #b10) - (.add.z.vf vf12 vf12 vf12 :mask #b10) - (.add.z.vf vf13 vf13 vf13 :mask #b10) + (.add.x.vf.y vf12 vf12 vf12) + (.add.x.vf.y vf13 vf13 vf13) + (.add.z.vf.y vf11 vf11 vf11) + (.add.z.vf.y vf12 vf12 vf12) + (.add.z.vf.y vf13 vf13 vf13) (.mov v1-0 vf11) (.mov a1-1 vf12) (.mov a0-1 vf13) @@ -937,17 +937,17 @@ (b! (nonzero? v1-3) cfg-3 :delay (set! v1-4 (+ v1-3 -1))) ) (.sub.vf vf17 vf5 vf2) - (.mov.vf vf18 vf0 :mask #b1000) + (.mov.vf.w vf18 vf0) (.outer.product.a.vf acc vf17 vf1) (.outer.product.b.vf vf18 vf1 vf17 acc) (.outer.product.a.vf acc vf1 vf18) (.outer.product.b.vf vf18 vf18 vf1 acc) - (.add.vf vf18 vf18 vf2 :mask #b111) + (.add.vf.xyz vf18 vf18 vf2) (b! #t cfg-24 :delay (.svf (&-> arg0 quad) vf18)) (nop!) (label cfg-3) (b! (nonzero? v1-4) cfg-6 :delay (set! v1-5 (+ v1-4 -1))) - (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 1) arg0) + (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 1) arg0) (goto cfg-24) (label cfg-6) (b! (nonzero? v1-5) cfg-9 :delay (set! v1-6 (+ v1-5 -1))) @@ -955,7 +955,7 @@ (goto cfg-24) (label cfg-9) (b! (nonzero? v1-6) cfg-14 :delay (set! v1-7 (+ v1-6 -1))) - (let ((f30-0 (vector-segment-distance-point! arg1 (-> arg2 vector 1) (the-as vector (-> arg2 vector)) arg0)) + (let ((f30-0 (vector-segment-distance-point! arg1 (-> arg2 vector 1) (-> arg2 vector 0) arg0)) (s3-0 (new 'stack-no-clear 'vector)) ) (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 1) (-> arg2 vector 2) s3-0) f30-0) @@ -965,20 +965,20 @@ (goto cfg-24) (label cfg-14) (b! (nonzero? v1-7) cfg-17 :delay (set! v1-10 (+ v1-7 -1))) - (vector-segment-distance-point! arg1 (-> arg2 vector 2) (the-as vector (-> arg2 vector)) arg0) + (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 0) arg0) (goto cfg-24) (label cfg-17) (b! (nonzero? v1-10) cfg-22 :delay (nop!)) - (let ((f30-1 (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 1) arg0)) + (let ((f30-1 (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 1) arg0)) (s3-1 (new 'stack-no-clear 'vector)) ) - (if (< (vector-segment-distance-point! arg1 (the-as vector (-> arg2 vector)) (-> arg2 vector 2) s3-1) f30-1) + (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 0) (-> arg2 vector 2) s3-1) f30-1) (set! (-> arg0 quad) (-> s3-1 quad)) ) ) (goto cfg-24) (label cfg-22) - (let ((f30-2 (vector-segment-distance-point! arg1 (-> arg2 vector 2) (the-as vector (-> arg2 vector)) arg0)) + (let ((f30-2 (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 0) arg0)) (s3-2 (new 'stack-no-clear 'vector)) ) (if (< (vector-segment-distance-point! arg1 (-> arg2 vector 2) (-> arg2 vector 1) s3-2) f30-2) @@ -1031,13 +1031,13 @@ (.mul.vf vf3 vf3 vf1) (.nop.vf) (.mul.vf vf4 vf4 vf1) - (.add.x.vf vf2 vf2 vf2 :mask #b10) - (.add.x.vf vf3 vf3 vf3 :mask #b10) - (.add.x.vf vf4 vf4 vf4 :mask #b10) + (.add.x.vf.y vf2 vf2 vf2) + (.add.x.vf.y vf3 vf3 vf3) + (.add.x.vf.y vf4 vf4 vf4) (.nop.vf) - (.add.z.vf vf2 vf2 vf2 :mask #b10) - (.add.z.vf vf3 vf3 vf3 :mask #b10) - (.add.z.vf vf4 vf4 vf4 :mask #b10) + (.add.z.vf.y vf2 vf2 vf2) + (.add.z.vf.y vf3 vf3 vf3) + (.add.z.vf.y vf4 vf4 vf4) (.nop.vf) (.mov a0-1 vf2) (.mov a1-1 vf3) @@ -1346,11 +1346,11 @@ (.sub.vf vf5 vf4 vf3) (.mul.x.vf vf1 vf1 vf2) (.mul.x.vf vf5 vf5 vf2) - (.mul.vf vf5 vf5 vf5 :mask #b101) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.mul.vf.xz vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.sqrt.vf Q vf5 :ftf #b0) (.wait.vf) - (.mul.vf vf1 vf0 Q :mask #b1000) + (.mul.vf.w vf1 vf0 Q) (.nop.vf) (.nop.vf) (.svf (&-> a1-2 quad) vf1) @@ -1581,7 +1581,7 @@ (.lvf vf6 (&-> s4-0 quad)) ) (.sll v1-8 v1-7 4) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf1 vf0 vf0) (let ((v1-9 (+ v1-8 (the-as int arg2)))) (nop!) (nop!) @@ -1595,11 +1595,11 @@ ) (.mul.x.vf acc vf2 vf6) (nop!) - (.add.mul.y.vf acc vf3 vf6 acc :mask #b111) + (.add.mul.y.vf.xyz acc vf3 vf6 acc) (nop!) - (.add.mul.z.vf acc vf4 vf6 acc :mask #b111) + (.add.mul.z.vf.xyz acc vf4 vf6 acc) (nop!) - (.add.mul.w.vf vf1 vf5 vf6 acc :mask #b111) + (.add.mul.w.vf.xyz vf1 vf5 vf6 acc) (nop!) (nop!) (nop!) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/eye_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/eye_REF.gc index 1eade3925b9..91c01a4e910 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/eye_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/eye_REF.gc @@ -1405,12 +1405,7 @@ ) (convert-eye-data s2-0 (-> s5-0 eye-anim data (* s0-1 2) dword)) (convert-eye-data s1-0 (-> s5-0 eye-anim data (* s3-2 2) dword)) - (vector4-lerp! - (the-as vector (-> s4-0 left)) - (the-as vector (-> s2-0 data)) - (the-as vector (-> s1-0 data)) - f30-0 - ) + (vector4-lerp! (the-as vector (-> s4-0 left)) (-> s2-0 data 0) (-> s1-0 data 0) f30-0) (vector4-lerp! (the-as vector (&-> s4-0 left iris-scale)) (the-as vector (&-> s2-0 iris-scale)) @@ -1420,12 +1415,7 @@ (convert-eye-data s2-0 (-> s5-0 eye-anim data (+ (* s0-1 2) 1) dword)) (convert-eye-data s1-0 (-> s5-0 eye-anim data (+ (* s3-2 2) 1) dword)) ) - (vector4-lerp! - (the-as vector (-> s4-0 right)) - (the-as vector (-> s2-0 data)) - (the-as vector (-> s1-0 data)) - f30-0 - ) + (vector4-lerp! (the-as vector (-> s4-0 right)) (-> s2-0 data 0) (-> s1-0 data 0) f30-0) (vector4-lerp! (the-as vector (&-> s4-0 right iris-scale)) (the-as vector (&-> s2-0 iris-scale)) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/lightning_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/lightning_REF.gc index 21c29b518ff..2d430e0ae80 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/lightning_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/lightning_REF.gc @@ -183,8 +183,8 @@ (.lvf vf4 (&-> v1-5 quad)) (.lvf vf5 (&-> a0-3 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-96 quad) vf6) (set! sv-112 (new 'stack-no-clear 'vector)) (let ((v1-9 (-> arg0 arg3)) @@ -193,8 +193,8 @@ (.lvf vf4 (&-> v1-9 quad)) (.lvf vf5 (&-> a0-5 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-112 quad) vf6) (set! sv-144 (new 'stack-no-clear 'vector)) (set! sv-128 (new 'stack-no-clear 'vector)) @@ -224,29 +224,29 @@ (let ((v1-31 sv-128) (a0-15 sv-128) ) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-96 quad)) (.lvf vf5 (&-> sv-112 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> a0-15 quad) vf6) (vector-float*! v1-31 a0-15 0.5) ) (let ((v1-33 sv-144)) (let ((a0-16 sv-144)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-16 quad)) ) (.lvf vf5 (&-> sv-128 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-33 quad) vf6) ) (let ((v1-35 (-> arg0 s0-0))) (let ((a0-19 (-> arg1 s0-0))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-19 quad)) ) (.lvf vf5 (&-> sv-144 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-35 quad) vf6) ) (lightning-trail-fractal-gen arg0 arg1 arg2 s0-0 (* arg4 (-> arg5 reduction)) arg5) @@ -411,7 +411,7 @@ (set! sv-36 (-> arg0 process 0 clock)) (when (not (or (= (-> sv-36 time-adjust-ratio) 0.0) (< gp-0 2))) (when (logtest? (-> sv-16 flags) (lightning-spec-flags size-from-adjust-dist)) - (let ((f1-1 (vector-vector-distance (the-as vector (-> sv-24 data)) (-> sv-24 data s4-0)))) + (let ((f1-1 (vector-vector-distance (-> sv-24 data 0) (-> sv-24 data s4-0)))) (set! (-> s5-0 box-size) (* (-> sv-16 box-size) (fmax 1.0 (fmin 5.0 (/ f1-1 (* 4096.0 (the float (-> sv-16 adjust-distance))))))) ) @@ -679,22 +679,22 @@ (let ((a2-45 f1-4)) (.mov vf17 a2-45) ) - (.add.x.vf vf17 vf0 vf8 :mask #b10) - (.add.w.vf vf17 vf0 vf0 :mask #b100) - (.add.w.vf vf17 vf17 vf0 :mask #b100) + (.add.x.vf.y vf17 vf0 vf8) + (.add.w.vf.z vf17 vf0 vf0) + (.add.w.vf.z vf17 vf17 vf0) (dotimes (a2-46 s3-0) (.lvf vf8 (&-> (the-as (inline-array vector) v1-73) 0 quad)) - (.mul.w.vf acc vf4 vf0 :mask #b111) - (.add.mul.x.vf acc vf1 vf8 acc :mask #b111) - (.add.mul.y.vf acc vf2 vf8 acc :mask #b111) - (.add.mul.z.vf vf8 vf3 vf8 acc :mask #b111) + (.mul.w.vf.xyz acc vf4 vf0) + (.add.mul.x.vf.xyz acc vf1 vf8 acc) + (.add.mul.y.vf.xyz acc vf2 vf8 acc) + (.add.mul.z.vf.xyz vf8 vf3 vf8 acc) (.add.x.vf vf6 vf8 vf0) (b! (zero? sv-64) cfg-44 :delay (.add.x.vf vf7 vf8 vf0)) - (.add.y.vf vf6 vf6 vf17 :mask #b10) - (b! #t cfg-45 :delay (.sub.y.vf vf7 vf7 vf17 :mask #b10)) + (.add.y.vf.y vf6 vf6 vf17) + (b! #t cfg-45 :delay (.sub.y.vf.y vf7 vf7 vf17)) (label cfg-44) - (.add.y.vf vf6 vf6 vf17 :mask #b1) - (.sub.y.vf vf7 vf7 vf17 :mask #b1) + (.add.y.vf.x vf6 vf6 vf17) + (.sub.y.vf.x vf7 vf7 vf17) (label cfg-45) (.svf (&-> (the-as (pointer uint128) a1-82) 2) vf6) (.svf (&-> (the-as (pointer uint128) a0-71) 2) vf7) @@ -740,8 +740,8 @@ (set! (-> sv-176 giftag num-strips) (the-as uint 1)) (set! (-> sv-176 num-dps) (the-as uint (* sv-144 2))) (set! (-> sv-176 kick-offset) (the-as uint 0)) - (adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-176 shader)) sv-32) - (adgif-shader-update! (the-as adgif-shader (-> sv-176 shader)) sv-32) + (adgif-shader<-texture-simple! (-> sv-176 shader 0 shader) sv-32) + (adgif-shader-update! (-> sv-176 shader 0 shader) sv-32) (set! (-> sv-176 shader 0 shader alpha) (new 'static 'gs-alpha :b #x2 :d #x1 :fix #x80)) (set! (-> sv-176 shader 0 shader tex0 tfx) 0) (set! (-> sv-176 shader 0 pos) (the-as uint 0)) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/emerc_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/emerc_REF.gc index 21c2363211f..3fe02a4b86a 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/emerc_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/emerc_REF.gc @@ -4,7 +4,7 @@ ;; definition for function emerc-vu1-initialize-chain ;; INFO: Used lq/sq (defun emerc-vu1-initialize-chain ((arg0 dma-gif-packet)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet arg0) emerc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> arg0 dma-vif) emerc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xb :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) @@ -48,7 +48,6 @@ ;; definition for function emerc-vu1-init-buffer ;; WARN: Return type mismatch int vs none. -;; ERROR: Failed store: (s.w! (+ a0-4 8) 0) at op 28 (defun emerc-vu1-init-buffer ((dma-bucket bucket-id) (test gs-test) (arg2 int)) (let ((bucket (-> *display* frames (-> *display* on-screen) bucket-group dma-bucket))) (when (!= bucket (-> bucket last)) diff --git a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc index 57e45cc7a29..03baa5cf11c 100644 --- a/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/foreground/merc/merc_REF.gc @@ -500,7 +500,7 @@ ;; definition for function merc-vu1-initialize-chain ;; INFO: Used lq/sq (defun merc-vu1-initialize-chain ((arg0 dma-gif-packet) (arg1 int)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet arg0) merc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> arg0 dma-vif) merc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc b/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc index 7056f548e6c..a9d08c29d5e 100644 --- a/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/math-camera_REF.gc @@ -387,10 +387,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) ) @@ -437,10 +437,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (vftoi4.xyzw vf28 vf28) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) @@ -487,10 +487,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) (.mov v0-0 vf23) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs2_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs2_REF.gc index 8247392ce9e..b0d22686ebe 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs2_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs2_REF.gc @@ -237,12 +237,7 @@ ) (let ((f0-5 (get-sphere-interp a0-10 a1-4 61440.0 69632.0))) (set-vector! (-> arg0 times 0) 1.0 1.0 1.0 1.0) - (vector-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* default-level mood-context times)) - f0-5 - ) + (vector-lerp! (-> arg0 times 0) (-> arg0 times 0) (-> *level* default-level mood-context times 0) f0-5) ) ) ) @@ -804,12 +799,7 @@ (set! (-> v1-67 r) 1.0) ) (let ((f0-76 (get-sphere-interp a0-121 a1-40 139264.0 24576.0))) - (vector-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* default-level mood-context times)) - f0-76 - ) + (vector-lerp! (-> arg0 times 0) (-> arg0 times 0) (-> *level* default-level mood-context times 0) f0-76) ) ) ) @@ -2364,8 +2354,8 @@ (let ((v1-10 s0-0)) (.lvf vf4 (&-> v0-1 quad)) (.lvf vf5 (&-> sv-80 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-10 quad) vf6) ) (vector-normalize! s0-0 1.0) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs_REF.gc index 966b50e85b4..ebf2b0b808e 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood-funcs_REF.gc @@ -1449,7 +1449,7 @@ (set! (-> v1-0 direction z) 0.707) (set! (-> v1-0 direction w) 1.0) ) - (vector-normalize! (the-as vector (-> s4-0 dir0)) 1.0) + (vector-normalize! (-> s4-0 dir0 direction) 1.0) (set-vector! (-> s4-0 dir0 color) 0.0 1.9921875 0.0 1.0) (set! (-> s4-0 dir0 extra x) 1.0) (set! (-> s4-0 ambi extra x) 0.0) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc index 71710bc1849..4cd72d1aec3 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood-tables2_REF.gc @@ -125,13 +125,13 @@ ) (dotimes (data-idx 8) (vector-float*! - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) + (-> *overide-table* mood-fog-table data data-idx fog-color) + (-> *overide-table* mood-fog-table data data-idx fog-color) (-> *overide-table* mood-fog-table data data-idx fog-color w) ) (vector-float*! - (the-as vector (-> *overide-table* mood-color-table data data-idx)) - (the-as vector (-> *overide-table* mood-color-table data data-idx)) + (-> *overide-table* mood-color-table data data-idx lgt-color) + (-> *overide-table* mood-color-table data data-idx lgt-color) (-> *overide-table* mood-color-table data data-idx lgt-color w) ) (vector-float*! diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc index cae9492d5f3..8cf69b0eee9 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/mood_REF.gc @@ -64,21 +64,21 @@ (.lvf vf1 (&-> arg0 times 0 quad)) (nop!) (.lvf vf2 (&-> arg0 times 1 quad)) - (.mul.w.vf vf1 vf1 vf1 :mask #b111) + (.mul.w.vf.xyz vf1 vf1 vf1) (.lvf vf3 (&-> arg0 times 2 quad)) - (.mul.w.vf vf2 vf2 vf2 :mask #b111) + (.mul.w.vf.xyz vf2 vf2 vf2) (.lvf vf4 (&-> arg0 times 3 quad)) - (.mul.w.vf vf3 vf3 vf3 :mask #b111) + (.mul.w.vf.xyz vf3 vf3 vf3) (.lvf vf5 (&-> arg0 times 4 quad)) - (.mul.w.vf vf4 vf4 vf4 :mask #b111) + (.mul.w.vf.xyz vf4 vf4 vf4) (.lvf vf6 (&-> arg0 times 5 quad)) - (.mul.w.vf vf5 vf5 vf5 :mask #b111) + (.mul.w.vf.xyz vf5 vf5 vf5) (.lvf vf7 (&-> arg0 times 6 quad)) - (.mul.w.vf vf6 vf6 vf6 :mask #b111) + (.mul.w.vf.xyz vf6 vf6 vf6) (.lvf vf8 (&-> arg0 times 7 quad)) - (.mul.w.vf vf7 vf7 vf7 :mask #b111) + (.mul.w.vf.xyz vf7 vf7 vf7) (nop!) - (.mul.w.vf vf8 vf8 vf8 :mask #b111) + (.mul.w.vf.xyz vf8 vf8 vf8) (nop!) (vftoi12.xyzw vf1 vf1) (nop!) @@ -480,7 +480,7 @@ (let ((s1-0 (-> arg0 times))) (set! sv-64 (-> arg0 times 1)) (let ((s0-0 (-> arg0 light-group))) - (vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) + (vector4-lerp! (-> s1-0 0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) (vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0) (set! (-> arg0 times 2 quad) (-> sv-64 quad)) (set! (-> arg0 times 3 quad) (-> sv-64 quad)) @@ -1350,8 +1350,8 @@ (dotimes (s4-0 8) (set-vector! s5-0 255.0 255.0 255.0 128.0) (vector4-lerp! - (the-as vector (-> this mood-fog-table data s4-0)) - (the-as vector (-> this mood-fog-table data s4-0)) + (-> this mood-fog-table data s4-0 fog-color) + (-> this mood-fog-table data s4-0 fog-color) s5-0 f30-0 ) diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/time-of-day_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/time-of-day_REF.gc index 6f9cc385459..753778a214e 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/time-of-day_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/time-of-day_REF.gc @@ -406,13 +406,13 @@ ) (dotimes (v1-7 8) (vector-float*! - (the-as vector (-> *overide-table* mood-fog-table data v1-7)) - (the-as vector (-> *overide-table* mood-fog-table data v1-7)) + (-> *overide-table* mood-fog-table data v1-7 fog-color) + (-> *overide-table* mood-fog-table data v1-7 fog-color) (-> *overide-table* mood-fog-table data v1-7 fog-color w) ) (vector-float*! - (the-as vector (-> *overide-table* mood-color-table data v1-7)) - (the-as vector (-> *overide-table* mood-color-table data v1-7)) + (-> *overide-table* mood-color-table data v1-7 lgt-color) + (-> *overide-table* mood-color-table data v1-7 lgt-color) (-> *overide-table* mood-color-table data v1-7 lgt-color w) ) (vector-float*! diff --git a/test/decompiler/reference/jak2/engine/gfx/mood/weather-part_REF.gc b/test/decompiler/reference/jak2/engine/gfx/mood/weather-part_REF.gc index b9ed426d3ac..8f470b7fe9c 100644 --- a/test/decompiler/reference/jak2/engine/gfx/mood/weather-part_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/mood/weather-part_REF.gc @@ -548,14 +548,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-7 vf1) ) @@ -641,7 +641,7 @@ 0.0 ) (set-vector! (-> gp-0 vector 2) 0.0 0.0 1.0 0.0) - (vector-cross! (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1) (-> gp-0 vector 2)) + (vector-cross! (-> gp-0 vector 0) (-> gp-0 vector 1) (-> gp-0 vector 2)) (set! (-> gp-0 trans quad) (-> s4-0 quad)) (set! (-> *part-id-table* 62 init-specs 23 initial-valuef) (vector-y-angle (-> gp-0 vector 1))) (set! (-> *part-id-table* 62 init-specs 22 initial-valuef) (- 16384.0 (vector-x-angle (-> gp-0 vector 1)))) diff --git a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-mid_REF.gc b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-mid_REF.gc index c3db5a1be42..8fcc1e091e5 100644 --- a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-mid_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-mid_REF.gc @@ -455,8 +455,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-3 vf1) (when (< t0-3 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -471,8 +471,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-8 vf1) (when (< t0-8 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -487,8 +487,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-13 vf1) (when (< t0-13 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -500,8 +500,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (when (< v1-10 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-transition_REF.gc b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-transition_REF.gc index cc60723f683..76490cce426 100644 --- a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-transition_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean-transition_REF.gc @@ -432,8 +432,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-3 vf1) (when (< t0-3 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -448,8 +448,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-8 vf1) (when (< t0-8 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -464,8 +464,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-13 vf1) (when (< t0-13 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -477,8 +477,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-13 vf1) (when (< v1-13 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean_REF.gc b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean_REF.gc index 2ea5ca5c398..2a6ce41ecb1 100644 --- a/test/decompiler/reference/jak2/engine/gfx/ocean/ocean_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/ocean/ocean_REF.gc @@ -1230,7 +1230,7 @@ (a2-6 (-> *level* default-level mood-context times)) ) (set! (-> s2-0 quad) (-> this sky-color quad)) - (vector4-lerp! s2-0 s2-0 (the-as vector a2-6) f0-0) + (vector4-lerp! s2-0 s2-0 (-> a2-6 0) f0-0) ) (let ((s1-0 (new 'stack-no-clear 'vector4)) (s3-0 (new 'stack-no-clear 'vector)) @@ -1243,14 +1243,14 @@ (.lvf vf16 (&-> this constant quad)) (.lvf vf3 (&-> s2-0 quad)) (.lvf vf4 (&-> s1-0 quad)) - (.sub.vf vf16 vf0 vf16 :mask #b1000) + (.sub.vf.w vf16 vf0 vf16) (let ((f3-0 48.0)) (.lvf vf7 (&-> this haze-lights sun0-normal quad)) (.lvf vf8 (&-> this haze-lights sun1-normal quad)) (.lvf vf9 (&-> this haze-lights moon-normal quad)) - (.sub.vf vf7 vf0 vf7 :mask #b101) - (.sub.vf vf8 vf0 vf8 :mask #b101) - (.sub.vf vf9 vf0 vf9 :mask #b101) + (.sub.vf.xz vf7 vf0 vf7) + (.sub.vf.xz vf8 vf0 vf8) + (.sub.vf.xz vf9 vf0 vf9) (.lvf vf10 (&-> this haze-lights sun0-color quad)) (.lvf vf11 (&-> this haze-lights sun1-color quad)) (.lvf vf12 (&-> this haze-lights moon-color quad)) @@ -1280,26 +1280,26 @@ ) (.lvf vf5 (&-> s3-0 quad)) (.sub.vf vf6 vf4 vf5) - (.mul.vf vf13 vf6 vf6 :mask #b111) - (.mul.x.vf acc vf1 vf13 :mask #b1) - (.add.mul.y.vf acc vf1 vf13 acc :mask #b1) - (.add.mul.z.vf vf13 vf1 vf13 acc :mask #b1) + (.mul.vf.xyz vf13 vf6 vf6) + (.mul.x.vf.x acc vf1 vf13) + (.add.mul.y.vf.x acc vf1 vf13 acc) + (.add.mul.z.vf.x vf13 vf1 vf13 acc) (.isqrt.vf Q vf0 vf13 :fsf #b11 :ftf #b0) (.wait.vf) (.mul.vf vf6 vf6 Q) (.mul.vf vf13 vf7 vf6) (.mul.vf vf14 vf8 vf6) (.mul.vf vf15 vf9 vf6) - (.mul.x.vf acc vf1 vf13 :mask #b1) - (.add.mul.y.vf acc vf1 vf13 acc :mask #b1) - (.add.mul.z.vf vf13 vf1 vf13 acc :mask #b1) - (.mul.x.vf acc vf1 vf14 :mask #b1) - (.add.mul.y.vf acc vf1 vf14 acc :mask #b1) - (.add.mul.z.vf vf14 vf1 vf14 acc :mask #b1) + (.mul.x.vf.x acc vf1 vf13) + (.add.mul.y.vf.x acc vf1 vf13 acc) + (.add.mul.z.vf.x vf13 vf1 vf13 acc) + (.mul.x.vf.x acc vf1 vf14) + (.add.mul.y.vf.x acc vf1 vf14 acc) + (.add.mul.z.vf.x vf14 vf1 vf14 acc) (.max.vf vf13 vf13 vf0) - (.mul.x.vf acc vf1 vf15 :mask #b1) - (.add.mul.y.vf acc vf1 vf15 acc :mask #b1) - (.add.mul.z.vf vf15 vf1 vf15 acc :mask #b1) + (.mul.x.vf.x acc vf1 vf15) + (.add.mul.y.vf.x acc vf1 vf15 acc) + (.add.mul.z.vf.x vf15 vf1 vf15 acc) (.max.vf vf14 vf14 vf0) (.max.vf vf15 vf15 vf0) (.mul.vf vf13 vf13 vf13) diff --git a/test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc b/test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc index 013a2a2a3d1..0d71ad23ef7 100644 --- a/test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc @@ -483,7 +483,7 @@ (haze-vtx-to-sky this (-> sv-20 (+ (* s3-0 4) 3)) (-> sv-20 (+ (* s3-0 4) 2)) (-> sv-16 data (+ s3-0 1))) ) (haze-vtx-to-sky this (-> sv-20 140) (-> sv-20 141) (-> sv-16 data 35)) - (haze-vtx-to-sky this (-> sv-20 143) (-> sv-20 142) (the-as haze-vertex (-> sv-16 data))) + (haze-vtx-to-sky this (-> sv-20 143) (-> sv-20 142) (-> sv-16 data 0)) (dotimes (s5-1 36) (render-sky-quad (the-as (inline-array sky-vertex) (-> sv-20 (* s5-1 4))) arg0) ) @@ -517,9 +517,9 @@ (defmethod setup-stars ((this sky-work) (arg0 matrix) (arg1 sky-upload-data)) (set! (-> arg0 vector 2 quad) (-> arg1 data 0)) (vector-normalize! (-> arg0 vector 2) 1.0) - (vector-cross! (the-as vector (-> arg0 vector)) *z-vector* (-> arg0 vector 2)) - (vector-normalize! (the-as vector (-> arg0 vector)) 1.0) - (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (the-as vector (-> arg0 vector))) + (vector-cross! (-> arg0 vector 0) *z-vector* (-> arg0 vector 2)) + (vector-normalize! (-> arg0 vector 0) 1.0) + (vector-cross! (-> arg0 vector 1) (-> arg0 vector 2) (-> arg0 vector 0)) (vector-normalize! (-> arg0 vector 1) 1.0) (let ((s4-1 (new 'stack-no-clear 'vector))) (set! (-> s4-1 quad) (-> arg1 data 0)) diff --git a/test/decompiler/reference/jak2/engine/gfx/sprite/particles/sparticle-launcher_REF.gc b/test/decompiler/reference/jak2/engine/gfx/sprite/particles/sparticle-launcher_REF.gc index 8ef46b4feb7..5032352e3ad 100644 --- a/test/decompiler/reference/jak2/engine/gfx/sprite/particles/sparticle-launcher_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/sprite/particles/sparticle-launcher_REF.gc @@ -543,13 +543,13 @@ ) (let ((s0-0 (new 'stack-no-clear 'vector))) (sp-init-fields! - (the-as (pointer float) (-> s2-0 vector)) + (&-> s2-0 vector 0 x) arg2 (sp-field-id launch-fields-start) (sp-field-id launch-fields-end) #t ) - (matrix-rotate-xyz! s5-0 (the-as vector (-> s2-0 vector))) + (matrix-rotate-xyz! s5-0 (-> s2-0 vector 0)) (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) (matrix-rotate-xyz! s5-0 (-> s2-0 vector 1)) (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) @@ -561,7 +561,7 @@ (+! (-> arg0 launchrot z) (-> s0-0 z)) ) (when (logtest? (sp-cpuinfo-flag sp-cpuinfo-flag-21) (-> arg1 flags)) - (set! (-> arg0 launchrot w) (* (-> arg0 launchrot w) (vector-length (the-as vector (-> arg3 vector))))) + (set! (-> arg0 launchrot w) (* (-> arg0 launchrot w) (vector-length (-> arg3 vector 0)))) (set! (-> arg0 conerot w) (* (-> arg0 conerot w) (vector-length (-> arg3 vector 1)))) ) (matrix-rotate-xyz! s5-0 (-> s2-0 vector 2)) @@ -605,14 +605,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-1 vf1) ) (else (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-2 vf1) ) @@ -749,7 +749,7 @@ ) (let* ((a1-2 (-> arg1 init-specs 0)) (a1-3 (sp-init-fields! - (the-as (pointer float) (-> s5-0 vector)) + (&-> s5-0 vector 0 x) (the-as (inline-array sp-field-init-spec) a1-2) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -763,8 +763,8 @@ (set! (-> s5-0 vector 1 z) (the float (sar (shl (the int (-> s5-0 vector 1 z)) 48) 48))) (.lvf vf4 (&-> s5-0 quad 2)) (.lvf vf5 (&-> s5-0 quad 0)) - (.min.x.vf vf4 vf4 vf31 :mask #b111) - (.add.vf vf5 vf5 vf30 :mask #b111) + (.min.x.vf.xyz vf4 vf4 vf31) + (.add.vf.xyz vf5 vf5 vf30) (.svf (&-> s5-0 quad 2) vf4) (.svf (&-> s5-0 quad 0) vf5) (when (not *death-adgif*) @@ -791,8 +791,8 @@ (.lvf vf4 (&-> (-> *time-of-day-context* current-prt-color) quad)) (.lvf vf5 (&-> s5-0 quad 2)) (.lvf vf6 (&-> gp-0 fade quad)) - (.mul.vf vf5 vf5 vf4 :mask #b111) - (.mul.vf vf6 vf6 vf4 :mask #b111) + (.mul.vf.xyz vf5 vf5 vf4) + (.mul.vf.xyz vf6 vf6 vf4) (.svf (&-> s5-0 quad 2) vf5) (.svf (&-> gp-0 fade quad) vf6) (.mov v1-26 vf6) @@ -804,7 +804,7 @@ (.lvf vf3 (&-> s5-0 quad 2)) (.svf (&-> v1-27 x-y-z-sx quad) vf1) (.svf (&-> v1-27 flag-rot-sy quad) vf2) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (.svf (&-> v1-27 r-g-b-a quad) vf3) ) (.mov v1-28 vf3) @@ -864,7 +864,7 @@ (set! (-> arg2 fade y) 99999.0) (set! (-> arg2 fade z) 99999.0) (let ((a1-2 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) (the-as (inline-array sp-field-init-spec) a1-1) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -905,7 +905,7 @@ ) (else (let ((a1-3 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) (the-as (inline-array sp-field-init-spec) a1-1) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -985,14 +985,14 @@ ((< (-> s3-0 w) 0.0) (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-9 vf1) ) (else (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-10 vf1) ) @@ -1620,14 +1620,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-1 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-2 vf1) ) @@ -1670,14 +1670,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) (else (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) @@ -1737,14 +1737,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) (.mov v1-18 vf1) ) (else (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) (.mov v1-19 vf1) ) @@ -2193,7 +2193,7 @@ ;; definition for function birth-func-ocean-height ;; WARN: Return type mismatch int vs none. (defun birth-func-ocean-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! (-> arg2 vector 0 y) (+ (get-height *ocean* (the-as vector (-> arg2 vector)) #t) (-> arg1 user-float))) + (set! (-> arg2 vector 0 y) (+ (get-height *ocean* (-> arg2 vector 0) #t) (-> arg1 user-float))) 0 (none) ) @@ -2219,14 +2219,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-1 vf1) ) @@ -2256,14 +2256,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/sprite/sprite-distort_REF.gc b/test/decompiler/reference/jak2/engine/gfx/sprite/sprite-distort_REF.gc index 272ca24db70..053679d386e 100644 --- a/test/decompiler/reference/jak2/engine/gfx/sprite/sprite-distort_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/sprite/sprite-distort_REF.gc @@ -222,11 +222,11 @@ (TODO.VCLIP vf10 vf10) (b! (zero? (-> sprite flag-rot-sy x)) cfg-22 :delay (nop!)) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) + (.mul.vf.xyz vf2 vf2 Q) (.cfc2.i clip-result Clipping) (b! (logtest? clip-result 63) cfg-22 :delay (.add.vf vf1 vf1 vf9)) - (.max.x.vf vf1 vf1 vf0 :mask #b1000) + (.max.x.vf.w vf1 vf1 vf0) (.svf (&-> (the-as vector dma-position) quad) vf1) (.svf (&-> (the-as vector dma-color) quad) vf2) (set! (-> (the-as vector dma-position) w) 255.0) diff --git a/test/decompiler/reference/jak2/engine/gfx/sprite/sprite_REF.gc b/test/decompiler/reference/jak2/engine/gfx/sprite/sprite_REF.gc index e117ff6f6c1..6e3e49351b2 100644 --- a/test/decompiler/reference/jak2/engine/gfx/sprite/sprite_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/sprite/sprite_REF.gc @@ -490,14 +490,14 @@ ((< (-> quat w) 0.0) (.lvf vf1 (&-> sprite qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> sprite qx-qy-qz-sy quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> sprite qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> sprite qx-qy-qz-sy quad) vf1) (.mov v1-1 vf1) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim_REF.gc index b60b577a4b0..60452cdb5e6 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim_REF.gc @@ -304,14 +304,14 @@ (.add.mul.y.vf acc vf16 vf10 acc) (.add.mul.w.vf vf10 vf18 vf0 acc) (vftoi4.xyzw vf6 vf6) - (.add.x.vf vf7 vf0 vf19 :mask #b100) - (.add.y.vf vf8 vf0 vf19 :mask #b100) - (.add.z.vf vf9 vf0 vf19 :mask #b100) - (.add.w.vf vf10 vf0 vf19 :mask #b100) - (.mul.z.vf vf7 vf7 vf7 :mask #b11) - (.mul.z.vf vf8 vf8 vf8 :mask #b11) - (.mul.z.vf vf9 vf9 vf9 :mask #b11) - (.mul.z.vf vf10 vf10 vf10 :mask #b11) + (.add.x.vf.z vf7 vf0 vf19) + (.add.y.vf.z vf8 vf0 vf19) + (.add.z.vf.z vf9 vf0 vf19) + (.add.w.vf.z vf10 vf0 vf19) + (.mul.z.vf.xy vf7 vf7 vf7) + (.mul.z.vf.xy vf8 vf8 vf8) + (.mul.z.vf.xy vf9 vf9 vf9) + (.mul.z.vf.xy vf10 vf10 vf10) (.svf (&-> s4-0 3) vf7) (.svf (&-> s4-0 4) vf3) (.svf (&-> s4-0 5) vf8) diff --git a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc index 2791006ce6c..3acda8aef34 100644 --- a/test/decompiler/reference/jak2/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/bsp_REF.gc @@ -418,16 +418,16 @@ (let ((nodes (the-as object (-> arg0 nodes)))) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg0 bsp-offset quad)) - (.sub.vf vf1 vf1 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf1 vf2) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b1) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b10) + (.mul.vf.y vf1 vf1 Q) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b10) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b100) + (.mul.vf.z vf1 vf1 Q) (let ((a1-1 #xffffff) (nidx (the-as object 0)) ) diff --git a/test/decompiler/reference/jak2/engine/level/region_REF.gc b/test/decompiler/reference/jak2/engine/level/region_REF.gc index 3ad1c451aac..3abc7cd57b6 100644 --- a/test/decompiler/reference/jak2/engine/level/region_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/region_REF.gc @@ -661,8 +661,8 @@ (set! (-> *level* target-pos 1 quad) (-> *level* target-pos 0 quad)) (set! (-> *level* target-pos 0 quad) (-> (target-pos 0) quad)) (when (and *execute-regions* (-> *setting-control* user-current region-mode) (not (paused?))) - (region-tree-execute 'camera (-> *level* camera-pos 1) (the-as vector (-> *level* camera-pos))) - (region-tree-execute 'target (-> *level* target-pos 1) (the-as vector (-> *level* target-pos))) + (region-tree-execute 'camera (-> *level* camera-pos 1) (-> *level* camera-pos 0)) + (region-tree-execute 'target (-> *level* target-pos 1) (-> *level* target-pos 0)) ) 0 (none) diff --git a/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc b/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc index 50df6762e15..dcd2abcf98a 100644 --- a/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc +++ b/test/decompiler/reference/jak2/engine/load/load-dgo_REF.gc @@ -136,7 +136,7 @@ (set! (-> s2-0 address) dest-addr) (set! (-> s2-0 section) (the-as uint chunk-idx)) (set! (-> s2-0 maxlen) (the-as uint max-len)) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename)) name 48) + (copyn-charp<-string (-> s2-0 basename name) name 48) (call *load-str-rpc* (the-as uint 0) (the-as pointer s2-0) (the-as uint 32)) ) (set! *load-str-lock* #t) @@ -179,10 +179,10 @@ "Start playing a streaming audio." (set! *que-str-lock* #t) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) arg0 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) arg0 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) (set! (-> s4-0 id 0) (the-as uint arg1)) (set! (-> s4-0 id 1) (the-as uint 0)) (set! (-> s4-0 id 2) (the-as uint 0)) @@ -200,10 +200,10 @@ "Stop playing streaming audio." (set! *que-str-lock* #t) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) name 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) name 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) (set! (-> s4-0 id 0) (the-as uint id)) (set! (-> s4-0 id 1) (the-as uint 0)) (set! (-> s4-0 id 2) (the-as uint 0)) @@ -221,20 +221,20 @@ (when (and (not (check-busy *play-str-rpc*)) (not *load-str-lock*) (not *que-str-lock*)) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) (if arg0 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) arg0 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) arg0 48) + (copyn-charp<-string (-> s4-0 basename 0 name) "" 48) ) (if arg1 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) arg1 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) + (copyn-charp<-string (-> s4-0 basename 1 name) arg1 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) ) (if arg2 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) arg2 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) arg2 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) ) (if arg3 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) arg3 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) arg3 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) ) (dotimes (v1-15 4) (set! (-> s4-0 id v1-15) (-> arg4 v1-15)) diff --git a/test/decompiler/reference/jak2/engine/load/loader_REF.gc b/test/decompiler/reference/jak2/engine/load/loader_REF.gc index bad6b360a45..79ca76486a5 100644 --- a/test/decompiler/reference/jak2/engine/load/loader_REF.gc +++ b/test/decompiler/reference/jak2/engine/load/loader_REF.gc @@ -618,7 +618,7 @@ (set! (-> s4-4 length) 0) (dotimes (s3-2 3) (when (-> this rec s3-2 name) - (mem-copy! (&-> (-> s4-4 (-> s4-4 length)) type) (&-> (-> this rec s3-2) type) 44) + (mem-copy! (&-> s4-4 (-> s4-4 length) type) (&-> this rec s3-2 type) 44) (+! (-> s4-4 length) 1) ) ) @@ -749,8 +749,8 @@ (if (>= arg3 (-> this rec 0 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec) 0 type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 0 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -758,7 +758,7 @@ (if (>= arg3 (-> this rec 1 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -772,15 +772,15 @@ ) (cond ((< arg3 (-> this rec 0 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec) 0 type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 0 type) 44) (set! (-> this rec 0 name) arg0) (set! (-> this rec 0 parts) arg1) (set! (-> this rec 0 priority) arg3) (set! (-> this rec 0 owner) (process->handle arg2)) ) ((< arg3 (-> this rec 1 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) (set! (-> this rec 1 name) arg0) (set! (-> this rec 1 parts) arg1) (set! (-> this rec 1 priority) arg3) @@ -1770,7 +1770,7 @@ (cond (gp-0 (dotimes (s4-0 4) - (when (and (string-charp= (-> gp-0 name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s4-0))) + (when (and (string-charp= (-> gp-0 name) (-> *sound-iop-info* stream-name s4-0 name)) (or (= (-> gp-0 id) (-> *sound-iop-info* stream-id s4-0)) (zero? (-> *sound-iop-info* stream-id s4-0))) (logtest? (-> *sound-iop-info* stream-status s4-0) (stream-status ststatus-one ststatus-six)) (if (and (>= (the-as uint (-> gp-0 channel)) (the-as uint 16)) @@ -2266,7 +2266,7 @@ ) (begin (dotimes (s3-0 4) - (when (and (string-charp= (-> arg0 name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s3-0))) + (when (and (string-charp= (-> arg0 name) (-> *sound-iop-info* stream-name s3-0 name)) (= (-> arg0 id) (-> *sound-iop-info* stream-id s3-0)) (logtest? (-> *sound-iop-info* stream-status s3-0) (stream-status ststatus-six)) ) diff --git a/test/decompiler/reference/jak2/engine/math/math_REF.gc b/test/decompiler/reference/jak2/engine/math/math_REF.gc index 8cc4ced3179..42ba656aa1f 100644 --- a/test/decompiler/reference/jak2/engine/math/math_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/math_REF.gc @@ -478,7 +478,7 @@ (init-vf0-vector) (TODO.VRGET vf1) (.sqrt.vf Q vf1 :ftf #b0) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (TODO.VRXOR vf2) (TODO.VRNEXT vf1) (.sub.w.vf vf1 vf1 vf0) diff --git a/test/decompiler/reference/jak2/engine/math/matrix_REF.gc b/test/decompiler/reference/jak2/engine/math/matrix_REF.gc index 135926b5038..9358d2e7038 100644 --- a/test/decompiler/reference/jak2/engine/math/matrix_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/matrix_REF.gc @@ -295,15 +295,15 @@ (.lvf vf1 (&-> arg0 quad 0)) (.lvf vf2 (&-> arg0 quad 1)) (.lvf vf3 (&-> arg0 quad 2)) - (.sub.vf vf1 vf1 vf1 :mask #b1000) - (.sub.vf vf2 vf2 vf2 :mask #b1000) - (.sub.vf vf3 vf3 vf3 :mask #b1000) + (.sub.vf.w vf1 vf1 vf1) + (.sub.vf.w vf2 vf2 vf2) + (.sub.vf.w vf3 vf3 vf3) (.lvf vf8 (&-> arg1 trans quad)) (.mul.x.vf acc vf1 vf8) (.add.mul.y.vf acc vf2 vf8 acc) (.add.mul.z.vf vf4 vf3 vf8 acc) (.sub.vf vf4 vf0 vf4) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.svf (&-> arg0 quad 0) vf1) (.svf (&-> arg0 quad 1) vf2) (.svf (&-> arg0 quad 2) vf3) @@ -380,87 +380,87 @@ (nop!) (.mul.z.vf vf15 vf25 vf24) (nop!) - (.mul.z.vf vf26 vf7 vf25 :mask #b10) + (.mul.z.vf.y vf26 vf7 vf25) (nop!) - (.mul.z.vf vf27 vf11 vf24 :mask #b1) + (.mul.z.vf.x vf27 vf11 vf24) (nop!) - (.mul.y.vf vf28 vf9 vf25 :mask #b1) + (.mul.y.vf.x vf28 vf9 vf25) (nop!) - (.mul.z.vf vf29 vf14 vf23 :mask #b1) + (.mul.z.vf.x vf29 vf14 vf23) (nop!) - (.mul.z.vf vf30 vf8 vf25 :mask #b1) + (.mul.z.vf.x vf30 vf8 vf25) (nop!) - (.mul.y.vf vf31 vf7 vf25 :mask #b100) + (.mul.y.vf.z vf31 vf7 vf25) (nop!) - (.add.y.vf vf16 vf27 vf26 :mask #b1) + (.add.y.vf.x vf16 vf27 vf26) (nop!) (.sub.vf vf1 vf0 vf1) (nop!) - (.add.x.vf vf17 vf29 vf30 :mask #b1) + (.add.x.vf.x vf17 vf29 vf30) (nop!) - (.sub.z.vf vf18 vf28 vf31 :mask #b1) + (.sub.z.vf.x vf18 vf28 vf31) (nop!) - (.sub.y.vf vf23 vf14 vf15 :mask #b100) + (.sub.y.vf.z vf23 vf14 vf15) (nop!) - (.sub.z.vf vf26 vf15 vf13 :mask #b1) + (.sub.z.vf.x vf26 vf15 vf13) (nop!) - (.sub.x.vf vf29 vf13 vf14 :mask #b10) + (.sub.x.vf.y vf29 vf13 vf14) (nop!) - (.sub.vf vf19 vf16 vf17 :mask #b1) + (.sub.vf.x vf19 vf16 vf17) (nop!) - (.sub.z.vf vf24 vf12 vf11 :mask #b10) + (.sub.z.vf.y vf24 vf12 vf11) (nop!) - (.sub.x.vf vf27 vf10 vf12 :mask #b100) + (.sub.x.vf.z vf27 vf10 vf12) (nop!) - (.sub.y.vf vf30 vf11 vf10 :mask #b1) + (.sub.y.vf.x vf30 vf11 vf10) (nop!) - (.add.vf vf20 vf19 vf18 :mask #b1) + (.add.vf.x vf20 vf19 vf18) (nop!) - (.sub.y.vf vf25 vf8 vf9 :mask #b100) + (.sub.y.vf.z vf25 vf8 vf9) (nop!) - (.sub.z.vf vf28 vf9 vf7 :mask #b1) + (.sub.z.vf.x vf28 vf9 vf7) (nop!) - (.sub.x.vf vf31 vf7 vf8 :mask #b10) + (.sub.x.vf.y vf31 vf7 vf8) (nop!) (.div.vf Q vf0 vf20 :fsf #b11 :ftf #b0) (nop!) - (.sub.w.vf vf3 vf3 vf3 :mask #b1000) + (.sub.w.vf.w vf3 vf3 vf3) (nop!) - (.sub.w.vf vf4 vf4 vf4 :mask #b1000) + (.sub.w.vf.w vf4 vf4 vf4) (nop!) - (.sub.w.vf vf5 vf5 vf5 :mask #b1000) + (.sub.w.vf.w vf5 vf5 vf5) (nop!) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (nop!) (.wait.vf) (nop!) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (nop!) - (.add.x.vf vf2 vf0 vf2 :mask #b111) + (.add.x.vf.xyz vf2 vf0 vf2) (nop!) - (.mul.z.vf vf3 vf2 vf23 :mask #b1) + (.mul.z.vf.x vf3 vf2 vf23) (nop!) - (.mul.x.vf vf4 vf2 vf26 :mask #b1) + (.mul.x.vf.x vf4 vf2 vf26) (nop!) - (.mul.y.vf vf5 vf2 vf29 :mask #b1) + (.mul.y.vf.x vf5 vf2 vf29) (nop!) - (.mul.y.vf vf3 vf2 vf24 :mask #b10) + (.mul.y.vf.y vf3 vf2 vf24) (nop!) - (.mul.z.vf vf4 vf2 vf27 :mask #b10) + (.mul.z.vf.y vf4 vf2 vf27) (nop!) - (.mul.x.vf vf5 vf2 vf30 :mask #b10) + (.mul.x.vf.y vf5 vf2 vf30) (nop!) - (.mul.z.vf vf3 vf2 vf25 :mask #b100) + (.mul.z.vf.z vf3 vf2 vf25) (nop!) - (.mul.x.vf vf4 vf2 vf28 :mask #b100) + (.mul.x.vf.z vf4 vf2 vf28) (nop!) - (.mul.y.vf vf5 vf2 vf31 :mask #b100) + (.mul.y.vf.z vf5 vf2 vf31) (nop!) (.mul.x.vf acc vf3 vf1) (.svf (&-> arg0 quad 0) vf3) (.add.mul.y.vf acc vf4 vf1 acc) (.svf (&-> arg0 quad 1) vf4) - (.add.mul.z.vf vf6 vf5 vf1 acc :mask #b111) + (.add.mul.z.vf.xyz vf6 vf5 vf1 acc) (.svf (&-> arg0 quad 2) vf5) (nop!) (.svf (&-> arg0 trans quad) vf6) @@ -849,52 +849,52 @@ (let ((v1-1 (logior a3-2 a1-1))) (.mov vf5 arg2) (let ((v1-2 (+ v1-1 1))) - (.sub.x.vf vf5 vf0 vf6 :mask #b1000) - (b! (zero? v1-2) cfg-2 :delay (.add.x.vf vf5 vf0 vf6 :mask #b10)) + (.sub.x.vf.w vf5 vf0 vf6) + (b! (zero? v1-2) cfg-2 :delay (.add.x.vf.y vf5 vf0 vf6)) ) ) ) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (nop!) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (nop!) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (nop!) - (.mul.x.vf vf11 vf1 vf5 :mask #b111) + (.mul.x.vf.xyz vf11 vf1 vf5) (nop!) - (.add.y.vf vf7 vf0 vf5 :mask #b1) + (.add.y.vf.x vf7 vf0 vf5) (nop!) - (.add.y.vf vf8 vf0 vf5 :mask #b10) + (.add.y.vf.y vf8 vf0 vf5) (nop!) - (.add.y.vf vf9 vf0 vf5 :mask #b100) + (.add.y.vf.z vf9 vf0 vf5) (nop!) - (.mul.w.vf vf10 vf1 vf5 :mask #b111) + (.mul.w.vf.xyz vf10 vf1 vf5) (nop!) - (.sub.z.vf vf7 vf0 vf11 :mask #b10) + (.sub.z.vf.y vf7 vf0 vf11) (nop!) - (.add.y.vf vf7 vf0 vf11 :mask #b100) + (.add.y.vf.z vf7 vf0 vf11) (nop!) - (.add.z.vf vf8 vf0 vf11 :mask #b1) + (.add.z.vf.x vf8 vf0 vf11) (nop!) - (.sub.x.vf vf8 vf0 vf11 :mask #b100) + (.sub.x.vf.z vf8 vf0 vf11) (nop!) - (.mul.x.vf vf2 vf10 vf1 :mask #b111) + (.mul.x.vf.xyz vf2 vf10 vf1) (nop!) - (.mul.y.vf vf3 vf10 vf1 :mask #b111) + (.mul.y.vf.xyz vf3 vf10 vf1) (nop!) - (.mul.z.vf vf4 vf10 vf1 :mask #b111) + (.mul.z.vf.xyz vf4 vf10 vf1) (nop!) - (.sub.y.vf vf9 vf0 vf11 :mask #b1) + (.sub.y.vf.x vf9 vf0 vf11) (nop!) - (.add.x.vf vf9 vf0 vf11 :mask #b10) + (.add.x.vf.y vf9 vf0 vf11) (nop!) - (.add.vf vf2 vf2 vf7 :mask #b111) + (.add.vf.xyz vf2 vf2 vf7) (nop!) - (.add.vf vf3 vf3 vf8 :mask #b111) + (.add.vf.xyz vf3 vf3 vf8) (nop!) (nop!) (nop!) - (.add.vf vf4 vf4 vf9 :mask #b111) + (.add.vf.xyz vf4 vf4 vf9) (nop!) (nop!) (.svf (&-> arg0 quad 0) vf2) @@ -968,53 +968,53 @@ (.mov vf5 a0-3) ) (let ((v1-3 (+ v1-2 1))) - (.sub.x.vf vf5 vf0 vf6 :mask #b1000) - (b! (zero? v1-3) cfg-2 :delay (.add.x.vf vf5 vf0 vf6 :mask #b10)) + (.sub.x.vf.w vf5 vf0 vf6) + (b! (zero? v1-3) cfg-2 :delay (.add.x.vf.y vf5 vf0 vf6)) ) ) ) ) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (nop!) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (nop!) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (nop!) - (.mul.x.vf vf11 vf1 vf5 :mask #b111) + (.mul.x.vf.xyz vf11 vf1 vf5) (nop!) - (.add.y.vf vf7 vf0 vf5 :mask #b1) + (.add.y.vf.x vf7 vf0 vf5) (nop!) - (.add.y.vf vf8 vf0 vf5 :mask #b10) + (.add.y.vf.y vf8 vf0 vf5) (nop!) - (.add.y.vf vf9 vf0 vf5 :mask #b100) + (.add.y.vf.z vf9 vf0 vf5) (nop!) - (.mul.w.vf vf10 vf1 vf5 :mask #b111) + (.mul.w.vf.xyz vf10 vf1 vf5) (nop!) - (.sub.z.vf vf7 vf0 vf11 :mask #b10) + (.sub.z.vf.y vf7 vf0 vf11) (nop!) - (.add.y.vf vf7 vf0 vf11 :mask #b100) + (.add.y.vf.z vf7 vf0 vf11) (nop!) - (.add.z.vf vf8 vf0 vf11 :mask #b1) + (.add.z.vf.x vf8 vf0 vf11) (nop!) - (.sub.x.vf vf8 vf0 vf11 :mask #b100) + (.sub.x.vf.z vf8 vf0 vf11) (nop!) - (.mul.x.vf vf2 vf10 vf1 :mask #b111) + (.mul.x.vf.xyz vf2 vf10 vf1) (nop!) - (.mul.y.vf vf3 vf10 vf1 :mask #b111) + (.mul.y.vf.xyz vf3 vf10 vf1) (nop!) - (.mul.z.vf vf4 vf10 vf1 :mask #b111) + (.mul.z.vf.xyz vf4 vf10 vf1) (nop!) - (.sub.y.vf vf9 vf0 vf11 :mask #b1) + (.sub.y.vf.x vf9 vf0 vf11) (nop!) - (.add.x.vf vf9 vf0 vf11 :mask #b10) + (.add.x.vf.y vf9 vf0 vf11) (nop!) - (.add.vf vf2 vf2 vf7 :mask #b111) + (.add.vf.xyz vf2 vf2 vf7) (nop!) - (.add.vf vf3 vf3 vf8 :mask #b111) + (.add.vf.xyz vf3 vf3 vf8) (nop!) (nop!) (nop!) - (.add.vf vf4 vf4 vf9 :mask #b111) + (.add.vf.xyz vf4 vf4 vf9) (nop!) (nop!) (.svf (&-> v0-0 quad 0) vf2) @@ -1126,9 +1126,9 @@ (.lvf vf10 (&-> arg0 quad 0)) (.outer.product.a.vf acc vf11 vf12) (.outer.product.b.vf vf13 vf12 vf11 acc) - (.mul.vf vf13 vf13 vf10 :mask #b111) - (.add.y.vf vf13 vf13 vf13 :mask #b1) - (.add.z.vf vf13 vf13 vf13 :mask #b1) + (.mul.vf.xyz vf13 vf13 vf10) + (.add.y.vf.x vf13 vf13 vf13) + (.add.z.vf.x vf13 vf13 vf13) (.mov v0-0 vf13) v0-0 ) @@ -1228,15 +1228,15 @@ (.outer.product.b.vf vf13 vf12 vf11 acc) (.outer.product.a.vf acc vf12 vf10) (.outer.product.b.vf vf14 vf10 vf12 acc) - (.mul.vf vf1 vf10 vf13 :mask #b111) + (.mul.vf.xyz vf1 vf10 vf13) (.outer.product.a.vf acc vf10 vf11) (.outer.product.b.vf vf15 vf11 vf10 acc) (.nop.vf) - (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1285,28 +1285,28 @@ (let ((f2-1 (gpr->fpr v1-0))) (.lvf vf12 (&-> arg1 quad 2)) (.madda.s f0-0 f0-0) - (.sub.w.vf vf13 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf13 vf0 vf0) (.madd.s f0-1 f1-0 f1-0) - (.sub.w.vf vf14 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf14 vf0 vf0) (.rsqrt.s f0-2 f2-1 f0-1) ) ) - (.sub.w.vf vf15 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf15 vf0 vf0) (let ((v1-1 f0-2)) (.mov vf16 v1-1) ) - (.mul.x.vf vf13 vf10 vf16 :mask #b111) + (.mul.x.vf.xyz vf13 vf10 vf16) (.outer.product.a.vf acc vf11 vf13) (.outer.product.b.vf vf14 vf13 vf11 acc) (.outer.product.a.vf acc vf13 vf14) (.outer.product.b.vf vf14 vf14 vf13 acc) - (.mul.vf vf16 vf14 vf14 :mask #b111) - (.mul.x.vf acc vf0 vf16 :mask #b1000) - (.add.mul.y.vf acc vf0 vf16 acc :mask #b1000) - (.add.mul.z.vf vf16 vf0 vf16 acc :mask #b1000) + (.mul.vf.xyz vf16 vf14 vf14) + (.mul.x.vf.w acc vf0 vf16) + (.add.mul.y.vf.w acc vf0 vf16 acc) + (.add.mul.z.vf.w vf16 vf0 vf16 acc) (.isqrt.vf Q vf0 vf16 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf14 vf14 Q :mask #b111) + (.mul.vf.xyz vf14 vf14 Q) (.outer.product.a.vf acc vf13 vf14) (.outer.product.b.vf vf15 vf14 vf13 acc) (.svf (&-> arg0 quad 0) vf13) @@ -1674,10 +1674,10 @@ (.lvf vf2 (&-> arg0 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg1 quad) vf2) arg1 ) @@ -1694,7 +1694,7 @@ ;; definition for function matrix->scale (defun matrix->scale ((arg0 matrix) (arg1 vector)) "Get the scale of a matrix." - (set! (-> arg1 x) (vector-length (the-as vector (-> arg0 vector)))) + (set! (-> arg1 x) (vector-length (-> arg0 vector 0))) (set! (-> arg1 y) (vector-length (-> arg0 vector 1))) (set! (-> arg1 z) (vector-length (-> arg0 vector 2))) (set! (-> arg1 w) 1.0) @@ -1704,7 +1704,7 @@ ;; definition for function matrix<-scale (defun matrix<-scale ((arg0 matrix) (arg1 vector)) "Set the scale of a matrix by rescaling." - (vector-normalize! (the-as vector (-> arg0 vector)) (-> arg1 x)) + (vector-normalize! (-> arg0 vector 0) (-> arg1 x)) (vector-normalize! (-> arg0 vector 1) (-> arg1 y)) (vector-normalize! (-> arg0 vector 2) (-> arg1 z)) arg0 @@ -1728,7 +1728,7 @@ (set! (-> s5-0 trans quad) a2-1) ) (vector-reset! (-> s5-0 trans)) - (vector-normalize! (the-as vector (-> s5-0 vector)) 1.0) + (vector-normalize! (-> s5-0 vector 0) 1.0) (vector-normalize! (-> s5-0 vector 1) 1.0) (vector-normalize! (-> s5-0 vector 2) 1.0) (matrix->quaternion arg1 s5-0) @@ -1741,7 +1741,7 @@ (let ((s5-0 (matrix->scale arg0 (new 'stack-no-clear 'vector))) (s4-1 (quaternion->matrix (new 'stack-no-clear 'matrix) arg1)) ) - (vector-normalize-copy! (the-as vector (-> arg0 vector)) (the-as vector (-> s4-1 vector)) (-> s5-0 x)) + (vector-normalize-copy! (-> arg0 vector 0) (-> s4-1 vector 0) (-> s5-0 x)) (vector-normalize-copy! (-> arg0 vector 1) (-> s4-1 vector 1) (-> s5-0 y)) (vector-normalize-copy! (-> arg0 vector 2) (-> s4-1 vector 2) (-> s5-0 z)) ) @@ -1763,10 +1763,10 @@ (.lvf vf2 (&-> arg1 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 trans quad) vf2) (let ((s4-0 (new 'stack-no-clear 'matrix))) (let* ((a2-0 arg1) @@ -1780,16 +1780,16 @@ (set! (-> s4-0 quad 2) a1-1) (set! (-> s4-0 trans quad) a2-1) ) - (vector-normalize! (the-as vector (-> s4-0 vector)) 1.0) + (vector-normalize! (-> s4-0 vector 0) 1.0) (vector-normalize! (-> s4-0 vector 1) 1.0) (vector-normalize! (-> s4-0 vector 2) 1.0) - (vector-cross! (-> s4-0 vector 2) (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1)) - (vector-cross! (-> s4-0 vector 1) (-> s4-0 vector 2) (the-as vector (-> s4-0 vector))) + (vector-cross! (-> s4-0 vector 2) (-> s4-0 vector 0) (-> s4-0 vector 1)) + (vector-cross! (-> s4-0 vector 1) (-> s4-0 vector 2) (-> s4-0 vector 0)) (matrix->quaternion (-> arg0 quat) s4-0) ) (set-vector! (-> arg0 scale) - (vector-length (the-as vector (-> arg1 vector))) + (vector-length (-> arg1 vector 0)) (vector-length (-> arg1 vector 1)) (vector-length (-> arg1 vector 2)) 1.0 diff --git a/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc b/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc index 106f8d43dab..e81108224c6 100644 --- a/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/quaternion_REF.gc @@ -67,8 +67,8 @@ (defun quaternion-look-at! ((arg0 quaternion) (arg1 vector) (arg2 vector)) "Look along arg1, with arg2 as up." (let ((s5-0 (new 'stack-no-clear 'matrix))) - (vector-cross! (the-as vector (-> s5-0 vector)) arg2 arg1) - (vector-cross! (-> s5-0 vector 1) arg1 (the-as vector (-> s5-0 vector))) + (vector-cross! (-> s5-0 vector 0) arg2 arg1) + (vector-cross! (-> s5-0 vector 1) arg1 (-> s5-0 vector 0)) (set! (-> (the-as vector (-> s5-0 vector 2)) quad) (-> arg1 quad)) (quaternion-normalize! (matrix->quaternion arg0 s5-0)) ) @@ -190,8 +190,8 @@ ) (.lvf vf1 (&-> arg1 quad)) (.sub.vf vf2 vf2 vf2) - (.sub.vf vf2 vf2 vf1 :mask #b111) - (.add.vf vf2 vf2 vf1 :mask #b1000) + (.sub.vf.xyz vf2 vf2 vf1) + (.add.vf.w vf2 vf2 vf1) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -231,9 +231,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -251,9 +251,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v1-1 vf1) (sqrtf v1-1) @@ -272,9 +272,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf2 vf1 vf1) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) (.mul.vf vf2 vf1 Q) @@ -301,12 +301,12 @@ (.lvf vf1 (&-> arg1 quad)) (.mul.vf vf2 vf1 vf1) (.sub.vf vf3 vf3 vf3) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) - (.sub.vf vf3 vf3 vf1 :mask #b111) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) + (.sub.vf.xyz vf3 vf3 vf1) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) - (.add.vf vf3 vf3 vf1 :mask #b1000) + (.add.vf.w vf3 vf3 vf1) (.wait.vf) (.mul.vf vf3 vf3 Q) (.nop.vf) @@ -329,9 +329,9 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -351,16 +351,16 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.sub.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.w vf4 vf0 vf0) (.mul.vf vf3 vf1 vf2) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf4 vf2 vf1 acc) (.mul.w.vf acc vf1 vf2) (.add.mul.w.vf acc vf2 vf1 acc) - (.sub.mul.w.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.z.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.x.vf acc vf0 vf3 acc :mask #b1000) + (.sub.mul.w.vf.w acc vf0 vf3 acc) + (.sub.mul.z.vf.w acc vf0 vf3 acc) + (.sub.mul.y.vf.w acc vf0 vf3 acc) + (.sub.mul.x.vf.w acc vf0 vf3 acc) (.add.mul.w.vf vf1 vf4 vf0 acc) (.svf (&-> arg0 quad) vf1) arg0 @@ -441,27 +441,27 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.svf (&-> arg0 trans quad) vf0) (.svf (&-> arg0 quad 0) vf2) (.svf (&-> arg0 quad 1) vf3) @@ -562,7 +562,7 @@ (vf7 :class vf) ) (let ((v1-0 (new-stack-matrix0))) - (let* ((f0-1 (vector-dot (the-as vector (-> arg1 vector)) (the-as vector (-> arg1 vector)))) + (let* ((f0-1 (vector-dot (-> arg1 vector 0) (-> arg1 vector 0))) (f1-1 (vector-dot (-> arg1 vector 1) (-> arg1 vector 1))) (f2-1 (vector-dot (-> arg1 vector 2) (-> arg1 vector 2))) (f0-3 (/ 1.0 (sqrtf f0-1))) @@ -631,7 +631,7 @@ ;; definition for function quaternion-exp! (defun quaternion-exp! ((arg0 quaternion) (arg1 quaternion)) "Quaternion exponentiation. Unused." - (let ((f30-0 (vector-length (the-as vector arg1)))) + (let ((f30-0 (vector-length (-> arg1 vec)))) (cond ((= f30-0 0.0) (set! (-> arg0 x) 0.0) @@ -820,17 +820,17 @@ (.lvf vf1 (&-> gp-0 quad)) (.lvf vf2 (&-> s5-0 quad)) ) - (.mul.x.vf vf4 vf0 vf1 :mask #b1000) - (.add.vf vf4 vf0 vf2 :mask #b111) - (.sub.vf vf4 vf0 vf4 :mask #b110) - (.add.vf vf3 vf0 vf1 :mask #b111) - (.mul.x.vf vf3 vf0 vf2 :mask #b1000) + (.mul.x.vf.w vf4 vf0 vf1) + (.add.vf.xyz vf4 vf0 vf2) + (.sub.vf.yz vf4 vf0 vf4) + (.add.vf.xyz vf3 vf0 vf1) + (.mul.x.vf.w vf3 vf0 vf2) (.outer.product.a.vf acc vf1 vf1) (.outer.product.b.vf vf6 vf0 vf0 acc) (.outer.product.a.vf acc vf2 vf2) (.outer.product.b.vf vf5 vf0 vf0 acc) - (.mul.x.vf vf6 vf0 vf6 :mask #b1000) - (.mul.x.vf vf5 vf0 vf5 :mask #b1000) + (.mul.x.vf.w vf6 vf0 vf6) + (.mul.x.vf.w vf5 vf0 vf5) (.mul.vf acc vf6 vf4) (.add.mul.vf vf7 vf5 vf3 acc) (.svf (&-> arg0 quad) vf7) diff --git a/test/decompiler/reference/jak2/engine/math/transformq_REF.gc b/test/decompiler/reference/jak2/engine/math/transformq_REF.gc index 86728fa030b..366f03189ab 100644 --- a/test/decompiler/reference/jak2/engine/math/transformq_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/transformq_REF.gc @@ -125,7 +125,7 @@ ) (let ((s4-0 (-> s3-0 vector 2))) (vector-normalize! (vector-flatten! (-> s3-0 vector 1) s1-0 s4-0) 1.0) - (vector-cross! (the-as vector (-> s3-0 vector)) (-> s3-0 vector 1) s4-0) + (vector-cross! (-> s3-0 vector 0) (-> s3-0 vector 1) s4-0) ) (let ((a1-5 (matrix-rotate-z! (new 'stack-no-clear 'matrix) arg0))) (matrix*! s3-0 a1-5 s3-0) @@ -276,7 +276,7 @@ (.lvf vf3 (&-> arg0 quad 0)) (.lvf vf4 (&-> arg0 quad 1)) (.lvf vf5 (&-> arg0 quad 2)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) @@ -337,14 +337,14 @@ (.lvf vf3 (&-> arg0 quad 0)) (.lvf vf4 (&-> arg0 quad 1)) (.lvf vf5 (&-> arg0 quad 2)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) (.mul.x.vf acc vf3 vf6) (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 quad 0) vf3) (.svf (&-> arg0 quad 1) vf4) @@ -371,11 +371,11 @@ (.lvf vf3 (&-> arg0 quad 0)) (.lvf vf4 (&-> arg0 quad 1)) (.lvf vf5 (&-> arg0 quad 2)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) - (.add.vf vf2 vf2 vf6 :mask #b111) + (.add.vf.xyz vf2 vf2 vf6) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 quad 0) vf3) (.svf (&-> arg0 quad 1) vf4) @@ -403,7 +403,7 @@ (set! (-> v1-0 z) (/ 1.0 (-> arg2 z))) (.lvf vf1 (&-> arg1 scale quad)) (.lvf vf2 (&-> arg1 trans quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.lvf vf4 (&-> arg0 quad 0)) (.lvf vf5 (&-> arg0 quad 1)) (.lvf vf6 (&-> arg0 quad 2)) @@ -443,7 +443,7 @@ (.lvf vf3 (&-> arg0 quad 0)) (.lvf vf4 (&-> arg0 quad 1)) (.lvf vf5 (&-> arg0 quad 2)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) @@ -451,7 +451,7 @@ (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) (.sub.mul.w.vf acc vf6 vf0 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 quad 0) vf3) (.svf (&-> arg0 quad 1) vf4) diff --git a/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc index 3c2a1c5151b..3e438c1e5dd 100644 --- a/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/vector-h_REF.gc @@ -993,8 +993,8 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -1021,11 +1021,11 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.w.vf vf3 vf0 vf0 :mask #b1) - (.mul.x.vf acc vf3 vf1 :mask #b1) - (.add.mul.y.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.z.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.w.vf vf1 vf3 vf1 acc :mask #b1) + (.add.w.vf.x vf3 vf0 vf0) + (.mul.x.vf.x acc vf3 vf1) + (.add.mul.y.vf.x acc vf3 vf1 acc) + (.add.mul.z.vf.x acc vf3 vf1 acc) + (.add.mul.w.vf.x vf1 vf3 vf1 acc) (.mov v0-0 vf1) v0-0 ) diff --git a/test/decompiler/reference/jak2/engine/math/vector_REF.gc b/test/decompiler/reference/jak2/engine/math/vector_REF.gc index 799e13cbec2..15e302eb694 100644 --- a/test/decompiler/reference/jak2/engine/math/vector_REF.gc +++ b/test/decompiler/reference/jak2/engine/math/vector_REF.gc @@ -19,8 +19,8 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.add.x.vf vf1 vf0 vf0 :mask #b10) - (.add.x.vf vf2 vf0 vf0 :mask #b10) + (.add.x.vf.y vf1 vf0 vf0) + (.add.x.vf.y vf2 vf0 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.svf (&-> arg0 quad) vf3) @@ -39,8 +39,8 @@ (init-vf0-vector) (.mov vf6 arg2) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> arg0 quad) vf5) arg0 ) @@ -66,9 +66,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -88,9 +88,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.w.vf acc vf4 vf0 :mask #b111) - (.sub.mul.x.vf vf6 vf5 vf7 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.w.vf.xyz acc vf4 vf0) + (.sub.mul.x.vf.xyz vf6 vf5 vf7 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -110,19 +110,19 @@ (init-vf0-vector) (.lvf vf5 (&-> arg2 quad)) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b1) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf6 vf0 vf0) (.lvf vf4 (&-> arg1 quad)) (let ((v1-0 (/ (-> arg1 x) (-> arg2 x)))) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b10) + (.mul.vf.y vf6 vf4 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b10) (.mov vf7 v1-0) ) - (.add.x.vf vf6 vf0 vf7 :mask #b1) + (.add.x.vf.x vf6 vf0 vf7) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b100) + (.mul.vf.z vf6 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf6) @@ -140,8 +140,8 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.mov vf2 arg2) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -163,9 +163,9 @@ (.lvf vf2 (&-> arg2 quad)) (.mov vf3 v1-0) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf1 vf3) - (.add.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.add.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -185,9 +185,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -208,9 +208,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.w.vf acc vf1 vf0) - (.sub.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.sub.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -229,9 +229,9 @@ (.mov vf3 arg2) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0) (.lvf vf1 (&-> arg1 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.wait.vf) - (.mul.vf vf4 vf1 Q :mask #b111) + (.mul.vf.xyz vf4 vf1 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -248,8 +248,8 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) - (.sub.vf vf4 vf0 vf1 :mask #b111) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.xyz vf4 vf0 vf1) + (.add.x.vf.w vf4 vf0 vf0) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -263,7 +263,7 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.vf vf1 vf0 vf1 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf1) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -287,10 +287,10 @@ (.lvf vf2 (&-> arg1 quad)) (.sub.vf vf1 vf2 vf1) (.abs.vf vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf1 acc :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf3 vf0 vf1 acc) + (.add.w.vf.x vf3 vf0 vf3) (.mov v0-0 vf3) v0-0 ) @@ -311,12 +311,12 @@ (.mov vf4 arg2) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg0 quad)) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.sub.x.vf vf5 vf0 vf4 :mask #b1) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.min.x.vf vf3 vf3 vf4 :mask #b111) - (.max.x.vf vf3 vf3 vf5 :mask #b111) - (.add.vf vf1 vf2 vf3 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.sub.x.vf.x vf5 vf0 vf4) + (.sub.vf.xyz vf3 vf1 vf2) + (.min.x.vf.xyz vf3 vf3 vf4) + (.max.x.vf.xyz vf3 vf3 vf5) + (.add.vf.xyz vf1 vf2 vf3) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -344,9 +344,9 @@ ) (.lvf vf5 (&-> v1-0 quad)) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -568,8 +568,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -590,8 +590,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -614,11 +614,11 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v0-0 vf1) v0-0 ) @@ -652,13 +652,13 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -678,8 +678,8 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -701,12 +701,12 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -730,12 +730,12 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -755,7 +755,7 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -773,16 +773,16 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -805,19 +805,19 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) - (.add.w.vf vf2 vf0 vf2 :mask #b1) + (.add.w.vf.x vf2 vf0 vf2) (.mov v1-1 vf2) (let ((v0-0 (sqrtf v1-1))) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1083,10 +1083,10 @@ (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) (.mov vf4 arg3) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -1120,10 +1120,10 @@ (.mov vf4 a1-1) ) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-3 quad) vf3) ) ) @@ -1569,13 +1569,13 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.add.y.vf vf3 vf3 vf3 :mask #b1) - (.add.z.vf vf3 vf3 vf3 :mask #b1) - (.add.w.vf vf4 vf0 vf4 :mask #b1) + (.sub.vf.xyz vf3 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.w.vf.w vf4 vf4 vf4) + (.add.y.vf.x vf3 vf3 vf3) + (.add.z.vf.x vf3 vf3 vf3) + (.add.w.vf.x vf4 vf0 vf4) (.mov a0-1 vf4) (.mov v1-0 vf3) (>= a0-1 v1-0) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc index 81639585f77..d64290229b5 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-control_REF.gc @@ -413,7 +413,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-4 vf1) (let ((f1-0 a2-4) (f0-1 (+ (-> sphere r) (-> nav shape nav-radius))) @@ -459,7 +459,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-4 vf1) (let ((f1-0 t0-4) (f0-2 (+ (-> arg2 r) (-> v1-4 shape nav-radius))) @@ -493,7 +493,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-6 vf1) (let ((f1-1 a2-6) (f0-4 (+ (-> a0-1 w) (-> v1-9 shape nav-radius))) @@ -639,17 +639,17 @@ ) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t2-3 f0-1)) (.mov vf3 t2-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -681,9 +681,9 @@ ) (.lvf vf4 (&-> a1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-1 quad) vf6) ) (let ((v0-0 arg3)) @@ -692,9 +692,9 @@ ) (.lvf vf5 (&-> v1-0 quad)) (.lvf vf4 (&-> a0-9 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -824,17 +824,17 @@ (let ((v1-1 (-> s5-0 in-dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-1)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -864,7 +864,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a1-3 vf1) (set! (-> s5-0 dist2) a1-3) (let ((f0-14 (-> arg0 closest-sphere-dist2)) @@ -874,9 +874,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-14 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-10)) ) (set! (-> s5-0 inside-dist) (- (-> a0-13 r) (sqrtf (-> s5-0 dist2)))) @@ -906,12 +906,7 @@ (label cfg-13) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-17 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-17 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-17 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-20 2) (let ((a0-28 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-20)))) @@ -938,7 +933,7 @@ (circle-tangent-directions (-> arg0 current-pos) (-> this sphere-array v1-28) - (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1) ) (set! (-> s5-0 dir-update) #f) @@ -993,17 +988,17 @@ (let ((v1-51 (-> s5-0 away-dir))) (let ((f0-42 1.0)) (.lvf vf1 (&-> v1-51 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-60 f0-42)) (.mov vf3 a0-60) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1021,10 +1016,10 @@ (.mov vf4 a0-62) ) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-52 0 quad) vf3) ) (let ((v1-53 (-> s5-0 best-dir 1))) @@ -1037,10 +1032,10 @@ (let ((a0-64 f0-44)) (.mov vf4 a0-64) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-53 quad) vf3) ) ) @@ -1048,17 +1043,17 @@ (let ((v1-54 (-> s5-0 best-dir))) (let ((f0-45 1.0)) (.lvf vf1 (&-> v1-54 0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-66 f0-45)) (.mov vf3 a0-66) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1067,26 +1062,26 @@ (let ((v1-55 (-> s5-0 best-dir 1))) (let ((f0-46 1.0)) (.lvf vf1 (&-> v1-55 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-68 f0-46)) (.mov vf3 a0-68) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) (.svf (&-> v1-55 quad) vf1) ) ) - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-41 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-52) 0 1 @@ -1094,7 +1089,7 @@ ) (v1-65 (- 1 a1-41)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-65) (-> s5-0 travel-len)) ) ) @@ -1123,17 +1118,17 @@ (let ((v1-1 (-> s5-0 in-dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-1)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1161,7 +1156,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a1-3 vf1) (set! (-> s5-0 dist2) a1-3) (let ((f0-13 (-> arg0 closest-sphere-dist2)) @@ -1171,9 +1166,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-13 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-9)) ) ) @@ -1198,12 +1193,7 @@ (label cfg-11) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-15 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-15 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-15 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-19 2) (let ((a0-31 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-19)))) @@ -1217,9 +1207,9 @@ ) ) 0 - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-25 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-28) 0 1 @@ -1227,7 +1217,7 @@ ) (v1-32 (- 1 a1-25)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-32) (-> s5-0 travel-len)) ) ) @@ -1421,17 +1411,17 @@ (let ((a1-6 (-> v1-16 dir))) (let ((f0-5 1.0)) (.lvf vf1 (&-> a1-6 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a2-4 f0-5)) (.mov vf3 a2-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1883,17 +1873,17 @@ (let ((t3-5 (-> v1-15 dir))) (let ((f0-5 1.0)) (.lvf vf1 (&-> t3-5 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t4-6 f0-5)) (.mov vf3 t4-6) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2090,17 +2080,17 @@ (let ((v1-21 (-> arg1 pref-dir))) (let ((f0-6 1.0)) (.lvf vf1 (&-> v1-21 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-12 f0-6)) (.mov vf3 a0-12) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2358,17 +2348,17 @@ (let ((a0-6 (-> v1-10 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-6 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-8 f0-1)) (.mov vf3 a1-8) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2546,7 +2536,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-2 vf1) (let ((f1-0 v1-2)) (let ((v1-3 arg0) @@ -2557,7 +2547,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-4 vf1) (let ((v0-0 (>= f0-2 (fmin f1-0 v1-4)))) (when (not v0-0) @@ -2690,10 +2680,10 @@ ) (when sv-124 (let ((s5-1 (new 'stack-no-clear 'matrix))) - (vector-! (the-as vector (-> s5-1 vector)) (-> sv-120 1) (-> sv-120 0)) - (vector-normalize! (the-as vector (-> s5-1 vector)) 409.6) - (vector+! (-> sv-120 0) (-> sv-120 0) (the-as vector (-> s5-1 vector))) - (vector-! (-> sv-120 1) (-> sv-120 1) (the-as vector (-> s5-1 vector))) + (vector-! (-> s5-1 vector 0) (-> sv-120 1) (-> sv-120 0)) + (vector-normalize! (-> s5-1 vector 0) 409.6) + (vector+! (-> sv-120 0) (-> sv-120 0) (-> s5-1 vector 0)) + (vector-! (-> sv-120 1) (-> sv-120 1) (-> s5-1 vector 0)) ) (when (not (ray-ccw-line-segment-intersection? (-> this virtual-current-pos-local) @@ -2762,11 +2752,11 @@ ) ) (.lvf vf1 (&-> (-> this travel) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-117 vf1) (let ((f0-15 v1-117) (f1-10 (-> this nav nav-cull-radius)) @@ -2900,17 +2890,17 @@ (let ((t0-3 (-> a3-3 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> t0-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t1-2 f0-2)) (.mov vf3 t1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3145,17 +3135,17 @@ (let ((a2-3 (-> a1-4 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a2-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a3-2 f0-2)) (.mov vf3 a3-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3277,17 +3267,17 @@ (let ((v1-1 (-> this target-dir))) (let ((f0-0 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-0)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3306,17 +3296,17 @@ (let ((v1-12 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-9 f0-5)) (.mov vf3 a0-9) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3353,17 +3343,17 @@ (let ((v1-30 (-> this heading))) (let ((f0-12 1.0)) (.lvf vf1 (&-> v1-30 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-15 f0-12)) (.mov vf3 a0-15) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3491,17 +3481,17 @@ (let ((v1-12 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3675,17 +3665,17 @@ (let ((v1-12 (-> s5-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3898,17 +3888,17 @@ (let ((a3-3 (-> a2-3 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a3-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t0-2 f0-2)) (.mov vf3 t0-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -4033,19 +4023,19 @@ (vector-reset! (-> s5-0 in-dir)) (set! (-> s5-0 best-dir 0 quad) (-> this travel quad)) (set! (-> s5-0 best-dir 0 y) 0.0) - (vector-normalize! (the-as vector (-> s5-0 best-dir)) (-> this nav target-speed)) - (vector-! (-> s5-0 right-dir) (the-as vector (-> s5-0 best-dir)) (-> this velocity)) + (vector-normalize! (-> s5-0 best-dir 0) (-> this nav target-speed)) + (vector-! (-> s5-0 right-dir) (-> s5-0 best-dir 0) (-> this velocity)) (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) 4.0) (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) (dotimes (s4-0 (-> this nav sphere-count)) (let ((s3-0 (-> this nav sphere-array s4-0))) (vector-! (-> s5-0 right-dir) (-> this current-pos-local) (the-as vector s3-0)) (.lvf vf1 (&-> (-> s5-0 right-dir) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-11 vf1) (let ((f30-0 v1-11)) (vector-normalize! (-> s5-0 right-dir) 2.0) @@ -4064,11 +4054,11 @@ (set! (-> this target-dir y) 0.0) (vector+float*! (-> this velocity) (-> this velocity) (-> this target-dir) (-> this nav sec-per-frame)) (.lvf vf1 (&-> (-> this velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (let ((f0-11 v1-25) (f1-4 (-> this nav target-speed)) @@ -4119,17 +4109,17 @@ (let ((v1-13 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-13 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-5 f0-5)) (.mov vf3 a0-5) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -4173,17 +4163,17 @@ (let ((v1-12 (-> s5-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc index 07591b08e12..84e33733f9c 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-enemy_REF.gc @@ -224,7 +224,7 @@ (if *target* (look-at! (-> *target* neck) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (if (logtest? (-> self enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) @@ -388,17 +388,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -496,17 +496,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -662,17 +662,17 @@ (let ((v1-14 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-14 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -782,17 +782,17 @@ (let ((v1-14 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-14 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2069,17 +2069,17 @@ (let ((v1-23 gp-0)) (let ((f0-2 1.0)) (.lvf vf1 (&-> v1-23 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-9 f0-2)) (.mov vf3 a0-9) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-mesh-h_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-mesh-h_REF.gc index 74b0cce3b1b..a711a112151 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-mesh-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-mesh-h_REF.gc @@ -480,17 +480,17 @@ and declared out of order (cannot use forward declared structures in inline arra (let ((v0-0 arg0)) (let ((f0-0 1.0)) (.lvf vf1 (&-> v0-0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-1 f0-0)) (.mov vf3 v1-1) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -516,17 +516,17 @@ and declared out of order (cannot use forward declared structures in inline arra (let ((v0-0 arg0)) (let ((f0-0 1.0)) (.lvf vf1 (&-> v0-0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-2 f0-0)) (.mov vf3 v1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -559,17 +559,17 @@ and declared out of order (cannot use forward declared structures in inline arra (let ((v1-1 (-> arg0 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-2 f0-1)) (.mov vf3 a1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc b/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc index 04517aab258..9f27941ee00 100644 --- a/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc +++ b/test/decompiler/reference/jak2/engine/nav/nav-mesh_REF.gc @@ -206,8 +206,8 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-3 quad) vf5) ) (let ((a1-4 (-> v1-12 1))) @@ -217,8 +217,8 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-4 quad) vf5) ) (update-grid-for-objects-in-box @@ -451,8 +451,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-0 quad) vf1) ) (let ((s3-1 (new 'stack-no-clear 'nav-find-poly-parms))) @@ -477,8 +477,8 @@ (.mov at-1 f0-2) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-7 quad) vf1) ) ) @@ -1080,8 +1080,8 @@ (set! (-> this mem-mesh) arg0) (cond ((= (-> *nav-mesh-work* mesh-struct-in-scratch) 1) - (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> (-> this nav-mesh-addr) poly-array))) - (mem-copy! (&-> (-> this nav-mesh-addr) type) (&-> arg0 type) 112) + (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> this nav-mesh-addr poly-array))) + (mem-copy! (&-> this nav-mesh-addr type) (&-> arg0 type) 112) ) (else (set! (-> this nav-mesh-addr) arg0) @@ -1452,14 +1452,14 @@ ) (set! (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 done) 0) (when (> (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 nav-count) 0) - (upload-nav-to-spr this (the-as nav-engine-spr-buffer gp-0)) + (upload-nav-to-spr this (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0)) (dma-sync (the-as pointer #x1000d400) 0 0) - (reloc-ptrs-to-spad this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-spad this (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0)) (while (< (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 i-pass) (-> this max-pass-count)) - (do-callbacks this (the-as nav-engine-spr-buffer gp-0)) + (do-callbacks this (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0)) (+! (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 i-pass) 1) ) - (reloc-ptrs-to-mem this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-mem this (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0)) (dotimes (s4-0 (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 nav-count)) (let ((a2-1 (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 spr-addr s4-0 state mesh))) (when (>= (the-as uint a2-1) (the-as uint #x70000000)) @@ -1469,7 +1469,7 @@ ) ) ) - (download-nav-from-spr this (the-as nav-engine-spr-buffer gp-0)) + (download-nav-from-spr this (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0)) (dma-sync (the-as pointer #x1000d000) 0 0) (dotimes (s5-1 (-> (the-as (inline-array nav-engine-spr-buffer) gp-0) 0 nav-count)) (let ((a2-3 (-> (&+ (-> (the-as nav-engine-spr-buffer gp-0) mem-addr) (* 288 s5-1)) 31))) @@ -1647,11 +1647,11 @@ ) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.sub.vf.yw vf1 vf1 vf1) (.lvf vf3 (&-> arg3 quad)) - (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.sub.vf.yw vf2 vf2 vf2) (.lvf vf12 (&-> arg0 quad)) - (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf.yw vf3 vf3 vf3) (.sub.vf vf4 vf2 vf1) (.sub.vf vf9 vf1 vf12) (.sub.vf vf5 vf3 vf2) @@ -1754,11 +1754,11 @@ (f0-5 (* f0-3 f0-3)) ) (.lvf vf1 (&-> sv-20 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-3 vf1) (when (>= f0-5 v1-3) (let ((s5-0 (new 'stack-no-clear 'nav-find-poly-parms))) @@ -1808,17 +1808,17 @@ (let ((a0-2 (-> v1-2 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-2 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-3 f0-1)) (.mov vf3 a1-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1866,9 +1866,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (let ((v1-2 arg0)) @@ -1877,17 +1877,17 @@ (let ((a0-2 (-> v1-2 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a0-2 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-6 f0-2)) (.mov vf3 a1-6) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2297,7 +2297,7 @@ (set! sv-72 (-> v1-3 vertex1)) (set! sv-76 (-> v1-3 vertex2)) ) - (vector-3pt-cross! sv-32 (the-as vector sv-68) sv-72 sv-76) + (vector-3pt-cross! sv-32 (-> sv-68 0) sv-72 sv-76) (cond ((= (vector-length sv-32) 0.0) (set! sv-40 (+ sv-40 1)) @@ -2306,17 +2306,17 @@ (let ((v1-9 sv-32)) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-9 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-11 f0-1)) (.mov vf3 a0-11) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2517,12 +2517,12 @@ (.outer.product.a.vf acc vf2 vf1) (.outer.product.b.vf vf4 vf1 vf2 acc) (.mul.vf vf5 vf4 vf4) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.isqrt.vf Q vf0 vf5 :fsf #b11 :ftf #b0) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.wait.vf) - (.mul.vf vf4 vf4 Q :mask #b111) + (.mul.vf.xyz vf4 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> v1-0 quad) vf4) @@ -2540,7 +2540,7 @@ (let ((s4-0 (new 'stack-no-clear 'vector))) (cond ((= (-> arg0 vertex-count) 3) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ((let* ((v1-2 (-> arg0 vertex2)) (a0-3 (-> arg0 vertex)) @@ -2551,14 +2551,14 @@ ) (< 0.0 f0-3) ) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex2) (-> arg0 vertex3)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex2) (-> arg0 vertex3)) ) (else - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ) (set! (-> arg2 quad) (-> s4-0 quad)) - (set! (-> s4-0 w) (- (vector-dot s4-0 (the-as vector (-> arg0 vertex))))) + (set! (-> s4-0 w) (- (vector-dot s4-0 (-> arg0 vertex 0)))) (set! (-> s5-0 quad) (-> arg3 quad)) (set! (-> s5-0 y) (/ (- (+ (* (-> arg3 x) (-> s4-0 x)) (* (-> arg3 z) (-> s4-0 z)) (-> s4-0 w))) (-> s4-0 y))) ) @@ -2642,11 +2642,11 @@ (when s3-0 (vector-! (-> sv-64 point) sv-76 (-> s3-0 bounds)) (.lvf vf1 (&-> (-> sv-64 point) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-1 v1-15) (f1-0 (-> s3-0 bounds w)) @@ -2790,7 +2790,7 @@ (defmethod nav-mesh-method-35 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) (let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3))) (set! (-> gp-0 2 vertex3 y) arg2) - (vector-! (the-as vector (-> gp-0 0)) arg0 (-> this bounds)) + (vector-! (-> gp-0 0 vertex0) arg0 (-> this bounds)) (vector-! (-> gp-0 0 vertex1) arg1 (-> this bounds)) (set! (-> gp-0 2 vertex1 quad) (-> gp-0 0 vertex0 quad)) (set! (-> gp-0 2 vertex2 x) (-> this nearest-y-threshold)) @@ -2798,10 +2798,10 @@ (let ((a1-4 (find-poly-containing-point-local this (the-as nav-find-poly-parms (-> gp-0 2 vertex1))))) (cond (a1-4 - (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (the-as vector (-> gp-0 0)) (-> gp-0 0 vertex1)) + (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (-> gp-0 0 vertex0) (-> gp-0 0 vertex1)) (until #f (set! (-> gp-0 2 vertex3 z) - (nav-mesh-method-34 this (-> gp-0 0 vertex3) (the-as vector (-> gp-0 1)) (-> gp-0 2 vertex3 y)) + (nav-mesh-method-34 this (-> gp-0 0 vertex3) (-> gp-0 1 vertex0) (-> gp-0 2 vertex3 y)) ) (b! (>= (-> gp-0 2 vertex3 z) (-> gp-0 2 vertex3 y)) cfg-4 :delay #f) (set! (-> gp-0 2 vertex3 y) (-> gp-0 2 vertex3 z)) diff --git a/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc b/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc index fbcd892af7b..f90fc24b30f 100644 --- a/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/chain-physics_REF.gc @@ -156,11 +156,11 @@ (apply-gravity this sv-288 s0-0 arg0) (let ((v1-34 sv-528)) (let ((a0-10 sv-528)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-10 quad)) ) (.lvf vf5 (&-> sv-288 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-34 quad) vf6) ) (when (< s0-0 (the-as int (+ (-> this root-joint-index) -1))) @@ -168,11 +168,11 @@ (chain-physics-method-14 this sv-304 s0-0) (let ((v1-40 sv-528)) (let ((a0-13 sv-528)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-13 quad)) ) (.lvf vf5 (&-> sv-304 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-40 quad) vf6) ) ) @@ -184,8 +184,8 @@ (.lvf vf4 (&-> v1-43 quad)) (.lvf vf5 (&-> a0-16 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-400 quad) vf6) (let ((f28-1 (vector-normalize-ret-len! sv-400 1.0)) (f24-0 (vector-dot sv-400 s1-0)) @@ -208,9 +208,9 @@ (.mov vf3 v1-55) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-384 quad) vf4) (vector+float*! sv-528 s3-0 sv-400 f28-1) ) @@ -223,8 +223,8 @@ (.lvf vf4 (&-> v1-61 quad)) (.lvf vf5 (&-> a0-27 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-432 quad) vf6) (vector-normalize-ret-len! sv-432 1.0) (set! sv-416 (new 'stack-no-clear 'vector)) @@ -234,8 +234,8 @@ (.lvf vf4 (&-> v1-64 quad)) (.lvf vf5 (&-> a0-30 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-416 quad) vf6) (let ((f28-2 (vector-dot sv-432 sv-416))) (vector--float*! sv-416 sv-416 sv-432 f28-2) @@ -256,19 +256,19 @@ (let ((a0-37 f0-11)) (.mov vf3 a0-37) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> v1-73 quad) vf4) ) (vector+! sv-528 (-> sv-272 position) (-> sv-272 velocity)) (let ((a2-9 (vector-! (new 'stack-no-clear 'vector) s3-0 sv-528))) (.lvf vf1 (&-> a2-9 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-78 vf1) (let* ((f0-13 v1-78) (f1-6 (* (-> this maximum-stretch) (-> this joint-length))) @@ -289,8 +289,8 @@ (if (-> this negate-y) (vector-negate! (-> s4-0 vector 1) (-> s4-0 vector 1)) ) - (vector-cross! (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) s2-0) - (vector-normalize! (the-as vector (-> s4-0 vector)) 1.0) + (vector-cross! (-> s4-0 vector 0) (-> s4-0 vector 1) s2-0) + (vector-normalize! (-> s4-0 vector 0) 1.0) (set! sv-496 (new 'stack-no-clear 'vector)) (let ((v1-97 (-> sv-272 old-x)) (a0-51 (-> s4-0 vector)) @@ -304,9 +304,9 @@ (vector-flatten! sv-496 (-> sv-272 old-x) (-> s4-0 vector 1)) (vector-normalize! sv-496 1.0) (cond - ((< (vector-dot (the-as vector (-> s4-0 vector)) sv-496) (cos (-> this axial-slop))) - (vector-cross! sv-496 sv-496 (the-as vector (-> s4-0 vector))) - (vector-cross! sv-496 (the-as vector (-> s4-0 vector)) sv-496) + ((< (vector-dot (-> s4-0 vector 0) sv-496) (cos (-> this axial-slop))) + (vector-cross! sv-496 sv-496 (-> s4-0 vector 0)) + (vector-cross! sv-496 (-> s4-0 vector 0) sv-496) (vector-normalize! sv-496 1.0) (set! sv-464 (-> s4-0 vector)) (set! sv-448 (-> s4-0 vector)) @@ -316,8 +316,8 @@ (.mov vf2 v1-107) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-464 0 quad) vf1) (set! sv-512 (-> s4-0 vector)) (set! sv-480 (-> s4-0 vector)) @@ -328,9 +328,9 @@ (.mov vf3 v1-113) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-512 0 quad) vf4) (set! (-> sv-272 old-x quad) (-> s4-0 vector 0 quad)) ) @@ -339,7 +339,7 @@ (set! (-> sv-272 old-x quad) (-> s4-0 vector 0 quad)) ) ) - (vector-cross! (-> s4-0 vector 2) (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1)) + (vector-cross! (-> s4-0 vector 2) (-> s4-0 vector 0) (-> s4-0 vector 1)) (matrix->quaternion (-> sv-272 joint-mod quat) s4-0) (set! (-> s1-0 quad) (-> s4-0 vector 1 quad)) (set! (-> s2-0 quad) (-> s4-0 vector 2 quad)) diff --git a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc index f3d52e72840..66468528afb 100644 --- a/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/rigid-body_REF.gc @@ -204,9 +204,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-0 quad) vf6) ) (let ((a2-1 (-> this ang-momentum))) @@ -219,9 +219,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) (let* ((f0-3 (* 500000000.0 (-> this info mass))) @@ -229,11 +229,11 @@ (f1-3 (* f1-1 f1-1)) ) (.lvf vf1 (&-> (-> this ang-momentum) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-6 vf1) (if (< f1-3 v1-6) (vector-normalize! (-> this ang-momentum) f0-3) @@ -281,9 +281,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((s4-0 (new 'stack-no-clear 'quaternion))) @@ -391,8 +391,8 @@ (.mul.x.vf acc vf1 vf5) (.add.mul.y.vf acc vf2 vf5 acc) (.add.mul.z.vf acc vf3 vf5 acc) - (.add.mul.w.vf vf7 vf4 vf0 acc :mask #b111) - (.sub.vf vf8 vf7 vf6 :mask #b111) + (.add.mul.w.vf.xyz vf7 vf4 vf0 acc) + (.sub.vf.xyz vf8 vf7 vf6) (.svf (&-> arg1 move-dist quad) vf8) (let ((s1-0 (the-as collide-cache-prim (-> s4-0 prims)))) (countdown (s0-0 (-> s4-0 num-prims)) @@ -445,7 +445,7 @@ (.mul.x.vf acc vf1 vf5) (.add.mul.y.vf acc vf2 vf5 acc) (.add.mul.z.vf acc vf3 vf5 acc) - (.add.mul.w.vf vf5 vf4 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf5 vf4 vf0 acc) (.svf (&-> v1-0 prim-core world-sphere quad) vf5) (&+! v1-0 80) ) @@ -518,14 +518,14 @@ (.lvf vf7 (&-> (-> s5-0 cquery) best-other-tri intersect quad)) (.lvf vf6 (&-> v1-37 prim-core world-sphere quad)) (.sub.vf vf8 vf6 vf7) - (.mul.vf vf9 vf8 vf8 :mask #b111) - (.mul.x.vf acc vf0 vf9 :mask #b1000) - (.add.mul.y.vf acc vf0 vf9 acc :mask #b1000) - (.add.mul.z.vf vf9 vf0 vf9 acc :mask #b1000) + (.mul.vf.xyz vf9 vf8 vf8) + (.mul.x.vf.w acc vf0 vf9) + (.add.mul.y.vf.w acc vf0 vf9 acc) + (.add.mul.z.vf.w vf9 vf0 vf9 acc) (.isqrt.vf Q vf0 vf9 :fsf #b11 :ftf #b11) - (.mov.vf vf8 vf0 :mask #b1000) + (.mov.vf.w vf8 vf0) (.wait.vf) - (.mul.vf vf8 vf8 Q :mask #b111) + (.mul.vf.xyz vf8 vf8 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -740,9 +740,9 @@ ) (.lvf vf4 (&-> v1-46 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-20 quad) vf6) ) (vector-rotate*! (-> this ang-velocity) (-> this ang-momentum) (-> this inv-i-world)) @@ -1230,11 +1230,11 @@ (let ((s5-1 (get-touched-prim s3-0 (-> this root) arg1))) (when s5-1 (set! (-> arg0 prim-id) (-> s5-1 prim-id)) - (vector-! (-> arg0 normal) (-> arg0 point) (the-as vector (-> s5-1 prim-core))) + (vector-! (-> arg0 normal) (-> arg0 point) (-> s5-1 prim-core world-sphere)) (vector-normalize! (-> arg0 normal) 1.0) (vector+float*! (-> arg0 point) - (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere) (-> arg0 normal) (-> s5-1 prim-core world-sphere w) ) diff --git a/test/decompiler/reference/jak2/engine/physics/trajectory_REF.gc b/test/decompiler/reference/jak2/engine/physics/trajectory_REF.gc index fb6f505d29e..fd5c8416921 100644 --- a/test/decompiler/reference/jak2/engine/physics/trajectory_REF.gc +++ b/test/decompiler/reference/jak2/engine/physics/trajectory_REF.gc @@ -164,8 +164,8 @@ (defmethod update-from-cspace ((this impact-control)) (when (>= (-> this joint) 0) (set! (-> this trans 1 quad) (-> this trans 0 quad)) - (vector<-cspace! (the-as vector (-> this trans)) (-> this process 0 node-list data (-> this joint))) - (vector-! (-> this dir) (the-as vector (-> this trans)) (-> this trans 1)) + (vector<-cspace! (-> this trans 0) (-> this process 0 node-list data (-> this joint))) + (vector-! (-> this dir) (-> this trans 0) (-> this trans 1)) ) 0 (none) @@ -365,8 +365,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-12 quad) vf1) ) arg0 @@ -455,9 +455,9 @@ ) (.lvf vf4 (&-> a1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t1-7 quad) vf6) ) (vector-! (-> v1-2 initial-position) (-> v1-2 initial-position) arg3) diff --git a/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc b/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc index 4cc0c0de30e..36dd5cdc8d0 100644 --- a/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc +++ b/test/decompiler/reference/jak2/engine/process-drawable/process-drawable_REF.gc @@ -57,10 +57,10 @@ (.lvf vf2 (&-> (-> arg1 bone) transform trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -76,10 +76,10 @@ (.lvf vf2 (&-> arg1 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -303,7 +303,7 @@ (set! s5-0 (the-as cspace-array #f)) (goto cfg-13) ) - (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (the-as cspace (-> s5-0 data)) (the-as drawable #f)))) + (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (-> s5-0 data 0) (the-as drawable #f)))) (set! (-> v1-9 bone) (the-as bone (-> s3-1 bones))) ) (let ((v1-10 (-> s5-0 data))) @@ -375,7 +375,7 @@ ) ((zero? arg1) (matrix<-transformq+trans! - (the-as matrix (-> this skeleton bones 3)) + (-> this skeleton bones 3 transform) (the-as transformq (-> (the-as process-drawable (-> this process)) root trans)) (-> this skeleton bones 0 transform trans) ) @@ -430,7 +430,7 @@ (let ((a1-11 (new 'stack-no-clear 'vector))) (set! (-> a1-11 quad) (-> this bounds quad)) (set! (-> a1-11 w) 1.0) - (vector-matrix*! (-> this origin) a1-11 (the-as matrix (-> this skeleton bones (-> this origin-joint-index)))) + (vector-matrix*! (-> this origin) a1-11 (-> this skeleton bones (-> this origin-joint-index) transform)) ) (let ((f0-2 (-> this bounds w))) (set! (-> this origin w) f0-2) diff --git a/test/decompiler/reference/jak2/engine/ps2/rpc-h_REF.gc b/test/decompiler/reference/jak2/engine/ps2/rpc-h_REF.gc index 0a5f0fbea71..babeb38a494 100644 --- a/test/decompiler/reference/jak2/engine/ps2/rpc-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/ps2/rpc-h_REF.gc @@ -42,7 +42,7 @@ (set! (-> v0-0 elt-count) arg1) (set! (-> v0-0 elt-used) (the-as uint 0)) (set! (-> v0-0 busy) #f) - (set! (-> v0-0 base) (logand -64 (&-> (-> v0-0 data) 63))) + (set! (-> v0-0 base) (logand -64 (&-> v0-0 data 63))) v0-0 ) ) diff --git a/test/decompiler/reference/jak2/engine/sound/speech_REF.gc b/test/decompiler/reference/jak2/engine/sound/speech_REF.gc index c896f6f5f76..5bc50263655 100644 --- a/test/decompiler/reference/jak2/engine/sound/speech_REF.gc +++ b/test/decompiler/reference/jak2/engine/sound/speech_REF.gc @@ -274,7 +274,7 @@ (defmethod speech-control-method-14 ((this speech-control)) (speech-control-method-9 this) (let ((s5-0 (-> this channel-array))) - ((method-of-type speech-channel speech-channel-method-13) (the-as speech-channel s5-0)) + ((method-of-type speech-channel speech-channel-method-13) (-> s5-0 0)) (set! (-> s5-0 0 speech-table) (-> this speech-table)) (set! (-> s5-0 0 gui-channel) (gui-channel guard)) ) diff --git a/test/decompiler/reference/jak2/engine/spatial-hash/actor-hash_REF.gc b/test/decompiler/reference/jak2/engine/spatial-hash/actor-hash_REF.gc index bd535f26ca3..99e550b38c3 100644 --- a/test/decompiler/reference/jak2/engine/spatial-hash/actor-hash_REF.gc +++ b/test/decompiler/reference/jak2/engine/spatial-hash/actor-hash_REF.gc @@ -162,7 +162,7 @@ ) (cond ((< f0-4 (* f1-4 f1-4)) - ((method-of-type actor-hash-bucket add-actor-cshape) (the-as actor-hash-bucket (-> this data)) s4-1) + ((method-of-type actor-hash-bucket add-actor-cshape) (-> this data 0) s4-1) ) ((let ((f1-7 204800.0)) (< f0-4 (* f1-7 f1-7)) diff --git a/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc b/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc index 3a343b92bb5..dac28cd16e3 100644 --- a/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc +++ b/test/decompiler/reference/jak2/engine/spatial-hash/collide-hash_REF.gc @@ -192,7 +192,7 @@ (nop!) (vitof12.xyzw vf3 vf3) (nop!) - (.add.vf vf4 vf4 vf5 :mask #b111) + (.add.vf.xyz vf4 vf4 vf5) (nop!) (nop!) (.svf (&-> s2-0 instance-mat quad 0) vf1) @@ -449,7 +449,7 @@ (nop!) (vitof12.xyzw vf3 vf3) (nop!) - (.add.vf vf4 vf4 vf5 :mask #b111) + (.add.vf.xyz vf4 vf4 vf5) (nop!) (nop!) (.svf (&-> s1-0 instance-mat quad 0) vf1) @@ -540,11 +540,11 @@ ) (let ((f0-12 1.0)) (.lvf vf1 (&-> (-> s1-0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (set! (-> s1-0 rlength w) (/ f0-12 v1-26)) ) diff --git a/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash_REF.gc b/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash_REF.gc index 49533997d88..50b96159bb2 100644 --- a/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash_REF.gc +++ b/test/decompiler/reference/jak2/engine/spatial-hash/spatial-hash_REF.gc @@ -110,7 +110,7 @@ (t1-0 (-> this dimension-array 0)) (t2-0 (-> this dimension-array 2)) (t3-0 (-> this dimension-array 1)) - (a0-2 (&-> (-> this bucket-array) (/ (the-as int arg0) 8))) + (a0-2 (&-> this bucket-array (/ (the-as int arg0) 8))) (a1-2 (ash 1 (logand (the-as int arg0) 7))) ) (dotimes (t4-3 t3-0) diff --git a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc index dc30cc94236..ba2976264e0 100644 --- a/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/board-states_REF.gc @@ -85,7 +85,7 @@ (if (logtest? (-> self control status) (collide-status impact-surface)) (+! (-> self board turn-anim-duck-vel) (lerp-scale 0.0 15.0 (-> self control normal-impact-vel) 0.0 81920.0)) ) - (let ((f0-38 (vector-dot (the-as vector (-> self board up-vector)) (-> self board up-vector 1)))) + (let ((f0-38 (vector-dot (-> self board up-vector 0) (-> self board up-vector 1)))) (if (< f0-38 1.0) (+! (-> self board turn-anim-duck-vel) (* (lerp-scale 400.0 0.0 f0-38 0.6 1.0) (seconds-per-frame))) ) @@ -1064,11 +1064,7 @@ (set! (-> self control unknown-word04) (the-as uint #t)) (let ((v1-6 *edge-grab-info*)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> v1-6 world-vertex)) - (-> v1-6 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> v1-6 world-vertex 0) (-> v1-6 world-vertex 1)) 1.0 ) ) diff --git a/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc b/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc index 624d923278e..f882cf9fc15 100644 --- a/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/board/target-board_REF.gc @@ -505,15 +505,11 @@ (s5-1 (new 'stack-no-clear 'vector)) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> gp-1 world-vertex 1) - (the-as vector (-> gp-1 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-1 world-vertex 1) (-> gp-1 world-vertex 0)) 1.0 ) (vector+float*! s5-1 (-> self control trans) (-> self control c-R-w vector 2) (* 40960.0 (seconds-per-frame))) - (let ((f0-2 (vector-segment-overlap s5-1 (the-as vector (-> gp-1 world-vertex)) (-> gp-1 world-vertex 1)))) + (let ((f0-2 (vector-segment-overlap s5-1 (-> gp-1 world-vertex 0) (-> gp-1 world-vertex 1)))) (if (and (time-elapsed? (-> self board ride-time) (seconds 0.4)) (>= f0-2 0.0) (>= 1.0 f0-2) @@ -2058,11 +2054,7 @@ ) (set! (-> self control ground-pat) (the-as pat-surface (-> s4-0 edge-tri-pat))) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (set! (-> self control edge-grab-across-edge-dir quad) (-> s4-0 hanging-matrix quad 0)) @@ -2072,11 +2064,7 @@ (set! (-> s4-0 world-vertex 0 quad) (-> s4-0 world-vertex 1 quad)) (set! (-> s4-0 world-vertex 1 quad) (-> s3-2 quad)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (set! (-> s3-2 quad) (-> s4-0 adjacent-edge-left-vertex quad)) @@ -2288,10 +2276,10 @@ ) ) (let ((s3-9 (-> self board ride-vertex (-> self board ride-vertex-base)))) - (if (not (or (vector= s3-9 (the-as vector (-> self board ride-vertex-old))) + (if (not (or (vector= s3-9 (-> self board ride-vertex-old 0)) (vector= s3-9 (-> self board ride-vertex-old 1)) (vector= s3-9 (-> self board ride-vertex-old 2)) - (vector= (&+ s3-9 16) (the-as vector (-> self board ride-vertex-old))) + (vector= (&+ s3-9 16) (-> self board ride-vertex-old 0)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 1)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 2)) ) diff --git a/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc b/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc index 1bfae6fbb51..3c97778190c 100644 --- a/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/collide-reaction-target_REF.gc @@ -266,7 +266,7 @@ (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0)) ) (set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad)) - (collide-shape-moving-angle-set! arg0 sv-84 (the-as vector (-> sv-88 vector))) + (collide-shape-moving-angle-set! arg0 sv-84 (-> sv-88 vector 0)) (if (< (-> arg0 poly-angle) -0.2) (set! sv-96 (logior sv-96 (collide-status touch-ceiling))) ) @@ -302,20 +302,16 @@ (set! (-> arg0 normal-impact-vel) (- (vector-dot (-> arg0 transv) sv-84))) (set! sv-96 (logior sv-96 (collide-status impact-surface))) (if (nonzero? (-> arg0 current-surface impact-hook)) - ((-> arg0 current-surface impact-hook) arg0 (the-as (pointer float) (-> sv-88 vector)) sv-84) + ((-> arg0 current-surface impact-hook) arg0 (&-> sv-88 vector 0 x) sv-84) ) (when (not sv-240) (let ((f0-21 (- 1.0 (-> arg0 current-surface impact-fric)))) (when (< f0-21 1.0) (let ((v1-113 (new-stack-vector0)) - (f1-13 (vector-dot (-> arg0 dynam gravity-normal) (the-as vector (-> sv-88 vector)))) + (f1-13 (vector-dot (-> arg0 dynam gravity-normal) (-> sv-88 vector 0))) ) 0.0 - (vector-! - v1-113 - (the-as vector (-> sv-88 vector)) - (vector-float*! v1-113 (-> arg0 dynam gravity-normal) f1-13) - ) + (vector-! v1-113 (-> sv-88 vector 0) (vector-float*! v1-113 (-> arg0 dynam gravity-normal) f1-13)) (let* ((f2-2 (vector-length v1-113)) (f3-0 f2-2) ) @@ -323,8 +319,8 @@ (set! f1-13 (* f1-13 f0-21)) ) (vector+! - (the-as vector (-> sv-88 vector)) - (vector-float*! (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal) f1-13) + (-> sv-88 vector 0) + (vector-float*! (-> sv-88 vector 0) (-> arg0 dynam gravity-normal) f1-13) (vector-float*! v1-113 v1-113 (/ f2-2 f3-0)) ) ) @@ -363,15 +359,15 @@ (logtest? sv-104 (cshape-reaction-flags csrf15)) (logtest? sv-104 (cshape-reaction-flags csrf05)) (< 0.0 (vector-dot sv-84 (-> arg0 dynam gravity-normal))) - (< 0.0 (vector-dot (the-as vector (-> sv-88 vector)) (-> arg0 dynam gravity-normal))) + (< 0.0 (vector-dot (-> sv-88 vector 0) (-> arg0 dynam gravity-normal))) ) (set! (-> arg0 surf) *edge-surface*) (set! sv-104 (logior (cshape-reaction-flags csrf16) sv-104)) (vector-flatten! arg2 (vector-negate! (new 'stack-no-clear 'vector) (-> arg0 dynam gravity-normal)) sv-84) - (vector-normalize! arg2 (vector-dot arg2 (the-as vector (-> sv-88 vector)))) + (vector-normalize! arg2 (vector-dot arg2 (-> sv-88 vector 0))) ) (else - (vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84) + (vector-reflect-flat! arg2 (-> sv-88 vector 0) sv-84) ) ) (cond @@ -399,7 +395,7 @@ (set! sv-104 (logclear sv-104 (cshape-reaction-flags csrf06))) (let ((s3-4 (vector-cross! (new 'stack-no-clear 'vector) (-> arg0 poly-normal) (-> arg0 ground-poly-normal)))) (vector-normalize! s3-4 1.0) - (vector-float*! arg2 s3-4 (vector-dot (the-as vector (-> sv-88 vector)) s3-4)) + (vector-float*! arg2 s3-4 (vector-dot (-> sv-88 vector 0) s3-4)) ) (vector+! arg2 arg2 (-> arg0 poly-normal)) ) @@ -418,20 +414,16 @@ (!= (-> arg0 cur-pat mode) 3) (!= (-> arg0 ground-pat mode) 3) ) - (vector-reflect-flat-gravity! arg2 (the-as vector (-> sv-88 vector)) sv-84 (-> arg0 dynam gravity-normal)) - (vector-reflect-flat! arg2 (the-as vector (-> sv-88 vector)) sv-84) + (vector-reflect-flat-gravity! arg2 (-> sv-88 vector 0) sv-84 (-> arg0 dynam gravity-normal)) + (vector-reflect-flat! arg2 (-> sv-88 vector 0) sv-84) ) (vector+! arg2 arg2 sv-84) (let ((f0-32 (-> arg0 current-surface slope-change-preserve))) (when (< 0.0 f0-32) (let ((v1-223 (new-stack-vector0))) - (let ((f1-25 (vector-dot (-> arg0 pre-collide-local-normal) (the-as vector (-> sv-88 vector))))) + (let ((f1-25 (vector-dot (-> arg0 pre-collide-local-normal) (-> sv-88 vector 0)))) 0.0 - (vector-! - v1-223 - (the-as vector (-> sv-88 vector)) - (vector-float*! v1-223 (-> arg0 pre-collide-local-normal) f1-25) - ) + (vector-! v1-223 (-> sv-88 vector 0) (vector-float*! v1-223 (-> arg0 pre-collide-local-normal) f1-25)) ) (let ((f1-26 (vector-length v1-223))) f1-26 @@ -590,11 +582,7 @@ (let ((gp-0 *edge-grab-info*)) (when (-> gp-0 found-edge?) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) (set! (-> self control edge-grab-across-edge-dir quad) (-> gp-0 hanging-matrix quad 0)) diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-blue-shot_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-blue-shot_REF.gc index 32a1b0595e3..23f73c8b686 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-blue-shot_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-blue-shot_REF.gc @@ -136,8 +136,8 @@ (s1-0 (new 'stack-no-clear 'vector)) (s3-2 (new 'stack-no-clear 'vector)) ) - (vector-cross! (the-as vector (-> a1-7 vector)) *y-vector* s2-0) - (vector-cross! (-> a1-7 vector 1) s2-0 (the-as vector (-> a1-7 vector))) + (vector-cross! (-> a1-7 vector 0) *y-vector* s2-0) + (vector-cross! (-> a1-7 vector 1) s2-0 (-> a1-7 vector 0)) (set! (-> a1-7 vector 2 quad) (-> s2-0 quad)) (matrix->eul (the-as euler-angles s1-0) a1-7 21) (vector-negate! s3-2 s1-0) @@ -148,8 +148,8 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-14 quad) vf5) ) (sparticle-set-conerot s5-0 s3-2) diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-dark-shot_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-dark-shot_REF.gc index 0d7ae3b887a..875a51434ca 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-dark-shot_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-dark-shot_REF.gc @@ -406,7 +406,7 @@ (vector-float*! (-> s5-0 vector 1) (-> s5-0 vector 1) (/ 1.0 f30-0)) ) ) - (vector-cross! (the-as vector (-> s5-0 vector)) (-> s5-0 vector 1) (-> s5-0 vector 2)) + (vector-cross! (-> s5-0 vector 0) (-> s5-0 vector 1) (-> s5-0 vector 2)) (matrix->quaternion (-> self root quat) s5-0) ) (vector+! (-> self core-position) (-> self core-position) (-> self core-velocity)) @@ -419,8 +419,8 @@ (.mov at-0 f0-12) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-31 quad) vf1) ) (projectile-move-fill-line-sphere self) diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-red-shot_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-red-shot_REF.gc index e3c71eed91c..46963b4bedd 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-red-shot_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-red-shot_REF.gc @@ -82,9 +82,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-2 quad) vf6) (set! (-> s5-2 w) 24576.0) (when (and (sphere-in-view-frustum? (the-as sphere s5-2)) @@ -286,8 +286,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w))) @@ -327,8 +327,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w))) @@ -419,8 +419,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-2 quad) vf1) ) (integrate-and-collide! gp-0 (-> gp-0 transv)) diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc index 2ee39d3da8a..db4a270c4c5 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-util_REF.gc @@ -224,14 +224,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) @@ -259,14 +259,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) @@ -836,16 +836,16 @@ (logtest? (surface-flag gun-direct) (-> (the-as target gp-0) control current-surface flags)) ) (vector-! - (the-as vector (-> (the-as target gp-0) gun fire-dir)) + (-> (the-as target gp-0) gun fire-dir 0) (-> (the-as target gp-0) gun track-trans) (-> (the-as target gp-0) gun fire-point) ) - (vector-normalize! (the-as vector (-> (the-as target gp-0) gun fire-dir)) 1.0) + (vector-normalize! (-> (the-as target gp-0) gun fire-dir 0) 1.0) (set! (-> (the-as target gp-0) gun fire-dir-out quad) (-> (the-as target gp-0) gun fire-dir 0 quad)) ) (else (vector-normalize-copy! - (the-as vector (-> (the-as target gp-0) gun fire-dir)) + (-> (the-as target gp-0) gun fire-dir 0) (-> (the-as gun self) node-list data 13 bone transform vector 2) 1.0 ) @@ -856,7 +856,7 @@ ) (vector-rotate-y! (-> (the-as target gp-0) gun fire-dir-out) - (the-as vector (-> (the-as target gp-0) gun fire-dir)) + (-> (the-as target gp-0) gun fire-dir 0) (-> (the-as target gp-0) gun fire-dir-rot) ) ) @@ -972,10 +972,10 @@ (let ((s5-0 (-> this laser-point)) (s4-0 (new 'stack-no-clear 'collide-query)) (s3-0 (-> this laser-dir)) - (f30-0 (rotate-y<-vector+vector (the-as vector (-> this laser-dir)) (-> this laser-dir 1))) + (f30-0 (rotate-y<-vector+vector (-> this laser-dir 0) (-> this laser-dir 1))) ) - (vector+float*! (-> s4-0 start-pos) s5-0 (the-as vector s3-0) -8192.0) - (vector-float*! (-> s4-0 move-dist) (the-as vector s3-0) 163840.0) + (vector+float*! (-> s4-0 start-pos) s5-0 (-> s3-0 0) -8192.0) + (vector-float*! (-> s4-0 move-dist) (-> s3-0 0) 163840.0) (let ((v1-13 s4-0)) (set! (-> v1-13 radius) (-> this track-beam-size)) (set! (-> v1-13 collide-with) (-> this process 0 control root-prim prim-core collide-with)) @@ -990,7 +990,7 @@ (cond ((>= f0-3 0.0) (vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) (-> s4-0 move-dist) f0-3) - (vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) (the-as vector s3-0) (-> this track-beam-size)) + (vector+float*! (-> s4-0 start-pos) (-> s4-0 start-pos) (-> s3-0 0) (-> this track-beam-size)) (let* ((s2-0 (-> s4-0 best-other-tri collide-ptr)) (s0-0 (if (type? s2-0 collide-shape-prim) (the-as collide-shape-prim s2-0) diff --git a/test/decompiler/reference/jak2/engine/target/gun/gun-yellow-shot_REF.gc b/test/decompiler/reference/jak2/engine/target/gun/gun-yellow-shot_REF.gc index 073b3691976..a0c2a067ef0 100644 --- a/test/decompiler/reference/jak2/engine/target/gun/gun-yellow-shot_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/gun/gun-yellow-shot_REF.gc @@ -110,9 +110,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 223 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 223 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) diff --git a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc index 752b3a61051..602edc51d02 100644 --- a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc @@ -671,7 +671,7 @@ (set! (-> a1-0 y) 10240.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-34) a0-13 a1-0) + (vector-! (-> v1-34 min) a0-13 a1-0) ) (let ((v1-36 (-> gp-0 bbox max)) (a0-15 (-> self control trans)) @@ -982,7 +982,7 @@ (-> self control dynam gravity-normal) (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> self control collision-spheres 1 prim-core)) + (-> self control collision-spheres 1 prim-core world-sphere) (-> self control wall-contact-pt) ) ) @@ -1277,9 +1277,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (vector-float*! (new 'stack-no-clear 'vector) (-> arg0 user-normal) -8192.0) (let ((s4-1 (new 'stack-no-clear 'vector))) @@ -1294,9 +1294,9 @@ (.lvf vf5 (&-> v1-16 quad)) ) (.lvf vf4 (&-> s3-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (let ((a1-8 s4-1)) @@ -1312,9 +1312,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (let ((a1-9 s5-0)) @@ -1327,9 +1327,9 @@ ) (.lvf vf4 (&-> v1-18 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) ) @@ -1361,7 +1361,7 @@ (set! (-> a1-0 y) 6144.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-1 a1-0) + (vector-! (-> v1-0 min) a0-1 a1-0) ) (let ((v1-2 (-> gp-0 bbox max)) (a0-3 (-> self control trans)) @@ -1421,9 +1421,9 @@ ) (.lvf vf4 (&-> a0-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-8 quad) vf6) ) (let ((a1-9 s2-0)) @@ -1436,9 +1436,9 @@ ) (.lvf vf4 (&-> a0-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((f0-13 (lerp-scale 1.0 0.0 (- (-> s2-0 y) (-> self control gspot-pos y)) 819.2 2048.0))) @@ -1454,9 +1454,9 @@ ) (.lvf vf4 (&-> v1-63 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) (vector-float*! (-> gp-0 move-dist) s1-0 -8192.0) @@ -1489,9 +1489,9 @@ ) (.lvf vf4 (&-> v1-77 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-19 quad) vf6) ) (set! (-> self leg-ik s5-0 user-position quad) (-> s3-0 quad)) @@ -2009,7 +2009,7 @@ (set! (-> v1-13 quad 2) a2-1) (set! (-> v1-13 trans quad) a3-1) ) - (vector-matrix*! (-> gp-0 scale) (the-as vector (-> s5-0 pilot-edge-grab)) (-> gp-0 transform)) + (vector-matrix*! (-> gp-0 scale) (-> s5-0 pilot-edge-grab local-pos) (-> gp-0 transform)) (vector-rotate*! (the-as vector (&+ gp-0 80)) (-> s5-0 pilot-edge-grab local-dir) (-> gp-0 transform)) (set! (-> s5-0 center-hold quad) (-> gp-0 scale quad)) (set! (-> self control edge-grab-edge-dir quad) (-> (&+ gp-0 80) transform quad 0)) @@ -2030,11 +2030,7 @@ ) (set! (-> self control ground-pat) (the-as pat-surface (-> s5-0 edge-tri-pat))) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> s5-0 world-vertex)) - (-> s5-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s5-0 world-vertex 0) (-> s5-0 world-vertex 1)) 1.0 ) ) @@ -2165,7 +2161,7 @@ (set! (-> v1-13 quad 2) a2-1) (set! (-> v1-13 trans quad) a3-1) ) - (vector-matrix*! (-> s5-0 scale) (the-as vector (-> gp-0 pilot-edge-grab)) (-> s5-0 transform)) + (vector-matrix*! (-> s5-0 scale) (-> gp-0 pilot-edge-grab local-pos) (-> s5-0 transform)) (vector-rotate*! (the-as vector (&+ s5-0 80)) (-> gp-0 pilot-edge-grab local-dir) (-> s5-0 transform)) (set! (-> gp-0 center-hold quad) (-> s5-0 scale quad)) (set! (-> self control edge-grab-edge-dir quad) (-> (&+ s5-0 80) transform quad 0)) @@ -2185,11 +2181,7 @@ (debug-draw gp-0) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) ) @@ -2331,7 +2323,7 @@ ) ) ) - (vector<-cspace! s5-0 (the-as cspace (-> self node-list data))) + (vector<-cspace! s5-0 (-> self node-list data 0)) (if (not (and (logtest? (-> self water flags) (water-flags under-water)) (not (logtest? (-> self water flags) (water-flags swim-ground))) ) @@ -2370,7 +2362,7 @@ ) (logtest? (-> self water flags) (water-flags mud)) ) - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) (set! (-> self control camera-pos y) (-> self water base-height)) ) ((focus-test? self tube) @@ -2380,7 +2372,7 @@ (set! (-> self control camera-pos quad) (-> self control trans quad)) ) (else - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) ) ) ) @@ -2453,10 +2445,7 @@ ) (vector-matrix*! (-> self control ctrl-to-head-offset) (-> *TARGET-bank* head-offset) a2-5) ) - (vector<-cspace! - (the-as vector (&-> (-> self control) sidekick-root bone)) - (-> self control sidekick-root parent) - ) + (vector<-cspace! (the-as vector (&-> self control sidekick-root bone)) (-> self control sidekick-root parent)) (let ((gp-0 (new-stack-vector0)) (s5-0 (new-stack-vector0)) ) diff --git a/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc index 5880f35c075..f21c92c2284 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/carry-h_REF.gc @@ -389,7 +389,7 @@ (set! (-> s5-1 quad 2) a1-3) (set! (-> s5-1 trans quad) a2-4) ) - (vector-normalize! (the-as vector (-> s5-1 vector)) 1.0) + (vector-normalize! (-> s5-1 vector 0) 1.0) (vector-normalize! (-> s5-1 vector 1) 1.0) (vector-normalize! (-> s5-1 vector 2) 1.0) (vector-reset! (-> s5-1 trans)) diff --git a/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc index 3c08862da7e..b011dc3b0b4 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/grunt-mech_REF.gc @@ -343,11 +343,11 @@ (vector-! a1-2 v1-4 (-> this root trans)) (.lvf vf1 (&-> a1-2 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let ((f0-0 v1-5) (f1-0 28672.0) @@ -466,22 +466,22 @@ (vector-normalize-copy! (-> s5-0 travel) arg0 (the-as float arg1)) (set! (-> s5-0 pref-dir quad) (-> s5-0 travel quad)) (avoid-spheres-1! (-> this nav) s5-0) - (when (>= (fabs (vector-dot (the-as vector (-> s5-0 out-travel)) arg2)) 0.0) + (when (>= (fabs (vector-dot (-> s5-0 out-travel 0) arg2)) 0.0) (let ((t0-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) (-> this nav state current-poly) - (the-as vector (-> s5-0 out-travel)) + (-> s5-0 out-travel 0) t0-0 ) ) (.lvf vf1 (&-> (-> s5-0 out-travel) 0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f0-3 v1-13) (f1-1 14336.0) @@ -492,7 +492,7 @@ (set! (-> a1-3 w) (-> this nav-radius-backup)) (when (not (add-root-sphere-to-hash! (-> this nav) a1-3 #x80068)) (let ((s4-1 (new 'stack-no-clear 'vector))) - (vector+! s4-1 (-> this root trans) (the-as vector (-> s5-0 out-travel))) + (vector+! s4-1 (-> this root trans) (-> s5-0 out-travel 0)) (let ((s5-1 (new 'stack-no-clear 'collide-query))) (when (enemy-above-ground? this s5-1 s4-1 (the-as collide-spec (-> this gnd-collide)) 4096.0 122880.0 1024.0) (set! (-> s4-1 y) (-> s5-1 best-other-tri intersect y)) diff --git a/test/decompiler/reference/jak2/engine/target/mech/mech-part_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/mech-part_REF.gc index ef46d1d0600..f7b34dc5e7c 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/mech-part_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/mech-part_REF.gc @@ -164,9 +164,9 @@ (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-3 quad) vf6) ) (set! (-> arg0 part-thruster-scale-x initial-valuef) arg3) diff --git a/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc index 7977192d6d0..ba768cb60ff 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc @@ -380,7 +380,7 @@ (set! (-> self mech walk-anim-leg) 1) (set! s5-0 jakb-mech-punch-l-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (the-as process-drawable (ppointer->process (-> self manipy))) 7 6963.2 @@ -391,7 +391,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-r-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (the-as process-drawable (ppointer->process (-> self manipy))) 17 6963.2 @@ -402,7 +402,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-b-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (the-as process-drawable (ppointer->process (-> self manipy))) 39 11141.12 @@ -413,7 +413,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-u-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (the-as process-drawable (ppointer->process (-> self manipy))) 39 11141.12 diff --git a/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc index 140b01a8241..cf0caf06b31 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/mech_REF.gc @@ -190,7 +190,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc index 3ea95cde553..2088c9c5e96 100644 --- a/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/sidekick_REF.gc @@ -126,15 +126,15 @@ (.lvf vf5 (&-> s4-0 quad 2)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) + (.mul.vf.xyz vf2 vf2 Q) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) (.mul.x.vf acc vf3 vf6) (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> s4-0 trans quad) vf2) (.svf (&-> s4-0 quad 0) vf3) (.svf (&-> s4-0 quad 1) vf4) diff --git a/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc b/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc index d98b11b35f4..4fed6b91996 100644 --- a/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-darkjak_REF.gc @@ -1506,10 +1506,10 @@ (set! (-> sv-176 y) (rand-vu-float-range -8192.0 8192.0)) (set! (-> sv-176 z) (rand-vu-float-range -40960.0 40960.0)) (set! (-> sv-176 w) 1.0) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-160 quad)) (.lvf vf5 (&-> sv-176 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-192 quad) vf6) ((the-as (function object object object object object object object object none) s5-1) s4-1 diff --git a/test/decompiler/reference/jak2/engine/target/target-death_REF.gc b/test/decompiler/reference/jak2/engine/target/target-death_REF.gc index 789a2fe35d7..acd25da169f 100644 --- a/test/decompiler/reference/jak2/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-death_REF.gc @@ -935,7 +935,7 @@ (logclear! (-> self focus-status) (focus-status dead hit)) (logclear! (-> self state-flags) (state-flags disable-attacks)) ) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) (target-exit) ) :trans (behavior () @@ -1317,7 +1317,7 @@ (compute-alignment! (-> self align)) (let ((gp-0 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-0 (-> self clock frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc b/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc index 127f8e1e390..00a894098a6 100644 --- a/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-gun_REF.gc @@ -168,10 +168,7 @@ (set! (-> self skel interp-select 1) 0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) (set! (-> self gun combo-window-state) #f) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (reset-to-collide-spec (-> self gun track-target 1) (collide-spec jak player-list)) (add-connection *pad-engine* self target-gun-marking-menu self #f #f) ) @@ -219,10 +216,7 @@ (set! (-> self gun track-tilt) 0.0) (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun turn-fast-hold-time) 0) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (set! (-> self gun fire-dir-rot) 0.0) (set! (-> self control unknown-float003) 0.0) (set! (-> self gun blue-whine-volume) 0.0) @@ -1269,10 +1263,7 @@ (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) (set! (-> self gun track-trans quad) (-> (get-trans (the-as process-focusable gp-0) 3) quad)) - (when ((method-of-type focus try-update-focus) - (the-as focus (-> self gun track-target)) - (the-as process-focusable gp-0) - ) + (when ((method-of-type focus try-update-focus) (-> self gun track-target 0) (the-as process-focusable gp-0)) (set-time! (-> self gun track-start-time)) (if (not (time-elapsed? (-> self control time-of-last-nonzero-input) (seconds 0.2))) (set-time! (-> self gun track-press-start-time)) @@ -1323,7 +1314,7 @@ ) (set! (-> self gun track?) (gun-track-flags gutflags-1 gutflags-2)) (set! (-> self gun track-target-hold-time) 0) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) ) (else (let ((a1-21 (new 'stack-no-clear 'event-message-block))) @@ -1565,10 +1556,7 @@ (the-as process-focusable gp-0) (current-time) ) - ((method-of-type focus try-update-focus) - (the-as focus (-> self gun track-target)) - (the-as process-focusable gp-0) - ) + ((method-of-type focus try-update-focus) (-> self gun track-target 0) (the-as process-focusable gp-0)) (try-update-focus (-> self gun track-target 1) (the-as process-focusable gp-0)) (set! (-> self gun track-trans quad) (-> (get-trans (the-as process-focusable gp-0) 3) quad)) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) @@ -2102,10 +2090,10 @@ ) (matrix-rotate-xyz! gp-0 a1-5) (matrix->quaternion s5-0 gp-0) - (vector+! (the-as vector (-> self gun gun-pos)) (-> *edge-grab-info* center-hold) s4-0) + (vector+! (-> self gun gun-pos trans) (-> *edge-grab-info* center-hold) s4-0) (vector+float*! - (the-as vector (-> self gun gun-pos)) - (the-as vector (-> self gun gun-pos)) + (-> self gun gun-pos trans) + (-> self gun gun-pos trans) (-> self node-list data 0 bone transform vector 2) 778.24 ) diff --git a/test/decompiler/reference/jak2/engine/target/target-handler_REF.gc b/test/decompiler/reference/jak2/engine/target/target-handler_REF.gc index d71dc8531fa..ebc25488f56 100644 --- a/test/decompiler/reference/jak2/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-handler_REF.gc @@ -1101,8 +1101,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-15 quad) vf1) ) (set-time! (-> self control additional-decaying-velocity-end-time)) @@ -1475,7 +1475,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 diff --git a/test/decompiler/reference/jak2/engine/target/target-part_REF.gc b/test/decompiler/reference/jak2/engine/target/target-part_REF.gc index 8715c9290d3..341194b8cd9 100644 --- a/test/decompiler/reference/jak2/engine/target/target-part_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-part_REF.gc @@ -79,14 +79,14 @@ ((< (-> s3-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s3-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s3-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) @@ -128,14 +128,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) @@ -173,14 +173,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-3 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-4 vf1) ) @@ -2920,8 +2920,8 @@ (.lvf vf4 (&-> sv-528 quad)) (.lvf vf5 (&-> v0-10 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-544 quad) vf6) (vector-normalize! s0-2 1.0) (set! sv-560 (get-process *default-dead-pool* lightning-tracker #x4000)) @@ -2956,9 +2956,9 @@ ) (.lvf vf4 (&-> v1-46 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-32 quad) vf6) ) (set-point! s4-1 (-> s4-1 state points-to-draw) s3-1) @@ -2982,9 +2982,9 @@ ) (.lvf vf4 (&-> v1-58 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-40 quad) vf6) ) (set! sv-608 s4-1) diff --git a/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc b/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc index 77902b175bb..1b56da95385 100644 --- a/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-tube_REF.gc @@ -969,7 +969,7 @@ (compute-alignment! (-> self align)) (let ((gp-2 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-2 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-2 (-> self clock frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-turret-shot_REF.gc b/test/decompiler/reference/jak2/engine/target/target-turret-shot_REF.gc index f75833ce8c3..668962aff3d 100644 --- a/test/decompiler/reference/jak2/engine/target/target-turret-shot_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-turret-shot_REF.gc @@ -279,9 +279,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 915 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 915 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc index eb1559192e2..7f88f1455cd 100644 --- a/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-turret_REF.gc @@ -299,9 +299,9 @@ (dotimes (v1-3 30) (set! (-> this sprites v1-3 color w) (the int (* (-> this fade-interp) (- 1.0 (-> this offset))))) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 44 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 44 44) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 44 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 44 44) (dotimes (v1-6 16) (set! (-> this sprites (- 19 v1-6) scale-x) (if (< v1-6 (-> this values 0 current)) 0.7 @@ -309,22 +309,22 @@ ) ) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 13 6) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 25 10) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 34 19) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 39 32) - (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites)) 39 47) - (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites)) 34 59) - (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites)) 25 67) - (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites)) 13 71) - (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites)) -1 71) - (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites)) -14 67) - (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites)) -22 59) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites)) -27 47) - (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites)) -27 32) - (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites)) -22 19) - (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites)) -14 10) - (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites)) -1 6) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 13 6) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 25 10) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) 34 19) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 0 pos) 39 32) + (set-as-offset-from! (-> this sprites 8) (-> this sprites 0 pos) 39 47) + (set-as-offset-from! (-> this sprites 9) (-> this sprites 0 pos) 34 59) + (set-as-offset-from! (-> this sprites 10) (-> this sprites 0 pos) 25 67) + (set-as-offset-from! (-> this sprites 11) (-> this sprites 0 pos) 13 71) + (set-as-offset-from! (-> this sprites 12) (-> this sprites 0 pos) -1 71) + (set-as-offset-from! (-> this sprites 13) (-> this sprites 0 pos) -14 67) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) -22 59) + (set-as-offset-from! (-> this sprites 15) (-> this sprites 0 pos) -27 47) + (set-as-offset-from! (-> this sprites 16) (-> this sprites 0 pos) -27 32) + (set-as-offset-from! (-> this sprites 17) (-> this sprites 0 pos) -22 19) + (set-as-offset-from! (-> this sprites 18) (-> this sprites 0 pos) -14 10) + (set-as-offset-from! (-> this sprites 19) (-> this sprites 0 pos) -1 6) (let ((f0-9 (the float (-> this values 1 current)))) (cond ((>= f0-9 100.0) @@ -366,15 +366,15 @@ ) ) ) - (set-as-offset-from! (-> this sprites 20) (the-as vector4w (-> this sprites)) 0 45) - (set-as-offset-from! (-> this sprites 22) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 24) (the-as vector4w (-> this sprites)) 2 44) - (set-as-offset-from! (-> this sprites 26) (the-as vector4w (-> this sprites)) 2 45) - (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites)) 0 14) - (set-as-offset-from! (-> this sprites 23) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 25) (the-as vector4w (-> this sprites)) -30 44) - (set-as-offset-from! (-> this sprites 27) (the-as vector4w (-> this sprites)) -30 14) - (set-as-offset-from! (-> this sprites 29) (the-as vector4w (-> this sprites)) -10 36) + (set-as-offset-from! (-> this sprites 20) (-> this sprites 0 pos) 0 45) + (set-as-offset-from! (-> this sprites 22) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 24) (-> this sprites 0 pos) 2 44) + (set-as-offset-from! (-> this sprites 26) (-> this sprites 0 pos) 2 45) + (set-as-offset-from! (-> this sprites 21) (-> this sprites 0 pos) 0 14) + (set-as-offset-from! (-> this sprites 23) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 25) (-> this sprites 0 pos) -30 44) + (set-as-offset-from! (-> this sprites 27) (-> this sprites 0 pos) -30 14) + (set-as-offset-from! (-> this sprites 29) (-> this sprites 0 pos) -10 36) (let ((f0-34 (if (and (= (-> this values 4 current) 1) (< 25 (mod (-> *display* game-clock frame-counter) 50))) 250.0 100.0 @@ -412,7 +412,7 @@ ) (set-as-offset-from! (-> this sprites 28) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (the int (* -70.0 (sin f30-0))) (+ (the int (* -70.0 (cos f30-0))) 44) ) @@ -457,7 +457,7 @@ ) (('set-hud-pos) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as int (-> arg3 param 0)) (the-as int (+ (-> arg3 param 1) -4)) ) @@ -1145,7 +1145,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special @@ -1562,7 +1562,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special @@ -2117,9 +2117,9 @@ (.mov vf3 v1-25) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-144 quad) vf4) (vector-! s1-0 s0-0 s4-1) (vector-! s2-1 s0-0 s3-1) @@ -2255,7 +2255,7 @@ (when (not (paused?)) (let ((gp-0 (handle->process (-> *camera* focus handle)))) (when gp-0 - (quaternion->matrix (the-as matrix (-> self tracking)) (get-quat (the-as process-focusable gp-0) 1)) + (quaternion->matrix (-> self tracking inv-mat) (get-quat (the-as process-focusable gp-0) 1)) (let ((v1-9 (handle->process (-> (the-as target gp-0) turret handle)))) (if v1-9 (vector<-cspace! (-> self trans) (-> (the-as process-focusable v1-9) node-list data 12)) diff --git a/test/decompiler/reference/jak2/engine/target/target-util_REF.gc b/test/decompiler/reference/jak2/engine/target/target-util_REF.gc index 21975fa2cba..ad576252fb3 100644 --- a/test/decompiler/reference/jak2/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-util_REF.gc @@ -1699,11 +1699,11 @@ ) ) (.lvf vf1 (&-> (-> arg0 trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-14 vf1) (cond ((!= v1-14 0.0) diff --git a/test/decompiler/reference/jak2/engine/target/target2_REF.gc b/test/decompiler/reference/jak2/engine/target/target2_REF.gc index 4e2ef08d926..122e4209cd2 100644 --- a/test/decompiler/reference/jak2/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target2_REF.gc @@ -944,7 +944,7 @@ (target-compute-edge-rider) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s4-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s4-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) s4-0) ) (suspend) @@ -986,7 +986,7 @@ (until (ja-done? 0) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) gp-0) ) (suspend) diff --git a/test/decompiler/reference/jak2/engine/ui/bigmap_REF.gc b/test/decompiler/reference/jak2/engine/ui/bigmap_REF.gc index 1006b182d21..5791fc61380 100644 --- a/test/decompiler/reference/jak2/engine/ui/bigmap_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/bigmap_REF.gc @@ -10,7 +10,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> this offset quad)) - (.add.z.vf vf1 vf0 vf1 :mask #b10) + (.add.z.vf.y vf1 vf0 vf1) (.sub.vf vf1 vf1 vf2) (.mul.w.vf vf1 vf1 vf2) (.ftoi.vf vf1 vf1) @@ -384,7 +384,7 @@ (-> arg1 class) (.lvf vf1 (&-> arg1 last-world-pos quad)) (.lvf vf2 (&-> this draw-offset quad)) - (.add.z.vf vf1 vf0 vf1 :mask #b10) + (.add.z.vf.y vf1 vf0 vf1) (.sub.vf vf1 vf1 vf2) (.mul.w.vf vf1 vf1 vf2) (.ftoi.vf vf1 vf1) @@ -684,7 +684,7 @@ (set-vector! (-> this corner 1) 7.0 0.0 0.0 1.0) (set-vector! (-> this corner 2) -7.0 0.0 0.0 1.0) (set-vector! (-> this corner 3) 0.0 0.0 7.0 1.0) - (vector-matrix*! (the-as vector (-> this corner)) (the-as vector (-> this corner)) sv-104) + (vector-matrix*! (-> this corner 0) (-> this corner 0) sv-104) (vector-matrix*! (-> this corner 1) (-> this corner 1) sv-104) (vector-matrix*! (-> this corner 2) (-> this corner 2) sv-104) (vector-matrix*! (-> this corner 3) (-> this corner 3) sv-104) diff --git a/test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc b/test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc index fab050bce06..abdb132d824 100644 --- a/test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/hud-classes_REF.gc @@ -9,7 +9,7 @@ (the int (+ 492.0 (* 140.0 (-> this offset)))) (the int (+ 281.0 (* 140.0 (-> this offset)))) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) 11 -11) (set! (-> this sprites 0 color w) (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) ) @@ -35,8 +35,8 @@ (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3) - (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 2 -3) + (draw-1 *minimap* s4-0 (-> this sprites 2 pos) #t) ) ) ((zero? (-> *setting-control* user-current race-minimap)) @@ -52,8 +52,8 @@ (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 10 -15) - (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 10 -15) + (draw-sprite2 *minimap* s4-2 (-> this sprites 2 pos) #t) ) ) ) @@ -71,8 +71,8 @@ (with-dma-buffer-add-bucket ((s4-4 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 20 -8) - (draw-sprite2 *minimap* s4-4 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 20 -8) + (draw-sprite2 *minimap* s4-4 (-> this sprites 2 pos) #t) ) ) ) @@ -90,8 +90,8 @@ (with-dma-buffer-add-bucket ((s4-6 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 10 -8) - (draw-sprite2 *minimap* s4-6 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 10 -8) + (draw-sprite2 *minimap* s4-6 (-> this sprites 2 pos) #t) ) ) ) @@ -167,26 +167,26 @@ ) (the int (+ 306.0 (* 130.0 (-> this offset)))) ) - (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites 8)) 40 0) - (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites 8)) 0 40) - (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites 8)) 2 32) - (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites 8)) 7 60) - (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites 8)) 40 60) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites 8)) 63 32) - (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites 8)) 63 16) - (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites 8)) 41 4) - (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites 8)) 6 4) - (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites 8)) 2 17) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites 8)) 40 40) - (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites 8)) 25 25) + (set-as-offset-from! (-> this sprites 9) (-> this sprites 8 pos) 40 0) + (set-as-offset-from! (-> this sprites 10) (-> this sprites 8 pos) 0 40) + (set-as-offset-from! (-> this sprites 11) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 12) (-> this sprites 8 pos) 2 32) + (set-as-offset-from! (-> this sprites 13) (-> this sprites 8 pos) 7 60) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 8 pos) 40 60) + (set-as-offset-from! (-> this sprites 15) (-> this sprites 8 pos) 63 32) + (set-as-offset-from! (-> this sprites 16) (-> this sprites 8 pos) 63 16) + (set-as-offset-from! (-> this sprites 17) (-> this sprites 8 pos) 41 4) + (set-as-offset-from! (-> this sprites 18) (-> this sprites 8 pos) 6 4) + (set-as-offset-from! (-> this sprites 19) (-> this sprites 8 pos) 2 17) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 8 pos) 40 40) + (set-as-offset-from! (-> this sprites 21) (-> this sprites 8 pos) 25 25) (let ((v1-12 (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) ) @@ -352,7 +352,7 @@ (set! f30-0 (-> (the-as hud-health v1-0) offset)) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) (the int (+ 13.0 (* -130.0 f30-0))) (the int (+ 25.0 (* -130.0 f30-0))) @@ -363,7 +363,7 @@ ((or (= (-> this values 2 target) 100) (= (-> *target* game eco-pill-dark) 100.0)) (set! (-> this sprites 0 tex) (get-texture hud-darkjak-head-01 level-default-minimap)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) (the int (+ 13.0 (* -130.0 f30-0))) (the int (+ 25.0 (* -130.0 f30-0))) @@ -384,7 +384,7 @@ (else (set! (-> this sprites 0 tex) (get-texture hud-jak-head-01 level-default-minimap)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) (the int (+ 29.0 (* -130.0 f30-0))) (the int (+ 36.0 (* -130.0 f30-0))) @@ -451,7 +451,7 @@ 150 ) (set-as-offset-from! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as vector4w (-> this icons 0 pos)) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) -27 @@ -509,7 +509,7 @@ 270 ) (set-as-offset-from! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as vector4w (-> this icons 0 pos)) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) -19 @@ -582,13 +582,9 @@ ;; definition for method 15 of type hud-score ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-score)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 480.0 (* 130.0 (-> this offset)))) - 140 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 480.0 (* 130.0 (-> this offset)))) 140) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -12 8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -12 8) ((method-of-type hud draw) this) 0 (none) @@ -624,11 +620,7 @@ ;; definition for method 15 of type hud-timer ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-timer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 264 - (the int (+ 50.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 264 (the int (+ 50.0 (* -100.0 (-> this offset))))) (format (clear (-> this strings 0 text)) "~1,'0D" (/ (-> this values 0 current) 10)) (format (clear (-> this strings 1 text)) "~1,'0D" (mod (-> this values 0 current) 10)) (format (clear (-> this strings 2 text)) ":") @@ -637,20 +629,15 @@ (let ((s5-5 20) (s4-0 -42) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) s4-0 -24) (let ((s4-1 (+ s4-0 s5-5))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) s4-1 -24) (let ((s4-2 (+ s4-1 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this sprites 0 pos) s4-2 -24) (let ((s4-3 (+ s4-2 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this sprites 0 pos) s4-3 -24) (let ((a2-13 (+ s4-3 s5-5))) - (set-as-offset-from! - (the-as hud-sprite (-> this strings 4 pos)) - (the-as vector4w (-> this sprites)) - a2-13 - -24 - ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 4 pos)) (-> this sprites 0 pos) a2-13 -24) ) ) ) @@ -706,13 +693,9 @@ ;; definition for method 15 of type hud-big-score ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-big-score)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 264 - (the int (+ 50.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 264 (the int (+ 50.0 (* -100.0 (-> this offset))))) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -7 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -7 -24) ((method-of-type hud draw) this) 0 (none) @@ -749,14 +732,10 @@ ;; definition for method 15 of type hud-goal ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-goal)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 65.0 (* -130.0 (-> this offset)))) - 70 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 65.0 (* -130.0 (-> this offset)))) 70) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) @@ -803,11 +782,7 @@ ;; definition for method 15 of type hud-miss ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-miss)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 448.0 (* 130.0 (-> this offset)))) - 70 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 448.0 (* 130.0 (-> this offset)))) 70) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) (let ((s5-1 format) (s4-0 (clear (-> this strings 1 text))) @@ -816,8 +791,8 @@ (format (clear *temp-string*) (lookup-text! *common-text* (text-id miss) #f)) (s5-1 s4-0 s3-0 *temp-string*) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) @@ -868,13 +843,13 @@ (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) 256 (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y))) ) (set-as-offset-from! (-> this sprites 1) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42) 0 ) @@ -976,7 +951,7 @@ (set! s3-0 (* s3-0 2)) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- (the int (+ 507.0 (* 130.0 (-> this offset)))) s4-0) (the int (+ (- 25.0 (the float s5-0)) (* -100.0 (-> this offset)))) ) @@ -985,22 +960,22 @@ ((zero? (-> this values 0 current)) (set! f30-0 0.0) (set! (-> this strings 0 pos 0) 0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -3 0) ) (else - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 11) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -4 11) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ s4-0 -70) (+ s5-0 18) ) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) (+ s4-0 -68) (+ (if (= s2-0 20) - 98 - 73 - ) - s5-0 - ) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) (+ s4-0 -68) (+ (if (= s2-0 20) + 98 + 73 + ) + s5-0 + ) ) (set! (-> this sprites 6 scale-x) 1.0) (let ((s0-0 (mod (-> this values 1 current) s2-0))) @@ -1017,12 +992,12 @@ (draw (-> this sprites 6) sv-32 (-> this level)) (+! (-> this sprites 6 pos y) -5) (if (= sv-16 (+ (/ s2-0 2) -1)) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) (+ s4-0 -83) (+ (if (= s2-0 20) - 98 - 73 - ) - s5-0 - ) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) (+ s4-0 -83) (+ (if (= s2-0 20) + 98 + 73 + ) + s5-0 + ) ) ) (set! sv-16 (+ sv-16 1)) @@ -1096,10 +1071,10 @@ ) ) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 1 current) s3-0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) (+ s4-0 -110) (+ s5-0 18)) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) (+ s4-0 -36) (+ s5-0 19)) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) (+ s4-0 -78) (+ s5-0 7)) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) (+ s4-0 -78) (+ s5-0 37)) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) (+ s4-0 -110) (+ s5-0 18)) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) (+ s4-0 -36) (+ s5-0 19)) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) (+ s4-0 -78) (+ s5-0 7)) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) (+ s4-0 -78) (+ s5-0 37)) ) ((method-of-type hud draw) this) 0 @@ -1155,9 +1130,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 7 5) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 7 5) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc b/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc index 5ee117a2b46..8cf36236821 100644 --- a/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/minimap_REF.gc @@ -1466,7 +1466,7 @@ (set-vector! (-> arg0 corner 2) (- f0-7) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-7 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-228) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-228) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-228) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-228) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-228) @@ -1597,7 +1597,7 @@ (set-vector! (-> arg0 corner 2) (- f0-11) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-11 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-140) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-140) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-140) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-140) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-140) @@ -1727,7 +1727,7 @@ (set-vector! (-> arg0 corner 2) f0-8 0.0 f0-8 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 (* 2.0 f0-8) 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -1878,7 +1878,7 @@ (set-vector! (-> arg0 corner 2) 0.0 0.0 (- f0-7) 1.0) (set-vector! (-> arg0 corner 3) f0-7 0.0 0.0 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -2010,7 +2010,7 @@ (set! (-> arg0 corner 3 x) (/ (-> this offset y) -4)) (set! (-> arg0 corner 3 z) (/ (-> this offset y) -4)) (set! (-> arg0 corner 3 w) 1.0) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) (-> arg0 mat)) @@ -2253,7 +2253,7 @@ (set-vector! (-> arg0 corner 2) (- f0-80) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-80 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) s1-2) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) s1-2) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) s1-2) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) s1-2) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) s1-2) diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc index 39a63200bf0..0b763ea29bc 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc @@ -1311,7 +1311,7 @@ (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-box draw-box-prim-only) (the-as hud-box (-> arg0 box)) s5-0) + ((method-of-type hud-box draw-box-prim-only) (-> arg0 box 0) s5-0) ) ) @@ -2445,11 +2445,11 @@ (set! (-> this sprites 0 scale-x) 0.7) (set! (-> this sprites 0 scale-y) 0.7) (set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93))) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 265 263) + (set-hud-piece-position! (-> this sprites 0) 265 263) (with-dma-buffer-add-bucket ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-8 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s1-8 (-> *level* default-level)) ) (+! (-> arg1 origin y) 1.0) (+! (-> arg1 origin x) 28.0) @@ -2464,11 +2464,11 @@ ) ) (set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 368 263) + (set-hud-piece-position! (-> this sprites 0) 368 263) (with-dma-buffer-add-bucket ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-10 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s1-10 (-> *level* default-level)) ) (+! (-> arg1 origin x) 100.0) (let ((s2-13 print-game-text)) @@ -2476,11 +2476,11 @@ (s2-13 *temp-string* arg1 #f 44 (bucket-id progress)) ) (set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 368 289) + (set-hud-piece-position! (-> this sprites 0) 368 289) (with-dma-buffer-add-bucket ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-12 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s1-12 (-> *level* default-level)) ) (+! (-> arg1 origin y) 28.0) (let ((s2-15 print-game-text)) @@ -2490,11 +2490,11 @@ (set! (-> this sprites 0 scale-x) 0.6) (set! (-> this sprites 0 scale-y) 0.6) (set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93))) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 253 290) + (set-hud-piece-position! (-> this sprites 0) 253 290) (with-dma-buffer-add-bucket ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-14 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s1-14 (-> *level* default-level)) ) (+! (-> arg1 origin x) -100.0) (let ((s2-17 print-game-text)) @@ -3151,11 +3151,11 @@ ) (set! (-> this sprites 0 pos z) #xffffff) (set! (-> this sprites 0 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160) + (set-hud-piece-position! (-> this sprites 0) 240 160) (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s3-0 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s3-0 (-> *level* default-level)) ) (let ((a0-16 arg1)) (set! (-> a0-16 flags) (font-flags kerning middle middle-vert large)) @@ -4949,11 +4949,11 @@ ) (set! (-> this sprites 0 pos z) #xffffff) (set! (-> this sprites 0 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 100 128) + (set-hud-piece-position! (-> this sprites 0) 100 128) (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s3-0 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) s3-0 (-> *level* default-level)) ) (set! (-> arg1 alpha) sv-16) (let ((a0-21 arg1)) @@ -5137,11 +5137,11 @@ (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id arg1)) (set! (-> arg0 sprites 0 scale-x) arg4) (set! (-> arg0 sprites 0 scale-y) arg4) - (set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3) + (set-hud-piece-position! (-> arg0 sprites 0) arg2 arg3) (with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> arg0 sprites)) s4-1 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> arg0 sprites 0) s4-1 (-> *level* default-level)) ) ) @@ -5173,15 +5173,11 @@ (set! (-> highscore-option sprites 0 tex) (lookup-texture-by-id (the-as texture-id a0-1))) (set! (-> highscore-option sprites 0 scale-x) arg4) (set! (-> highscore-option sprites 0 scale-y) arg4) - (set-hud-piece-position! (the-as hud-sprite (-> highscore-option sprites)) arg2 arg3) + (set-hud-piece-position! (-> highscore-option sprites 0) arg2 arg3) (with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) - (the-as hud-sprite (-> highscore-option sprites)) - s4-1 - (-> *level* default-level) - ) + ((method-of-type hud-sprite draw) (-> highscore-option sprites 0) s4-1 (-> *level* default-level)) ) ) ) @@ -7513,7 +7509,7 @@ ) (set! (-> this sprites 3 pos z) #xffffff) (set! (-> this sprites 3 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) s1-0 s2-0) + (set-hud-piece-position! (-> this sprites 0) s1-0 s2-0) (set-hud-piece-position! (-> this sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) @@ -7523,7 +7519,7 @@ (set-hud-piece-position! (-> this sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-192 (-> sv-176 base)) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) sv-176 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) sv-176 (-> *level* default-level)) (draw-sprite2d-xy sv-176 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) @@ -7644,7 +7640,7 @@ ) (set! (-> this sprites 3 pos z) #xffffff) (set! (-> this sprites 3 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) s1-0 s2-0) + (set-hud-piece-position! (-> this sprites 0) s1-0 s2-0) (set-hud-piece-position! (-> this sprites 1) (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) @@ -7654,7 +7650,7 @@ (set-hud-piece-position! (-> this sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4)) (set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) (set! sv-272 (-> sv-256 base)) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) sv-256 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (-> this sprites 0) sv-256 (-> *level* default-level)) (draw-sprite2d-xy sv-256 (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) diff --git a/test/decompiler/reference/jak2/engine/ui/text_REF.gc b/test/decompiler/reference/jak2/engine/ui/text_REF.gc index 8fb2d6b56cb..cd2c23e6f06 100644 --- a/test/decompiler/reference/jak2/engine/ui/text_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/text_REF.gc @@ -376,10 +376,10 @@ 1 ) (set-vector! s5-0 128 128 128 128) - (add-debug-line2d #t (bucket-id debug-no-zbuf1) (the-as vector4w (-> gp-0 vector)) (-> gp-0 vector 1) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 0) (-> gp-0 vector 1) s5-0) (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) s5-0) (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 vector 3) s5-0) - (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (the-as vector4w (-> gp-0 vector)) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (-> gp-0 vector 0) s5-0) ) ) 0 diff --git a/test/decompiler/reference/jak2/engine/util/profile_REF.gc b/test/decompiler/reference/jak2/engine/util/profile_REF.gc index 6e46d8d6603..8ccdf8430a5 100644 --- a/test/decompiler/reference/jak2/engine/util/profile_REF.gc +++ b/test/decompiler/reference/jak2/engine/util/profile_REF.gc @@ -409,7 +409,7 @@ (let ((s3-0 (-> *profile-array* data s5-0)) (s4-0 *profile-collapse*) ) - (mem-copy! (&-> s3-0 type) (&-> (-> this data s5-0) type) 8240) + (mem-copy! (&-> s3-0 type) (&-> this data s5-0 type) 8240) (cond ((zero? s5-0) ((lambda ((arg0 profile-segment-array) (arg1 profile-collapse)) diff --git a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc index 938ac32c781..5fc421ce728 100644 --- a/test/decompiler/reference/jak2/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak2/kernel/gkernel_REF.gc @@ -954,7 +954,7 @@ (set! (-> s4-0 prev) a1-3) (set! (-> this alive-list prev) s4-0) (set! (-> s4-0 process) - (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> (-> s4-0 process) type)))) + (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> s4-0 process type)))) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/atoll/ash1-course_REF.gc b/test/decompiler/reference/jak2/levels/atoll/ash1-course_REF.gc index e1589d97a27..43c51cdbb11 100644 --- a/test/decompiler/reference/jak2/levels/atoll/ash1-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/ash1-course_REF.gc @@ -56,7 +56,7 @@ :skip-to -1 :on-set (lambda ((arg0 ashelin-battle)) (clear-speech-flags! arg0) - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 ash-course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 ash-course spots 0 center)) (let ((v1-7 (get-current-task-event (-> arg0 task)))) (if (= (-> v1-7 action) (game-task-action say)) (add-process @@ -148,9 +148,9 @@ (when (scene-release? arg1) (logior! (-> arg1 bot-flags) (bot-flags bf20)) (let ((s5-0 (-> arg1 ash-course spots))) - (vector-! (the-as vector (-> arg1 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1))) + (vector-! (the-as vector (-> arg1 frontline)) (-> s5-0 2 center) (-> s5-0 1 center)) (vector-normalize! (-> arg1 frontline) 1.0) - (set! (-> arg1 frontline w) (- (vector-dot (the-as vector (-> arg1 frontline)) (the-as vector (-> s5-0 1))))) + (set! (-> arg1 frontline w) (- (vector-dot (the-as vector (-> arg1 frontline)) (-> s5-0 1 center)))) ) (set-frontline-dist! arg1) (ai-task-control-method-12 (-> arg1 ai-ctrl) arg1) diff --git a/test/decompiler/reference/jak2/levels/atoll/atoll-part_REF.gc b/test/decompiler/reference/jak2/levels/atoll/atoll-part_REF.gc index c53b376366a..fa33f01c84c 100644 --- a/test/decompiler/reference/jak2/levels/atoll/atoll-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/atoll-part_REF.gc @@ -342,14 +342,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-14 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-14 qx-qy-qz-sy quad) vf1) (.mov v1-15 vf1) ) (else (.lvf vf1 (&-> v1-14 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-14 qx-qy-qz-sy quad) vf1) (.mov v1-16 vf1) ) @@ -586,7 +586,7 @@ ;; INFO: Used lq/sq (defun check-drop-level-atoll-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) "Ensure water drop particle effects don't go below the ocean level, render the splash" - (let ((f30-0 (get-height *ocean* (the-as vector (-> arg2 vector)) #t))) + (let ((f30-0 (get-height *ocean* (-> arg2 vector 0) #t))) (when (and (!= f30-0 4095996000.0) (< (-> arg2 vector 0 y) f30-0)) (let ((s3-0 (new 'stack-no-clear 'vector))) (sp-kill-particle arg0 arg1) diff --git a/test/decompiler/reference/jak2/levels/atoll/sig0-course_REF.gc b/test/decompiler/reference/jak2/levels/atoll/sig0-course_REF.gc index 5803c075ccb..009bb9d69e4 100644 --- a/test/decompiler/reference/jak2/levels/atoll/sig0-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/atoll/sig0-course_REF.gc @@ -132,13 +132,9 @@ (let ((gp-0 (bot-simple-check-too-far arg0))) (when (nonzero? gp-0) (let* ((s5-1 (-> arg0 sig-course spots)) - (f0-0 (vector-segment-distance-point! - (target-pos 0) - (the-as vector (-> s5-1 18)) - (the-as vector (-> s5-1 19)) - (the-as vector #f) - ) - ) + (f0-0 + (vector-segment-distance-point! (target-pos 0) (-> s5-1 18 center) (-> s5-1 19 center) (the-as vector #f)) + ) ) (cond ((< f0-0 45056.0) @@ -1180,7 +1176,7 @@ ) (let ((s5-0 (new 'stack-no-clear 'vector))) (let ((v1-6 (-> arg1 sig-course spots))) - (vector-lerp! s5-0 (the-as vector (-> v1-6 21)) (the-as vector (-> v1-6 22)) 0.5) + (vector-lerp! s5-0 (-> v1-6 21 center) (-> v1-6 22 center) 0.5) ) (move-to-point! (-> arg1 root) s5-0) ) @@ -1701,9 +1697,9 @@ ) (when (and (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (target-pos 0))) (let ((f0-3 86016.0)) - (or (>= (* f0-3 f0-3) (vector-vector-xz-distance-squared s5-0 (the-as vector (-> s4-0 28)))) + (or (>= (* f0-3 f0-3) (vector-vector-xz-distance-squared s5-0 (-> s4-0 28 center))) (let ((f0-6 102400.0)) - (>= (* f0-6 f0-6) (vector-vector-xz-distance-squared s5-0 (the-as vector (-> s4-0 29)))) + (>= (* f0-6 f0-6) (vector-vector-xz-distance-squared s5-0 (-> s4-0 29 center))) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc index a32288ac909..cd16b2dbdae 100644 --- a/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/boss/castle-baron_REF.gc @@ -1168,9 +1168,9 @@ ) (.lvf vf5 (&-> s3-0 quad)) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((v1-8 (-> this nav state))) (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) @@ -1524,15 +1524,15 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-krew-boss)) (set-hud-piece-position! (-> this sprites 1) (the int (+ 462.0 (* 130.0 (-> this offset)))) 350) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -32 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -96 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 1)) -62 14) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 1)) -32 14) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -32 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) -96 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 1 pos) -62 14) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 1 pos) -32 14) (let ((s5-0 (-> this values 0 current)) (f28-0 (* 0.01 (the float (-> this values 1 current)))) (f30-0 (* 0.01 (the float (-> this values 2 current)))) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 1)) -92 15) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 1 pos) -92 15) (cond ((zero? s5-0) (set! (-> this sprites 3 color x) 0) @@ -1551,7 +1551,7 @@ ) ) (set! (-> this sprites 3 scale-x) (* -7.25 f28-0)) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 1)) -84 4) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 1 pos) -84 4) (cond ((< f30-0 0.5) (set! (-> this sprites 4 color x) 255) @@ -1977,9 +1977,9 @@ (.lvf vf5 (&-> v1-5 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-1 quad) vf6) v0-1 ) diff --git a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc index 1f11b97eb50..6d41366a099 100644 --- a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc @@ -1090,9 +1090,9 @@ (.lvf vf5 (&-> s2-1 quad)) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-16 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc index ac53696c2a3..387a6deb459 100644 --- a/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/bombbot/bombbot_REF.gc @@ -829,9 +829,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -844,9 +844,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -860,9 +860,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -940,7 +940,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 24576.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -998,8 +998,8 @@ (.mov at-0 f0-17) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-11 quad) vf1) (vector+! a1-5 v1-41 a0-11) ) @@ -1013,9 +1013,9 @@ ) (.lvf vf4 (&-> v1-42 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (let ((a1-8 s3-0)) @@ -1028,9 +1028,9 @@ ) (.lvf vf4 (&-> v1-43 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) ) @@ -1045,9 +1045,9 @@ ) (.lvf vf4 (&-> v1-45 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) s2-0 -49152.0) @@ -1071,9 +1071,9 @@ ) (.lvf vf4 (&-> a0-25 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-50 quad) vf6) (- (-> s3-0 y) (-> v1-50 y)) (set! (-> s3-0 quad) (-> v1-50 quad)) @@ -1092,9 +1092,9 @@ ) (.lvf vf4 (&-> v1-54 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-15 quad) vf6) ) (let ((t9-5 bombbot-do-spline) @@ -1210,9 +1210,9 @@ ) (.lvf vf4 (&-> v1-96 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-25 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) s2-0 -24576.0) @@ -1236,9 +1236,9 @@ ) (.lvf vf4 (&-> v1-102 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-4 quad) vf6) (let ((f0-64 (- (-> s3-0 y) (-> s0-4 y)))) (lerp-scale 1.0 0.0 f0-64 0.0 8192.0) @@ -1541,9 +1541,9 @@ ) (.lvf vf4 (&-> a0-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-34 quad) vf6) ) (set! (-> this start-target-pos quad) (-> gp-0 root trans quad)) @@ -1619,9 +1619,9 @@ ) (.lvf vf4 (&-> v1-18 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (set! (-> s5-0 quad) (-> s3-0 quad)) @@ -1638,9 +1638,9 @@ ) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (vector-negate! (-> s0-0 move-dist) s4-0) @@ -1656,9 +1656,9 @@ ) (.lvf vf4 (&-> v1-24 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (let ((a1-12 s3-0)) @@ -1671,9 +1671,9 @@ ) (.lvf vf4 (&-> v1-25 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) (set! (-> s5-0 quad) (-> s3-0 quad)) @@ -1771,9 +1771,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (vector-normalize-copy! s5-0 (-> sv-880 vector 2) 327680.0) @@ -1995,9 +1995,9 @@ ) (.lvf vf4 (&-> v1-34 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (cond @@ -2126,7 +2126,7 @@ (-> self root trans) (-> self root trans) (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-1)) (-> self root trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self city-path node gp-1 position) (-> self root trans)) (-> *bombbot-nav-enemy-info* run-travel-speed) ) ) @@ -2146,7 +2146,7 @@ (nav-enemy-method-176 self) ) ) - (if (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-1))) 32768.0) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self city-path node gp-1 position)) 32768.0) (set! (-> self current-node) (the-as uint @@ -2618,9 +2618,9 @@ ) (.lvf vf4 (&-> a0-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (set! (-> v1-3 main-y) (- (-> s4-0 feet s0-0 real-position y) (-> s4-0 root trans y))) @@ -2674,9 +2674,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-13 quad) vf6) ) ) @@ -2753,8 +2753,8 @@ (.lvf vf4 (&-> sv-128 quad)) (.lvf vf5 (&-> v0-2 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-144 quad) vf6) (rot-zxy-from-vector! s0-0 (-> arg0 bone transform vector 2)) (rot-zxy-from-vector! s0-0 *z-vector*) @@ -2798,8 +2798,8 @@ (.lvf vf4 (&-> sv-112 quad)) (.lvf vf5 (&-> v0-1 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-128 quad) vf6) (rot-zxy-from-vector! s2-0 (-> arg0 bone transform vector 2)) (rot-zxy-from-vector! s1-0 s0-0) @@ -2910,8 +2910,8 @@ (let ((v1-36 s0-0)) (.lvf vf4 (&-> s4-0 quad)) (.lvf vf5 (&-> sv-160 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-36 quad) vf6) ) (let ((a1-4 s1-0) @@ -2937,8 +2937,8 @@ (.mov at-0 f0-15) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-54 quad) vf1) ) 0 @@ -3172,14 +3172,13 @@ ) (when s3-0 (+! gp-0 1) - (let ((v1-14 - (the int (* 0.000030517578 (vector-vector-xz-distance - (-> s3-0 root trans) - (the-as vector (-> s3-0 city-path node (+ (-> s3-0 city-path node-count) -1))) - ) - ) + (let ((v1-14 (the int (* 0.000030517578 (vector-vector-xz-distance + (-> s3-0 root trans) + (-> s3-0 city-path node (+ (-> s3-0 city-path node-count) -1) position) + ) + ) + ) ) - ) ) (if (< v1-14 s5-0) (set! s5-0 v1-14) diff --git a/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc b/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc index db3c24347c5..bdb0809ce14 100644 --- a/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/burning-bush/ctywide-bbush_REF.gc @@ -500,7 +500,7 @@ (set! (-> this rot-y) (+ 16384.0 (quaternion-y-angle (-> this root quat)))) (set! (-> this last-target-pos quad) (-> (target-pos 0) quad)) (set-vector! (-> this cyl axis) (cos (-> this rot-y)) 0.0 (- (sin (-> this rot-y))) 1.0) - (vector+float*! (the-as vector (-> this cyl)) (-> this root trans) (-> this cyl axis) -2048.0) + (vector+float*! (-> this cyl origin) (-> this root trans) (-> this cyl axis) -2048.0) (set! (-> this cyl radius) 24576.0) (set! (-> this cyl length) 4096.0) 0 @@ -3181,18 +3181,14 @@ ;; definition for method 15 of type hud-homing-beacon ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-homing-beacon)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 160) (set! (-> this sprites 0 scale-x) 1.0) (set! (-> this sprites 0 scale-y) 1.0) (set! (-> this sprites 0 flags) (the-as uint 4)) (set! (-> this strings 0 scale) 0.5) (set! (-> this strings 0 flags) (font-flags kerning middle large)) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 60) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 60) ((method-of-type hud draw) this) 0 (none) @@ -3224,18 +3220,14 @@ ;; definition for method 15 of type hud-dark-eco-pickup ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-dark-eco-pickup)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 180 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 180) (set! (-> this sprites 0 scale-x) 1.0) (set! (-> this sprites 0 scale-y) 1.0) (set! (-> this sprites 0 flags) (the-as uint 4)) (set! (-> this strings 0 flags) (font-flags kerning middle large)) (set! (-> this strings 0 scale) 0.5) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 26) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 26) ((method-of-type hud draw) this) 0 (none) @@ -3266,18 +3258,14 @@ ;; definition for method 15 of type hud-green-eco-pickup ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-green-eco-pickup)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 180 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 180) (set! (-> this sprites 0 scale-x) 1.0) (set! (-> this sprites 0 scale-y) 1.0) (set! (-> this sprites 0 flags) (the-as uint 4)) (set! (-> this strings 0 flags) (font-flags kerning middle large)) (set! (-> this strings 0 scale) 0.5) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 26) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 26) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc b/test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc index e9cacd1b76d..b98b051bf95 100644 --- a/test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/height-map_REF.gc @@ -144,7 +144,7 @@ (s4-0 (-> this x-dim)) (s3-0 (-> this z-dim)) ) - (let ((s2-0 (&-> (-> this data) 0))) + (let ((s2-0 (&-> this data 0))) (set! (-> s5-0 vector 0 z) (-> this z-offset)) (countdown (s1-0 s3-0) (let ((s0-0 s2-0)) @@ -157,18 +157,10 @@ (+! (-> s5-0 vector 0 x) f28-0) (set! s0-0 (&-> s0-0 1)) (set! (-> s5-0 vector 0 y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) - (if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector))) + (if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 0)) (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1)) ) - (add-debug-line - #t - (bucket-id debug2) - (the-as vector (-> s5-0 vector)) - (-> s5-0 vector 1) - *color-red* - #f - (the-as rgba -1) - ) + (add-debug-line #t (bucket-id debug2) (-> s5-0 vector 0) (-> s5-0 vector 1) *color-red* #f (the-as rgba -1)) ) ) ) @@ -176,7 +168,7 @@ (&+! s2-0 s4-0) ) ) - (let ((s2-1 (&-> (-> this data) 0))) + (let ((s2-1 (&-> this data 0))) (set! (-> s5-0 vector 0 x) (-> this x-offset)) (countdown (s1-1 s4-0) (let ((s0-1 (the-as pointer s2-1))) @@ -193,18 +185,10 @@ (set! (-> s5-0 vector 0 y) (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> this y-scale))) ) - (if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (the-as vector (-> s5-0 vector))) + (if (and (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 0)) (point-in-bbox? (the-as bounding-box (-> s5-0 vector 2)) (-> s5-0 vector 1)) ) - (add-debug-line - #t - (bucket-id debug2) - (the-as vector (-> s5-0 vector)) - (-> s5-0 vector 1) - *color-blue* - #f - (the-as rgba -1) - ) + (add-debug-line #t (bucket-id debug2) (-> s5-0 vector 0) (-> s5-0 vector 1) *color-blue* #f (the-as rgba -1)) ) ) ) @@ -236,8 +220,8 @@ ) (.lvf vf4 (&-> a0-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-1 0 quad) vf5) ) (let ((a1-2 (-> v1-0 vector 1))) @@ -247,8 +231,8 @@ ) (.lvf vf4 (&-> a0-2 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-2 quad) vf5) ) (debug-draw-mesh this (the-as vector (-> v1-0 vector))) diff --git a/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc b/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc index 003cf382780..c5e01eba57d 100644 --- a/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/nav-graph_REF.gc @@ -83,8 +83,8 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (the-as (pointer uint128) (&-> a1-3 0)) vf5) ) (let ((a1-4 (-> v1-8 dummy-node))) @@ -94,15 +94,15 @@ ) (.lvf vf4 (&-> a0-7 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-4 position quad) vf5) ) (add-debug-box #t (bucket-id debug2) (the-as vector (&-> v1-8 id)) - (the-as vector (-> v1-8 dummy-node)) + (-> v1-8 dummy-node position) *color-yellow* ) ) @@ -973,17 +973,17 @@ (set! (-> a0-7 quad) (-> a2-0 position quad)) (set! (-> a0-7 w) 1.0) ) - (vector-! (-> s5-0 vector 2) (-> s5-0 vector 1) (the-as vector (-> s5-0 vector))) + (vector-! (-> s5-0 vector 2) (-> s5-0 vector 1) (-> s5-0 vector 0)) (let* ((f0-2 (vector-length (-> s5-0 vector 2))) (f1-2 (fmax (* 0.75 f0-2) (+ -8192.0 f0-2))) ) (vector-float*! (-> s5-0 vector 2) (-> s5-0 vector 2) (/ f1-2 f0-2)) ) - (vector+! (-> s5-0 trans) (the-as vector (-> s5-0 vector)) (-> s5-0 vector 2)) + (vector+! (-> s5-0 trans) (-> s5-0 vector 0) (-> s5-0 vector 2)) (add-debug-line #t (bucket-id debug2) - (the-as vector (-> s5-0 vector)) + (-> s5-0 vector 0) (-> s5-0 trans) (cond ((= (-> v1-9 id) #xffff) diff --git a/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc b/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc index 07059da2de9..0e54e0b9359 100644 --- a/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc @@ -153,9 +153,9 @@ (set! (-> gp-0 accel-array 3 quad) (-> gp-0 accel-array 2 quad)) (set! (-> gp-0 accel-array 2 quad) (-> gp-0 accel-array 1 quad)) (set! (-> gp-0 accel-array 1 quad) (-> gp-0 accel-array 0 quad)) - (vehicle-method-115 (the-as vehicle s5-0) (the-as vector (-> gp-0 accel-array))) + (vehicle-method-115 (the-as vehicle s5-0) (-> gp-0 accel-array 0)) (vector-reset! (-> s4-0 0)) - (vector+float*! (-> s4-0 0) (-> s4-0 0) (the-as vector (-> gp-0 accel-array)) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 0) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 1) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 2) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 3) 1.0) @@ -281,11 +281,11 @@ (init-vf0-vector) (let ((gp-0 (-> self pilot))) (.lvf vf1 (&-> (-> gp-0 local-accel) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-1 vf1) (let ((f0-0 v1-1) (v1-2 (new 'stack-no-clear 'vector)) diff --git a/test/decompiler/reference/jak2/levels/city/common/target-pilot_REF.gc b/test/decompiler/reference/jak2/levels/city/common/target-pilot_REF.gc index acac1f5bf02..c86699f5399 100644 --- a/test/decompiler/reference/jak2/levels/city/common/target-pilot_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/target-pilot_REF.gc @@ -387,11 +387,11 @@ ) ) (let ((s4-1 (new 'stack-no-clear 'matrix))) - (vehicle-method-117 (the-as vehicle s5-0) (the-as vector (-> s4-1 vector)) (-> gp-2 seat-index) 0) + (vehicle-method-117 (the-as vehicle s5-0) (-> s4-1 vector 0) (-> gp-2 seat-index) 0) (vehicle-method-117 (the-as vehicle s5-0) (-> s4-1 vector 1) (-> gp-2 seat-index) 1) (enable-set! (-> self arm-ik 0) #t) (enable-set! (-> self arm-ik 1) #t) - (handle-copy! (-> self arm-ik 0) (the-as vector (-> s4-1 vector))) + (handle-copy! (-> self arm-ik 0) (-> s4-1 vector 0)) (handle-copy! (-> self arm-ik 1) (-> s4-1 vector 1)) ) ) diff --git a/test/decompiler/reference/jak2/levels/city/common/trail_REF.gc b/test/decompiler/reference/jak2/levels/city/common/trail_REF.gc index 4cb1c6021e3..4885d3e3fc3 100644 --- a/test/decompiler/reference/jak2/levels/city/common/trail_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/trail_REF.gc @@ -394,7 +394,7 @@ (cond ((> t0-0 0) (let* ((a3-4 (-> this visgroup (+ t0-0 -1))) - (a0-2 (&-> (-> this visnode-ids) (-> a3-4 first-conn))) + (a0-2 (&-> this visnode-ids (-> a3-4 first-conn))) ) (countdown (a3-5 (-> a3-4 conn-count)) (let ((t0-8 (-> a1-2 (-> a0-2 0)))) @@ -429,7 +429,7 @@ (when (not (logtest? a2-4 a1-2)) (set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2)) (let* ((v1-3 (-> this conn-hash cell v1-1)) - (s4-0 (&-> (-> this conn-hash conn-ids) (-> v1-3 first-conn))) + (s4-0 (&-> this conn-hash conn-ids (-> v1-3 first-conn))) ) (countdown (s3-0 (-> v1-3 conn-count)) (let* ((s2-0 (-> s4-0 0)) @@ -581,7 +581,7 @@ (cond ((> v1-1 0) (let* ((v1-4 (-> this visgroup (+ v1-1 -1))) - (s5-1 (&-> (-> this visnode-ids) (-> v1-4 first-conn))) + (s5-1 (&-> this visnode-ids (-> v1-4 first-conn))) (s4-0 (-> v1-4 conn-count)) ) (-> this visnode-ids) @@ -724,7 +724,7 @@ (set! (-> this goal-node-id) s5-0) (return 3) ) - (let ((s3-0 (&-> (-> this conn-ids) (-> s4-0 first-conn)))) + (let ((s3-0 (&-> this conn-ids (-> s4-0 first-conn)))) (countdown (s2-0 (-> s4-0 conn-count)) (let* ((a0-7 (-> this conn (-> s3-0 0))) (v1-12 (-> a0-7 flags)) @@ -834,7 +834,7 @@ (set! (-> s5-0 p1 quad) (-> s5-0 p0 quad)) (set! (-> s5-0 best-count) (the-as uint 0)) (set! (-> s5-0 best-dist) -1.0) - (let ((s2-0 (&-> (-> this conn-ids) (-> v1-2 first-conn)))) + (let ((s2-0 (&-> this conn-ids (-> v1-2 first-conn)))) (countdown (s1-0 (-> v1-2 conn-count)) (let* ((v1-4 (-> this conn (-> s2-0 0))) (s0-0 (-> v1-4 tail-id)) diff --git a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc index 0b90a4f29b5..6cd09805cd2 100644 --- a/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctyport-obs_REF.gc @@ -189,17 +189,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -289,17 +289,17 @@ (let ((v1-14 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-14 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -502,8 +502,8 @@ (let ((a1-1 (-> this nav state))) (set! (-> s4-0 vector 1 quad) (-> a1-1 velocity quad)) ) - (vector-! (the-as vector (-> s4-0 vector)) (-> s4-0 vector 1) (-> s3-0 state lin-velocity)) - (vector-float*! (the-as vector (-> s4-0 vector)) (the-as vector (-> s4-0 vector)) (* 4.0 (-> s2-0 info mass))) + (vector-! (-> s4-0 vector 0) (-> s4-0 vector 1) (-> s3-0 state lin-velocity)) + (vector-float*! (-> s4-0 vector 0) (-> s4-0 vector 0) (* 4.0 (-> s2-0 info mass))) (let ((s1-0 (-> s4-0 vector 2))) (let ((s0-0 (-> this root trans))) (let ((v1-7 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)))) @@ -514,9 +514,9 @@ ) (.lvf vf4 (&-> s0-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (let ((s0-1 (-> s4-0 vector 2))) @@ -529,21 +529,21 @@ ) (.lvf vf4 (&-> s1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-1 quad) vf6) ) (let ((v1-10 s3-0) (a1-9 (-> s4-0 vector 2)) (a2-0 (-> s4-0 vector)) ) - (rigid-body-method-18 (-> v1-10 state) a1-9 (the-as vector a2-0)) + (rigid-body-method-18 (-> v1-10 state) a1-9 (-> a2-0 0)) ) (.svf (&-> (-> s4-0 vector) 0 quad) vf0) (set! (-> s4-0 vector 0 y) (* -4.0 (-> s2-0 extra gravity) (-> s2-0 info mass))) (let ((a1-10 (-> s4-0 vector))) - (rigid-body-method-20 (-> s3-0 state) (the-as vector a1-10)) + (rigid-body-method-20 (-> s3-0 state) (-> a1-10 0)) ) ) (rigid-body-object-method-50 this arg0) @@ -716,9 +716,9 @@ ) (.lvf vf4 (&-> s4-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-0 quad) vf6) (cond ((< (vector-vector-distance s5-0 (camera-pos)) 614400.0) @@ -741,9 +741,9 @@ ) (.lvf vf4 (&-> s4-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-1 quad) vf6) (cond ((< (vector-vector-distance s5-1 (camera-pos)) 614400.0) diff --git a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc index c17f0a9943c..b849722f821 100644 --- a/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctywide-obs_REF.gc @@ -315,9 +315,9 @@ ) (.lvf vf4 (&-> a0-29 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-45 quad) vf6) ) (let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> s5-1 0)) root trans) (the-as vector (-> self plane))))) @@ -331,9 +331,9 @@ ) (.lvf vf4 (&-> a0-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-52 quad) vf6) ) (let ((v1-55 (-> (the-as process-drawable (-> s5-1 0)) root trans))) @@ -352,9 +352,9 @@ ) (.lvf vf4 (&-> a0-36 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-55 quad) vf6) ) ) @@ -496,13 +496,13 @@ (vector+! (-> s1-0 trans) s4-0 s3-0) (vector-float*! (-> s1-0 trans) (-> s1-0 trans) 0.5) (+! (-> s1-0 trans y) (/ arg1 2)) - (vector-! (the-as vector (-> s2-2 vector)) s3-0 s4-0) - (let ((f30-1 (vector-normalize-ret-len! (the-as vector (-> s2-2 vector)) 1.0))) + (vector-! (-> s2-2 vector 0) s3-0 s4-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s2-2 vector 0) 1.0))) (set! (-> s1-0 scale x) (/ f30-1 METER_LENGTH)) (set! (-> s1-0 scale y) (/ arg1 METER_LENGTH)) (set! (-> s1-0 scale z) 1.0) (set! (-> s2-2 vector 1 quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) - (vector-cross! (-> s2-2 vector 2) (the-as vector (-> s2-2 vector)) (-> s2-2 vector 1)) + (vector-cross! (-> s2-2 vector 2) (-> s2-2 vector 0) (-> s2-2 vector 1)) (vector-normalize! (-> s2-2 vector 2) 1.0) (matrix->quaternion (-> s1-0 quat) s2-2) (set! (-> this plane quad) (-> s2-2 vector 2 quad)) @@ -700,9 +700,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (let ((a1-6 s4-0)) @@ -715,9 +715,9 @@ ) (.lvf vf4 (&-> v1-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -978,7 +978,7 @@ (set! (-> self num-sparts) (the-as uint 0)) (set! (-> self hack-counter) (the-as uint 4)) (set! (-> self count-sparts) (the-as uint 0)) - (spawn-with-cspace (-> self part) (the-as cspace (-> self node-list data))) + (spawn-with-cspace (-> self part) (-> self node-list data 0)) (ja-post) ) ) @@ -1787,9 +1787,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (vector<-matrix! s3-0 s5-0) @@ -1803,9 +1803,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (set! (-> s4-0 ent) (-> this entity)) @@ -1861,9 +1861,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) (let ((f30-0 (vector-vector-xz-distance s4-0 s0-0))) (let ((f0-2 (/ f30-0 (meters 200))) @@ -1878,9 +1878,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s4-0 s0-0)) @@ -1905,9 +1905,9 @@ ) (.lvf vf5 (&-> sv-192 quad)) (.lvf vf4 (&-> s0-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-13 quad) vf6) (let* ((f2-0 (t9-6 a0-13 s4-0)) (f28-1 (acos (fmax -1.0 (fmin 1.0 (/ (- (- f26-0 f28-0) f2-0) (* -2.0 (sqrtf f2-0) (sqrtf f28-0))))))) @@ -2682,9 +2682,9 @@ ) (.lvf vf4 (&-> t5-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t4-0 quad) vf6) (set! (-> v1-25 quad) (-> t4-0 quad)) ) @@ -3182,9 +3182,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -3253,11 +3253,11 @@ ) (.lvf vf4 (&-> a2-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-17 quad) vf6) - (t9-3 (the-as matrix a0-5) (vector-! a1-2 v1-17 gp-0) (-> *camera* local-down)) + (t9-3 (-> a0-5 inv-mat) (vector-! a1-2 v1-17 gp-0) (-> *camera* local-down)) ) ) ) @@ -3367,9 +3367,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -3748,11 +3748,11 @@ ) (.lvf vf4 (&-> a2-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-96 quad) vf6) - (t9-66 (the-as matrix a0-112) (vector-! a1-30 v1-96 gp-1) (-> *camera* local-down)) + (t9-66 (-> a0-112 inv-mat) (vector-! a1-30 v1-96 gp-1) (-> *camera* local-down)) ) ) ) @@ -3852,9 +3852,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) diff --git a/test/decompiler/reference/jak2/levels/city/ctywide-part_REF.gc b/test/decompiler/reference/jak2/levels/city/ctywide-part_REF.gc index 607cf776ec3..f12c13320ed 100644 --- a/test/decompiler/reference/jak2/levels/city/ctywide-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/ctywide-part_REF.gc @@ -339,14 +339,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-5 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-5 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) (else (.lvf vf1 (&-> v1-5 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-5 qx-qy-qz-sy quad) vf1) (.mov v1-7 vf1) ) diff --git a/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc b/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc index ee10310d316..af81edcce25 100644 --- a/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/farm/ctyfarm-obs_REF.gc @@ -1066,7 +1066,7 @@ ) (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (the-as vector (-> s4-0 shakers s3-0)) + (-> s4-0 shakers s3-0 axis) (-> s4-0 shakers s3-0 shake) ) ) @@ -1381,7 +1381,7 @@ ) (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (the-as vector (-> s4-0 shakers s3-0)) + (-> s4-0 shakers s3-0 axis) (-> s4-0 shakers s3-0 shake) ) ) @@ -1651,7 +1651,7 @@ ) (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (the-as vector (-> s4-0 shakers s3-0)) + (-> s4-0 shakers s3-0 axis) (-> s4-0 shakers s3-0 shake) ) ) @@ -1923,7 +1923,7 @@ ) (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (the-as vector (-> s4-0 shakers s3-0)) + (-> s4-0 shakers s3-0 axis) (-> s4-0 shakers s3-0 shake) ) ) @@ -2180,7 +2180,7 @@ ) (quaternion*! (-> arg1 quat) (-> arg1 quat) (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (the-as vector (-> s4-0 shakers s3-0)) + (-> s4-0 shakers s3-0 axis) (-> s4-0 shakers s3-0 shake) ) ) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc-states_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc-states_REF.gc index 25bd73f7e7c..ce69d7be49b 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc-states_REF.gc @@ -410,9 +410,9 @@ (until (ja-done? 0) (let ((s3-1 (handle->process (-> self vehicle-handle)))) (quaternion-copy! (the-as quaternion (-> gp-0 vector 2)) (-> (the-as vehicle s3-1) root quat)) - (compute-seat-position (the-as vehicle s3-1) (the-as vector (-> gp-0 vector)) (-> self vehicle-seat-index)) + (compute-seat-position (the-as vehicle s3-1) (-> gp-0 vector 0) (-> self vehicle-seat-index)) ) - (vector-! (-> gp-0 vector 1) (the-as vector (-> gp-0 vector)) s5-2) + (vector-! (-> gp-0 vector 1) (-> gp-0 vector 0) s5-2) (let ((s3-2 lerp-scale) (s2-0 0.0) (s1-0 1.0) @@ -455,12 +455,12 @@ ) ) (vector-matrix*! - (the-as vector (-> gp-0 vector)) + (-> gp-0 vector 0) (-> self local-seat-pos) (-> (the-as vehicle s4-2) node-list data 0 bone transform) ) ) - (vector-! (-> gp-0 vector 1) (the-as vector (-> gp-0 vector)) s5-3) + (vector-! (-> gp-0 vector 1) (-> gp-0 vector 0) s5-3) (let ((f0-16 (lerp-scale 0.0 1.0 (ja-aframe-num 0) (ja-aframe 5.0 0) (ja-aframe 7.0 0)))) (vector+float*! (-> self root trans) s5-3 (-> gp-0 vector 1) f0-16) ) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc4-course_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc4-course_REF.gc index 53f9ed83a68..4dccc68f55f 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc4-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/crocesc4-course_REF.gc @@ -21,7 +21,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (logclear! (-> arg0 mask) (process-mask actor-pause)) (logclear! (-> arg0 enemy-flags) (enemy-flag actor-pause-backup)) (let ((v1-16 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -68,7 +68,7 @@ (set! (-> v1-1 prim-core collide-as) (-> arg0 root backup-collide-as)) (set! (-> v1-1 prim-core collide-with) (-> arg0 root backup-collide-with)) ) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 2)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 2 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (let ((v1-14 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -151,7 +151,7 @@ :nav-mesh-index -1 :skip-to 15 :on-set (lambda ((arg0 crocadog-escort)) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 3)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 3 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (let ((v1-12 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -194,7 +194,7 @@ :nav-mesh-index -1 :skip-to 15 :on-set (lambda ((arg0 crocadog-escort)) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 7)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 7 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (let ((v1-12 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -317,7 +317,7 @@ :nav-mesh-index -1 :skip-to 15 :on-set (lambda ((arg0 crocadog-escort)) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 12)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 12 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (let ((v1-12 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -520,7 +520,7 @@ :nav-mesh-index -1 :skip-to 15 :on-set (lambda ((arg0 crocadog-escort)) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 14)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 14 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (let ((v1-12 (get-task-by-type (-> arg0 ai-ctrl) crocesct-wait-spot arg0))) @@ -602,7 +602,7 @@ ) (ai-task-control-method-12 (-> arg0 ai-ctrl) arg0) (send-event arg0 'move-trans (-> arg0 course spots 12)) - (vector-! (-> arg0 follow-dir) (the-as vector (-> arg0 course spots 14)) (-> arg0 root trans)) + (vector-! (-> arg0 follow-dir) (-> arg0 course spots 14 center) (-> arg0 root trans)) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) (none) @@ -722,7 +722,7 @@ :skip-to -1 :on-set (lambda ((arg0 crocadog-escort)) (let ((a1-0 (-> arg0 course spots))) - (vector-! (-> arg0 follow-dir) (the-as vector (-> a1-0 19)) (the-as vector (-> a1-0 17))) + (vector-! (-> arg0 follow-dir) (-> a1-0 19 center) (-> a1-0 17 center)) ) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) @@ -855,7 +855,7 @@ :skip-to -1 :on-set (lambda ((arg0 crocadog-escort)) (let ((a1-0 (-> arg0 course spots))) - (vector-! (-> arg0 follow-dir) (the-as vector (-> a1-0 20)) (the-as vector (-> a1-0 19))) + (vector-! (-> arg0 follow-dir) (-> a1-0 20 center) (-> a1-0 19 center)) ) (vector-normalize! (-> arg0 follow-dir) 1.0) (send-event (handle->process (-> arg0 master-handle)) 'notify 'follow-dir (-> arg0 follow-dir)) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc index 2bc4561ef86..118098a5db0 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/hal4-course_REF.gc @@ -534,8 +534,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-2 (+ (-> a1-4 world-sphere w) (-> gp-0 vector 1 w))) @@ -575,8 +575,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-6 (+ (-> a1-16 world-sphere w) (-> gp-0 vector 1 w))) @@ -923,11 +923,9 @@ :on-set (lambda ((arg0 hal-escort)) (set-setting! 'sound-mode #f 0.0 2) (let ((s5-0 (-> arg0 hal4-course spots))) - (vector-! (the-as vector (-> arg0 notice-plane)) (the-as vector (-> s5-0 4)) (the-as vector (-> s5-0 3))) + (vector-! (the-as vector (-> arg0 notice-plane)) (-> s5-0 4 center) (-> s5-0 3 center)) (vector-normalize! (-> arg0 notice-plane) 1.0) - (set! (-> arg0 notice-plane w) - (- (vector-dot (the-as vector (-> s5-0 3)) (the-as vector (-> arg0 notice-plane)))) - ) + (set! (-> arg0 notice-plane w) (- (vector-dot (-> s5-0 3 center) (the-as vector (-> arg0 notice-plane))))) ) (play-speech arg0 0) (let ((v1-10 (get-task-by-type (-> arg0 ai-ctrl) halt-wait-spot arg0))) @@ -1297,7 +1295,7 @@ (let ((s1-1 (get-trans (the-as process-focusable s2-0) 0)) (s0-0 (-> arg1 hal4-course spots 7)) ) - (if (and (>= (-> arg1 hal4-course spots 7 center w) (vector-vector-xz-distance s1-1 (the-as vector s0-0))) + (if (and (>= (-> arg1 hal4-course spots 7 center w) (vector-vector-xz-distance s1-1 (-> s0-0 center))) (>= 16384.0 (- (-> s1-1 y) (-> s0-0 center y))) (>= 61440.0 (vector-length (-> (the-as process-focusable s2-0) root transv))) (>= 1.0 (vector-length (-> (the-as process-focusable s2-0) rbody state ang-velocity))) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc4-course_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc4-course_REF.gc index e1bc6384c5f..7c35e065fb5 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc4-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc4-course_REF.gc @@ -43,7 +43,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (logclear! (-> arg0 mask) (process-mask actor-pause)) (logclear! (-> arg0 enemy-flags) (enemy-flag actor-pause-backup)) (let ((v1-16 (get-task-by-type (-> arg0 ai-ctrl) kidesct-wait-spot arg0))) diff --git a/test/decompiler/reference/jak2/levels/city/market/ashelin/ash4-course_REF.gc b/test/decompiler/reference/jak2/levels/city/market/ashelin/ash4-course_REF.gc index b24b9fbf464..b7b819b39e2 100644 --- a/test/decompiler/reference/jak2/levels/city/market/ashelin/ash4-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/market/ashelin/ash4-course_REF.gc @@ -96,7 +96,7 @@ :skip-to -1 :on-set (lambda ((arg0 ashelin-tanker)) (clear-speech-flags! arg0) - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 ash-course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 ash-course spots 0 center)) (let ((v1-7 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0))) (set! (-> v1-7 bytes 5) 1) (set! (-> v1-7 bytes 6) 0) diff --git a/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc b/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc index c5bcac00966..8148c521b7d 100644 --- a/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/meet-brutter/meet-brutter_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-lurker ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-lurker)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 205 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 205) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -19 27) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -19 27) ((method-of-type hud draw) this) 0 (none) @@ -885,9 +881,9 @@ ) (.lvf vf4 (&-> s1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) (s4-0 s5-1 s3-0 s2-0 (the-as nav-poly #f)) ) @@ -2313,12 +2309,7 @@ (set! (-> gp-1 params 0 id) (the-as uint (+ s5-1 120))) (set! (-> gp-1 params 0 position quad) (-> s2-0 pos quad)) (set! (-> gp-1 params 1 position quad) (-> s2-0 pos quad)) - (let ((s4-0 (the-as - paddywagon - (vehicle-spawn *traffic-manager* paddywagon (the-as traffic-object-spawn-params (-> gp-1 params))) - ) - ) - ) + (let ((s4-0 (the-as paddywagon (vehicle-spawn *traffic-manager* paddywagon (-> gp-1 params 0))))) (when s4-0 (set! (-> s4-0 current-level) (-> s2-0 level)) (set! (-> self slave (+ s5-1 (-> self max-count))) (process->handle s4-0)) @@ -2592,11 +2583,11 @@ ) (else (.lvf vf1 (&-> (-> (the-as vehicle s3-3) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-163 vf1) (let ((f0-2 v1-163) (f1-0 32768.0) @@ -2643,11 +2634,11 @@ ) (begin (.lvf vf1 (&-> (-> (the-as vehicle s2-1) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-205 vf1) (let ((f0-5 v1-205) (f1-9 421888.0) @@ -2903,12 +2894,7 @@ (set! (-> gp-0 params 0 id) (the-as uint (+ s5-0 120))) (set! (-> gp-0 params 0 position quad) (-> s2-0 pos quad)) (set! (-> gp-0 params 1 position quad) (-> s2-0 pos quad)) - (let ((s4-0 (the-as - paddywagon - (vehicle-spawn *traffic-manager* paddywagon (the-as traffic-object-spawn-params (-> gp-0 params))) - ) - ) - ) + (let ((s4-0 (the-as paddywagon (vehicle-spawn *traffic-manager* paddywagon (-> gp-0 params 0))))) (when s4-0 (set! (-> s4-0 current-level) (-> s2-0 level)) (set! (-> self slave (+ s5-0 (-> self max-count))) (process->handle s4-0)) @@ -3180,11 +3166,11 @@ (let ((v1-174 (get-best-seat-for-vehicle (the-as vehicle s3-3) (-> (the-as vehicle s3-3) root trans) 4 0))) (when (!= v1-174 -1) (.lvf vf1 (&-> (-> (the-as vehicle s3-3) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-178 vf1) (let ((f0-2 v1-178) (f1-0 32768.0) @@ -3246,11 +3232,11 @@ ) (begin (.lvf vf1 (&-> (-> (the-as vehicle s2-2) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-231 vf1) (let ((f0-6 v1-231) (f1-9 40960.0) diff --git a/test/decompiler/reference/jak2/levels/city/onintent/onintent-part_REF.gc b/test/decompiler/reference/jak2/levels/city/onintent/onintent-part_REF.gc index 7ec120e1a45..f44da87ac03 100644 --- a/test/decompiler/reference/jak2/levels/city/onintent/onintent-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/onintent/onintent-part_REF.gc @@ -1539,7 +1539,7 @@ (let ((a2-1 (-> arg1 key)) (v1-0 (new 'stack-no-clear 'vector)) ) - (vector-! v1-0 (the-as vector (-> arg2 vector)) (-> a2-1 origin trans)) + (vector-! v1-0 (-> arg2 vector 0) (-> a2-1 origin trans)) (when (or (< 30720.0 (fabs (-> v1-0 x))) (< 45056.0 (fabs (-> v1-0 z)))) (sp-kill-particle arg0 arg1) (return #f) diff --git a/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc b/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc index c9a220912ed..cc340a69be5 100644 --- a/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/package/delivery-task_REF.gc @@ -420,11 +420,11 @@ (f0-3 (* f0-1 f0-1)) ) (.lvf vf1 (&-> (-> (the-as process-drawable gp-0) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-32 vf1) (when (>= f0-3 a0-32) (set! (-> v1-59 0 quad) (-> (the-as process-drawable gp-0) root trans quad)) diff --git a/test/decompiler/reference/jak2/levels/city/port/portrun/portrun_REF.gc b/test/decompiler/reference/jak2/levels/city/port/portrun/portrun_REF.gc index ac9fbfd45d8..a4b86261dc0 100644 --- a/test/decompiler/reference/jak2/levels/city/port/portrun/portrun_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/port/portrun/portrun_REF.gc @@ -192,13 +192,9 @@ ;; definition for method 15 of type hud-cargo ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-cargo)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 205 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 205) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -19 27) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -19 27) ((method-of-type hud draw) this) 0 (none) @@ -974,9 +970,9 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) ) ) @@ -1004,9 +1000,9 @@ ) (.lvf vf4 (&-> s3-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-1 quad) vf6) ) ) @@ -1497,9 +1493,9 @@ (.mov vf7 a3-7) (.lvf vf5 (&-> a2-14 quad)) (.lvf vf4 (&-> v1-33 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) (t9-12 a0-17 a1-10 a2-14 a3-7) ) diff --git a/test/decompiler/reference/jak2/levels/city/power/ctypower_REF.gc b/test/decompiler/reference/jak2/levels/city/power/ctypower_REF.gc index 4a1f831951d..52b8c99f997 100644 --- a/test/decompiler/reference/jak2/levels/city/power/ctypower_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/power/ctypower_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-turret ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-turret)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 205 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 205) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -19 22) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -19 22) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc b/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc index 8a2453f50ca..6a6ccddea65 100644 --- a/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/sack/collection-task_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-moneybag ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-moneybag)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 210 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 210) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 25) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -25 25) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc b/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc index 43a9d81996c..bdbae88f029 100644 --- a/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/shuttle/shuttle_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-citizen ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-citizen)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 452.0 (* 130.0 (-> this offset)))) - 195 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 452.0 (* 130.0 (-> this offset)))) 195) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -15 47) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -15 47) ((method-of-type hud draw) this) 0 (none) @@ -1299,11 +1295,11 @@ ) (when (!= v1-260 -1) (.lvf vf1 (&-> (-> (the-as vehicle s4-2) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-263 vf1) (let ((f0-1 v1-263) (f1-1 32768.0) @@ -1417,11 +1413,11 @@ ) (begin (.lvf vf1 (&-> (-> (the-as process-drawable s2-2) root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-377 vf1) (let ((f0-4 v1-377) (f1-10 12288.0) diff --git a/test/decompiler/reference/jak2/levels/city/slums/kor/kid3-course_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/kor/kid3-course_REF.gc index c42018052df..586279c5a2e 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/kor/kid3-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/kor/kid3-course_REF.gc @@ -36,7 +36,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (logclear! (-> arg0 mask) (process-mask actor-pause)) (logclear! (-> arg0 enemy-flags) (enemy-flag actor-pause-backup)) (let ((v1-16 (get-task-by-type (-> arg0 ai-ctrl) kidt-wait-spot arg0))) diff --git a/test/decompiler/reference/jak2/levels/city/slums/kor/kor3-course_REF.gc b/test/decompiler/reference/jak2/levels/city/slums/kor/kor3-course_REF.gc index 502da273d7b..8d2cc9fc408 100644 --- a/test/decompiler/reference/jak2/levels/city/slums/kor/kor3-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/slums/kor/kor3-course_REF.gc @@ -36,7 +36,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (logclear! (-> arg0 mask) (process-mask actor-pause)) (logclear! (-> arg0 enemy-flags) (enemy-flag actor-pause-backup)) (let ((v1-16 (get-task-by-type (-> arg0 ai-ctrl) kort-wait-spot arg0))) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc index a46551da3ca..1c0be1e3bb3 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/citizen_REF.gc @@ -218,7 +218,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod citizen-method-186 ((this citizen) (arg0 nav-segment)) (vehicle-controller-method-11 (-> this controller)) - (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (the-as vector (-> arg0 vertex))) + (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (-> arg0 vertex 0)) 0 (none) ) @@ -508,9 +508,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) (when (t9-1 a0-14 a1-2 a2-2 (-> arg1 gnd-collide-with) 16384.0 81920.0 1024.0) (set! (-> gp-0 gspot-pos quad) (-> gp-0 trans quad)) @@ -1088,9 +1088,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector+! s1-1 s1-1 s4-0) @@ -1168,7 +1168,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f @@ -1268,7 +1268,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc index 83fb2b36878..a0c4c00497c 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/civilian_REF.gc @@ -1637,9 +1637,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -1652,9 +1652,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -1668,9 +1668,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc index 967de0b9500..ae1ad6df499 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/guard_REF.gc @@ -442,9 +442,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) (set! sv-320 (new 'stack-no-clear 'vector)) (set! sv-304 (new 'stack-no-clear 'vector)) @@ -470,9 +470,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -487,9 +487,9 @@ ) (.lvf vf4 (&-> v1-15 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) ) @@ -504,9 +504,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (vector-normalize! (vector-! sv-320 sv-240 s0-0) 1.0) @@ -1532,9 +1532,9 @@ (.lvf vf5 (&-> v1-15 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-19 quad) vf6) ) (let ((a1-11 (-> s5-0 move-dist))) @@ -1547,9 +1547,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (let ((v1-17 s5-0)) @@ -1680,9 +1680,9 @@ ) (.lvf vf4 (&-> v1-62 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (set! (-> s5-4 y) 0.0) @@ -1861,9 +1861,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -1876,9 +1876,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -1892,9 +1892,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -2076,9 +2076,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (let ((f30-2 (* 0.5 (vector-vector-xz-distance s5-0 s3-0)))) @@ -2789,9 +2789,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (set! (-> s5-0 quad) (-> s3-0 quad)) @@ -2808,9 +2808,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (vector-negate! (-> s0-0 move-dist) s4-0) @@ -2826,9 +2826,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (let ((a1-11 s3-0)) @@ -2841,9 +2841,9 @@ ) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (set! (-> s5-0 quad) (-> s3-0 quad)) @@ -2920,9 +2920,9 @@ (.lvf vf5 (&-> s2-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-12 quad) vf6) ) (vector+! s5-0 s4-0 s1-0) @@ -3456,9 +3456,9 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) (if (enemy-above-ground? this s0-0 s1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) @@ -3509,11 +3509,11 @@ ) (let ((v1-30 sv-832)) (let ((a0-21 (-> sv-800 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-832 quad)) (.lvf vf5 (&-> a0-21 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-30 quad) vf6) ) 0 @@ -3698,9 +3698,9 @@ (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-3 quad) vf6) ) (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc index 01973f40725..9bb207fdafb 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-grunt_REF.gc @@ -618,11 +618,11 @@ ) (vector-! s4-0 v1-3 (-> this root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let* ((f30-0 v1-5) (f0-0 arg0) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc index f10949d29d6..c1587b1d14d 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-predator_REF.gc @@ -747,8 +747,8 @@ (.lvf vf4 (&-> v1-25 quad)) (.lvf vf5 (&-> a0-18 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-240 quad) vf6) (let* ((f0-5 (vector-length sv-240)) (f0-6 (/ f0-5 (meters 130))) @@ -767,9 +767,9 @@ ) (.lvf vf4 (&-> v1-31 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-19 quad) vf6) ) (vector-normalize! sv-240 1.0) @@ -795,9 +795,9 @@ (.lvf vf5 (&-> sv-256 quad)) (.lvf vf4 (&-> v1-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-29 quad) vf6) ) (let ((v1-34 s2-0)) @@ -806,9 +806,9 @@ ) (.lvf vf5 (&-> s0-0 quad)) (.lvf vf4 (&-> s1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-34 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc index 1271be7a18e..12796c9ffdb 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/traffic-engine_REF.gc @@ -42,15 +42,7 @@ (defmethod debug-draw ((this vis-cell)) (dotimes (s5-0 (-> this segment-count)) (let ((s4-0 (-> this segment-array s5-0))) - (add-debug-line - #t - (bucket-id debug2) - (the-as vector (-> s4-0 vertex)) - (-> s4-0 vertex 1) - *color-gray* - #f - (the-as rgba -1) - ) + (add-debug-line #t (bucket-id debug2) (-> s4-0 vertex 0) (-> s4-0 vertex 1) *color-gray* #f (the-as rgba -1)) (add-debug-x #t (bucket-id debug2) (-> s4-0 vertex 1) *color-red*) ) ) @@ -153,8 +145,8 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-1 quad) vf5) ) (let ((a0-2 (-> s5-0 max))) @@ -164,8 +156,8 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-2 quad) vf5) ) (lookup-cell-for-point this (-> arg0 min) (-> s5-0 min)) @@ -195,7 +187,7 @@ ;; definition for method 12 of type grid-info ;; WARN: Return type mismatch int vs none. (defmethod debug-draw-grid ((this grid-info) (arg0 rgba)) - (draw-grid (the-as vector (-> this box)) (-> this box max) (-> this dimension-array) arg0) + (draw-grid (-> this box min) (-> this box max) (-> this dimension-array) arg0) 0 (none) ) @@ -650,14 +642,9 @@ (let ((v1-4 s2-0)) (set! (-> s4-0 vector 2 x) (* 1024.0 (the float (-> v1-4 speed-limit)))) ) - (vector-! (the-as vector (-> s4-0 vector)) (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) - (vector-normalize! (the-as vector (-> s4-0 vector)) 1.0) - (vector+float*! - (-> s4-0 params position) - (the-as vector (-> arg1 vertex)) - (the-as vector (-> s4-0 vector)) - arg2 - ) + (vector-! (-> s4-0 vector 0) (-> arg1 vertex 1) (-> arg1 vertex 0)) + (vector-normalize! (-> s4-0 vector 0) 1.0) + (vector+float*! (-> s4-0 params position) (-> arg1 vertex 0) (-> s4-0 vector 0) arg2) (let ((f0-6 (* (+ -0.5 (rand-vu)) (* 256.0 (the float (-> s2-0 width)))))) (+! (-> s4-0 params position x) (* -1.0 (-> s4-0 vector 0 z) f0-6)) (+! (-> s4-0 params position z) (* (-> s4-0 vector 0 x) f0-6)) @@ -666,8 +653,8 @@ (set! (-> s4-0 vector 2 y) (+ (/ (-> s4-0 vector 2 x) 2) (* (-> this rand) (-> this traffic inv-density-factor) (-> arg1 spawn-spacing))) ) - (vector-float*! (-> s4-0 params velocity) (the-as vector (-> s4-0 vector)) (-> s4-0 vector 2 x)) - (vector-float*! (-> s4-0 vector 1) (the-as vector (-> s4-0 vector)) (-> s4-0 vector 2 y)) + (vector-float*! (-> s4-0 params velocity) (-> s4-0 vector 0) (-> s4-0 vector 2 x)) + (vector-float*! (-> s4-0 vector 1) (-> s4-0 vector 0) (-> s4-0 vector 2 y)) (when (not (sphere-hash-method-32 (-> this object-hash) (-> s4-0 params position) (-> s4-0 vector 1) 20480.0 -1)) (set! (-> s4-0 params behavior) (the-as uint 2)) (set! (-> s4-0 params nav-mesh) #f) @@ -677,7 +664,7 @@ ) (forward-up-nopitch->quaternion (-> s4-0 params rotation) - (the-as vector (-> s4-0 vector)) + (-> s4-0 vector 0) (new 'static 'vector :y 1.0 :w 1.0) ) (set! (-> this rand) (rand-vu)) @@ -929,7 +916,7 @@ (let ((s3-0 0)) (dotimes (s2-0 (-> s4-0 segment-count)) (let ((s1-0 (-> s4-0 segment-array s2-0))) - (vector-vector-distance (the-as vector (-> s1-0 vertex)) (-> s1-0 vertex 1)) + (vector-vector-distance (-> s1-0 vertex 0) (-> s1-0 vertex 1)) (when (< (-> s1-0 spawn-spacing) 0.0) (inspect s1-0) #t @@ -1453,11 +1440,11 @@ (f0-8 (* f0-6 f0-6)) ) (.lvf vf1 (&-> v1-19 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-20 vf1) (< f0-8 v1-20) ) @@ -1475,11 +1462,11 @@ (f0-13 (* f0-11 f0-11)) ) (.lvf vf1 (&-> v1-31 bbox min quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-32 vf1) (if (< f0-13 v1-32) (set! f30-0 20480.0) @@ -1607,8 +1594,8 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-1 min quad) vf5) ) (let ((a0-2 (-> a1-1 bbox max))) @@ -1618,8 +1605,8 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-2 quad) vf5) ) (set! (-> a1-1 duration) (seconds 5)) @@ -1922,7 +1909,7 @@ gp-0 (lambda ((arg0 traffic-find-segment-struct) (arg1 nav-segment)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) + (vector-! v1-0 (-> arg1 vertex 1) (-> arg1 vertex 0)) (let ((a2-1 v1-0) (a3-1 v1-0) (f0-0 (-> arg1 length)) @@ -3517,9 +3504,7 @@ (s3-0 (-> v1-18 segment-array 0)) ) (countdown (s2-0 (-> v1-18 segment-count)) - (if (and (= (-> s3-0 tracker-id) sv-24) - (line-sphere-intersection? sv-20 (the-as vector (-> s3-0 vertex)) (-> s3-0 vertex 1)) - ) + (if (and (= (-> s3-0 tracker-id) sv-24) (line-sphere-intersection? sv-20 (-> s3-0 vertex 0) (-> s3-0 vertex 1))) (sv-32 sv-28 s3-0) ) (&+! s3-0 48) @@ -3549,7 +3534,7 @@ (dotimes (s3-0 16) (let ((s2-0 (-> arg0 suppressor array s3-0))) (when (logtest? (-> s2-0 flags) (traffic-suppression-box-flags in-use)) - (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (the-as vector (-> s2-0 bbox))) + (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (-> s2-0 bbox min)) (lookup-cell-for-point (-> this grid-info) (-> s4-0 2) (-> s2-0 bbox max)) (set! (-> s4-0 0 y) (-> s4-0 1 y)) (countdown (v1-15 (+ (- 1 (-> s4-0 1 y)) (-> s4-0 2 y))) @@ -3871,9 +3856,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (set! (-> s5-0 6 w) (* 1024.0 (the float (-> s2-0 radius)))) @@ -3908,9 +3893,9 @@ ) (.lvf vf4 (&-> v1-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-13 quad) vf6) ) ) @@ -3924,9 +3909,9 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-14 quad) vf6) ) ) @@ -4177,7 +4162,7 @@ (let ((s2-1 (-> sv-260 segment-array a2-14))) (set! (-> s2-1 vertex 0 quad) (-> sv-248 quad)) (set! (-> s2-1 vertex 1 quad) (-> sv-104 pos quad)) - (set! (-> s2-1 length) (vector-vector-distance (the-as vector (-> s2-1 vertex)) (-> s2-1 vertex 1))) + (set! (-> s2-1 length) (vector-vector-distance (-> s2-1 vertex 0) (-> s2-1 vertex 1))) (let* ((f0-9 (if (logtest? (-> s4-2 flags) (nav-node-flag-byte pedestrian)) 24576.0 49152.0 diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-control_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-control_REF.gc index 2bc1d253ca7..931451ceb05 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-control_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-control_REF.gc @@ -66,9 +66,9 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -248,9 +248,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) ) @@ -264,9 +264,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-6 quad) vf6) ) ) @@ -373,11 +373,11 @@ (when (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) (let ((f1-4 (* 0.5 (/ 1.0 (-> this turn-accel))))) (.lvf vf1 (&-> arg1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-24 vf1) (let ((f2-2 v1-24) (f3-1 (-> this max-turn-speed)) @@ -452,11 +452,11 @@ (set! (-> gp-0 11 quad) (-> v1-70 root transv quad)) (vector-! (-> gp-0 12) (-> gp-0 0) (-> gp-0 10)) (.lvf vf1 (&-> (-> gp-0 12) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-35 vf1) (let ((f1-12 a0-35)) (vector-float*! (-> gp-0 14) (-> gp-0 12) (/ 1.0 (sqrtf f1-12))) @@ -502,11 +502,11 @@ (when (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) (vector-! (-> gp-0 6) (-> gp-0 4) (-> gp-0 0)) (.lvf vf1 (&-> (-> gp-0 6) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-88 vf1) (let ((f0-39 v1-88)) (logclear! (-> this flags) (vehicle-controller-flag off-path)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-effects_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-effects_REF.gc index 961886a9973..9e2fbad09d7 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-effects_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-effects_REF.gc @@ -66,11 +66,11 @@ (f0-25 (* f0-23 f0-23)) ) (.lvf vf1 (&-> (-> this rbody state lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-36 vf1) (cond ((< f0-25 v1-36) @@ -248,9 +248,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (quad-copy! (the-as pointer (-> s3-1 1)) (the-as pointer *vehicle-thruster-glow-template*) 4) @@ -280,9 +280,9 @@ ) (.lvf vf5 (&-> arg1 quad)) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-16 quad) vf6) ) (set! (-> s2-0 part-thruster-scale-x initial-valuef) s0-0) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-guard_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-guard_REF.gc index 49d95bce3e1..4e288f727e2 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-guard_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-guard_REF.gc @@ -244,9 +244,9 @@ (.lvf vf5 (&-> v1-10 quad)) ) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-4 quad) vf6) ) (forward-up->quaternion s4-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) @@ -562,7 +562,7 @@ (set! (-> v1-16 trans quad) a3-1) ) (dotimes (s3-0 (-> this info barrel-count)) - (vector-matrix*! (-> s4-0 vec-1) (the-as vector (-> this info barrel-array s3-0)) (-> s4-0 mat-1)) + (vector-matrix*! (-> s4-0 vec-1) (-> this info barrel-array s3-0 local-pos) (-> s4-0 mat-1)) (set! (-> s4-0 vec-2 quad) (-> s4-0 mat-1 vector 2 quad)) (set! (-> s4-0 proj-params pos quad) (-> s4-0 vec-1 quad)) (vector-float*! (-> s4-0 proj-params vel) (-> s4-0 vec-2) (-> this info shot-speed)) @@ -1182,11 +1182,11 @@ (and (< (-> arg0 tpos y) (+ -16384.0 (-> this root trans y))) (begin (.lvf vf1 (&-> (-> arg0 tvel) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-11 vf1) (let ((f0-2 v1-11) (f1-3 61440.0) @@ -1330,9 +1330,9 @@ ) (.lvf vf4 (&-> a1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-2 quad) vf6) ) (vector-reset! (-> v1-0 up)) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-physics_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-physics_REF.gc index 1625f61b425..bf9ec949c4c 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-physics_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-physics_REF.gc @@ -33,7 +33,7 @@ (a1-1 (-> s4-0 local-pos)) (a2-0 (-> s4-0 normal)) ) - (rigid-body-method-22 (-> v1-18 state) (the-as vector a1-1) a2-0) + (rigid-body-method-22 (-> v1-18 state) (-> a1-1 0) a2-0) ) (let* ((f0-7 (* 0.062831804 (fmin 200.0 (vector-length (-> s4-0 normal))) f30-0)) (f1-8 (-> s0-0 world-sphere w)) @@ -48,7 +48,7 @@ (a1-3 (-> s4-0 local-pos)) (a2-1 (-> s4-0 local-pos 1)) ) - (rigid-body-method-18 (-> v1-34 state) (the-as vector a1-3) a2-1) + (rigid-body-method-18 (-> v1-34 state) (-> a1-3 0) a2-1) ) (vector-reset! (-> s4-0 local-pos 1)) (let* ((f0-12 549018.94) @@ -66,7 +66,7 @@ (a1-4 (-> s4-0 local-pos)) (a2-2 (-> s4-0 local-pos 1)) ) - (rigid-body-method-18 (-> v1-46 state) (the-as vector a1-4) a2-2) + (rigid-body-method-18 (-> v1-46 state) (-> a1-4 0) a2-2) ) ) ) @@ -257,9 +257,9 @@ ) (.lvf vf4 (&-> v1-34 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((v1-35 s3-0) @@ -318,11 +318,11 @@ (logclear! (-> this flags) (rigid-body-object-flag in-air)) (logior! (-> this flags) (rigid-body-object-flag on-flight-level)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-81 vf1) (if (= v1-81 0.0) (set! (-> s1-1 ground-normal y) 1.0) @@ -452,11 +452,11 @@ (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) (when (and (< 0.0 (-> this info tire-friction-factor)) (let ((f0-75 0.0)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-184 vf1) (< f0-75 v1-184) ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc index 0fd09c25ebb..077d951c09b 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-states_REF.gc @@ -310,19 +310,19 @@ (f0-18 (* f0-17 (* f1-5 f1-5))) ) (.lvf vf1 (&-> (-> self rbody state ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-48 vf1) (if (and (< v1-48 f0-18) (begin (.lvf vf1 (&-> (-> self rbody state lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-53 vf1) (let ((f1-9 v1-53) (f2-0 614.4) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc index b3d518cd4de..1f5d0ecaae3 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -347,11 +347,11 @@ (set! (-> s5-0 floats 0) 81920.0) (dotimes (s2-1 (-> this info grab-rail-count)) (let ((s1-0 (-> this info grab-rail-array s2-1))) - (vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 matrices 0 trans) (the-as vector (-> s5-0 matrices)) (-> s1-0 local-pos 0)) (when #t (let ((f30-0 (vector-segment-distance-point! (the-as vector (-> s5-0 matrices)) - (the-as vector (-> s1-0 local-pos)) + (-> s1-0 local-pos 0) (-> s1-0 local-pos 1) (-> s5-0 matrices 0 trans) ) @@ -360,7 +360,7 @@ (when (< f30-0 (-> s5-0 floats 0)) (set! (-> s5-0 floats 0) f30-0) (set! (-> s5-0 vectors 0 quad) (-> s5-0 matrices 0 trans quad)) - (vector-! (-> s5-0 vectors 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 vectors 1) (-> s1-0 local-pos 1) (-> s1-0 local-pos 0)) (vector-normalize! (-> s5-0 vectors 1) 1.0) (set! s3-0 #t) (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 f30-0))) @@ -898,7 +898,7 @@ (set-vector! (-> s4-1 vector 2) 0.0 1.0 0.0 1.0) (mem-copy! (the-as pointer (-> s4-1 vector 4)) (the-as pointer s5-1) 64) (dotimes (s3-0 2) - (vector-matrix*! (the-as vector (-> s4-1 vector)) (-> this info exhaust-local-pos s3-0) s5-1) + (vector-matrix*! (-> s4-1 vector 0) (-> this info exhaust-local-pos s3-0) s5-1) (vector-rotate*! (-> s4-1 vector 1) (-> this info exhaust-local-dir s3-0) s5-1) (vector-cross! (-> s4-1 vector 3) (-> s4-1 vector 1) (-> s4-1 vector 2)) (vector-normalize! (-> s4-1 vector 3) 1.0) @@ -1462,11 +1462,11 @@ (>= (-> this rbody state matrix vector 1 y) (cos 910.2222)) ) (.lvf vf1 (&-> (-> this rbody state ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f0-1 v1-13) (f1-0 0.5) @@ -1484,19 +1484,19 @@ (f0-4 (* f0-3 (* f1-3 f1-3))) ) (.lvf vf1 (&-> (-> this rbody state ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (when (and (< v1-25 f0-4) (begin (.lvf vf1 (&-> (-> this rbody state lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-30 vf1) (let ((f1-7 v1-30) (f2-0 614.4) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle_REF.gc index c2f87858194..eae9e17c6a9 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/vehicle/vehicle_REF.gc @@ -175,11 +175,11 @@ ) (.lvf vf1 (&-> a0-17 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-63 vf1) (let ((f0-25 v1-63) (f1-11 12288.0) @@ -288,7 +288,7 @@ ) ) (set! (-> s5-0 vector 0 w) 0.0) - (vehicle-method-95 this (the-as vector (-> s5-0 vector))) + (vehicle-method-95 this (-> s5-0 vector 0)) (when (= this *debug-actor*) (let ((v1-43 (-> s5-0 vector))) (format *stdcon* "steer ~f, throttle ~f, brake ~f~%" (-> v1-43 0 x) (-> v1-43 0 y) (-> v1-43 0 z)) @@ -669,11 +669,11 @@ (cond ((logtest? (rigid-body-object-flag camera-rapid-track-mode) (-> this flags)) (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-88 vf1) (let ((f0-20 v1-88) (f1-13 122880.0) @@ -688,11 +688,11 @@ (f0-23 (* f0-21 f0-21)) ) (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-98 vf1) (if (< f0-23 v1-98) (enable-rapid-camera-tracking this) @@ -1521,12 +1521,12 @@ (.lvf vf4 (&-> s0-1 0 quad)) (.lvf vf5 (&-> v1-7 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-96 quad) vf6) ) (else - (vector-! (-> s5-0 vector 2) (the-as vector (-> s5-0 vector)) (-> arg0 root trans)) + (vector-! (-> s5-0 vector 2) (-> s5-0 vector 0) (-> arg0 root trans)) ) ) ) @@ -1610,7 +1610,7 @@ (a1-11 (-> s5-0 vector)) (a2-3 s3-1) ) - (rigid-body-method-18 (-> v1-90 state) (the-as vector a1-11) a2-3) + (rigid-body-method-18 (-> v1-90 state) (-> a1-11 0) a2-3) ) (let ((v1-93 (-> this rbody)) (f0-10 1.0) @@ -1625,15 +1625,8 @@ (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-103 prim1 cprim prim-core world-sphere quad)) (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-103 prim2 cprim prim-core world-sphere quad)) ) - (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 vector)) *color-blue*) - (add-debug-vector - #t - (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 vector)) - s3-1 - (meters 0.00024414062) - *color-blue* - ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 vector 0) *color-blue*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> s5-0 vector 0) s3-1 (meters 0.00024414062) *color-blue*) ) ) (rigid-body-object-method-45 this (the-as rigid-body-impact s5-0)) diff --git a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash-shot_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash-shot_REF.gc index 77a3b67fdfb..7a1f30ed52a 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash-shot_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash-shot_REF.gc @@ -310,9 +310,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (let ((f30-0 (-> *part-id-table* 672 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 672 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1))) diff --git a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc index 37b03edc85a..9c6ef5c3ec4 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/ashelin/ash_REF.gc @@ -1304,11 +1304,11 @@ (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) (-> this nav state current-poly) arg0 t0-2) ) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-23 vf1) (let ((f0-11 v1-23) (f1-1 arg4) @@ -1439,9 +1439,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 8 2) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc index 62cdd9b0778..57a3513d904 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/bot_REF.gc @@ -30,10 +30,10 @@ (let* ((v1-5 (-> (the-as (pointer uint8) (&+ arg1 s0-0)))) (a1-2 (-> this course spots v1-5)) ) - (bot-debug-draw-sphere this (the-as vector a1-2) (if (= v1-5 arg2) - (the-as rgba s2-0) - (the-as rgba s1-0) - ) + (bot-debug-draw-sphere this (-> a1-2 center) (if (= v1-5 arg2) + (the-as rgba s2-0) + (the-as rgba s1-0) + ) ) ) ) @@ -47,7 +47,7 @@ (let ((course (-> this course))) (countdown (i (-> course spot-count)) (let ((spot (-> course spots i))) - (bot-debug-draw-sphere this (the-as vector spot) (the-as rgba (-> this spot-color))) + (bot-debug-draw-sphere this (-> spot center) (the-as rgba (-> this spot-color))) (format (clear *temp-string*) "~d" i) (let ((spot-id *temp-string*)) (add-debug-text-3d @@ -209,8 +209,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-3 a2-5) (f1-2 (+ (-> a1-2 world-sphere w) (the-as float (-> s5-0 param 3)))) @@ -250,8 +250,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-4 a2-12) (f1-6 (+ (-> a1-14 world-sphere w) (the-as float (-> s5-0 param 3)))) @@ -624,8 +624,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-3 (+ (-> ccore world-sphere w) (-> sphere r))) @@ -665,8 +665,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-7 (+ (-> a1-14 world-sphere w) (-> sphere r))) @@ -1644,9 +1644,9 @@ (.lvf vf5 (&-> proc-vel quad)) (.lvf vf4 (&-> targ-pos quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (set! (-> turn-info predicted-targ-ry) (atan @@ -1983,9 +1983,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-1 quad) vf6) ) (let ((a2-2 arg0)) @@ -1998,9 +1998,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) ) @@ -2014,9 +2014,9 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-12 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak2/levels/common/ai/ruffian/ruf-task_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/ruffian/ruf-task_REF.gc index 3a350cb03fd..0ddbb5c0a14 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/ruffian/ruf-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/ruffian/ruf-task_REF.gc @@ -218,7 +218,7 @@ ) (set! (-> arg0 poi-handle) (ppointer->handle (-> arg0 my-simple-focus))) (if (and (outside-spot-radius? arg0 (the-as bot-spot #f) (the-as vector #f) #f) - (and (enemy-method-95 arg0 (the-as vector (-> arg0 course spots (-> this face-spot-indexes s4-0))) 10012.445) + (and (enemy-method-95 arg0 (-> arg0 course spots (-> this face-spot-indexes s4-0) center) 10012.445) (not (logtest? (bot-flags bf21) (-> arg0 bot-flags))) ) ) diff --git a/test/decompiler/reference/jak2/levels/common/ai/sig/sig-shot_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/sig/sig-shot_REF.gc index da0e47f8116..8ebf40933cc 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/sig/sig-shot_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/sig/sig-shot_REF.gc @@ -310,9 +310,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (let ((f30-0 (-> *part-id-table* 652 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 652 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1))) diff --git a/test/decompiler/reference/jak2/levels/common/ai/sig/sig-task_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/sig/sig-task_REF.gc index ca57c8043a2..ed24e7880b3 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/sig/sig-task_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/sig/sig-task_REF.gc @@ -128,7 +128,7 @@ ) (countdown (s2-0 (-> this num-spots)) (let* ((v1-3 (-> this spot-indexes s2-0)) - (f28-0 (vector-vector-xz-distance s3-0 (the-as vector (-> arg0 course spots v1-3)))) + (f28-0 (vector-vector-xz-distance s3-0 (-> arg0 course spots v1-3 center))) ) (when (and (or (< f30-0 0.0) (< f28-0 f30-0)) (not (sigt-choose-piston-method-14 this arg0 (the-as int s2-0)))) (set! f30-0 f28-0) diff --git a/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc b/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc index c6a937cf673..fb312b8c3f3 100644 --- a/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/ai/sig/sig_REF.gc @@ -1277,8 +1277,8 @@ (.mov at-0 f0-7) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v0-5 quad) vf1) ) ) @@ -1359,8 +1359,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-7 vf1) (let ((f0-4 a2-7) (f1-3 (+ (-> a1-4 world-sphere w) (-> s5-0 r))) @@ -1400,8 +1400,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-14 vf1) (let ((f0-5 a2-14) (f1-7 (+ (-> a1-16 world-sphere w) (-> s5-0 r))) @@ -1470,9 +1470,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 2) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/common/battle_REF.gc b/test/decompiler/reference/jak2/levels/common/battle_REF.gc index 9d21c9970da..1711c98b4e5 100644 --- a/test/decompiler/reference/jak2/levels/common/battle_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/battle_REF.gc @@ -1024,8 +1024,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-1 (+ (-> a1-5 world-sphere w) (-> gp-0 w))) @@ -1065,8 +1065,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-5 (+ (-> a1-17 world-sphere w) (-> gp-0 w))) diff --git a/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc b/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc index 3b12ced1b53..ea74ac19a41 100644 --- a/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/elec-gate_REF.gc @@ -419,7 +419,7 @@ ) (when proc-focus (let ((focus-trans (get-trans proc-focus 0))) - (let* ((a0-3 (vector-! (new 'stack-no-clear 'vector) focus-trans (the-as vector (-> self dividing-wall)))) + (let* ((a0-3 (vector-! (new 'stack-no-clear 'vector) focus-trans (-> self dividing-wall pos))) (s4-0 (-> self plane (if (< 0.0 (vector-dot a0-3 (-> self dividing-wall dir))) 0 1 @@ -786,10 +786,10 @@ (defmethod spawn-particles ((this elec-gate) (sparticle-lc sparticle-launch-control)) "TODO - Calls [[sparticle-launch-control::11]] on `part-spawner-left` and `part-spawner-right` if they are defined" (if (-> this part-spawner-left) - (spawn sparticle-lc (the-as vector (&-> (-> this part-spawner-left child) 8))) + (spawn sparticle-lc (the-as vector (&-> this part-spawner-left child 8))) ) (if (-> this part-spawner-right) - (spawn sparticle-lc (the-as vector (&-> (-> this part-spawner-right child) 8))) + (spawn sparticle-lc (the-as vector (&-> this part-spawner-right child 8))) ) 0 (none) @@ -913,10 +913,10 @@ (vector-cross! v1-28 v1-28 *up-vector*) (set! (-> this dividing-wall pos quad) (-> s5-3 quad)) (set! (-> this dividing-wall dir quad) (-> v1-28 quad)) - (vector+float*! (the-as vector (-> this plane)) s5-3 v1-28 12288.0) + (vector+float*! (-> this plane 0 pos) s5-3 v1-28 12288.0) (set! (-> (the-as vector (-> this plane 0 dir)) quad) (-> v1-28 quad)) (vector-float*! v1-28 v1-28 -1.0) - (vector+float*! (the-as vector (-> this plane 1)) s5-3 v1-28 12288.0) + (vector+float*! (-> this plane 1 pos) s5-3 v1-28 12288.0) (set! (-> (the-as vector (-> this plane 1 dir)) quad) (-> v1-28 quad)) ) (set! (-> this wall-xz) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc index 66f8fc7f94d..34f98e8353f 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/centurion_REF.gc @@ -780,9 +780,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (set! (-> s1-2 y) 0.0) @@ -1086,7 +1086,7 @@ ) (let ((s4-1 (new 'stack-no-clear 'matrix))) (if (logtest? (enemy-flag drawn-mirrored) (-> this enemy-flags)) - (vector-negate-in-place! (the-as vector (-> s5-1 vector))) + (vector-negate-in-place! (-> s5-1 vector 0)) ) (matrix-rotate-y! s4-1 (if (logtest? (enemy-flag drawn-mirrored) (-> this enemy-flags)) 2548.6223 @@ -1117,9 +1117,9 @@ ) (.lvf vf4 (&-> v1-143 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-20 quad) vf6) ) (spawn-with-matrix (-> this part) s5-1) @@ -1230,9 +1230,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-4 quad) vf6) ) (let ((f30-0 (vector-vector-xz-distance gp-0 (-> self root trans)))) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc index 3a85f4991ef..bf13d720c5d 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/fodder/fodder_REF.gc @@ -552,7 +552,7 @@ (if s4-0 (set! v1-59 (- v1-59)) ) - (vector+float*! gp-0 (-> s3-2 vector 2) (the-as vector (-> s3-2 vector)) v1-59) + (vector+float*! gp-0 (-> s3-2 vector 2) (-> s3-2 vector 0) v1-59) ) (vector-normalize! gp-0 16384.0) (vector+float*! gp-0 gp-0 (-> s3-2 vector 1) (rand-vu-float-range 5079.04 7168.0)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc index ec9ff8994bc..2e96015591c 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/grunt_REF.gc @@ -753,11 +753,11 @@ ) (vector-! s4-0 v1-3 (-> this root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let* ((f30-0 v1-5) (f0-0 arg0) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc index 9a33906ff8b..0505bf0745c 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/guards/crimson-guard-level_REF.gc @@ -1352,9 +1352,9 @@ (.lvf vf5 (&-> v1-15 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-19 quad) vf6) ) (let ((a1-11 (-> s5-0 move-dist))) @@ -1367,9 +1367,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (let ((v1-17 s5-0)) @@ -1469,9 +1469,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) (set! sv-320 (new 'stack-no-clear 'vector)) (set! sv-304 (new 'stack-no-clear 'vector)) @@ -1497,9 +1497,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -1514,9 +1514,9 @@ ) (.lvf vf4 (&-> v1-15 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) ) @@ -1531,9 +1531,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (vector-normalize! (vector-! sv-320 sv-240 s0-0) 1.0) @@ -1637,9 +1637,9 @@ ) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (set! (-> s5-2 y) 0.0) @@ -2361,9 +2361,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-672 quad) vf6) (set! sv-688 (new 'stack-no-clear 'vector)) (set! (-> s4-0 quad) (-> sv-672 quad)) @@ -2389,9 +2389,9 @@ ) (.lvf vf4 (&-> v1-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-14 quad) vf6) ) (vector-negate! (-> s1-0 move-dist) s3-0) @@ -2409,9 +2409,9 @@ ) (.lvf vf4 (&-> v1-37 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-704 quad) vf6) (set! sv-720 (new 'stack-no-clear 'vector)) (let ((a1-18 sv-704)) @@ -2424,9 +2424,9 @@ ) (.lvf vf4 (&-> v1-40 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-18 quad) vf6) ) (set! (-> s4-0 quad) (-> sv-704 quad)) @@ -2498,9 +2498,9 @@ (.lvf vf5 (&-> s2-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-12 quad) vf6) ) (vector+! s5-0 s4-0 s1-0) @@ -3893,9 +3893,9 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) (if (enemy-above-ground? this s0-0 s1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) @@ -3947,11 +3947,11 @@ ) (let ((v1-31 sv-832)) (let ((a0-21 (-> sv-800 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-832 quad)) (.lvf vf5 (&-> a0-21 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-31 quad) vf6) ) 0 @@ -4130,9 +4130,9 @@ (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-3 quad) vf6) ) (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc index 73658ac1c35..2d381952615 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hopper_REF.gc @@ -611,9 +611,9 @@ ) (.lvf vf4 (&-> v1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((v1-8 (-> this nav)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc index f9bd20cf038..52695d57eb9 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/flamer_REF.gc @@ -585,8 +585,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-2 quad) vf1) ) (vector-! v1-1 a0-2 (-> this main-joint-vel)) @@ -596,8 +596,8 @@ (.mov at-1 f0-1) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-4 quad) vf1) ) (set! (-> this main-joint-pos quad) (-> a1-1 quad)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc index 2ac855034ac..b502fbe7c9e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-enemy_REF.gc @@ -47,11 +47,11 @@ (f0-2 (* f0-0 f0-0)) ) (.lvf vf1 (&-> (vector-! (new 'stack-no-clear 'vector) (the-as vector s5-1) (-> this offset)) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-41 vf1) (if (< f0-2 v1-41) (hover-nav-control-method-21 (-> this hover)) @@ -126,8 +126,8 @@ (.mov at-0 f0-14) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-7 quad) vf1) ) (vector-! a1-10 v1-18 (-> self main-joint-vel)) @@ -137,8 +137,8 @@ (.mov at-1 f0-15) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-9 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc index d258d4fc71c..1bec30bfc29 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-control_REF.gc @@ -1118,7 +1118,7 @@ (nav-network-method-22 (-> this nav) s5-0 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> s4-0 s2-1 pos) -1 -1 @@ -1142,7 +1142,7 @@ (nav-network-method-22 (-> this nav) s5-0 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> s4-0 s2-1 pos) -1 -1 @@ -1444,7 +1444,7 @@ ) (hover-nav-control-method-28 this - (vector+! (new 'stack-no-clear 'vector) (the-as vector (hover-nav-control-method-17 this)) s4-0) + (vector+! (new 'stack-no-clear 'vector) (-> (hover-nav-control-method-17 this) world-sphere) s4-0) arg0 ) ) @@ -1648,8 +1648,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a1-0 quad) vf1) (vector+! v1-5 a0-4 a1-0) ) @@ -1689,7 +1689,7 @@ (local-vars (sv-112 float) (sv-128 float) (sv-144 float) (sv-160 float)) (let* ((s5-0 (-> this root)) (s3-0 (hover-nav-control-method-17 this)) - (v1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-0) (-> s5-0 trans))) + (v1-2 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 world-sphere) (-> s5-0 trans))) (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this dest-pos) v1-2)) ) (when (not (logtest? (-> this flags) (hover-nav-flags honflags-0))) @@ -1703,12 +1703,12 @@ (set! sv-144 (the-as float 0.0)) (let* ((t0-0 (hover-nav-control-method-30 this)) (f0-4 (s1-0 s0-0 sv-112 sv-128 sv-144 t0-0)) - (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (the-as vector s3-0) s2-0 (/ f0-4 f30-0))) + (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (-> s3-0 world-sphere) s2-0 (/ f0-4 f30-0))) (s2-1 (nav-network-method-26 (-> this nav) (new 'stack-no-clear 'vector) (-> this root process) - (the-as vector s3-0) + (-> s3-0 world-sphere) t0-2 (-> s3-0 world-sphere w) ) @@ -1730,7 +1730,7 @@ (add-debug-vector #t (bucket-id debug-no-zbuf1) - (the-as vector s3-0) + (-> s3-0 world-sphere) (-> this nav-collide-impulse) (meters 0.00024414062) *color-red* diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-edit_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-edit_REF.gc index b760fec940c..a70d9d971b3 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-edit_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-nav-edit_REF.gc @@ -386,7 +386,7 @@ (set! (-> v1-21 next) #f) ) (let ((a0-19 (-> this left point-list)) - (v1-25 (&-> (-> this left) point-list)) + (v1-25 (&-> this left point-list)) ) (when (zero? s3-1) (break!) @@ -436,7 +436,7 @@ ) (let ((v1-32 s3-1) (a1-40 (-> this right point-list)) - (a0-31 (&-> (-> this right) point-list)) + (a0-31 (&-> this right point-list)) ) (when (zero? v1-32) (break!) @@ -507,7 +507,7 @@ (-> (the-as (pointer uint128) (+ (the-as uint (-> s5-0 node-array data 0 position)) (* 80 s2-0)))) ) (let ((a1-7 (-> gp-0 root point-list)) - (a0-8 (&-> (-> gp-0 root) point-list)) + (a0-8 (&-> gp-0 root point-list)) ) (when (zero? v1-9) (break!) @@ -561,7 +561,7 @@ (set! (-> v1-3 index) (the-as int (-> arg0 s2-0 next))) (set! (-> v1-3 pos quad) (-> arg0 s2-0 pos quad)) (let ((a1-8 (-> gp-0 root point-list)) - (a0-11 (&-> (-> gp-0 root) point-list)) + (a0-11 (&-> gp-0 root point-list)) ) (when (zero? v1-3) (break!) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc index 1a228c416ac..ecbe4faa4ce 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc @@ -816,7 +816,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 22528.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -852,9 +852,9 @@ ) (.lvf vf4 (&-> a0-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (set! (-> s2-0 quad) (-> s3-0 quad)) @@ -869,9 +869,9 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-10 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) v1-15 -32768.0) @@ -895,9 +895,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) ) @@ -1047,7 +1047,7 @@ (set! (-> gp-0 attack-id) a3-11) ) (set! (-> gp-0 timeout) (seconds 4)) - (vector-normalize! (vector-! (-> gp-0 vel) a1-1 (the-as vector v1-0)) arg1) + (vector-normalize! (vector-! (-> gp-0 vel) a1-1 (-> v1-0 0)) arg1) ) (spawn-projectile spyder-shot gp-0 this *default-dead-pool*) ) diff --git a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc index b95c1264d67..3d4dd828585 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/gun-buoy_REF.gc @@ -75,8 +75,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-12 quad) vf1) ) (let ((v1-13 s3-0)) diff --git a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc index 82f70227237..d82f592a663 100644 --- a/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/entities/spydroid_REF.gc @@ -819,11 +819,11 @@ (vector-normalize! s1-1 204800.0) (let ((v1-17 s1-1)) (let ((a0-19 s1-1)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-19 quad)) ) (.lvf vf5 (&-> (the-as vector sv-144) quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-17 quad) vf6) ) (vector-! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) diff --git a/test/decompiler/reference/jak2/levels/common/guard-projectile_REF.gc b/test/decompiler/reference/jak2/levels/common/guard-projectile_REF.gc index 418e9cfe4d4..642a5299c4e 100644 --- a/test/decompiler/reference/jak2/levels/common/guard-projectile_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/guard-projectile_REF.gc @@ -403,9 +403,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 606 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 606 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak2/levels/common/metalhead-projectile_REF.gc b/test/decompiler/reference/jak2/levels/common/metalhead-projectile_REF.gc index 1c398eee345..c791e1fd8a4 100644 --- a/test/decompiler/reference/jak2/levels/common/metalhead-projectile_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/metalhead-projectile_REF.gc @@ -388,9 +388,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 621 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 621 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) @@ -801,7 +801,7 @@ (set! (-> a1-3 start-pos quad) (-> self root root-prim prim-core world-sphere quad)) (vector-! (-> a1-3 move-dist) - (the-as vector (-> (the-as collide-shape s4-1) root-prim prim-core)) + (-> (the-as collide-shape s4-1) root-prim prim-core world-sphere) (-> a1-3 start-pos) ) (let ((v1-6 a1-3)) diff --git a/test/decompiler/reference/jak2/levels/common/race/race-hud_REF.gc b/test/decompiler/reference/jak2/levels/common/race/race-hud_REF.gc index aeadf603ce7..f7d991e3f8f 100644 --- a/test/decompiler/reference/jak2/levels/common/race/race-hud_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/race/race-hud_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-race-timer ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-timer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 0 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 0 (the int (+ 20.0 (* -100.0 (-> this offset))))) (format (clear (-> this strings 0 text)) "~2,'0D:" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 60 5) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 60 5) (format (clear (-> this strings 1 text)) "~2,'0D:" (-> this values 1 current)) (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) @@ -25,7 +21,7 @@ 28 0 ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 128 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 128 0) ((method-of-type hud draw) this) 0 (none) @@ -72,16 +68,12 @@ ;; definition for method 15 of type hud-race-lap-counter ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-lap-counter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 504 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 504 (the int (+ 20.0 (* -100.0 (-> this offset))))) (set! (-> this strings 0 scale) 0.55) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 5) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -20 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -50 0) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -40 5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -20 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) -50 0) ((method-of-type hud draw) this) 0 (none) @@ -119,16 +111,12 @@ ;; definition for method 15 of type hud-race-turbo-counter ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-turbo-counter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 224 - (the int (+ 25.0 (* -100.0 (-> this offset)))) - ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 32 0) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 1)) 32 0) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 2)) 32 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 2)) 32 0) + (set-hud-piece-position! (-> this sprites 0) 224 (the int (+ 25.0 (* -100.0 (-> this offset))))) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 32 0) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 1 pos) 32 0) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 2 pos) 32 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 2 pos) 32 0) (let* ((v1-2 (-> this values 0 current)) (f0-3 (if (> v1-2 0) 1.0 @@ -190,18 +178,14 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-position)) (local-vars (s5-0 int)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 24 - (the int (+ 324.0 (* 100.0 (-> this offset)))) - ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 0 0) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 0 0) + (set-hud-piece-position! (-> this sprites 0) 24 (the int (+ 324.0 (* 100.0 (-> this offset))))) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) 0 0) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 0 pos) 0 0) (let ((v1-2 (-> this values 0 current))) (dotimes (a0-9 16) (set! (-> this sprites a0-9 scale-x) (if (= a0-9 v1-2) @@ -235,7 +219,7 @@ ) (set-as-offset-from! (-> this sprites s5-0) - (the-as vector4w (-> this sprites v1-2)) + (-> this sprites v1-2 pos) (if (zero? v1-2) 28 52 diff --git a/test/decompiler/reference/jak2/levels/common/race/race-manager_REF.gc b/test/decompiler/reference/jak2/levels/common/race/race-manager_REF.gc index 0b0392178b8..d3b7abb4e6c 100644 --- a/test/decompiler/reference/jak2/levels/common/race/race-manager_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/race/race-manager_REF.gc @@ -35,9 +35,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) #t ) @@ -245,11 +245,11 @@ (let ((v1-39 (new 'stack-no-clear 'vector))) (vector-! (the-as vector (&-> v1-39 x)) (-> this position) (the-as vector (-> arg0 info finish-sphere))) (.lvf vf1 (&-> (the-as vector (&-> v1-39 x)) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-29 vf1) (let ((f0-7 a0-29) (f1-1 (-> arg0 info finish-sphere r)) @@ -553,7 +553,7 @@ ) (cubic-curve-method-9 (-> this player-intro-curve) - (the-as vector (-> v1-27 vector)) + (-> v1-27 vector 0) (-> v1-27 vector 2) (-> v1-27 vector 1) (-> v1-27 trans) @@ -787,16 +787,14 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 0 quad) vf6) ) (+! (-> s4-0 vector 0 y) 22528.0) (set! (-> this race-signal) - (process->handle - (race-signal-spawn s5-1 (the-as vector (-> s4-0 vector)) (the-as quaternion (-> s4-0 vector 1))) - ) + (process->handle (race-signal-spawn s5-1 (-> s4-0 vector 0) (the-as quaternion (-> s4-0 vector 1)))) ) ) ) @@ -862,9 +860,9 @@ ) (.lvf vf4 (&-> a2-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-0 quad) vf6) ) (let ((t0-1 (-> v1-3 mat trans))) @@ -877,9 +875,9 @@ ) (.lvf vf4 (&-> a2-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-1 quad) vf6) ) (set! (-> a1-13 start-position quad) (-> v1-3 mat trans quad)) diff --git a/test/decompiler/reference/jak2/levels/common/race/race-mesh_REF.gc b/test/decompiler/reference/jak2/levels/common/race/race-mesh_REF.gc index eac5f2c89a2..985163ca2ee 100644 --- a/test/decompiler/reference/jak2/levels/common/race/race-mesh_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/race/race-mesh_REF.gc @@ -346,7 +346,7 @@ (mem-copy! (the-as pointer (-> gp-0 2)) (the-as pointer (-> this samples v1-7)) 32) ) (let ((f30-0 (- arg2 (the float s1-0)))) - (vector-lerp! (the-as vector (-> arg0 bytes)) (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 1)) f30-0) + (vector-lerp! (the-as vector (-> arg0 bytes)) (-> gp-0 0 pos) (-> gp-0 1 pos) f30-0) (quaternion-slerp! (-> arg0 quat) (-> gp-0 0 quat) (-> gp-0 1 quat) f30-0) (set! (-> arg0 stick-x) (the int (+ 0.5 (* (the float (-> gp-0 1 stick-x)) f30-0) (* (the float (-> gp-0 0 stick-x)) (- 1.0 f30-0)))) @@ -361,11 +361,11 @@ ) ) (set! (-> arg0 flags) (-> gp-0 0 flags)) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 1)) (the-as vector (-> gp-0 0))) - (vector-float*! (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 4)) 15.0) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 2)) (the-as vector (-> gp-0 1))) - (vector-float*! (the-as vector (-> gp-0 3 quat)) (the-as vector (-> gp-0 4)) 15.0) - (vector-lerp! arg1 (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 3 quat)) f30-0) + (vector-! (-> gp-0 4 pos) (-> gp-0 1 pos) (-> gp-0 0 pos)) + (vector-float*! (-> gp-0 3 pos) (-> gp-0 4 pos) 15.0) + (vector-! (-> gp-0 4 pos) (-> gp-0 2 pos) (-> gp-0 1 pos)) + (vector-float*! (-> gp-0 3 quat vec) (-> gp-0 4 pos) 15.0) + (vector-lerp! arg1 (-> gp-0 3 pos) (-> gp-0 3 quat vec) f30-0) ) ) ) @@ -393,20 +393,20 @@ (if (< arg1 0.0) (set! arg1 (+ arg1 f30-0)) ) - (race-path-method-10 this (the-as vector (-> s4-0 vector)) arg1 arg2) + (race-path-method-10 this (-> s4-0 vector 0) arg1 arg2) (race-path-method-10 this (-> s4-0 vector 1) gp-0 arg2) - (vector-! (-> s4-0 vector 2) (-> s4-0 vector 1) (the-as vector (-> s4-0 vector))) - (vector-! (-> s4-0 trans) arg0 (the-as vector (-> s4-0 vector))) + (vector-! (-> s4-0 vector 2) (-> s4-0 vector 1) (-> s4-0 vector 0)) + (vector-! (-> s4-0 trans) arg0 (-> s4-0 vector 0)) (let ((f0-7 0.0) (f1-1 1.0) (f2-1 (vector-dot (-> s4-0 vector 2) (-> s4-0 trans))) ) (.lvf vf1 (&-> (-> s4-0 vector 2) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-8 (fmax f0-7 (fmin f1-1 (/ f2-1 v1-15))))) (if (< gp-0 arg1) @@ -651,25 +651,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) - (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (vector-! v1-11 (-> arg1 slice-corners 2) (-> arg1 slice-corners 0)) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s4-0 (new 'stack-no-clear 'vector)) (s3-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s4-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 1) (-> arg1 slice-corners 0)) (vector-cross! s3-0 s4-0 v1-11) ) (else - (vector-! s4-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 3) (-> arg1 slice-corners 0)) (vector-cross! s3-0 v1-11 s4-0) ) ) (vector-normalize! s3-0 1.0) (set-vector! s4-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (the-as vector (-> arg1 slice-corners)) s3-0))) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (-> arg1 slice-corners 0) s3-0))) (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s4-0 f0-10) ) ) @@ -713,8 +713,7 @@ (mem-copy! (the-as pointer s2-0) (the-as pointer slice-query) 112) (while (nonzero? s1-0) (+! s1-0 -1) - (let ((a1-7 (-> (&-> (-> race-hash slice-table) 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0)) - ) + (let ((a1-7 (-> (&-> race-hash slice-table 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) (when (race-mesh-method-19 this (the-as int a1-7) s2-0) (if (or (= (-> slice-query slice-id) -1) (< (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> slice-query search-sphere)) @@ -766,28 +765,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> slice-query slice-corners 2) (the-as vector (-> slice-query slice-corners))) - (vector-! a0-7 (the-as vector (-> slice-query search-sphere)) (the-as vector (-> slice-query slice-corners))) + (vector-! v1-11 (-> slice-query slice-corners 2) (-> slice-query slice-corners 0)) + (vector-! a0-7 (the-as vector (-> slice-query search-sphere)) (-> slice-query slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s5-0 (new 'stack-no-clear 'vector)) (s4-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s5-0 (-> slice-query slice-corners 1) (the-as vector (-> slice-query slice-corners))) + (vector-! s5-0 (-> slice-query slice-corners 1) (-> slice-query slice-corners 0)) (vector-cross! s4-0 s5-0 v1-11) ) (else - (vector-! s5-0 (-> slice-query slice-corners 3) (the-as vector (-> slice-query slice-corners))) + (vector-! s5-0 (-> slice-query slice-corners 3) (-> slice-query slice-corners 0)) (vector-cross! s4-0 v1-11 s5-0) ) ) (vector-normalize! s4-0 1.0) (set-vector! s5-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 - (intersect-ray-plane (-> slice-query search-sphere) s5-0 (the-as vector (-> slice-query slice-corners)) s4-0) - ) - ) + (let ((f0-10 (intersect-ray-plane (-> slice-query search-sphere) s5-0 (-> slice-query slice-corners 0) s4-0))) (vector+float*! (-> slice-query pt-on-slice) (the-as vector (-> slice-query search-sphere)) s5-0 f0-10) ) ) @@ -829,7 +825,7 @@ (when (not (logtest? a2-4 a1-2)) (set! (-> arg0 cell-bits 0 data a0-1) (logior a2-4 a1-2)) (let* ((v1-5 (the-as object (+ (the-as uint (-> this hash cells)) (* v1-3 4)))) - (s3-0 (&-> (-> this hash slice-table) 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) + (s3-0 (&-> this hash slice-table 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) (s1-0 (-> (the-as race-mesh-hash-cell v1-5) slice-count)) ) (when (nonzero? s1-0) @@ -950,7 +946,7 @@ (defmethod race-mesh-method-14 ((this race-mesh) (arg0 race-mesh-slice-query)) (let* ((f30-0 (vector-line-distance-point! (-> arg0 pt-on-slice) - (the-as vector (-> arg0 slice-corners)) + (-> arg0 slice-corners 0) (-> arg0 slice-corners 1) (the-as vector #f) ) diff --git a/test/decompiler/reference/jak2/levels/common/race/race-obs_REF.gc b/test/decompiler/reference/jak2/levels/common/race/race-obs_REF.gc index 75a116ae517..9fb84858389 100644 --- a/test/decompiler/reference/jak2/levels/common/race/race-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/race/race-obs_REF.gc @@ -290,7 +290,7 @@ (+! (-> v1-8 vector 1 y) 204800.0) (cubic-curve-method-9 (-> self curve) - (the-as vector (-> v1-8 vector)) + (-> v1-8 vector 0) (-> v1-8 vector 2) (-> v1-8 vector 1) (-> v1-8 trans) diff --git a/test/decompiler/reference/jak2/levels/common/race/vehicle-racer_REF.gc b/test/decompiler/reference/jak2/levels/common/race/vehicle-racer_REF.gc index b92ccbf0631..93efb2e7357 100644 --- a/test/decompiler/reference/jak2/levels/common/race/vehicle-racer_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/race/vehicle-racer_REF.gc @@ -595,13 +595,13 @@ (set! (-> s3-0 1 vector 1 x) 819200.0) (quaternion-copy! (the-as quaternion (-> s3-0 1)) (-> s5-0 path-sample quat)) (vector-float*! (-> s3-0 0 vector 2) (-> s5-0 lin-velocity) f28-0) - (vector-! (-> s3-0 0 trans) (the-as vector (-> s5-0 path-sample)) (-> s4-0 state position)) + (vector-! (-> s3-0 0 trans) (-> s5-0 path-sample pos) (-> s4-0 state position)) (.lvf vf1 (&-> (-> s3-0 0 trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-18 vf1) (let ((f0-6 v1-18) (f1-5 1.0) @@ -619,9 +619,9 @@ ) (.lvf vf4 (&-> v1-22 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (vector-! (the-as vector (-> s3-0 0)) (-> s3-0 0 vector 2) (-> s4-0 state lin-velocity)) @@ -630,11 +630,11 @@ (f0-12 (* f0-10 f0-10)) ) (.lvf vf1 (&-> (-> s3-0 0) quad 0)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-28 vf1) (if (< f0-12 v1-28) (vector-normalize! (the-as vector (-> s3-0 0)) (-> s3-0 1 vector 1 x)) @@ -650,9 +650,9 @@ ) (.lvf vf4 (&-> v1-31 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((a1-10 (-> s4-0 state position))) @@ -665,9 +665,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (quaternion-pseudo-seek @@ -769,18 +769,18 @@ (let ((f0-19 (+ (-> s5-0 path-t) (* 1.875 (/ 1.0 (-> s4-0 3 vector 0 z)) (-> s4-0 3 vector 0 y))))) (race-path-method-11 (-> s5-0 path) (the-as race-path-sample (-> s4-0 2 vector 1)) (-> s4-0 2 trans) f0-19) ) - (vector-! (-> s4-0 0 trans) (the-as vector (-> s5-0 path-sample)) (the-as vector (-> s4-0 0))) + (vector-! (-> s4-0 0 trans) (-> s5-0 path-sample pos) (the-as vector (-> s4-0 0))) (let* ((f0-20 (-> s4-0 3 vector 1 y)) (f1-13 1.0) (f2-4 40960.0) (f1-14 (/ f1-13 (* f2-4 f2-4))) ) (.lvf vf1 (&-> (-> s4-0 0 trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-35 vf1) (set! (-> s4-0 3 vector 1 y) (+ f0-20 (* f1-14 v1-35))) ) @@ -805,9 +805,9 @@ ) (.lvf vf4 (&-> v1-39 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (vector-! (the-as vector (-> s4-0 1)) (-> s4-0 0 vector 2) (-> s4-0 0 vector 1)) @@ -904,8 +904,8 @@ (defmethod vehicle-racer-method-152 ((this vehicle-racer)) (let ((s5-0 (new 'stack-no-clear 'matrix3))) (set! (-> s5-0 vector 0 quad) (-> this rbody state position quad)) - (set! (-> this camera-dist2) (vector-vector-distance-squared (the-as vector (-> s5-0 vector)) (camera-pos))) - (set! (-> this player-dist2) (vector-vector-distance-squared (the-as vector (-> s5-0 vector)) (target-pos 0))) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 vector 0) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> s5-0 vector 0) (target-pos 0))) ) (if (time-elapsed? (-> this shortcut-time) (seconds 5)) (set! (-> this shortcut-speed-factor) 0.0) @@ -925,8 +925,8 @@ (defmethod vehicle-racer-method-155 ((this vehicle-racer)) (let ((s5-0 (new 'stack-no-clear 'matrix3))) (set! (-> s5-0 vector 0 quad) (-> this rbody state position quad)) - (set! (-> this camera-dist2) (vector-vector-distance-squared (the-as vector (-> s5-0 vector)) (camera-pos))) - (set! (-> this player-dist2) (vector-vector-distance-squared (the-as vector (-> s5-0 vector)) (target-pos 0))) + (set! (-> this camera-dist2) (vector-vector-distance-squared (-> s5-0 vector 0) (camera-pos))) + (set! (-> this player-dist2) (vector-vector-distance-squared (-> s5-0 vector 0) (target-pos 0))) ) (set! (-> this shortcut-speed-factor) 0.0) (vehicle-racer-method-154 this) diff --git a/test/decompiler/reference/jak2/levels/consite/consite-scenes_REF.gc b/test/decompiler/reference/jak2/levels/consite/consite-scenes_REF.gc index 41048e15e2e..4d52eee08ee 100644 --- a/test/decompiler/reference/jak2/levels/consite/consite-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/consite/consite-scenes_REF.gc @@ -623,9 +623,9 @@ ) (.lvf vf4 (&-> s3-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (vector+! gp-0 s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 49152.0)) @@ -641,9 +641,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-2 quad) vf6) (let ((f28-0 (-> *part-id-table* 621 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 621 init-specs 4 initial-valuef) (fmin f28-0 f30-0)) @@ -778,7 +778,7 @@ ) ) (vector-normalize! (-> s2-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1) (-> s2-0 vector 2)) + (vector-cross! (-> s2-0 vector 0) (-> s2-0 vector 1) (-> s2-0 vector 2)) (matrix->quaternion gp-1 s2-0) ) (sound-play "nboss-shoot-hit") diff --git a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc index a91dee2e63b..57771c999b3 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-digger_REF.gc @@ -221,9 +221,9 @@ (.lvf vf5 (&-> s2-0 quad)) (.lvf vf4 (&-> v1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-5 quad) vf6) ) ) @@ -506,13 +506,9 @@ ;; definition for method 15 of type hud-dig-clasp ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-dig-clasp)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 210 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 210) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -18 29) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -18 29) ((method-of-type hud draw) this) 0 (none) @@ -955,7 +951,7 @@ (dotimes (s5-0 7) (cond ((-> this clasp-info-ok) - (vector<-cspace! (the-as vector (-> this chain-joints s5-0)) (-> this chain-joints s5-0 joint-mod joint)) + (vector<-cspace! (-> this chain-joints s5-0 position) (-> this chain-joints s5-0 joint-mod joint)) ) (else (set! (-> this chain-joints s5-0 position quad) (-> this root trans quad)) @@ -990,11 +986,11 @@ (f28-0 0.1) (s1-0 (new 'stack-no-clear 'vector)) ) - (vector-! (-> s5-0 vector 2) (the-as vector (-> this chain-joints)) (-> this root trans)) + (vector-! (-> s5-0 vector 2) (-> this chain-joints 0 position) (-> this root trans)) (vector-normalize! (-> s5-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s5-0 vector)) (-> this digger-vertical) (-> s5-0 vector 2)) - (vector-normalize! (the-as vector (-> s5-0 vector)) 1.0) - (vector-cross! (-> s5-0 vector 1) (-> s5-0 vector 2) (the-as vector (-> s5-0 vector))) + (vector-cross! (-> s5-0 vector 0) (-> this digger-vertical) (-> s5-0 vector 2)) + (vector-normalize! (-> s5-0 vector 0) 1.0) + (vector-cross! (-> s5-0 vector 1) (-> s5-0 vector 2) (-> s5-0 vector 0)) (matrix->quaternion (-> this root quat) s5-0) (set! (-> this joint-one trans quad) (-> this root trans quad)) (quaternion-copy! (-> this joint-one quat) (-> this root quat)) @@ -1006,7 +1002,7 @@ (set! (-> sv-160 quad) v1-23) ) (+! (-> sv-160 y) -2048.0) - (vector+float*! sv-160 sv-160 (the-as vector s2-0) f28-0) + (vector+float*! sv-160 sv-160 (-> s2-0 value) f28-0) (set! f28-0 (fmin 1.0 (+ 0.2 f28-0))) (when (< s0-0 7) (vector+float*! @@ -1040,11 +1036,11 @@ (set! (-> sv-144 joint-mod trans quad) (-> sv-160 quad)) ) (when (< s0-0 7) - (vector-! (-> s5-0 vector 2) (the-as vector (-> this chain-joints (+ s0-0 1))) sv-160) + (vector-! (-> s5-0 vector 2) (-> this chain-joints (+ s0-0 1) position) sv-160) (vector-normalize! (-> s5-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s5-0 vector)) s3-0 (-> s5-0 vector 2)) - (vector-normalize! (the-as vector (-> s5-0 vector)) 1.0) - (vector-cross! (-> s5-0 vector 1) (-> s5-0 vector 2) (the-as vector (-> s5-0 vector))) + (vector-cross! (-> s5-0 vector 0) s3-0 (-> s5-0 vector 2)) + (vector-normalize! (-> s5-0 vector 0) 1.0) + (vector-cross! (-> s5-0 vector 1) (-> s5-0 vector 2) (-> s5-0 vector 0)) (matrix->quaternion (-> sv-144 joint-mod quat) s5-0) (set! (-> s3-0 quad) (-> s5-0 vector 1 quad)) ) @@ -1114,8 +1110,8 @@ (let ((gp-0 (new 'stack-no-clear 'matrix))) (vector-float*! (-> gp-0 vector 2) v1-4 (/ 1.0 f30-0)) (set-vector! (-> gp-0 vector 0) (-> gp-0 vector 2 z) 0.0 (- (-> gp-0 vector 2 x)) 1.0) - (vector-normalize! (the-as vector (-> gp-0 vector)) 1.0) - (vector-cross! (-> gp-0 vector 1) (-> gp-0 vector 2) (the-as vector (-> gp-0 vector))) + (vector-normalize! (-> gp-0 vector 0) 1.0) + (vector-cross! (-> gp-0 vector 1) (-> gp-0 vector 2) (-> gp-0 vector 0)) (vector-reset! (-> gp-0 trans)) (set! (-> gp-0 vector 0 w) 0.0) (set! (-> gp-0 vector 1 w) 0.0) @@ -1310,7 +1306,7 @@ (defmethod dig-digger-method-24 ((this dig-digger)) (set! (-> this vertical target x) 0.0) (set! (-> this vertical target z) 0.0) - (let ((s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this vertical)) 1.0)) + (let ((s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this vertical value) 1.0)) (s5-0 0) ) (dotimes (s3-0 24) @@ -1453,7 +1449,7 @@ ) (update! (-> self twist) (fabs (-> self twist-kicker value))) (let ((gp-2 (new 'stack-no-clear 'matrix))) - (vector-normalize-copy! (-> gp-2 vector 1) (the-as vector (-> self vertical)) 1.0) + (vector-normalize-copy! (-> gp-2 vector 1) (-> self vertical value) 1.0) (set-vector! (-> gp-2 vector 0) (cos (* 32768.0 (-> self twist value))) @@ -1461,9 +1457,9 @@ (sin (* 32768.0 (-> self twist value))) 1.0 ) - (vector-cross! (-> gp-2 vector 2) (the-as vector (-> gp-2 vector)) (-> gp-2 vector 1)) + (vector-cross! (-> gp-2 vector 2) (-> gp-2 vector 0) (-> gp-2 vector 1)) (vector-normalize! (-> gp-2 vector 2) 1.0) - (vector-cross! (the-as vector (-> gp-2 vector)) (-> gp-2 vector 1) (-> gp-2 vector 2)) + (vector-cross! (-> gp-2 vector 0) (-> gp-2 vector 1) (-> gp-2 vector 2)) (vector-reset! (-> gp-2 trans)) (set! (-> gp-2 vector 0 w) 0.0) (set! (-> gp-2 vector 1 w) 0.0) diff --git a/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc index 59511eb0dd8..93a54a289b8 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-obs_REF.gc @@ -939,13 +939,9 @@ ;; definition for method 15 of type hud-dig-button ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-dig-button)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 487.0 (* 130.0 (-> this offset)))) - 210 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 487.0 (* 130.0 (-> this offset)))) 210) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 20) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 20) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc index e278194e6da..75172561829 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-mech-master_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-cpanel ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-cpanel)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 502.0 (* 130.0 (-> this offset)))) - 200 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 502.0 (* 130.0 (-> this offset)))) 200) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -28 55) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -28 55) ((method-of-type hud draw) this) 0 (none) @@ -303,9 +299,9 @@ (position-in-front-of-camera! (-> s4-0 vector 2) 4096.0 0.0) (vector-! (-> s4-0 vector 2) (-> s4-0 vector 2) (-> s4-0 trans)) (vector-normalize! (-> s4-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s4-0 vector)) *up-vector* (-> s4-0 vector 2)) - (vector-normalize! (the-as vector (-> s4-0 vector)) 1.0) - (vector-cross! (-> s4-0 vector 1) (-> s4-0 vector 2) (the-as vector (-> s4-0 vector))) + (vector-cross! (-> s4-0 vector 0) *up-vector* (-> s4-0 vector 2)) + (vector-normalize! (-> s4-0 vector 0) 1.0) + (vector-cross! (-> s4-0 vector 1) (-> s4-0 vector 2) (-> s4-0 vector 0)) (vector-normalize! (-> s4-0 vector 1) 1.0) (set! (-> s4-0 vector 0 w) 0.0) (set! (-> s4-0 vector 1 w) 0.0) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc index 30e91051adf..ca6c2a1e512 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-gruntegg ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-gruntegg)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 200 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 200) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -25 33) ((method-of-type hud draw) this) 0 (none) @@ -47,13 +43,9 @@ ;; definition for method 15 of type hud-crimsonhover ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-crimsonhover)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 200 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 200) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -25 33) ((method-of-type hud draw) this) 0 (none) @@ -998,27 +990,27 @@ (s3-0 (-> this local-to-world)) (s5-1 (-> this size)) ) - (get-point-in-path! (-> this path) (the-as vector (-> s4-1 vector)) 0.0 'interp) + (get-point-in-path! (-> this path) (-> s4-1 vector 0) 0.0 'interp) (get-point-in-path! (-> this path) (-> s4-1 vector 1) 1.0 'interp) (get-point-in-path! (-> this path) (-> s4-1 vector 2) 3.0 'interp) (matrix-identity! s3-0) (vector-normalize-copy! - (the-as vector (-> s3-0 vector)) - (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 1) (the-as vector (-> s4-1 vector))) + (-> s3-0 vector 0) + (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 1) (-> s4-1 vector 0)) 1.0 ) (vector-normalize-copy! (-> s3-0 vector 2) - (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 2) (the-as vector (-> s4-1 vector))) + (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 2) (-> s4-1 vector 0)) 1.0 ) - (vector-normalize! (vector-cross! (-> s3-0 vector 1) (-> s3-0 vector 2) (the-as vector (-> s3-0 vector))) 1.0) - (vector-cross! (-> s3-0 vector 2) (the-as vector (-> s3-0 vector)) (-> s3-0 vector 1)) + (vector-normalize! (vector-cross! (-> s3-0 vector 1) (-> s3-0 vector 2) (-> s3-0 vector 0)) 1.0) + (vector-cross! (-> s3-0 vector 2) (-> s3-0 vector 0) (-> s3-0 vector 1)) (vector-normalize! (-> s3-0 vector 2) 1.0) (set! (-> s3-0 trans quad) (-> s4-1 vector 0 quad)) (matrix-inverse-of-rot-trans! (-> this world-to-local) (-> this local-to-world)) - (set! (-> this deadly-width) (vector-vector-distance (-> s4-1 vector 1) (the-as vector (-> s4-1 vector)))) - (set! (-> this deadly-length) (vector-vector-distance (-> s4-1 vector 2) (the-as vector (-> s4-1 vector)))) + (set! (-> this deadly-width) (vector-vector-distance (-> s4-1 vector 1) (-> s4-1 vector 0))) + (set! (-> this deadly-length) (vector-vector-distance (-> s4-1 vector 2) (-> s4-1 vector 0))) (let ((v1-39 (-> this root root-prim))) (vector-reset! (-> v1-39 local-sphere)) (let* ((f0-14 (/ (-> this deadly-width) 2)) @@ -1029,10 +1021,10 @@ ) ) (set! (-> s5-1 0) - (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 1) (the-as vector (-> s4-1 vector)))) + (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 1) (-> s4-1 vector 0))) ) (set! (-> s5-1 1) - (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 2) (the-as vector (-> s4-1 vector)))) + (vector-length (vector-! (new 'stack-no-clear 'vector) (-> s4-1 vector 2) (-> s4-1 vector 0))) ) ) (let* ((v1-46 *game-info*) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc index 84fd3097b20..9e06090d789 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-panel_REF.gc @@ -690,7 +690,7 @@ ) :code sleep-code :post (behavior () - (spawn-with-cspace (-> self part) (the-as cspace (-> self node-list data))) + (spawn-with-cspace (-> self part) (-> self node-list data 0)) (sound-play "small-panel" :id (-> self idle-sound-id)) ) ) diff --git a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc index dcea9678e20..a7b4abdfe55 100644 --- a/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/ginsu_REF.gc @@ -383,7 +383,7 @@ (set! (-> s5-0 trans quad) a2-2) ) (when (logtest? (enemy-flag drawn-mirrored) (-> this enemy-flags)) - (vector-negate! (the-as vector (-> s5-0 vector)) (the-as vector (-> s5-0 vector))) + (vector-negate! (-> s5-0 vector 0) (-> s5-0 vector 0)) (set! (-> s5-0 vector 0 w) 0.0) ) (spawn-with-matrix (-> this blade-part) s5-0) @@ -492,7 +492,7 @@ (set! (-> s5-0 quad) (-> a1-0 velocity quad)) ) (quaternion->matrix s4-0 (-> this root quat)) - (let ((f0-1 (vector-dot s5-0 (the-as vector (-> s4-0 vector))))) + (let ((f0-1 (vector-dot s5-0 (-> s4-0 vector 0)))) (if (logtest? (enemy-flag drawn-mirrored) (-> this enemy-flags)) (set! f0-1 (- f0-1)) ) diff --git a/test/decompiler/reference/jak2/levels/forest/fish_REF.gc b/test/decompiler/reference/jak2/levels/forest/fish_REF.gc index e7d9fbf5190..2128a701206 100644 --- a/test/decompiler/reference/jak2/levels/forest/fish_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/fish_REF.gc @@ -198,8 +198,8 @@ (.lvf vf4 (&-> sv-496 quad)) (.lvf vf5 (&-> v0-4 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-512 quad) vf6) (let* ((v1-21 sv-512) (f0-5 (+ (* (-> v1-21 x) (-> v1-21 x)) (* (-> v1-21 z) (-> v1-21 z)))) @@ -217,9 +217,9 @@ (.lvf vf5 (&-> sv-512 quad)) (.lvf vf4 (&-> v1-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-9 quad) vf6) ) #t @@ -249,9 +249,9 @@ ) (.lvf vf4 (&-> v1-39 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-528 quad) vf6) (let ((v1-41 gp-0) (a0-11 sv-528) @@ -283,9 +283,9 @@ ) (.lvf vf4 (&-> v1-48 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) ) @@ -301,9 +301,9 @@ ) (.lvf vf4 (&-> v1-49 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-14 quad) vf6) ) (set! sv-592 sv-608) @@ -318,9 +318,9 @@ ) (.lvf vf5 (&-> sv-576 quad)) (.lvf vf4 (&-> sv-560 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-592 quad) vf6) (vector-! sv-608 sv-608 s2-0) (let ((a0-21 s0-0)) @@ -331,9 +331,9 @@ (.lvf vf5 (&-> sv-608 quad)) (.lvf vf4 (&-> v1-64 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-21 quad) vf6) ) (+! (-> s1-0 wander) (rand-vu-float-range -1820.4445 1820.4445)) @@ -356,8 +356,8 @@ (.lvf vf4 (&-> v1-78 quad)) (.lvf vf5 (&-> a0-25 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-672 quad) vf6) (let* ((v1-80 sv-672) (f0-29 (+ (* (-> v1-80 x) (-> v1-80 x)) (* (-> v1-80 z) (-> v1-80 z)))) @@ -373,9 +373,9 @@ (.lvf vf5 (&-> sv-672 quad)) (.lvf vf4 (&-> v1-87 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-27 quad) vf6) ) (vector+! sv-688 sv-688 (-> sv-656 pos)) @@ -406,9 +406,9 @@ (.lvf vf5 (&-> sv-688 quad)) (.lvf vf4 (&-> v1-106 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-36 quad) vf6) ) (vector-float*! sv-704 sv-704 (/ 1.0 (the float sv-624))) @@ -421,9 +421,9 @@ (.lvf vf5 (&-> sv-704 quad)) (.lvf vf4 (&-> v1-110 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-39 quad) vf6) ) ) @@ -440,9 +440,9 @@ (.lvf vf5 (&-> s0-0 quad)) (.lvf vf4 (&-> v1-117 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-44 quad) vf6) ) ) @@ -457,9 +457,9 @@ ) (.lvf vf4 (&-> v1-120 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-54 quad) vf6) ) (cloest-point-on-mesh (-> self nav) s2-0 s2-0 sv-720) diff --git a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc index 2a4d0c5f1d9..b4e170323d3 100644 --- a/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/pegasus_REF.gc @@ -427,7 +427,7 @@ (matrix->quaternion (-> self root quat) rotation-matrix) (set! (-> self run-blend-interp) (acos (vector-dot flee-direction-vec (-> self facing)))) (set! (-> self run-blend-interp) (* 0.0002746582 (-> self run-blend-interp))) - (if (< (vector-dot (-> self facing) (the-as vector (-> rotation-matrix vector))) 0.0) + (if (< (vector-dot (-> self facing) (-> rotation-matrix vector 0)) 0.0) (set! (-> self run-blend-interp) (- (-> self run-blend-interp))) ) (set! (-> self facing quad) (-> flee-direction-vec quad)) diff --git a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc index 07a3300f318..fde3b80c66a 100644 --- a/test/decompiler/reference/jak2/levels/forest/predator_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/predator_REF.gc @@ -5,9 +5,9 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-predator)) (set-hud-piece-position! (-> this sprites 1) (the int (+ 480.0 (* 130.0 (-> this offset)))) 205) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -44 0) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -44 0) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites 1)) -45 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 1 pos) -45 45) ((method-of-type hud draw) this) 0 (none) @@ -48,14 +48,10 @@ ;; definition for method 15 of type hud-pegasus ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-pegasus)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 190 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 190) (set! (-> this sprites 0 flags) (the-as uint 4)) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -26 35) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -26 35) ((method-of-type hud draw) this) 0 (none) @@ -766,8 +762,8 @@ (.lvf vf4 (&-> v1-24 quad)) (.lvf vf5 (&-> a0-18 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-224 quad) vf6) (let* ((f0-5 (vector-length sv-224)) (f0-6 (/ f0-5 (meters 130))) @@ -786,9 +782,9 @@ ) (.lvf vf4 (&-> v1-30 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-19 quad) vf6) ) (vector-normalize! sv-224 1.0) @@ -814,9 +810,9 @@ (.lvf vf5 (&-> sv-240 quad)) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-29 quad) vf6) ) (let ((v1-33 s3-0)) @@ -825,9 +821,9 @@ ) (.lvf vf5 (&-> s0-0 quad)) (.lvf vf4 (&-> s1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-33 quad) vf6) ) ) @@ -1314,9 +1310,9 @@ (.lvf vf5 (&-> s1-0 quad)) (.lvf vf4 (&-> v1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-6 quad) vf6) ) (let ((f0-3 (vector-vector-distance (target-pos 0) s2-0))) @@ -1799,9 +1795,9 @@ (.lvf vf5 (&-> s0-0 quad)) (.lvf vf4 (&-> v1-53 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-29 quad) vf6) ) (goto cfg-40) diff --git a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc index 6854b03a3d5..82c20aaeec2 100644 --- a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc @@ -105,8 +105,8 @@ (.lvf vf1 (&-> v1-16 quad)) (.lvf vf2 (&-> a0-9 quad)) ) - (.add.x.vf vf1 vf0 vf0 :mask #b10) - (.add.x.vf vf2 vf0 vf0 :mask #b10) + (.add.x.vf.y vf1 vf0 vf0) + (.add.x.vf.y vf2 vf0 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.svf (&-> s5-1 quad) vf3) @@ -191,8 +191,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) (vector+! (-> self root trans) (-> self root trans) v1-1) ) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc index b14c1c4845c..cbc1a617c08 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fordumpc-obs_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-rocketsensor ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-rocketsensor)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 210 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 210) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -17 25) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -17 25) ((method-of-type hud draw) this) 0 (none) @@ -332,7 +328,7 @@ (let ((s5-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) gp-0 s2-0) 1.0)) (gp-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) gp-0 s4-0) 1.0)) ) - (forward-up->inv-matrix (the-as matrix (-> self part-mat)) s5-1 *up-vector*) + (forward-up->inv-matrix (-> self part-mat 0) s5-1 *up-vector*) (set! (-> self part-mat 0 trans quad) (-> s2-0 quad)) (forward-up->inv-matrix (-> self part-mat 1) gp-1 *up-vector*) ) @@ -396,7 +392,7 @@ ) :post (behavior () (sound-play "missile-steam" :id (the-as sound-id (-> self sound-id))) - (spawn-with-matrix (-> self part) (the-as matrix (-> self part-mat))) + (spawn-with-matrix (-> self part) (-> self part-mat 0)) (spawn-with-matrix (-> self part) (-> self part-mat 1)) ) ) @@ -898,9 +894,9 @@ (position-in-front-of-camera! (-> s5-3 vector 2) 4096.0 0.0) (vector-! (-> s5-3 vector 2) (-> s5-3 vector 2) (-> s5-3 trans)) (vector-normalize! (-> s5-3 vector 2) 1.0) - (vector-cross! (the-as vector (-> s5-3 vector)) *up-vector* (-> s5-3 vector 2)) - (vector-normalize! (the-as vector (-> s5-3 vector)) 1.0) - (vector-cross! (-> s5-3 vector 1) (-> s5-3 vector 2) (the-as vector (-> s5-3 vector))) + (vector-cross! (-> s5-3 vector 0) *up-vector* (-> s5-3 vector 2)) + (vector-normalize! (-> s5-3 vector 0) 1.0) + (vector-cross! (-> s5-3 vector 1) (-> s5-3 vector 2) (-> s5-3 vector 0)) (vector-normalize! (-> s5-3 vector 1) 1.0) (set! (-> s5-3 vector 0 w) 0.0) (set! (-> s5-3 vector 1 w) 0.0) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc index a942fe47a19..a8f96a4eb8d 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank-turret_REF.gc @@ -325,9 +325,9 @@ ) (.lvf vf5 (&-> s5-0 quad)) (.lvf vf4 (&-> gp-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) ) @@ -1115,7 +1115,7 @@ (los-control-method-9 (-> self los) gp-0 (the-as vector #f) 1638.4) ) (if *target* - (look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self) + (look-at! (-> *target* neck) (-> self root root-prim prim-core world-sphere) 'attacking self) ) (set! (-> self aim-pos 0 quad) (-> self aim-pos-2 quad)) (set! (-> self aim-pos-2 quad) (-> (get-trans gp-0 0) quad)) @@ -1123,7 +1123,7 @@ (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0)))) ) (let ((v1-31 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0))))) - (vector-! s5-2 (-> self aim-pos-2) (the-as vector (-> self aim-pos))) + (vector-! s5-2 (-> self aim-pos-2) (-> self aim-pos 0)) (vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second))) (set! (-> s5-2 y) 0.0) (vector+! s5-2 (-> self aim-pos-2) s5-2) diff --git a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc index 3abe303f3e7..96e52a51493 100644 --- a/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/dump/fort-robotank_REF.gc @@ -544,8 +544,8 @@ (quaternion-rotate-local-x! s4-3 s4-3 f30-3) ) ) - (vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-3) - (vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4) + (vector-orient-by-quat! (-> self pov-cam-offset 0) (-> self pov-cam-offset 1) s4-3) + (vector+! (-> self pov-cam-offset 0) (-> self pov-cam-offset 0) s3-4) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc b/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc index 0fb8e753201..32f1a8f7555 100644 --- a/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/prison/prison-obs_REF.gc @@ -68,7 +68,7 @@ (let ((v1-7 (rand-vu-int-range-exclude 0 (+ (-> *prsn-chair-shackle-lightning-joints* length) -1) (-> s4-0 x)))) (when s1-0 (set! (-> s4-0 x) v1-7) - (vector<-cspace! (the-as vector (-> gp-1 vector)) (-> self node-list data 13)) + (vector<-cspace! (-> gp-1 vector 0) (-> self node-list data 13)) (vector<-cspace! (-> gp-1 vector 1) (-> self node-list data (-> s2-0 s3-1))) (vector<-cspace! (-> gp-1 vector 2) (-> self node-list data (+ (-> s2-0 s3-1) 1))) (vector<-cspace! (-> gp-1 trans) (-> (the-as process-drawable s5-0) node-list data 8)) diff --git a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc index d0d7920dbbf..b8a298bcb93 100644 --- a/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc +++ b/test/decompiler/reference/jak2/levels/gungame/gun-dummy_REF.gc @@ -2202,9 +2202,9 @@ (.lvf vf5 (&-> s3-4 quad)) (.lvf vf4 (&-> a1-23 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-63 quad) vf6) ) (let ((a0-65 (-> this root transv))) @@ -2213,8 +2213,8 @@ (.mov at-0 f0-50) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-65 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc b/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc index c1b8c1db5c8..1743937a229 100644 --- a/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/gungame/gungame-obs_REF.gc @@ -2014,9 +2014,9 @@ (.lvf vf5 (&-> v1-5 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-1 quad) vf6) v0-1 ) diff --git a/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc b/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc index 52e7b2a7aaf..4d5a51f1fd7 100644 --- a/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/hiphog/hiphog-part_REF.gc @@ -1257,14 +1257,14 @@ ((< (-> quat w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1310,14 +1310,14 @@ ((< (-> quat w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1364,14 +1364,14 @@ ((< (-> quat w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> quat quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) diff --git a/test/decompiler/reference/jak2/levels/intro/vortex-data_REF.gc b/test/decompiler/reference/jak2/levels/intro/vortex-data_REF.gc index f81908e3fb0..75e28b81fe5 100644 --- a/test/decompiler/reference/jak2/levels/intro/vortex-data_REF.gc +++ b/test/decompiler/reference/jak2/levels/intro/vortex-data_REF.gc @@ -2592,7 +2592,7 @@ ) (let ((a2-4 (new 'static 'vector :x 32768.0 :y 819200.0 :z 32768.0))) (dotimes (a3-7 306) - (vector+! (the-as vector (-> a0-0 data a3-7)) (the-as vector (-> a0-0 data a3-7)) a2-4) + (vector+! (-> a0-0 data a3-7 pos) (-> a0-0 data a3-7 pos) a2-4) ) ) (dotimes (a2-7 8) diff --git a/test/decompiler/reference/jak2/levels/mountain/canyon/canyon-scenes_REF.gc b/test/decompiler/reference/jak2/levels/mountain/canyon/canyon-scenes_REF.gc index 20828b68a77..a84f4279b94 100644 --- a/test/decompiler/reference/jak2/levels/mountain/canyon/canyon-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/canyon/canyon-scenes_REF.gc @@ -1443,9 +1443,9 @@ ) (.lvf vf4 (&-> s4-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) (gp-1 s5-1 s2-0) ) diff --git a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc index 5df66a958ec..b7d5121b529 100644 --- a/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/mountain/mountain-obs_REF.gc @@ -517,9 +517,9 @@ ) (.lvf vf4 (&-> a0-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) (let* ((a0-30 (the int (/ (-> s0-1 x) METER_LENGTH))) @@ -540,9 +540,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-40 quad) vf6) ) (vector-negate-in-place! sv-128) @@ -557,9 +557,9 @@ ) (.lvf vf5 (&-> sv-128 quad)) (.lvf vf4 (&-> sv-112 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-13 quad) vf6) ) (let* ((v1-15 (the int (/ (-> s0-1 x) METER_LENGTH))) @@ -633,9 +633,9 @@ ) (.lvf vf4 (&-> v1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-10 quad) vf6) ) (vector-negate-in-place! s1-0) @@ -846,10 +846,7 @@ ) (when s0-0 (when (and (< 0.9 (-> s0-0 normal y)) (< (-> v1-30 vector 0 y) -0.9)) - (when (< (vector-dot - (vector-! (new 'stack-no-clear 'vector) (-> s3-1 trans) (the-as vector (-> s0-0 vertex))) - (-> s0-0 normal) - ) + (when (< (vector-dot (vector-! (new 'stack-no-clear 'vector) (-> s3-1 trans) (-> s0-0 vertex 0)) (-> s0-0 normal)) 409.6 ) (when s4-1 @@ -1216,9 +1213,9 @@ ) (.lvf vf4 (&-> v1-79 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-15 quad) vf6) ) (set! (-> sv-640 quad) (-> sv-560 quad)) @@ -1281,9 +1278,9 @@ ) (.lvf vf4 (&-> v1-126 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-36 quad) vf6) ) (let ((f30-0 0.0) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc index 370e7451ca2..982b85f9048 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-extras_REF.gc @@ -121,11 +121,11 @@ (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self root transv quad)) (.lvf vf1 (&-> (-> self root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let ((f0-0 v1-5) (f1-0 409.6) @@ -162,22 +162,22 @@ (f0-3 (* f0-1 f0-1)) ) (.lvf vf1 (&-> gp-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-27 vf1) (cond ((and (< f0-3 v1-27) (let* ((f0-4 81920.0) (f0-6 (* f0-4 f0-4)) ) (.lvf vf1 (&-> (-> self root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-34 vf1) (>= f0-6 v1-34) ) @@ -395,7 +395,7 @@ ) ) (vector-normalize! (-> s2-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1) (-> s2-0 vector 2)) + (vector-cross! (-> s2-0 vector 0) (-> s2-0 vector 1) (-> s2-0 vector 2)) (matrix->quaternion gp-1 s2-0) ) (sound-play "nboss-shoot-hit") @@ -579,7 +579,7 @@ (set! (-> a1-1 y) 32768.0) (set! (-> a1-1 z) 32768.0) (set! (-> a1-1 w) 1.0) - (vector-! (the-as vector v1-1) a0-2 a1-1) + (vector-! (-> v1-1 min) a0-2 a1-1) ) (let ((v1-3 (-> gp-0 bbox max)) (a0-4 (-> self root trans)) @@ -615,9 +615,9 @@ ) (.lvf vf4 (&-> a0-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (set! (-> s3-0 quad) (-> s2-0 quad)) @@ -631,9 +631,9 @@ ) (.lvf vf4 (&-> a0-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-10 quad) vf6) ) (vector-float*! (-> gp-0 move-dist) v1-15 -73728.0) @@ -661,7 +661,7 @@ ) ) ) - ((method-of-type cam-float-seeker update!) (the-as cam-float-seeker (-> self foot-locks s4-0)) 0.0) + ((method-of-type cam-float-seeker update!) (-> self foot-locks s4-0 lock) 0.0) (cond ((-> self foot-locks s4-0 initialized) (let ((s2-1 vector-lerp!) @@ -699,7 +699,7 @@ (set-time! (-> self state-time)) (dotimes (gp-0 6) (enable-set! (-> self joint-ik gp-0) #t) - ((method-of-type cam-float-seeker init) (the-as cam-float-seeker (-> self foot-locks gp-0)) 0.0 0.1 0.3 0.9) + ((method-of-type cam-float-seeker init) (-> self foot-locks gp-0 lock) 0.0 0.1 0.3 0.9) (set! (-> self foot-locks gp-0 initialized) #f) ) ) @@ -977,7 +977,7 @@ (set! s2-2 #f) ) (else - (vector-! arg0 (target-pos 0) (the-as vector (-> this chain-joints arg1))) + (vector-! arg0 (target-pos 0) (-> this chain-joints arg1 position)) (vector-normalize! arg0 12288.0) ) ) @@ -1216,11 +1216,11 @@ (set! (-> arg0 quad) (-> v1-2 position quad)) (until (or (< 6 s3-0) (begin (.lvf vf1 (&-> s4-1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (let ((f0-7 v1-26) (f1-5 409.6) @@ -1304,11 +1304,7 @@ (a0-9 (-> self tail)) ) (dotimes (a1-1 (the-as int (-> a0-9 num-joints))) - (vector+! - (the-as vector (-> a0-9 chain-joints a1-1)) - (the-as vector (-> a0-9 chain-joints a1-1)) - (the-as vector v1-7) - ) + (vector+! (-> a0-9 chain-joints a1-1 position) (-> a0-9 chain-joints a1-1 position) (the-as vector v1-7)) ) ) #f @@ -2011,13 +2007,13 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-metalkor)) (set-hud-piece-position! (-> this sprites 1) (the int (+ 462.0 (* 130.0 (-> this offset)))) 350) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -32 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 1)) -62 14) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 1)) -32 14) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -32 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 1 pos) -62 14) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 1 pos) -32 14) (let ((s5-0 (-> this values 0 current)) (f30-0 (* 0.01 (the float (-> this values 1 current)))) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 1)) -92 15) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 1 pos) -92 15) (cond ((= s5-0 1) (set! (-> this sprites 4 color x) 0) @@ -2524,8 +2520,8 @@ (.mov at-0 f0-1) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-26 quad) vf1) ) (integrate-and-collide! (-> self root) s5-1) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc index dc732c9a978..aff16c1de3b 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-setup_REF.gc @@ -1347,11 +1347,11 @@ ) ) (.lvf vf1 (&-> arg2 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-11 vf1) (let ((f0-10 v1-11) (f1-3 409.6) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc index 15ee99b30cb..5f682929eaa 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc @@ -523,7 +523,7 @@ ) (attack-info-method-9 arg0 s1-1 arg1 self) (vector-flatten! (-> s1-1 trans) (-> s1-1 trans) (-> s2-1 vector 1)) - (let ((f30-2 (fmax -1.0 (fmin 1.0 (+ f30-1 (vector-dot (-> s1-1 trans) (the-as vector (-> s2-1 vector)))))))) + (let ((f30-2 (fmax -1.0 (fmin 1.0 (+ f30-1 (vector-dot (-> s1-1 trans) (-> s2-1 vector 0))))))) (set! f30-2 (cond ((>= f30-2 0.0) (ja :chan 1 :group! arg3 :num! min) @@ -813,8 +813,8 @@ (s4-4 (new 'stack-no-clear 'vector)) ) (if (>= (metalkor-ja-float-group? (the-as art-joint-anim metalkor-attack-sweep-left-ja)) 0) - (vector+! s4-4 (-> s3-0 vector 2) (the-as vector (-> s3-0 vector))) - (vector-! s4-4 (-> s3-0 vector 2) (the-as vector (-> s3-0 vector))) + (vector+! s4-4 (-> s3-0 vector 2) (-> s3-0 vector 0)) + (vector-! s4-4 (-> s3-0 vector 2) (-> s3-0 vector 0)) ) (set! (-> s4-4 y) 0.0) (vector-normalize! s4-4 32768.0) @@ -953,7 +953,7 @@ (matrix*! gp-0 s5-0 s4-0) (matrix-remove-z-rot gp-0 (new 'static 'vector :y -1.0)) (set! (-> self last-rotation) (acos (vector-dot (-> s5-0 vector 2) (-> gp-0 vector 2)))) - (if (< (vector-dot (-> gp-0 vector 2) (the-as vector (-> s5-0 vector))) 0.0) + (if (< (vector-dot (-> gp-0 vector 2) (-> s5-0 vector 0)) 0.0) (set! (-> self last-rotation) (- (-> self last-rotation))) ) (cond @@ -1216,7 +1216,7 @@ ) (let ((f28-0 (ja-aframe-num 0))) (set! (-> self target-angle) f26-0) - (if (< 0.0 (vector-dot s4-0 (the-as vector (-> gp-0 vector)))) + (if (< 0.0 (vector-dot s4-0 (-> gp-0 vector 0))) (set! f26-0 (- f26-0)) ) (let ((v1-12 (ja-group))) @@ -2002,11 +2002,11 @@ (f0-7 (* f0-5 f0-5)) ) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-32 vf1) (if (< f0-7 v1-32) (set! s1-0 #t) @@ -2015,21 +2015,21 @@ (vector-normalize! s4-0 arg0) (let ((v1-35 s4-0)) (let ((a0-15 s4-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-15 quad)) ) (.lvf vf5 (&-> sv-864 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-35 quad) vf6) ) (vector-! s4-0 s4-0 s3-0) (set! (-> s4-0 y) 0.0) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-38 vf1) (let ((f0-9 v1-38) (f1-3 f30-0) @@ -2079,11 +2079,11 @@ ) (vector-! s4-0 s4-0 (-> self root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-80 vf1) (let ((f0-17 v1-80) (f1-7 40.96) @@ -2170,7 +2170,7 @@ ) (vector-flatten! gp-1 gp-1 (-> s5-0 vector 1)) (cond - ((< (vector-dot gp-1 (the-as vector (-> s5-0 vector))) 0.0) + ((< (vector-dot gp-1 (-> s5-0 vector 0)) 0.0) (metalkor-ja-float (the-as art-joint-anim metalkor-attack-sweep-right-ja) 1.0 1.0 4.0) (metalkor-set-deadly self #t 2) ) @@ -2749,11 +2749,11 @@ ) (vector-! s5-1 s5-1 (-> self root trans)) (.lvf vf1 (&-> s5-1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-72 vf1) (let ((f0-14 v1-72) (f1-2 1024.0) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc index 21e8d6c211e..f5ce2967171 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/nestb-scenes_REF.gc @@ -401,9 +401,9 @@ ) (.lvf vf4 (&-> s3-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (vector+! gp-0 s4-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) s5-1 49152.0)) @@ -419,9 +419,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-2 quad) vf6) (let ((f28-0 (-> *part-id-table* 621 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 621 init-specs 4 initial-valuef) (fmin f28-0 f30-0)) @@ -555,7 +555,7 @@ ) ) (vector-normalize! (-> s2-0 vector 2) 1.0) - (vector-cross! (the-as vector (-> s2-0 vector)) (-> s2-0 vector 1) (-> s2-0 vector 2)) + (vector-cross! (-> s2-0 vector 0) (-> s2-0 vector 1) (-> s2-0 vector 2)) (matrix->quaternion gp-1 s2-0) ) (sound-play "nboss-shoot-hit") diff --git a/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc b/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc index 10a2b8338f9..188112c92f3 100644 --- a/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/flying-spider_REF.gc @@ -672,8 +672,8 @@ (vector-reset! s5-1) (dotimes (s4-1 (-> *collide-cache* num-tris)) (let* ((v1-16 (-> *collide-cache* tris s4-1)) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) - (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (-> v1-16 vertex 0))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (-> v1-16 vertex 0))) (s3-0 (new 'stack-no-clear 'vector)) ) (vector-normalize! s2-1 1.0) diff --git a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc index b9210719a49..104fbef39b9 100644 --- a/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/mammoth_REF.gc @@ -287,8 +287,8 @@ ;; definition for function mammoth-walk-check-end ;; WARN: Return type mismatch object vs none. (defbehavior mammoth-walk-check-end mammoth () - (let ((a1-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-pos 1) (the-as vector (-> self move-pos)))) - (gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self move-pos)))) + (let ((a1-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-pos 1) (-> self move-pos 0))) + (gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self move-pos 0))) ) (if (< (vector-length a1-1) (vector-dot gp-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-1 1.0))) (go-virtual turning) @@ -331,17 +331,12 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defbehavior set-nav-destination mammoth () - (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-pos 1) (the-as vector (-> self move-pos)))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self move-pos 1) (-> self move-pos 0))) (s4-0 (new 'stack-no-clear 'vector)) (gp-0 (new 'stack-no-clear 'vector)) ) (vector-normalize! s5-1 65536.0) - (vector-line-distance-point! - (-> self root trans) - (the-as vector (-> self move-pos)) - (-> self move-pos 1) - s4-0 - ) + (vector-line-distance-point! (-> self root trans) (-> self move-pos 0) (-> self move-pos 1) s4-0) (vector+! gp-0 s4-0 s5-1) (cloest-point-on-mesh (-> self nav) gp-0 gp-0 (the-as nav-poly #f)) (set! (-> self travel-dest quad) (-> gp-0 quad)) @@ -826,9 +821,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-16 quad 0) vf6) ) (process-spawn @@ -895,8 +890,8 @@ (vector-reset! s4-1) (dotimes (s3-1 (-> *collide-cache* num-tris)) (let* ((v1-15 (-> *collide-cache* tris s3-1)) - (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-15 vertex 1) (the-as vector (-> v1-15 vertex)))) - (s0-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-15 vertex 2) (the-as vector (-> v1-15 vertex)))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-15 vertex 1) (-> v1-15 vertex 0))) + (s0-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-15 vertex 2) (-> v1-15 vertex 0))) (s2-2 (new 'stack-no-clear 'vector)) ) (vector-normalize! s1-1 1.0) @@ -953,7 +948,7 @@ ) ) (if (and (logtest? (-> this foot-flags) 1) (logtest? (-> this foot-flags) 2)) - (s0-0 s5-0 s1-0 (the-as vector (-> this foot-pos)) (-> this foot-pos 1)) + (s0-0 s5-0 s1-0 (-> this foot-pos 0) (-> this foot-pos 1)) ) (if (and (logtest? (-> this foot-flags) 2) (logtest? (-> this foot-flags) 4)) (s0-0 s4-0 s1-0 (-> this foot-pos 1) (-> this foot-pos 2)) @@ -962,7 +957,7 @@ (s0-0 s4-0 s1-0 (-> this foot-pos 2) (-> this foot-pos 3)) ) (if (and (logtest? (-> this foot-flags) 8) (logtest? (-> this foot-flags) 1)) - (s0-0 s4-0 s1-0 (-> this foot-pos 3) (the-as vector (-> this foot-pos))) + (s0-0 s4-0 s1-0 (-> this foot-pos 3) (-> this foot-pos 0)) ) ) (vector+! s5-0 s5-0 s4-0) @@ -1074,9 +1069,9 @@ ) (.lvf vf4 (&-> s3-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) ) @@ -1096,9 +1091,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-1 quad) vf6) (vector-float*! (new 'stack-no-clear 'vector) (-> arg0 user-normal) -16384.0) (let ((s4-1 (new 'stack-no-clear 'vector))) @@ -1113,9 +1108,9 @@ (.lvf vf5 (&-> v1-20 quad)) ) (.lvf vf4 (&-> s3-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (let ((a1-9 s4-1)) @@ -1131,9 +1126,9 @@ ) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((a1-10 s5-0)) @@ -1146,9 +1141,9 @@ ) (.lvf vf4 (&-> v1-22 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) ) @@ -1200,9 +1195,9 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((a1-2 (-> gp-0 bbox)) @@ -1213,7 +1208,7 @@ (set! (-> a0-6 y) 14336.0) (set! (-> a0-6 z) 10240.0) (set! (-> a0-6 w) 1.0) - (vector-! (the-as vector a1-2) v1-7 a0-6) + (vector-! (-> a1-2 min) v1-7 a0-6) ) (let ((a1-4 (-> gp-0 bbox max)) (v1-8 s0-0) @@ -1242,9 +1237,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((v1-15 (-> gp-0 move-dist)) @@ -1274,9 +1269,9 @@ ) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (set! (-> s3-0 user-position quad) (-> s2-0 quad)) @@ -1332,9 +1327,9 @@ ) (.lvf vf4 (&-> a1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-0 quad) vf6) ) (set! (-> s4-0 quad) (-> v1-8 quad)) @@ -1350,7 +1345,7 @@ (set! (-> a0-4 y) 16384.0) (set! (-> a0-4 z) 16384.0) (set! (-> a0-4 w) 1.0) - (vector-! (the-as vector a1-5) v1-13 a0-4) + (vector-! (-> a1-5 min) v1-13 a0-4) ) (let ((a1-7 (-> s2-0 bbox max)) (v1-14 s4-0) @@ -1377,9 +1372,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (vector-float*! (-> s2-0 move-dist) s1-0 -49152.0) @@ -1403,9 +1398,9 @@ ) (.lvf vf4 (&-> a0-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-26 quad) vf6) (seek! (-> this ik-handle-y s5-0) (-> v1-26 y) (* 16384.0 (seconds-per-frame))) ) diff --git a/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc b/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc index cd98c1412c7..fb24d08a8e5 100644 --- a/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/mantis_REF.gc @@ -724,9 +724,9 @@ (.lvf vf5 (&-> s2-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (let ((f30-1 (vector-length s5-1))) @@ -1197,9 +1197,9 @@ (.lvf vf5 (&-> s4-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) ) @@ -1407,8 +1407,8 @@ (vector-reset! s5-1) (dotimes (s4-1 (-> *collide-cache* num-tris)) (let* ((v1-16 (-> *collide-cache* tris s4-1)) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) - (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (-> v1-16 vertex 0))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (-> v1-16 vertex 0))) (s3-0 (new 'stack-no-clear 'vector)) ) (vector-normalize! s2-1 1.0) @@ -1604,9 +1604,9 @@ (.lvf vf5 (&-> s2-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (mantis-method-191 this (the-as vector s5-0) s4-1) diff --git a/test/decompiler/reference/jak2/levels/outro/credits_REF.gc b/test/decompiler/reference/jak2/levels/outro/credits_REF.gc index f0339f0bba9..fcff78df764 100644 --- a/test/decompiler/reference/jak2/levels/outro/credits_REF.gc +++ b/test/decompiler/reference/jak2/levels/outro/credits_REF.gc @@ -696,7 +696,7 @@ ) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -744,7 +744,7 @@ ) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -792,7 +792,7 @@ ) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (none) ) diff --git a/test/decompiler/reference/jak2/levels/palace/boss/squid-extras_REF.gc b/test/decompiler/reference/jak2/levels/palace/boss/squid-extras_REF.gc index 572d0bdebf0..0c30acaad4c 100644 --- a/test/decompiler/reference/jak2/levels/palace/boss/squid-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/boss/squid-extras_REF.gc @@ -151,7 +151,7 @@ (if (>= f28-0 1.0) (go (method-of-object arg0 impact)) ) - (vector-! s5-0 (-> arg0 traj-dest) (the-as vector (-> arg0 traj))) + (vector-! s5-0 (-> arg0 traj-dest) (-> arg0 traj initial-position)) (vector-normalize! s5-0 (* (lerp-scale 1.0 0.0 f28-0 (* 1.5 f30-0) 1.0) (lerp-scale 0.0 20480.0 f28-0 0.0 0.06)) @@ -163,17 +163,14 @@ ) (let ((s3-1 (new 'stack-no-clear 'matrix))) (vector-normalize! (compute-transv-at-time (-> arg0 traj) f28-1 (-> s3-1 vector 2)) 1.0) - (vector-normalize! - (vector-cross! (the-as vector (-> s3-1 vector)) (new 'static 'vector :y 1.0) (-> s3-1 vector 2)) - 1.0 - ) - (vector-cross! (-> s3-1 vector 1) (-> s3-1 vector 2) (the-as vector (-> s3-1 vector))) + (vector-normalize! (vector-cross! (-> s3-1 vector 0) (new 'static 'vector :y 1.0) (-> s3-1 vector 2)) 1.0) + (vector-cross! (-> s3-1 vector 1) (-> s3-1 vector 2) (-> s3-1 vector 0)) (when (>= f30-0 f28-1) (let ((s4-3 (new 'stack-no-clear 'vector))) (let ((f26-1 (/ 4.0 f30-0))) (if (< 1.5 (-> arg0 charge-level)) - (vector-float*! s4-3 (the-as vector (-> s3-1 vector)) (* 8192.0 (+ -1.0 (cos (* 65536.0 f28-1 f26-1))))) - (vector-float*! s4-3 (the-as vector (-> s3-1 vector)) (* 8192.0 (- 1.0 (cos (* 65536.0 f28-1 f26-1))))) + (vector-float*! s4-3 (-> s3-1 vector 0) (* 8192.0 (+ -1.0 (cos (* 65536.0 f28-1 f26-1))))) + (vector-float*! s4-3 (-> s3-1 vector 0) (* 8192.0 (- 1.0 (cos (* 65536.0 f28-1 f26-1))))) ) (vector+float*! s4-3 s4-3 (-> s3-1 vector 1) (* -8192.0 (sin (* 65536.0 f28-1 f26-1)))) ) @@ -191,8 +188,8 @@ (.mov at-0 f0-28) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-33 quad) vf1) ) (let* ((s5-1 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> arg0 root quat))) @@ -474,15 +471,15 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-squid)) (set-hud-piece-position! (-> this sprites 1) (the int (+ 462.0 (* 130.0 (-> this offset)))) 350) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -32 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -96 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 1)) -62 14) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 1)) -32 14) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -32 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) -96 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 1 pos) -62 14) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 1 pos) -32 14) (let ((s5-0 (-> this values 0 current)) (f28-0 (* 0.01 (the float (-> this values 1 current)))) (f30-0 (* 0.01 (the float (-> this values 2 current)))) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 1)) -92 15) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 1 pos) -92 15) (cond ((zero? s5-0) (set! (-> this sprites 3 color x) 0) @@ -501,7 +498,7 @@ ) ) (set! (-> this sprites 3 scale-x) (* -7.25 f28-0)) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 1)) -84 4) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 1 pos) -84 4) (cond ((< f30-0 0.5) (set! (-> this sprites 4 color x) 255) diff --git a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc index ae453a5ee90..e56771b6fd0 100644 --- a/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/boss/squid-setup_REF.gc @@ -942,8 +942,8 @@ (.lvf vf4 (&-> v1-25 quad)) (.lvf vf5 (&-> a0-10 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1472 quad) vf6) (set! (-> sv-1472 y) 0.0) (vector-normalize! sv-1472 409.6) @@ -962,9 +962,9 @@ (.mov vf3 v1-43) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1520 quad) vf4) (when (-> this avoid-center) (vector-! s1-0 (-> sv-1456 position) (-> this center)) @@ -988,9 +988,9 @@ (.mov vf3 v1-60) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1600 quad) vf4) ) (vector-! s1-0 sv-1904 s4-1) @@ -1014,11 +1014,11 @@ ) (let ((v1-77 sv-1904)) (let ((a0-31 sv-1904)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-31 quad)) ) (.lvf vf5 (&-> sv-1616 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-77 quad) vf6) ) ) @@ -1030,8 +1030,8 @@ (.lvf vf4 (&-> v1-79 quad)) (.lvf vf5 (&-> a0-33 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1632 quad) vf6) (set! (-> sv-1632 y) 0.0) (let ((f0-32 (vector-normalize-ret-len! sv-1632 1.0))) @@ -1051,8 +1051,8 @@ (.lvf vf4 (&-> v1-87 quad)) (.lvf vf5 (&-> a0-36 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1728 quad) vf6) (let ((f30-3 (vector-normalize-ret-len! sv-1728 1.0)) (f28-2 (vector-dot sv-1728 s2-0)) @@ -1075,9 +1075,9 @@ (.mov vf3 v1-98) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1712 quad) vf4) (vector+float*! sv-1904 s4-1 sv-1728 f30-3) ) @@ -1090,19 +1090,19 @@ (.lvf vf4 (&-> v1-104 quad)) (.lvf vf5 (&-> a0-47 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1776 quad) vf6) (set! sv-1760 0) (set! (-> sv-1904 quad) (-> sv-1456 position quad)) (until (or (< 6 sv-1760) (begin (.lvf vf1 (&-> sv-1776 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-134 vf1) (let ((f0-46 v1-134) (f1-16 409.6) @@ -1139,11 +1139,11 @@ (else (let ((v1-128 sv-1904)) (let ((a0-64 sv-1904)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-64 quad)) ) (.lvf vf5 (&-> sv-1776 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-128 quad) vf6) ) (goto cfg-27) @@ -1162,8 +1162,8 @@ (.lvf vf4 (&-> v1-143 quad)) (.lvf vf5 (&-> a0-69 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1808 quad) vf6) (vector-normalize-ret-len! sv-1808 1.0) (set! sv-1792 (new 'stack-no-clear 'vector)) @@ -1173,8 +1173,8 @@ (.lvf vf4 (&-> v1-146 quad)) (.lvf vf5 (&-> a0-72 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-1792 quad) vf6) (let ((f30-4 (vector-dot sv-1808 sv-1792))) (vector--float*! sv-1792 sv-1792 sv-1808 f30-4) @@ -1195,19 +1195,19 @@ (let ((a0-79 f0-51)) (.mov vf3 a0-79) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> v1-157 quad) vf4) ) (vector+! sv-1904 (-> sv-1456 position) (-> sv-1456 velocity)) (let ((a2-14 (vector-! (new 'stack-no-clear 'vector) s4-1 sv-1904))) (.lvf vf1 (&-> a2-14 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-162 vf1) (let* ((f0-53 v1-162) (f1-21 (if (= s0-0 10) @@ -1232,8 +1232,8 @@ (when (< s0-0 11) (vector-! (-> s5-1 vector 1) sv-1904 s4-1) (vector-normalize! (-> s5-1 vector 1) 1.0) - (vector-cross! (the-as vector (-> s5-1 vector)) (-> s5-1 vector 1) s3-1) - (vector-normalize! (the-as vector (-> s5-1 vector)) 1.0) + (vector-cross! (-> s5-1 vector 0) (-> s5-1 vector 1) s3-1) + (vector-normalize! (-> s5-1 vector 0) 1.0) (set! sv-1872 (new 'stack-no-clear 'vector)) (let ((v1-182 (-> sv-1456 old-x)) (a0-93 (-> s5-1 vector)) @@ -1247,9 +1247,9 @@ (vector-flatten! sv-1872 (-> sv-1456 old-x) (-> s5-1 vector 1)) (vector-normalize! sv-1872 1.0) (cond - ((< (vector-dot (the-as vector (-> s5-1 vector)) sv-1872) (cos 3640.889)) - (vector-cross! sv-1872 sv-1872 (the-as vector (-> s5-1 vector))) - (vector-cross! sv-1872 (the-as vector (-> s5-1 vector)) sv-1872) + ((< (vector-dot (-> s5-1 vector 0) sv-1872) (cos 3640.889)) + (vector-cross! sv-1872 sv-1872 (-> s5-1 vector 0)) + (vector-cross! sv-1872 (-> s5-1 vector 0) sv-1872) (vector-normalize! sv-1872 1.0) (set! sv-1840 (-> s5-1 vector)) (set! sv-1824 (-> s5-1 vector)) @@ -1259,8 +1259,8 @@ (.mov vf2 v1-192) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-1840 0 quad) vf1) (set! sv-1888 (-> s5-1 vector)) (set! sv-1856 (-> s5-1 vector)) @@ -1271,9 +1271,9 @@ (.mov vf3 v1-198) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-1888 0 quad) vf4) (set! (-> sv-1456 old-x quad) (-> s5-1 vector 0 quad)) ) @@ -1282,7 +1282,7 @@ (set! (-> sv-1456 old-x quad) (-> s5-1 vector 0 quad)) ) ) - (vector-cross! (-> s5-1 vector 2) (the-as vector (-> s5-1 vector)) (-> s5-1 vector 1)) + (vector-cross! (-> s5-1 vector 2) (-> s5-1 vector 0) (-> s5-1 vector 1)) (matrix->quaternion (-> sv-1456 joint-mod quat) s5-1) (set! (-> s2-0 quad) (-> s5-1 vector 1 quad)) (set! (-> s3-1 quad) (-> s5-1 vector 2 quad)) @@ -2274,11 +2274,11 @@ ) (let ((v1-54 sv-752)) (let ((a0-33 (-> sv-736 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-752 quad)) (.lvf vf5 (&-> a0-33 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-54 quad) vf6) ) 0 @@ -2307,11 +2307,11 @@ ) (let ((v1-68 sv-784)) (let ((a0-38 (-> sv-768 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-784 quad)) (.lvf vf5 (&-> a0-38 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-68 quad) vf6) ) 0 @@ -2650,7 +2650,7 @@ ) ) (update! (-> this hit-reaction) (the-as vector #f)) - (vector+float*! (-> this root trans) (-> this root trans) (the-as vector (-> this hit-reaction)) 4096.0) + (vector+float*! (-> this root trans) (-> this root trans) (-> this hit-reaction value) 4096.0) (update! (-> this tentacle-base-rotation-speed) 0.0) (let ((f0-14 (+ (-> this tentacle-base-rotation) (* 910.2222 (-> this tentacle-base-rotation-speed value))))) (set! (-> this tentacle-base-rotation) (- f0-14 (* (the float (the int (/ f0-14 65536.0))) 65536.0))) diff --git a/test/decompiler/reference/jak2/levels/palace/boss/squid-states_REF.gc b/test/decompiler/reference/jak2/levels/palace/boss/squid-states_REF.gc index f3e1c876188..9524ad09a39 100644 --- a/test/decompiler/reference/jak2/levels/palace/boss/squid-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/boss/squid-states_REF.gc @@ -549,7 +549,7 @@ (quaternion-rotate-y! (-> self quat) (-> self quat) 5461.3335) (vector-lerp! (-> self trans) - (the-as vector (-> self traj)) + (-> self traj initial-position) (-> self traj-dest) (parameter-ease-sqr-clamp (* 0.0011111111 (the float (- (current-time) (-> self state-time))))) ) @@ -1248,7 +1248,7 @@ (ja :group! squid-hatch-fore-launch-ja :num! min) (setup-grenade 0) (setup-grenade 5) - (spawn-grenade self 51 (the-as squid-grenade-holder (-> self grenade)) 2.0) + (spawn-grenade self 51 (-> self grenade 0) 2.0) (spawn-grenade self 56 (-> self grenade 5) 1.0) (setup-masks (-> self draw) 0 2) (set! (-> self next-gun) 1) @@ -1305,7 +1305,7 @@ (ja :group! squid-hatch-aft-launch-ja :num! min) (setup-grenade 0) (setup-grenade 5) - (spawn-grenade self 53 (the-as squid-grenade-holder (-> self grenade)) 2.0) + (spawn-grenade self 53 (-> self grenade 0) 2.0) (spawn-grenade self 58 (-> self grenade 5) 1.0) (setup-masks (-> self draw) 0 8) (set! (-> self next-gun) 1) diff --git a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc index 04b152698f0..1d3f60c46c5 100644 --- a/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/cable/palcab-obs_REF.gc @@ -880,7 +880,7 @@ (when (time-elapsed? (-> self fire-timer) (seconds 0.05)) (let ((gp-0 (new 'stack-no-clear 'matrix))) (let ((s5-0 (-> self node-list data (+ (* (-> self gun-index) 2) 4)))) - (vector<-cspace! (the-as vector (-> gp-0 vector)) s5-0) + (vector<-cspace! (-> gp-0 vector 0) s5-0) (vector-normalize-copy! (-> gp-0 vector 1) (-> s5-0 bone transform vector 2) 1.0) ) (vector-rotate-x! (-> gp-0 vector 1) (-> gp-0 vector 1) -455.1111) diff --git a/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc b/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc index fc171f8fa62..6d6c5a086e6 100644 --- a/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/throne/palace-scenes_REF.gc @@ -260,7 +260,7 @@ 0.0 ) (set-vector! (-> s5-0 vector 2) 0.0 0.0 1.0 0.0) - (vector-cross! (the-as vector (-> s5-0 vector)) (-> s5-0 vector 1) (-> s5-0 vector 2)) + (vector-cross! (-> s5-0 vector 0) (-> s5-0 vector 1) (-> s5-0 vector 2)) (set! (-> s5-0 trans quad) (-> s4-0 quad)) (set! (-> *part-id-table* 4934 init-specs 22 initial-valuef) (vector-y-angle (-> s5-0 vector 1))) (set! (-> *part-id-table* 4934 init-specs 21 initial-valuef) (- 16384.0 (vector-x-angle (-> s5-0 vector 1)))) diff --git a/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc b/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc index 5578396ab14..4c768bbc143 100644 --- a/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/mechtest-obs_REF.gc @@ -179,8 +179,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> s3-0 quad) vf1) (set! (-> s3-0 y) 0.0) (vector-float*! s3-0 s3-0 10.0) @@ -189,7 +189,7 @@ (a0-26 s1-0) (a1-6 (new 'stack-no-clear 'nav-find-poly-parms)) ) - (vector-! (-> a1-6 point) (the-as vector a0-26) (-> v1-28 state mesh bounds)) + (vector-! (-> a1-6 point) (-> a0-26 world-sphere) (-> v1-28 state mesh bounds)) (set! (-> a1-6 y-threshold) (-> v1-28 nearest-y-threshold)) (set! (-> a1-6 ignore) (the-as uint 2)) (let ((a2-4 (find-poly-containing-point-local (-> v1-28 state mesh) a1-6))) @@ -197,7 +197,7 @@ (a2-4 (clamp-vector-to-mesh-cross-gaps s2-0 - (the-as vector s1-0) + (-> s1-0 world-sphere) a2-4 s3-0 204.8 @@ -233,7 +233,7 @@ (a0-41 (-> self root root-prim prim-core)) (a1-9 (new 'stack-no-clear 'nav-find-poly-parms)) ) - (vector-! (-> a1-9 point) (the-as vector a0-41) (-> v1-44 state mesh bounds)) + (vector-! (-> a1-9 point) (-> a0-41 world-sphere) (-> v1-44 state mesh bounds)) (set! (-> a1-9 y-threshold) (-> v1-44 nearest-y-threshold)) (set! (-> a1-9 ignore) (the-as uint 2)) (let ((v1-46 (find-poly-containing-point-local (-> v1-44 state mesh) a1-9))) diff --git a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc index cb723bcc4e1..245fe0967f5 100644 --- a/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc +++ b/test/decompiler/reference/jak2/levels/ruins/rapid-gunner_REF.gc @@ -948,9 +948,9 @@ ) (.lvf vf4 (&-> v1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-0 quad) vf6) (set! (-> self dest-pos quad) (-> s5-0 quad)) (cloest-point-on-mesh (-> self nav) (-> self dest-pos) a2-0 (the-as nav-poly #f)) @@ -1507,9 +1507,9 @@ (.lvf vf5 (&-> a0-13 quad)) (.lvf vf4 (&-> a1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-14 quad) vf6) (set! (-> this target-next-pos quad) (-> v1-14 quad)) (set! (-> this target-prev-pos quad) (-> v1-14 quad)) diff --git a/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc b/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc index e3f5dd145e0..d41cbd8c566 100644 --- a/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/escort/jinx_REF.gc @@ -764,27 +764,27 @@ (the int (+ 15.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 2) (set-hud-piece-position! (-> this sprites 6) (the int (+ 100.0 (* -130.0 (-> this offset)))) (the int (+ 15.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 4 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 1 current)) 100))))) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 6)) 40 16) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 6)) 1 16) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites 6)) 15 2) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 6 pos) 40 16) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 6 pos) 1 16) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 6 pos) 15 2) (set-hud-piece-position! (-> this sprites 10) (the int (+ 20.0 (* -130.0 (-> this offset)))) (the int (+ 85.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 8 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 2 current)) 100))))) - (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites 10)) 40 16) - (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites 10)) 1 16) - (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites 10)) 15 2) + (set-as-offset-from! (-> this sprites 8) (-> this sprites 10 pos) 40 16) + (set-as-offset-from! (-> this sprites 9) (-> this sprites 10 pos) 1 16) + (set-as-offset-from! (-> this sprites 11) (-> this sprites 10 pos) 15 2) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/sewer/grim2-course_REF.gc b/test/decompiler/reference/jak2/levels/sewer/grim2-course_REF.gc index 40f709f0818..50b9ab088ed 100644 --- a/test/decompiler/reference/jak2/levels/sewer/grim2-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/grim2-course_REF.gc @@ -64,7 +64,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 ruf-course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 ruf-course spots 0 center)) (let ((a1-1 (new 'stack-no-clear 'vector))) (set-vector! a1-1 0.0 9102.223 0.0 1.0) (quaternion-zxy! (-> arg0 root quat) a1-1) diff --git a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc index d5767d433b6..c67d59c839d 100644 --- a/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/hosehead_REF.gc @@ -680,9 +680,9 @@ ) (.lvf vf4 (&-> s3-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) ) (vector-! (-> gp-0 move-dist) (-> this target-pos) (-> gp-0 start-pos)) @@ -721,11 +721,11 @@ ) (else (.lvf vf1 (&-> arg3 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a1-5 vf1) (let ((f0-3 (/ f0-1 a1-5)) (a2-2 v1-1) @@ -737,9 +737,9 @@ (.lvf vf5 (&-> arg3 quad)) (.lvf vf4 (&-> a1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) ) @@ -922,9 +922,9 @@ ) (.lvf vf4 (&-> s1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) (set! (-> s5-0 quad) (-> gp-0 quad)) @@ -956,9 +956,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) ) @@ -989,9 +989,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-26 quad) vf6) ) ) @@ -1114,9 +1114,9 @@ ) (.lvf vf4 (&-> s5-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) ) (+! (-> self target-pos y) 2867.2) @@ -1223,8 +1223,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-7 vf1) (let ((f0-4 a2-7) (f1-1 (+ (-> a1-5 world-sphere w) (-> gp-1 w))) @@ -1264,8 +1264,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-14 vf1) (let ((f0-5 a2-14) (f1-5 (+ (-> a1-17 world-sphere w) (-> gp-1 w))) @@ -1540,9 +1540,9 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-7 quad) vf6) ) (let ((v1-8 (-> this nav)) @@ -1577,11 +1577,11 @@ ) (let ((v1-23 sv-800)) (let ((a0-17 (-> sv-768 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-800 quad)) (.lvf vf5 (&-> a0-17 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-23 quad) vf6) ) 0 @@ -1651,9 +1651,9 @@ ) (.lvf vf4 (&-> s4-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-0 quad) vf6) (let ((v1-16 (-> self nav)) (a0-9 s5-0) @@ -1823,9 +1823,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (set! (-> self head-angle) @@ -2167,7 +2167,7 @@ (set! (-> a1-0 y) 14336.0) (set! (-> a1-0 z) 14336.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -2203,9 +2203,9 @@ ) (.lvf vf4 (&-> a0-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (set! (-> s2-0 quad) (-> v1-15 quad)) @@ -2219,9 +2219,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) s3-0 -24576.0) @@ -2245,9 +2245,9 @@ ) (.lvf vf4 (&-> v1-24 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) (let* ((f0-14 (- (-> s2-0 y) (-> s1-0 y))) (f0-15 (lerp-scale 1.0 0.0 f0-14 0.0 8192.0)) @@ -2263,9 +2263,9 @@ (.lvf vf5 (&-> s3-0 quad)) (.lvf vf4 (&-> a0-23 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-29 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak2/levels/sewer/jinx2-course_REF.gc b/test/decompiler/reference/jak2/levels/sewer/jinx2-course_REF.gc index 5841b8d95f7..397d1c42e30 100644 --- a/test/decompiler/reference/jak2/levels/sewer/jinx2-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/jinx2-course_REF.gc @@ -91,7 +91,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 ruf-course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 ruf-course spots 0 center)) (set! (-> arg0 follow-dir quad) (-> *hal2-course* dirs 0 quad)) (set! (-> arg0 focus-mode) 1) (let ((v1-16 (-> arg0 actor-group 0 data 3 actor))) diff --git a/test/decompiler/reference/jak2/levels/sewer/mog2-course_REF.gc b/test/decompiler/reference/jak2/levels/sewer/mog2-course_REF.gc index 443a83e050c..73754da8019 100644 --- a/test/decompiler/reference/jak2/levels/sewer/mog2-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/mog2-course_REF.gc @@ -59,7 +59,7 @@ (set! (-> v1-5 prim-core collide-with) (collide-spec)) ) 0 - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 ruf-course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 ruf-course spots 0 center)) (set! (-> arg0 follow-dir quad) (-> *hal2-course* dirs 0 quad)) (set! (-> arg0 focus-mode) 1) (let ((v1-16 (-> arg0 actor-group 0 data 1 actor))) diff --git a/test/decompiler/reference/jak2/levels/sewer/sewer-part_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sewer-part_REF.gc index 1cbba029fe9..64cb842ca67 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sewer-part_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sewer-part_REF.gc @@ -219,7 +219,7 @@ ((< f28-0 f30-0) (set! s5-0 #t) ) - ((begin (set! f30-0 (get-height *ocean* (the-as vector (-> arg2 vector)) #t)) (< f28-0 f30-0)) + ((begin (set! f30-0 (get-height *ocean* (-> arg2 vector 0) #t)) (< f28-0 f30-0)) (set! s5-0 'water) ) ) @@ -376,7 +376,7 @@ ((< f28-0 f30-0) (set! s5-0 #t) ) - ((begin (set! f30-0 (get-height *ocean* (the-as vector (-> arg2 vector)) #t)) (< f28-0 f30-0)) + ((begin (set! f30-0 (get-height *ocean* (-> arg2 vector 0) #t)) (< f28-0 f30-0)) (set! s5-0 'water) ) ) diff --git a/test/decompiler/reference/jak2/levels/sewer/sewer-scenes_REF.gc b/test/decompiler/reference/jak2/levels/sewer/sewer-scenes_REF.gc index 825e1319d87..f2951301f28 100644 --- a/test/decompiler/reference/jak2/levels/sewer/sewer-scenes_REF.gc +++ b/test/decompiler/reference/jak2/levels/sewer/sewer-scenes_REF.gc @@ -1252,13 +1252,9 @@ ;; definition for method 15 of type hud-gunturret ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-gunturret)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 205 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 205) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 24) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc index d091e423745..1fed179e6c5 100644 --- a/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/skate/skatea-obs_REF.gc @@ -1906,9 +1906,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-1 a0-1 a1-0) ) diff --git a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc index 3ae62b20486..d239e434f4a 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc @@ -1302,17 +1302,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2615,7 +2615,7 @@ (when sv-272 (quaternion-look-at! (-> (the-as process-drawable (-> s4-0 0)) root quat) (-> sv-272 normal) *up-vector*) (set! (-> this plane quad) (-> sv-272 normal quad)) - (set! (-> this plane w) (- (vector-dot (-> sv-272 normal) (the-as vector (-> sv-272 vertex))))) + (set! (-> this plane w) (- (vector-dot (-> sv-272 normal) (-> sv-272 vertex 0)))) (let ((f30-0 (the-as float #x7f800000)) (f28-0 (the-as float #xff800000)) (s0-1 (new 'stack-no-clear 'vector)) @@ -2635,8 +2635,8 @@ (.lvf vf4 (&-> v0-14 quad)) (.lvf vf5 (&-> v1-75 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-320 quad) vf6) (let ((a2-9 (-> sv-272 normal))) (sv-288 sv-304 sv-320 a2-9) @@ -2644,7 +2644,7 @@ (vector+! sv-336 s1-1 sv-336) (vector-inv-orient-by-quat! s0-1 - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> sv-272 vertex)) s1-1) + (vector-! (new 'stack-no-clear 'vector) (-> sv-272 vertex 0) s1-1) (-> (the-as process-drawable (-> s4-0 0)) root quat) ) (if (< (-> s0-1 x) f30-0) @@ -3424,9 +3424,9 @@ (the int (+ 130.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 5 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 5 2) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc index c0a43e36dfa..93ab9e2d911 100644 --- a/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/strip/strip-obs_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-plasmite ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-plasmite)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 457.0 (* 130.0 (-> this offset)))) - 210 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 457.0 (* 130.0 (-> this offset)))) 210) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 20) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 20) ((method-of-type hud draw) this) 0 (none) @@ -1354,7 +1350,7 @@ ) 0.0 (set! (-> a1-2 start-pos quad) (-> v1-4 world-sphere quad)) - (vector-! (-> a1-2 move-dist) (the-as vector a0-5) (the-as vector v1-4)) + (vector-! (-> a1-2 move-dist) (-> a0-5 world-sphere) (-> v1-4 world-sphere)) ) (let ((v1-5 a1-2)) (set! (-> v1-5 radius) 40.96) diff --git a/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc b/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc index 3e409150fba..f421ce2850f 100644 --- a/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc @@ -210,7 +210,7 @@ (vector-normalize! (vector-! s2-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc index dc365ff0d78..503d26ded1a 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-beetle_REF.gc @@ -570,14 +570,14 @@ (set! (-> s5-0 0 dst quad) (the-as uint128 (the-as vector (-> self root trans quad)))) (set! (-> gp-0 0 dst quad) (-> self entity extra trans quad)) (+! (-> gp-0 0 dst y) 106496.0) - (vector-! (-> self fly-away-dir) (the-as vector (-> gp-0 0)) (the-as vector (-> s5-0 0))) + (vector-! (-> self fly-away-dir) (-> gp-0 0 dst) (-> s5-0 0 dst)) (vector-normalize! (-> self fly-away-dir) 1.0) (quaternion-copy! (-> s5-0 0 dst-quat) (-> self root quat)) (quaternion-look-at! (-> gp-0 0 dst-quat) (-> self fly-away-dir) *up-vector*) (set! (-> self speed) 0.0) (set! (-> self fly-away-radius) 0.0) (set! (-> self fly-away-ry) (quaternion-y-angle (-> self root quat))) - (set! (-> gp-0 0 dist) (vector-vector-distance (-> self root trans) (the-as vector (-> gp-0 0)))) + (set! (-> gp-0 0 dist) (vector-vector-distance (-> self root trans) (-> gp-0 0 dst))) ) (vector-reset! (-> self root transv)) (set! (-> self fly-away-acc) (rnd-float-range self 204800.0 512000.0)) @@ -659,14 +659,14 @@ (+! (-> self speed) (* (-> self fly-away-acc) (seconds-per-frame))) (let ((s5-0 (new 'stack-no-clear 'vector))) (vector-normalize-copy! s5-0 (-> self fly-away-dir) (-> self speed)) - (vector-v++! (the-as vector (-> self fly-info)) s5-0) + (vector-v++! (-> self fly-info 0 dst) s5-0) ) (+! (-> self fly-away-ry) (* (-> self fly-away-ry-speed) (seconds-per-frame))) (+! (-> self fly-away-radius) (* 20480.0 (seconds-per-frame))) (let ((s5-1 (new 'stack-no-clear 'vector))) (set-vector! s5-1 (sin (-> self fly-away-ry)) 0.0 (cos (-> self fly-away-ry)) 1.0) (vector-normalize! s5-1 (-> self fly-away-radius)) - (vector+! s5-1 s5-1 (the-as vector (-> self fly-info))) + (vector+! s5-1 s5-1 (-> self fly-info 0 dst)) (vector-! (-> gp-0 transv) s5-1 (-> gp-0 trans)) (let ((v1-10 (-> gp-0 transv))) (.lvf vf1 (&-> (-> gp-0 transv) quad)) @@ -674,8 +674,8 @@ (.mov at-0 f0-14) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-10 quad) vf1) ) (set! (-> gp-0 trans quad) (-> s5-1 quad)) @@ -827,7 +827,7 @@ ) ) ) - (vector+! (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 0)) s4-0) + (vector+! (-> gp-0 0 dst) (-> gp-0 0 dst) s4-0) (set! (-> gp-0 0 dst w) (-> s4-0 w)) ) ) @@ -837,14 +837,14 @@ (+! (-> gp-0 0 dst y) 16384.0) ) ) - (let ((s4-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> gp-0 0)) (-> self root trans)))) + (let ((s4-2 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 0 dst) (-> self root trans)))) (cond ((< (vector-length s4-2) 122880.0) (set! (-> s5-0 0 dst quad) (-> self root trans quad)) ) (else (vector-float*! s4-2 s4-2 0.25) - (vector+! (the-as vector (-> s5-0 0)) (-> self root trans) s4-2) + (vector+! (-> s5-0 0 dst) (-> self root trans) s4-2) (set! (-> s5-0 0 dst y) (+ 20480.0 (-> gp-0 0 dst y))) ) ) @@ -856,20 +856,17 @@ (quaternion-rotate-local-z! (-> gp-0 0 dst-quat) (-> gp-0 0 dst-quat) (-> gp-0 0 dst w)) (set! (-> s5-0 0 threshold) 16384.0) (set! (-> gp-0 0 threshold) 12288.0) - (set! (-> s5-0 0 dist) (vector-vector-distance (-> self root trans) (the-as vector (-> s5-0 0)))) - (set! (-> gp-0 0 dist) (vector-vector-distance (-> self root trans) (the-as vector (-> gp-0 0)))) + (set! (-> s5-0 0 dist) (vector-vector-distance (-> self root trans) (-> s5-0 0 dst))) + (set! (-> gp-0 0 dist) (vector-vector-distance (-> self root trans) (-> gp-0 0 dst))) ) (set! (-> self dest-index) 0) (set! (-> self speed) 122880.0) (vector-reset! (-> self root transv)) ) :trans (behavior () - (when (< (vector-length (vector-! - (new 'stack-no-clear 'vector) - (-> self root trans) - (the-as vector (-> self fly-info (-> self dest-index))) - ) - ) + (when (< (vector-length + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self fly-info (-> self dest-index) dst)) + ) (-> self fly-info (-> self dest-index) threshold) ) (when (= (-> self dest-index) 1) @@ -927,8 +924,8 @@ (.mov at-0 f0-9) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-13 quad) vf1) (vector+! (-> self root trans) (-> self root trans) v1-13) ) diff --git a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc index 3095396b241..6d9dbc12d59 100644 --- a/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/tomb-obs_REF.gc @@ -67,9 +67,9 @@ ) (.lvf vf4 (&-> gp-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-0 quad) vf6) ) (cond @@ -2001,9 +2001,9 @@ ) (.lvf vf4 (&-> s1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-96 quad) vf6) (s3-0 s2-0 sv-96) ) @@ -2059,9 +2059,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) ) (until #f @@ -2077,8 +2077,8 @@ (.lvf vf4 (&-> v1-10 quad)) (.lvf vf5 (&-> a0-3 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-96 quad) vf6) (let ((v1-15 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 930.0))) (.mov vf7 v1-15) @@ -2086,9 +2086,9 @@ (.lvf vf5 (&-> sv-96 quad)) (.lvf vf4 (&-> s0-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-112 quad) vf6) (s2-0 s1-0 sv-112) ) diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc index f1217846a1a..2047a649736 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-baron_REF.gc @@ -1245,9 +1245,7 @@ (s5-2 (-> self node-list data 3 bone transform)) (s4-3 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (the-as vector s4-2) v0-9) 1.0)) (f30-0 (vector-dot s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-2 vector 2) 1.0))) - (f28-0 - (vector-dot s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s5-2 vector)) 1.0)) - ) + (f28-0 (vector-dot s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-2 vector 0) 1.0))) ) (ja-channel-push! 1 (seconds 0.03)) (set! (-> self drill-speed target) 0.0) @@ -1288,7 +1286,7 @@ (s5-8 (-> self node-list data 3 bone transform)) (f0-20 (vector-dot (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (the-as vector gp-3) v0-28) 1.0) - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s5-8 vector)) 1.0) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s5-8 vector 0) 1.0) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc index 24b5efa139a..da020c45a57 100644 --- a/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/widow-extras_REF.gc @@ -731,11 +731,11 @@ (f0-8 (* f0-6 f0-6)) ) (.lvf vf1 (&-> s5-1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (if (< f0-8 v1-13) (vector-normalize! s5-1 f28-0) @@ -1048,10 +1048,10 @@ (defmethod widow-bomb-method-33 ((this widow-bomb)) (let ((gp-0 (new 'stack-no-clear 'matrix))) (set-vector! (-> gp-0 vector 1) 0.0 1.0 0.0 1.0) - (vector-! (-> gp-0 vector 2) (the-as vector (-> this impact trans)) (-> this impact trans 1)) - (vector-cross! (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1) (-> gp-0 vector 2)) - (vector-normalize! (the-as vector (-> gp-0 vector)) 1.0) - (vector-cross! (-> gp-0 vector 2) (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1)) + (vector-! (-> gp-0 vector 2) (-> this impact trans 0) (-> this impact trans 1)) + (vector-cross! (-> gp-0 vector 0) (-> gp-0 vector 1) (-> gp-0 vector 2)) + (vector-normalize! (-> gp-0 vector 0) 1.0) + (vector-cross! (-> gp-0 vector 2) (-> gp-0 vector 0) (-> gp-0 vector 1)) (vector<-cspace! (-> gp-0 trans) (-> this node-list data 3)) (set! (-> gp-0 vector 0 w) 0.0) (set! (-> gp-0 vector 1 w) 0.0) @@ -1153,7 +1153,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-1 y) 0.0) (vector-normalize! gp-1 12288.0) (vector+! gp-1 gp-1 (-> self root trans)) @@ -1170,7 +1170,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-4 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-4 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-4 y) 0.0) (vector-normalize! gp-4 4096.0) (vector+! gp-4 gp-4 (-> self root trans)) @@ -1892,7 +1892,7 @@ (vector-flatten! gp-1 gp-1 (-> s5-1 vector 1)) (when (!= (vector-normalize-ret-len! gp-1 1.0) 0.0) (set! (-> s5-1 vector 2 quad) (-> gp-1 quad)) - (vector-cross! (the-as vector (-> s5-1 vector)) (-> s5-1 vector 1) (-> s5-1 vector 2)) + (vector-cross! (-> s5-1 vector 0) (-> s5-1 vector 1) (-> s5-1 vector 2)) (matrix->quaternion (-> self root quat) s5-1) ) ) @@ -1972,13 +1972,13 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-widow)) (set-hud-piece-position! (-> this sprites 1) (the int (+ 462.0 (* 130.0 (-> this offset)))) 350) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -32 0) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 1)) -62 14) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 1)) -32 14) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -32 0) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 1 pos) -62 14) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 1 pos) -32 14) (let ((s5-0 (-> this values 0 current)) (f30-0 (* 0.01 (the float (-> this values 1 current)))) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 1)) -92 15) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 1 pos) -92 15) (cond ((= s5-0 1) (set! (-> this sprites 4 color x) 0) @@ -2002,7 +2002,7 @@ (set! (-> this sprites 4 scale-x) (* -7.25 f30-0)) ) (let ((f30-1 (* 0.01 (the float (-> this values 2 current))))) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 1)) -84 4) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 1 pos) -84 4) (cond ((< f30-1 0.5) (set! (-> this sprites 3 color x) 255) diff --git a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc index 5cb1b78fa98..0e20aa41335 100644 --- a/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/jellyfish_REF.gc @@ -139,11 +139,11 @@ (set! (-> arg0 quad) (-> v1-2 position quad)) (until (or (< 6 s3-0) (begin (.lvf vf1 (&-> s4-1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (let ((f0-7 v1-26) (f1-5 409.6) @@ -1068,9 +1068,9 @@ (.lvf vf1 (&-> v1-9 quad)) (.mov vf3 a1-2) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> a2-1 quad) vf4) ) (when (> sv-624 0) diff --git a/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc b/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc index d3b0dace0a6..e67b77d33ae 100644 --- a/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/sig5-course_REF.gc @@ -260,8 +260,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-1 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> gp-0 r))) @@ -301,8 +301,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-2 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> gp-0 r))) @@ -367,10 +367,10 @@ :virtual #t :event enemy-event-handler :enter (behavior () - (move-to-point! (-> self root) (the-as vector (-> self sig5-course spots 0))) + (move-to-point! (-> self root) (-> self sig5-course spots 0 center)) (quaternion-identity! (-> self root quat)) (let ((gp-0 (new 'stack-no-clear 'vector))) - (vector-! gp-0 (the-as vector (-> self sig5-course spots 1)) (-> self root trans)) + (vector-! gp-0 (-> self sig5-course spots 1 center) (-> self root trans)) (vector-normalize! gp-0 1.0) (set-heading-vec! (-> self root) gp-0) ) @@ -877,7 +877,7 @@ (s5-1 (-> v1-7 8)) ) (let ((v1-8 (-> v1-7 9))) - (vector-! (the-as vector (-> arg0 test-plane)) (the-as vector v1-8) (the-as vector s5-1)) + (vector-! (the-as vector (-> arg0 test-plane)) (-> v1-8 center) (-> s5-1 center)) ) (set! (-> arg0 test-plane y) 0.0) (vector-normalize! (-> arg0 test-plane) 1.0) @@ -952,7 +952,7 @@ :on-set (lambda ((arg0 sig-under)) (logior! (-> arg0 enemy-flags) (enemy-flag vulnerable vulnerable-backup)) (reset-warn-time! arg0) - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 sig5-course spots 10))) + (move-to-point! (-> arg0 root) (-> arg0 sig5-course spots 10 center)) (set-vector! (-> arg0 root quat) 0.0 0.5874 0.0 0.8092) (play-speech arg0 8) (play-speech arg0 9) @@ -1014,7 +1014,7 @@ :skip-to -1 :on-set (lambda ((arg0 sig-under)) (let ((a1-0 (-> arg0 sig5-course spots))) - (vector-! (the-as vector (-> arg0 test-plane)) (the-as vector (-> a1-0 13)) (the-as vector (-> a1-0 12))) + (vector-! (the-as vector (-> arg0 test-plane)) (-> a1-0 13 center) (-> a1-0 12 center)) ) (vector-normalize! (-> arg0 test-plane) 1.0) (let ((v1-4 (get-task-by-type (-> arg0 ai-ctrl) sigt-wait-spot arg0))) @@ -1360,7 +1360,7 @@ (logior! (-> arg1 waypoint-bits) (waypoint-bits wabits-0)) (process-release? arg1) (sig-under-method-260 arg1) - (move-to-point! (-> arg1 root) (the-as vector (-> arg1 sig5-course spots 20))) + (move-to-point! (-> arg1 root) (-> arg1 sig5-course spots 20 center)) #f ) ((not (logtest? (-> arg1 waypoint-bits) (waypoint-bits wabits-1))) @@ -1401,7 +1401,7 @@ (s5-0 (-> v1-1 24)) ) (let ((v1-2 (-> v1-1 25))) - (vector-! (the-as vector (-> arg0 test-plane)) (the-as vector v1-2) (the-as vector s5-0)) + (vector-! (the-as vector (-> arg0 test-plane)) (-> v1-2 center) (-> s5-0 center)) ) (set! (-> arg0 test-plane y) 0.0) (vector-normalize! (-> arg0 test-plane) 1.0) @@ -1448,9 +1448,7 @@ (set! (-> s5-0 w) 1.0) (when (and (>= (vector4-dot (the-as vector (-> arg1 test-plane)) s5-0) 0.0) (let ((f0-4 81920.0)) - (>= (* f0-4 f0-4) - (vector-vector-xz-distance-squared (target-pos 0) (the-as vector (-> arg1 sig5-course spots 24))) - ) + (>= (* f0-4 f0-4) (vector-vector-xz-distance-squared (target-pos 0) (-> arg1 sig5-course spots 24 center))) ) ) (set! v1-14 #t) diff --git a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc index 1939d6eb646..3b45fb2e599 100644 --- a/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-obs_REF.gc @@ -1213,7 +1213,7 @@ ((= arg1 (+ (-> this num-joints) -1)) (let ((v1-4 (new 'stack-no-clear 'vector))) (set! (-> v1-4 quad) (-> arg2 entity trans quad)) - (vector-! v1-4 v1-4 (the-as vector (-> this chain-joints arg1))) + (vector-! v1-4 v1-4 (-> this chain-joints arg1 position)) (vector+float*! arg0 arg0 v1-4 1.0) ) ) @@ -1229,13 +1229,13 @@ (set! (-> v1-7 quad) (-> this chain-joints (+ arg1 1) position quad)) ) ) - (vector-! v1-7 v1-7 (the-as vector (-> this chain-joints arg1))) + (vector-! v1-7 v1-7 (-> this chain-joints arg1 position)) (.lvf vf1 (&-> v1-7 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-17 vf1) (let ((f0-6 (sqrtf a0-17))) (vector+float*! arg0 arg0 v1-7 (/ (* 1.1 (- f0-6 (-> this joint-length))) f0-6)) @@ -1252,13 +1252,13 @@ ) ) ) - (vector-! v1-11 v1-11 (the-as vector (-> this chain-joints arg1))) + (vector-! v1-11 v1-11 (-> this chain-joints arg1 position)) (.lvf vf1 (&-> v1-11 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-26 vf1) (let ((f0-9 (sqrtf a0-26))) (vector+float*! arg0 arg0 v1-11 (/ (* 1.1 (- f0-9 (-> this joint-length))) f0-9)) @@ -1473,11 +1473,11 @@ ) (let ((v1-21 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) gp-0))) (.lvf vf1 (&-> v1-21 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-8 vf1) (let ((f0-9 a0-8) (f1-4 28672.0) @@ -1495,7 +1495,7 @@ (gp-1 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self head-mod quat))) ) (dotimes (v1-27 (min 8 (the-as int (-> self chain num-joints)))) - (vector+! s5-1 s5-1 (the-as vector (-> self chain chain-joints v1-27))) + (vector+! s5-1 s5-1 (-> self chain chain-joints v1-27 position)) ) (vector-float*! s5-1 s5-1 (/ 1.0 (the float (min 8 (the-as int (-> self chain num-joints)))))) (vector-! @@ -2296,12 +2296,8 @@ ;; definition for method 15 of type hud-mech-air-tank ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-mech-air-tank)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 100.0 (-> this offset)))) - 208 - ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 51) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 100.0 (-> this offset)))) 208) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 0 51) (set! (-> this sprites 0 scale-x) 0.8) (set! (-> this sprites 0 scale-y) 0.8) (set! (-> this sprites 1 scale-x) 0.8) @@ -2310,8 +2306,8 @@ (set! (-> this sprites 3 scale-y) 0.8) (set! (-> this sprites 2 scale-x) 3.2) (set! (-> this sprites 2 scale-y) (* 4.56 (- 1.0 (-> *game-info* air-supply)))) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 2) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -30 -20) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 0 2) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) -30 -20) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc b/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc index ac4dc779260..a9bb57d8e72 100644 --- a/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/under-shoot-block_REF.gc @@ -1473,13 +1473,9 @@ (+ 8192.0 (* 16384.0 (the float (-> self row)))) 1.0 ) - (vector-matrix*! - (the-as vector (-> gp-1 vector)) - (the-as vector (-> gp-1 vector)) - (-> self puzzle local-to-world) - ) + (vector-matrix*! (-> gp-1 vector 0) (-> gp-1 vector 0) (-> self puzzle local-to-world)) (quaternion-copy! (the-as quaternion (-> gp-1 trans)) (-> self root quat)) - (vector-! (-> self rot-axis) (the-as vector (-> gp-1 vector)) (-> gp-1 vector 1)) + (vector-! (-> self rot-axis) (-> gp-1 vector 0) (-> gp-1 vector 1)) (set! (-> self rot-axis y) 0.0) (vector-normalize! (-> self rot-axis) 1.0) (vector-rotate90-around-y! (-> self rot-axis) (-> self rot-axis)) @@ -1494,7 +1490,7 @@ (let ((f30-0 (fmin 1.0 (* 0.022222223 (the float (- (current-time) (-> self state-time))))))) (let ((s5-1 (-> self root))) (set! (-> s5-1 transv quad) (-> s5-1 trans quad)) - (vector-lerp! (-> s5-1 trans) (-> gp-1 vector 1) (the-as vector (-> gp-1 vector)) f30-0) + (vector-lerp! (-> s5-1 trans) (-> gp-1 vector 1) (-> gp-1 vector 0) f30-0) (set! (-> s5-1 trans y) (+ -8192.0 (* 11585.237 (sin (lerp 8192.0 24576.0 f30-0))) (-> s5-1 trans y))) (vector-! (-> s5-1 transv) (-> s5-1 trans) (-> s5-1 transv)) (let ((v1-17 (-> s5-1 transv))) @@ -1503,8 +1499,8 @@ (.mov at-0 f0-12) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-17 quad) vf1) ) (quaternion-slerp! @@ -1559,13 +1555,9 @@ 1.0 ) ) - (vector-matrix*! - (the-as vector (-> gp-1 vector)) - (the-as vector (-> gp-1 vector)) - (-> self puzzle local-to-world) - ) + (vector-matrix*! (-> gp-1 vector 0) (-> gp-1 vector 0) (-> self puzzle local-to-world)) (quaternion-copy! (the-as quaternion (-> gp-1 trans)) (-> self root quat)) - (vector-! (-> self rot-axis) (the-as vector (-> gp-1 vector)) (-> gp-1 vector 1)) + (vector-! (-> self rot-axis) (-> gp-1 vector 0) (-> gp-1 vector 1)) (set! (-> self rot-axis y) 0.0) (vector-normalize! (-> self rot-axis) 1.0) (vector-rotate90-around-y! (-> self rot-axis) (-> self rot-axis)) @@ -1580,7 +1572,7 @@ (let ((f30-0 (fmin 1.0 (* 0.0074074073 (the float (- (current-time) (-> self state-time))))))) (let ((s5-1 (-> self root))) (set! (-> s5-1 transv quad) (-> s5-1 trans quad)) - (vector-lerp! (-> s5-1 trans) (-> gp-1 vector 1) (the-as vector (-> gp-1 vector)) f30-0) + (vector-lerp! (-> s5-1 trans) (-> gp-1 vector 1) (-> gp-1 vector 0) f30-0) (set! (-> s5-1 trans y) (+ -8192.0 (* 11585.237 (sin (lerp 8192.0 24576.0 f30-0))) (-> s5-1 trans y))) (quaternion-slerp! (-> s5-1 quat) @@ -1605,7 +1597,7 @@ (f30-1 (fmax 0.0 (- 0.15 f1-9))) ) (set! (-> s5-2 transv quad) (-> s5-2 trans quad)) - (vector-lerp! (-> s5-2 trans) (-> gp-1 vector 1) (the-as vector (-> gp-1 vector)) f30-1) + (vector-lerp! (-> s5-2 trans) (-> gp-1 vector 1) (-> gp-1 vector 0) f30-1) (set! (-> s5-2 trans y) (+ -8192.0 (* 11585.237 (sin (lerp 8192.0 24576.0 f30-1))) (-> s5-2 trans y))) (quaternion-slerp! (-> s5-2 quat) @@ -1929,7 +1921,7 @@ (set-vector! (-> gp-0 vector 1) -8192.0 0.0 8192.0 1.0) (set-vector! (-> gp-0 vector 2) 8192.0 0.0 8192.0 1.0) (set-vector! (-> gp-0 trans) 8192.0 0.0 -8192.0 1.0) - (vector-float*! (the-as vector (-> gp-0 vector)) (the-as vector (-> gp-0 vector)) arg2) + (vector-float*! (-> gp-0 vector 0) (-> gp-0 vector 0) arg2) (vector-float*! (-> gp-0 vector 1) (-> gp-0 vector 1) arg2) (vector-float*! (-> gp-0 vector 2) (-> gp-0 vector 2) arg2) (vector-float*! (-> gp-0 trans) (-> gp-0 trans) arg2) @@ -1939,12 +1931,12 @@ (set! (-> v1-12 vector 0 z) (+ 8192.0 (* 16384.0 (the float arg1)))) (set! (-> v1-12 vector 0 w) 1.0) ) - (vector+! (the-as vector (-> gp-0 vector)) (the-as vector (-> gp-0 vector)) (the-as vector (&+ gp-0 64))) + (vector+! (-> gp-0 vector 0) (-> gp-0 vector 0) (the-as vector (&+ gp-0 64))) (vector+! (-> gp-0 vector 1) (-> gp-0 vector 1) (the-as vector (&+ gp-0 64))) (vector+! (-> gp-0 vector 2) (-> gp-0 vector 2) (the-as vector (&+ gp-0 64))) (vector+! (-> gp-0 trans) (-> gp-0 trans) (the-as vector (&+ gp-0 64))) (let ((s4-0 (-> this puzzle local-to-world))) - (vector-matrix*! (the-as vector (-> gp-0 vector)) (the-as vector (-> gp-0 vector)) s4-0) + (vector-matrix*! (-> gp-0 vector 0) (-> gp-0 vector 0) s4-0) (vector-matrix*! (-> gp-0 vector 1) (-> gp-0 vector 1) s4-0) (vector-matrix*! (-> gp-0 vector 2) (-> gp-0 vector 2) s4-0) (vector-matrix*! (-> gp-0 trans) (-> gp-0 trans) s4-0) @@ -1952,7 +1944,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 vector)) + (-> gp-0 vector 0) (-> gp-0 vector 1) (the-as rgba arg3) #f @@ -1980,7 +1972,7 @@ #t (bucket-id debug-no-zbuf1) (-> gp-0 trans) - (the-as vector (-> gp-0 vector)) + (-> gp-0 vector 0) (the-as rgba arg3) #f (the-as rgba -1) diff --git a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc index c722824b17c..0237bebfc9d 100644 --- a/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc +++ b/test/decompiler/reference/jak2/levels/under/underb-master_REF.gc @@ -104,9 +104,9 @@ ) (.lvf vf5 (&-> s5-0 quad)) (.lvf vf4 (&-> gp-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc b/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc index fb6c4ca3196..80d6e5e50c7 100644 --- a/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc +++ b/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc @@ -285,7 +285,7 @@ (if *target* (look-at! (-> *target* neck) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) @@ -3035,7 +3035,7 @@ (s3-0 (new 'stack-no-clear 'matrix)) (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) ) - (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion-normalize! (quaternion*! s1-0 (-> s2-0 0 quat) s1-0)) (quaternion->matrix s3-0 s1-0) (if (logtest? (-> s4-0 ragdoll-flags) (ragdoll-flag mirror)) (matrix*! s3-0 s3-0 (-> s4-0 mirror)) diff --git a/test/decompiler/reference/jak3/engine/ambient/ambient_REF.gc b/test/decompiler/reference/jak3/engine/ambient/ambient_REF.gc index f2c6768bf19..6f0dfa76288 100644 --- a/test/decompiler/reference/jak3/engine/ambient/ambient_REF.gc +++ b/test/decompiler/reference/jak3/engine/ambient/ambient_REF.gc @@ -523,7 +523,7 @@ ) (begin (dotimes (s5-2 4) - (when (and (string-charp= (-> self message name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s5-2))) + (when (and (string-charp= (-> self message name) (-> *sound-iop-info* stream-name s5-2 name)) (= (-> self voice-id) (-> *sound-iop-info* stream-id s5-2)) (logtest? (-> *sound-iop-info* stream-status s5-2) (stream-status ss6)) ) diff --git a/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc index df32b6a5806..8c76e016ff7 100644 --- a/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc @@ -81,25 +81,19 @@ (set! (-> v1-25 0 fvec quad) a2-6) (set! (-> v1-25 0 trans quad) a3-3) ) - (vector*! (the-as vector (-> this transform)) (-> s5-1 bone transform trans) (-> this process root scale)) - ) - (vector-! - (the-as vector (-> this delta)) - (the-as vector (-> this transform)) - (the-as vector (-> this transform 1)) + (vector*! (-> this transform 0 trans) (-> s5-1 bone transform trans) (-> this process root scale)) ) + (vector-! (-> this delta trans) (-> this transform 0 trans) (-> this transform 1 trans)) (set-vector! (-> this align scale) - (vector-length (the-as vector (-> this matrix))) + (vector-length (-> this matrix 0 rvec)) (vector-length (-> this matrix 0 uvec)) (vector-length (-> this matrix 0 fvec)) 1.0 ) (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) (let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) - (quaternion-normalize! - (matrix->quaternion (-> this align quat) (matrix*! a2-7 (the-as matrix (-> this matrix)) a2-7)) - ) + (quaternion-normalize! (matrix->quaternion (-> this align quat) (matrix*! a2-7 (-> this matrix 0) a2-7))) ) (let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) ) diff --git a/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc b/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc index ffabed752bd..5975f2542c0 100644 --- a/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc @@ -144,8 +144,8 @@ (.mov at-0 f0-1) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-12 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc index a176e153045..a7b727ab601 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc @@ -553,9 +553,9 @@ (v1-8 (set! sv-48 (remove-joint-from-list this arg0 s2-0)) (set! sv-64 (-> this lists data)) - (add-joint-to-list this (the-as joint-exploder-list sv-64) s2-0) + (add-joint-to-list this (-> sv-64 0) s2-0) (set! s2-0 sv-48) - (update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80) + (update-bbox-for-joint this (-> sv-64 0) sv-80) (set! (-> arg0 bbox-valid?) s0-0) (set! (-> arg0 bbox min quad) (-> s1-0 min quad)) (vector-copy! (-> arg0 bbox max) (-> s1-0 max)) @@ -628,11 +628,11 @@ (+! (-> s2-0 transv y) f30-0) (when (< 0.0 (-> this tuning friction)) (.lvf vf1 (&-> (-> s2-0 transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-8 vf1) (let* ((f0-4 v1-8) (f1-5 (* 0.00001 (seconds-per-frame) (-> this tuning friction) f0-4)) diff --git a/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc index 2616f89ff85..8f111e84b0c 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint-mod-h_REF.gc @@ -363,10 +363,10 @@ This is used to make jak look toward an enemy, for example." (.lvf vf2 (&-> (-> input-cspace bone) transform trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> output-vec quad) vf2) output-vec ) @@ -488,7 +488,7 @@ Unlike jak 2, this actually multiplies the scale, instead of adding." "Callback for joint-mod-add-local. See comment on that type." (let ((s4-0 (the-as joint-mod-add-local (-> bone-cspace param1)))) (if (logtest? (-> s4-0 flags) (joint-mod-base-flags trans)) - (vector+! (-> joint-transform trans) (-> joint-transform trans) (the-as vector (-> s4-0 transform))) + (vector+! (-> joint-transform trans) (-> joint-transform trans) (-> s4-0 transform trans)) ) (when (logtest? (-> s4-0 flags) (joint-mod-base-flags quat)) (quaternion*! (-> joint-transform quat) (-> joint-transform quat) (-> s4-0 transform quat)) @@ -658,9 +658,9 @@ Then, apply the normal parented transform." "Callback for joint-mod-blend-local. See comment on that type." (let ((gp-0 (the-as joint-mod-blend-local (-> bone-cspace param1)))) (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) + (-> gp-0 blend-transform trans) (-> joint-transform trans) - (the-as vector (-> gp-0 transform)) + (-> gp-0 transform trans) (-> gp-0 blend) ) (vector-lerp! @@ -754,18 +754,13 @@ Then, apply the normal parented transform." (matrix*! (-> s3-0 mat2) (-> s3-0 mat1) (-> bone-cspace parent bone transform)) (set-vector! (-> s3-0 vec) - (vector-length (the-as vector (-> s3-0 mat2))) + (vector-length (-> s3-0 mat2 rvec)) (vector-length (-> s3-0 mat2 uvec)) (vector-length (-> s3-0 mat2 fvec)) 1.0 ) (vector*! (-> gp-0 blend-transform scale) (-> s3-0 vec) (-> joint-transform scale)) - (vector-lerp! - (the-as vector (-> gp-0 blend-transform)) - (-> s3-0 mat2 trans) - (the-as vector (-> gp-0 transform)) - f30-0 - ) + (vector-lerp! (-> gp-0 blend-transform trans) (-> s3-0 mat2 trans) (-> gp-0 transform trans) f30-0) (vector-lerp! (-> gp-0 blend-transform scale) (-> gp-0 blend-transform scale) (-> gp-0 transform scale) f26-0) (quaternion-slerp! (-> gp-0 blend-transform quat) diff --git a/test/decompiler/reference/jak3/engine/anim/joint-mod_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint-mod_REF.gc index cff091295fe..e77c6cdae99 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint-mod_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint-mod_REF.gc @@ -79,9 +79,9 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (if (-> gp-0 callback) @@ -98,28 +98,28 @@ (.lvf vf4 (&-> v1-32 quad)) (.lvf vf5 (&-> a0-19 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-768 rvec quad) vf6) - (vector-length (the-as vector sv-768)) + (vector-length (-> sv-768 rvec)) (+ -4.096 f0-12 f30-0) (let ((f0-15 (+ 4.096 (fabs (- f30-0 f0-12))))) (cond ((< f0-15 f0-15) - (vector-normalize! (the-as vector sv-768) f0-15) + (vector-normalize! (-> sv-768 rvec) f0-15) (let ((v1-39 s1-0)) (let ((a0-21 s2-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-21 quad)) ) (.lvf vf5 (&-> sv-768 rvec quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-39 quad) vf6) ) ) ((< f0-15 f0-15) - (vector-normalize! (the-as vector sv-768) f0-15) - (vector+! s1-0 s2-0 (the-as vector sv-768)) + (vector-normalize! (-> sv-768 rvec) f0-15) + (vector+! s1-0 s2-0 (-> sv-768 rvec)) ) ) ) @@ -128,8 +128,8 @@ (let ((v1-44 (new 'stack-no-clear 'vector))) (.lvf vf4 (&-> s0-0 quad)) (.lvf vf5 (&-> sv-784 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-44 quad) vf6) (set! sv-356 v1-44) ) @@ -201,10 +201,10 @@ (* f30-1 f30-1) (let ((s0-2 (new 'stack-no-clear 'quaternion))) (vector-flatten! s2-4 sv-352 sv-364) - (vector-flatten! (the-as vector s1-2) s3-1 sv-364) + (vector-flatten! (-> s1-2 vec) s3-1 sv-364) (vector-normalize! s2-4 1.0) - (vector-normalize! (the-as vector s1-2) 1.0) - (quaternion-from-two-vectors! s0-2 s2-4 (the-as vector s1-2)) + (vector-normalize! (-> s1-2 vec) 1.0) + (quaternion-from-two-vectors! s0-2 s2-4 (-> s1-2 vec)) (quaternion*! sv-372 s0-2 sv-372) ) ) @@ -758,9 +758,7 @@ (set! sv-148 (new 'stack-no-clear 'quaternion)) (set! sv-152 (new 'stack-no-clear 'vector)) (set! sv-156 (new 'stack-no-clear 'vector)) - (set! sv-160 - (&-> (-> gp-0 process node-list data (-> gp-0 base-joint) bone) transform quad (-> gp-0 base-nose)) - ) + (set! sv-160 (&-> gp-0 process node-list data (-> gp-0 base-joint) bone transform quad (-> gp-0 base-nose))) (set! sv-164 (< (vector-dot (-> s3-0 rvec) (vector-cross! (new 'stack-no-clear 'vector) (-> s3-0 uvec) (-> s3-0 fvec))) 0.0 @@ -916,7 +914,7 @@ ) (let* ((s4-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) - (the-as vector (-> gp-0 process node-list data 0 bone transform)) + (-> gp-0 process node-list data 0 bone transform rvec) 1.0 ) ) @@ -1116,11 +1114,7 @@ (set! (-> v1-15 x) (/ 1.0 (-> v1-15 x))) (set! (-> v1-15 y) (/ 1.0 (-> v1-15 y))) (set! (-> v1-15 z) (/ 1.0 (-> v1-15 z))) - (vector-float*! - (the-as vector (-> arg0 bone transform)) - (the-as vector (-> arg0 bone transform)) - (-> v1-15 x) - ) + (vector-float*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) (-> v1-15 x)) (vector-float*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) (-> v1-15 y)) (vector-float*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) (-> v1-15 z)) ) @@ -1134,12 +1128,12 @@ ) (cond ((logtest? (-> s5-0 track-mode) (track-mode no-rotate)) - (vector-normalize! (the-as vector (-> arg0 bone transform)) (-> s3-0 x)) + (vector-normalize! (-> arg0 bone transform rvec) (-> s3-0 x)) (vector-normalize! (-> arg0 bone transform uvec) (-> s3-0 y)) (vector-normalize! (-> arg0 bone transform fvec) (-> s3-0 z)) ) (else - (vector-float*! (the-as vector (-> arg0 bone transform)) (the-as vector (-> arg0 bone transform)) (-> s3-0 x)) + (vector-float*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) (-> s3-0 x)) (vector-float*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) (-> s3-0 y)) (vector-float*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) (-> s3-0 z)) ) @@ -1369,7 +1363,7 @@ (let* ((t9-2 vector-normalize-copy!) (a0-3 (new 'stack-no-clear 'vector)) (v1-3 (abs (-> s5-0 nose))) - (s3-0 (t9-2 a0-3 (the-as vector (&-> (-> arg0 bone) transform quad v1-3)) 1.0)) + (s3-0 (t9-2 a0-3 (the-as vector (&-> arg0 bone transform quad v1-3)) 1.0)) (s1-0 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 target) (-> arg0 bone transform trans)) 1.0 @@ -1385,7 +1379,7 @@ (a0-7 (-> s4-1 rvec)) (v1-11 (abs (-> s5-0 ear))) ) - (t9-5 a0-7 (the-as vector (&-> (-> arg0 bone) transform quad v1-11)) 1.0) + (t9-5 a0-7 (the-as vector (&-> arg0 bone transform quad v1-11)) 1.0) ) (if (logtest? (-> s5-0 flags) (joint-mod-polar-flags negate-ear)) (vector-negate! (-> s4-1 rvec) (-> s4-1 rvec)) @@ -1394,7 +1388,7 @@ (a0-9 (-> s4-1 uvec)) (v1-18 (abs (-> s5-0 up))) ) - (t9-7 a0-9 (the-as vector (&-> (-> arg0 bone) transform quad v1-18)) 1.0) + (t9-7 a0-9 (the-as vector (&-> arg0 bone transform quad v1-18)) 1.0) ) (if (logtest? (-> s5-0 flags) (joint-mod-polar-flags negate-up)) (vector-negate! (-> s4-1 uvec) (-> s4-1 uvec)) @@ -1503,3 +1497,7 @@ 0 (none) ) + + + + diff --git a/test/decompiler/reference/jak3/engine/anim/joint_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint_REF.gc index 5cca7290886..ecc32d95a3a 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint_REF.gc @@ -405,7 +405,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return (the-as basic (-> this data s2-0))) ) @@ -433,7 +433,7 @@ (dotimes (s2-0 (-> this length)) (if (and (-> this data s2-0) (= (-> this data s2-0 type) arg1) - (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> (-> this data s2-0 name) data s3-0))) + (or (name= arg0 (-> this data s2-0 name)) (string-charp= arg0 (&-> this data s2-0 name data s3-0))) ) (return s2-0) ) @@ -1497,40 +1497,40 @@ (let ((a2-0 (-> dst bone))) (.add.vf vf6 vf5 vf5) (let ((f1-0 (-> t0-0 scale x))) - (.add.w.vf vf2 vf0 vf5 :mask #b1) + (.add.w.vf.x vf2 vf0 vf5) (.lvf vf15 (&-> joint-transformq trans quad)) - (.add.z.vf vf2 vf0 vf5 :mask #b10) + (.add.z.vf.y vf2 vf0 vf5) (.lvf vf1 (&-> joint-transformq scale quad)) (let ((f4-0 (/ f0-0 f1-0))) (.lvf vf7 (&-> t0-0 transform rvec quad)) - (.sub.y.vf vf2 vf0 vf5 :mask #b100) + (.sub.y.vf.z vf2 vf0 vf5) (.lvf vf8 (&-> t0-0 transform uvec quad)) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (.lvf vf9 (&-> t0-0 transform fvec quad)) - (.sub.z.vf vf3 vf0 vf5 :mask #b1) + (.sub.z.vf.x vf3 vf0 vf5) (.lvf vf10 (&-> t0-0 transform trans quad)) - (.add.w.vf vf3 vf0 vf5 :mask #b10) + (.add.w.vf.y vf3 vf0 vf5) (let ((f2-0 (-> t0-0 scale y))) - (.add.x.vf vf3 vf0 vf5 :mask #b100) + (.add.x.vf.z vf3 vf0 vf5) (.svf (&-> a2-0 scale quad) vf1) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (let ((f3-0 (-> t0-0 scale z))) - (.add.y.vf vf4 vf0 vf5 :mask #b1) + (.add.y.vf.x vf4 vf0 vf5) (let ((v1-1 (-> t0-0 scale w))) - (.sub.x.vf vf4 vf0 vf5 :mask #b10) + (.sub.x.vf.y vf4 vf0 vf5) (let ((t1-0 (the-as uint128 f4-0))) - (.add.w.vf vf4 vf0 vf5 :mask #b100) + (.add.w.vf.z vf4 vf0 vf5) (let ((f4-1 (/ f0-0 f2-0))) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf6 vf2) (.outer.product.b.vf vf2 vf2 vf6 acc) (.outer.product.a.vf acc vf6 vf3) (.outer.product.b.vf vf3 vf3 vf6 acc) (.outer.product.a.vf acc vf6 vf4) (.outer.product.b.vf vf4 vf4 vf6 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (let ((t2-0 (the-as uint128 f4-1))) (b! (nonzero? v1-1) cfg-2 :delay (set! f4-2 (/.s f0-0 f3-0))) (.mul.x.vf vf2 vf2 vf1) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-combiner_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-combiner_REF.gc index b745d39bb3e..c061df34450 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-combiner_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-combiner_REF.gc @@ -46,7 +46,7 @@ (let ((s4-0 (new-stack-vector0))) 0.0 (let ((s3-0 (new-stack-matrix0))) - (vector-! (-> s2-0 0) (the-as vector (-> sv-144 inv-mat)) (the-as vector (-> gp-0 inv-mat))) + (vector-! (-> s2-0 0) (-> sv-144 inv-mat rvec) (-> gp-0 inv-mat rvec)) (vector-! (-> s2-0 1) (-> sv-144 inv-mat uvec) (-> gp-0 inv-mat uvec)) (vector-! (-> s2-0 2) (-> sv-144 inv-mat fvec) (-> gp-0 inv-mat fvec)) (let ((f0-6 (vector-length (-> s2-0 0))) @@ -66,14 +66,14 @@ ) ) (vector-normalize! s4-0 1.0) - (let ((f0-9 (fabs (vector-dot (the-as vector (-> sv-144 inv-mat)) s4-0))) + (let ((f0-9 (fabs (vector-dot (-> sv-144 inv-mat rvec) s4-0))) (f1-3 (fabs (vector-dot (-> sv-144 inv-mat uvec) s4-0))) (f2-3 (fabs (vector-dot (-> sv-144 inv-mat fvec) s4-0))) ) (cond ((and (< f0-9 f1-3) (< f0-9 f2-3)) - (vector-flatten! (-> s2-0 0) (the-as vector (-> sv-144 inv-mat)) s4-0) - (vector-flatten! (-> s2-0 1) (the-as vector (-> gp-0 inv-mat)) s4-0) + (vector-flatten! (-> s2-0 0) (-> sv-144 inv-mat rvec) s4-0) + (vector-flatten! (-> s2-0 1) (-> gp-0 inv-mat rvec) s4-0) ) ((< f1-3 f2-3) (vector-flatten! (-> s2-0 0) (-> sv-144 inv-mat uvec) s4-0) @@ -122,7 +122,7 @@ (matrix-axis-sin-cos! s3-0 s4-0 (sin f30-1) (cos f30-1)) ) ) - (matrix*! (-> self inv-camera-rot) (the-as matrix gp-0) s3-0) + (matrix*! (-> self inv-camera-rot) (-> gp-0 inv-mat) s3-0) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-master_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-master_REF.gc index ba409d6c0ef..0a37bffc3da 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-master_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-master_REF.gc @@ -933,9 +933,9 @@ ) (.lvf vf4 (&-> (the-as vector v1-232) quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> (the-as vector v0-0) quad) vf6) v0-0 ) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-states-dbg_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-states-dbg_REF.gc index 0aca5229a40..c1794e50d9b 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-states-dbg_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-states-dbg_REF.gc @@ -76,14 +76,14 @@ (matrix-axis-angle! s3-0 (-> *camera* local-down) (- (-> s5-0 y))) (vector-matrix*! s4-0 s4-0 s3-0) ) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) s4-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) s4-0 (-> *camera* local-down)) ) (set! (-> self pivot-rad) (- (-> self pivot-rad) (-> gp-0 z))) (if (< (-> self pivot-rad) 4096.0) (set! (-> self pivot-rad) 4096.0) ) (set-vector! gp-0 0.0 0.0 (- (-> self pivot-rad)) 1.0) - (vector-matrix*! (-> self trans) gp-0 (the-as matrix (-> self tracking))) + (vector-matrix*! (-> self trans) gp-0 (-> self tracking inv-mat)) ) ) (suspend) @@ -127,7 +127,7 @@ ) (init-vf0-vector) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (the-as vector (-> *mouse* pos)) (-> *mouse* pos 1)) + (vector-! v1-0 (-> *mouse* pos 0) (-> *mouse* pos 1)) (if (< (-> *camera* interest-dist) 409.6) (set! (-> *camera* interest-dist) 409.6) ) @@ -146,9 +146,9 @@ ) (.lvf vf4 (&-> a2-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector-! s3-0 (-> *math-camera* trans) a0-9) @@ -192,9 +192,9 @@ ) (.lvf vf4 (&-> a0-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-18 quad) vf6) ) (set-setting! 'mouse-tumble-point 'abs t0-2 0) @@ -433,18 +433,18 @@ ) (when (not (-> *setting-control* cam-current mouse-input)) (if *amy-cam* - (matrix-rotate-y! (the-as matrix (-> self tracking)) 32768.0) + (matrix-rotate-y! (-> self tracking inv-mat) 32768.0) ) (cam-free-floating-move - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self trans) gp-0 (the-as int (-> *CAMERA-bank* joypad)) ) (when *amy-cam* - (matrix-rotate-y! (the-as matrix (-> self tracking)) 32768.0) + (matrix-rotate-y! (-> self tracking inv-mat) 32768.0) (let ((a1-4 (matrix-rotate-x! (new 'stack-no-clear 'matrix) 16384.0))) - (matrix*! (the-as matrix (-> self tracking)) a1-4 (the-as matrix (-> self tracking))) + (matrix*! (-> self tracking inv-mat) a1-4 (-> self tracking inv-mat)) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-states_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-states_REF.gc index f67e0a18aa1..24deac7ca2d 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-states_REF.gc @@ -83,7 +83,7 @@ (cam-curve-pos (-> self trans) gp-0 (the-as curve #f) #f) (when (!= (-> gp-0 w) 0.0) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) ) @@ -111,7 +111,7 @@ ) ((-> self cam-entity) (cam-slave-get-vector-with-offset (the-as entity-actor (-> self cam-entity)) (-> self trans) 'trans) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (cam-curve-setup (-> self trans)) ((-> cam-fixed enter)) @@ -185,7 +185,7 @@ ) (vector-reset! (-> self tracking inv-mat trans)) (let ((gp-0 (new 'stack-no-clear 'vector))) - (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (the-as matrix (-> self tracking))) + (vector-matrix*! gp-0 (-> *camera* settings pov-offset) (-> self tracking inv-mat)) (vector+! (-> self trans) (-> self trans) gp-0) ) ) @@ -435,7 +435,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -584,23 +584,19 @@ ) ) (matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y)) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (if (< (vector-dot (-> self tracking inv-mat uvec) (-> *camera* local-down)) 0.0) + (forward-down->inv-matrix (-> self tracking inv-mat) (-> self tracking inv-mat fvec) (-> *camera* local-down)) (forward-down->inv-matrix - (the-as matrix (-> self tracking)) - (-> self tracking inv-mat fvec) - (-> *camera* local-down) - ) - (forward-down->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (-> self tracking inv-mat fvec) (vector-negate! (new-stack-vector0) (-> *camera* local-down)) ) ) ) (matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x))) - (matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0) + (matrix*! (-> self tracking inv-mat) (-> self tracking inv-mat) s5-0) ) (when (not (logtest? (-> self options) (cam-slave-options-u32 ALLOW_Z_ROT))) (let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat fvec)))) @@ -749,10 +745,10 @@ (vector-! gp-0 s5-0 gp-0) (vector-negate! gp-0 gp-0) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> self tracking)) gp-0 (-> *camera* local-down)) + (forward-down->inv-matrix (-> self tracking inv-mat) gp-0 (-> *camera* local-down)) ) ) - (vector-into-frustum-nosmooth! (the-as matrix (-> self tracking)) (-> self trans) (-> self fov)) + (vector-into-frustum-nosmooth! (-> self tracking inv-mat) (-> self trans) (-> self fov)) ) ) ) @@ -774,7 +770,7 @@ (set! (-> self fov) (cam-slave-get-fov (-> self cam-entity))) (logior! (-> self options) (cam-slave-get-flags (-> self cam-entity) 'flags)) (if (logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) (set! (-> self tracking tilt-adjust target) (cam-slave-get-float (-> self cam-entity) 'tiltAdjust (-> *CAMERA-bank* default-tilt-adjust)) ) @@ -1288,7 +1284,7 @@ ((logtest? (-> self options) (cam-slave-options-u32 NO_ROTATE)) (set! (-> self blend-from-type) (camera-blend-from-type unknown-0)) (set! (-> self blend-to-type) (camera-blend-to-type unknown-0)) - (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (the-as matrix (-> self tracking))) + (cam-slave-get-rot (the-as entity-actor (-> self cam-entity)) (-> self tracking inv-mat)) ) (else (set! (-> self blend-from-type) (camera-blend-from-type unknown-2)) @@ -2179,7 +2175,7 @@ (set! sv-816 (-> (the-as (inline-array tracking-spline) (-> *camera* target-spline)) 0 point s2-2)) (set! sv-832 arg0) (let ((a2-21 (camera-master-method-16 *camera* #t))) - (set! f30-1 (s0-3 (the-as vector sv-816) sv-832 (the-as pat-surface a2-21))) + (set! f30-1 (s0-3 (-> sv-816 position) sv-832 (the-as pat-surface a2-21))) ) ) (< f30-1 0.0) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc index db052ff47b9..b9ade87a755 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc @@ -52,7 +52,7 @@ (vector-matrix*! (-> s5-0 yon-bottom-right) (-> s5-0 yon-bottom-right) arg3) (when (= arg2 1.0) (let ((v1-4 *fog-texture-work*)) - (vector-! (the-as vector (-> v1-4 corner)) (-> s5-0 yon-top-left) (-> arg3 trans)) + (vector-! (-> v1-4 corner 0) (-> s5-0 yon-top-left) (-> arg3 trans)) (vector-! (-> v1-4 corner 1) (-> s5-0 yon-top-right) (-> arg3 trans)) (vector-! (-> v1-4 corner 2) (-> s5-0 yon-bottom-left) (-> arg3 trans)) (vector-! (-> v1-4 corner 3) (-> s5-0 yon-bottom-right) (-> arg3 trans)) diff --git a/test/decompiler/reference/jak3/engine/camera/camera_REF.gc b/test/decompiler/reference/jak3/engine/camera/camera_REF.gc index 9eda907f73b..54628238e91 100644 --- a/test/decompiler/reference/jak3/engine/camera/camera_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/camera_REF.gc @@ -457,7 +457,7 @@ (s2-1 (cond (v0-10 - (vector+! (the-as vector (-> this vec)) (the-as vector (&+ s2-1 0)) (the-as vector v0-10)) + (vector+! (-> this vec 0) (the-as vector (&+ s2-1 0)) (the-as vector v0-10)) (vector+! (-> this vec 1) (the-as vector (&+ s2-1 16)) (the-as vector v0-10)) ) (else @@ -481,7 +481,7 @@ ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-! v1-14 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-14)) - (vector-! v1-14 (the-as vector (-> this vec)) arg2) + (vector-! v1-14 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-14)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) @@ -489,13 +489,13 @@ ((logtest? (-> this flags) (cam-index-options SPHERICAL)) (vector-! v1-14 (-> this vec 1) arg2) (set! (-> this vec 1 w) (vector-length v1-14)) - (vector-! v1-14 (the-as vector (-> this vec)) arg2) + (vector-! v1-14 (-> this vec 0) arg2) (set! (-> this vec 1 x) (vector-length v1-14)) (set! (-> this vec 1 w) (- (-> this vec 1 w) (-> this vec 1 x))) (set! (-> this vec 0 quad) (-> arg2 quad)) ) (else - (vector-! (-> this vec 1) (-> this vec 1) (the-as vector (-> this vec))) + (vector-! (-> this vec 1) (-> this vec 1) (-> this vec 0)) (set! (-> this vec 1 w) (vector-normalize-ret-len! (-> this vec 1) 1.0)) ) ) @@ -508,7 +508,7 @@ (defmethod cam-index-method-10 ((this cam-index) (arg0 vector)) (let ((s5-0 (new-stack-vector0))) 0.0 - (vector-! s5-0 arg0 (the-as vector (-> this vec))) + (vector-! s5-0 arg0 (-> this vec 0)) (cond ((logtest? (-> this flags) (cam-index-options RADIAL)) (vector-flatten! s5-0 s5-0 (-> *camera* local-down)) @@ -570,8 +570,8 @@ (set! (-> this summed-len) (- (-> this summed-len) (-> this point arg0 tp-length))) (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 arg0))) - (the-as vector (-> this point v1-11)) - (the-as vector (-> this point arg0)) + (-> this point v1-11 position) + (-> this point arg0 position) ) ) (set! (-> this point arg0 tp-length) @@ -724,7 +724,7 @@ (vector-! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) arg0 - (the-as vector (-> this point s2-0)) + (-> this point s2-0 position) ) (set! (-> this point s2-0 tp-length) (vector-normalize-ret-len! (the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s2-0))) 1.0) @@ -772,19 +772,14 @@ (cond ((= (-> arg3 cur-pt) (-> this end-point)) (set! (-> arg3 partial-pt) 0.0) - (vector+! arg1 arg1 (the-as vector (-> this point (-> arg3 cur-pt)))) + (vector+! arg1 arg1 (-> this point (-> arg3 cur-pt) position)) (return arg1) ) ((begin (set! f0-4 (+ (-> arg3 partial-pt) (/ arg0 (-> this point (-> arg3 cur-pt) tp-length)))) (< f0-4 1.0)) (set! (-> arg3 partial-pt) f0-4) (let ((s2-0 (new 'stack-no-clear 'vector))) (let ((v1-13 (-> this point (-> arg3 cur-pt) next))) - (vector-lerp! - s2-0 - (the-as vector (-> this point (-> arg3 cur-pt))) - (the-as vector (-> this point v1-13)) - f0-4 - ) + (vector-lerp! s2-0 (-> this point (-> arg3 cur-pt) position) (-> this point v1-13 position) f0-4) ) (vector+! arg1 arg1 s2-0) ) @@ -816,11 +811,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod tracking-spline-method-20 ((this tracking-spline) (arg0 vector) (arg1 int)) (let ((s3-0 (new 'stack-no-clear 'vector))) - (vector-! - s3-0 - (the-as vector (-> this point (-> this used-point))) - (the-as vector (-> this point (-> this end-point))) - ) + (vector-! s3-0 (-> this point (-> this used-point) position) (-> this point (-> this end-point) position)) (let* ((f0-0 (vector-length s3-0)) (f1-1 (* 0.33333334 (- 1.5 (/ f0-0 METER_LENGTH)))) ) @@ -868,7 +859,7 @@ ((< f26-0 0.0) (if (and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* -40.96 f26-0) (new 'static 'vector4w :x #xff :y #xff :w #x80) @@ -878,7 +869,7 @@ ) ((and *debug-segment* *display-camera-marks*) (camera-line-rel-len - (the-as vector (-> this point s1-0)) + (-> this point s1-0 position) s2-0 (* 40.96 f26-0) (new 'static 'vector4w :x #x80 :y #x80 :w #x80) @@ -1058,7 +1049,7 @@ ) (else (vector-reset! (-> self trans)) - (matrix-identity! (the-as matrix (-> self tracking))) + (matrix-identity! (-> self tracking inv-mat)) (set! (-> self fov) 11650.845) (vector-reset! (-> self velocity)) ) @@ -1574,8 +1565,8 @@ (.mov vf2 v1-11) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-128 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 fvec)) (vector-normalize! s2-0 f26-0) @@ -1607,8 +1598,8 @@ (.mov vf2 v1-32) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-160 quad) vf1) (vector+! s2-0 s2-0 (-> arg0 fvec)) (vector-normalize! s2-0 1.0) @@ -1706,11 +1697,11 @@ (vector-normalize! sv-208 (* f28-0 (-> arg0 point-of-interest-blend value))) (let ((v1-12 s0-0)) (let ((a0-10 s0-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-10 quad)) ) (.lvf vf5 (&-> sv-208 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-12 quad) vf6) ) (vector-normalize! s0-0 f28-0) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc index bf624cb2b62..366188a7d76 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc @@ -26,7 +26,7 @@ (add-debug-box #t (bucket-id debug) - (the-as vector (-> arg2 bbox)) + (-> arg2 bbox min) (-> arg2 bbox max) (new 'static 'rgba :g #xff :b #xff :a #x80) ) @@ -89,16 +89,16 @@ (a3-4 (the-as (inline-array collide-cache-tri) (-> this tris (-> this num-tris)))) ) (.mov vf5 v1-31) - (.add.x.vf vf1 vf0 vf5 :mask #b10) + (.add.x.vf.y vf1 vf0 vf5) (set! (-> a3-4 0 clear-flags) (the-as uint128 0)) (set! (-> a3-4 0 prim-index) a2-6) - (.add.x.vf vf3 vf0 vf5 :mask #b10) + (.add.x.vf.y vf3 vf0 vf5) (set! (-> a3-4 1 clear-flags) (the-as uint128 0)) (set! (-> a3-4 1 prim-index) a2-6) (.mov.vf vf2 vf1) (.mov.vf vf4 vf1) - (.add.z.vf vf2 vf0 vf3 :mask #b100) - (.add.x.vf vf4 vf0 vf3 :mask #b1) + (.add.z.vf.z vf2 vf0 vf3) + (.add.x.vf.x vf4 vf0 vf3) (.svf (&-> a3-4 0 vertex 0 quad) vf1) (.svf (&-> a3-4 0 vertex 1 quad) vf2) (.svf (&-> a3-4 0 vertex 2 quad) vf3) @@ -157,9 +157,9 @@ (set! (-> this ignore-processes 0) (the-as process a0-2)) (nop!) (set! (-> this ignore-processes 1) (the-as process a1-1)) - (.mov.vf vf1 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) (nop!) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (set! (-> this ignore-mask) (the-as pat-surface a2-0)) ) ) @@ -309,29 +309,29 @@ (nop!) (.add.vf vf2 vf1 vf3) (set! (-> this ignore-mask) (the-as pat-surface v1-10)) - (.add.y.vf vf8 vf8 vf8 :mask #b1) + (.add.y.vf.x vf8 vf8 vf8) (set! (-> this num-tris) 0) (.min.vf vf4 vf1 vf2) (set! (-> this num-prims) 0) (.max.vf vf5 vf1 vf2) (set! (-> this collide-with) (the-as collide-spec a2-1)) ) - (.sub.w.vf vf10 vf0 vf9 :mask #b111) + (.sub.w.vf.xyz vf10 vf0 vf9) (set! (-> this ignore-processes 0) (the-as process a0-14)) - (.add.z.vf vf8 vf8 vf8 :mask #b1) + (.add.z.vf.x vf8 vf8 vf8) (set! (-> this ignore-processes 1) (the-as process a1-3)) ) ) ) - (.sub.w.vf vf4 vf4 vf9 :mask #b111) + (.sub.w.vf.xyz vf4 vf4 vf9) (nop!) - (.add.w.vf vf5 vf5 vf9 :mask #b111) + (.add.w.vf.xyz vf5 vf5 vf9) (nop!) (.ftoi.vf vf15 vf10) (nop!) (.isqrt.vf Q vf0 vf8 :fsf #b11 :ftf #b0) (nop!) - (.add.w.vf vf11 vf0 vf9 :mask #b111) + (.add.w.vf.xyz vf11 vf0 vf9) (nop!) (nop!) (nop!) @@ -355,7 +355,7 @@ (.svf (&-> arg0 bbox4w max quad) vf7) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (nop!) (.mul.x.vf vf12 vf3 vf8) (nop!) @@ -367,27 +367,27 @@ (nop!) (.abs.vf vf23 vf12) (nop!) - (.add.y.vf vf22 vf22 vf22 :mask #b1) + (.add.y.vf.x vf22 vf22 vf22) (.mov v1-11 vf23) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (nop!) - (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf vf13 vf0 vf12 :mask #b1)) - (.sub.y.vf vf13 vf0 vf12 :mask #b1) + (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf.x vf13 vf0 vf12)) + (.sub.y.vf.x vf13 vf0 vf12) (nop!) (.isqrt.vf Q vf0 vf22 :fsf #b11 :ftf #b0) (nop!) - (.add.x.vf vf13 vf0 vf12 :mask #b10) + (.add.x.vf.y vf13 vf0 vf12) (nop!) (.wait.vf) (nop!) - (.mul.vf vf13 vf13 Q :mask #b11) + (.mul.vf.xy vf13 vf13 Q) (nop!) (label cfg-12) (.outer.product.a.vf acc vf12 vf13) (nop!) - (.add.x.vf vf11 vf11 vf8 :mask #b1) + (.add.x.vf.x vf11 vf11 vf8) (nop!) (.outer.product.b.vf vf14 vf13 vf12 acc) (nop!) @@ -399,23 +399,23 @@ (nop!) (.mov.vf vf19 vf14) (nop!) - (.mov.vf vf17 vf0 :mask #b1110) + (.mov.vf.yzw vf17 vf0) (.svf (&-> arg0 local-box4w max quad) vf16) - (.mov.vf vf18 vf0 :mask #b1101) + (.mov.vf.xzw vf18 vf0) (nop!) - (.mov.vf vf19 vf0 :mask #b1011) + (.mov.vf.xyw vf19 vf0) (nop!) - (.add.x.vf vf17 vf17 vf13 :mask #b10) + (.add.x.vf.y vf17 vf17 vf13) (nop!) - (.add.y.vf vf18 vf18 vf12 :mask #b1) + (.add.y.vf.x vf18 vf18 vf12) (nop!) - (.add.z.vf vf19 vf19 vf12 :mask #b1) + (.add.z.vf.x vf19 vf19 vf12) (nop!) - (.add.x.vf vf17 vf17 vf14 :mask #b100) + (.add.x.vf.z vf17 vf17 vf14) (nop!) - (.add.y.vf vf18 vf18 vf14 :mask #b100) + (.add.y.vf.z vf18 vf18 vf14) (nop!) - (.add.z.vf vf19 vf19 vf13 :mask #b10) + (.add.z.vf.y vf19 vf19 vf13) (nop!) (.mul.x.vf acc vf17 vf1) (nop!) @@ -444,11 +444,11 @@ ) (let ((f0-19 1.0)) (.lvf vf1 (&-> (-> arg0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-20 vf1) (set! (-> arg0 rlength w) (/ f0-19 v1-20)) ) @@ -671,11 +671,11 @@ (s3-0 (new 'stack-no-clear 'matrix)) ) (.lvf vf1 (&-> (-> arg0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-9 vf1) (let ((f0-1 v1-9)) (if (< 0.0 f0-1) @@ -692,13 +692,13 @@ ) (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) (let ((s0-0 (-> v1-18 prim-core))) - (vector-! (-> s3-0 uvec) (the-as vector s0-0) (-> arg0 start-pos)) + (vector-! (-> s3-0 uvec) (-> s0-0 world-sphere) (-> arg0 start-pos)) (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) ) - (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-0))) + (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-0 world-sphere))) (f1-5 (+ (-> arg0 radius) (-> s0-0 world-sphere w))) ) (when (< f0-7 (* f1-5 f1-5)) @@ -728,13 +728,13 @@ ) (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) (let ((s0-1 (-> v1-39 prim-core))) - (vector-! (-> s3-0 uvec) (the-as vector s0-1) (-> arg0 start-pos)) + (vector-! (-> s3-0 uvec) (-> s0-1 world-sphere) (-> arg0 start-pos)) (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) ) - (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-1))) + (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-1 world-sphere))) (f1-11 (+ (-> arg0 radius) (-> s0-1 world-sphere w))) ) (when (< f0-12 (* f1-11 f1-11)) @@ -835,7 +835,7 @@ (.lvf vf3 (&-> arg0 start-pos quad)) (.lvf vf2 (&-> arg0 move-dist quad)) (set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat)) - (.mul.w.vf vf3 vf0 vf4 :mask #b1000) + (.mul.w.vf.w vf3 vf0 vf4) (.svf (&-> s5-0 move-dist quad) vf2) (.svf (&-> s5-0 bsphere quad) vf3) (let ((s4-0 (the-as object (-> this prims))) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc index 4722509ea1d..bb92c21d6c8 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc @@ -13,7 +13,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-tri gp-0) vertex)) + (-> (the-as collide-cache-tri gp-0) vertex 0) (-> (the-as collide-cache-tri gp-0) vertex 1) (-> (the-as collide-cache-tri gp-0) vertex 2) t1-0 @@ -39,7 +39,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim gp-1) prim-core)) + (-> (the-as collide-cache-prim gp-1) prim-core world-sphere) (-> (the-as collide-cache-prim gp-1) prim-core world-sphere w) t0-1 ) @@ -84,7 +84,7 @@ (vector-normalize! (-> s4-0 rvec) 1.0) (let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris)))) (countdown (s2-0 (-> *collide-cache* num-tris)) - (vector-3pt-cross! (-> s4-0 uvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) + (vector-3pt-cross! (-> s4-0 uvec) (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) (vector-normalize! (-> s4-0 uvec) 1.0) (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (-> s4-0 rvec) (-> s4-0 uvec)))) (let ((v1-9 (-> s3-1 pat))) @@ -97,7 +97,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) t1-0 @@ -107,14 +107,14 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x80) ) ) (when (-> arg0 show-normals?) - (vector+! (-> s4-0 fvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1)) + (vector+! (-> s4-0 fvec) (-> s3-1 vertex 0) (-> s3-1 vertex 1)) (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (-> s3-1 vertex 2)) (vector-float/! (-> s4-0 fvec) (-> s4-0 fvec) 3.0) (add-debug-vector @@ -131,7 +131,7 @@ (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x20 :g #x20 :b #x20 :a #x20) @@ -140,7 +140,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 0) (-> s3-1 vertex 1) (-> s3-1 vertex 2) (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x10) @@ -166,7 +166,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-prim s5-1) prim-core)) + (-> (the-as collide-cache-prim s5-1) prim-core world-sphere) (-> (the-as collide-cache-prim s5-1) prim-core world-sphere w) t0-5 ) @@ -235,7 +235,7 @@ (add-debug-box #t (bucket-id debug) - (the-as vector (-> s5-0 bbox)) + (-> s5-0 bbox min) (-> s5-0 bbox max) (if (logtest? (current-time) 128) (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc index f1d102f204c..6cea1c1d31a 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc @@ -28,14 +28,14 @@ (set! (-> s5-0 cshape) v1-3) (.lvf vf3 (&-> v1-3 trans quad)) ) - (.add.vf vf1 vf1 vf3 :mask #b111) - (.add.vf vf2 vf2 vf3 :mask #b111) + (.add.vf.xyz vf1 vf1 vf3) + (.add.vf.xyz vf2 vf2 vf3) (.svf (&-> s5-0 cache-fill-box min quad) vf1) (.svf (&-> s5-0 cache-fill-box max quad) vf2) (.lvf vf4 (&-> s5-0 spec local-within-reach-box min quad)) (.lvf vf5 (&-> s5-0 spec local-within-reach-box max quad)) - (.add.vf vf4 vf4 vf3 :mask #b111) - (.add.vf vf5 vf5 vf3 :mask #b111) + (.add.vf.xyz vf4 vf4 vf3) + (.add.vf.xyz vf5 vf5 vf3) (.ftoi.vf vf6 vf4) (.ftoi.vf vf7 vf5) (.svf (&-> s5-0 within-reach-box min quad) vf4) @@ -174,9 +174,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((f0-1 (get-best-hand-point this (-> arg1 right-hand-hold) s0-0 (the-as int s4-0)))) @@ -193,9 +193,9 @@ (.lvf vf5 (&-> v0-2 quad)) ) (.lvf vf4 (&-> sv-656 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-672 quad) vf6) (let ((f0-3 (get-best-hand-point this (-> arg1 left-hand-hold) s0-0 (the-as int s4-0)))) (if (< 491.52 f0-3) @@ -215,22 +215,14 @@ (-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal) ) (vector-normalize! - (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (-> arg1 world-vertex 0)) 1.0 ) (vector-normalize! - (vector-cross! - (the-as vector (-> arg1 hanging-matrix)) - (-> arg1 hanging-matrix fvec) - (-> arg1 hanging-matrix uvec) - ) + (vector-cross! (-> arg1 hanging-matrix rvec) (-> arg1 hanging-matrix fvec) (-> arg1 hanging-matrix uvec)) 1.0 ) - (vector-cross! - (-> arg1 hanging-matrix fvec) - (the-as vector (-> arg1 hanging-matrix)) - (-> arg1 hanging-matrix uvec) - ) + (vector-cross! (-> arg1 hanging-matrix fvec) (-> arg1 hanging-matrix rvec) (-> arg1 hanging-matrix uvec)) (vector-copy! (-> arg1 hanging-matrix trans) (-> arg1 center-hold)) (transform-vectors! (-> arg1 hanging-matrix) @@ -485,23 +477,23 @@ (.sub.vf vf4 vf1 vf2) (.sub.vf vf5 vf3 vf2) (.mul.vf vf6 vf5 vf5) - (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.add.z.vf.x vf6 vf6 vf6) (.sqrt.vf Q vf6 :ftf #b0) (nop!) (.wait.vf) (nop!) - (.add.vf vf6 vf0 Q :mask #b1) + (.add.vf.x vf6 vf0 Q) (.nop.vf) (.mov v1-1 vf6) (let ((f1-0 v1-1)) (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) (.wait.vf) (nop!) - (.add.vf vf8 vf0 Q :mask #b1) + (.add.vf.x vf8 vf0 Q) (.mul.x.vf vf9 vf5 vf8) (.mov v1-2 vf8) (.mul.vf vf10 vf9 vf4) - (.add.z.vf vf10 vf10 vf10 :mask #b1) + (.add.z.vf.x vf10 vf10 vf10) (let ((f2-0 v1-2)) (.mov v1-3 vf10) (let ((f3-0 v1-3)) @@ -515,8 +507,8 @@ ) ) ) - (.mul.x.vf vf7 vf5 vf11 :mask #b111) - (.add.vf vf7 vf7 vf2 :mask #b111) + (.mul.x.vf.xyz vf7 vf5 vf11) + (.add.vf.xyz vf7 vf7 vf2) (.svf (&-> arg1 quad) vf7) 0.0 ) @@ -528,7 +520,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (-> this world-vertex 1) (new 'static 'rgba :r #xff :a #x60) #f @@ -560,7 +552,7 @@ #t (bucket-id debug-no-zbuf1) (-> this adjacent-edge-left-vertex) - (the-as vector (-> this world-vertex)) + (-> this world-vertex 0) (new 'static 'rgba :r #x80 :a #x60) #f (the-as rgba -1) @@ -580,7 +572,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this tri-vertex)) + (-> this tri-vertex 0) (-> this world-vertex 4) (-> this world-vertex 5) (new 'static 'rgba :r #xff :a #x30) @@ -726,7 +718,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this attempts s5-1)) + (-> this attempts s5-1 vector) (meters 0.1) (new 'static 'rgba :a #x40) ) @@ -744,7 +736,7 @@ (add-debug-outline-triangle #t (bucket-id debug-no-zbuf1) - (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 0) (-> v1-3 vertex 1) (-> v1-3 vertex 2) t1-0 diff --git a/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc index 9cfa24ad715..39757d6c333 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc @@ -214,20 +214,20 @@ (.lvf vf7 (&-> s3-0 vertex 0 quad)) (.mul.vf vf6 vf4 vf4) (.lvf vf8 (&-> s3-0 vertex 1 quad)) - (.mov.vf vf1 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) (.lvf vf9 (&-> s3-0 vertex 2 quad)) - (.add.x.vf vf5 vf5 vf5 :mask #b10) + (.add.x.vf.y vf5 vf5 vf5) (&+! s3-0 96) - (.add.y.vf vf6 vf6 vf6 :mask #b1) + (.add.y.vf.x vf6 vf6 vf6) (set! f3-0 arg3) - (.add.z.vf vf5 vf5 vf5 :mask #b10) - (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.add.z.vf.y vf5 vf5 vf5) + (.add.z.vf.x vf6 vf6 vf6) (.sqrt.vf Q vf6 :ftf #b0) (.mov a2-4 vf5) (set! f0-0 0.0) (.wait.vf) (let ((f1-0 (-> arg2 w))) - (.add.vf vf6 vf0 Q :mask #b1) + (.add.vf.x vf6 vf0 Q) (.mov.vf vf10 vf6) (b! (< (the-as int a2-4) 0) cfg-6 :likely-delay (.sub.vf vf10 vf0 vf10)) (label cfg-6) @@ -242,8 +242,8 @@ (.mul.vf vf11 vf4 Q) (set! f4-0 0.707) (.mul.vf vf5 vf11 vf1) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.mov a2-7 vf5) ) ) @@ -523,11 +523,11 @@ (let ((t1-3 (* t1-2 16))) (.max.vf vf9 vf9 vf3) (let ((t2-4 (* t2-3 16))) - (.mul.x.vf acc vf0 vf7 :mask #b1000) + (.mul.x.vf.w acc vf0 vf7) (let ((t3-0 (* t0-5 16))) - (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) + (.add.mul.y.vf.w acc vf0 vf7 acc) (set! t0-4 (+ t1-3 a2-1)) - (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (.add.mul.z.vf.w vf7 vf0 vf7 acc) (set! t1-1 (+ t2-4 a2-1)) (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) (set! t2-2 (+ t3-0 a2-1)) @@ -546,7 +546,7 @@ (.svf (&-> a1-1 bbox4w min quad) vf8) (.wait.vf) (.svf (&-> a1-1 bbox4w max quad) vf9) - (.mul.vf vf6 vf6 Q :mask #b111) + (.mul.vf.xyz vf6 vf6 Q) (nop!) (nop!) (.svf (&-> a1-1 normal quad) vf6) @@ -642,13 +642,13 @@ (set! v1-0 (-> s5-0 sphere-bbox4w min quad)) (set! a0-1 (-> s5-0 sphere-bbox4w max quad)) (.sub.vf vf3 vf2 vf1) - (.mul.w.vf vf4 vf2 vf2 :mask #b1000) + (.mul.w.vf.w vf4 vf2 vf2) (.mul.vf vf3 vf3 vf3) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b10) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) + (.add.w.vf.y vf3 vf0 vf3) (.mov a1-7 vf3) (b! (>= (the-as int a1-7) 0) cfg-1 :delay (set! s4-0 (+ s4-0 96))) ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc index 8f356d8e07f..3936a6e9f7c 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc @@ -16,7 +16,7 @@ (logtest? (-> s5-0 prim-core action) (collide-action rideable)) (logtest? (-> s4-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (let ((f0-4 (- (- (vector-vector-distance (-> s5-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) (-> s5-0 prim-core world-sphere w) ) (-> s4-0 prim-core world-sphere w) @@ -49,7 +49,7 @@ (when (and (logtest? (-> s3-0 prim-core collide-with) s4-0) (logtest? (-> s3-0 prim-core action) (collide-action rideable)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> s3-0 prim-core world-sphere) (-> arg0 prim-core world-sphere)) (-> s3-0 prim-core world-sphere w) ) (-> arg0 prim-core world-sphere w) @@ -83,7 +83,7 @@ (when (and (logtest? s4-0 (-> s3-0 prim-core collide-as)) (logtest? (-> s3-0 prim-core action) (collide-action can-ride)) ) - (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s3-0 prim-core))) + (let ((f0-2 (- (- (vector-vector-distance (-> this prim-core world-sphere) (-> s3-0 prim-core world-sphere)) (-> this prim-core world-sphere w) ) (-> s3-0 prim-core world-sphere w) @@ -105,14 +105,9 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* this))) (when v1-13 (let* ((s4-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-4 (sphere-on-platform-test - s3-1 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s4-1 - (the-as vector (-> arg0 prim-core)) - (-> arg1 best-dist) - ) - ) + (f0-4 + (sphere-on-platform-test s3-1 (-> v1-13 tris 0) s4-1 (-> arg0 prim-core world-sphere) (-> arg1 best-dist)) + ) ) (when (< f0-4 (-> arg1 best-dist)) (set! (-> arg1 best-dist) f0-4) @@ -171,7 +166,7 @@ (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> s4-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> s4-0 prim-core world-sphere) *actor-list* 256) ) ) (when (logtest? s5-0 (collide-spec player-list)) @@ -192,8 +187,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> s4-0 prim-core world-sphere w))) @@ -233,8 +228,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> s4-0 prim-core world-sphere w))) @@ -390,8 +385,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-19 quad) vf1) ) (cond diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc index 02ef592ef32..5ff126756b1 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc @@ -51,15 +51,15 @@ (.lvf vf1 (&-> a0-1 prim-core world-sphere quad)) (.lvf vf2 (&-> a1-1 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf5 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf5 vf3 vf4) (let ((f0-1 0.0)) - (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.add.w.vf.x vf5 vf0 vf5) (.mov v1-3 vf5) (b! (<= f0-1 v1-3) cfg-8) ) @@ -118,15 +118,15 @@ ) ) (.sub.vf vf3 vf2 vf1) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (set! f0-0 0.0) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) ) (should-push-away-test s4-0 arg0 arg1) @@ -176,15 +176,15 @@ ) ) (.sub.vf vf3 vf2 vf1) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (set! f0-0 0.0) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) ) (should-push-away-test this (the-as collide-shape-prim s4-0) arg1) @@ -214,14 +214,7 @@ (let ((v1-4 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-4) cfg-7 :delay (empty-form)) (let ((s5-0 (new 'stack-no-clear 'collide-tri-result))) - (let ((f0-1 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-4 tris)) - s5-0 - (the-as vector (-> arg0 prim-core)) - (-> arg1 best-dist) - ) - ) + (let ((f0-1 (should-push-away-test s2-0 (-> v1-4 tris 0) s5-0 (-> arg0 prim-core world-sphere) (-> arg1 best-dist))) ) (b! (>= f0-1 (-> arg1 best-dist)) cfg-7 :delay #f) (set! (-> arg1 best-dist) f0-1) @@ -275,21 +268,21 @@ (b! (> v1-0 0) cfg-5 :delay (nop!)) (.lvf vf1 (&-> this prim-core world-sphere quad)) (.lvf vf2 (&-> arg0 prim-core world-sphere quad)) - (.sub.vf vf3 vf2 vf1 :mask #b111) - (.add.w.vf vf5 vf1 vf2 :mask #b1000) - (.mul.vf vf4 vf3 vf3 :mask #b111) - (.mul.x.vf acc vf0 vf4 :mask #b1000) - (.add.mul.y.vf acc vf0 vf4 acc :mask #b1000) - (.add.mul.z.vf vf4 vf0 vf4 acc :mask #b1000) + (.sub.vf.xyz vf3 vf2 vf1) + (.add.w.vf.w vf5 vf1 vf2) + (.mul.vf.xyz vf4 vf3 vf3) + (.mul.x.vf.w acc vf0 vf4) + (.add.mul.y.vf.w acc vf0 vf4 acc) + (.add.mul.z.vf.w vf4 vf0 vf4 acc) (.sqrt.vf Q vf4 :ftf #b11) - (.mov.vf vf3 vf0 :mask #b1000) - (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.mov.vf.w vf3 vf0) + (.add.w.vf.x vf5 vf0 vf5) (let ((f2-0 (-> arg1 best-dist))) (.wait.vf) (nop!) - (.add.vf vf4 vf0 Q :mask #b1) - (.sub.x.vf vf6 vf4 vf5 :mask #b1) - (.mul.x.vf vf3 vf3 vf4 :mask #b111) + (.add.vf.x vf4 vf0 Q) + (.sub.x.vf.x vf6 vf4 vf5) + (.mul.x.vf.xyz vf3 vf3 vf4) (.mov v1-3 vf6) (let ((f1-0 v1-3)) (b! (<= f2-0 f1-0) cfg-9) @@ -306,7 +299,7 @@ (s4-1 (-> arg1 best-other-tri intersect)) ) (vector-float*! s4-1 s3-0 (-> this prim-core world-sphere w)) - (vector+! s4-1 s4-1 (the-as vector (-> this prim-core))) + (vector+! s4-1 s4-1 (-> this prim-core world-sphere)) (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 quad)) (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s4-1 s3-0) (let* ((a0-8 (vector-normalize! @@ -326,9 +319,9 @@ ) (.lvf vf5 (&-> v1-11 quad)) (.lvf vf4 (&-> s4-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-9 quad) vf6) ) ) @@ -339,25 +332,20 @@ (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg0)))) (when v1-13 (let* ((s3-1 (new 'stack-no-clear 'collide-tri-result)) - (f0-3 (should-push-away-test - s2-0 - (the-as collide-mesh-cache-tri (-> v1-13 tris)) - s3-1 - (the-as vector (-> this prim-core)) - (-> arg1 best-dist) - ) - ) + (f0-3 + (should-push-away-test s2-0 (-> v1-13 tris 0) s3-1 (-> this prim-core world-sphere) (-> arg1 best-dist)) + ) ) (when (< f0-3 (-> arg1 best-dist)) (set! (-> arg1 best-dist) f0-3) (set! (-> arg1 best-my-prim) this) (set! (-> arg1 best-other-prim) arg0) (let ((s4-2 (-> arg1 best-other-tri normal))) - (vector-! s4-2 (-> s3-1 intersect) (the-as vector (-> this prim-core))) + (vector-! s4-2 (-> s3-1 intersect) (-> this prim-core world-sphere)) (vector-normalize! s4-2 1.0) (let ((s3-2 (-> arg1 best-other-tri intersect))) (vector-float*! s3-2 s4-2 (-> this prim-core world-sphere w)) - (vector+! s3-2 s3-2 (the-as vector (-> this prim-core))) + (vector+! s3-2 s3-2 (-> this prim-core world-sphere)) (set! (-> arg1 best-other-tri vertex 0 quad) (-> s3-2 quad)) (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s3-2 s4-2) (let* ((a0-23 (vector-normalize! @@ -377,9 +365,9 @@ ) (.lvf vf5 (&-> v1-23 quad)) (.lvf vf4 (&-> s3-2 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-24 quad) vf6) ) ) @@ -979,7 +967,7 @@ (move-by-vector! arg0 a1-1) ) (react-to-pat! arg0 (-> arg1 best-other-tri pat)) - (vector-! sv-48 (the-as vector (-> arg1 best-my-prim prim-core)) (-> arg1 best-other-tri intersect)) + (vector-! sv-48 (-> arg1 best-my-prim prim-core world-sphere) (-> arg1 best-other-tri intersect)) (cond ((and (= (-> arg1 best-dist) 0.0) (< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w))) @@ -1204,8 +1192,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) (t9-0 this v1-1) ) @@ -1433,8 +1421,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-4 quad) vf1) ) (set! (-> this prev-status) (-> this status)) @@ -1567,8 +1555,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a1-5 quad) vf1) (t9-1 this a1-5) ) @@ -1937,8 +1925,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-1 quad) vf1) ) (fill-cache-for-shape this (+ (vector-length v1-0) arg2) arg1) @@ -1987,21 +1975,21 @@ (a2-1 (-> v1-0 prim-core prim-type)) ) (b! (zero? a0-2) cfg-9 :delay (.lvf vf28 (&-> t0-0 quad))) - (.add.x.vf vf31 vf31 vf28 :mask #b1) + (.add.x.vf.x vf31 vf31 vf28) (let ((a0-3 (-> v1-0 specific 0))) (b! (zero? a2-1) cfg-3 :delay (.lvf vf24 (&-> v1-0 prim-core world-sphere quad))) - (.add.w.vf vf25 vf31 vf24 :mask #b1) - (.add.x.vf vf30 vf24 vf25 :mask #b111) - (b! #t cfg-10 :delay (.sub.x.vf vf29 vf24 vf25 :mask #b111)) + (.add.w.vf.x vf25 vf31 vf24) + (.add.x.vf.xyz vf30 vf24 vf25) + (b! #t cfg-10 :delay (.sub.x.vf.xyz vf29 vf24 vf25)) (label cfg-3) (b! (zero? a0-3) cfg-9 :delay (set! v1-0 (+ v1-0 80))) (+! a0-3 -1) (let ((a2-3 (logand (-> v1-0 prim-core collide-with) arg2))) (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) - (b! (zero? a2-3) cfg-3 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + (b! (zero? a2-3) cfg-3 :delay (.add.w.vf.x vf25 vf31 vf24)) ) - (.add.x.vf vf30 vf24 vf25 :mask #b111) - (.sub.x.vf vf29 vf24 vf25 :mask #b111) + (.add.x.vf.xyz vf30 vf24 vf25) + (.sub.x.vf.xyz vf29 vf24 vf25) (label cfg-6) (b! (zero? a0-3) cfg-10 :delay (set! v1-0 (+ v1-0 80))) (+! a0-3 -1) @@ -2009,11 +1997,11 @@ ) (let ((a2-5 (logand (-> v1-0 prim-core collide-with) arg2))) (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) - (b! (zero? a2-5) cfg-6 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + (b! (zero? a2-5) cfg-6 :delay (.add.w.vf.x vf25 vf31 vf24)) ) ) - (.add.x.vf vf27 vf24 vf25 :mask #b111) - (.sub.x.vf vf26 vf24 vf25 :mask #b111) + (.add.x.vf.xyz vf27 vf24 vf25) + (.sub.x.vf.xyz vf26 vf24 vf25) (.min.vf vf29 vf29 vf26) (.max.vf vf30 vf30 vf27) (b! #t cfg-6 :delay (nop!)) @@ -2021,8 +2009,8 @@ (let ((v0-0 #f)) (b! #t cfg-11 :delay (nop!)) (label cfg-10) - (.mov.vf vf29 vf0 :mask #b1000) - (.mov.vf vf30 vf0 :mask #b1000) + (.mov.vf.w vf29 vf0) + (.mov.vf.w vf30 vf0) (.svf (&-> arg0 min quad) vf29) (.svf (&-> arg0 max quad) vf30) (set! v0-0 #t) @@ -2185,8 +2173,8 @@ (.lvf vf4 (&-> a1-4 fvec quad)) ) (.add.mul.y.vf acc vf3 vf1 acc) - (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) - (.mul.vf vf1 vf1 Q :mask #b111) + (.add.mul.z.vf.xyz vf1 vf4 vf1 acc) + (.mul.vf.xyz vf1 vf1 Q) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov a1-5 vf1) ) @@ -2194,7 +2182,7 @@ (when (= a1-0 -2) (.lvf vf1 (&-> s5-0 local-sphere quad)) (.lvf vf2 (&-> this trans quad)) - (.add.vf vf1 vf1 vf2 :mask #b111) + (.add.vf.xyz vf1 vf1 vf2) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov a1-7 vf1) ) @@ -2210,14 +2198,14 @@ ((-3) (let ((s3-0 (new 'stack-no-clear 'vector))) (vector-orient-by-quat! s3-0 (-> s5-0 local-sphere) (-> this quat)) - (vector+! (the-as vector (-> s5-0 prim-core)) s3-0 (-> this trans)) + (vector+! (-> s5-0 prim-core world-sphere) s3-0 (-> this trans)) ) (set! (-> s5-0 prim-core world-sphere w) (-> s5-0 local-sphere w)) ) ((-2) (.lvf vf1 (&-> s5-0 local-sphere quad)) (.lvf vf2 (&-> this trans quad)) - (.add.vf vf1 vf1 vf2 :mask #b111) + (.add.vf.xyz vf1 vf1 vf2) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov v1-8 vf1) ) @@ -2238,7 +2226,7 @@ (vector+! (-> this trans) (-> this trans) arg0) (let ((v1-1 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> v1-1 prim-core)) (the-as vector (-> v1-1 prim-core)) arg0) + (vector+! (-> v1-1 prim-core world-sphere) (-> v1-1 prim-core world-sphere) arg0) (set! (-> v1-1 prim-core world-sphere w) (-> v1-1 local-sphere w)) (&+! v1-1 80) ) @@ -2256,7 +2244,7 @@ (vector-copy! (-> this trans) arg0) (let ((a1-2 (-> this root-prim))) (countdown (a0-1 (-> this total-prims)) - (vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0) + (vector+! (-> a1-2 prim-core world-sphere) (-> a1-2 prim-core world-sphere) v1-0) (set! (-> a1-2 prim-core world-sphere w) (-> a1-2 local-sphere w)) (&+! a1-2 80) ) @@ -2380,7 +2368,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :r #xff :g #xff :b #xff :a #x40) ) @@ -2394,7 +2382,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (cond ((and (zero? (-> this prim-core collide-as)) (zero? (-> this prim-core collide-with))) @@ -2418,7 +2406,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :b #xff :a #x40) ) @@ -2432,7 +2420,7 @@ (add-debug-sphere #t (bucket-id debug) - (the-as vector (-> this prim-core)) + (-> this prim-core world-sphere) (-> this local-sphere w) (new 'static 'rgba :g #xff :a #x10) ) @@ -2462,7 +2450,7 @@ (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> this root-prim prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> this root-prim prim-core world-sphere) *actor-list* 256) ) ) (when (logtest? s4-0 (collide-spec player-list)) @@ -2483,8 +2471,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this root-prim prim-core world-sphere w))) @@ -2524,8 +2512,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-15 world-sphere w) (-> this root-prim prim-core world-sphere w))) @@ -2583,8 +2571,8 @@ (.lvf vf5 (&-> (-> gp-0 cquery) best-other-tri normal quad)) (.sub.vf vf2 vf4 vf3) (.mul.vf vf1 vf5 vf2) - (.add.x.vf vf1 vf1 vf1 :mask #b10) - (.add.z.vf vf1 vf1 vf1 :mask #b10) + (.add.x.vf.y vf1 vf1 vf1) + (.add.z.vf.y vf1 vf1 vf1) (.mov v1-55 vf1) (b! (< (the-as int v1-55) 0) cfg-35 :likely-delay (.sub.vf vf2 vf0 vf2)) (label cfg-35) @@ -2597,8 +2585,8 @@ (.mov at-0 f0-7) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-59 quad) vf1) ) (let ((s0-0 (-> (the-as collide-shape-moving s1-0) status))) @@ -2644,7 +2632,7 @@ (set! *actor-list-length* 0) (b! (not (logtest? (the-as collide-spec s2-0) 512)) cfg-2 :delay (empty-form)) (set! *actor-list-length* - (fill-actor-list-for-box *actor-hash* (the-as vector (-> s3-0 prim-core)) *actor-list* 256) + (fill-actor-list-for-box *actor-hash* (-> s3-0 prim-core world-sphere) *actor-list* 256) ) (label cfg-2) (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) @@ -2665,8 +2653,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-3 world-sphere w) (-> s3-0 prim-core world-sphere w))) @@ -2706,8 +2694,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-15 world-sphere w) (-> s3-0 prim-core world-sphere w))) @@ -2738,15 +2726,15 @@ (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) (.lvf vf2 (&-> a2-15 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (let ((v1-28 (-> this process))) (.mov a0-10 vf3) (let ((a1-26 (-> s0-0 process))) @@ -2823,15 +2811,15 @@ (.lvf vf2 (&-> s4-0 prim-core world-sphere quad)) (b! (zero? a0-2) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) ) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-0 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-3 vf3) (b! (< f0-0 a0-3) cfg-1) ) @@ -2882,15 +2870,15 @@ (.lvf vf1 (&-> s4-0 prim-core world-sphere quad)) (b! (zero? a0-3) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) ) - (.add.w.vf vf4 vf2 vf1 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf2 vf1) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-0 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-4 vf3) (b! (< f0-0 a0-4) cfg-1) ) @@ -2927,7 +2915,7 @@ (b! (not s2-0) cfg-10 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg1)))) (when v1-5 - (when (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> this prim-core))) + (when (overlap-test s2-0 (-> v1-5 tris 0) (-> this prim-core world-sphere)) (b! #t cfg-11 :delay (nop!)) (the-as none 0) ) @@ -2971,11 +2959,7 @@ (b! (not s2-0) cfg-9 :delay (empty-form)) (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* this))) (b! (not v1-5) cfg-9 :delay (empty-form)) - (b! - (not (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> arg1 prim-core)))) - cfg-9 - :delay (empty-form) - ) + (b! (not (overlap-test s2-0 (-> v1-5 tris 0) (-> arg1 prim-core world-sphere))) cfg-9 :delay (empty-form)) ) ) (b! #t cfg-12 :delay (nop!)) @@ -3056,8 +3040,8 @@ (.lvf vf5 (&-> a0-7 world-sphere quad)) ) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-176 quad) vf6) (vector-normalize! sv-176 1.0) (when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech)) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc index 9cc8d4a5c44..6d959ec8a99 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc @@ -507,17 +507,14 @@ (defmethod touching-prims-entry-method-9 ((this touching-prims-entry) (arg0 vector)) (let* ((s4-0 (-> this prim1 cprim)) (v1-0 (-> this prim2 cprim)) - (gp-1 (vector-! - (new 'stack-no-clear 'vector) - (the-as vector (-> v1-0 prim-core)) - (the-as vector (-> s4-0 prim-core)) - ) - ) + (gp-1 + (vector-! (new 'stack-no-clear 'vector) (-> v1-0 prim-core world-sphere) (-> s4-0 prim-core world-sphere)) + ) ) (let ((f1-2 (- (- (vector-length gp-1) (-> v1-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (/ f1-2 2))) ) - (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + (vector+! arg0 gp-1 (-> s4-0 prim-core world-sphere)) ) arg0 ) @@ -527,7 +524,7 @@ (let ((v1-0 (-> this prim1 cprim)) (a2-0 (-> this prim2 cprim)) ) - (vector+! arg0 (the-as vector (-> a2-0 prim-core)) (the-as vector (-> v1-0 prim-core))) + (vector+! arg0 (-> a2-0 prim-core world-sphere) (-> v1-0 prim-core world-sphere)) ) (vector-float*! arg0 arg0 0.5) arg0 diff --git a/test/decompiler/reference/jak3/engine/collide/find-nearest_REF.gc b/test/decompiler/reference/jak3/engine/collide/find-nearest_REF.gc index 3f0f2ddb999..9d7dfb9075b 100644 --- a/test/decompiler/reference/jak3/engine/collide/find-nearest_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/find-nearest_REF.gc @@ -363,9 +363,9 @@ (.mov vf3 v1-54) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-752 quad) vf4) (let ((f26-2 (* f26-1 (tan (-> gp-0 rot-range)))) (t9-10 vector-vector-distance) diff --git a/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc b/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc index 738af0674ae..172ae251a23 100644 --- a/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc @@ -92,8 +92,8 @@ (let ((s2-1 (new 'stack-no-clear 'vector))) (.lvf vf4 (&-> arg1 quad)) (.lvf vf5 (&-> sv-592 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> s2-1 quad) vf6) (let ((f30-0 (vector-length s2-1))) (let ((f0-0 (los-control-method-13 this s0-2 s2-1 -2 arg3))) diff --git a/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc b/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc index 70da1b35fb9..782b432f92e 100644 --- a/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc @@ -13,9 +13,9 @@ (nop!) (nop!) (.lvf vf1 (&-> arg0 bsphere quad)) - (.add.w.vf vf2 vf1 vf1 :mask #b111) + (.add.w.vf.xyz vf2 vf1 vf1) (let ((v1-0 (-> arg1 min quad))) - (.sub.w.vf vf1 vf1 vf1 :mask #b111) + (.sub.w.vf.xyz vf1 vf1 vf1) (let ((a1-1 (-> arg1 max quad))) (.ftoi.vf vf4 vf2) (nop!) @@ -114,13 +114,13 @@ (nop!) (vitof12.xyzw vf7 vf7) (nop!) - (.add.vf vf8 vf8 vf9 :mask #b111) + (.add.vf.xyz vf8 vf8 vf9) (nop!) (nop!) (.lvf vf9 (&-> arg0 bsphere quad)) (vitof12.xyzw vf10 vf10) (nop!) - (.mul.w.vf vf10 vf10 vf9 :mask #b1) + (.mul.w.vf.x vf10 vf10 vf9) (nop!) (.mul.x.vf acc vf5 vf9) (nop!) @@ -130,9 +130,9 @@ (let ((a1-1 (-> arg2 max quad))) (.add.mul.w.vf vf1 vf8 vf0 acc) (nop!) - (.add.x.vf vf2 vf1 vf10 :mask #b111) + (.add.x.vf.xyz vf2 vf1 vf10) (nop!) - (.sub.x.vf vf1 vf1 vf10 :mask #b111) + (.sub.x.vf.xyz vf1 vf1 vf10) (nop!) (.ftoi.vf vf4 vf2) (nop!) @@ -181,11 +181,11 @@ (.mov vf12 v1-2) (.itof.vf vf12 vf12) (nop!) - (.add.vf vf10 vf10 vf12 :mask #b111) + (.add.vf.xyz vf10 vf10 vf12) (nop!) - (.add.vf vf9 vf9 vf10 :mask #b111) + (.add.vf.xyz vf9 vf9 vf10) (nop!) - (.add.w.vf vf11 vf0 vf9 :mask #b1) + (.add.w.vf.x vf11 vf0 vf9) (nop!) (.mov a3-0 vf11) (nop!) diff --git a/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc index 9c1c6e1c2df..cfa26ec5c5c 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc @@ -2116,14 +2116,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc index 0391eb33a91..47c109727b3 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc @@ -425,7 +425,7 @@ (ja-post) ) (if (nonzero? s5-0) - (spawn s5-0 (the-as vector s4-0)) + (spawn s5-0 (-> s4-0 world-sphere)) ) ) (if (nonzero? (-> this sound)) @@ -641,7 +641,7 @@ (let ((a0-5 (-> self root root-prim prim-core)) (a1-2 (-> (the-as collide-shape v1-1) root-prim prim-core)) ) - (when (< (vector-vector-distance (the-as vector a0-5) (the-as vector a1-2)) (-> *FACT-bank* suck-suck-dist)) + (when (< (vector-vector-distance (-> a0-5 world-sphere) (-> a1-2 world-sphere)) (-> *FACT-bank* suck-suck-dist)) (logior! (-> self flags) (collectable-flag suck-in)) #t ) @@ -671,9 +671,9 @@ (gp-1 (get-trans s4-0 3)) ) (if (and arg1 (rand-vu-percent? 0.25)) - (eco-blue-glow (the-as vector s1-1)) + (eco-blue-glow (-> s1-1 world-sphere)) ) - (let ((f0-0 (vector-vector-distance (the-as vector s1-1) gp-1))) + (let ((f0-0 (vector-vector-distance (-> s1-1 world-sphere) gp-1))) (cond ((and arg3 (< f0-0 8192.0)) (return #t) @@ -725,7 +725,7 @@ (go-virtual wait) ) (arg1 - (add-blue-shake (-> self root trans) (the-as vector s1-1) gp-1) + (add-blue-shake (-> self root trans) (-> s1-1 world-sphere) gp-1) ) ) ) @@ -1660,7 +1660,7 @@ (a1-1 (-> this root root-prim prim-core)) ) (if (nonzero? a0-7) - (spawn a0-7 (the-as vector a1-1)) + (spawn a0-7 (-> a1-1 world-sphere)) ) ) (ja-post) @@ -1882,7 +1882,7 @@ (a1-3 (-> this draw skeleton bones 3)) ) (if (nonzero? a0-7) - (spawn-from-mat a0-7 (the-as matrix a1-3)) + (spawn-from-mat a0-7 (-> a1-3 transform)) ) ) 0 diff --git a/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc index dd924515dfc..6ffb9531180 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc @@ -905,7 +905,7 @@ (when v1-4 (let* ((gp-2 (-> self root root-prim prim-core)) (a1-3 (-> (the-as collide-shape v1-4) root-prim prim-core)) - (f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3))) + (f30-0 (vector-vector-distance (-> gp-2 world-sphere) (-> a1-3 world-sphere))) ) (when (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (!= (-> self defense) 'steel)) (logior! (-> self fact options) (actor-option suck-in)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc index d577ed281a4..6563fc4438a 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc @@ -253,8 +253,8 @@ (dotimes (i (the-as int (-> debris-box num))) (let ((debris (-> this debris (+ i (-> debris-box start))))) (if (zero? i) - (set-to-point! (-> debris-box bbox) (the-as vector (-> debris root))) - (add-point! (-> debris-box bbox) (the-as vector (-> debris root))) + (set-to-point! (-> debris-box bbox) (-> debris root trans)) + (add-point! (-> debris-box bbox) (-> debris root trans)) ) ) ) @@ -295,7 +295,7 @@ (set! (-> a2-0 y) 4096.0) (set! (-> a2-0 z) 4096.0) (set! (-> a2-0 w) 1.0) - (vector-! (the-as vector a3-0) a1-2 a2-0) + (vector-! (-> a3-0 min) a1-2 a2-0) ) (let ((a1-3 (-> cquery bbox max)) (a0-2 (-> bbox max)) @@ -324,7 +324,7 @@ ) (vector-copy! (-> s1-0 prev-pos) (-> s1-0 root trans)) (+! (-> s1-0 transv y) f0-9) - (vector-v+! (the-as vector (-> s1-0 root)) (the-as vector (-> s1-0 root)) (-> s1-0 transv)) + (vector-v+! (-> s1-0 root trans) (-> s1-0 root trans) (-> s1-0 transv)) (quaternion-vector-angle! s0-0 (-> s1-0 rot-axis) (* (-> s1-0 rot-angle) (seconds-per-frame))) (quaternion*! (-> s1-0 root quat) (-> s1-0 root quat) s0-0) ) @@ -332,7 +332,7 @@ (set! (-> s1-0 rot-angle) (- (-> s1-0 rot-angle) (* (seconds-per-frame) (-> s1-0 rot-angle)))) (when (nonzero? (-> s1-0 params collide-spec)) (let ((s0-1 (new 'stack-no-clear 'vector))) - (vector-! (-> cquery move-dist) (the-as vector (-> s1-0 root)) (-> s1-0 prev-pos)) + (vector-! (-> cquery move-dist) (-> s1-0 root trans) (-> s1-0 prev-pos)) (vector-copy! (-> cquery start-pos) (-> s1-0 prev-pos)) (let ((v1-34 cquery)) (set! (-> v1-34 radius) 2048.0) @@ -356,9 +356,9 @@ ) (.lvf vf4 (&-> v1-37 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) (let* ((v1-38 (-> s1-0 transv)) @@ -418,7 +418,7 @@ (draw-ctrl (-> self debris i draw)) ) (matrix<-transformq+trans! - (the-as matrix (-> draw-ctrl skeleton bones 3)) + (-> draw-ctrl skeleton bones 3 transform) (-> debris root) (-> draw-ctrl skeleton bones 0 transform trans) ) @@ -552,10 +552,10 @@ (set! (-> debris params) params) (let ((joint-transform (-> pdraw node-list data (-> params joints i parent-joint-index) bone transform))) (matrix->quaternion (-> debris root quat) joint-transform) - (matrix->trans joint-transform (the-as vector (-> debris root))) + (matrix->trans joint-transform (-> debris root trans)) (vector-copy! (-> debris root scale) (-> pdraw root scale)) (if (nonzero? (-> params joints i offset)) - (vector-matrix*! (the-as vector (-> debris root)) (-> params joints i offset) joint-transform) + (vector-matrix*! (-> debris root trans) (-> params joints i offset) joint-transform) ) ) (set! debris-scale (-> debris root scale)) @@ -568,12 +568,12 @@ (.lvf vf4 (&-> s0-1 quad)) ) (.lvf vf5 (&-> tuning-scale quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.vf vf6 vf4 vf5 :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.vf.xyz vf6 vf4 vf5) (.svf (&-> debris-scale quad) vf6) (case (-> tuning explosion) ((1) - (vector-! (-> debris transv) (the-as vector (-> debris root)) (-> tuning fountain-rand-transv-lo)) + (vector-! (-> debris transv) (-> debris root trans) (-> tuning fountain-rand-transv-lo)) (let ((s0-2 vector-normalize!)) (set! sv-80 (-> debris transv)) (let ((a1-17 (rand-vu-float-range (-> tuning fountain-rand-transv-hi x) (-> tuning fountain-rand-transv-hi y)))) diff --git a/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc index 29278cb5259..6dfac3dae4b 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc @@ -189,7 +189,7 @@ (when (< 0.0 f0-5) (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) (vector+! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s5-0 start-pos)) - (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (the-as vector (-> s4-0 prim-core))) + (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s4-0 prim-core world-sphere)) (move-by-vector! (-> gp-0 control) (-> s5-0 move-dist)) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/gem-pool_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/gem-pool_REF.gc index fb41be22428..b6ecdcd61dc 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/gem-pool_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/gem-pool_REF.gc @@ -43,12 +43,12 @@ ) ((= v1-0 1) (let ((a1-1 (task-perm-by-index *game-info* 6))) - (compare-gems arg0 (the-as (pointer float) a1-1)) + (compare-gems arg0 (-> a1-1 user-float)) ) ) ((= v1-0 2) (let ((a1-3 (task-perm-by-index *game-info* 41))) - (compare-gems arg0 (the-as (pointer float) a1-3)) + (compare-gems arg0 (-> a1-3 user-float)) ) ) (else diff --git a/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc index c0c4e1d4a24..4cc6014c643 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc @@ -161,7 +161,7 @@ ) (let ((s4-0 (-> (the-as process-drawable v1-15) node-list data (-> this joint-track)))) (vector<-cspace! s5-1 s4-0) - (vector-normalize-copy! (-> this dir) (the-as vector (-> s4-0 bone transform)) 1.0) + (vector-normalize-copy! (-> this dir) (-> s4-0 bone transform rvec) 1.0) ) (move-to-point! (the-as collide-shape (-> this root)) s5-1) ) @@ -3572,7 +3572,7 @@ (logtest? (-> s2-0 prim-core action) (collide-action solid)) (logtest? (-> s2-0 prim-core collide-as) arg2) ) - (set! (-> s3-0 y) (vector-vector-distance arg1 (the-as vector (-> s2-0 prim-core)))) + (set! (-> s3-0 y) (vector-vector-distance arg1 (-> s2-0 prim-core world-sphere))) (set! (-> s3-0 y) (fmax 0.0 (- (-> s3-0 y) (-> s2-0 prim-core world-sphere w)))) (when (< (-> s3-0 y) (-> s3-0 x)) (set! (-> s3-0 x) (-> s3-0 y)) @@ -3735,7 +3735,7 @@ ((and (nonzero? s4-0) (type? s4-0 collide-shape)) (vector+! arg1 - (the-as vector (-> (the-as collide-shape s4-0) root-prim prim-core)) + (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere) (rand-vu-sphere-point! arg1 (-> (the-as collide-shape s4-0) root-prim prim-core world-sphere w)) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc index c9adee09ef4..448abfcc7bd 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc @@ -391,9 +391,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 850 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 850 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc index 996799fd7ac..afc5c8bce05 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc @@ -386,9 +386,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 863 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 863 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) @@ -764,7 +764,7 @@ ) 0.0 (vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere)) - (vector-! (-> a1-3 move-dist) (the-as vector (-> s4-1 root-prim prim-core)) (-> a1-3 start-pos)) + (vector-! (-> a1-3 move-dist) (-> s4-1 root-prim prim-core world-sphere) (-> a1-3 start-pos)) (let ((v1-6 a1-3)) (set! (-> v1-6 radius) 40.96) (set! (-> v1-6 collide-with) (collide-spec backgnd)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc index 4261cfa9109..3ede4c71d85 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc @@ -221,8 +221,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-1 quad) vf1) ) (let ((v1-2 a1-0)) diff --git a/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc index 3196a5c58c7..25c950f6a24 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc @@ -162,9 +162,9 @@ (.lvf vf5 (&-> a1-4 quad)) ) (.lvf vf4 (&-> v1-15 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (let ((v1-16 *particle-vel*) diff --git a/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc index 491c098a7d4..8226f079aa7 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc @@ -169,9 +169,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) 0 @@ -202,9 +202,9 @@ (.lvf vf5 (&-> v1-22 quad)) (.lvf vf4 (&-> a0-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) ) @@ -229,7 +229,7 @@ (let ((t9-5 vector-segment-distance-point!) (a3-2 s4-1) ) - (t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2) + (t9-5 s5-0 s0-1 (-> sv-224 start) a3-2) ) (set! (-> arg0 trans y) (-> s4-1 y)) ) @@ -301,9 +301,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-13 quad) vf6) ) 0 @@ -321,9 +321,9 @@ (.lvf vf5 (&-> a0-17 quad)) ) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-16 quad) vf6) ) 0 @@ -383,8 +383,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) @@ -425,8 +425,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) @@ -456,15 +456,15 @@ (.lvf vf1 (&-> this collide-bounds quad)) (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-10 vf3) (let ((s4-0 (-> v1-23 process))) (b! (< f0-2 a0-10) cfg-30) @@ -545,7 +545,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-22 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc index a8bb0c1880f..ec81cd5783e 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc @@ -310,7 +310,7 @@ ) ((begin (vector-copy! (-> this top 1) (-> this top 0)) - (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (vector<-cspace! (-> this top 0) (-> this process node-list data (-> this joint-index))) (+! (-> this top 0 y) (-> this top-y-offset)) (vector-copy! (-> this bottom 1) (-> this bottom 0)) (set! (-> this bottom 0 quad) (-> this process control trans quad)) diff --git a/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc index 3200692606c..83ffd27cd21 100644 --- a/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc +++ b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc @@ -845,21 +845,18 @@ (let ((s4-3 (the-as object (-> *collide-cache* tris)))) (countdown (s3-2 (-> *collide-cache* num-tris)) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance - (the-as vector (-> s5-1 prim-core)) - (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) - ) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 0)) ) (add-debug-x #t (bucket-id debug-no-zbuf1) - (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + (-> (the-as collide-cache-tri s4-3) vertex 0) (new 'static 'rgba :r #xff :g #xff :a #x80) ) (set! gp-1 (the-as int (the-as uint #x800000ff))) ) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1)) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 1)) ) (add-debug-x #t @@ -870,7 +867,7 @@ (set! gp-1 (the-as int (the-as uint #x800000ff))) ) (when (< (-> s5-1 prim-core world-sphere w) - (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2)) + (vector-vector-distance (-> s5-1 prim-core world-sphere) (-> (the-as collide-cache-tri s4-3) vertex 2)) ) (add-debug-x #t @@ -893,7 +890,7 @@ (add-debug-sphere #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere) (-> s5-1 prim-core world-sphere w) (the-as rgba gp-1) ) diff --git a/test/decompiler/reference/jak3/engine/debug/debug_REF.gc b/test/decompiler/reference/jak3/engine/debug/debug_REF.gc index 58af9cee4e1..4f048c2fc55 100644 --- a/test/decompiler/reference/jak3/engine/debug/debug_REF.gc +++ b/test/decompiler/reference/jak3/engine/debug/debug_REF.gc @@ -34,10 +34,10 @@ (.add.mul.z.vf vf5 vf3 vf5 acc) (.div.vf Q vf9 vf5 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf5 vf5 Q :mask #b111) + (.mul.vf.xyz vf5 vf5 Q) (.add.vf vf5 vf5 vf8) - (.max.x.vf vf5 vf5 vf0 :mask #b1000) - (.min.x.vf vf5 vf5 vf6 :mask #b1000) + (.max.x.vf.w vf5 vf5 vf0) + (.min.x.vf.w vf5 vf5 vf6) (vftoi4.xyzw vf5 vf5) (.svf (&-> dst-gs-screen-pt quad) vf5) dst-gs-screen-pt @@ -56,7 +56,7 @@ ) (vector-copy! a1-2 pt) (set! (-> a1-2 w) 1.0) - (when (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-2) + (when (transform-point-qword! (-> s5-0 vector 0) a1-2) (with-dma-buffer-add-bucket ((v1-11 (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -195,9 +195,7 @@ (when (debug-line-clip? sv-128 sv-144 p0 sv-112) (set! (-> sv-128 w) 1.0) (set! (-> sv-144 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s4-0 vector)) sv-128) - (transform-point-qword! (-> s4-0 vector 1) sv-144) - ) + (when (and (transform-point-qword! (-> s4-0 vector 0) sv-128) (transform-point-qword! (-> s4-0 vector 1) sv-144)) (with-dma-buffer-add-bucket ((v1-37 (-> *display* frames (-> *display* on-screen) debug-buf)) bucket ) @@ -381,7 +379,7 @@ (set! (-> a1-3 w) 1.0) (set! (-> s2-0 w) 1.0) (set! (-> s1-0 w) 1.0) - (when (and (transform-point-qword! (the-as vector4w (-> s5-0 vector)) a1-3) + (when (and (transform-point-qword! (-> s5-0 vector 0) a1-3) (transform-point-qword! (-> s5-0 vector 1) s2-0) (transform-point-qword! (-> s5-0 vector 2) s1-0) ) @@ -1496,9 +1494,9 @@ (.lvf vf5 (&-> v1-4 quad)) ) (.lvf vf4 (&-> arg3 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) (let ((s1-1 (logior (logior (logior (shr (shl (the int (* 128.0 (-> arg2 color w))) 56) 32) (shr (shl (the int (* 128.0 (-> arg2 color z))) 56) 40) diff --git a/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc b/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc index 048e7ae86f1..b7f3cb386a4 100644 --- a/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc +++ b/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc @@ -95,9 +95,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) (set! sv-160 0) (while (< sv-160 8) @@ -114,9 +114,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-224 quad) vf6) (set! sv-256 (new 'stack-no-clear 'vector)) (set! sv-240 s0-0) @@ -131,9 +131,9 @@ (.lvf vf5 (&-> v1-22 quad)) ) (.lvf vf4 (&-> sv-240 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-256 quad) vf6) (set! sv-288 (new 'stack-no-clear 'vector)) (set! sv-272 s0-0) @@ -151,9 +151,9 @@ (.lvf vf5 (&-> v1-29 quad)) ) (.lvf vf4 (&-> sv-272 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-288 quad) vf6) (let ((t1-0 arg4)) (sv-176 sv-192 (the-as bucket-id sv-208) sv-224 sv-256 sv-288 t1-0) @@ -197,22 +197,17 @@ (let* ((v0-1 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0) ) - (s4-0 (< (fabs (vector-dot v0-1 (the-as vector (-> this mat)))) 0.9)) + (s4-0 (< (fabs (vector-dot v0-1 (-> this mat rvec))) 0.9)) (s3-0 (< (fabs (vector-dot v0-1 (-> this mat uvec))) 0.9)) (s2-0 (< (fabs (vector-dot v0-1 (-> this mat fvec))) 0.9)) (f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s5-0))) ) (if s4-0 - (draw-axis - s5-0 - (the-as vector (-> this mat)) - f30-1 - (/ f30-1 4) - (if (= (-> this action) (manipulator-action ma1)) - *color-yellow* - *color-red* - ) - ) + (draw-axis s5-0 (-> this mat rvec) f30-1 (/ f30-1 4) (if (= (-> this action) (manipulator-action ma1)) + *color-yellow* + *color-red* + ) + ) ) (if s3-0 (draw-axis s5-0 (-> this mat uvec) f30-1 (/ f30-1 4) (if (= (-> this action) (manipulator-action ma2)) @@ -240,7 +235,7 @@ (let ((v1-26 s5-0)) (let ((a0-13 (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> *math-camera* inv-camera-rot)) + (-> *math-camera* inv-camera-rot rvec) (-> *math-camera* inv-camera-rot uvec) ) ) @@ -252,9 +247,9 @@ ) (.lvf vf4 (&-> v1-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (let ((a0-14 s0-0)) @@ -267,9 +262,9 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-14 quad) vf6) ) (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) @@ -284,9 +279,9 @@ ) (.lvf vf4 (&-> v1-29 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-18 quad) vf6) ) (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) @@ -301,9 +296,9 @@ ) (.lvf vf4 (&-> v1-31 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-22 quad) vf6) ) (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) @@ -318,9 +313,9 @@ ) (.lvf vf4 (&-> v1-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-26 quad) vf6) ) ) @@ -345,9 +340,9 @@ ) (.lvf vf4 (&-> v1-36 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-20 quad) vf6) ) (let ((s0-1 draw-axis)) @@ -383,7 +378,7 @@ (when s2-0 (let ((a1-25 s1-1)) (let ((v1-44 s5-0)) - (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat fvec)))) + (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat fvec)))) (let ((a2-24 f30-1)) (.mov vf7 a2-24) ) @@ -391,14 +386,14 @@ ) (.lvf vf4 (&-> v1-44 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-25 quad) vf6) ) (draw-axis s1-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat rvec)) (* 0.15 f30-1) (* 0.15 f30-1) (if (= (-> this action) (manipulator-action ma5)) @@ -420,21 +415,21 @@ (set! s3-0 (and s4-0 s3-0)) (when s3-0 (let ((a0-44 s1-1)) - (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat uvec)))) + (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (-> this mat rvec) (-> this mat uvec)))) (let ((a1-31 f30-1)) (.mov vf7 a1-31) ) (.lvf vf5 (&-> v1-52 quad)) ) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-44 quad) vf6) ) (draw-axis s1-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat rvec)) (* 0.15 f30-1) (* 0.15 f30-1) (if (= (-> this action) (manipulator-action ma4)) @@ -517,7 +512,7 @@ ) ((= (-> this action) (manipulator-action ma2)) (cond - ((< (fabs (vector-dot s5-1 (the-as vector (-> this mat)))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + ((< (fabs (vector-dot s5-1 (-> this mat rvec))) (fabs (vector-dot s5-1 (-> this mat fvec)))) (vector-copy! s2-0 (-> this mat fvec)) (vector-copy! s1-0 (-> this mat rvec)) ) @@ -529,7 +524,7 @@ ) ((= (-> this action) (manipulator-action ma3)) (cond - ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (the-as vector (-> this mat))))) + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (-> this mat rvec)))) (vector-copy! s2-0 (-> this mat rvec)) (vector-copy! s1-0 (-> this mat uvec)) ) @@ -553,9 +548,9 @@ ) (.lvf vf4 (&-> v1-41 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (let ((a0-44 s4-1)) @@ -566,9 +561,9 @@ (.lvf vf5 (&-> v1-42 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-44 quad) vf6) ) ) @@ -612,9 +607,9 @@ ) (.lvf vf4 (&-> v1-69 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-14 quad) vf6) ) (let ((v1-70 s4-1)) @@ -627,9 +622,9 @@ ) (.lvf vf4 (&-> a0-70 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-70 quad) vf6) ) ) @@ -648,7 +643,7 @@ (matrix-identity! s5-2) (cond ((= (-> this action) (manipulator-action ma1)) - (matrix-axis-angle! s5-2 (the-as vector (-> this mat)) (* 182.04445 (the float s4-2))) + (matrix-axis-angle! s5-2 (-> this mat rvec) (* 182.04445 (the float s4-2))) ) ((= (-> this action) (manipulator-action ma2)) (matrix-axis-angle! s5-2 (-> this mat uvec) (* 182.04445 (the float s4-2))) @@ -659,7 +654,7 @@ ) (matrix*! (-> this mat) (-> this mat) s5-2) ) - (vector-normalize! (the-as vector (-> this mat)) 1.0) + (vector-normalize! (-> this mat rvec) 1.0) (vector-normalize! (-> this mat uvec) 1.0) (vector-normalize! (-> this mat fvec) 1.0) (matrix->eul (-> this angles) (-> this mat) 21) diff --git a/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc index 7f56fc4b5ee..cc34102b8f9 100644 --- a/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc +++ b/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc @@ -1026,7 +1026,7 @@ (s3-0 (new 'static 'vector :x -0.696 :y 0.174 :z 0.696)) ) (vector-matrix*! (the-as vector (-> s4-0 title-light-group)) a1-1 s2-1) - (vector-matrix*! (the-as vector (-> s4-0 title-light-group dir1)) s3-0 s2-1) + (vector-matrix*! (-> s4-0 title-light-group dir1 direction) s3-0 s2-1) ) ) (vu-lights<-light-group! arg0 (-> s4-0 title-light-group)) @@ -1038,9 +1038,9 @@ (s2-2 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-1 (-> s4-0 rim-light-group)) ) - (vector-matrix*! (the-as vector (-> s4-1 dir0)) a1-4 s1-0) - (vector-matrix*! (the-as vector (-> s4-1 dir1)) s3-1 s1-0) - (vector-matrix*! (the-as vector (-> s4-1 dir2)) s2-2 s1-0) + (vector-matrix*! (-> s4-1 dir0 direction) a1-4 s1-0) + (vector-matrix*! (-> s4-1 dir1 direction) s3-1 s1-0) + (vector-matrix*! (-> s4-1 dir2 direction) s2-2 s1-0) (vu-lights<-light-group! arg0 s4-1) ) ) @@ -1051,9 +1051,9 @@ (s2-3 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-2 (-> s4-0 rim-light-group2)) ) - (vector-matrix*! (the-as vector (-> s4-2 dir0)) a1-8 s1-1) - (vector-matrix*! (the-as vector (-> s4-2 dir1)) s3-2 s1-1) - (vector-matrix*! (the-as vector (-> s4-2 dir2)) s2-3 s1-1) + (vector-matrix*! (-> s4-2 dir0 direction) a1-8 s1-1) + (vector-matrix*! (-> s4-2 dir1 direction) s3-2 s1-1) + (vector-matrix*! (-> s4-2 dir2 direction) s2-3 s1-1) (vu-lights<-light-group! arg0 s4-2) ) ) @@ -1064,9 +1064,9 @@ (s2-4 (new 'static 'vector :y -0.8944 :z 0.4472)) (s4-3 (-> s4-0 rim-light-group3)) ) - (vector-matrix*! (the-as vector (-> s4-3 dir0)) a1-12 s1-2) - (vector-matrix*! (the-as vector (-> s4-3 dir1)) s3-3 s1-2) - (vector-matrix*! (the-as vector (-> s4-3 dir2)) s2-4 s1-2) + (vector-matrix*! (-> s4-3 dir0 direction) a1-12 s1-2) + (vector-matrix*! (-> s4-3 dir1 direction) s3-3 s1-2) + (vector-matrix*! (-> s4-3 dir2 direction) s2-4 s1-2) (vu-lights<-light-group! arg0 s4-3) ) ) @@ -1210,15 +1210,15 @@ (.mul.w.vf acc vf27 vf0) (.add.mul.x.vf acc vf24 vf15 acc) (.add.mul.y.vf acc vf25 vf15 acc) - (.add.mul.z.vf vf15 vf26 vf15 acc :mask #b111) + (.add.mul.z.vf.xyz vf15 vf26 vf15 acc) (.mul.vf vf28 vf15 vf15) (.max.w.vf vf29 vf0 vf0) (.add.y.vf acc vf28 vf28) - (.add.mul.z.vf vf28 vf29 vf28 acc :mask #b1) + (.add.mul.z.vf.x vf28 vf29 vf28 acc) (.sqrt.vf Q vf28 :ftf #b0) - (.sub.w.vf vf28 vf0 vf15 :mask #b1000) + (.sub.w.vf.w vf28 vf0 vf15) (.wait.vf) - (.add.vf vf15 vf28 Q :mask #b1000) + (.add.vf.w vf15 vf28 Q) (.svf (&-> v1-20 quad) vf15) (when (< 0.0 (+ (-> v1-20 z) (-> arg1 bounds w))) (let ((s4-1 0)) @@ -2404,7 +2404,7 @@ ) ) ) - (dma-buffer-patch-buckets (the-as dma-bucket (-> s4-0 bucket-group)) 586) + (dma-buffer-patch-buckets (-> s4-0 bucket-group 0) 586) (let ((v1-202 *display*) (a0-81 16) ) diff --git a/test/decompiler/reference/jak3/engine/entity/res_REF.gc b/test/decompiler/reference/jak3/engine/entity/res_REF.gc index 4a0f7c8426f..e35b788cf55 100644 --- a/test/decompiler/reference/jak3/engine/entity/res_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/res_REF.gc @@ -53,8 +53,8 @@ (set! (-> v0-0 allocated-length) arg0) (set! (-> v0-0 data-size) arg1) (set! (-> v0-0 length) 0) - (set! (-> v0-0 data-base) (&-> (-> v0-0 tag) arg0)) - (set! (-> v0-0 data-top) (&-> (-> v0-0 tag) arg0)) + (set! (-> v0-0 data-base) (&-> v0-0 tag arg0)) + (set! (-> v0-0 data-top) (&-> v0-0 tag arg0)) v0-0 ) ) @@ -71,7 +71,6 @@ ) ;; definition for method 3 of type res-lump -;; INFO: this function exists in multiple non-identical object files ;; INFO: Used lq/sq (defmethod inspect ((this res-lump)) (format #t "[~8x] ~A~%" this (-> this type)) @@ -177,7 +176,7 @@ (goto cfg-60) ) (let ((a3-14 t0-1) - (t0-4 (&-> (-> this tag) t0-1)) + (t0-4 (&-> this tag t0-1)) ) (while (not (or (>= a3-14 (-> this length)) (< (the-as int a2-1) (the-as int (-> t0-4 0 name))))) (cond diff --git a/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc b/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc index 950ebd22108..9b935000abe 100644 --- a/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc @@ -173,13 +173,13 @@ (set! (-> this res) (-> s5-0 extra)) (let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo))) (set! (-> this name) (if (>= (the-as int v1-6) 0) - (&-> (-> s5-0 extra tag) v1-6) + (&-> s5-0 extra tag v1-6) (the-as (pointer res-tag) #f) ) ) ) (if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0)) - (set! (-> this name) (&-> (-> this name) 1)) + (set! (-> this name) (&-> this name 1)) ) (play-effects-from-res-lump this f30-0 f30-0 f30-0) ) diff --git a/test/decompiler/reference/jak3/engine/game/game-save_REF.gc b/test/decompiler/reference/jak3/engine/game/game-save_REF.gc index 130b5e3adf7..c06ab769172 100644 --- a/test/decompiler/reference/jak3/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-save_REF.gc @@ -795,7 +795,7 @@ (set! (-> s0-1 elt-count) (+ (length name) 1)) (set! (-> s0-1 elt-size) (the-as uint 1)) ) - (copy-charp<-charp (the-as (pointer uint8) (-> (the-as (inline-array game-save-tag) s1-2) 1)) (-> name data)) + (copy-charp<-charp (-> (the-as (inline-array game-save-tag) s1-2) 1 user-uint8) (-> name data)) (let ((v1-85 (+ (the-as int s1-2) (logand -16 (+ (-> (the-as (inline-array game-save-tag) s1-2) 0 elt-count) 15)) 16) ) @@ -1788,11 +1788,11 @@ (((game-save-elt base-time)) ) (((game-save-elt game-time)) - (load! (-> *display* game-clock) (the-as (pointer uint64) (&+ (the-as game-save-tag s4-0) 16))) + (load! (-> *display* game-clock) (&-> (&+ (the-as game-save-tag s4-0) 16) user-uint64)) (set! (-> *game-info* kiosk-timeout) (-> *display* game-clock frame-counter)) ) (((game-save-elt total-game-time)) - (load! (-> *display* total-game-clock) (the-as (pointer uint64) (&+ (the-as game-save-tag s4-0) 16))) + (load! (-> *display* total-game-clock) (&-> (&+ (the-as game-save-tag s4-0) 16) user-uint64)) (set! (-> *game-info* kiosk-timeout) (-> *display* game-clock frame-counter)) ) (((game-save-elt continue)) @@ -2677,7 +2677,7 @@ 0 (label cfg-5) (set! (-> self result) - (mc-save (-> self card) (-> self which) (&-> (-> self save) type) (the-as int (-> self save info-int32))) + (mc-save (-> self card) (-> self which) (&-> self save type) (the-as int (-> self save info-int32))) ) (when (!= (-> self result) (mc-status-code ok)) (suspend) diff --git a/test/decompiler/reference/jak3/engine/game/main_REF.gc b/test/decompiler/reference/jak3/engine/game/main_REF.gc index a7a48a5a659..f633d048895 100644 --- a/test/decompiler/reference/jak3/engine/game/main_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/main_REF.gc @@ -326,9 +326,9 @@ (.lvf vf1 (&-> this color-dest quad)) (.lvf vf2 (&-> this color quad)) (.sub.vf vf3 vf1 vf2) - (.add.x.vf vf4 vf4 vf4 :mask #b10) - (.min.w.vf vf4 vf4 vf0 :mask #b10) - (.max.y.vf vf4 vf4 vf0 :mask #b10) + (.add.x.vf.y vf4 vf4 vf4) + (.min.w.vf.y vf4 vf4 vf0) + (.max.y.vf.y vf4 vf4 vf0) (.mul.y.vf vf3 vf3 vf4) (.add.vf vf1 vf2 vf3) (.svf (&-> this extra quad) vf4) diff --git a/test/decompiler/reference/jak3/engine/geometry/bounding-box_REF.gc b/test/decompiler/reference/jak3/engine/geometry/bounding-box_REF.gc index 9cdc2d9db4b..26107dd5398 100644 --- a/test/decompiler/reference/jak3/engine/geometry/bounding-box_REF.gc +++ b/test/decompiler/reference/jak3/engine/geometry/bounding-box_REF.gc @@ -64,8 +64,8 @@ (.add.vf vf5 vf4 vf3) (.min.vf vf1 vf4 vf5) (.max.vf vf2 vf4 vf5) - (.mov.vf vf1 vf0 :mask #b1000) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf1 vf0) + (.mov.vf.w vf2 vf0) (.svf (&-> this min quad) vf1) (.svf (&-> this max quad) vf2) 0 @@ -142,10 +142,10 @@ (.add.vf vf6 vf5 vf4) (.min.vf vf2 vf5 vf6) (.max.vf vf3 vf5 vf6) - (.add.x.vf vf3 vf3 vf1 :mask #b111) - (.sub.x.vf vf2 vf2 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.add.x.vf.xyz vf3 vf3 vf1) + (.sub.x.vf.xyz vf2 vf2 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 @@ -163,10 +163,10 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.w.vf vf2 vf1 vf1 :mask #b111) - (.add.w.vf vf3 vf1 vf1 :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) - (.mov.vf vf3 vf0 :mask #b1000) + (.sub.w.vf.xyz vf2 vf1 vf1) + (.add.w.vf.xyz vf3 vf1 vf1) + (.mov.vf.w vf2 vf0) + (.mov.vf.w vf3 vf0) (.svf (&-> this min quad) vf2) (.svf (&-> this max quad) vf3) 0 diff --git a/test/decompiler/reference/jak3/engine/geometry/geometry_REF.gc b/test/decompiler/reference/jak3/engine/geometry/geometry_REF.gc index 6c2c20c00cf..e6c80628fb0 100644 --- a/test/decompiler/reference/jak3/engine/geometry/geometry_REF.gc +++ b/test/decompiler/reference/jak3/engine/geometry/geometry_REF.gc @@ -14,7 +14,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -36,13 +36,13 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf acc vf3 vf3 :mask #b111) - (.sub.mul.w.vf vf3 vf1 vf0 acc :mask #b111) + (.add.vf.xyz acc vf3 vf3) + (.sub.mul.w.vf.xyz vf3 vf1 vf0 acc) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -65,12 +65,12 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) (.outer.product.b.vf vf3 vf3 vf2 acc) - (.add.vf vf3 vf3 vf2 :mask #b111) + (.add.vf.xyz vf3 vf3 vf2) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -88,7 +88,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.mov.vf vf3 vf0 :mask #b1000) + (.mov.vf.w vf3 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.outer.product.a.vf acc vf2 vf3) @@ -153,12 +153,12 @@ (.sub.vf vf1 vf4 vf3) (.sub.vf vf6 vf5 vf3) (.mul.vf vf2 vf1 vf1) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b0) @@ -168,8 +168,8 @@ (.mul.vf vf1 vf1 Q) (.mul.vf vf7 vf1 vf6) (let ((f1-0 (the-as float 0.0))) - (.add.y.vf vf7 vf7 vf7 :mask #b1) - (.add.z.vf vf7 vf7 vf7 :mask #b1) + (.add.y.vf.x vf7 vf7 vf7) + (.add.z.vf.x vf7 vf7 vf7) (.mov v1-1 vf7) (let ((f0-0 v1-1)) (b! (< f0-0 f1-0) cfg-4 :likely-delay (set! f0-0 f1-0)) @@ -182,18 +182,18 @@ ) ) (.mul.x.vf vf1 vf1 vf7) - (b! (= arg3 #f) cfg-6 :delay (.mov.vf vf8 vf0 :mask #b1000)) - (.add.vf vf8 vf3 vf1 :mask #b111) + (b! (= arg3 #f) cfg-6 :delay (.mov.vf.w vf8 vf0)) + (.add.vf.xyz vf8 vf3 vf1) (.svf (&-> arg3 quad) vf8) (label cfg-6) (.sub.vf vf2 vf6 vf1) (.mul.vf vf2 vf2 vf2) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.sqrt.vf Q vf2 :ftf #b11) (.wait.vf) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (.nop.vf) (.mov v0-0 vf2) v0-0 @@ -327,27 +327,27 @@ (.lvf vf1 (&-> arg2 quad)) (.lvf vf6 (&-> arg1 quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.mul.w.vf acc vf0 vf6) (.add.mul.x.vf acc vf2 vf6 acc) (.add.mul.y.vf acc vf3 vf6 acc) @@ -375,29 +375,29 @@ (.sub.vf vf7 vf7 vf7) (.lvf vf1 (&-> arg2 quad)) (.lvf vf6 (&-> arg1 quad)) - (.sub.vf vf1 vf7 vf1 :mask #b111) + (.sub.vf.xyz vf1 vf7 vf1) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.mul.w.vf acc vf0 vf6) (.add.mul.x.vf acc vf2 vf6 acc) (.add.mul.y.vf acc vf3 vf6 acc) @@ -734,8 +734,8 @@ ) (let ((f30-1 (* 2.0 (acos (-> s5-0 w))))) (set! (-> arg0 quad) (-> s5-0 quad)) - (vector-negate! (the-as vector arg0) (the-as vector arg0)) - (if (= (vector-normalize-ret-len! (the-as vector arg0) 1.0) 0.0) + (vector-negate! (-> arg0 vec) (-> arg0 vec)) + (if (= (vector-normalize-ret-len! (-> arg0 vec) 1.0) 0.0) (set! (-> arg0 y) 1.0) ) f30-1 @@ -850,12 +850,12 @@ (.outer.product.a.vf acc vf2 vf1) (.outer.product.b.vf vf4 vf1 vf2 acc) (.mul.vf vf5 vf4 vf4) - (.add.y.vf vf5 vf5 vf5 :mask #b1) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.add.y.vf.x vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.isqrt.vf Q vf0 vf5 :fsf #b11 :ftf #b0) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.wait.vf) - (.mul.vf vf4 vf4 Q :mask #b111) + (.mul.vf.xyz vf4 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -877,7 +877,7 @@ (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) (.lvf vf3 (&-> arg3 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.sub.vf vf3 vf3 vf1) (.outer.product.a.vf acc vf2 vf3) @@ -930,13 +930,13 @@ (.mul.vf vf3 vf3 vf1) (.nop.vf) (.mul.vf vf4 vf4 vf1) - (.add.x.vf vf2 vf2 vf2 :mask #b10) - (.add.x.vf vf3 vf3 vf3 :mask #b10) - (.add.x.vf vf4 vf4 vf4 :mask #b10) + (.add.x.vf.y vf2 vf2 vf2) + (.add.x.vf.y vf3 vf3 vf3) + (.add.x.vf.y vf4 vf4 vf4) (.nop.vf) - (.add.z.vf vf2 vf2 vf2 :mask #b10) - (.add.z.vf vf3 vf3 vf3 :mask #b10) - (.add.z.vf vf4 vf4 vf4 :mask #b10) + (.add.z.vf.y vf2 vf2 vf2) + (.add.z.vf.y vf3 vf3 vf3) + (.add.z.vf.y vf4 vf4 vf4) (.nop.vf) (.mov a0-1 vf2) (.mov a1-1 vf3) @@ -1038,11 +1038,11 @@ (.sub.vf vf5 vf4 vf3) (.mul.x.vf vf1 vf1 vf2) (.mul.x.vf vf5 vf5 vf2) - (.mul.vf vf5 vf5 vf5 :mask #b101) - (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.mul.vf.xz vf5 vf5 vf5) + (.add.z.vf.x vf5 vf5 vf5) (.sqrt.vf Q vf5 :ftf #b0) (.wait.vf) - (.mul.vf vf1 vf0 Q :mask #b1000) + (.mul.vf.w vf1 vf0 Q) (.nop.vf) (.nop.vf) (.svf (&-> a1-2 quad) vf1) diff --git a/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-work_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-work_REF.gc index ffbceed6c1f..7d3b2302e13 100644 --- a/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-work_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-work_REF.gc @@ -155,7 +155,7 @@ (s1-0 (* s4-1 4)) (s0-0 (* s3-1 4)) ) - (setup-mid-vertex-index! this (the-as hfrag-vert-index (-> s2-0 data)) s1-0 s0-0) + (setup-mid-vertex-index! this (-> s2-0 data 0) s1-0 s0-0) (setup-mid-vertex-index! this (-> s2-0 data 1) (+ s1-0 1) s0-0) (setup-mid-vertex-index! this (-> s2-0 data 2) (+ s1-0 2) s0-0) (setup-mid-vertex-index! this (-> s2-0 data 3) (+ s1-0 3) s0-0) @@ -200,7 +200,7 @@ (s1-1 (* s4-2 2)) (s0-1 (* s3-2 2)) ) - (setup-mid-vertex-index! this (the-as hfrag-vert-index (-> s2-1 data)) s1-1 s0-1) + (setup-mid-vertex-index! this (-> s2-1 data 0) s1-1 s0-1) (setup-mid-vertex-index! this (-> s2-1 data 1) (+ s1-1 1) s0-1) (setup-mid-vertex-index! this (-> s2-1 data 2) (+ s1-1 2) s0-1) (setup-mid-vertex-index! this (-> s2-1 data 3) s1-1 (+ s0-1 1)) @@ -229,7 +229,7 @@ (s1-2 (* s4-3 2)) (s0-2 (* s3-3 2)) ) - (setup-near-vertex-index! this (the-as hfrag-vert-index (-> s2-2 data)) s1-2 s0-2) + (setup-near-vertex-index! this (-> s2-2 data 0) s1-2 s0-2) (setup-near-vertex-index! this (-> s2-2 data 1) (+ s1-2 1) s0-2) (setup-near-vertex-index! this (-> s2-2 data 2) (+ s1-2 2) s0-2) (setup-near-vertex-index! this (-> s2-2 data 3) s1-2 (+ s0-2 1)) diff --git a/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag_REF.gc index 4dd1f016f65..4172ba73c7f 100644 --- a/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag_REF.gc @@ -605,7 +605,7 @@ This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." (let ((gp-0 *hfrag-work*)) (let ((s4-0 (-> *level* draw-level *draw-index*))) - (mem-copy! (&-> (-> gp-0 hfrag) type) (&-> this type) 96) + (mem-copy! (&-> gp-0 hfrag type) (&-> this type) 96) (init-work-from-current-hfrag! gp-0) (pick-level-of-detail! gp-0 s4-0) (trim-dma-to-fit-in-memory gp-0) @@ -619,7 +619,7 @@ (generate-montage-texture gp-0) (finalize-dma! gp-0) ) - (set-dirty-mask! (the-as level (-> *level* level)) 10 #x1a000 #xf4000) + (set-dirty-mask! (-> *level* level 0) 10 #x1a000 #xf4000) 0 (none) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc index 89d06eb48cd..e6fe5138ca7 100644 --- a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc @@ -875,12 +875,11 @@ (set! sv-16 (-> (the-as drawable-inline-array-instance-tie s2-0) length)) (when (nonzero? sv-16) (let* ((v1-41 (logand (the-as int *gsf-buffer*) 8191)) - (v1-43 - (the-as - object - (logand (the-as int (&- (logand (the-as int (&-> (-> s3-0 data) -640)) 8191) (the-as uint v1-41))) 8191) - ) - ) + (v1-43 (the-as + object + (logand (the-as int (&- (logand (the-as int (&-> s3-0 data -640)) 8191) (the-as uint v1-41))) 8191) + ) + ) ) (set! *instance-tie-work-copy* (the-as instance-tie-work (+ (the-as int *gsf-buffer*) (the-as int v1-43)))) ) @@ -2311,7 +2310,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc index 983c23a096b..0d755043397 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc @@ -698,13 +698,13 @@ (set! (-> arg0 direction 2 quad) (the-as uint128 a2-2)) ) ) - (.min.x.vf vf4 vf0 vf0 :mask #b1000) + (.min.x.vf.w vf4 vf0 vf0) (nop!) - (.min.x.vf vf5 vf0 vf0 :mask #b1000) + (.min.x.vf.w vf5 vf0 vf0) (nop!) - (.min.x.vf vf6 vf0 vf0 :mask #b1000) + (.min.x.vf.w vf6 vf0 vf0) (nop!) - (.max.w.vf vf7 vf0 vf0 :mask #b1000) + (.max.w.vf.w vf7 vf0 vf0) (nop!) (nop!) (.svf (&-> arg0 color 0 quad) vf4) diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/emerc_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/emerc_REF.gc index 02de53f1b3b..3f211ecb955 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/emerc_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/emerc_REF.gc @@ -4,7 +4,7 @@ ;; definition for function emerc-vu1-initialize-chain ;; INFO: Used lq/sq (defun emerc-vu1-initialize-chain ((gif-packet dma-gif-packet)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet gif-packet) emerc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> gif-packet dma-vif) emerc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xb :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc_REF.gc index 59b0aa00c29..4db7fd2ad70 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc_REF.gc @@ -480,7 +480,7 @@ ;; definition for function merc-vu1-initialize-chain ;; INFO: Used lq/sq (defun merc-vu1-initialize-chain ((arg0 dma-gif-packet) (arg1 int)) - (let ((gp-0 (the-as object (merc-vu1-add-vu-function (the-as dma-packet arg0) merc-vu1-block 1)))) + (let ((gp-0 (the-as object (merc-vu1-add-vu-function (-> arg0 dma-vif) merc-vu1-block 1)))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> (the-as dma-gif-packet gp-0) dma-vif vif1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc index 1be929ad5a0..a9e0cfcca47 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc @@ -734,9 +734,9 @@ (f0-14 (/ f30-0 (-> s2-0 uv-repeat-dist))) (f28-1 (+ (- f0-14 (* (the float (the int (/ f0-14 6.0))) 6.0)) (-> this current-uv-shift))) ) - (vector-normalize! (the-as vector arg4) 1.0) + (vector-normalize! (-> arg4 rvec) 1.0) (let* ((a2-4 (-> (camera-matrix) uvec)) - (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (the-as vector arg4) a2-4)) + (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (-> arg4 rvec) a2-4)) (f26-1 6.0) ) (set! sv-160 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (/ f22-0 2))) diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc index 0e380f474d7..b48ccd09848 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc @@ -183,8 +183,8 @@ (.lvf vf4 (&-> v1-5 quad)) (.lvf vf5 (&-> a0-3 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-96 quad) vf6) (set! sv-112 (new 'stack-no-clear 'vector)) (let ((v1-9 (-> arg0 arg3)) @@ -193,8 +193,8 @@ (.lvf vf4 (&-> v1-9 quad)) (.lvf vf5 (&-> a0-5 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-112 quad) vf6) (set! sv-144 (new 'stack-no-clear 'vector)) (set! sv-128 (new 'stack-no-clear 'vector)) @@ -224,29 +224,29 @@ (let ((v1-31 sv-128) (a0-15 sv-128) ) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-96 quad)) (.lvf vf5 (&-> sv-112 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> a0-15 quad) vf6) (vector-float*! v1-31 a0-15 0.5) ) (let ((v1-33 sv-144)) (let ((a0-16 sv-144)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-16 quad)) ) (.lvf vf5 (&-> sv-128 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-33 quad) vf6) ) (let ((v1-35 (-> arg0 s0-0))) (let ((a0-19 (-> arg1 s0-0))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-19 quad)) ) (.lvf vf5 (&-> sv-144 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-35 quad) vf6) ) (lightning-trail-fractal-gen arg0 arg1 arg2 s0-0 (* arg4 (-> arg5 reduction)) arg5) @@ -372,7 +372,7 @@ (set! sv-36 (-> arg0 process 0 clock)) (when (not (or (= (-> sv-36 time-adjust-ratio) 0.0) (< gp-0 2))) (when (logtest? (-> sv-16 flags) (lightning-spec-flags lsf4)) - (let ((f1-1 (vector-vector-distance (the-as vector (-> sv-24 data)) (-> sv-24 data s4-0)))) + (let ((f1-1 (vector-vector-distance (-> sv-24 data 0) (-> sv-24 data s4-0)))) (set! (-> s5-0 box-size) (* (-> sv-16 box-size) (fmax 1.0 (fmin 5.0 (/ f1-1 (* 4096.0 (the float (-> sv-16 adjust-distance))))))) ) @@ -624,22 +624,22 @@ (let ((a2-45 f1-4)) (.mov vf17 a2-45) ) - (.add.x.vf vf17 vf0 vf8 :mask #b10) - (.add.w.vf vf17 vf0 vf0 :mask #b100) - (.add.w.vf vf17 vf17 vf0 :mask #b100) + (.add.x.vf.y vf17 vf0 vf8) + (.add.w.vf.z vf17 vf0 vf0) + (.add.w.vf.z vf17 vf17 vf0) (dotimes (a2-46 s3-0) (.lvf vf8 (&-> v1-71 0 quad)) - (.mul.w.vf acc vf4 vf0 :mask #b111) - (.add.mul.x.vf acc vf1 vf8 acc :mask #b111) - (.add.mul.y.vf acc vf2 vf8 acc :mask #b111) - (.add.mul.z.vf vf8 vf3 vf8 acc :mask #b111) + (.mul.w.vf.xyz acc vf4 vf0) + (.add.mul.x.vf.xyz acc vf1 vf8 acc) + (.add.mul.y.vf.xyz acc vf2 vf8 acc) + (.add.mul.z.vf.xyz vf8 vf3 vf8 acc) (.add.x.vf vf6 vf8 vf0) (b! (zero? sv-64) cfg-44 :delay (.add.x.vf vf7 vf8 vf0)) - (.add.y.vf vf6 vf6 vf17 :mask #b10) - (b! #t cfg-45 :delay (.sub.y.vf vf7 vf7 vf17 :mask #b10)) + (.add.y.vf.y vf6 vf6 vf17) + (b! #t cfg-45 :delay (.sub.y.vf.y vf7 vf7 vf17)) (label cfg-44) - (.add.y.vf vf6 vf6 vf17 :mask #b1) - (.sub.y.vf vf7 vf7 vf17 :mask #b1) + (.add.y.vf.x vf6 vf6 vf17) + (.sub.y.vf.x vf7 vf7 vf17) (label cfg-45) (.svf (&-> (the-as (pointer uint128) a1-82) 2) vf6) (.svf (&-> (the-as (pointer uint128) a0-71) 2) vf7) @@ -675,8 +675,8 @@ (set! (-> sv-176 num-dps) (the-as uint (* sv-144 2))) (set! (-> sv-176 kick-offset) (the-as uint 0)) (when sv-32 - (adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-176 shader)) sv-32) - (adgif-shader-update! (the-as adgif-shader (-> sv-176 shader)) sv-32) + (adgif-shader<-texture-simple! (-> sv-176 shader 0 shader) sv-32) + (adgif-shader-update! (-> sv-176 shader 0 shader) sv-32) ) (set! (-> sv-176 shader 0 shader alpha) (new 'static 'gs-miptbp :tbp1 #x48 :tbw2 #x20)) (set! (-> sv-176 shader 0 shader tex0 tfx) 0) diff --git a/test/decompiler/reference/jak3/engine/gfx/math-camera_REF.gc b/test/decompiler/reference/jak3/engine/gfx/math-camera_REF.gc index 5b0409cfa04..91a11efc875 100644 --- a/test/decompiler/reference/jak3/engine/gfx/math-camera_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/math-camera_REF.gc @@ -387,10 +387,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) ) @@ -437,10 +437,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (vftoi4.xyzw vf28 vf28) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) @@ -487,10 +487,10 @@ Without this corrector, the fogginess of the world would change as the FOV chang (.div.vf Q vf0 vf31 :fsf #b11 :ftf #b11) (.wait.vf) (.cfc2.i v1-2 Clipping) - (.mul.vf vf28 vf28 Q :mask #b111) + (.mul.vf.xyz vf28 vf28 Q) (.mul.vf vf23 vf23 Q) (.add.vf vf28 vf28 vf30) - (.max.x.vf vf28 vf28 vf0 :mask #b1000) + (.max.x.vf.w vf28 vf28 vf0) (.svf (&-> arg0 quad) vf28) (not (logtest? v1-2 63)) (.mov v0-0 vf23) diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood-funcs2_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood-funcs2_REF.gc index 569742fcbd7..9fff67037a6 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/mood-funcs2_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood-funcs2_REF.gc @@ -265,12 +265,7 @@ ) (let ((f0-5 (get-sphere-interp a0-10 a1-5 61440.0 69632.0))) (set-vector! (-> arg0 times 0) 1.0 1.0 1.0 1.0) - (vector-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) - f0-5 - ) + (vector-lerp! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 0) f0-5) ) ) ) @@ -455,9 +450,9 @@ (set! (-> s5-0 door-target-interp) 0.0) ) (vector4-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) + (-> arg0 times 0) + (-> arg0 times 0) + (-> *level* level-default mood-context times 0) (-> s5-0 door-current-interp) ) (if (not (paused?)) @@ -807,7 +802,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood-tables2_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood-tables2_REF.gc index e24b87ab104..055430369de 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/mood-tables2_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood-tables2_REF.gc @@ -125,13 +125,13 @@ ) (dotimes (data-idx 8) (vector-float*! - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) - (the-as vector (-> *overide-table* mood-fog-table data data-idx)) + (-> *overide-table* mood-fog-table data data-idx fog-color) + (-> *overide-table* mood-fog-table data data-idx fog-color) (-> *overide-table* mood-fog-table data data-idx fog-color w) ) (vector-float*! - (the-as vector (-> *overide-table* mood-color-table data data-idx)) - (the-as vector (-> *overide-table* mood-color-table data data-idx)) + (-> *overide-table* mood-color-table data data-idx lgt-color) + (-> *overide-table* mood-color-table data data-idx lgt-color) (-> *overide-table* mood-color-table data data-idx lgt-color w) ) (vector-float*! diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc index 6962bb74e2f..5c4f0913cec 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc @@ -68,21 +68,21 @@ (.lvf vf1 (&-> arg0 times 0 quad)) (nop!) (.lvf vf2 (&-> arg0 times 1 quad)) - (.mul.w.vf vf1 vf1 vf1 :mask #b111) + (.mul.w.vf.xyz vf1 vf1 vf1) (.lvf vf3 (&-> arg0 times 2 quad)) - (.mul.w.vf vf2 vf2 vf2 :mask #b111) + (.mul.w.vf.xyz vf2 vf2 vf2) (.lvf vf4 (&-> arg0 times 3 quad)) - (.mul.w.vf vf3 vf3 vf3 :mask #b111) + (.mul.w.vf.xyz vf3 vf3 vf3) (.lvf vf5 (&-> arg0 times 4 quad)) - (.mul.w.vf vf4 vf4 vf4 :mask #b111) + (.mul.w.vf.xyz vf4 vf4 vf4) (.lvf vf6 (&-> arg0 times 5 quad)) - (.mul.w.vf vf5 vf5 vf5 :mask #b111) + (.mul.w.vf.xyz vf5 vf5 vf5) (.lvf vf7 (&-> arg0 times 6 quad)) - (.mul.w.vf vf6 vf6 vf6 :mask #b111) + (.mul.w.vf.xyz vf6 vf6 vf6) (.lvf vf8 (&-> arg0 times 7 quad)) - (.mul.w.vf vf7 vf7 vf7 :mask #b111) + (.mul.w.vf.xyz vf7 vf7 vf7) (nop!) - (.mul.w.vf vf8 vf8 vf8 :mask #b111) + (.mul.w.vf.xyz vf8 vf8 vf8) (nop!) (vftoi12.xyzw vf1 vf1) (nop!) @@ -484,7 +484,7 @@ (let ((s1-0 (-> arg0 times))) (set! sv-64 (-> arg0 times 1)) (let ((s0-0 (-> arg0 light-group))) - (vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) + (vector4-lerp! (-> s1-0 0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) (vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0) (vector-copy! (-> arg0 times 2) sv-64) (vector-copy! (-> arg0 times 3) sv-64) @@ -583,11 +583,7 @@ ) ) (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) - (vector+! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (-> *level* level-default mood-context times 1) - ) + (vector+! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 1)) (when arg1 (vector-copy! (-> arg0 times 1) (-> *level* level-default mood-context times 1)) (set! (-> arg0 times 1 w) 1.0) @@ -655,12 +651,7 @@ (defun update-mood-interior-ambient ((arg0 mood-context) (arg1 symbol) (arg2 float)) (update-mood-interior arg0 arg1) (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) - (vector+float*! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (-> *level* level-default mood-context times 1) - arg2 - ) + (vector+float*! (-> arg0 times 0) (-> arg0 times 0) (-> *level* level-default mood-context times 1) arg2) ) ;; definition for function update-mood-flames @@ -1054,7 +1045,7 @@ (a0-14 (-> arg0 times)) (s4-0 (-> arg0 times 1)) ) - (vector4-lerp! (the-as vector a0-14) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) + (vector4-lerp! (-> a0-14 0) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) (vector4-lerp! s4-0 (the-as vector (+ s3-0 0)) (the-as vector (+ s2-0 0)) f30-0) (vector-copy! (-> arg0 times 2) s4-0) (vector-copy! (-> arg0 times 3) s4-0) @@ -1484,8 +1475,8 @@ (dotimes (s4-0 8) (set-vector! s5-0 255.0 255.0 255.0 128.0) (vector4-lerp! - (the-as vector (-> this mood-fog-table data s4-0)) - (the-as vector (-> this mood-fog-table data s4-0)) + (-> this mood-fog-table data s4-0 fog-color) + (-> this mood-fog-table data s4-0 fog-color) s5-0 f30-0 ) diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc index 4ff3f5b589f..a3a967df923 100644 --- a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-mid_REF.gc @@ -444,8 +444,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-3 vf1) (when (< t0-3 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -460,8 +460,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-8 vf1) (when (< t0-8 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -476,8 +476,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-13 vf1) (when (< t0-13 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) @@ -489,8 +489,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (when (< v1-10 309237600000.0) (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc index 66b1bc980a8..41e4aaf0f9f 100644 --- a/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/ocean/ocean-transition_REF.gc @@ -432,8 +432,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-3 vf1) (when (< t0-3 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -448,8 +448,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-8 vf1) (when (< t0-8 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -464,8 +464,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-13 vf1) (when (< t0-13 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) @@ -477,8 +477,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-13 vf1) (when (< v1-13 19327350000.0) (logior! (-> arg0 mask arg2) (ash 1 arg1)) diff --git a/test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc index b13f515d8d6..cd8566f69c8 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc @@ -475,7 +475,7 @@ (haze-vtx-to-sky this (-> sv-20 (+ (* s3-0 4) 3)) (-> sv-20 (+ (* s3-0 4) 2)) (-> sv-16 data (+ s3-0 1))) ) (haze-vtx-to-sky this (-> sv-20 140) (-> sv-20 141) (-> sv-16 data 35)) - (haze-vtx-to-sky this (-> sv-20 143) (-> sv-20 142) (the-as haze-vertex (-> sv-16 data))) + (haze-vtx-to-sky this (-> sv-20 143) (-> sv-20 142) (-> sv-16 data 0)) (dotimes (s5-1 36) (render-sky-quad (the-as (inline-array sky-vertex) (-> sv-20 (* s5-1 4))) arg0) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc index a8676aa7c6c..74685375cc8 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc @@ -1236,7 +1236,7 @@ ) ) ) - (vector-cross! arg3 v1-0 (the-as vector (&+ arg0 16))) + (vector-cross! arg3 v1-0 (-> (&+ arg0 16) pos)) ) (none) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc index 058d5418b35..221a32b2d68 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc @@ -538,13 +538,7 @@ (s5-0 (new 'stack-no-clear 'matrix)) ) (let ((s0-0 (new 'stack-no-clear 'vector))) - (sp-init-fields! - (the-as (pointer float) (-> s2-0 rvec)) - arg2 - (sp-field-id launch-fields-start) - (sp-field-id launch-fields-end) - #t - ) + (sp-init-fields! (&-> s2-0 rvec x) arg2 (sp-field-id launch-fields-start) (sp-field-id launch-fields-end) #t) (matrix-rotate-xyz! s5-0 (-> s2-0 rvec)) (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) (matrix-rotate-xyz! s5-0 (-> s2-0 uvec)) @@ -611,14 +605,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-1 vf1) ) (else (.lvf vf1 (&-> arg0 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 conerot quad) vf1) (.mov v1-2 vf1) ) @@ -755,7 +749,7 @@ ) (let* ((a1-2 (-> arg1 init-specs 0)) (a1-3 (sp-init-fields! - (the-as (pointer float) (-> s5-0 rvec)) + (&-> s5-0 rvec x) (the-as (inline-array sp-field-init-spec) a1-2) (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -769,8 +763,8 @@ (set! (-> s5-0 uvec z) (the float (sar (shl (the int (-> s5-0 uvec z)) 48) 48))) (.lvf vf4 (&-> s5-0 fvec quad)) (.lvf vf5 (&-> s5-0 rvec quad)) - (.min.x.vf vf4 vf4 vf31 :mask #b111) - (.add.vf vf5 vf5 vf30 :mask #b111) + (.min.x.vf.xyz vf4 vf4 vf31) + (.add.vf.xyz vf5 vf5 vf30) (.svf (&-> s5-0 fvec quad) vf4) (.svf (&-> s5-0 rvec quad) vf5) (when (not *death-adgif*) @@ -797,8 +791,8 @@ (.lvf vf4 (&-> (-> *time-of-day-context* current-prt-color) quad)) (.lvf vf5 (&-> s5-0 fvec quad)) (.lvf vf6 (&-> gp-0 fade quad)) - (.mul.vf vf5 vf5 vf4 :mask #b111) - (.mul.vf vf6 vf6 vf4 :mask #b111) + (.mul.vf.xyz vf5 vf5 vf4) + (.mul.vf.xyz vf6 vf6 vf4) (.svf (&-> s5-0 fvec quad) vf5) (.svf (&-> gp-0 fade quad) vf6) (.mov v1-26 vf6) @@ -810,7 +804,7 @@ (.lvf vf3 (&-> s5-0 fvec quad)) (.svf (&-> v1-27 x-y-z-sx quad) vf1) (.svf (&-> v1-27 flag-rot-sy quad) vf2) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (.svf (&-> v1-27 r-g-b-a quad) vf3) ) (.mov v1-28 vf3) @@ -914,7 +908,7 @@ (set! (-> arg2 fade z) 99999.0) (set! sv-80 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) sv-80 (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -956,7 +950,7 @@ (else (set! sv-80 (sp-init-fields! - (the-as (pointer float) (-> arg3 x-y-z-sx)) + (&-> arg3 x-y-z-sx x) sv-80 (sp-field-id sprite-fields-start) (sp-field-id sprite-fields-end) @@ -1041,14 +1035,14 @@ ((< (-> s3-0 w) 0.0) (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-9 vf1) ) (else (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s3-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) (.mov v1-10 vf1) ) @@ -1770,14 +1764,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-1 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-2 vf1) ) @@ -1830,14 +1824,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-9 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-10 vf1) ) @@ -1913,14 +1907,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) (else (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) @@ -1980,14 +1974,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) (.mov v1-18 vf1) ) (else (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) (.mov v1-19 vf1) ) @@ -2487,14 +2481,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-1 vf1) ) @@ -2577,14 +2571,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) @@ -2851,14 +2845,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -3028,14 +3022,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc index 251a6a1b729..3534fbcab57 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc @@ -223,11 +223,11 @@ (TODO.VCLIP vf10 vf10) (b! (zero? (-> sv-16 flag)) cfg-22 :delay (nop!)) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) + (.mul.vf.xyz vf2 vf2 Q) (.cfc2.i v1-26 Clipping) (b! (logtest? v1-26 63) cfg-22 :delay (.add.vf vf1 vf1 vf9)) - (.max.x.vf vf1 vf1 vf0 :mask #b1000) + (.max.x.vf.w vf1 vf1 vf0) (.svf (&-> (the-as vector a0-3) quad) vf1) (.svf (&-> sv-48 quad) vf2) (set! (-> (the-as vector a0-3) w) 255.0) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc index d174ed8bd8c..839decb04e2 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc @@ -492,14 +492,14 @@ The glow and distort renderers will pull sprites from here." ((< (-> arg1 w) 0.0) (.lvf vf1 (&-> arg0 qx-qy-qz-sy quad)) (.lvf vf2 (&-> arg1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 qx-qy-qz-sy quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> arg0 qx-qy-qz-sy quad)) (.lvf vf2 (&-> arg1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg0 qx-qy-qz-sy quad) vf1) (.mov v1-1 vf1) ) diff --git a/test/decompiler/reference/jak3/engine/level/bsp_REF.gc b/test/decompiler/reference/jak3/engine/level/bsp_REF.gc index 4c4fde05f6a..1d6abcd1953 100644 --- a/test/decompiler/reference/jak3/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/bsp_REF.gc @@ -390,16 +390,16 @@ (let ((nodes (the-as object (-> arg0 nodes)))) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg0 bsp-offset quad)) - (.sub.vf vf1 vf1 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf1 vf2) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b1) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b10) + (.mul.vf.y vf1 vf1 Q) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b10) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b100) + (.mul.vf.z vf1 vf1 Q) (let ((a1-1 #xffffff) (nidx (the-as object 0)) ) diff --git a/test/decompiler/reference/jak3/engine/level/region_REF.gc b/test/decompiler/reference/jak3/engine/level/region_REF.gc index 2e724eaa908..68ac9f9d8c4 100644 --- a/test/decompiler/reference/jak3/engine/level/region_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/region_REF.gc @@ -597,8 +597,8 @@ (vector-copy! (-> *level* target-pos 1) (-> *level* target-pos 0)) (set! (-> *level* target-pos 0 quad) (-> (target-pos 0) quad)) (when (and *execute-regions* (-> *setting-control* user-current region-mode) (not (paused?))) - (region-tree-execute 'camera (-> *level* camera-pos 1) (the-as vector (-> *level* camera-pos))) - (region-tree-execute 'target (-> *level* target-pos 1) (the-as vector (-> *level* target-pos))) + (region-tree-execute 'camera (-> *level* camera-pos 1) (-> *level* camera-pos 0)) + (region-tree-execute 'target (-> *level* target-pos 1) (-> *level* target-pos 0)) ) 0 (none) diff --git a/test/decompiler/reference/jak3/engine/load/load-dgo_REF.gc b/test/decompiler/reference/jak3/engine/load/load-dgo_REF.gc index d9218ebde3f..e281c801faa 100644 --- a/test/decompiler/reference/jak3/engine/load/load-dgo_REF.gc +++ b/test/decompiler/reference/jak3/engine/load/load-dgo_REF.gc @@ -123,7 +123,7 @@ (set! (-> s2-0 address) dest-addr) (set! (-> s2-0 section) (the-as uint chunk-idx)) (set! (-> s2-0 maxlen) (the-as uint max-len)) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename)) name 48) + (copyn-charp<-string (-> s2-0 basename name) name 48) (call *load-str-rpc* (the-as uint 0) (the-as pointer s2-0) (the-as uint 32)) ) (set! *load-str-lock* #t) @@ -166,10 +166,10 @@ "Start playing a streaming audio." (set! *que-str-lock* #t) (let ((s2-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename)) name 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s2-0 basename 3)) "" 48) + (copyn-charp<-string (-> s2-0 basename 0 name) name 48) + (copyn-charp<-string (-> s2-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s2-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s2-0 basename 3 name) "" 48) (set! (-> s2-0 id 0) (the-as uint id)) (set! (-> s2-0 id 1) (the-as uint 0)) (set! (-> s2-0 id 2) (the-as uint 0)) @@ -190,10 +190,10 @@ "Stop playing streaming audio." (set! *que-str-lock* #t) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) name 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) name 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) (set! (-> s4-0 id 0) (the-as uint id)) (set! (-> s4-0 id 1) (the-as uint 0)) (set! (-> s4-0 id 2) (the-as uint 0)) @@ -211,20 +211,20 @@ (when (and (not (check-busy *play-str-rpc*)) (not *que-str-lock*)) (let ((s4-0 (the-as play-chunk-msg (add-element *play-str-rpc*)))) (if name0 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) name0 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename)) "" 48) + (copyn-charp<-string (-> s4-0 basename 0 name) name0 48) + (copyn-charp<-string (-> s4-0 basename 0 name) "" 48) ) (if name1 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) name1 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 1)) "" 48) + (copyn-charp<-string (-> s4-0 basename 1 name) name1 48) + (copyn-charp<-string (-> s4-0 basename 1 name) "" 48) ) (if name2 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) name2 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 2)) "" 48) + (copyn-charp<-string (-> s4-0 basename 2 name) name2 48) + (copyn-charp<-string (-> s4-0 basename 2 name) "" 48) ) (if name3 - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) name3 48) - (copyn-charp<-string (the-as (pointer uint8) (-> s4-0 basename 3)) "" 48) + (copyn-charp<-string (-> s4-0 basename 3 name) name3 48) + (copyn-charp<-string (-> s4-0 basename 3 name) "" 48) ) (dotimes (v1-14 4) (set! (-> s4-0 id v1-14) (-> ids v1-14)) diff --git a/test/decompiler/reference/jak3/engine/load/loader_REF.gc b/test/decompiler/reference/jak3/engine/load/loader_REF.gc index 4e8b6b485b9..3fe590984ec 100644 --- a/test/decompiler/reference/jak3/engine/load/loader_REF.gc +++ b/test/decompiler/reference/jak3/engine/load/loader_REF.gc @@ -623,7 +623,7 @@ (set! (-> s4-4 length) 0) (dotimes (s3-2 3) (when (-> this rec s3-2 name) - (mem-copy! (&-> (-> s4-4 (-> s4-4 length)) type) (&-> (-> this rec s3-2) type) 44) + (mem-copy! (&-> s4-4 (-> s4-4 length) type) (&-> this rec s3-2 type) 44) (+! (-> s4-4 length) 1) ) ) @@ -754,8 +754,8 @@ (if (>= arg3 (-> this rec 0 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec) 0 type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 0 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -763,7 +763,7 @@ (if (>= arg3 (-> this rec 1 priority)) (return (the-as int #f)) ) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec 2) type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 2 type) 44) (set! (-> this rec 2 name) #f) (set! (-> this rec 2 owner) (the-as handle #f)) ) @@ -777,15 +777,15 @@ ) (cond ((< arg3 (-> this rec 0 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) - (mem-copy! (&-> (-> this rec 1) type) (&-> (-> this rec) 0 type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) + (mem-copy! (&-> this rec 1 type) (&-> this rec 0 type) 44) (set! (-> this rec 0 name) arg0) (set! (-> this rec 0 parts) arg1) (set! (-> this rec 0 priority) arg3) (set! (-> this rec 0 owner) (process->handle arg2)) ) ((< arg3 (-> this rec 1 priority)) - (mem-copy! (&-> (-> this rec 2) type) (&-> (-> this rec 1) type) 44) + (mem-copy! (&-> this rec 2 type) (&-> this rec 1 type) 44) (set! (-> this rec 1 name) arg0) (set! (-> this rec 1 parts) arg1) (set! (-> this rec 1 priority) arg3) @@ -1815,10 +1815,7 @@ (cond ((the-as gui-connection gp-0) (dotimes (s4-0 4) - (when (and (string-charp= - (-> (the-as gui-connection gp-0) name) - (the-as (pointer uint8) (-> *sound-iop-info* stream-name s4-0)) - ) + (when (and (string-charp= (-> (the-as gui-connection gp-0) name) (-> *sound-iop-info* stream-name s4-0 name)) (or (= (-> (the-as gui-connection gp-0) id) (-> *sound-iop-info* stream-id s4-0)) (zero? (-> *sound-iop-info* stream-id s4-0)) ) @@ -2383,25 +2380,24 @@ (channel-id-set! this arg0 (-> arg0 id)) (set! (-> this times 0) 0) (let ((v1-73 (shr (the-as int (-> arg0 channel)) 4))) - (set! v1-75 - (and (or (= v1-73 1) (= v1-73 2)) - (not (and (>= (the-as uint (-> arg0 channel)) (the-as uint 16)) - (>= (the-as uint 17) (the-as uint (-> arg0 channel))) + (set! v1-75 (and (or (= v1-73 1) (= v1-73 2)) + (not (and (>= (the-as uint (-> arg0 channel)) (the-as uint 16)) + (>= (the-as uint 17) (the-as uint (-> arg0 channel))) + ) + ) + (begin + (dotimes (s3-1 4) + (when (and (string-charp= (-> arg0 name) (-> *sound-iop-info* stream-name s3-1 name)) + (= (-> arg0 id) (-> *sound-iop-info* stream-id s3-1)) + (logtest? (-> *sound-iop-info* stream-status s3-1) (stream-status ss6)) + ) + (set! v1-75 #t) + (goto cfg-81) + ) ) - ) - (begin - (dotimes (s3-1 4) - (when (and (string-charp= (-> arg0 name) (the-as (pointer uint8) (-> *sound-iop-info* stream-name s3-1))) - (= (-> arg0 id) (-> *sound-iop-info* stream-id s3-1)) - (logtest? (-> *sound-iop-info* stream-status s3-1) (stream-status ss6)) - ) - (set! v1-75 #t) - (goto cfg-81) + #f + ) ) - ) - #f - ) - ) ) ) (label cfg-81) diff --git a/test/decompiler/reference/jak3/engine/math/math_REF.gc b/test/decompiler/reference/jak3/engine/math/math_REF.gc index 04a8d8b651b..84d7677dd8f 100644 --- a/test/decompiler/reference/jak3/engine/math/math_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/math_REF.gc @@ -548,7 +548,7 @@ (init-vf0-vector) (TODO.VRGET vf1) (.sqrt.vf Q vf1 :ftf #b0) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (TODO.VRXOR vf2) (TODO.VRNEXT vf1) (.sub.w.vf vf1 vf1 vf0) diff --git a/test/decompiler/reference/jak3/engine/math/matrix_REF.gc b/test/decompiler/reference/jak3/engine/math/matrix_REF.gc index f332d79f912..511fec7b2bd 100644 --- a/test/decompiler/reference/jak3/engine/math/matrix_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/matrix_REF.gc @@ -182,10 +182,10 @@ (.add.mul.w.vf vf5 vf4 vf5 acc) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf5 vf5 Q :mask #b111) + (.mul.vf.xyz vf5 vf5 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf5 vf0 :mask #b1000) + (.mov.vf.w vf5 vf0) (.svf (&-> arg0 quad) vf5) arg0 ) @@ -308,15 +308,15 @@ (.lvf vf1 (&-> arg0 rvec quad)) (.lvf vf2 (&-> arg0 uvec quad)) (.lvf vf3 (&-> arg0 fvec quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1000) - (.sub.vf vf2 vf2 vf2 :mask #b1000) - (.sub.vf vf3 vf3 vf3 :mask #b1000) + (.sub.vf.w vf1 vf1 vf1) + (.sub.vf.w vf2 vf2 vf2) + (.sub.vf.w vf3 vf3 vf3) (.lvf vf8 (&-> arg1 trans quad)) (.mul.x.vf acc vf1 vf8) (.add.mul.y.vf acc vf2 vf8 acc) (.add.mul.z.vf vf4 vf3 vf8 acc) (.sub.vf vf4 vf0 vf4) - (.mov.vf vf4 vf0 :mask #b1000) + (.mov.vf.w vf4 vf0) (.svf (&-> arg0 rvec quad) vf1) (.svf (&-> arg0 uvec quad) vf2) (.svf (&-> arg0 fvec quad) vf3) @@ -393,87 +393,87 @@ (nop!) (.mul.z.vf vf15 vf25 vf24) (nop!) - (.mul.z.vf vf26 vf7 vf25 :mask #b10) + (.mul.z.vf.y vf26 vf7 vf25) (nop!) - (.mul.z.vf vf27 vf11 vf24 :mask #b1) + (.mul.z.vf.x vf27 vf11 vf24) (nop!) - (.mul.y.vf vf28 vf9 vf25 :mask #b1) + (.mul.y.vf.x vf28 vf9 vf25) (nop!) - (.mul.z.vf vf29 vf14 vf23 :mask #b1) + (.mul.z.vf.x vf29 vf14 vf23) (nop!) - (.mul.z.vf vf30 vf8 vf25 :mask #b1) + (.mul.z.vf.x vf30 vf8 vf25) (nop!) - (.mul.y.vf vf31 vf7 vf25 :mask #b100) + (.mul.y.vf.z vf31 vf7 vf25) (nop!) - (.add.y.vf vf16 vf27 vf26 :mask #b1) + (.add.y.vf.x vf16 vf27 vf26) (nop!) (.sub.vf vf1 vf0 vf1) (nop!) - (.add.x.vf vf17 vf29 vf30 :mask #b1) + (.add.x.vf.x vf17 vf29 vf30) (nop!) - (.sub.z.vf vf18 vf28 vf31 :mask #b1) + (.sub.z.vf.x vf18 vf28 vf31) (nop!) - (.sub.y.vf vf23 vf14 vf15 :mask #b100) + (.sub.y.vf.z vf23 vf14 vf15) (nop!) - (.sub.z.vf vf26 vf15 vf13 :mask #b1) + (.sub.z.vf.x vf26 vf15 vf13) (nop!) - (.sub.x.vf vf29 vf13 vf14 :mask #b10) + (.sub.x.vf.y vf29 vf13 vf14) (nop!) - (.sub.vf vf19 vf16 vf17 :mask #b1) + (.sub.vf.x vf19 vf16 vf17) (nop!) - (.sub.z.vf vf24 vf12 vf11 :mask #b10) + (.sub.z.vf.y vf24 vf12 vf11) (nop!) - (.sub.x.vf vf27 vf10 vf12 :mask #b100) + (.sub.x.vf.z vf27 vf10 vf12) (nop!) - (.sub.y.vf vf30 vf11 vf10 :mask #b1) + (.sub.y.vf.x vf30 vf11 vf10) (nop!) - (.add.vf vf20 vf19 vf18 :mask #b1) + (.add.vf.x vf20 vf19 vf18) (nop!) - (.sub.y.vf vf25 vf8 vf9 :mask #b100) + (.sub.y.vf.z vf25 vf8 vf9) (nop!) - (.sub.z.vf vf28 vf9 vf7 :mask #b1) + (.sub.z.vf.x vf28 vf9 vf7) (nop!) - (.sub.x.vf vf31 vf7 vf8 :mask #b10) + (.sub.x.vf.y vf31 vf7 vf8) (nop!) (.div.vf Q vf0 vf20 :fsf #b11 :ftf #b0) (nop!) - (.sub.w.vf vf3 vf3 vf3 :mask #b1000) + (.sub.w.vf.w vf3 vf3 vf3) (nop!) - (.sub.w.vf vf4 vf4 vf4 :mask #b1000) + (.sub.w.vf.w vf4 vf4 vf4) (nop!) - (.sub.w.vf vf5 vf5 vf5 :mask #b1000) + (.sub.w.vf.w vf5 vf5 vf5) (nop!) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (nop!) (.wait.vf) (nop!) - (.add.vf vf2 vf0 Q :mask #b1) + (.add.vf.x vf2 vf0 Q) (nop!) - (.add.x.vf vf2 vf0 vf2 :mask #b111) + (.add.x.vf.xyz vf2 vf0 vf2) (nop!) - (.mul.z.vf vf3 vf2 vf23 :mask #b1) + (.mul.z.vf.x vf3 vf2 vf23) (nop!) - (.mul.x.vf vf4 vf2 vf26 :mask #b1) + (.mul.x.vf.x vf4 vf2 vf26) (nop!) - (.mul.y.vf vf5 vf2 vf29 :mask #b1) + (.mul.y.vf.x vf5 vf2 vf29) (nop!) - (.mul.y.vf vf3 vf2 vf24 :mask #b10) + (.mul.y.vf.y vf3 vf2 vf24) (nop!) - (.mul.z.vf vf4 vf2 vf27 :mask #b10) + (.mul.z.vf.y vf4 vf2 vf27) (nop!) - (.mul.x.vf vf5 vf2 vf30 :mask #b10) + (.mul.x.vf.y vf5 vf2 vf30) (nop!) - (.mul.z.vf vf3 vf2 vf25 :mask #b100) + (.mul.z.vf.z vf3 vf2 vf25) (nop!) - (.mul.x.vf vf4 vf2 vf28 :mask #b100) + (.mul.x.vf.z vf4 vf2 vf28) (nop!) - (.mul.y.vf vf5 vf2 vf31 :mask #b100) + (.mul.y.vf.z vf5 vf2 vf31) (nop!) (.mul.x.vf acc vf3 vf1) (.svf (&-> arg0 rvec quad) vf3) (.add.mul.y.vf acc vf4 vf1 acc) (.svf (&-> arg0 uvec quad) vf4) - (.add.mul.z.vf vf6 vf5 vf1 acc :mask #b111) + (.add.mul.z.vf.xyz vf6 vf5 vf1 acc) (.svf (&-> arg0 fvec quad) vf5) (nop!) (.svf (&-> arg0 trans quad) vf6) @@ -862,52 +862,52 @@ (let ((v1-1 (logior a3-2 a1-1))) (.mov vf5 arg2) (let ((v1-2 (+ v1-1 1))) - (.sub.x.vf vf5 vf0 vf6 :mask #b1000) - (b! (zero? v1-2) cfg-2 :delay (.add.x.vf vf5 vf0 vf6 :mask #b10)) + (.sub.x.vf.w vf5 vf0 vf6) + (b! (zero? v1-2) cfg-2 :delay (.add.x.vf.y vf5 vf0 vf6)) ) ) ) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (nop!) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (nop!) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (nop!) - (.mul.x.vf vf11 vf1 vf5 :mask #b111) + (.mul.x.vf.xyz vf11 vf1 vf5) (nop!) - (.add.y.vf vf7 vf0 vf5 :mask #b1) + (.add.y.vf.x vf7 vf0 vf5) (nop!) - (.add.y.vf vf8 vf0 vf5 :mask #b10) + (.add.y.vf.y vf8 vf0 vf5) (nop!) - (.add.y.vf vf9 vf0 vf5 :mask #b100) + (.add.y.vf.z vf9 vf0 vf5) (nop!) - (.mul.w.vf vf10 vf1 vf5 :mask #b111) + (.mul.w.vf.xyz vf10 vf1 vf5) (nop!) - (.sub.z.vf vf7 vf0 vf11 :mask #b10) + (.sub.z.vf.y vf7 vf0 vf11) (nop!) - (.add.y.vf vf7 vf0 vf11 :mask #b100) + (.add.y.vf.z vf7 vf0 vf11) (nop!) - (.add.z.vf vf8 vf0 vf11 :mask #b1) + (.add.z.vf.x vf8 vf0 vf11) (nop!) - (.sub.x.vf vf8 vf0 vf11 :mask #b100) + (.sub.x.vf.z vf8 vf0 vf11) (nop!) - (.mul.x.vf vf2 vf10 vf1 :mask #b111) + (.mul.x.vf.xyz vf2 vf10 vf1) (nop!) - (.mul.y.vf vf3 vf10 vf1 :mask #b111) + (.mul.y.vf.xyz vf3 vf10 vf1) (nop!) - (.mul.z.vf vf4 vf10 vf1 :mask #b111) + (.mul.z.vf.xyz vf4 vf10 vf1) (nop!) - (.sub.y.vf vf9 vf0 vf11 :mask #b1) + (.sub.y.vf.x vf9 vf0 vf11) (nop!) - (.add.x.vf vf9 vf0 vf11 :mask #b10) + (.add.x.vf.y vf9 vf0 vf11) (nop!) - (.add.vf vf2 vf2 vf7 :mask #b111) + (.add.vf.xyz vf2 vf2 vf7) (nop!) - (.add.vf vf3 vf3 vf8 :mask #b111) + (.add.vf.xyz vf3 vf3 vf8) (nop!) (nop!) (nop!) - (.add.vf vf4 vf4 vf9 :mask #b111) + (.add.vf.xyz vf4 vf4 vf9) (nop!) (nop!) (.svf (&-> arg0 rvec quad) vf2) @@ -981,53 +981,53 @@ (.mov vf5 a0-3) ) (let ((v1-3 (+ v1-2 1))) - (.sub.x.vf vf5 vf0 vf6 :mask #b1000) - (b! (zero? v1-3) cfg-2 :delay (.add.x.vf vf5 vf0 vf6 :mask #b10)) + (.sub.x.vf.w vf5 vf0 vf6) + (b! (zero? v1-3) cfg-2 :delay (.add.x.vf.y vf5 vf0 vf6)) ) ) ) ) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf2 vf0 vf0) (nop!) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf3 vf0 vf0) (nop!) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf4 vf0 vf0) (nop!) - (.mul.x.vf vf11 vf1 vf5 :mask #b111) + (.mul.x.vf.xyz vf11 vf1 vf5) (nop!) - (.add.y.vf vf7 vf0 vf5 :mask #b1) + (.add.y.vf.x vf7 vf0 vf5) (nop!) - (.add.y.vf vf8 vf0 vf5 :mask #b10) + (.add.y.vf.y vf8 vf0 vf5) (nop!) - (.add.y.vf vf9 vf0 vf5 :mask #b100) + (.add.y.vf.z vf9 vf0 vf5) (nop!) - (.mul.w.vf vf10 vf1 vf5 :mask #b111) + (.mul.w.vf.xyz vf10 vf1 vf5) (nop!) - (.sub.z.vf vf7 vf0 vf11 :mask #b10) + (.sub.z.vf.y vf7 vf0 vf11) (nop!) - (.add.y.vf vf7 vf0 vf11 :mask #b100) + (.add.y.vf.z vf7 vf0 vf11) (nop!) - (.add.z.vf vf8 vf0 vf11 :mask #b1) + (.add.z.vf.x vf8 vf0 vf11) (nop!) - (.sub.x.vf vf8 vf0 vf11 :mask #b100) + (.sub.x.vf.z vf8 vf0 vf11) (nop!) - (.mul.x.vf vf2 vf10 vf1 :mask #b111) + (.mul.x.vf.xyz vf2 vf10 vf1) (nop!) - (.mul.y.vf vf3 vf10 vf1 :mask #b111) + (.mul.y.vf.xyz vf3 vf10 vf1) (nop!) - (.mul.z.vf vf4 vf10 vf1 :mask #b111) + (.mul.z.vf.xyz vf4 vf10 vf1) (nop!) - (.sub.y.vf vf9 vf0 vf11 :mask #b1) + (.sub.y.vf.x vf9 vf0 vf11) (nop!) - (.add.x.vf vf9 vf0 vf11 :mask #b10) + (.add.x.vf.y vf9 vf0 vf11) (nop!) - (.add.vf vf2 vf2 vf7 :mask #b111) + (.add.vf.xyz vf2 vf2 vf7) (nop!) - (.add.vf vf3 vf3 vf8 :mask #b111) + (.add.vf.xyz vf3 vf3 vf8) (nop!) (nop!) (nop!) - (.add.vf vf4 vf4 vf9 :mask #b111) + (.add.vf.xyz vf4 vf4 vf9) (nop!) (nop!) (.svf (&-> v0-0 rvec quad) vf2) @@ -1139,9 +1139,9 @@ (.lvf vf10 (&-> arg0 rvec quad)) (.outer.product.a.vf acc vf11 vf12) (.outer.product.b.vf vf13 vf12 vf11 acc) - (.mul.vf vf13 vf13 vf10 :mask #b111) - (.add.y.vf vf13 vf13 vf13 :mask #b1) - (.add.z.vf vf13 vf13 vf13 :mask #b1) + (.mul.vf.xyz vf13 vf13 vf10) + (.add.y.vf.x vf13 vf13 vf13) + (.add.z.vf.x vf13 vf13 vf13) (.mov v0-0 vf13) v0-0 ) @@ -1241,15 +1241,15 @@ (.outer.product.b.vf vf13 vf12 vf11 acc) (.outer.product.a.vf acc vf12 vf10) (.outer.product.b.vf vf14 vf10 vf12 acc) - (.mul.vf vf1 vf10 vf13 :mask #b111) + (.mul.vf.xyz vf1 vf10 vf13) (.outer.product.a.vf acc vf10 vf11) (.outer.product.b.vf vf15 vf11 vf10 acc) (.nop.vf) - (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1298,28 +1298,28 @@ (let ((f2-1 (gpr->fpr v1-0))) (.lvf vf12 (&-> arg1 fvec quad)) (.madda.s f0-0 f0-0) - (.sub.w.vf vf13 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf13 vf0 vf0) (.madd.s f0-1 f1-0 f1-0) - (.sub.w.vf vf14 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf14 vf0 vf0) (.rsqrt.s f0-2 f2-1 f0-1) ) ) - (.sub.w.vf vf15 vf0 vf0 :mask #b1000) + (.sub.w.vf.w vf15 vf0 vf0) (let ((v1-1 f0-2)) (.mov vf16 v1-1) ) - (.mul.x.vf vf13 vf10 vf16 :mask #b111) + (.mul.x.vf.xyz vf13 vf10 vf16) (.outer.product.a.vf acc vf11 vf13) (.outer.product.b.vf vf14 vf13 vf11 acc) (.outer.product.a.vf acc vf13 vf14) (.outer.product.b.vf vf14 vf14 vf13 acc) - (.mul.vf vf16 vf14 vf14 :mask #b111) - (.mul.x.vf acc vf0 vf16 :mask #b1000) - (.add.mul.y.vf acc vf0 vf16 acc :mask #b1000) - (.add.mul.z.vf vf16 vf0 vf16 acc :mask #b1000) + (.mul.vf.xyz vf16 vf14 vf14) + (.mul.x.vf.w acc vf0 vf16) + (.add.mul.y.vf.w acc vf0 vf16 acc) + (.add.mul.z.vf.w vf16 vf0 vf16 acc) (.isqrt.vf Q vf0 vf16 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf14 vf14 Q :mask #b111) + (.mul.vf.xyz vf14 vf14 Q) (.outer.product.a.vf acc vf13 vf14) (.outer.product.b.vf vf15 vf14 vf13 acc) (.svf (&-> arg0 rvec quad) vf13) @@ -1687,10 +1687,10 @@ (.lvf vf2 (&-> arg0 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg1 quad) vf2) arg1 ) @@ -1765,10 +1765,10 @@ (.lvf vf2 (&-> arg1 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 trans quad) vf2) (let ((s4-0 (matrix-copy! (new 'stack-no-clear 'matrix) arg1))) (vector-normalize! (-> s4-0 rvec) 1.0) diff --git a/test/decompiler/reference/jak3/engine/math/quaternion_REF.gc b/test/decompiler/reference/jak3/engine/math/quaternion_REF.gc index eda7065496e..7a256f8dd51 100644 --- a/test/decompiler/reference/jak3/engine/math/quaternion_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/quaternion_REF.gc @@ -191,8 +191,8 @@ ) (.lvf vf1 (&-> arg1 quad)) (.sub.vf vf2 vf2 vf2) - (.sub.vf vf2 vf2 vf1 :mask #b111) - (.add.vf vf2 vf2 vf1 :mask #b1000) + (.sub.vf.xyz vf2 vf2 vf1) + (.add.vf.w vf2 vf2 vf1) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -232,9 +232,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -252,9 +252,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf1 vf1 vf1) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v1-1 vf1) (sqrtf v1-1) @@ -273,9 +273,9 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.mul.vf vf2 vf1 vf1) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) (.mul.vf vf2 vf1 Q) @@ -302,12 +302,12 @@ (.lvf vf1 (&-> arg1 quad)) (.mul.vf vf2 vf1 vf1) (.sub.vf vf3 vf3 vf3) - (.add.z.vf acc vf2 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.x.vf vf2 vf0 vf2 acc :mask #b1000) - (.sub.vf vf3 vf3 vf1 :mask #b111) + (.add.z.vf.w acc vf2 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.x.vf.w vf2 vf0 vf2 acc) + (.sub.vf.xyz vf3 vf3 vf1) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) - (.add.vf vf3 vf3 vf1 :mask #b1000) + (.add.vf.w vf3 vf3 vf1) (.wait.vf) (.mul.vf vf3 vf3 Q) (.nop.vf) @@ -330,9 +330,9 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.z.vf acc vf1 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.x.vf vf1 vf0 vf1 acc :mask #b1000) + (.add.z.vf.w acc vf1 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.x.vf.w vf1 vf0 vf1 acc) (.add.w.vf vf1 vf0 vf1) (.mov v0-0 vf1) v0-0 @@ -352,16 +352,16 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.sub.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.w vf4 vf0 vf0) (.mul.vf vf3 vf1 vf2) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf4 vf2 vf1 acc) (.mul.w.vf acc vf1 vf2) (.add.mul.w.vf acc vf2 vf1 acc) - (.sub.mul.w.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.z.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.sub.mul.x.vf acc vf0 vf3 acc :mask #b1000) + (.sub.mul.w.vf.w acc vf0 vf3 acc) + (.sub.mul.z.vf.w acc vf0 vf3 acc) + (.sub.mul.y.vf.w acc vf0 vf3 acc) + (.sub.mul.x.vf.w acc vf0 vf3 acc) (.add.mul.w.vf vf1 vf4 vf0 acc) (.svf (&-> arg0 quad) vf1) arg0 @@ -442,27 +442,27 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.add.vf vf5 vf1 vf1) - (.add.w.vf vf2 vf0 vf1 :mask #b1) - (.add.z.vf vf2 vf0 vf1 :mask #b10) - (.sub.y.vf vf2 vf0 vf1 :mask #b100) - (.sub.w.vf vf2 vf0 vf0 :mask #b1000) - (.sub.z.vf vf3 vf0 vf1 :mask #b1) - (.add.w.vf vf3 vf0 vf1 :mask #b10) - (.add.x.vf vf3 vf0 vf1 :mask #b100) - (.sub.w.vf vf3 vf0 vf0 :mask #b1000) - (.add.y.vf vf4 vf0 vf1 :mask #b1) - (.sub.x.vf vf4 vf0 vf1 :mask #b10) - (.add.w.vf vf4 vf0 vf1 :mask #b100) - (.sub.w.vf vf4 vf0 vf0 :mask #b1000) + (.add.w.vf.x vf2 vf0 vf1) + (.add.z.vf.y vf2 vf0 vf1) + (.sub.y.vf.z vf2 vf0 vf1) + (.sub.w.vf.w vf2 vf0 vf0) + (.sub.z.vf.x vf3 vf0 vf1) + (.add.w.vf.y vf3 vf0 vf1) + (.add.x.vf.z vf3 vf0 vf1) + (.sub.w.vf.w vf3 vf0 vf0) + (.add.y.vf.x vf4 vf0 vf1) + (.sub.x.vf.y vf4 vf0 vf1) + (.add.w.vf.z vf4 vf0 vf1) + (.sub.w.vf.w vf4 vf0 vf0) (.outer.product.a.vf acc vf5 vf2) (.outer.product.b.vf vf2 vf2 vf5 acc) (.outer.product.a.vf acc vf5 vf3) (.outer.product.b.vf vf3 vf3 vf5 acc) (.outer.product.a.vf acc vf5 vf4) (.outer.product.b.vf vf4 vf4 vf5 acc) - (.add.w.vf vf2 vf2 vf0 :mask #b1) - (.add.w.vf vf3 vf3 vf0 :mask #b10) - (.add.w.vf vf4 vf4 vf0 :mask #b100) + (.add.w.vf.x vf2 vf2 vf0) + (.add.w.vf.y vf3 vf3 vf0) + (.add.w.vf.z vf4 vf4 vf0) (.svf (&-> arg0 trans quad) vf0) (.svf (&-> arg0 rvec quad) vf2) (.svf (&-> arg0 uvec quad) vf3) @@ -632,7 +632,7 @@ ;; definition for function quaternion-exp! (defun quaternion-exp! ((arg0 quaternion) (arg1 quaternion)) "Quaternion exponentiation. Unused." - (let ((f30-0 (vector-length (the-as vector arg1)))) + (let ((f30-0 (vector-length (-> arg1 vec)))) (cond ((= f30-0 0.0) (set! (-> arg0 x) 0.0) @@ -821,17 +821,17 @@ (.lvf vf1 (&-> gp-0 quad)) (.lvf vf2 (&-> s5-0 quad)) ) - (.mul.x.vf vf4 vf0 vf1 :mask #b1000) - (.add.vf vf4 vf0 vf2 :mask #b111) - (.sub.vf vf4 vf0 vf4 :mask #b110) - (.add.vf vf3 vf0 vf1 :mask #b111) - (.mul.x.vf vf3 vf0 vf2 :mask #b1000) + (.mul.x.vf.w vf4 vf0 vf1) + (.add.vf.xyz vf4 vf0 vf2) + (.sub.vf.yz vf4 vf0 vf4) + (.add.vf.xyz vf3 vf0 vf1) + (.mul.x.vf.w vf3 vf0 vf2) (.outer.product.a.vf acc vf1 vf1) (.outer.product.b.vf vf6 vf0 vf0 acc) (.outer.product.a.vf acc vf2 vf2) (.outer.product.b.vf vf5 vf0 vf0 acc) - (.mul.x.vf vf6 vf0 vf6 :mask #b1000) - (.mul.x.vf vf5 vf0 vf5 :mask #b1000) + (.mul.x.vf.w vf6 vf0 vf6) + (.mul.x.vf.w vf5 vf0 vf5) (.mul.vf acc vf6 vf4) (.add.mul.vf vf7 vf5 vf3 acc) (.svf (&-> arg0 quad) vf7) @@ -999,7 +999,7 @@ (defun vector-rotate-around-axis! ((arg0 vector) (arg1 quaternion) (arg2 float) (arg3 vector)) "Rotate along y so z-axis points to match another. Use arg3 as the max rotation amount." (let ((a2-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) arg3 arg2))) - (vector-orient-by-quat! arg0 (the-as vector arg1) a2-1) + (vector-orient-by-quat! arg0 (-> arg1 vec) a2-1) ) ) diff --git a/test/decompiler/reference/jak3/engine/math/transformq_REF.gc b/test/decompiler/reference/jak3/engine/math/transformq_REF.gc index 7f4000d741f..74e3ec731c5 100644 --- a/test/decompiler/reference/jak3/engine/math/transformq_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/transformq_REF.gc @@ -302,7 +302,7 @@ (.lvf vf3 (&-> arg0 rvec quad)) (.lvf vf4 (&-> arg0 uvec quad)) (.lvf vf5 (&-> arg0 fvec quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) @@ -365,14 +365,14 @@ (.lvf vf3 (&-> arg0 rvec quad)) (.lvf vf4 (&-> arg0 uvec quad)) (.lvf vf5 (&-> arg0 fvec quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) (.mul.x.vf acc vf3 vf6) (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 rvec quad) vf3) (.svf (&-> arg0 uvec quad) vf4) @@ -400,11 +400,11 @@ (.lvf vf3 (&-> arg0 rvec quad)) (.lvf vf4 (&-> arg0 uvec quad)) (.lvf vf5 (&-> arg0 fvec quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) - (.add.vf vf2 vf2 vf6 :mask #b111) + (.add.vf.xyz vf2 vf2 vf6) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 rvec quad) vf3) (.svf (&-> arg0 uvec quad) vf4) @@ -433,7 +433,7 @@ (set! (-> v1-0 z) (/ 1.0 (-> arg2 z))) (.lvf vf1 (&-> arg1 scale quad)) (.lvf vf2 (&-> arg1 trans quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.lvf vf4 (&-> arg0 rvec quad)) (.lvf vf5 (&-> arg0 uvec quad)) (.lvf vf6 (&-> arg0 fvec quad)) @@ -475,7 +475,7 @@ (.lvf vf3 (&-> arg0 rvec quad)) (.lvf vf4 (&-> arg0 uvec quad)) (.lvf vf5 (&-> arg0 fvec quad)) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) @@ -483,7 +483,7 @@ (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) (.sub.mul.w.vf acc vf6 vf0 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> arg0 trans quad) vf2) (.svf (&-> arg0 rvec quad) vf3) (.svf (&-> arg0 uvec quad) vf4) diff --git a/test/decompiler/reference/jak3/engine/math/vector-h_REF.gc b/test/decompiler/reference/jak3/engine/math/vector-h_REF.gc index c1937e66d3e..20dfd8e3115 100644 --- a/test/decompiler/reference/jak3/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/vector-h_REF.gc @@ -938,8 +938,8 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -966,11 +966,11 @@ (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.w.vf vf3 vf0 vf0 :mask #b1) - (.mul.x.vf acc vf3 vf1 :mask #b1) - (.add.mul.y.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.z.vf acc vf3 vf1 acc :mask #b1) - (.add.mul.w.vf vf1 vf3 vf1 acc :mask #b1) + (.add.w.vf.x vf3 vf0 vf0) + (.mul.x.vf.x acc vf3 vf1) + (.add.mul.y.vf.x acc vf3 vf1 acc) + (.add.mul.z.vf.x acc vf3 vf1 acc) + (.add.mul.w.vf.x vf1 vf3 vf1 acc) (.mov v0-0 vf1) v0-0 ) diff --git a/test/decompiler/reference/jak3/engine/math/vector_REF.gc b/test/decompiler/reference/jak3/engine/math/vector_REF.gc index b5712a04710..f1ced7c36d3 100644 --- a/test/decompiler/reference/jak3/engine/math/vector_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/vector_REF.gc @@ -19,8 +19,8 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.add.x.vf vf1 vf0 vf0 :mask #b10) - (.add.x.vf vf2 vf0 vf0 :mask #b10) + (.add.x.vf.y vf1 vf0 vf0) + (.add.x.vf.y vf2 vf0 vf0) (.outer.product.a.vf acc vf1 vf2) (.outer.product.b.vf vf3 vf2 vf1 acc) (.svf (&-> arg0 quad) vf3) @@ -39,8 +39,8 @@ (init-vf0-vector) (.mov vf6 arg2) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> arg0 quad) vf5) arg0 ) @@ -66,9 +66,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -88,9 +88,9 @@ (.mov vf7 arg3) (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.w.vf acc vf4 vf0 :mask #b111) - (.sub.mul.x.vf vf6 vf5 vf7 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.w.vf.xyz acc vf4 vf0) + (.sub.mul.x.vf.xyz vf6 vf5 vf7 acc) (.svf (&-> arg0 quad) vf6) arg0 ) @@ -110,19 +110,19 @@ (init-vf0-vector) (.lvf vf5 (&-> arg2 quad)) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b1) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf6 vf0 vf0) (.lvf vf4 (&-> arg1 quad)) (let ((v1-0 (/ (-> arg1 x) (-> arg2 x)))) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b10) + (.mul.vf.y vf6 vf4 Q) (.nop.vf) (.nop.vf) (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b10) (.mov vf7 v1-0) ) - (.add.x.vf vf6 vf0 vf7 :mask #b1) + (.add.x.vf.x vf6 vf0 vf7) (.wait.vf) - (.mul.vf vf6 vf4 Q :mask #b100) + (.mul.vf.z vf6 vf4 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf6) @@ -140,8 +140,8 @@ (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) (.mov vf2 arg2) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -163,9 +163,9 @@ (.lvf vf2 (&-> arg2 quad)) (.mov vf3 v1-0) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf1 vf3) - (.add.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.add.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -185,9 +185,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -208,9 +208,9 @@ (.lvf vf2 (&-> arg2 quad)) (.lvf vf1 (&-> arg1 quad)) (.mov vf3 arg3) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.w.vf acc vf1 vf0) - (.sub.mul.x.vf vf4 vf2 vf3 acc :mask #b111) + (.sub.mul.x.vf.xyz vf4 vf2 vf3 acc) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -247,9 +247,9 @@ (.mov vf3 arg2) (.div.vf Q vf0 vf3 :fsf #b11 :ftf #b0) (.lvf vf1 (&-> arg1 quad)) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.wait.vf) - (.mul.vf vf4 vf1 Q :mask #b111) + (.mul.vf.xyz vf4 vf1 Q) (.nop.vf) (.nop.vf) (.svf (&-> arg0 quad) vf4) @@ -266,8 +266,8 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg1 quad)) - (.sub.vf vf4 vf0 vf1 :mask #b111) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.sub.vf.xyz vf4 vf0 vf1) + (.add.x.vf.w vf4 vf0 vf0) (.svf (&-> arg0 quad) vf4) arg0 ) @@ -281,7 +281,7 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.sub.vf vf1 vf0 vf1 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf1) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -305,10 +305,10 @@ (.lvf vf2 (&-> arg1 quad)) (.sub.vf vf1 vf2 vf1) (.abs.vf vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf1 acc :mask #b1000) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf3 vf0 vf1 acc) + (.add.w.vf.x vf3 vf0 vf3) (.mov v0-0 vf3) v0-0 ) @@ -329,12 +329,12 @@ (.mov vf4 arg2) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg0 quad)) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.sub.x.vf vf5 vf0 vf4 :mask #b1) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.min.x.vf vf3 vf3 vf4 :mask #b111) - (.max.x.vf vf3 vf3 vf5 :mask #b111) - (.add.vf vf1 vf2 vf3 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.sub.x.vf.x vf5 vf0 vf4) + (.sub.vf.xyz vf3 vf1 vf2) + (.min.x.vf.xyz vf3 vf3 vf4) + (.max.x.vf.xyz vf3 vf3 vf5) + (.add.vf.xyz vf1 vf2 vf3) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -362,9 +362,9 @@ ) (.lvf vf5 (&-> v1-0 quad)) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -586,8 +586,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -608,8 +608,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> arg0 quad) vf1) arg0 ) @@ -632,11 +632,11 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v0-0 vf1) v0-0 ) @@ -670,13 +670,13 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf acc vf0 vf1 acc :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w acc vf0 vf1 acc) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -696,8 +696,8 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -719,12 +719,12 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.z.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.z.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -748,12 +748,12 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf0 vf1 :mask #b1000) - (.add.mul.y.vf vf1 vf0 vf1 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf1) + (.add.mul.y.vf.w vf1 vf0 vf1 acc) (.sqrt.vf Q vf1 :ftf #b11) - (.add.w.vf vf1 vf0 vf0 :mask #b1) + (.add.w.vf.x vf1 vf0 vf0) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b1) + (.mul.vf.x vf1 vf1 Q) (.nop.vf) (.nop.vf) (.mov v0-0 vf1) @@ -773,7 +773,7 @@ (.lvf vf3 (&-> arg1 quad)) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v0-0 vf1) v0-0 ) @@ -799,16 +799,16 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -831,19 +831,19 @@ ) (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-0 arg1)) (.mov vf3 v1-0) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) - (.add.w.vf vf2 vf0 vf2 :mask #b1) + (.add.w.vf.x vf2 vf0 vf2) (.mov v1-1 vf2) (let ((v0-0 (sqrtf v1-1))) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1114,10 +1114,10 @@ (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) (.mov vf4 arg3) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> arg0 quad) vf3) arg0 ) @@ -1151,10 +1151,10 @@ (.mov vf4 a1-1) ) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-3 quad) vf3) ) ) @@ -1600,13 +1600,13 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> arg1 quad)) - (.sub.vf vf3 vf1 vf2 :mask #b111) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.add.y.vf vf3 vf3 vf3 :mask #b1) - (.add.z.vf vf3 vf3 vf3 :mask #b1) - (.add.w.vf vf4 vf0 vf4 :mask #b1) + (.sub.vf.xyz vf3 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.w.vf.w vf4 vf4 vf4) + (.add.y.vf.x vf3 vf3 vf3) + (.add.z.vf.x vf3 vf3 vf3) + (.add.w.vf.x vf4 vf0 vf4) (.mov a0-1 vf4) (.mov v1-0 vf3) (>= a0-1 v1-0) @@ -1666,11 +1666,11 @@ 1.0 ) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-3 vf1) (set! f0-5 v1-3) ) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc index c4342588048..4e3e8953708 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc @@ -314,7 +314,7 @@ ;; definition for method 11 of type nav-control (defmethod find-poly-containing-point-1 ((this nav-control) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> v1-0 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> v1-0 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> this state mesh) v1-0) @@ -324,7 +324,7 @@ ;; definition for method 15 of type nav-control (defmethod find-poly-containing-point-2 ((this nav-control) (arg0 vector)) (let ((v1-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> v1-0 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> v1-0 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> this state mesh) v1-0) @@ -335,7 +335,7 @@ ;; WARN: Return type mismatch object vs symbol. (defmethod is-above-poly-max-height? ((this nav-control) (arg0 vector) (arg1 float)) (let ((a1-1 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> a1-1 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (vector-! (-> a1-1 vertex 0) arg0 (the-as vector (-> this state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> this nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (the-as @@ -383,7 +383,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-4 vf1) (let ((f1-0 a2-4) (f0-1 (+ (-> arg1 r) (-> arg0 shape nav-radius))) @@ -429,7 +429,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov t0-4 vf1) (let ((f1-0 t0-4) (f0-2 (+ (-> arg2 r) (-> v1-4 shape nav-radius))) @@ -463,7 +463,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-6 vf1) (let ((f1-1 a2-6) (f0-4 (+ (-> a0-1 w) (-> v1-9 shape nav-radius))) @@ -607,17 +607,17 @@ ) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t2-3 f0-1)) (.mov vf3 t2-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -649,9 +649,9 @@ ) (.lvf vf4 (&-> a1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-1 quad) vf6) ) (let ((v0-0 arg3)) @@ -660,9 +660,9 @@ ) (.lvf vf5 (&-> v1-0 quad)) (.lvf vf4 (&-> a0-9 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -792,17 +792,17 @@ (let ((v1-1 (-> s5-0 in-dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-1)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -832,7 +832,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a1-3 vf1) (set! (-> s5-0 dist2) a1-3) (let ((f0-14 (-> arg0 closest-sphere-dist2)) @@ -842,9 +842,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-14 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-10)) ) (set! (-> s5-0 inside-dist) (- (-> a0-13 r) (sqrtf (-> s5-0 dist2)))) @@ -874,12 +874,7 @@ (label cfg-13) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-17 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-17 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-17 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-20 2) (let ((a0-28 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-20)))) @@ -906,7 +901,7 @@ (circle-tangent-directions (-> arg0 current-pos) (-> this sphere-array v1-28) - (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1) ) (set! (-> s5-0 dir-update) #f) @@ -961,17 +956,17 @@ (let ((v1-51 (-> s5-0 away-dir))) (let ((f0-42 1.0)) (.lvf vf1 (&-> v1-51 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-60 f0-42)) (.mov vf3 a0-60) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -989,10 +984,10 @@ (.mov vf4 a0-62) ) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-52 0 quad) vf3) ) (let ((v1-53 (-> s5-0 best-dir 1))) @@ -1005,10 +1000,10 @@ (let ((a0-64 f0-44)) (.mov vf4 a0-64) ) - (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf3 vf0 vf0) (.sub.vf vf2 vf2 vf1) (.mul.x.vf vf2 vf2 vf4) - (.add.vf vf3 vf1 vf2 :mask #b111) + (.add.vf.xyz vf3 vf1 vf2) (.svf (&-> v1-53 quad) vf3) ) ) @@ -1016,17 +1011,17 @@ (let ((v1-54 (-> s5-0 best-dir))) (let ((f0-45 1.0)) (.lvf vf1 (&-> v1-54 0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-66 f0-45)) (.mov vf3 a0-66) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1035,26 +1030,26 @@ (let ((v1-55 (-> s5-0 best-dir 1))) (let ((f0-46 1.0)) (.lvf vf1 (&-> v1-55 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-68 f0-46)) (.mov vf3 a0-68) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) (.svf (&-> v1-55 quad) vf1) ) ) - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-41 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-52) 0 1 @@ -1062,7 +1057,7 @@ ) (v1-65 (- 1 a1-41)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-65) (-> s5-0 travel-len)) ) ) @@ -1091,17 +1086,17 @@ (let ((v1-1 (-> s5-0 in-dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-1)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1129,7 +1124,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a1-3 vf1) (set! (-> s5-0 dist2) a1-3) (let ((f0-13 (-> arg0 closest-sphere-dist2)) @@ -1139,9 +1134,9 @@ (set! (-> arg0 closest-sphere-dist2) (fmin f0-13 (- f1-0 (* f2-0 f2-0)))) ) (when (< (-> arg0 closest-sphere-dist2) 0.0) - (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (vector-! (-> s5-0 temp-dir 0) (-> arg0 current-pos) (the-as vector a0-13)) (set! (-> s5-0 temp-dir 0 y) 0.0) - (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (if (< 0.0 (vector-dot (-> s5-0 temp-dir 0) (-> s5-0 in-dir))) (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-9)) ) ) @@ -1166,12 +1161,7 @@ (label cfg-11) (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) (let ((a1-15 (-> this sphere-array (-> s5-0 i-first-sphere)))) - (circle-tangent-directions - (-> arg0 current-pos) - a1-15 - (the-as vector (-> s5-0 temp-dir)) - (-> s5-0 temp-dir 1) - ) + (circle-tangent-directions (-> arg0 current-pos) a1-15 (-> s5-0 temp-dir 0) (-> s5-0 temp-dir 1)) ) (dotimes (v1-19 2) (let ((a0-31 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-19)))) @@ -1185,9 +1175,9 @@ ) ) 0 - (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 0)) (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) - (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 0))) (a1-25 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-28) 0 1 @@ -1195,7 +1185,7 @@ ) (v1-32 (- 1 a1-25)) ) - (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 0) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-32) (-> s5-0 travel-len)) ) ) @@ -1301,17 +1291,17 @@ (let ((a1-6 (-> v1-16 dir))) (let ((f0-5 1.0)) (.lvf vf1 (&-> a1-6 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a2-4 f0-5)) (.mov vf3 a2-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1607,17 +1597,17 @@ (let ((t3-5 (-> v1-15 dir))) (let ((f0-5 1.0)) (.lvf vf1 (&-> t3-5 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t4-6 f0-5)) (.mov vf3 t4-6) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1816,17 +1806,17 @@ (let ((v1-21 (-> arg1 pref-dir))) (let ((f0-6 1.0)) (.lvf vf1 (&-> v1-21 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-12 f0-6)) (.mov vf3 a0-12) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2089,17 +2079,17 @@ (let ((a0-6 (-> v1-10 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-6 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-8 f0-1)) (.mov vf3 a1-8) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2224,10 +2214,9 @@ (set! sv-16 arg0) (let ((gp-0 (new 'stack-no-clear 'nav-poly))) (set! (-> gp-0 vertex1 z) (the-as float arg2)) - (vector-! (the-as vector (-> gp-0 vertex)) arg1 (the-as vector (-> this state mesh bounds))) + (vector-! (-> gp-0 vertex 0) arg1 (the-as vector (-> this state mesh bounds))) (when (or (not (-> gp-0 vertex1 z)) - (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (the-as vector (-> gp-0 vertex))) - ) + (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (-> gp-0 vertex 0))) ) (set! (-> gp-0 vertex1 x) (-> this nearest-y-threshold)) (set! (-> gp-0 data 20) (the-as uint 3)) @@ -2238,7 +2227,7 @@ (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) sv-16 - (the-as vector (-> gp-0 vertex)) + (-> gp-0 vertex 0) ) (vector+! sv-16 sv-16 (the-as vector (-> this state mesh bounds))) ) @@ -2286,7 +2275,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-2 vf1) (let ((f1-0 v1-2)) (let ((v1-3 arg0) @@ -2297,7 +2286,7 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-4 vf1) (let ((v0-0 (>= f0-2 (fmin f1-0 v1-4)))) (when (not v0-0) @@ -2502,11 +2491,11 @@ ) ) (.lvf vf1 (&-> (-> this travel) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-117 vf1) (let ((f0-15 v1-117) (f1-10 (-> this nav nav-cull-radius)) @@ -2568,17 +2557,17 @@ (let ((t0-3 (-> a3-3 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> t0-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t1-2 f0-2)) (.mov vf3 t1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2739,17 +2728,17 @@ (let ((a2-3 (-> a1-4 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a2-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a3-2 f0-2)) (.mov vf3 a3-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2871,17 +2860,17 @@ (let ((v1-1 (-> this target-dir))) (let ((f0-0 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-4 f0-0)) (.mov vf3 a0-4) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2900,17 +2889,17 @@ (let ((v1-12 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-9 f0-5)) (.mov vf3 a0-9) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -2947,17 +2936,17 @@ (let ((v1-30 (-> this heading))) (let ((f0-12 1.0)) (.lvf vf1 (&-> v1-30 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-15 f0-12)) (.mov vf3 a0-15) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3081,17 +3070,17 @@ (let ((v1-12 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3242,17 +3231,17 @@ (let ((v1-12 (-> s5-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3394,17 +3383,17 @@ (let ((a3-3 (-> a2-3 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a3-3 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((t0-2 f0-2)) (.mov vf3 t0-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3529,19 +3518,19 @@ (vector-reset! (-> s5-0 in-dir)) (set! (-> s5-0 best-dir 0 quad) (-> this travel quad)) (set! (-> s5-0 best-dir 0 y) 0.0) - (vector-normalize! (the-as vector (-> s5-0 best-dir)) (-> this nav target-speed)) - (vector-! (-> s5-0 right-dir) (the-as vector (-> s5-0 best-dir)) (-> this velocity)) + (vector-normalize! (-> s5-0 best-dir 0) (-> this nav target-speed)) + (vector-! (-> s5-0 right-dir) (-> s5-0 best-dir 0) (-> this velocity)) (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) 4.0) (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) (dotimes (s4-0 (-> this nav sphere-count)) (let ((s3-0 (-> this nav sphere-array s4-0))) (vector-! (-> s5-0 right-dir) (-> this current-pos-local) (the-as vector s3-0)) (.lvf vf1 (&-> (-> s5-0 right-dir) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-11 vf1) (let ((f30-0 v1-11)) (vector-normalize! (-> s5-0 right-dir) 2.0) @@ -3560,11 +3549,11 @@ (set! (-> this target-dir y) 0.0) (vector+float*! (-> this velocity) (-> this velocity) (-> this target-dir) (-> this nav sec-per-frame)) (.lvf vf1 (&-> (-> this velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (let ((f0-11 v1-25) (f1-4 (-> this nav target-speed)) @@ -3615,17 +3604,17 @@ (let ((v1-13 (-> this heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-13 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-5 f0-5)) (.mov vf3 a0-5) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3669,17 +3658,17 @@ (let ((v1-12 (-> s5-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3764,17 +3753,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -3884,17 +3873,17 @@ (let ((v1-12 (-> gp-0 heading))) (let ((f0-5 1.0)) (.lvf vf1 (&-> v1-12 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-3 f0-5)) (.mov vf3 a0-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc index 964ca8c0bb4..a9598b8d3ff 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc @@ -207,7 +207,7 @@ (if *target* (look-at! (-> *target* neck) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) 'attacking ) @@ -483,7 +483,7 @@ (a0-1 arg0) (a1-1 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-0 state mesh bounds))) + (vector-! (-> a1-1 vertex 0) a0-1 (the-as vector (-> v1-0 state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> v1-0 nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> v1-0 state mesh) a1-1) @@ -502,7 +502,7 @@ (a0-1 arg0) (a1-1 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-3 state mesh bounds))) + (vector-! (-> a1-1 vertex 0) a0-1 (the-as vector (-> v1-3 state mesh bounds))) (set! (-> a1-1 vertex1 x) (-> v1-3 nearest-y-threshold)) (set! (-> a1-1 data 20) (the-as uint 2)) (nav-mesh-method-45 (-> v1-3 state mesh) a1-1) @@ -785,9 +785,9 @@ ) (.lvf vf4 (&-> a0-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-69 quad) vf6) ) (let ((v1-72 (-> this path curve cverts 1))) @@ -800,9 +800,9 @@ ) (.lvf vf4 (&-> a0-35 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-72 quad) vf6) ) (let ((v1-75 (-> this path curve cverts 2))) @@ -815,9 +815,9 @@ ) (.lvf vf4 (&-> a0-37 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-75 quad) vf6) ) ) @@ -1675,17 +1675,17 @@ (let ((v1-23 gp-0)) (let ((f0-2 1.0)) (.lvf vf1 (&-> v1-23 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-9 f0-2)) (.mov vf3 a0-9) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc index 301334bf957..341ab5b1bfd 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc @@ -178,8 +178,8 @@ (set! (-> this mem-mesh) arg0) (cond ((= (-> arg0 work mesh-struct-in-scratch) 1) - (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> (-> this nav-mesh-addr) poly-array))) - (mem-copy! (&-> (-> this nav-mesh-addr) type) (&-> arg0 type) 112) + (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> this nav-mesh-addr poly-array))) + (mem-copy! (&-> this nav-mesh-addr type) (&-> arg0 type) 112) ) (else (set! (-> this nav-mesh-addr) arg0) @@ -541,14 +541,14 @@ (set! (-> gp-0 0 q-size) (the-as uint (* 18 (-> gp-0 0 nav-count)))) (set! (-> gp-0 0 done) 0) (when (> (-> gp-0 0 nav-count) 0) - (upload-nav-to-spr this (the-as nav-engine-spr-buffer gp-0)) + (upload-nav-to-spr this (-> gp-0 0)) (dma-sync (the-as pointer #x1000d400) 0 0) - (reloc-ptrs-to-spad this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-spad this (-> gp-0 0)) (while (< (-> gp-0 0 i-pass) (-> this max-pass-count)) - (do-callbacks this (the-as nav-engine-spr-buffer gp-0)) + (do-callbacks this (-> gp-0 0)) (+! (-> gp-0 0 i-pass) 1) ) - (reloc-ptrs-to-mem this (the-as nav-engine-spr-buffer gp-0)) + (reloc-ptrs-to-mem this (-> gp-0 0)) (dotimes (s4-0 (-> gp-0 0 nav-count)) (let ((a2-1 (-> gp-0 0 spr-addr s4-0 state mesh))) (when (>= (the-as uint a2-1) (the-as uint #x70000000)) @@ -558,7 +558,7 @@ ) ) ) - (download-nav-from-spr this (the-as nav-engine-spr-buffer gp-0)) + (download-nav-from-spr this (-> gp-0 0)) (dma-sync (the-as pointer #x1000d000) 0 0) (dotimes (s5-1 (-> gp-0 0 nav-count)) (let ((a2-3 (-> (&+ (-> gp-0 0 mem-addr) (* 288 s5-1)) 31))) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc index 1689002b278..800d2af59ba 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-mesh-h_REF.gc @@ -484,17 +484,17 @@ Based on the implementation of point-poly-intersection?, these should likely be (let ((v0-0 arg0)) (let ((f0-0 1.0)) (.lvf vf1 (&-> v0-0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-1 f0-0)) (.mov vf3 v1-1) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -520,17 +520,17 @@ Based on the implementation of point-poly-intersection?, these should likely be (let ((v0-0 arg0)) (let ((f0-0 1.0)) (.lvf vf1 (&-> v0-0 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-2 f0-0)) (.mov vf3 v1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -563,17 +563,17 @@ Based on the implementation of point-poly-intersection?, these should likely be (let ((v1-1 (-> arg0 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-1 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-2 f0-1)) (.mov vf3 a1-2) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc index f3629afd4f2..bc7c5d68a85 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc @@ -206,8 +206,8 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-3 quad) vf5) ) (let ((a1-4 (-> v1-12 1))) @@ -217,8 +217,8 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-4 quad) vf5) ) (update-grid-for-objects-in-box @@ -443,8 +443,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-0 quad) vf1) ) (let ((s3-1 (new 'stack-no-clear 'nav-find-poly-parms))) @@ -469,8 +469,8 @@ (.mov at-1 f0-2) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-7 quad) vf1) ) ) @@ -1046,11 +1046,11 @@ ) (.lvf vf1 (&-> arg1 quad)) (.lvf vf2 (&-> arg2 quad)) - (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.sub.vf.yw vf1 vf1 vf1) (.lvf vf3 (&-> arg3 quad)) - (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.sub.vf.yw vf2 vf2 vf2) (.lvf vf12 (&-> arg0 quad)) - (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf.yw vf3 vf3 vf3) (.sub.vf vf4 vf2 vf1) (.sub.vf vf9 vf1 vf12) (.sub.vf vf5 vf3 vf2) @@ -1087,7 +1087,7 @@ ;; definition for method 45 of type nav-mesh (defmethod nav-mesh-method-45 ((this nav-mesh) (arg0 nav-poly)) (local-vars (v1-15 int) (sv-16 nav-poly)) - (let ((s4-0 (search-for-point (-> this poly-hash) (the-as vector (-> arg0 vertex)))) + (let ((s4-0 (search-for-point (-> this poly-hash) (-> arg0 vertex 0))) (s3-0 (-> this poly-hash bucket-size)) (s2-0 0) ) @@ -1108,7 +1108,7 @@ (when (and (and (>= (+ (-> v1-5 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-5 vertex2 w) f1-0))) (not (logtest? (-> sv-16 pat) (-> arg0 data 20))) ) - (if (point-in-poly? this sv-16 (the-as vector (-> arg0 vertex))) + (if (point-in-poly? this sv-16 (-> arg0 vertex 0)) (return sv-16) ) ) @@ -1187,17 +1187,17 @@ (let ((a0-2 (-> v1-2 dir))) (let ((f0-1 1.0)) (.lvf vf1 (&-> a0-2 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-3 f0-1)) (.mov vf3 a1-3) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1245,9 +1245,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (let ((v1-2 arg0)) @@ -1256,17 +1256,17 @@ (let ((a0-2 (-> v1-2 dir))) (let ((f0-2 1.0)) (.lvf vf1 (&-> a0-2 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a1-6 f0-2)) (.mov vf3 a1-6) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1402,7 +1402,7 @@ (sv-52 float) ) (set! sv-16 (the-as nav-poly #f)) - (set! sv-20 (search-for-sphere (-> this poly-hash) (the-as vector (-> arg0 vertex)) 12288.0)) + (set! sv-20 (search-for-sphere (-> this poly-hash) (-> arg0 vertex 0) 12288.0)) (set! (-> arg0 vertex2 x) (the-as float #f)) (let ((s4-0 (-> this poly-hash bucket-size)) (s3-0 sv-20) @@ -1426,7 +1426,7 @@ (when (and (and (>= (+ (-> v1-6 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-6 vertex2 w) f1-0))) (not (logtest? (-> sv-24 pat) (-> arg0 data 20))) ) - (when (point-in-poly? this sv-24 (the-as vector (-> arg0 vertex))) + (when (point-in-poly? this sv-24 (-> arg0 vertex 0)) (set! (-> arg0 vertex2 x) (the-as float #t)) (set! (-> arg0 vertex1 w) 0.0) (set! sv-16 sv-24) @@ -1647,7 +1647,7 @@ (set! sv-72 (-> v1-3 vertex1)) (set! sv-76 (-> v1-3 vertex2)) ) - (vector-3pt-cross! sv-32 (the-as vector sv-68) sv-72 sv-76) + (vector-3pt-cross! sv-32 (-> sv-68 0) sv-72 sv-76) (cond ((= (vector-length sv-32) 0.0) (set! sv-40 (+ sv-40 1)) @@ -1656,17 +1656,17 @@ (let ((v1-9 sv-32)) (let ((f0-1 1.0)) (.lvf vf1 (&-> v1-9 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-11 f0-1)) (.mov vf3 a0-11) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1857,7 +1857,7 @@ (let ((s4-0 (new 'stack-no-clear 'vector))) (cond ((= (-> arg0 vertex-count) 3) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ((let* ((v1-2 (-> arg0 vertex2)) (a0-3 (-> arg0 vertex)) @@ -1868,14 +1868,14 @@ ) (< 0.0 f0-3) ) - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex2) (-> arg0 vertex3)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex2) (-> arg0 vertex3)) ) (else - (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + (nav-normal-from-3-points s4-0 (-> arg0 vertex 0) (-> arg0 vertex1) (-> arg0 vertex2)) ) ) (vector-copy! arg2 s4-0) - (set! (-> s4-0 w) (- (vector-dot s4-0 (the-as vector (-> arg0 vertex))))) + (set! (-> s4-0 w) (- (vector-dot s4-0 (-> arg0 vertex 0)))) (vector-copy! s5-0 arg3) (set! (-> s5-0 y) (/ (- (+ (* (-> arg3 x) (-> s4-0 x)) (* (-> arg3 z) (-> s4-0 z)) (-> s4-0 w))) (-> s4-0 y))) ) @@ -1955,11 +1955,11 @@ (when s3-0 (vector-! (-> sv-64 point) sv-76 (the-as vector (-> s3-0 bounds))) (.lvf vf1 (&-> (-> sv-64 point) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-1 v1-15) (f1-0 (-> s3-0 bounds r)) @@ -2097,7 +2097,7 @@ (defmethod nav-mesh-method-37 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) (let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3))) (set! (-> gp-0 2 vertex3 y) arg2) - (vector-! (the-as vector (-> gp-0 0)) arg0 (the-as vector (-> this bounds))) + (vector-! (-> gp-0 0 vertex0) arg0 (the-as vector (-> this bounds))) (vector-! (-> gp-0 0 vertex1) arg1 (the-as vector (-> this bounds))) (vector-copy! (-> gp-0 2 vertex1) (-> gp-0 0 vertex0)) (set! (-> gp-0 2 vertex2 x) (-> this nearest-y-threshold)) @@ -2105,10 +2105,10 @@ (let ((a1-4 (nav-mesh-method-45 this (the-as nav-poly (-> gp-0 2 vertex1))))) (cond (a1-4 - (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (the-as vector (-> gp-0 0)) (-> gp-0 0 vertex1)) + (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (-> gp-0 0 vertex0) (-> gp-0 0 vertex1)) (until #f (set! (-> gp-0 2 vertex3 z) - (nav-mesh-method-36 this (-> gp-0 0 vertex3) (the-as vector (-> gp-0 1)) (-> gp-0 2 vertex3 y)) + (nav-mesh-method-36 this (-> gp-0 0 vertex3) (-> gp-0 1 vertex0) (-> gp-0 2 vertex3 y)) ) (when (< (-> gp-0 2 vertex3 z) (-> gp-0 2 vertex3 y)) (set! (-> gp-0 2 vertex3 y) (-> gp-0 2 vertex3 z)) @@ -2224,7 +2224,7 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod nav-mesh-method-38 ((this nav-mesh) (arg0 nav-poly)) - (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector arg0) (the-as vector (-> this bounds))))) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> arg0 vertex0) (the-as vector (-> this bounds))))) (countdown (s3-0 (-> this nav-control-count)) (let ((v1-2 (-> this nav-control-array s3-0))) (if (-> v1-2 process) diff --git a/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc b/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc index be7ef958d7f..58b652064c9 100644 --- a/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/chain-physics_REF.gc @@ -158,11 +158,11 @@ (apply-gravity this sv-288 s0-0 arg0) (let ((v1-34 sv-528)) (let ((a0-10 sv-528)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-10 quad)) ) (.lvf vf5 (&-> sv-288 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-34 quad) vf6) ) (when (< s0-0 (the-as int (+ (-> this num-joints) -1))) @@ -170,11 +170,11 @@ (chain-physics-method-14 this sv-304 s0-0) (let ((v1-40 sv-528)) (let ((a0-13 sv-528)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-13 quad)) ) (.lvf vf5 (&-> sv-304 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-40 quad) vf6) ) ) @@ -186,8 +186,8 @@ (.lvf vf4 (&-> v1-43 quad)) (.lvf vf5 (&-> a0-16 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-400 quad) vf6) (let ((f28-1 (vector-normalize-ret-len! sv-400 1.0)) (f24-0 (vector-dot sv-400 s1-0)) @@ -210,9 +210,9 @@ (.mov vf3 v1-55) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-384 quad) vf4) (vector+float*! sv-528 s3-0 sv-400 f28-1) ) @@ -225,8 +225,8 @@ (.lvf vf4 (&-> v1-61 quad)) (.lvf vf5 (&-> a0-27 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-432 quad) vf6) (vector-normalize-ret-len! sv-432 1.0) (set! sv-416 (new 'stack-no-clear 'vector)) @@ -236,8 +236,8 @@ (.lvf vf4 (&-> v1-64 quad)) (.lvf vf5 (&-> a0-30 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-416 quad) vf6) (let ((f28-2 (vector-dot sv-432 sv-416))) (vector--float*! sv-416 sv-416 sv-432 f28-2) @@ -258,19 +258,19 @@ (let ((a0-37 f0-11)) (.mov vf3 a0-37) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> v1-73 quad) vf4) ) (vector+! sv-528 (-> sv-272 position) (-> sv-272 velocity)) (let ((a2-9 (vector-! (new 'stack-no-clear 'vector) s3-0 sv-528))) (.lvf vf1 (&-> a2-9 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-78 vf1) (let* ((f0-13 v1-78) (f1-6 (* (-> this maximum-stretch) (-> this joint-length))) @@ -318,8 +318,8 @@ (.mov vf2 v1-107) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-464 quad) vf1) (set! sv-512 (-> s4-0 rvec)) (set! sv-480 (-> s4-0 rvec)) @@ -330,9 +330,9 @@ (.mov vf3 v1-113) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-512 quad) vf4) (vector-copy! (-> sv-272 old-x) (-> s4-0 rvec)) ) diff --git a/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc b/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc index 09d47b9d066..47ccbf2d5f5 100644 --- a/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/cloth_REF.gc @@ -55,13 +55,13 @@ (when (> (-> this anchor-points length) 0) (let ((v1-6 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> this anchor-points data)) - (the-as vector (-> this particles data (-> this anchor-points data 0 particle-index))) + (-> this anchor-points data 0 anchor-pos) + (-> this particles data (-> this anchor-points data 0 particle-index) pos) ) ) ) (dotimes (a0-4 (-> this particles length)) - (vector+! (the-as vector (-> this particles data a0-4)) (the-as vector (-> this particles data a0-4)) v1-6) + (vector+! (-> this particles data a0-4 pos) (-> this particles data a0-4 pos) v1-6) ) ) ) @@ -132,11 +132,7 @@ ) (dotimes (s3-1 (-> this particles length)) (set! (-> this particles data s3-1 pos w) 1.0) - (vector-matrix*! - (the-as vector (-> this particles data s3-1)) - (the-as vector (-> this particles data s3-1)) - s4-1 - ) + (vector-matrix*! (-> this particles data s3-1 pos) (-> this particles data s3-1 pos) s4-1) (set! (-> this particles data s3-1 pos w) 1.0) (set! (-> this particles data s3-1 prev-pos w) 1.0) (vector-matrix*! @@ -181,10 +177,10 @@ ) ) (dotimes (s4-1 (-> this particles length)) - (vector-matrix*! (the-as vector (-> this particles data s4-1)) (the-as vector (-> this mesh mesh s4-1)) s5-0) + (vector-matrix*! (-> this particles data s4-1 pos) (-> this mesh mesh s4-1 pt) s5-0) (vector-float*! - (the-as vector (-> this particles data s4-1)) - (the-as vector (-> this particles data s4-1)) + (-> this particles data s4-1 pos) + (-> this particles data s4-1 pos) (/ 1.0 (-> this particles data s4-1 pos w)) ) (set! (-> this particles data s4-1 pos w) 1.0) @@ -254,7 +250,7 @@ s3-0 (the-as bucket-id s2-0) *temp-string* - (the-as vector (-> this particles data s5-0)) + (-> this particles data s5-0 pos) (font-color red) (the-as vector2h #f) ) @@ -294,7 +290,7 @@ s3-0 (the-as bucket-id s2-0) *temp-string* - (the-as vector (-> this particles data s5-0)) + (-> this particles data s5-0 pos) (the-as font-color s1-0) (the-as vector2h #f) ) @@ -725,8 +721,8 @@ (let ((s4-0 (-> this stick-constraints data s5-0))) 0.0 (let ((f0-1 (vector-vector-distance - (the-as vector (-> this particles data (-> s4-0 particle0))) - (the-as vector (-> this particles data (-> s4-0 particle1))) + (-> this particles data (-> s4-0 particle0) pos) + (-> this particles data (-> s4-0 particle1) pos) ) ) ) @@ -964,8 +960,8 @@ (.div.vf Q vf6 vf5 :fsf #b0 :ftf #b0) (.lvf vf10 (+ a2-8 32)) (.lvf vf11 (+ a3-5 32)) - (.max.x.vf vf10 vf0 vf10 :mask #b111) - (.max.x.vf vf11 vf0 vf11 :mask #b111) + (.max.x.vf.xyz vf10 vf0 vf10) + (.max.x.vf.xyz vf11 vf0 vf11) (.add.vf vf13 vf10 vf11) (.sub.vf vf13 vf12 vf13) (.mul.vf vf10 vf10 vf13) @@ -1095,7 +1091,7 @@ (when (< sv-212 (* sv-168 sv-168)) (vector-normalize-copy! sv-216 sv-208 sv-168) (vector-! sv-216 sv-216 sv-208) - (when (and (> sv-40 0) (< (vector-dot sv-216 (the-as vector sv-64)) 0.0)) + (when (and (> sv-40 0) (< (vector-dot sv-216 (-> sv-64 rvec)) 0.0)) ) (vector+float*! (-> sv-68 pos) (-> sv-68 pos) sv-216 (-> sv-68 mass-scale)) (vector+float*! (-> sv-72 pos) (-> sv-72 pos) sv-216 (-> sv-72 mass-scale)) @@ -1158,19 +1154,19 @@ (set! sv-112 (new 'stack-no-clear 'vector)) (set! sv-116 (the-as float 0.0)) (.lvf vf1 (&-> sv-96 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (set! sv-104 v1-25) (.lvf vf1 (&-> sv-100 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-27 vf1) (set! sv-108 v1-27) (if (< sv-108 sv-104) @@ -1249,7 +1245,7 @@ (when (logtest? (-> this flags) (cloth-flag wraps)) (dotimes (v1-13 (-> this cloth-height)) (let ((a0-19 (-> this particles data (+ (* v1-13 (-> this cloth-width)) -1 (-> this cloth-width)))) - (a1-20 (the-as object (&-> (-> this particles) _data (* (* 48 (-> this cloth-width)) v1-13)))) + (a1-20 (the-as object (&-> this particles _data (* (* 48 (-> this cloth-width)) v1-13)))) ) (set! (-> a0-19 mass-scale) 0.0) (vector-copy! (-> a0-19 pos) (the-as vector (&-> (the-as vector a1-20) x))) @@ -1323,17 +1319,17 @@ (let ((v1-4 arg0)) (let ((f0-0 1.0)) (.lvf vf1 (&-> v1-4 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-5 f0-0)) (.mov vf3 a0-5) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -1418,7 +1414,7 @@ (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index0))) 32) ) ) - (the-as vector sv-16) + (-> sv-16 pos) ) ) (set! sv-84 (vector-! @@ -1427,7 +1423,7 @@ (* (- (-> arg2 current-vert-index) (the-as uint (-> arg2 cross-index1))) 32) ) ) - (the-as vector sv-16) + (-> sv-16 pos) ) ) (set! sv-88 (new 'stack-no-clear 'vector)) @@ -1446,8 +1442,8 @@ (.lvf vf4 (&-> s0-0 pos quad)) (.lvf vf5 (&-> v0-0 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-112 quad) vf6) (let ((v1-12 (< 0.0 (vector-dot s1-0 s2-0)))) (when (!= v1-12 (-> arg2 face-normal-needs-flip?)) @@ -1586,13 +1582,13 @@ ) (vector-! a2-1 - (the-as vector (-> this particles data t1-0)) - (the-as vector (-> this particles data (+ (-> this cloth-width) 1 t1-0))) + (-> this particles data t1-0 pos) + (-> this particles data (+ (-> this cloth-width) 1 t1-0) pos) ) (vector-! a3-2 - (the-as vector (-> this particles data (+ t1-0 1))) - (the-as vector (-> this particles data (+ t1-0 (-> this cloth-width)))) + (-> this particles data (+ t1-0 1) pos) + (-> this particles data (+ t1-0 (-> this cloth-width)) pos) ) (vector-cross! (-> *normal-array* t0-4) a2-1 a3-2) ) @@ -1604,7 +1600,7 @@ ;; definition for method 33 of type cloth-system (defmethod cloth-system-method-33 ((this cloth-system) (lights vu-lights)) - (vu-lights<-light-group! lights (the-as light-group (-> *time-of-day-context* light-group))) + (vu-lights<-light-group! lights (-> *time-of-day-context* light-group 0)) (none) ) @@ -1900,14 +1896,14 @@ (set! (-> s5-0 face-normal-needs-flip?) #f) (set-vector! (-> s5-0 scale) 128.0 128.0 128.0 128.0) (set-vector! (-> s5-0 clamp-col) 255.0 255.0 255.0 128.0) - (vu-lights<-light-group! (-> s5-0 lights) (the-as light-group (-> *time-of-day-context* light-group))) + (vu-lights<-light-group! (-> s5-0 lights) (-> *time-of-day-context* light-group 0)) (dotimes (s4-0 (+ (-> this cloth-height) -1)) (let* ((a0-17 (+ sv-16 (/ (+ sv-32 -1) 2) (* (+ sv-24 (/ (+ sv-40 -1) 2)) (+ (-> this cloth-width) -1)))) (s3-0 (-> *normal-array* a0-17)) (s1-0 (-> this particles data (+ sv-16 (* sv-24 (-> this cloth-width))))) (s2-0 (new 'stack-no-clear 'vector)) ) - (vector-! s2-0 (the-as vector s1-0) (math-camera-pos)) + (vector-! s2-0 (-> s1-0 pos) (math-camera-pos)) (set! (-> s5-0 face-normal-needs-flip?) (< 0.0 (vector-dot s2-0 s3-0))) ) (cloth-system-method-30 this sv-16 sv-24 s5-0 0) @@ -1973,14 +1969,14 @@ ) ) (vector-matrix*! - (the-as vector (-> this anchor-points data s4-0)) - (the-as vector (-> this mesh anchor-transforms data s4-0)) + (-> this anchor-points data s4-0 anchor-pos) + (-> this mesh anchor-transforms data s4-0 offset) a2-0 ) ) (vector-float*! - (the-as vector (-> this anchor-points data s4-0)) - (the-as vector (-> this anchor-points data s4-0)) + (-> this anchor-points data s4-0 anchor-pos) + (-> this anchor-points data s4-0 anchor-pos) (/ 1.0 (-> this anchor-points data s4-0 anchor-pos w)) ) (set! (-> this anchor-points data s4-0 anchor-pos w) 1.0) @@ -2002,7 +1998,7 @@ (set! (-> s3-0 w) 1.0) (vector-matrix*! s3-0 - (the-as vector (-> this mesh sphere-transforms data s4-1)) + (-> this mesh sphere-transforms data s4-1 offset) (-> (the-as process-focusable s5-0) node-list data @@ -2030,7 +2026,7 @@ (s5-0 (vector-matrix*! (the-as vector (+ (the-as uint (-> this disc-collision-constraints data 0 origin)) (* 48 s4-2))) - (the-as vector (-> this mesh disc-transforms data s4-2)) + (-> this mesh disc-transforms data s4-2 offset) (-> (the-as process-focusable s5-0) node-list data @@ -2040,7 +2036,7 @@ ) ) (vector-rotate*! - (the-as vector (-> this disc-collision-constraints data s4-2)) + (-> this disc-collision-constraints data s4-2 normal) (the-as vector (+ (the-as uint (-> this mesh disc-transforms data 0 normal)) (* 48 s4-2))) (-> (the-as process-focusable s5-0) node-list diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc index 7264f6f48d1..941fabdbceb 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc @@ -7,7 +7,7 @@ ;; definition for function matrix->axis-angle (defun matrix->axis-angle ((arg0 vector) (arg1 matrix)) (let ((s5-0 (matrix->quaternion (new 'stack-no-clear 'quaternion) arg1))) - (vector-normalize-copy! arg0 (the-as vector s5-0) 1.0) + (vector-normalize-copy! arg0 (-> s5-0 vec) 1.0) (set! (-> arg0 w) (* 2.0 (acos (-> s5-0 w)))) ) ) diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc index 3aa41867484..2dd6996dcf9 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc @@ -28,12 +28,8 @@ 0 ) (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) - (quaternion*! - (the-as quaternion (-> this ragdoll-joints)) - (-> this rotate-vel) - (the-as quaternion (-> this ragdoll-joints)) - ) - (quaternion-normalize! (the-as quaternion (-> this ragdoll-joints))) + (quaternion*! (-> this ragdoll-joints 0 quat) (-> this rotate-vel) (-> this ragdoll-joints 0 quat)) + (quaternion-normalize! (-> this ragdoll-joints 0 quat)) (set! (-> this stable-joints) 0) (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) (let ((s4-1 (new 'stack-no-clear 'collide-query)) @@ -150,11 +146,11 @@ ) ) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-22 vf1) (let ((f0-6 v1-22) (f1-1 16384.0) @@ -180,7 +176,7 @@ (quaternion-negate! (-> this rotate-vel) (-> this rotate-vel)) ) (when (< (-> this rotate-vel w) (cos 7281.778)) - (let ((a1-4 (vector-normalize! (the-as vector (-> this rotate-vel)) 1.0))) + (let ((a1-4 (vector-normalize! (-> this rotate-vel vec) 1.0))) (quaternion-vector-angle! (-> this rotate-vel) a1-4 7281.778) ) ) @@ -328,11 +324,11 @@ (vector-copy! arg0 (-> s4-1 position)) (until (or (< 6 s1-1) (begin (.lvf vf1 (&-> s3-2 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-85 vf1) (let ((f0-13 v1-85) (f1-4 409.6) @@ -643,7 +639,7 @@ (let ((v1-60 (new 'stack-no-clear 'vector))) (vector*! v1-60 (-> s3-1 scale) (-> arg2 root scale)) (vector*! v1-60 v1-60 (-> arg1 scale)) - (vector*! (the-as vector (-> arg0 bone transform)) (the-as vector (-> arg0 bone transform)) v1-60) + (vector*! (-> arg0 bone transform rvec) (-> arg0 bone transform rvec) v1-60) (vector*! (-> arg0 bone transform uvec) (-> arg0 bone transform uvec) v1-60) (vector*! (-> arg0 bone transform fvec) (-> arg0 bone transform fvec) v1-60) ) @@ -726,12 +722,9 @@ ((= (-> arg1 node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) (logior! (-> this ragdoll-flags) (ragdoll-flag mirror)) (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2))) - (a1-5 (vector-normalize-copy! - (new 'stack-no-clear 'vector) - (the-as vector (-> arg1 node-list data 2 bone transform)) - 1.0 - ) - ) + (a1-5 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2 bone transform rvec) 1.0) + ) ) (ragdoll-reflect-matrix arg0 a1-5 s4-0) ) @@ -1156,11 +1149,11 @@ (ragdoll-method-19 this sv-320 s1-1 arg0 s2-1) (let ((v1-93 sv-560)) (let ((a0-39 sv-560)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-39 quad)) ) (.lvf vf5 (&-> sv-320 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-93 quad) vf6) ) ) @@ -1171,11 +1164,11 @@ (reset-vec! this sv-336) (let ((v1-104 sv-560)) (let ((a0-45 sv-560)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-45 quad)) ) (.lvf vf5 (&-> sv-336 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-104 quad) vf6) ) ) @@ -1188,8 +1181,8 @@ (.lvf vf4 (&-> v1-110 quad)) (.lvf vf5 (&-> a0-50 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-432 quad) vf6) (let ((f30-2 (vector-normalize-ret-len! sv-432 1.0)) (f26-0 (vector-dot sv-432 (-> s2-1 uvec))) @@ -1212,9 +1205,9 @@ (.mov vf3 v1-123) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-416 quad) vf4) (vector+float*! sv-560 (-> s2-1 trans) sv-432 f30-2) ) @@ -1232,8 +1225,8 @@ (.lvf vf4 (&-> v1-134 quad)) (.lvf vf5 (&-> a0-63 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-448 quad) vf6) (vector-normalize-ret-len! sv-448 1.0) (set! sv-464 (new 'stack-no-clear 'vector)) @@ -1243,8 +1236,8 @@ (.lvf vf4 (&-> v1-137 quad)) (.lvf vf5 (&-> a0-65 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-464 quad) vf6) (let ((f30-3 (vector-dot sv-448 sv-464))) (vector--float*! sv-464 sv-464 sv-448 f30-3) @@ -1275,11 +1268,11 @@ ) (let ((a2-12 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 trans) sv-560))) (.lvf vf1 (&-> a2-12 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-156 vf1) (let* ((f0-17 v1-156) (f1-6 (* (-> this maximum-stretch) (-> s0-1 joint-length))) @@ -1316,8 +1309,8 @@ (.mov at-0 f0-22) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-176 quad) vf1) ) ) @@ -1353,8 +1346,8 @@ (.mov vf2 v1-195) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-496 quad) vf1) (set! sv-544 (-> s3-1 rvec)) (set! sv-512 (-> s3-1 rvec)) @@ -1365,9 +1358,9 @@ (.mov vf3 v1-201) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> sv-544 quad) vf4) (vector-copy! (-> s0-1 old-x) (-> s3-1 rvec)) ) diff --git a/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc b/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc index 0aceed623d0..f00573a008a 100644 --- a/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc @@ -183,11 +183,11 @@ (f0-0 1.0) ) (.lvf vf1 (&-> (-> v1-0 0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov t0-5 vf1) (vector-float*! a1-2 a3-3 (/ f0-0 t0-5)) ) @@ -235,9 +235,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-0 quad) vf6) ) (let ((a2-1 (-> this ang-momentum))) @@ -250,9 +250,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) (let* ((f0-3 (* 500000000.0 (-> this info mass))) @@ -260,11 +260,11 @@ (f1-3 (* f1-1 f1-1)) ) (.lvf vf1 (&-> (-> this ang-momentum) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-6 vf1) (if (< f1-3 v1-6) (vector-normalize! (-> this ang-momentum) f0-3) @@ -312,9 +312,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((s4-0 (new 'stack-no-clear 'quaternion))) @@ -421,8 +421,8 @@ (.mul.x.vf acc vf1 vf5) (.add.mul.y.vf acc vf2 vf5 acc) (.add.mul.z.vf acc vf3 vf5 acc) - (.add.mul.w.vf vf7 vf4 vf0 acc :mask #b111) - (.sub.vf vf8 vf7 vf6 :mask #b111) + (.add.mul.w.vf.xyz vf7 vf4 vf0 acc) + (.sub.vf.xyz vf8 vf7 vf6) (.svf (&-> arg1 move-dist quad) vf8) (let ((s1-0 (the-as collide-cache-prim (-> s4-0 prims)))) (countdown (s0-0 (-> s4-0 num-prims)) @@ -475,7 +475,7 @@ (.mul.x.vf acc vf1 vf5) (.add.mul.y.vf acc vf2 vf5 acc) (.add.mul.z.vf acc vf3 vf5 acc) - (.add.mul.w.vf vf5 vf4 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf5 vf4 vf0 acc) (.svf (&-> v1-0 prim-core world-sphere quad) vf5) (&+! v1-0 80) ) @@ -619,15 +619,15 @@ (.lvf vf7 (&-> (-> s5-0 cquery) best-other-tri intersect quad)) (.lvf vf6 (&-> v1-33 prim-core world-sphere quad)) (.sub.vf vf8 vf6 vf7) - (.mul.vf vf9 vf8 vf8 :mask #b111) - (.mul.x.vf acc vf0 vf9 :mask #b1000) - (.add.mul.y.vf acc vf0 vf9 acc :mask #b1000) - (.add.mul.z.vf vf9 vf0 vf9 acc :mask #b1000) + (.mul.vf.xyz vf9 vf8 vf8) + (.mul.x.vf.w acc vf0 vf9) + (.add.mul.y.vf.w acc vf0 vf9 acc) + (.add.mul.z.vf.w vf9 vf0 vf9 acc) (.isqrt.vf Q vf0 vf9 :fsf #b11 :ftf #b11) - (.mov.vf vf8 vf0 :mask #b1000) - (.mov.vf vf7 vf0 :mask #b1000) + (.mov.vf.w vf8 vf0) + (.mov.vf.w vf7 vf0) (.wait.vf) - (.mul.vf vf8 vf8 Q :mask #b111) + (.mul.vf.xyz vf8 vf8 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -636,10 +636,10 @@ (set! (-> s5-0 impact-info prim-id) (-> v1-33 prim-id)) ) (set! (-> s5-0 impact-info pat) (-> s5-0 cquery best-other-tri pat)) - (rigid-body-control-method-23 arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 impact-info velocity)) + (rigid-body-control-method-23 arg0 (-> s5-0 impact-info point) (-> s5-0 impact-info velocity)) (when (-> s5-0 rbody2) (init-velocities! (-> s5-0 rbody2)) - (rigid-body-control-method-23 (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 vel)) + (rigid-body-control-method-23 (-> s5-0 rbody2) (-> s5-0 impact-info point) (-> s5-0 vel)) (vector-! (-> s5-0 impact-info velocity) (-> s5-0 impact-info velocity) (-> s5-0 vel)) ) (set! (-> s5-0 impact-info impulse) 0.0) @@ -649,7 +649,7 @@ (set! (-> s5-0 denom) 0.0) (set! (-> s5-0 denom2) 0.0) (b! (>= (-> s5-0 vel-dot-norm) 0.0) cfg-50) - (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> arg0 position)) + (vector-! (-> s5-0 p-body) (-> s5-0 impact-info point) (-> arg0 position)) (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> arg0 inv-i-world)) (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) @@ -660,7 +660,7 @@ (set! f30-1 (cond ((-> s5-0 rbody2) - (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> s5-0 rbody2 position)) + (vector-! (-> s5-0 p-body) (-> s5-0 impact-info point) (-> s5-0 rbody2 position)) (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 rbody2 inv-i-world)) (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) @@ -738,10 +738,10 @@ (vector+float*! (-> s5-0 force) (-> s5-0 force) (-> s5-0 tangent-dir) f0-39) ) ) - (apply-impact! arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (apply-impact! arg0 (-> s5-0 impact-info point) (-> s5-0 force)) (when (-> s5-0 rbody2) (vector-float*! (-> s5-0 force) (-> s5-0 force) -1.0) - (apply-impact! (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (apply-impact! (-> s5-0 rbody2) (-> s5-0 impact-info point) (-> s5-0 force)) ) (rigid-body-control-method-12 arg0 1.0) (init-velocities! arg0) @@ -1242,11 +1242,11 @@ (let ((s5-1 (get-touched-prim s3-0 (-> this root) arg1))) (when s5-1 (set! (-> arg0 prim-id) (-> s5-1 prim-id)) - (vector-! (-> arg0 normal) (-> arg0 point) (the-as vector (-> s5-1 prim-core))) + (vector-! (-> arg0 normal) (-> arg0 point) (-> s5-1 prim-core world-sphere)) (vector-normalize! (-> arg0 normal) 1.0) (vector+float*! (-> arg0 point) - (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere) (-> arg0 normal) (-> s5-1 prim-core world-sphere w) ) diff --git a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc index a4ce968b85c..7260fbb9056 100644 --- a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc @@ -169,8 +169,8 @@ (defmethod update-from-cspace ((this impact-control)) (when (>= (-> this joint) 0) (vector-copy! (-> this trans 1) (-> this trans 0)) - (vector<-cspace! (the-as vector (-> this trans)) (-> this process 0 node-list data (-> this joint))) - (vector-! (-> this dir) (the-as vector (-> this trans)) (-> this trans 1)) + (vector<-cspace! (-> this trans 0) (-> this process 0 node-list data (-> this joint))) + (vector-! (-> this dir) (-> this trans 0) (-> this trans 1)) ) 0 (none) @@ -368,8 +368,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-12 quad) vf1) ) arg0 @@ -458,9 +458,9 @@ ) (.lvf vf4 (&-> a1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t1-7 quad) vf6) ) (vector-! (-> v1-2 initial-position) (-> v1-2 initial-position) arg3) diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc index 388543057c8..19df7cb893b 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-drawable_REF.gc @@ -59,10 +59,10 @@ (.lvf vf2 (&-> (-> arg1 bone) transform trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -78,10 +78,10 @@ (.lvf vf2 (&-> arg1 trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) + (.mul.vf.xyz vf2 vf2 Q) (.nop.vf) (.nop.vf) - (.mov.vf vf2 vf0 :mask #b1000) + (.mov.vf.w vf2 vf0) (.svf (&-> arg0 quad) vf2) arg0 ) @@ -304,7 +304,7 @@ (set! s5-0 (the-as cspace-array #f)) (goto cfg-13) ) - (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (the-as cspace (-> s5-0 data)) (the-as drawable #f)))) + (let ((v1-9 ((method-of-type cspace reset-and-assign-geo!) (-> s5-0 data 0) (the-as drawable #f)))) (set! (-> v1-9 bone) (the-as bone (-> s3-1 bones))) ) (let ((v1-10 (-> s5-0 data))) @@ -463,7 +463,7 @@ ) ((zero? jcontrol) (matrix<-transformq+trans! - (the-as matrix (-> this skeleton bones 3)) + (-> this skeleton bones 3 transform) (the-as transformq (-> this process root trans)) (-> this skeleton bones 0 transform trans) ) @@ -480,11 +480,7 @@ (let ((a1-5 (new 'stack-no-clear 'vector))) (vector-copy! a1-5 (-> this bounds)) (set! (-> a1-5 w) 1.0) - (vector-norm-matrix*! - (-> this origin) - a1-5 - (the-as matrix (-> this skeleton bones (-> this origin-joint-index))) - ) + (vector-norm-matrix*! (-> this origin) a1-5 (-> this skeleton bones (-> this origin-joint-index) transform)) ) (let ((f0-2 (-> this bounds w))) (set! (-> this origin w) f0-2) diff --git a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc index 8926fcf3b9c..e850308729f 100644 --- a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc @@ -546,7 +546,7 @@ (defmethod speech-control-method-15 ((this speech-control)) (speech-table-reset! this) (let ((s5-0 (-> this channel-array))) - ((method-of-type speech-channel init!) (the-as speech-channel s5-0)) + ((method-of-type speech-channel init!) (-> s5-0 0)) (set! (-> s5-0 0 speech-table) (-> this speech-table)) (set! (-> s5-0 0 gui-channel) (gui-channel guard)) ) diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc index 33b799f9c37..afe115ea4cb 100644 --- a/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc +++ b/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc @@ -132,8 +132,8 @@ ) (.lvf vf4 (&-> t4-0 world-sphere quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t5-0 quad) vf5) ) (let ((t5-1 (-> t3-1 1))) @@ -143,8 +143,8 @@ ) (.lvf vf4 (&-> t4-1 world-sphere quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t5-1 quad) vf5) ) (dotimes (t4-2 3) @@ -187,10 +187,7 @@ ) (cond ((< f0-7 (* f1-2 f1-2)) - ((method-of-type actor-hash-bucket add-actor-cshape) - (the-as actor-hash-bucket (-> this data)) - (the-as collide-shape s4-0) - ) + ((method-of-type actor-hash-bucket add-actor-cshape) (-> this data 0) (the-as collide-shape s4-0)) ) ((let ((f1-5 204800.0)) (< f0-7 (* f1-5 f1-5)) @@ -236,8 +233,8 @@ ) (.lvf vf4 (&-> t6-2 world-sphere quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t7-0 quad) vf5) ) (let ((t7-1 (-> t5-15 1))) @@ -247,8 +244,8 @@ ) (.lvf vf4 (&-> t6-3 world-sphere quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t7-1 quad) vf5) ) (dotimes (t6-4 3) diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc index addf297d8ee..9cd8c117744 100644 --- a/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc +++ b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc @@ -192,7 +192,7 @@ (nop!) (vitof12.xyzw vf3 vf3) (nop!) - (.add.vf vf4 vf4 vf5 :mask #b111) + (.add.vf.xyz vf4 vf4 vf5) (nop!) (nop!) (.svf (&-> s2-0 instance-mat rvec quad) vf1) @@ -449,7 +449,7 @@ (nop!) (vitof12.xyzw vf3 vf3) (nop!) - (.add.vf vf4 vf4 vf5 :mask #b111) + (.add.vf.xyz vf4 vf4 vf5) (nop!) (nop!) (.svf (&-> s1-0 instance-mat rvec quad) vf1) @@ -540,11 +540,11 @@ ) (let ((f0-12 1.0)) (.lvf vf1 (&-> (-> s1-0 move-dist) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (set! (-> s1-0 rlength w) (/ f0-12 v1-26)) ) diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc index 825ceecff6c..780a4b05816 100644 --- a/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc +++ b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc @@ -110,7 +110,7 @@ (t1-0 (-> this dimension-array 0)) (t2-0 (-> this dimension-array 2)) (t3-0 (-> this dimension-array 1)) - (a0-2 (&-> (-> this bucket-array) (/ (the-as int arg0) 8))) + (a0-2 (&-> this bucket-array (/ (the-as int arg0) 8))) (a1-2 (ash 1 (logand (the-as int arg0) 7))) ) (dotimes (t4-3 t3-0) @@ -916,8 +916,8 @@ ) (.lvf vf4 (&-> t1-0 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t2-0 quad) vf5) ) (let ((t2-1 (-> t0-1 1))) @@ -927,8 +927,8 @@ ) (.lvf vf4 (&-> t1-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> t2-1 quad) vf5) ) (dotimes (t1-2 3) diff --git a/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc b/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc index d602169096d..b6d1578374b 100644 --- a/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/board-states_REF.gc @@ -85,7 +85,7 @@ (if (logtest? (-> self control status) (collide-status impact-surface)) (+! (-> self board turn-anim-duck-vel) (lerp-scale 0.0 15.0 (-> self control normal-impact-vel) 0.0 81920.0)) ) - (let ((f0-38 (vector-dot (the-as vector (-> self board up-vector)) (-> self board up-vector 1)))) + (let ((f0-38 (vector-dot (-> self board up-vector 0) (-> self board up-vector 1)))) (if (< f0-38 1.0) (+! (-> self board turn-anim-duck-vel) (* (lerp-scale 400.0 0.0 f0-38 0.6 1.0) (seconds-per-frame))) ) @@ -1197,11 +1197,7 @@ (set! (-> self control unknown-word04) (the-as uint #t)) (let ((v1-6 *edge-grab-info*)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> v1-6 world-vertex)) - (-> v1-6 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> v1-6 world-vertex 0) (-> v1-6 world-vertex 1)) 1.0 ) ) @@ -2582,7 +2578,7 @@ (set! (-> self board ride-rot) 32768.0) ) (else - (let ((f0-21 (vector-dot (the-as vector (-> self control c-R-w)) (-> self control edge-grab-edge-dir)))) + (let ((f0-21 (vector-dot (-> self control c-R-w rvec) (-> self control edge-grab-edge-dir)))) (cond ((< 0.7 f0-21) (set! (-> self board ride-mode) (the-as uint 2)) diff --git a/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc b/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc index 7655889103e..438fc58066b 100644 --- a/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/board/target-board_REF.gc @@ -543,11 +543,11 @@ 0.0 (.lvf vf1 (&-> v1-13 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-14 vf1) (let ((f0-3 v1-14) (f1-0 (-> gp-0 w)) @@ -575,11 +575,11 @@ 0.0 (.lvf vf1 (&-> v1-24 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (let ((f0-6 v1-25) (f1-4 (-> gp-0 w)) @@ -662,15 +662,11 @@ (s5-1 (new 'stack-no-clear 'vector)) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> gp-1 world-vertex 1) - (the-as vector (-> gp-1 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-1 world-vertex 1) (-> gp-1 world-vertex 0)) 1.0 ) (vector+float*! s5-1 (-> self control trans) (-> self control c-R-w fvec) (* 40960.0 (seconds-per-frame))) - (let ((f0-2 (vector-segment-overlap s5-1 (the-as vector (-> gp-1 world-vertex)) (-> gp-1 world-vertex 1)))) + (let ((f0-2 (vector-segment-overlap s5-1 (-> gp-1 world-vertex 0) (-> gp-1 world-vertex 1)))) (if (and (time-elapsed? (-> self board ride-time) (seconds 0.4)) (>= f0-2 0.0) (>= 1.0 f0-2) @@ -2409,11 +2405,7 @@ ) (set! (-> self control ground-pat) (-> s4-0 edge-tri-pat)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (vector-copy! (-> self control edge-grab-across-edge-dir) (-> s4-0 hanging-matrix rvec)) @@ -2423,11 +2415,7 @@ (set! (-> s4-0 world-vertex 0 quad) (-> s4-0 world-vertex 1 quad)) (vector-copy! (-> s4-0 world-vertex 1) s3-2) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (-> s4-0 world-vertex 1) - (the-as vector (-> s4-0 world-vertex)) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s4-0 world-vertex 1) (-> s4-0 world-vertex 0)) 1.0 ) (vector-copy! s3-2 (-> s4-0 adjacent-edge-left-vertex)) @@ -2620,10 +2608,10 @@ ) ) (let ((s3-9 (-> self board ride-vertex (-> self board ride-vertex-base)))) - (if (not (or (vector= s3-9 (the-as vector (-> self board ride-vertex-old))) + (if (not (or (vector= s3-9 (-> self board ride-vertex-old 0)) (vector= s3-9 (-> self board ride-vertex-old 1)) (vector= s3-9 (-> self board ride-vertex-old 2)) - (vector= (&+ s3-9 16) (the-as vector (-> self board ride-vertex-old))) + (vector= (&+ s3-9 16) (-> self board ride-vertex-old 0)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 1)) (vector= (&+ s3-9 16) (-> self board ride-vertex-old 2)) ) diff --git a/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc b/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc index 20a75d3546e..f05f83c50ab 100644 --- a/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc @@ -289,7 +289,7 @@ (set! (-> arg0 normal-impact-vel) (- (vector-dot (-> arg0 transv) sv-84))) (set! sv-96 (logior sv-96 (collide-status impact-surface))) (if (nonzero? (-> arg0 current-surface impact-hook)) - ((-> arg0 current-surface impact-hook) arg0 (the-as (pointer float) (-> sv-88 rvec)) sv-84) + ((-> arg0 current-surface impact-hook) arg0 (&-> sv-88 rvec x) sv-84) ) (when (not sv-240) (let ((f0-21 (- 1.0 (-> arg0 current-surface impact-fric)))) @@ -578,11 +578,7 @@ (let ((gp-0 *edge-grab-info*)) (when (-> gp-0 found-edge?) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) (vector-copy! (-> self control edge-grab-across-edge-dir) (-> gp-0 hanging-matrix rvec)) diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc index 3aee349d301..3008711b7be 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/flut-racer_REF.gc @@ -577,11 +577,11 @@ 0.0 (.lvf vf1 (&-> v1-25 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (let ((f0-10 v1-26) (f1-2 (-> s5-1 w)) @@ -612,11 +612,11 @@ 0.0 (.lvf vf1 (&-> v1-39 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-40 vf1) (let ((f0-13 v1-40) (f1-6 (-> s5-1 w)) diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc index 516e641be54..e6efbca3ab8 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc @@ -288,7 +288,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc index 06b9d2e5de7..1cdb929690f 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc @@ -397,9 +397,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) (let ((s2-0 (new 'stack-no-clear 'vector))) @@ -414,9 +414,9 @@ (.lvf vf5 (&-> v1-15 quad)) ) (.lvf vf4 (&-> s3-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (let ((a0-8 s2-0)) @@ -427,9 +427,9 @@ (.lvf vf5 (&-> v1-16 quad)) ) (.lvf vf4 (&-> arg3 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (let ((a1-9 s5-0)) @@ -442,9 +442,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) ) @@ -479,7 +479,7 @@ (set! (-> a0-0 y) 10240.0) (set! (-> a0-0 z) 10240.0) (set! (-> a0-0 w) 1.0) - (vector-! (the-as vector a1-0) v1-2 a0-0) + (vector-! (-> a1-0 min) v1-2 a0-0) ) (let ((a1-2 (-> gp-0 bbox max)) (v1-3 (-> s5-0 trans)) @@ -525,9 +525,9 @@ ) (.lvf vf4 (&-> a0-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (let ((f0-11 @@ -546,9 +546,9 @@ ) (.lvf vf4 (&-> v1-22 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (let ((v1-23 (-> gp-0 move-dist)) @@ -587,9 +587,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-18 quad) vf6) ) (vector-copy! (-> s3-0 user-position) s2-0) @@ -3122,7 +3122,7 @@ (compute-alignment! (-> self align)) (let ((s5-13 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s5-13 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s5-13 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) s5-13 (-> self clock frames-per-second)) ) ) @@ -3232,7 +3232,7 @@ (compute-alignment! (-> self align)) (let ((s5-14 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s5-14 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s5-14 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) s5-14 (-> self clock frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc index 2df001a9357..596d86fa06f 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc @@ -1114,8 +1114,8 @@ (.lvf vf4 (&-> v1-6 pt quad)) (.lvf vf5 (&-> a0-7 pt quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-96 quad) vf6) 0.0 (let ((f30-0 (vector-normalize-ret-len! sv-96 1.0))) @@ -1151,7 +1151,7 @@ (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this constraints 0 dir)) (* 48 (+ s4-0 1))))) (-> sv-96 quad) ) - (vector+float*! (the-as vector s0-0) (the-as vector s1-0) sv-96 f30-0) + (vector+float*! (-> s0-0 pt) (-> s1-0 pt) sv-96 f30-0) ) ) ) @@ -1165,11 +1165,11 @@ (+ (the-as uint (-> this constraints 0 dir)) (* 48 arg0)) (let* ((s3-1 (-> this constraints arg0)) (s2-1 (-> this constraints (+ arg0 1))) - (s1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-1) (the-as vector s3-1))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 pt) (-> s3-1 pt))) ) 0.0 (vector-normalize-ret-len! s1-2 1.0) - (vector+float*! (the-as vector s2-1) (the-as vector s3-1) s1-2 (-> this constraints arg0 length)) + (vector+float*! (-> s2-1 pt) (-> s3-1 pt) s1-2 (-> this constraints arg0 length)) ) (+! arg0 1) ) @@ -1646,7 +1646,7 @@ (set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) ) ((> (-> arg0 num-pts) 0) - (let* ((f0-2 (vector-vector-distance (the-as vector (-> arg0 pts)) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) + (let* ((f0-2 (vector-vector-distance (-> arg0 pts 0) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) (f0-3 (+ 16384.0 f0-2)) ) (set! (-> *blue-light-test-big* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) @@ -2252,8 +2252,8 @@ (set! (-> s5-1 y) 0.0) (dotimes (v1-1 12) (vector+! - (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) - (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + (-> *blue-2-lightning-shape* constraints v1-1 pt) + (-> *blue-2-lightning-shape* constraints v1-1 pt) s5-1 ) ) @@ -2314,7 +2314,7 @@ (vector-! (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) (-> *lightning-pts-cache* s5-3) - (the-as vector (-> *blue-2-lightning-shape* constraints (+ s5-3 -1))) + (-> *blue-2-lightning-shape* constraints (+ s5-3 -1) pt) ) (vector-normalize! (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) @@ -2886,8 +2886,8 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-14 quad) vf5) ) (sparticle-set-conerot s5-0 s3-2) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc index a3d9571ec32..fa3a6df03ca 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc @@ -1871,8 +1871,8 @@ (.mov at-0 f0-13) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-39 quad) vf1) ) (projectile-move-fill-line-sphere self) @@ -2534,8 +2534,8 @@ (.add.mul.x.vf acc vf2 vf1 acc) (.lvf vf4 (&-> v1-5 fvec quad)) (.add.mul.y.vf acc vf3 vf1 acc) - (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) - (.mul.vf vf1 vf1 Q :mask #b111) + (.add.mul.z.vf.xyz vf1 vf4 vf1 acc) + (.mul.vf.xyz vf1 vf1 Q) (.svf (&-> s5-0 prim-core world-sphere quad) vf1) (.mov a1-11 vf1) ) @@ -2661,7 +2661,7 @@ (set! (-> self obj-radius) (fmax (-> self obj-radius) - (+ (vector-vector-distance (the-as vector (-> arg0 prim-core)) *gravity-origin-pos*) + (+ (vector-vector-distance (-> arg0 prim-core world-sphere) *gravity-origin-pos*) (-> arg0 prim-core world-sphere w) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc index 09d18cd12be..5a4dd8dd197 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc @@ -297,11 +297,11 @@ ) 0.0 (.lvf vf1 (&-> s0-2 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-21 vf1) (let ((f0-4 v1-21) (f1-1 (-> this blast-radius)) @@ -347,11 +347,11 @@ (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) (-> this root trans)))) 0.0 (.lvf vf1 (&-> s5-2 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-45 vf1) (let ((f0-12 v1-45) (f1-6 (-> this blast-radius)) @@ -834,8 +834,8 @@ (.lvf vf4 (&-> v1-35 quad)) (.lvf vf5 (&-> a0-26 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-2704 quad) vf6) (let ((v1-37 sv-2720)) (set! (-> v1-37 radius) 40.96) @@ -1247,9 +1247,9 @@ ) (.lvf vf4 (&-> a0-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-33 quad) vf6) ) (set! (-> this eventual-collision-points (-> this next-computed-collision-point) collision-pt quad) @@ -2358,9 +2358,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-2 quad) vf6) (set! (-> s5-2 w) 24576.0) (when (and (sphere-in-view-frustum? (the-as sphere s5-2)) @@ -2602,8 +2602,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-1 (+ (-> a1-5 world-sphere w) (-> s5-0 w))) @@ -2643,8 +2643,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-5 (+ (-> a1-17 world-sphere w) (-> s5-0 w))) @@ -2738,8 +2738,8 @@ (.mov at-0 f0-2) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-2 quad) vf1) ) (integrate-and-collide! gp-0 (-> gp-0 transv)) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc index e7bfa592277..a1c3c05acd7 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-util_REF.gc @@ -201,14 +201,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) @@ -236,14 +236,14 @@ ((< (-> v1-0 w) 0.0) (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-2 vf1) ) (else (.lvf vf1 (&-> a0-1 conerot quad)) (.lvf vf2 (&-> v1-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> a0-1 conerot quad) vf1) (.mov a0-3 vf1) ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc index 99390ddfbc7..d8d98cbaa95 100644 --- a/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc @@ -1309,9 +1309,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (draw-main-shot this a1-0 gp-1) (vector-normalize! gp-1 1.0) @@ -2088,7 +2088,7 @@ ) ) (when v1-16 - (vector-! s3-0 s2-0 (the-as vector (-> v1-16 prim-core))) + (vector-! s3-0 s2-0 (-> v1-16 prim-core world-sphere)) (vector-normalize! s3-0 1.0) (on-impact this (process->handle arg0)) (set-time! (-> this delay-attack)) @@ -2287,9 +2287,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (draw-main-shot this a1-0 s4-1) (vector-normalize! s4-1 1.0) diff --git a/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc b/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc index 164ecc572d4..c3c84f0de57 100644 --- a/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/indax/target-indax_REF.gc @@ -329,7 +329,7 @@ (vector-normalize! (vector-! s2-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 @@ -568,7 +568,7 @@ (a1-8 (-> v1-46 0 param1)) ) (-> v1-46 0 param2) - (t9-20 (the-as cspace a0-18) (the-as transformq a1-8)) + (t9-20 (-> a0-18 0) (the-as transformq a1-8)) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc index e55eb2016b3..7d95ca35111 100644 --- a/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc @@ -842,7 +842,7 @@ (set! (-> a1-0 y) 10240.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-35) a0-13 a1-0) + (vector-! (-> v1-35 min) a0-13 a1-0) ) (let ((v1-37 (-> gp-0 bbox max)) (a0-15 (-> self control trans)) @@ -1155,7 +1155,7 @@ (-> self control dynam gravity-normal) (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> self control collision-spheres 1 prim-core)) + (-> self control collision-spheres 1 prim-core world-sphere) (-> self control wall-contact-pt) ) ) @@ -1456,9 +1456,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (vector-float*! (new 'stack-no-clear 'vector) (-> arg0 user-normal) -8192.0) (let ((s4-1 (new 'stack-no-clear 'vector))) @@ -1473,9 +1473,9 @@ (.lvf vf5 (&-> v1-16 quad)) ) (.lvf vf4 (&-> s3-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (let ((a1-8 s4-1)) @@ -1491,9 +1491,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (let ((a1-9 s5-0)) @@ -1506,9 +1506,9 @@ ) (.lvf vf4 (&-> v1-18 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) ) @@ -1540,7 +1540,7 @@ (set! (-> a1-0 y) 6144.0) (set! (-> a1-0 z) 8192.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-1 a1-0) + (vector-! (-> v1-0 min) a0-1 a1-0) ) (let ((v1-2 (-> gp-0 bbox max)) (a0-3 (-> self control trans)) @@ -1600,9 +1600,9 @@ ) (.lvf vf4 (&-> a0-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-8 quad) vf6) ) (let ((a1-9 s2-0)) @@ -1615,9 +1615,9 @@ ) (.lvf vf4 (&-> a0-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((f0-13 (lerp-scale 1.0 0.0 (- (-> s2-0 y) (-> self control gspot-pos y)) 819.2 2048.0))) @@ -1633,9 +1633,9 @@ ) (.lvf vf4 (&-> v1-63 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) (vector-float*! (-> gp-0 move-dist) s1-0 -8192.0) @@ -1670,9 +1670,9 @@ ) (.lvf vf4 (&-> v1-77 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-19 quad) vf6) ) (vector-copy! (-> self leg-ik s5-0 user-position) s3-0) @@ -2203,7 +2203,7 @@ (vector-copy! (-> s5-0 center-hold-old) (-> s5-0 center-hold)) (let ((gp-0 (new 'stack-no-clear 'bone))) (matrix-copy! (-> gp-0 transform) (-> (the-as process-drawable a0-7) node-list data 0 bone transform)) - (vector-matrix*! (-> gp-0 scale) (the-as vector (-> s5-0 pilot-edge-grab)) (-> gp-0 transform)) + (vector-matrix*! (-> gp-0 scale) (-> s5-0 pilot-edge-grab local-pos) (-> gp-0 transform)) (vector-rotate*! (the-as vector (&+ gp-0 80)) (-> s5-0 pilot-edge-grab local-dir) (-> gp-0 transform)) (vector-copy! (-> s5-0 center-hold) (-> gp-0 scale)) (vector-copy! (-> self control edge-grab-edge-dir) (-> (&+ gp-0 80) transform rvec)) @@ -2224,11 +2224,7 @@ ) (set! (-> self control ground-pat) (-> s5-0 edge-tri-pat)) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> s5-0 world-vertex)) - (-> s5-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> s5-0 world-vertex 0) (-> s5-0 world-vertex 1)) 1.0 ) ) @@ -2348,7 +2344,7 @@ (vector-copy! (-> gp-0 center-hold-old) (-> gp-0 center-hold)) (let ((s5-0 (new 'stack-no-clear 'bone))) (matrix-copy! (-> s5-0 transform) (-> (the-as process-drawable a0-7) node-list data 0 bone transform)) - (vector-matrix*! (-> s5-0 scale) (the-as vector (-> gp-0 pilot-edge-grab)) (-> s5-0 transform)) + (vector-matrix*! (-> s5-0 scale) (-> gp-0 pilot-edge-grab local-pos) (-> s5-0 transform)) (vector-rotate*! (the-as vector (&+ s5-0 80)) (-> gp-0 pilot-edge-grab local-dir) (-> s5-0 transform)) (vector-copy! (-> gp-0 center-hold) (-> s5-0 scale)) (vector-copy! (-> self control edge-grab-edge-dir) (-> (&+ s5-0 80) transform rvec)) @@ -2368,11 +2364,7 @@ (edge-grab-info-method-10 gp-0) ) (vector-normalize! - (vector-! - (-> self control edge-grab-edge-dir) - (the-as vector (-> gp-0 world-vertex)) - (-> gp-0 world-vertex 1) - ) + (vector-! (-> self control edge-grab-edge-dir) (-> gp-0 world-vertex 0) (-> gp-0 world-vertex 1)) 1.0 ) ) @@ -2518,7 +2510,7 @@ ) ) ) - (vector<-cspace! s5-0 (the-as cspace (-> self node-list data))) + (vector<-cspace! s5-0 (-> self node-list data 0)) (if (not (and (logtest? (-> self water flags) (water-flag under-water)) (not (logtest? (-> self water flags) (water-flag swim-ground))) ) @@ -2557,7 +2549,7 @@ ) (logtest? (-> self water flags) (water-flag mud)) ) - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) (set! (-> self control camera-pos y) (-> self water base-height)) ) ((focus-test? self tube) @@ -2567,7 +2559,7 @@ (vector-copy! (-> self control camera-pos) (-> self control trans)) ) (else - (vector<-cspace! (-> self control camera-pos) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self control camera-pos) (-> self node-list data 0)) ) ) ) @@ -2640,10 +2632,7 @@ ) (vector-matrix*! (-> self control ctrl-to-head-offset) (-> *TARGET-bank* head-offset) a2-5) ) - (vector<-cspace! - (the-as vector (&-> (-> self control) sidekick-root bone)) - (-> self control sidekick-root parent) - ) + (vector<-cspace! (the-as vector (&-> self control sidekick-root bone)) (-> self control sidekick-root parent)) (let ((gp-0 (new-stack-vector0)) (s5-0 (new-stack-vector0)) ) diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc index 1b3a5cfa3ec..689207435b2 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc @@ -163,9 +163,9 @@ (.lvf vf5 (&-> arg2 quad)) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-3 quad) vf6) ) (set! (-> arg0 part-thruster-scale-x initial-valuef) arg3) diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc index 78afc58ee7d..59badc77ec5 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc @@ -405,7 +405,7 @@ (set! (-> self mech walk-anim-leg) 1) (set! s5-0 jakb-mech-punch-l-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 7 6963.2 @@ -416,7 +416,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-r-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 17 6963.2 @@ -427,7 +427,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-b-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 39 11141.12 @@ -438,7 +438,7 @@ (set! (-> self mech walk-anim-leg) 0) (set! s5-0 jakb-mech-punch-u-ja) ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) + (-> self mech state-impact 0) (ppointer->process (-> self manipy)) 39 11141.12 diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc index 85d098703da..4e279261efd 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc @@ -196,7 +196,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc index 9b686e4bdef..71f47fb87c5 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc @@ -134,15 +134,11 @@ ;; definition for method 15 of type hud-heatmeter ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-heatmeter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (the int (+ 25.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (the int (+ 25.0 (* -100.0 (-> this offset))))) (set! (-> this sprites 0 pos z) #xfffff0) (set-as-offset-from! (-> this sprites 1) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ (the int (* 0.128 (the float (-> this values 0 current)))) -63) 1 ) @@ -892,7 +888,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 @@ -988,9 +984,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) (let ((s2-0 (new 'stack-no-clear 'vector))) @@ -1005,9 +1001,9 @@ (.lvf vf5 (&-> v1-15 quad)) ) (.lvf vf4 (&-> s3-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) (let ((a0-8 s2-0)) @@ -1018,9 +1014,9 @@ (.lvf vf5 (&-> v1-16 quad)) ) (.lvf vf4 (&-> arg3 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (let ((a1-9 s5-0)) @@ -1033,9 +1029,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) ) @@ -1069,7 +1065,7 @@ (set! (-> a0-0 y) 10240.0) (set! (-> a0-0 z) 10240.0) (set! (-> a0-0 w) 1.0) - (vector-! (the-as vector a1-0) v1-2 a0-0) + (vector-! (-> a1-0 min) v1-2 a0-0) ) (let ((a1-2 (-> gp-0 bbox max)) (v1-3 (-> s5-0 trans)) @@ -1112,9 +1108,9 @@ ) (.lvf vf4 (&-> a0-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (let ((f0-11 @@ -1133,9 +1129,9 @@ ) (.lvf vf4 (&-> v1-18 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (let ((v1-19 (-> gp-0 move-dist)) @@ -1174,9 +1170,9 @@ ) (.lvf vf4 (&-> v1-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-16 quad) vf6) ) (vector-copy! (-> s3-0 user-position) s2-0) @@ -1231,13 +1227,7 @@ (set! (-> self mech jump-thrust) 0.0) (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) (set! (-> self mech state-impact? 0) #f) - ((method-of-type impact-control initialize) - (the-as impact-control (-> self mech state-impact)) - self - -1 - 0.0 - (collide-spec) - ) + ((method-of-type impact-control initialize) (-> self mech state-impact 0) self -1 0.0 (collide-spec)) (set! (-> self mech shield-max) 100.0) (set! (-> self mech shield-value) arg1) (set! (-> self mech entity) (entity-by-type mech)) @@ -1362,13 +1352,11 @@ (lambda :behavior target () (let ((gp-0 (ppointer->process (-> self parent)))) - ((method-of-type impact-control update-from-cspace) - (the-as impact-control (-> (the-as target gp-0) mech state-impact)) - ) + ((method-of-type impact-control update-from-cspace) (-> (the-as target gp-0) mech state-impact 0)) (when (-> (the-as target gp-0) mech state-impact? 0) (let ((a1-0 (new 'stack-no-clear 'collide-query))) ((method-of-type impact-control impact-control-method-11) - (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + (-> (the-as target gp-0) mech state-impact 0) a1-0 (the-as process gp-0) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) diff --git a/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc index 372b5513e01..a43fda9f9f4 100644 --- a/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc @@ -257,9 +257,9 @@ (vector-copy! (-> gp-0 accel-array 3) (-> gp-0 accel-array 2)) (vector-copy! (-> gp-0 accel-array 2) (-> gp-0 accel-array 1)) (vector-copy! (-> gp-0 accel-array 1) (-> gp-0 accel-array 0)) - (get-linear-accel! s5-0 (the-as vector (-> gp-0 accel-array))) + (get-linear-accel! s5-0 (-> gp-0 accel-array 0)) (vector-reset! (-> s4-0 0)) - (vector+float*! (-> s4-0 0) (-> s4-0 0) (the-as vector (-> gp-0 accel-array)) 1.0) + (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 0) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 1) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 2) 1.0) (vector+float*! (-> s4-0 0) (-> s4-0 0) (-> gp-0 accel-array 3) 1.0) @@ -414,11 +414,11 @@ (init-vf0-vector) (let ((gp-0 (-> self pilot))) (.lvf vf1 (&-> (-> gp-0 local-accel) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-1 vf1) (let ((f0-0 v1-1) (s5-0 (new 'stack-no-clear 'vector)) diff --git a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc index 3ee1cc53c75..e08d40c5c28 100644 --- a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc @@ -126,15 +126,15 @@ (.lvf vf5 (&-> s4-0 fvec quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) (.wait.vf) - (.mul.vf vf2 vf2 Q :mask #b111) - (.mov.vf vf2 vf0 :mask #b1000) + (.mul.vf.xyz vf2 vf2 Q) + (.mov.vf.w vf2 vf0) (.mul.x.vf vf3 vf3 vf1) (.mul.y.vf vf4 vf4 vf1) (.mul.z.vf vf5 vf5 vf1) (.mul.x.vf acc vf3 vf6) (.add.mul.y.vf acc vf4 vf6 acc) (.add.mul.z.vf acc vf5 vf6 acc) - (.add.mul.w.vf vf2 vf2 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf2 vf2 vf0 acc) (.svf (&-> s4-0 trans quad) vf2) (.svf (&-> s4-0 rvec quad) vf3) (.svf (&-> s4-0 uvec quad) vf4) diff --git a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc index 0db6a3a65a3..ebcbcb2dd00 100644 --- a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc @@ -643,12 +643,12 @@ (s4-0 (-> this ball-pos 1)) ) (vector-float*! s3-0 s3-0 (* 0.75 (-> this root root-prim local-sphere w))) - (vector+! (the-as vector s5-0) (-> this root trans) s3-0) + (vector+! (-> s5-0 0) (-> this root trans) s3-0) (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) 0.0) (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) 0.0) (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) 0.0) (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) 0.0) - (spawn (-> this part) (the-as vector s5-0)) + (spawn (-> this part) (-> s5-0 0)) (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) (the-as float #x1)) (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) (the-as float #x1)) @@ -671,7 +671,7 @@ ) ) ) - (setup-bolts! this (the-as vector s5-0) s4-0) + (setup-bolts! this (-> s5-0 0) s4-0) ) (none) ) @@ -2355,10 +2355,10 @@ (set! (-> sv-176 y) (rand-vu-float-range -8192.0 8192.0)) (set! (-> sv-176 z) (rand-vu-float-range -40960.0 40960.0)) (set! (-> sv-176 w) 1.0) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-160 quad)) (.lvf vf5 (&-> sv-176 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-192 quad) vf6) ((the-as (function object object object object object object object object none) s5-1) s4-1 diff --git a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc index 83412035b74..8e6fc17927f 100644 --- a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc @@ -293,9 +293,9 @@ ) (.lvf vf4 (&-> a0-15 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-22 quad) vf6) ) (set! (-> s2-0 y) (+ 4096.0 (-> s2-0 y))) @@ -335,9 +335,9 @@ ) (.lvf vf4 (&-> v1-35 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-26 quad) vf6) ) (set! (-> s3-0 y) (+ 4096.0 (-> s3-0 y))) @@ -1377,7 +1377,7 @@ (logclear! (-> self focus-status) (focus-status dead hit)) (logclear! (-> self target-flags) (target-flags disable-attacks)) ) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) (target-exit) ) :trans (behavior () @@ -1855,7 +1855,7 @@ (compute-alignment! (-> self align)) (let ((gp-0 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-0 (-> self clock frames-per-second)) ) ) @@ -2230,11 +2230,7 @@ ) (cond ((-> *setting-control* user-current death-info) - (mem-copy! - (the-as pointer (-> self death-resetter)) - (&-> (-> *setting-control* user-current death-info) node) - 16 - ) + (mem-copy! (the-as pointer (-> self death-resetter)) (&-> *setting-control* user-current death-info node) 16) ) (else (set! (-> self death-resetter continue) #f) diff --git a/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc b/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc index 4eabf8c9b7b..76cb91015a7 100644 --- a/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc @@ -219,10 +219,7 @@ (set! (-> self skel interp-select 1) 0) (quaternion-identity! (the-as quaternion (-> self gun top-anim-twist))) (set! (-> self gun combo-window-state) #f) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (reset-to-collide-spec (-> self gun track-target 1) (collide-spec jak player-list)) (add-connection *pad-engine* self target-gun-marking-menu self #f #f) ) @@ -272,10 +269,7 @@ (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun turn-fast-hold-time) 0) (set! (-> self gun gun-delay-fire) 0.0) - ((method-of-type focus reset-to-collide-spec) - (the-as focus (-> self gun track-target)) - (collide-spec jak player-list) - ) + ((method-of-type focus reset-to-collide-spec) (-> self gun track-target 0) (collide-spec jak player-list)) (set! (-> self gun fire-dir-rot) 0.0) (set! (-> self control unknown-float003) 0.0) (set! (-> self gun blue-whine-volume) 0.0) @@ -1694,7 +1688,7 @@ (set! (-> self gun track-target-hold-time) 0) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) (vector-copy! (-> self gun track-trans) (get-trans gp-0 3)) - (when ((method-of-type focus focus-on!) (the-as focus (-> self gun track-target)) gp-0) + (when ((method-of-type focus focus-on!) (-> self gun track-target 0) gp-0) (set-time! (-> self gun track-start-time)) (if (not (time-elapsed? (-> self control time-of-last-nonzero-input) (seconds 0.2))) (set-time! (-> self gun track-press-start-time)) @@ -1746,7 +1740,7 @@ ) (set! (-> self gun track?) (gun-track-flags gutflags-1 gutflags-2)) (set! (-> self gun track-target-hold-time) 0) - ((method-of-type focus clear-focused) (the-as focus (-> self gun track-target))) + ((method-of-type focus clear-focused) (-> self gun track-target 0)) ) (else (let ((a0-67 (get-search-info-flag (the-as process-focusable s5-2)))) @@ -2009,7 +2003,7 @@ gp-0 (current-time) ) - ((method-of-type focus focus-on!) (the-as focus (-> self gun track-target)) gp-0) + ((method-of-type focus focus-on!) (-> self gun track-target 0) gp-0) (focus-on! (-> self gun track-target 1) gp-0) (vector-copy! (-> self gun track-trans) (get-trans gp-0 3)) (set! (-> self gun track?) (gun-track-flags gutflags-0 gutflags-1 gutflags-2)) @@ -2617,10 +2611,10 @@ ) (matrix-rotate-xyz! gp-0 a1-5) (matrix->quaternion s5-0 gp-0) - (vector+! (the-as vector (-> self gun gun-pos)) (-> *edge-grab-info* center-hold) s4-0) + (vector+! (-> self gun gun-pos trans) (-> *edge-grab-info* center-hold) s4-0) (vector+float*! - (the-as vector (-> self gun gun-pos)) - (the-as vector (-> self gun gun-pos)) + (-> self gun gun-pos trans) + (-> self gun gun-pos trans) (-> self node-list data 0 bone transform fvec) 778.24 ) diff --git a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc index 682e7087fc8..99268093431 100644 --- a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc @@ -1207,8 +1207,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-15 quad) vf1) ) (set-time! (-> self control additional-decaying-velocity-end-time)) @@ -1768,7 +1768,7 @@ (vector-normalize! (vector-! s4-0 - (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control collision-spheres 0 prim-core world-sphere) (-> self control actor-contact-pt) ) 1.0 diff --git a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc index b1d6d997114..8f1f881f775 100644 --- a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc @@ -438,7 +438,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special diff --git a/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc b/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc index d5e2299f96e..82a1b790e4e 100644 --- a/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc @@ -36,7 +36,7 @@ (let ((gp-0 (new 'stack-no-clear 'quaternion))) (set! (-> gp-0 quad) (-> self control unknown-vector37 quad)) (set! (-> gp-0 y) 0.0) - (vector-normalize! (the-as vector gp-0) 1.0) + (vector-normalize! (-> gp-0 vec) 1.0) (let ((f30-0 (vector-normalize-ret-len! s5-0 1.0))) 0.0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) @@ -54,7 +54,7 @@ (let ((f0-6 (- 1.0 f0-5))) (vector+float*! (-> self control trans) - (the-as vector (-> self control unknown-quat39)) + (-> self control unknown-quat39 vec) (-> self control unknown-vector37) f0-6 ) diff --git a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc index ef1690d581b..ac1c33d909f 100644 --- a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc @@ -2378,9 +2378,9 @@ ) (.lvf vf5 (&-> s5-0 quad)) (.lvf vf4 (&-> gp-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) ) @@ -3179,9 +3179,9 @@ ) (.lvf vf5 (&-> s5-0 quad)) (.lvf vf4 (&-> gp-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-11 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-part_REF.gc b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc index f37aa48da89..51f6a5bbcad 100644 --- a/test/decompiler/reference/jak3/engine/target/target-part_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc @@ -99,14 +99,14 @@ ((< (-> s3-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s3-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s3-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) @@ -148,14 +148,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-10 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-11 vf1) ) @@ -193,14 +193,14 @@ ((< (-> s5-0 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-3 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-4 vf1) ) @@ -3516,8 +3516,8 @@ (.lvf vf4 (&-> sv-528 quad)) (.lvf vf5 (&-> v0-10 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-544 quad) vf6) (vector-normalize! s0-2 1.0) (set! sv-560 (get-process *default-dead-pool* lightning-tracker #x4000 0)) @@ -3547,9 +3547,9 @@ ) (.lvf vf4 (&-> v1-44 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-32 quad) vf6) ) (set-point! s4-1 (-> s4-1 state points-to-draw) s3-1) @@ -3573,9 +3573,9 @@ ) (.lvf vf4 (&-> v1-56 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-40 quad) vf6) ) (set! sv-608 s4-1) diff --git a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc index 8d56e43b7f7..b9c57b748c0 100644 --- a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc @@ -1042,7 +1042,7 @@ (compute-alignment! (-> self align)) (let ((gp-2 (new 'stack-no-clear 'vector))) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-2 (-> self align delta trans) (-> self control c-R-w)) (vector-float*! (-> self control transv) gp-2 (-> self clock frames-per-second)) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc b/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc index 5617d4352c5..7ddaeb8f498 100644 --- a/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-turret-shot_REF.gc @@ -284,9 +284,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 1013 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 1013 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc b/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc index abab81e83e6..cb3aae3d8f5 100644 --- a/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-turret_REF.gc @@ -923,7 +923,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special @@ -1109,7 +1109,7 @@ (-> *target* neck) (vector+! (new 'stack-no-clear 'vector) - (the-as vector (-> self root root-prim prim-core)) + (-> self root root-prim prim-core world-sphere) (new 'static 'vector :y 2048.0 :w 1.0) ) 'nothing-special @@ -1599,9 +1599,9 @@ ) (.lvf vf4 (&-> a0-5 0)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-15 0) vf6) ) (vector-normalize! (the-as vector (&-> arg0 inv-mat quad s3-0)) 1.0) diff --git a/test/decompiler/reference/jak3/engine/target/target-util_REF.gc b/test/decompiler/reference/jak3/engine/target/target-util_REF.gc index 7bd1db52233..a7b51ad13a3 100644 --- a/test/decompiler/reference/jak3/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-util_REF.gc @@ -1924,11 +1924,11 @@ ) ) (.lvf vf1 (&-> (-> arg0 trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-14 vf1) (cond ((!= v1-14 0.0) diff --git a/test/decompiler/reference/jak3/engine/target/target2_REF.gc b/test/decompiler/reference/jak3/engine/target/target2_REF.gc index dbea1f53d7e..7b45b12c474 100644 --- a/test/decompiler/reference/jak3/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target2_REF.gc @@ -1151,7 +1151,7 @@ ) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! s3-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! s3-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) s3-0) ) (suspend) @@ -1202,7 +1202,7 @@ (until (ja-done? 0) (compute-alignment! (-> self align)) (when (not (logtest? (-> self align flags) (align-flags disabled))) - (vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-matrix*! gp-0 (-> self align delta trans) (-> self control c-R-w)) (move-by-vector! (-> self control) gp-0) ) (suspend) diff --git a/test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc b/test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc index 8dcc3fe0cfc..3fe14d91b18 100644 --- a/test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc @@ -132,7 +132,7 @@ (init-vf0-vector) (.lvf vf1 (&-> arg0 quad)) (.lvf vf2 (&-> this offset quad)) - (.add.z.vf vf1 vf0 vf1 :mask #b10) + (.add.z.vf.y vf1 vf0 vf1) (.sub.vf vf1 vf1 vf2) (.mul.w.vf vf1 vf1 vf2) (.ftoi.vf vf1 vf1) @@ -304,7 +304,7 @@ (-> arg1 class) (.lvf vf1 (&-> arg1 last-world-pos quad)) (.lvf vf2 (&-> this offset quad)) - (.add.z.vf vf1 vf0 vf1 :mask #b10) + (.add.z.vf.y vf1 vf0 vf1) (.sub.vf vf1 vf1 vf2) (.mul.w.vf vf1 vf1 vf2) (.ftoi.vf vf1 vf1) @@ -312,7 +312,7 @@ (if (logtest? (-> arg1 class flags) (minimap-flag goal)) (set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6))) ) - (bigmap-method-18 this (the-as (pointer int32) sv-80)) + (bigmap-method-18 this (&-> sv-80 x)) (cond ((get-horizontal-flip-flag *blit-displays-work*) (set! f26-0 (- f26-0)) @@ -561,7 +561,7 @@ (let ((s0-3 (new 'stack 'vector4w))) 0.0 (set! (-> s0-3 quad) (-> this pos quad)) - (bigmap-method-18 this (the-as (pointer int32) s0-3)) + (bigmap-method-18 this (&-> s0-3 x)) (let ((f0-15 (cond ((get-horizontal-flip-flag *blit-displays-work*) (set! f30-0 (- f30-0)) @@ -604,7 +604,7 @@ ) ) ) - (vector-matrix*! (the-as vector (-> this corner)) (the-as vector (-> this corner)) sv-104) + (vector-matrix*! (-> this corner 0) (-> this corner 0) sv-104) (vector-matrix*! (-> this corner 1) (-> this corner 1) sv-104) (vector-matrix*! (-> this corner 2) (-> this corner 2) sv-104) (vector-matrix*! (-> this corner 3) (-> this corner 3) sv-104) diff --git a/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc b/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc index 3005108919a..b3b11ea9515 100644 --- a/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc @@ -9,7 +9,7 @@ (the int (+ (- 512.0 (* 20.0 (-> *video-params* relative-x-scale))) (* 140.0 (-> this offset)))) (the int (+ 281.0 (* 140.0 (-> this offset)))) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) 11 -11) (set! (-> this sprites 0 color w) (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) ) @@ -39,8 +39,8 @@ (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3) - (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 2 -3) + (draw-1 *minimap* s4-0 (-> this sprites 2 pos) #t) ) ) ((= (-> *setting-control* user-current race-minimap) 1) @@ -54,8 +54,8 @@ (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 0 -20) - (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 0 -20) + (draw-sprite2 *minimap* s4-2 (-> this sprites 2 pos) #t) ) ) ) @@ -133,9 +133,9 @@ (the int (+ (* -130.0 (-> this offset)) (* 18.0 (-> *video-params* relative-x-scale)))) (the int (+ 305.0 (* 130.0 (-> this offset)))) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 3)) 21 23) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 3)) 20 20) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 3)) 10 64) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 3 pos) 21 23) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 3 pos) 20 20) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 3 pos) 10 64) (set! (-> this sprites 1 scale-y) (* -0.098000005 (the float (-> this values 5 current)))) (cond ((nonzero? (-> this values 5 current)) @@ -156,7 +156,7 @@ (set! (-> this sprites 1 color z) 128) ) ) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 3)) 40 59) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 3 pos) 40 59) (set! (-> this sprites 2 scale-y) (* -0.096999995 (the float (-> this values 2 current)))) (cond ((nonzero? (-> this values 2 current)) @@ -220,7 +220,7 @@ ) (set-as-offset-from! (-> this sprites (+ s4-0 7)) - (the-as vector4w (-> this sprites 3)) + (-> this sprites 3 pos) (the int (-> v1-38 x)) (+ (the int (-> v1-38 y)) 1) ) @@ -236,7 +236,7 @@ ) (let ((s4-1 15)) (while (>= s4-1 s5-0) - (set-as-offset-from! (-> this sprites (+ s5-0 7)) (the-as vector4w (-> this sprites 3)) -200 0) + (set-as-offset-from! (-> this sprites (+ s5-0 7)) (-> this sprites 3 pos) -200 0) (+! s5-0 1) ) ) @@ -317,7 +317,7 @@ (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) 150 ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -28 20) + (set-as-offset-from! (-> this sprites 0) (-> this icons 0 pos) -28 20) (set! (-> this sprites 0 scale-x) 0.86) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 45) @@ -386,7 +386,7 @@ (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) 270 ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -20 -39) + (set-as-offset-from! (-> this sprites 0) (-> this icons 0 pos) -20 -39) (set! (-> this sprites 0 scale-x) 0.62) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 -5) @@ -447,12 +447,12 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 32.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 140 ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -12 8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -12 8) ((method-of-type hud draw) this) 0 (none) @@ -489,7 +489,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-timer)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) (the int (+ 50.0 (* -100.0 (-> this offset)))) ) @@ -501,20 +501,15 @@ (let ((s5-5 20) (s4-0 -42) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) s4-0 -24) (let ((s4-1 (+ s4-0 s5-5))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) s4-1 -24) (let ((s4-2 (+ s4-1 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this sprites 0 pos) s4-2 -24) (let ((s4-3 (+ s4-2 16))) - (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this sprites 0 pos) s4-3 -24) (let ((a2-13 (+ s4-3 s5-5))) - (set-as-offset-from! - (the-as hud-sprite (-> this strings 4 pos)) - (the-as vector4w (-> this sprites)) - a2-13 - -24 - ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 4 pos)) (-> this sprites 0 pos) a2-13 -24) ) ) ) @@ -600,12 +595,12 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-big-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) (the int (+ 50.0 (* -100.0 (-> this offset)))) ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -7 -24) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -7 -24) ((method-of-type hud draw) this) 0 (none) @@ -643,13 +638,13 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-goal)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) (let ((v1-4 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond ((= v1-4 (language-enum korean)) @@ -710,14 +705,10 @@ ;; definition for method 15 of type hud-miss ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-miss)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 448.0 (* 130.0 (-> this offset)))) - 70 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 448.0 (* 130.0 (-> this offset)))) 70) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 40 -40) (let ((v1-3 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond ((= v1-3 (language-enum korean)) @@ -789,13 +780,13 @@ (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) 256 (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y))) ) (set-as-offset-from! (-> this sprites 1) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42) 0 ) @@ -1165,7 +1156,7 @@ (the int (+ 40.0 (* -100.0 (-> this offset)))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- (the int (+ 507.0 (* 130.0 (-> this offset)))) (the int (* (the float sv-32) (-> *video-params* relative-x-scale))) ) @@ -1176,27 +1167,23 @@ ((zero? (-> this values 0 current)) (set! f30-0 0.0) (set! (-> this strings 0 pos x) 0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -3 0) ) (else - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) sv-48 sv-56) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) sv-48 sv-56) (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) - (the-as vector4w (-> this sprites)) + (-> this sprites 0 pos) (+ sv-32 -70) (+ sv-40 61) ) - (set-as-offset-from! - (-> this sprites 14) - (the-as vector4w (-> this sprites)) - (+ sv-32 -68) - (+ (if (= sv-80 20) - 122 - 97 - ) - sv-40 - ) - ) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) (+ sv-32 -68) (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) (set! (-> this sprites 14 scale-x) 1.0) (let ((s5-0 (the int (+ 0.1 (* (the float sv-80) (/ (the float (-> this values 1 current)) (the float sv-72))))))) (if (and (zero? s5-0) (nonzero? (-> this values 1 current))) @@ -1213,17 +1200,13 @@ (draw (-> this sprites 14) s3-0 (-> this level) #f) (+! (-> this sprites 14 pos y) -5) (if (= s2-0 (+ (/ sv-80 2) -1)) - (set-as-offset-from! - (-> this sprites 14) - (the-as vector4w (-> this sprites)) - (+ sv-32 -83) - (+ (if (= sv-80 20) - 122 - 97 - ) - sv-40 - ) - ) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) (+ sv-32 -83) (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) ) ) ) @@ -1232,7 +1215,7 @@ ) ) (set! (-> this sprites 14 scale-x) 0.0) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w sv-64) -4 -4) + (set-as-offset-from! (-> this sprites 15) (-> sv-64 pos) -4 -4) (dotimes (v1-125 12) (set! (-> this sprites (+ v1-125 2) scale-x) 0.0) ) @@ -1278,7 +1261,7 @@ (-> *gun-arrow-table* (+ (* s4-1 2) 1)) (-> *gun-arrow-table* (* s4-1 2)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1329,7 +1312,7 @@ (-> *gun-arrow-table* (+ (* s4-2 2) 7)) (-> *gun-arrow-table* (+ (* s4-2 2) 6)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1380,7 +1363,7 @@ (-> *gun-arrow-table* (+ (* s4-3 2) 13)) (-> *gun-arrow-table* (+ (* s4-3 2) 12)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) @@ -1431,7 +1414,7 @@ (-> *gun-arrow-table* (+ (* s4-4 2) 19)) (-> *gun-arrow-table* (+ (* s4-4 2) 18)) ) - (the-as vector4w sv-64) + (-> sv-64 pos) 0 0 ) diff --git a/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc index 0b771722f78..1da2e97271c 100644 --- a/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc @@ -2406,7 +2406,7 @@ (set-vector! (-> arg0 corner 2) (- f0-12) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-12 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-228) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-228) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-228) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-228) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-228) @@ -2549,7 +2549,7 @@ (set-vector! (-> arg0 corner 2) (- f0-11) 0.0 0.0 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-11 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-140) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-140) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-140) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-140) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-140) @@ -2694,7 +2694,7 @@ (set-vector! (-> arg0 corner 2) f0-8 0.0 f0-8 1.0) (set-vector! (-> arg0 corner 3) 0.0 0.0 (* 2.0 f0-8) 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -2866,7 +2866,7 @@ (set-vector! (-> arg0 corner 2) 0.0 0.0 (- f0-7) 1.0) (set-vector! (-> arg0 corner 3) f0-7 0.0 0.0 1.0) ) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) sv-232) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) @@ -3031,7 +3031,7 @@ (set! (-> arg0 corner 3 x) (/ (-> this map-inv-scale) -4)) (set! (-> arg0 corner 3 z) (/ (-> this map-inv-scale) -4)) (set! (-> arg0 corner 3 w) 1.0) - (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 0) (-> arg0 corner 0) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) (-> arg0 mat)) (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) (-> arg0 mat)) @@ -3693,7 +3693,7 @@ (set-vector! (-> gp-0 corner 2) (- f0-29) 0.0 0.0 1.0) (set-vector! (-> gp-0 corner 3) 0.0 0.0 f0-29 1.0) ) - (vector-matrix*! (the-as vector (-> gp-0 corner)) (the-as vector (-> gp-0 corner)) s1-1) + (vector-matrix*! (-> gp-0 corner 0) (-> gp-0 corner 0) s1-1) (vector-matrix*! (-> gp-0 corner 1) (-> gp-0 corner 1) s1-1) (vector-matrix*! (-> gp-0 corner 2) (-> gp-0 corner 2) s1-1) (vector-matrix*! (-> gp-0 corner 3) (-> gp-0 corner 3) s1-1) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc index 988f6d4e7fe..11f9c9b07e2 100644 --- a/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc @@ -3819,11 +3819,11 @@ ) (set! (-> this sprites 0 pos z) #xffffff) (set! (-> this sprites 0 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160) + (set-hud-piece-position! (-> this sprites 0) 240 160) (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id hud-draw-hud-alpha) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s2-0 (-> *level* level-default) #t) + ((method-of-type hud-sprite draw) (-> this sprites 0) s2-0 (-> *level* level-default) #t) ) (let ((a0-16 arg1)) (set! (-> a0-16 flags) (font-flags kerning middle middle-vert large)) diff --git a/test/decompiler/reference/jak3/engine/util/profile_REF.gc b/test/decompiler/reference/jak3/engine/util/profile_REF.gc index d6723259975..dba29276242 100644 --- a/test/decompiler/reference/jak3/engine/util/profile_REF.gc +++ b/test/decompiler/reference/jak3/engine/util/profile_REF.gc @@ -729,7 +729,7 @@ (let ((s3-0 (-> *profile-array* data s5-0)) (s4-0 *profile-collapse*) ) - (mem-copy! (&-> s3-0 type) (&-> (-> this data s5-0) type) #x4030) + (mem-copy! (&-> s3-0 type) (&-> this data s5-0 type) #x4030) (cond ((zero? s5-0) ((lambda ((arg0 profile-segment-array) (arg1 profile-collapse)) @@ -1026,7 +1026,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc index fbfa9af0a38..e731771c6d5 100644 --- a/test/decompiler/reference/jak3/kernel/gkernel_REF.gc +++ b/test/decompiler/reference/jak3/kernel/gkernel_REF.gc @@ -438,6 +438,7 @@ ) ;; definition for method 2 of type process +;; INFO: this function exists in multiple non-identical object files (defmethod print ((this process)) (cond ((and (-> this top-thread) (!= (-> this status) 'dead)) @@ -656,7 +657,6 @@ ) ;; definition for method 3 of type dead-pool-heap -;; INFO: this function exists in multiple non-identical object files (defmethod inspect ((this dead-pool-heap)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tname: ~A~%" (-> this name)) @@ -975,7 +975,7 @@ (set! (-> s4-0 prev) a1-3) (set! (-> this alive-list prev) s4-0) (set! (-> s4-0 process) - (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> (-> s4-0 process) type)))) + (relocate (-> s4-0 process) (&- (gap-location this a1-3) (the-as uint (&-> s4-0 process type)))) ) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-extra_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-extra_REF.gc index ca3f13ef67d..af738cdbf27 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-extra_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-extra_REF.gc @@ -46,9 +46,9 @@ (the int (+ 15.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 2) (let* ((f0-9 (the float (-> this sprites 2 color x))) (f26-0 (the float (-> this sprites 2 color y))) (f30-0 (the float (-> this sprites 2 color z))) @@ -133,9 +133,9 @@ ;; definition for method 15 of type hud-hellcat ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-hellcat)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set-hud-piece-position! (-> this sprites 0) 5 366) (set! (-> this sprites 0 pos z) #xffffff) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 9) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 9) (set! (-> this sprites 1 pos z) #xffffff) (let ((f0-1 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) @@ -210,7 +210,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-pickup-arrows)) (set! (-> this sprites 0 color w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set-hud-piece-position! (-> this sprites 0) 32 208) (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) (set! (-> this sprites 1 color w) 0) (set-hud-piece-position! (-> this sprites 1) 480 208) @@ -283,7 +283,3 @@ ) ((method-of-type hud event-callback) this arg0 arg1 arg2 arg3) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc index 9f6abf6fc75..e542ff4df98 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs2_REF.gc @@ -316,7 +316,7 @@ (s5-0 (-> this rotation-matrix)) (f0-8 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-5)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-0)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-0 rvec)) 0.0) (set! f0-8 (* -1.0 f0-8)) ) (set! (-> this me-to-focus-angle) f0-8) @@ -2856,15 +2856,15 @@ (v1-1 (new 'stack-no-clear 'vector)) ) (let ((a1-1 (new 'stack-no-clear 'vector))) - (vector-! v1-1 a0-2 (the-as vector (-> this main-joint-movement))) + (vector-! v1-1 a0-2 (-> this main-joint-movement 0)) (let ((a2-1 v1-1)) (.lvf vf1 (&-> v1-1 quad)) (let ((f0-0 (-> pp clock frames-per-second))) (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-1 quad) vf1) ) (vector-! a1-1 v1-1 (-> this main-joint-movement 1)) @@ -2874,8 +2874,8 @@ (.mov at-1 f0-1) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-3 quad) vf1) ) ) @@ -3088,13 +3088,13 @@ (dotimes (s4-0 (-> s5-0 length)) (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) (when s3-0 - (vector-! (the-as vector (-> sv-64 vertex)) (the-as vector sv-76) (the-as vector (-> s3-0 bounds))) + (vector-! (-> sv-64 vertex 0) (the-as vector sv-76) (the-as vector (-> s3-0 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-1 v1-15) (f1-0 (-> s3-0 bounds r)) @@ -3180,9 +3180,9 @@ ) (.lvf vf4 (&-> a0-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-9 quad) vf6) ) (vector-copy! (-> this start-target-pos) (-> this target-pos)) diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc index b4b1048bf17..97c7a780477 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-obs_REF.gc @@ -804,8 +804,8 @@ (.lvf vf4 (&-> v1-19 quad)) (.lvf vf5 (&-> a0-11 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-208 quad) vf6) 0.0 (let ((s2-1 (new 'stack-no-clear 'vector))) diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-shared_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-shared_REF.gc index 76158b7f6a8..9fc7f7347a9 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-shared_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/blow-tower-shared_REF.gc @@ -315,7 +315,7 @@ (defun process-xform-list ((arg0 xform) (arg1 xform) (arg2 (inline-array xform)) (arg3 int)) (let ((s5-0 (matrix<-transformq! (new 'stack-no-clear 'matrix) (-> arg1 root)))) (dotimes (s2-0 arg3) - (let ((a1-3 (matrix<-transformq! (new 'stack-no-clear 'matrix) (the-as transformq (-> arg2 s2-0))))) + (let ((a1-3 (matrix<-transformq! (new 'stack-no-clear 'matrix) (-> arg2 s2-0 root)))) (matrix*! s5-0 a1-3 s5-0) ) ) @@ -915,7 +915,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc b/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc index 039757c0bfe..a004d28534c 100644 --- a/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/blow-tower/cty-blow-tower_REF.gc @@ -1891,7 +1891,7 @@ (let ((gp-0 (new 'stack-no-clear 'quaternion))) (if (send-event a0-5 'get-cam-info (-> self trans) gp-0) (forward-up->inv-matrix - (the-as matrix (-> self tracking)) + (-> self tracking inv-mat) (vector-z-quaternion! (new 'stack-no-clear 'vector) gp-0) (vector-y-quaternion! (new 'stack-no-clear 'vector) gp-0) ) diff --git a/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc b/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc index 9111851b6f9..c5d79935e41 100644 --- a/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/bombbot/bombbot_REF.gc @@ -28,13 +28,9 @@ ;; definition for method 15 of type bombbot-hud ;; WARN: Return type mismatch int vs none. (defmethod draw ((this bombbot-hud)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 62 -9) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 62 -9) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (* 0.01 (the float (-> this values 0 current))))) (set! (-> this sprites 1 color x) 0) @@ -409,8 +405,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-2 quad) vf1) ) (let ((a0-3 a1-0)) @@ -450,9 +446,9 @@ ) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-14 quad) vf6) ) (set! (-> this rot-angle) (* -4.0 (vector-length (-> this root transv)))) @@ -537,9 +533,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-1 quad) vf6) ) (let ((s1-1 (-> s5-0 dest))) @@ -552,9 +548,9 @@ ) (.lvf vf4 (&-> s2-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-1 quad) vf6) ) (vector-copy! (-> s5-0 src) (-> self root trans)) @@ -617,7 +613,7 @@ ) 0.0 (vector-copy! (-> a1-2 start-pos) (-> v1-4 world-sphere)) - (vector-! (-> a1-2 move-dist) (the-as vector a0-5) (the-as vector v1-4)) + (vector-! (-> a1-2 move-dist) (-> a0-5 world-sphere) (-> v1-4 world-sphere)) ) (let ((v1-5 a1-2)) (set! (-> v1-5 radius) 40.96) @@ -1268,9 +1264,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -1283,9 +1279,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -1299,9 +1295,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -1375,9 +1371,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector-normalize-copy! s5-0 (-> s1-0 fvec) 819200.0) @@ -1577,7 +1573,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 24576.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -1638,8 +1634,8 @@ (.mov at-0 f0-17) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-12 quad) vf1) (vector+! a1-6 v1-42 a0-12) ) @@ -1653,9 +1649,9 @@ ) (.lvf vf4 (&-> v1-43 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (let ((a1-9 s3-0)) @@ -1668,9 +1664,9 @@ ) (.lvf vf4 (&-> v1-44 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) ) @@ -1685,9 +1681,9 @@ ) (.lvf vf4 (&-> v1-46 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) s2-0 -49152.0) @@ -1713,9 +1709,9 @@ ) (.lvf vf4 (&-> a0-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-51 quad) vf6) (- (-> s3-0 y) (-> v1-51 y)) (vector-copy! s3-0 v1-51) @@ -1734,9 +1730,9 @@ ) (.lvf vf4 (&-> v1-55 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-16 quad) vf6) ) (let ((t9-6 bombbot-do-spline) @@ -1855,9 +1851,9 @@ ) (.lvf vf4 (&-> v1-133 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-31 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) s2-0 -24576.0) @@ -1883,9 +1879,9 @@ ) (.lvf vf4 (&-> v1-139 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-6 quad) vf6) (let ((f0-65 (- (-> s3-0 y) (-> s0-6 y)))) (lerp-scale 1.0 0.0 f0-65 0.0 8192.0) @@ -2036,9 +2032,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -2242,9 +2238,9 @@ ) (.lvf vf4 (&-> a0-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-34 quad) vf6) ) (vector-copy! (-> this start-target-pos) (-> gp-0 root trans)) @@ -2298,9 +2294,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (vector-normalize-copy! s2-0 (-> s4-0 fvec) 819200.0) @@ -2402,9 +2398,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a3-0 quad) vf6) ) (let ((f30-0 (-> *part-id-table* 2056 init-specs 4 initial-valuef))) @@ -2561,9 +2557,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (vector-normalize-copy! s4-0 (-> s5-0 fvec) 819200.0) @@ -2731,9 +2727,9 @@ ) (.lvf vf4 (&-> a0-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) (if (= (-> v1-19 type) target) @@ -2785,7 +2781,7 @@ (-> self root trans) (-> self root trans) (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-1)) (-> self root trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self city-path node gp-1 position) (-> self root trans)) (-> *bombbot-nav-enemy-info* run-travel-speed) ) ) @@ -2805,7 +2801,7 @@ (nav-enemy-method-187 self) ) ) - (if (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-1))) 32768.0) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self city-path node gp-1 position)) 32768.0) (set! (-> self current-node) (the-as uint @@ -2869,9 +2865,9 @@ ) (.lvf vf4 (&-> s5-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) ) ) @@ -3484,9 +3480,9 @@ ) (.lvf vf4 (&-> a0-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (set! (-> v1-3 main-y) (- (-> s4-0 feet s0-0 real-position y) (-> s4-0 root trans y))) @@ -3540,9 +3536,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-13 quad) vf6) ) ) @@ -3620,8 +3616,8 @@ (.lvf vf4 (&-> sv-128 quad)) (.lvf vf5 (&-> v0-2 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-144 quad) vf6) (rot-zxy-from-vector! s0-0 (-> arg0 bone transform fvec)) (rot-zxy-from-vector! s0-0 *z-vector*) @@ -3665,8 +3661,8 @@ (.lvf vf4 (&-> sv-112 quad)) (.lvf vf5 (&-> v0-1 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-128 quad) vf6) (rot-zxy-from-vector! s2-0 (-> arg0 bone transform fvec)) (rot-zxy-from-vector! s1-0 s0-0) @@ -3774,8 +3770,8 @@ (let ((v1-31 s0-0)) (.lvf vf4 (&-> s4-0 quad)) (.lvf vf5 (&-> sv-160 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-31 quad) vf6) ) (let ((a1-4 s1-0) @@ -3801,8 +3797,8 @@ (.mov at-0 f0-15) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-48 quad) vf1) ) 0 @@ -4144,9 +4140,9 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-25 quad) vf6) ) (vector-copy! (-> this start-target-pos) (-> this target-pos)) @@ -4209,9 +4205,9 @@ ) (.lvf vf4 (&-> v1-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (vector-copy! (-> self target-pos) (-> self start-target-pos)) @@ -4348,7 +4344,7 @@ (set! (-> a2-2 y) -8192.0) (set! (-> a2-2 z) 40960.0) (set! (-> a2-2 w) 1.0) - (vector-! (the-as vector v1-10) a0-6 a2-2) + (vector-! (-> v1-10 min) a0-6 a2-2) ) (let ((v1-12 (-> a1-2 bbox max)) (a0-8 (-> this root trans)) @@ -4446,9 +4442,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (let ((s4-0 gp-0)) (let ((s5-0 gp-0)) @@ -4460,9 +4456,9 @@ ) (.lvf vf4 (&-> s5-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) ) gp-0 @@ -4520,9 +4516,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-1 quad) vf6) ) (vector-copy! sv-876 (get-trans this 4)) @@ -4634,9 +4630,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector-normalize-copy! s4-0 (-> s5-0 fvec) 614400.0) @@ -4743,9 +4739,9 @@ ) (.lvf vf4 (&-> gp-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-5 quad) vf6) ) (let ((a1-7 (new 'stack-no-clear 'vector))) @@ -4841,9 +4837,9 @@ ) (.lvf vf4 (&-> a0-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-17 quad) vf6) ) (set! (-> self root transv y) 0.0) @@ -4949,9 +4945,9 @@ ) (.lvf vf4 (&-> a0-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-25 quad) vf6) (set! (-> a1-3 param 0) (the-as uint v1-25)) ) @@ -5309,7 +5305,7 @@ (let ((v1-114 (the int (* 0.000030517578 (vector-vector-xz-distance (-> s2-0 root trans) - (the-as vector (-> s2-0 city-path node (+ (-> s2-0 city-path node-count) -1))) + (-> s2-0 city-path node (+ (-> s2-0 city-path node-count) -1) position) ) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/common/guard-states_REF.gc b/test/decompiler/reference/jak3/levels/city/common/guard-states_REF.gc index fbbc78b2b31..f0c8fe884d1 100644 --- a/test/decompiler/reference/jak3/levels/city/common/guard-states_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/guard-states_REF.gc @@ -551,9 +551,9 @@ ) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (let ((f30-2 (* 0.5 (vector-vector-xz-distance s3-0 s1-0)))) @@ -1097,9 +1097,9 @@ (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-3 quad) vf6) ) (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) diff --git a/test/decompiler/reference/jak3/levels/city/common/guard-tazer_REF.gc b/test/decompiler/reference/jak3/levels/city/common/guard-tazer_REF.gc index 71e2d07f2c2..f5ac50096c8 100644 --- a/test/decompiler/reference/jak3/levels/city/common/guard-tazer_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/guard-tazer_REF.gc @@ -56,9 +56,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (vector-copy! s5-0 s3-0) @@ -75,9 +75,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (vector-negate! (-> s0-0 move-dist) s4-0) @@ -93,9 +93,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (let ((a1-11 s3-0)) @@ -108,9 +108,9 @@ ) (.lvf vf4 (&-> v1-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (vector-copy! s5-0 s3-0) @@ -187,9 +187,9 @@ (.lvf vf5 (&-> s2-0 quad)) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-12 quad) vf6) ) (vector+! s5-0 s4-0 s1-0) diff --git a/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc b/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc index 9d08aba0590..7d25495ec49 100644 --- a/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/height-map_REF.gc @@ -136,7 +136,7 @@ (s4-0 (-> this x-dim)) (s3-0 (-> this z-dim)) ) - (let ((s2-0 (&-> (-> this data) 0))) + (let ((s2-0 (&-> this data 0))) (set! (-> s5-0 0 min z) (-> this z-offset)) (countdown (s1-0 s3-0) (let ((s0-0 s2-0)) @@ -149,16 +149,8 @@ (+! (-> s5-0 0 min x) f28-0) (set! s0-0 (&-> s0-0 1)) (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> s0-0 0)) (-> this y-scale)))) - (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s5-0 0)) - (-> s5-0 0 max) - *color-red* - #f - (the-as rgba -1) - ) + (if (and (point-in-bbox? (-> s5-0 1) (-> s5-0 0 min)) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line #t (bucket-id debug) (-> s5-0 0 min) (-> s5-0 0 max) *color-red* #f (the-as rgba -1)) ) ) ) @@ -166,7 +158,7 @@ (&+! s2-0 s4-0) ) ) - (let ((s2-1 (&-> (-> this data) 0))) + (let ((s2-1 (&-> this data 0))) (set! (-> s5-0 0 min x) (-> this x-offset)) (countdown (s1-1 s4-0) (let ((s0-1 (the-as pointer s2-1))) @@ -183,16 +175,8 @@ (set! (-> s5-0 0 min y) (+ (-> this y-offset) (* (the float (-> (the-as (pointer int8) s0-1))) (-> this y-scale))) ) - (if (and (point-in-bbox? (-> s5-0 1) (the-as vector (-> s5-0 0))) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s5-0 0)) - (-> s5-0 0 max) - *color-blue* - #f - (the-as rgba -1) - ) + (if (and (point-in-bbox? (-> s5-0 1) (-> s5-0 0 min)) (point-in-bbox? (-> s5-0 1) (-> s5-0 0 max))) + (add-debug-line #t (bucket-id debug) (-> s5-0 0 min) (-> s5-0 0 max) *color-blue* #f (the-as rgba -1)) ) ) ) @@ -224,8 +208,8 @@ ) (.lvf vf4 (&-> a0-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-1 quad) vf5) ) (let ((a1-2 (-> v1-0 1))) @@ -235,8 +219,8 @@ ) (.lvf vf4 (&-> a0-2 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-2 quad) vf5) ) (debug-draw-mesh this (-> v1-0 0)) diff --git a/test/decompiler/reference/jak3/levels/city/common/nav-graph_REF.gc b/test/decompiler/reference/jak3/levels/city/common/nav-graph_REF.gc index ff41402a0fe..97ba045ec0e 100644 --- a/test/decompiler/reference/jak3/levels/city/common/nav-graph_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/nav-graph_REF.gc @@ -83,8 +83,8 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-3 quad) vf5) ) (let ((a1-4 (-> v1-8 1))) @@ -94,8 +94,8 @@ ) (.lvf vf4 (&-> a0-7 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a1-4 quad) vf5) ) (add-debug-box #t (bucket-id debug) (-> v1-8 0) (-> v1-8 1) *color-yellow*) @@ -1100,7 +1100,7 @@ (let ((a0-10 (-> v1-16 nav-mesh)) (a1-5 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-5 vertex)) s3-0 (the-as vector (-> a0-10 bounds))) + (vector-! (-> a1-5 vertex 0) s3-0 (the-as vector (-> a0-10 bounds))) (set! (-> a1-5 vertex1 x) 40960.0) (set! (-> a1-5 data 20) (the-as uint 2)) (if (nav-mesh-method-45 a0-10 a1-5) diff --git a/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc index 4bd0f407f37..45492806d12 100644 --- a/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/trail_REF.gc @@ -416,7 +416,7 @@ (cond ((> a1-1 0) (let* ((a1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ a1-1 -1) 4)))) - (a0-7 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) a1-4)))) + (a0-7 (&-> this visnode-ids (-> (the-as (pointer uint16) a1-4)))) ) (countdown (a1-5 (-> (the-as trail-conn-hash-cell a1-4) conn-count)) (let ((a3-4 (-> v1-1 (-> a0-7 0)))) @@ -475,7 +475,7 @@ (when (not (logtest? a2-4 a1-2)) (set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2)) (let* ((v1-3 (-> this conn-hash cell v1-1)) - (s4-0 (&-> (-> this conn-hash conn-ids) (-> v1-3 first-conn))) + (s4-0 (&-> this conn-hash conn-ids (-> v1-3 first-conn))) ) (countdown (s3-0 (-> v1-3 conn-count)) (let* ((s2-0 (-> s4-0 0)) @@ -629,7 +629,7 @@ (cond ((> v1-1 0) (let* ((v1-4 (the-as object (+ (the-as uint (-> this visgroup)) (* (+ v1-1 -1) 4)))) - (s4-1 (&-> (-> this visnode-ids) (-> (the-as (pointer uint16) v1-4)))) + (s4-1 (&-> this visnode-ids (-> (the-as (pointer uint16) v1-4)))) (s3-0 (-> (the-as trail-conn-hash-cell v1-4) conn-count)) ) (-> this visnode-ids) @@ -936,7 +936,7 @@ (set! (-> this goal-node-id) s5-0) (return 3) ) - (let ((s3-0 (&-> (-> this conn-ids) (-> s4-0 first-conn)))) + (let ((s3-0 (&-> this conn-ids (-> s4-0 first-conn)))) (countdown (s2-0 (-> s4-0 conn-count)) (let* ((a0-8 (-> this conn (-> s3-0 0))) (v1-14 (-> a0-8 flags)) @@ -1056,7 +1056,7 @@ (vector-copy! (-> s5-0 p1) (-> s5-0 p0)) (set! (-> s5-0 best-count) (the-as uint 0)) (set! (-> s5-0 best-dist) -1.0) - (let ((s2-0 (&-> (-> this conn-ids) (-> v1-2 first-conn)))) + (let ((s2-0 (&-> this conn-ids (-> v1-2 first-conn)))) (countdown (s1-0 (-> v1-2 conn-count)) (let* ((v1-4 (-> this conn (-> s2-0 0))) (s0-0 (-> v1-4 tail-id)) diff --git a/test/decompiler/reference/jak3/levels/city/ctyport-obs_REF.gc b/test/decompiler/reference/jak3/levels/city/ctyport-obs_REF.gc index 2e2a8681b7d..1af224e21fe 100644 --- a/test/decompiler/reference/jak3/levels/city/ctyport-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/ctyport-obs_REF.gc @@ -324,11 +324,11 @@ (f0-1 (* f0-0 (* f1-0 f1-0))) ) (.lvf vf1 (&-> (-> this rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-8 vf1) (when (< v1-8 f0-1) (logclear! (-> this v-flags) (vehicle-flag disturbed)) @@ -408,11 +408,11 @@ (f0-5 (* f0-3 f0-3)) ) (.lvf vf1 (&-> (-> s5-1 0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-42 vf1) (when (< f0-5 v1-42) (vector-copy! (-> s5-1 5) (-> s5-1 0)) diff --git a/test/decompiler/reference/jak3/levels/city/ctywide-obs_REF.gc b/test/decompiler/reference/jak3/levels/city/ctywide-obs_REF.gc index 7500b56798b..7a30451dd17 100644 --- a/test/decompiler/reference/jak3/levels/city/ctywide-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/ctywide-obs_REF.gc @@ -323,9 +323,9 @@ ) (.lvf vf4 (&-> a0-29 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-43 quad) vf6) ) (let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> s5-1 0)) root trans) (the-as vector (-> self plane))))) @@ -339,9 +339,9 @@ ) (.lvf vf4 (&-> a0-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-50 quad) vf6) ) (let ((v1-53 (-> (the-as process-drawable (-> s5-1 0)) root trans))) @@ -360,9 +360,9 @@ ) (.lvf vf4 (&-> a0-36 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-53 quad) vf6) ) ) @@ -1240,9 +1240,9 @@ ) (.lvf vf4 (&-> a1-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-12 quad) vf6) (vector-copy! v1-25 a0-12) ) @@ -1261,9 +1261,9 @@ ) (.lvf vf4 (&-> a1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-17 quad) vf6) (vector-copy! v1-40 a0-17) ) @@ -1733,9 +1733,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -1817,11 +1817,11 @@ ) (.lvf vf4 (&-> a2-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-18 quad) vf6) - (t9-4 (the-as matrix a0-6) (vector-! a1-3 v1-18 gp-0) (-> *camera* local-down)) + (t9-4 (-> a0-6 inv-mat) (vector-! a1-3 v1-18 gp-0) (-> *camera* local-down)) ) ) ) @@ -1915,9 +1915,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -2056,11 +2056,11 @@ ) (.lvf vf4 (&-> a2-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-35 quad) vf6) - (t9-6 (the-as matrix a0-27) (vector-! a1-13 v1-35 gp-1) (-> *camera* local-down)) + (t9-6 (-> a0-27 inv-mat) (vector-! a1-13 v1-35 gp-1) (-> *camera* local-down)) ) ) ) @@ -2151,9 +2151,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -3364,10 +3364,10 @@ ;; definition for method 15 of type board-score-hud ;; WARN: Return type mismatch int vs none. (defmethod draw ((this board-score-hud)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (set-hud-piece-position! (-> this sprites 0) 447 70) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/city/ctywide-part_REF.gc b/test/decompiler/reference/jak3/levels/city/ctywide-part_REF.gc index b7e770929c7..690db65400d 100644 --- a/test/decompiler/reference/jak3/levels/city/ctywide-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/ctywide-part_REF.gc @@ -153,14 +153,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-5 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-5 qx-qy-qz-sy quad) vf1) (.mov v1-6 vf1) ) (else (.lvf vf1 (&-> v1-5 qx-qy-qz-sy quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-5 qx-qy-qz-sy quad) vf1) (.mov v1-7 vf1) ) @@ -3088,7 +3088,3 @@ (:flags (sp-cpuinfo-flag-3)) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/destroy-grid/cty-destroy-grid_REF.gc b/test/decompiler/reference/jak3/levels/city/destroy-grid/cty-destroy-grid_REF.gc index 704c98fb0ed..44f3da01e1d 100644 --- a/test/decompiler/reference/jak3/levels/city/destroy-grid/cty-destroy-grid_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/destroy-grid/cty-destroy-grid_REF.gc @@ -28,9 +28,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 6 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 6 2) (set! (-> this sprites 3 scale-x) 1.2) (set! (-> this sprites 3 scale-y) 1.25) ((method-of-type hud draw) this) @@ -765,7 +765,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) @@ -907,9 +907,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) ) (if (< 12288.0 (vector-vector-distance (-> self destination) (-> self root trans))) @@ -992,9 +992,9 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) ) (cond @@ -1823,9 +1823,9 @@ ) (.lvf vf4 (&-> s1-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) (when (< (vector-vector-distance (-> s3-0 actor trans) (-> s5-0 root trans)) 40960.0) @@ -1939,11 +1939,11 @@ (if (and (< (vector-vector-distance (-> this goal-pos) (-> s5-0 root trans)) 163840.0) (begin (.lvf vf1 (&-> (-> s4-4 root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-180 vf1) (let ((f0-4 v1-180) (f1-2 12288.0) @@ -1959,11 +1959,11 @@ (let ((v1-197 (get-best-seat s4-4 (-> s4-4 root trans) (the-as vehicle-seat-flag (-> s5-0 info seat-flag)) 1))) (when (!= v1-197 -1) (.lvf vf1 (&-> (-> s4-4 root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-201 vf1) (let ((f0-5 v1-201) (f1-5 32768.0) @@ -2394,9 +2394,9 @@ (.lvf vf5 (&-> v0-10 quad)) ) (.lvf vf4 (&-> sv-80 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) ((the-as (function object object object object object object none) s4-2) s3-1 s2-0 s1-0 s0-0 #f -1) ) @@ -2422,9 +2422,9 @@ (.lvf vf5 (&-> v0-14 quad)) ) (.lvf vf4 (&-> sv-96 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-1 quad) vf6) ((the-as (function object object object object object object none) s4-3) s3-2 s2-1 s1-1 s0-1 #f -1) ) diff --git a/test/decompiler/reference/jak3/levels/city/farm/ctyfarm-obs_REF.gc b/test/decompiler/reference/jak3/levels/city/farm/ctyfarm-obs_REF.gc index 7574366ba2a..a9bc9fa227e 100644 --- a/test/decompiler/reference/jak3/levels/city/farm/ctyfarm-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/farm/ctyfarm-obs_REF.gc @@ -1394,7 +1394,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4035) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) @@ -1642,7 +1642,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4043) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) diff --git a/test/decompiler/reference/jak3/levels/city/hijack/billiards_REF.gc b/test/decompiler/reference/jak3/levels/city/hijack/billiards_REF.gc index 718b085173c..ee2681c6bbd 100644 --- a/test/decompiler/reference/jak3/levels/city/hijack/billiards_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/hijack/billiards_REF.gc @@ -138,7 +138,7 @@ ) (set! (-> s3-0 w) 1.0) ) - (vector+! (the-as vector (-> this billiards data s5-0)) (-> this min-xyz) s4-0) + (vector+! (-> this billiards data s5-0 pos) (-> this min-xyz) s4-0) ) ) (billiard-table-method-14 this) diff --git a/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc b/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc index 7c19fa02900..8009f9a810b 100644 --- a/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/hijack/kg-vehicles_REF.gc @@ -568,7 +568,7 @@ (set! (-> this draw lod-set lod 0 dist) 1228800.0) (dotimes (s5-0 (-> this sled billiards length)) (let ((f30-0 (vector-vector-xz-distance - (the-as vector (-> this sled billiards data s5-0)) + (-> this sled billiards data s5-0 pos) (the-as vector (+ (the-as uint (-> this sled billiards data 0 prev-pos)) (* 48 s5-0))) ) ) @@ -619,7 +619,7 @@ (quaternion-copy! (-> s4-2 root quat) (-> this root quat)) (-> this sled billiards data s5-2) (let ((s3-3 (new 'stack-no-clear 'vector))) - (vector-matrix*! s3-3 (the-as vector (-> this sled billiards data s5-2)) (-> this sled mat)) + (vector-matrix*! s3-3 (-> this sled billiards data s5-2 pos) (-> this sled mat)) (vector-copy! (-> s4-2 root trans) s3-3) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/onintent/onintent-part_REF.gc b/test/decompiler/reference/jak3/levels/city/onintent/onintent-part_REF.gc index 04b7e3394e8..f7b37105df5 100644 --- a/test/decompiler/reference/jak3/levels/city/onintent/onintent-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/onintent/onintent-part_REF.gc @@ -1535,10 +1535,6 @@ ) ) (sparticle-turn-to-vel arg0 arg1 (the-as sprite-vec-data-3d arg2)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 rvec)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc b/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc index 11691ad9067..ef4bf6e9012 100644 --- a/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/port/attack/ctyport-attack_REF.gc @@ -3207,12 +3207,12 @@ (the int (+ 65.0 (* 18.0 (-> *video-params* relative-x-scale)) (* -130.0 (-> this offset)))) (the int (+ 350.0 (* 130.0 (-> this offset)))) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 5 -25) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 5 5) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 5 -25) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 5 5) (logior! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) (logior! (-> this sprites 2 flags) (hud-sprite-flags hsf3 hsf4)) (logior! (-> this sprites 3 flags) (hud-sprite-flags hsf3)) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1110 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1110 0) (logior! (-> this sprites 1 flags) (hud-sprite-flags hsf3 hsf5)) (set! (-> this sprites 2 scale-x) 1.4) (set! (-> this sprites 1 scale-x) 1.4) diff --git a/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc b/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc index 9533fa654c7..ef73f4e60fc 100644 --- a/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/port/attack/h-torpedo_REF.gc @@ -290,7 +290,7 @@ ;; definition for function spt-func-nuke-water-splash (defun spt-func-nuke-water-splash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) ) @@ -1775,7 +1775,7 @@ (quaternion-normalize! s1-0) (quaternion->matrix s5-0 s1-0) (vector-copy! (-> s5-0 trans) (-> this rbody matrix trans)) - (vector-matrix*! (-> s3-0 0 saved-pt) (the-as vector (-> this info camera look-pos-array)) s5-0) + (vector-matrix*! (-> s3-0 0 saved-pt) (-> this info camera look-pos-array 0) s5-0) (vector+float*! (-> s3-0 0 saved-pt) (-> s3-0 0 saved-pt) s2-0 0.0) ) (let ((v1-18 (-> s3-0 0 tracking))) diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc index a532bc527ba..bef338ee1a0 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-enemies_REF.gc @@ -2067,9 +2067,9 @@ ) (.lvf vf4 (&-> a0-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-3 quad) vf6) ) (vector-copy! (-> this start-target-pos) (-> this target-pos)) @@ -2132,16 +2132,13 @@ (let ((f30-0 0.3)) (dotimes (s3-1 (the-as int (-> this city-path node-count))) (when (!= s3-1 (-> this current-node)) - (let ((s2-1 - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> this city-path node s3-1)) (-> this root trans)) - ) - ) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) (-> this city-path node s3-1 position) (-> this root trans)))) 0.0 (set! (-> s2-1 y) 0.0) (vector-normalize! s2-1 1.0) (let ((f28-0 (vector-dot s4-4 s2-1))) (when (and (< f30-0 f28-0) - (< 40960.0 (vector-vector-xz-distance (-> this root trans) (the-as vector (-> this city-path node s3-1)))) + (< 40960.0 (vector-vector-xz-distance (-> this root trans) (-> this city-path node s3-1 position))) ) (set! f30-0 f28-0) (set! s5-0 s3-1) @@ -2256,9 +2253,9 @@ ) (.lvf vf4 (&-> a0-23 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) (if (= (-> v1-33 type) target) @@ -2311,7 +2308,7 @@ (-> self root trans) (-> self root trans) (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> self city-path node gp-0)) (-> self root trans)) + (vector-! (new 'stack-no-clear 'vector) (-> self city-path node gp-0 position) (-> self root trans)) (-> *bombbot-nav-enemy-info* run-travel-speed) ) ) @@ -2331,7 +2328,7 @@ (nav-enemy-method-187 self) ) ) - (when (< (vector-vector-xz-distance (-> self root trans) (the-as vector (-> self city-path node gp-0))) 24576.0) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self city-path node gp-0 position)) 24576.0) (set! (-> self current-node) (the-as uint gp-0)) (set! (-> self next-node) (assault-bombbot-method-209 self)) ) diff --git a/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc index 31fec2527c0..81db5d401f3 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/assault-task_REF.gc @@ -291,7 +291,7 @@ ) ) ) - (quaternion->matrix (the-as matrix (-> s5-1 0 tracking)) s4-1) + (quaternion->matrix (-> s5-1 0 tracking inv-mat) s4-1) ) ) ) @@ -339,7 +339,7 @@ (let ((v1-11 (-> v1-10 slave))) (when v1-11 (vector-copy! (-> self original-cam-point) (-> v1-11 0 saved-pt)) - (matrix->quaternion (-> self original-cam-quat) (the-as matrix (-> v1-11 0 tracking))) + (matrix->quaternion (-> self original-cam-quat) (-> v1-11 0 tracking inv-mat)) ) ) ) @@ -1090,9 +1090,9 @@ (.mov vf3 v1-11) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> s0-0 quad) vf4) ) (let ((v1-12 (new 'stack-no-clear 'vector)) @@ -1189,9 +1189,9 @@ (.mov vf3 v1-12) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> s0-0 quad) vf4) ) (let ((v1-13 (new 'stack-no-clear 'vector)) diff --git a/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc index bf2ba20af98..d303ee878ea 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/protect-gunship_REF.gc @@ -1364,10 +1364,10 @@ ) ) ) - (vector<-cspace! (the-as vector (-> s5-0 span-pts-start data)) (-> this node-list data 4)) + (vector<-cspace! (-> s5-0 span-pts-start data 0) (-> this node-list data 4)) (vector+float*! - (the-as vector (-> s5-0 span-pts-start data)) - (the-as vector (-> s5-0 span-pts-start data)) + (-> s5-0 span-pts-start data 0) + (-> s5-0 span-pts-start data 0) (-> this node-list data 4 bone transform fvec) 819.2 ) @@ -1544,13 +1544,13 @@ (dotimes (s4-0 (-> s5-0 length)) (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) (when s3-0 - (vector-! (the-as vector (-> sv-64 vertex)) sv-76 (the-as vector (-> s3-0 bounds))) + (vector-! (-> sv-64 vertex 0) sv-76 (the-as vector (-> s3-0 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-1 v1-15) (f1-0 (-> s3-0 bounds r)) @@ -2261,7 +2261,7 @@ (let ((f0-7 (vector-vector-distance-squared (-> self dest-pos) - (the-as vector (-> (the-as process-focusable s3-1) root root-prim prim-core)) + (-> (the-as process-focusable s3-1) root root-prim prim-core world-sphere) ) ) (f1-4 f30-0) @@ -2301,7 +2301,7 @@ (if (and (logtest? (process-mask target crate enemy guard vehicle civilian) (-> s5-1 mask)) (not (focus-test? s5-1 disable dead inactive)) (-> s5-1 control root-prim) - (< (vector-vector-distance-squared (-> self dest-pos) (the-as vector (-> s5-1 control root-prim prim-core))) + (< (vector-vector-distance-squared (-> self dest-pos) (-> s5-1 control root-prim prim-core world-sphere)) (* f30-0 f30-0) ) ) @@ -3365,8 +3365,8 @@ (.lvf vf4 (&-> v1-34 quad)) (.lvf vf5 (&-> a0-24 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-176 quad) vf6) 0.0 (let ((a0-25 sv-176)) diff --git a/test/decompiler/reference/jak3/levels/city/protect/roboguard-city_REF.gc b/test/decompiler/reference/jak3/levels/city/protect/roboguard-city_REF.gc index 3c5ea2366a7..a9916b076d6 100644 --- a/test/decompiler/reference/jak3/levels/city/protect/roboguard-city_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/protect/roboguard-city_REF.gc @@ -2019,7 +2019,7 @@ (s5-1 (-> this rotation-matrix)) (f0-1 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-6)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-1 rvec)) 0.0) (set! f0-1 (* -1.0 f0-1)) ) (set! (-> this me-to-focus-angle) f0-1) diff --git a/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-battery_REF.gc b/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-battery_REF.gc index 10b0e865e96..f7d4f43a61f 100644 --- a/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-battery_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-battery_REF.gc @@ -653,7 +653,7 @@ (defbehavior cty-sniper-battery-handler cty-sniper-battery ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('get-buttons-actor-group) - (&-> (-> self actor-group) 0) + (&-> self actor-group 0) ) (('move-trans) (let ((v0-0 (the-as object (-> self root trans)))) diff --git a/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-turret_REF.gc b/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-turret_REF.gc index fc413c1242c..fa18f18967e 100644 --- a/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-turret_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/sniper/cty-sniper-turret_REF.gc @@ -377,19 +377,19 @@ (with-pp (if (odd? (-> this num-buttons)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- 256 (* 48 (/ (+ (-> this num-buttons) -1) 2))) (- 32 (the int (* 48.0 (-> this offset)))) ) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (- 232 (* 48 (+ (/ (-> this num-buttons) 2) -1))) (- 32 (the int (* 48.0 (-> this offset)))) ) ) (let ((s5-0 1)) (while (< s5-0 (-> this num-buttons)) - (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) (* 48 s5-0) 0) + (set-as-offset-from! (-> this sprites s5-0) (-> this sprites 0 pos) (* 48 s5-0) 0) (+! s5-0 1) ) ) @@ -1269,9 +1269,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 4844 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 4844 init-specs 4 initial-valuef) (vector-length s5-1)) @@ -2615,7 +2615,7 @@ (else (vector+! (new 'static 'vector :w 1.0) - (the-as vector (-> this root root-prim prim-core)) + (-> this root root-prim prim-core world-sphere) (-> this pos-cam-offset) ) ) @@ -2722,17 +2722,17 @@ ) (let ((f0-4 1.0)) (.lvf vf1 (&-> a1-14 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-63 f0-4)) (.mov vf3 v1-63) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/citizen/citizen_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/citizen/citizen_REF.gc index 3ec1e47b838..57544b00784 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/citizen/citizen_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/citizen/citizen_REF.gc @@ -287,7 +287,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod citizen-method-199 ((this citizen) (arg0 nav-segment)) (vehicle-controller-method-11 (-> this controller)) - (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (the-as vector (-> arg0 vertex))) + (vehicle-controller-method-13 (-> this controller) (-> arg0 branch) (-> arg0 vertex 0)) 0 (none) ) @@ -682,9 +682,9 @@ ) (.lvf vf4 (&-> v1-15 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) (when (t9-1 a0-10 a1-2 a2-2 (-> arg1 gnd-collide-with) 16384.0 81920.0 1024.0) (vector-copy! (-> gp-0 gspot-pos) (-> gp-0 trans)) @@ -1266,9 +1266,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector+! s1-1 s1-1 s4-0) @@ -1359,7 +1359,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f @@ -1469,7 +1469,7 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> gp-0 seg vertex)) + (-> gp-0 seg vertex 0) (-> gp-0 seg vertex 1) *color-blue* #f diff --git a/test/decompiler/reference/jak3/levels/city/traffic/citizen/civilian_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/citizen/civilian_REF.gc index 90ffd07d171..bd9ac812729 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/citizen/civilian_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/citizen/civilian_REF.gc @@ -620,7 +620,7 @@ (a0-8 (-> self danger-pos)) (a1-5 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-5 vertex)) (the-as vector a0-8) (the-as vector (-> v1-6 state mesh bounds))) + (vector-! (-> a1-5 vertex 0) (the-as vector a0-8) (the-as vector (-> v1-6 state mesh bounds))) (set! (-> a1-5 vertex1 x) (-> v1-6 nearest-y-threshold)) (set! (-> a1-5 data 20) (the-as uint 2)) (set! sv-352 (nav-mesh-method-45 (-> v1-6 state mesh) a1-5)) @@ -1489,7 +1489,7 @@ (s4-0 (new 'stack-no-clear 'matrix)) (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) ) - (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion-normalize! (quaternion*! s1-0 (-> s2-0 0 quat) s1-0)) (quaternion->matrix s4-0 s1-0) (if (logtest? (-> s3-0 ragdoll-flags) (ragdoll-flag mirror)) (matrix*! s4-0 s4-0 (-> s3-0 mirror)) @@ -1651,7 +1651,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) @@ -1691,9 +1691,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -1706,9 +1706,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -1722,9 +1722,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/citizen/guard_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/citizen/guard_REF.gc index 7d94ce9c123..b9597fff50f 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/citizen/guard_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/citizen/guard_REF.gc @@ -258,9 +258,9 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s0-0 quad) vf6) (set! sv-320 (new 'stack-no-clear 'vector)) (set! sv-304 (new 'stack-no-clear 'vector)) @@ -286,9 +286,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -303,9 +303,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) ) @@ -320,9 +320,9 @@ ) (.lvf vf4 (&-> v1-15 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (vector-normalize! (vector-! sv-320 sv-240 s0-0) 1.0) @@ -948,9 +948,9 @@ (.lvf vf5 (&-> v1-15 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-19 quad) vf6) ) (let ((a1-11 (-> s5-0 move-dist))) @@ -963,9 +963,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (let ((v1-17 s5-0)) @@ -1357,9 +1357,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -1372,9 +1372,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -1388,9 +1388,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -1536,9 +1536,9 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) (if (enemy-above-ground? this s0-0 s1-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) @@ -1548,7 +1548,7 @@ (a0-8 s1-0) (a1-7 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-7 vertex)) a0-8 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-7 vertex 0) a0-8 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-7 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-7 data 20) (the-as uint 2)) (set! sv-816 (nav-mesh-method-45 (-> v1-14 state mesh) a1-7)) @@ -1589,11 +1589,11 @@ ) (let ((v1-30 sv-832)) (let ((a0-21 (-> sv-800 state mesh bounds))) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-832 quad)) (.lvf vf5 (&-> a0-21 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-30 quad) vf6) ) 0 diff --git a/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-grunt_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-grunt_REF.gc index 90d977b7fa3..d6034a6ec62 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-grunt_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-grunt_REF.gc @@ -1056,11 +1056,11 @@ ) (vector-! s4-0 v1-3 (-> this root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let* ((f30-0 v1-5) (f0-0 arg0) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-predator_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-predator_REF.gc index 83579eb1614..dd6a83be7e9 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-predator_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/citizen/metalhead-predator_REF.gc @@ -767,8 +767,8 @@ (.lvf vf4 (&-> v1-28 quad)) (.lvf vf5 (&-> a0-19 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-272 quad) vf6) (let* ((f0-5 (vector-length sv-272)) (f0-6 (/ f0-5 (meters 130))) @@ -787,9 +787,9 @@ ) (.lvf vf4 (&-> v1-34 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-20 quad) vf6) ) (vector-normalize! sv-272 1.0) @@ -815,9 +815,9 @@ (.lvf vf5 (&-> sv-288 quad)) (.lvf vf4 (&-> v1-36 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-30 quad) vf6) ) (let ((v1-37 s2-0)) @@ -826,9 +826,9 @@ ) (.lvf vf5 (&-> s0-0 quad)) (.lvf vf4 (&-> s1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-37 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine_REF.gc index 6eca59fb260..25370eebb0a 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine_REF.gc @@ -328,9 +328,9 @@ (let ((v1-29 s0-0)) (set! (-> s4-0 vec2 x) (* 1024.0 (the float (-> v1-29 speed-limit)))) ) - (vector-! (-> s4-0 vec0) (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) + (vector-! (-> s4-0 vec0) (-> arg1 vertex 1) (-> arg1 vertex 0)) (vector-normalize! (-> s4-0 vec0) 1.0) - (vector+float*! (-> s4-0 params position) (the-as vector (-> arg1 vertex)) (-> s4-0 vec0) arg2) + (vector+float*! (-> s4-0 params position) (-> arg1 vertex 0) (-> s4-0 vec0) arg2) (let ((f0-6 (* (+ -0.5 (rand-vu)) (* 256.0 (the float (-> s0-0 width)))))) (+! (-> s4-0 params position x) (* -1.0 (-> s4-0 vec0 z) f0-6)) (+! (-> s4-0 params position z) (* (-> s4-0 vec0 x) f0-6)) @@ -560,7 +560,7 @@ (let ((s3-0 0)) (dotimes (s2-0 (-> s4-0 segment-count)) (let ((s1-0 (-> s4-0 segment-array s2-0))) - (vector-vector-distance (the-as vector (-> s1-0 vertex)) (-> s1-0 vertex 1)) + (vector-vector-distance (-> s1-0 vertex 0) (-> s1-0 vertex 1)) (when (< (-> s1-0 spawn-spacing) 0.0) (inspect s1-0) #t @@ -1052,11 +1052,11 @@ (f0-8 (* f0-6 f0-6)) ) (.lvf vf1 (&-> v1-19 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-20 vf1) (< f0-8 v1-20) ) @@ -1074,11 +1074,11 @@ (f0-13 (* f0-11 f0-11)) ) (.lvf vf1 (&-> v1-31 bbox min quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-32 vf1) (if (< f0-13 v1-32) (set! f30-0 20480.0) @@ -1207,8 +1207,8 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-1 quad) vf5) ) (let ((a0-2 (-> a1-1 velocity))) @@ -1218,8 +1218,8 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-2 quad) vf5) ) (set! (-> a1-1 handle) (new 'static 'handle :process #x5dc :u64 #x5dc)) @@ -1531,7 +1531,7 @@ gp-0 (lambda ((arg0 traffic-find-segment-struct) (arg1 nav-segment)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector-! v1-0 (-> arg1 vertex 1) (the-as vector (-> arg1 vertex))) + (vector-! v1-0 (-> arg1 vertex 1) (-> arg1 vertex 0)) (let ((a2-1 v1-0) (a3-1 v1-0) (f0-0 (-> arg1 length)) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc index 7790ecbe0b3..574bc1b0f02 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-control_REF.gc @@ -170,9 +170,9 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -352,9 +352,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) ) @@ -368,9 +368,9 @@ ) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-6 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc index 1dd48082df0..e1536bcaac2 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc @@ -366,9 +366,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (quad-copy! (the-as pointer (-> s5-0 glow)) (the-as pointer (-> arg0 thruster-glow-template)) 4) @@ -398,9 +398,9 @@ ) (.lvf vf4 (&-> a0-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-15 quad) vf6) ) (set! (-> arg0 part-thruster-x initial-valuef) (-> s5-0 float1)) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc index 96159b3b400..8145a8c80e4 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc @@ -63,7 +63,7 @@ (when (= (-> s4-0 prim-core prim-type) -1) (let ((a1-1 (-> s4-0 prim-core))) (if (< (- (-> a1-1 world-sphere y) (-> a1-1 world-sphere w)) (-> this water-height)) - (vehicle-method-95 this (the-as vector a1-1) arg0) + (vehicle-method-95 this (-> a1-1 world-sphere) arg0) ) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc index cdfe6ff0591..df3c5e21eed 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc @@ -291,19 +291,19 @@ (f0-13 (* f0-12 (* f1-5 f1-5))) ) (.lvf vf1 (&-> (-> self rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-42 vf1) (if (and (< v1-42 f0-13) (begin (.lvf vf1 (&-> (-> self rbody lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-47 vf1) (let ((f1-9 v1-47) (f2-0 614.4) @@ -378,7 +378,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc index f5201f7ddd2..1fde8dfe31d 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -319,15 +319,15 @@ (and (< (-> s5-0 floats 2) -8192.0) (not (logtest? (-> *target* focus-status) (focus-status edge-grab)))) ) (matrix-4x4-inverse! (-> s5-0 mat 2) (-> s5-0 mat 1)) - (vector-matrix*! (the-as vector (-> s5-0 mat)) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) + (vector-matrix*! (-> s5-0 mat 0 rvec) (-> s5-0 mat 0 uvec) (-> s5-0 mat 2)) (set! (-> s5-0 floats 0) 81920.0) (dotimes (s2-1 (-> this info rider grab-rail-count)) (let ((s1-0 (-> this info rider grab-rail-array s2-1))) - (vector-! (-> s5-0 mat 0 trans) (the-as vector (-> s5-0 mat)) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 mat 0 trans) (-> s5-0 mat 0 rvec) (-> s1-0 local-pos 0)) (when #t (let ((f30-0 (vector-segment-distance-point! - (the-as vector (-> s5-0 mat)) - (the-as vector (-> s1-0 local-pos)) + (-> s5-0 mat 0 rvec) + (-> s1-0 local-pos 0) (-> s1-0 local-pos 1) (-> s5-0 mat 0 trans) ) @@ -336,7 +336,7 @@ (when (< f30-0 (-> s5-0 floats 0)) (set! (-> s5-0 floats 0) f30-0) (set! (-> s5-0 vec 0 quad) (-> s5-0 mat 0 trans quad)) - (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (the-as vector (-> s1-0 local-pos))) + (vector-! (-> s5-0 vec 1) (-> s1-0 local-pos 1) (-> s1-0 local-pos 0)) (vector-normalize! (-> s5-0 vec 1) 1.0) (set! s3-0 #t) (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 f30-0))) @@ -576,11 +576,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod vehicle-method-113 ((this vehicle) (arg0 vector) (arg1 int) (arg2 int)) (let ((v1-0 (new 'stack-no-clear 'vector))) - (vector+! - v1-0 - (the-as vector (-> this info rider seat-array arg1)) - (-> this info rider rider-hand-offset arg2) - ) + (vector+! v1-0 (-> this info rider seat-array arg1 position) (-> this info rider rider-hand-offset arg2)) (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) ) 0 @@ -849,7 +845,7 @@ (set-vector! (-> s4-1 0 fvec) 0.0 1.0 0.0 1.0) (mem-copy! (the-as pointer (-> s4-1 1)) (the-as pointer s5-1) 64) (dotimes (s3-0 2) - (vector-matrix*! (the-as vector (-> s4-1 0)) (-> this info particles exhaust-local-pos s3-0) s5-1) + (vector-matrix*! (-> s4-1 0 rvec) (-> this info particles exhaust-local-pos s3-0) s5-1) (vector-rotate*! (-> s4-1 0 uvec) (-> this info particles exhaust-local-dir s3-0) s5-1) (vector-cross! (-> s4-1 0 trans) (-> s4-1 0 uvec) (-> s4-1 0 fvec)) (vector-normalize! (-> s4-1 0 trans) 1.0) @@ -1316,19 +1312,19 @@ (f0-1 (* f0-0 (* f1-0 f1-0))) ) (.lvf vf1 (&-> (-> this rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-8 vf1) (when (and (< v1-8 f0-1) (begin (.lvf vf1 (&-> (-> this rbody lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f1-4 v1-13) (f2-0 614.4) diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc index f643163f14a..48289a5137b 100644 --- a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc @@ -165,11 +165,11 @@ ) (.lvf vf1 (&-> a0-39 quad)) ) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-79 vf1) (let ((f0-30 v1-79) (f1-18 12288.0) @@ -417,14 +417,10 @@ (let ((v1-83 (-> this cam-view))) (cond ((zero? v1-83) - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (the-as vector (-> this info camera look-pos-array)) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-pos-array 0) (the-as matrix (-> s4-0 1))) ) ((= v1-83 1) - (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 32768.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -433,7 +429,7 @@ ) ) ((= v1-83 2) - (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 16384.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -442,11 +438,7 @@ ) ) ((= v1-83 3) - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (-> this info camera look-right) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-right) (the-as matrix (-> s4-0 1))) (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) -16384.0 3640.889) (matrix*! (the-as matrix (-> s4-0 1)) @@ -455,11 +447,7 @@ ) ) (else - (vector-matrix*! - (the-as vector (-> s4-0 1 bbox)) - (the-as vector (-> this info camera look-pos-array)) - (the-as matrix (-> s4-0 1)) - ) + (vector-matrix*! (-> s4-0 1 bbox min) (-> this info camera look-pos-array 0) (the-as matrix (-> s4-0 1))) ) ) ) @@ -491,10 +479,10 @@ (set! (-> v1-96 action-mask) (collide-action solid)) ) (vector-copy! (-> s4-0 0 start-pos) (-> this rbody position)) - (vector-! (-> s4-0 0 move-dist) (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos)) + (vector-! (-> s4-0 0 move-dist) (-> s4-0 1 bbox min) (-> s4-0 0 start-pos)) (let ((f0-23 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-0 0)))) (if (>= f0-23 0.0) - (vector+float*! (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) + (vector+float*! (-> s4-0 1 bbox min) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) ) ) ) @@ -533,7 +521,7 @@ (set! (-> a0-72 rvec w) 1.0) ) (matrix-copy! (-> v1-132 0) (-> this rbody matrix)) - (vector-rotate*! s5-1 (the-as vector (-> v1-132 1)) (-> v1-132 0)) + (vector-rotate*! s5-1 (-> v1-132 1 rvec) (-> v1-132 0)) ) (persist-with-delay *setting-control* @@ -1095,10 +1083,10 @@ s0-0 ) (set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad)) - (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (the-as vector (-> s5-0 1))) + (vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> s5-0 1 point)) ) (else - (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (-> arg0 root trans)) + (vector-! (-> s5-0 0 velocity) (-> s5-0 0 point) (-> arg0 root trans)) ) ) ) @@ -1172,7 +1160,7 @@ (vector-copy! s3-1 (-> s5-0 0 velocity)) (vector-normalize! s3-1 1.0) (vector-float*! s3-1 s3-1 (-> s5-0 0 impulse)) - (apply-impact! (-> this rbody) (the-as vector (-> s5-0 0)) s3-1) + (apply-impact! (-> this rbody) (-> s5-0 0 point) s3-1) (rigid-body-control-method-12 (-> this rbody) 1.0) (init-velocities! (-> this rbody)) (when #f @@ -1182,15 +1170,8 @@ (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-84 prim1 cprim prim-core world-sphere quad)) (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-84 prim2 cprim prim-core world-sphere quad)) ) - (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 0)) *color-blue*) - (add-debug-vector - #t - (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 0)) - s3-1 - (meters 0.00024414062) - *color-blue* - ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 0 point) *color-blue*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> s5-0 0 point) s3-1 (meters 0.00024414062) *color-blue*) ) ) ) diff --git a/test/decompiler/reference/jak3/levels/city/vinroom/power-game_REF.gc b/test/decompiler/reference/jak3/levels/city/vinroom/power-game_REF.gc index c743ec6490a..18fdbe74e12 100644 --- a/test/decompiler/reference/jak3/levels/city/vinroom/power-game_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/vinroom/power-game_REF.gc @@ -1842,7 +1842,7 @@ (format *stdcon* "press L1 to fail, R1 to complete~%") ) (let ((v1-7 (-> this center))) - (vector+! (the-as vector (-> this corner)) v1-7 (new 'static 'vector :x -131072.0 :z -114688.0 :w 1.0)) + (vector+! (-> this corner 0) v1-7 (new 'static 'vector :x -131072.0 :z -114688.0 :w 1.0)) (vector+! (-> this corner 1) v1-7 (new 'static 'vector :x 131072.0 :z 114688.0 :w 1.0)) ) (dotimes (s5-0 17) @@ -3809,7 +3809,7 @@ (let ((f30-0 (-> *power-game* 0 cam-cur cam-y-angle))) (vector-rotate-x! gp-0 gp-0 (- (-> *power-game* 0 cam-cur cam-pos-x-angle))) (vector-rotate-y! gp-0 gp-0 f30-0) - (vector+! (the-as vector (&-> self root)) (the-as vector s5-0) gp-0) + (vector+! (the-as vector (&-> self root)) (-> s5-0 cam-pos) gp-0) (set-vector! gp-0 0.0 0.0 1.0 1.0) (vector-rotate-x! gp-0 gp-0 (-> *power-game* 0 cam-cur cam-x-angle)) (vector-rotate-y! gp-0 gp-0 (+ 32768.0 f30-0)) diff --git a/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc index 97ba0594524..0b3b61fe618 100644 --- a/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/comb-field_REF.gc @@ -167,9 +167,9 @@ ) (.lvf vf4 (&-> a0-22 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-43 quad) vf6) ) (let ((f0-6 (vector4-dot (-> (the-as process-drawable (-> gp-1 0)) root trans) (the-as vector (-> self plane))))) @@ -183,9 +183,9 @@ ) (.lvf vf4 (&-> a0-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-50 quad) vf6) ) (let ((v1-53 (-> (the-as process-drawable (-> gp-1 0)) root trans))) @@ -204,9 +204,9 @@ ) (.lvf vf4 (&-> a0-29 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-53 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc index 6127dab995d..3c0d53b0179 100644 --- a/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/comb-mood_REF.gc @@ -52,8 +52,8 @@ (s5-1 (-> arg0 current-fog fog-dists)) ) (vector4-lerp! - (the-as vector a1-4) - (the-as vector a1-4) + (-> a1-4 fog-color) + (-> a1-4 fog-color) (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) f30-1 ) diff --git a/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc index bf488ade175..d5e5f9b4add 100644 --- a/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/comb-obs_REF.gc @@ -1058,8 +1058,8 @@ (let ((v1-13 (-> this root root-prim))) (update-bolt this - (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core)) - (the-as vector (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core)) + (-> (the-as collide-shape-prim-group v1-13) child 0 prim-core world-sphere) + (-> (the-as collide-shape-prim-group v1-13) child 1 prim-core world-sphere) ) ) 0 diff --git a/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc b/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc index 450279d5789..fbc0c5c329f 100644 --- a/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/comb-sentry_REF.gc @@ -65,9 +65,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 4236 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 4236 init-specs 4 initial-valuef) (vector-length s5-1)) @@ -529,11 +529,11 @@ (f0-6 (* f0-4 f0-4)) ) (.lvf vf1 (&-> v1-24 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (if (< f0-6 v1-25) (set! (-> this target-dist) 4096000.0) diff --git a/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc b/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc index 2f7fe9dd774..4d6a58c5855 100644 --- a/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/combx-obs_REF.gc @@ -165,8 +165,8 @@ (s5-1 (-> arg0 current-fog fog-dists)) ) (vector4-lerp! - (the-as vector a1-4) - (the-as vector a1-4) + (-> a1-4 fog-color) + (-> a1-4 fog-color) (new 'static 'vector :x 30.0 :y 80.0 :z 150.0 :w 128.0) f30-1 ) diff --git a/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc b/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc index d3742672c50..f211c5b9714 100644 --- a/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/h-sled_REF.gc @@ -22,9 +22,9 @@ ;; definition for method 15 of type hud-sled-health ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-sled-health)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 5 366) + (set-hud-piece-position! (-> this sprites 0) 5 366) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 6) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) @@ -144,18 +144,18 @@ ) (init-vf0-vector) (let ((s4-0 (new 'stack-no-clear 'h-sled-stack-var0))) - (vector-! (the-as vector (-> s4-0 vec)) (-> arg2 vertex 2) (-> arg2 vertex 1)) - (vector-! (-> s4-0 vec 1) (the-as vector (-> arg2 vertex)) (-> arg2 vertex 2)) - (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (the-as vector (-> arg2 vertex))) + (vector-! (-> s4-0 vec 0) (-> arg2 vertex 2) (-> arg2 vertex 1)) + (vector-! (-> s4-0 vec 1) (-> arg2 vertex 0) (-> arg2 vertex 2)) + (vector-! (-> s4-0 vec 2) (-> arg2 vertex 1) (-> arg2 vertex 0)) (set! (-> s4-0 byte0) -1) (set! (-> s4-0 float1) -1.0) (dotimes (v1-5 3) (.lvf vf1 (&-> (-> s4-0 vec v1-5) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-8 vf1) (set! (-> s4-0 float0) a0-8) (when (< (-> s4-0 float1) (-> s4-0 float0)) @@ -253,9 +253,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 4231 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 4231 init-specs 4 initial-valuef) (vector-length s5-1)) @@ -1483,11 +1483,11 @@ (f1-2 4.0) ) (.lvf vf1 (&-> v1-9 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-10 vf1) (< v1-10 (* f1-2 f1-2)) ) @@ -1725,11 +1725,11 @@ ) (let ((f0-9 0.0)) (.lvf vf1 (&-> (-> this tunnel-dir) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-59 vf1) (if (< f0-9 v1-59) (vector-normalize! (-> this tunnel-dir) 1.0) @@ -1738,11 +1738,11 @@ ) (let ((f0-10 0.0)) (.lvf vf1 (&-> (-> this sum-ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-63 vf1) (when (< f0-10 v1-63) (vector-copy! (-> this normal-dir) (-> this sum-ground-normal)) @@ -2104,11 +2104,11 @@ (f0-8 0.0) ) (.lvf vf1 (&-> v1-21 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-13 vf1) (when (< f0-8 a0-13) (vector-copy! (-> s5-0 mat trans) v1-21) diff --git a/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc b/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc index 7469d1aab1e..0747ecf323a 100644 --- a/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/comb/railx-mood_REF.gc @@ -86,7 +86,7 @@ (s0-0 (new 'static 'vector :x -0.8451 :y -0.2182 :z -0.488)) ) (vector-matrix*! (the-as vector (-> s1-0 0)) a1-3 s5-0) - (vector-matrix*! (the-as vector (-> s1-0 0 dir1)) s0-0 s5-0) + (vector-matrix*! (-> s1-0 0 dir1 direction) s0-0 s5-0) ) (set! (-> s1-0 0 ambi extra x) 0.2) (set! (-> s1-0 0 dir0 extra x) 0.8) @@ -104,8 +104,8 @@ (let ((a1-6 (new 'static 'vector :x 0.44725248 :y 0.77455187 :z 0.44725248)) (s4-1 (new 'static 'vector :x -0.44725248 :y -0.77455187 :z -0.44725248)) ) - (vector-matrix*! (the-as vector (-> gp-0 dir0)) a1-6 s5-0) - (vector-matrix*! (the-as vector (-> gp-0 dir1)) s4-1 s5-0) + (vector-matrix*! (-> gp-0 dir0 direction) a1-6 s5-0) + (vector-matrix*! (-> gp-0 dir1 direction) s4-1 s5-0) ) ) (set! (-> gp-0 ambi extra x) 0.2) diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc index 56e57c09884..b945ea56101 100644 --- a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash-shot_REF.gc @@ -309,9 +309,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (let ((f30-0 (-> *part-id-table* 900 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 900 init-specs 4 initial-valuef) (fmin f30-0 (vector-length s5-1))) diff --git a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc index cd6ec86ca43..67eabd146e9 100644 --- a/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/ai/ashelin/ash_REF.gc @@ -1347,11 +1347,11 @@ (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this root trans) (-> this nav state current-poly) arg0 t0-2) ) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-23 vf1) (let ((f0-11 v1-23) (f1-1 arg4) @@ -1479,9 +1479,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 8 2) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc b/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc index a09af7fa00f..1ca2843fb21 100644 --- a/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/ai/bot_REF.gc @@ -207,8 +207,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-3 a2-5) (f1-2 (+ (-> a1-2 world-sphere w) (the-as float (-> s5-0 param 3)))) @@ -248,8 +248,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-4 a2-12) (f1-6 (+ (-> a1-14 world-sphere w) (the-as float (-> s5-0 param 3)))) @@ -622,8 +622,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-3 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) @@ -663,8 +663,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-7 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) @@ -1640,9 +1640,9 @@ (.lvf vf5 (&-> a0-7 quad)) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) (set! (-> arg0 predicted-targ-ry) (atan @@ -1974,9 +1974,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-1 quad) vf6) ) (let ((a2-2 arg0)) @@ -1989,9 +1989,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) ) @@ -2005,9 +2005,9 @@ ) (.lvf vf4 (&-> a0-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-12 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/common/battle_REF.gc b/test/decompiler/reference/jak3/levels/common/battle_REF.gc index 0c174f98bdc..09a3152c0b3 100644 --- a/test/decompiler/reference/jak3/levels/common/battle_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/battle_REF.gc @@ -800,8 +800,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-2 a2-5) (f1-1 (+ (-> a1-5 world-sphere w) (-> gp-0 w))) @@ -841,8 +841,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-3 a2-12) (f1-5 (+ (-> a1-17 world-sphere w) (-> gp-0 w))) diff --git a/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc b/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc index 08fc09f61d2..26a690e19d6 100644 --- a/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc @@ -454,7 +454,7 @@ (when gp-0 (when (not (focus-test? gp-0 disable dead ignore grabbed pilot-riding pilot mech teleporting invulnerable)) (let* ((v1-5 (get-trans gp-0 0)) - (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (the-as vector (-> self dividing-wall)))) + (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> self dividing-wall pos))) (s5-0 (-> self plane (if (< 0.0 (vector-dot a1-2 (-> self dividing-wall dir))) 0 1 @@ -869,10 +869,10 @@ ;; WARN: Return type mismatch int vs none. (defmethod spawn-particles ((this elec-gate) (arg0 sparticle-launch-control)) (if (-> this part-spawner-left) - (spawn arg0 (the-as vector (&-> (-> this part-spawner-left child) 8))) + (spawn arg0 (the-as vector (&-> this part-spawner-left child 8))) ) (if (-> this part-spawner-right) - (spawn arg0 (the-as vector (&-> (-> this part-spawner-right child) 8))) + (spawn arg0 (the-as vector (&-> this part-spawner-right child 8))) ) 0 (none) @@ -989,10 +989,10 @@ (vector-cross! v1-31 v1-31 *up-vector*) (set! (-> this dividing-wall pos quad) (-> s5-3 quad)) (vector-copy! (-> this dividing-wall dir) v1-31) - (vector+float*! (the-as vector (-> this plane)) s5-3 v1-31 12288.0) + (vector+float*! (-> this plane 0 pos) s5-3 v1-31 12288.0) (vector-copy! (-> this plane 0 dir) v1-31) (vector-float*! v1-31 v1-31 -1.0) - (vector+float*! (the-as vector (-> this plane 1)) s5-3 v1-31 12288.0) + (vector+float*! (-> this plane 1 pos) s5-3 v1-31 12288.0) (vector-copy! (-> this plane 1 dir) v1-31) ) (set! (-> this wall-xz) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc index a5c47c3b287..aa0e727f7f8 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/darkprec/dp-bipedal-shot_REF.gc @@ -82,7 +82,7 @@ (vector-copy! (-> a1-3 start-pos) (-> self root root-prim prim-core world-sphere)) (vector-! (-> a1-3 move-dist) - (the-as vector (-> (the-as collide-shape s4-1) root-prim prim-core)) + (-> (the-as collide-shape s4-1) root-prim prim-core world-sphere) (-> a1-3 start-pos) ) (let ((v1-6 a1-3)) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc index 811ac1a2021..b54ccd9319f 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc @@ -1265,11 +1265,11 @@ ) (vector-! s4-0 v1-3 (-> this root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let* ((f30-0 v1-5) (f0-0 arg0) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc index 163969196c0..8e8421c8af5 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-enemy_REF.gc @@ -112,15 +112,15 @@ (v1-22 (new 'stack-no-clear 'vector)) ) (let ((a1-12 (new 'stack-no-clear 'vector))) - (vector-! v1-22 a0-18 (the-as vector (-> self main-joint-movement))) + (vector-! v1-22 a0-18 (-> self main-joint-movement 0)) (let ((a2-9 v1-22)) (.lvf vf1 (&-> v1-22 quad)) (let ((f0-20 (-> self clock frames-per-second))) (.mov at-0 f0-20) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-9 quad) vf1) ) (vector-! a1-12 v1-22 (-> self main-joint-movement 1)) @@ -130,8 +130,8 @@ (.mov at-1 f0-21) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-11 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc index 5abcb93a4aa..98b632f93c2 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-formation_REF.gc @@ -463,7 +463,7 @@ (s4-1 0) ) (let ((s2-0 (new 'stack-no-clear 'vector))) - (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (the-as vector (-> this offset)) 0.0)) + (when (and (> (-> s5-0 count) 0) (hover-formation-control-method-10 this s2-0 (-> this offset 0) 0.0)) (vector-copy! (-> s5-0 pos-table s4-1) s2-0) (+! s4-1 1) ) @@ -630,7 +630,7 @@ (set! (-> a0-2 y) 10240.0) (set! (-> a0-2 z) 24576.0) (set! (-> a0-2 w) 1.0) - (vector+! a1-2 (the-as vector v1-3) a0-2) + (vector+! a1-2 (-> v1-3 0) a0-2) ) (vector-copy! (-> gp-0 center) (-> gp-0 entity extra trans)) (quaternion-copy! (-> gp-0 focus-quat) *unity-quaternion*) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc index 68186992611..330f3947163 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/hover-nav-control_REF.gc @@ -552,9 +552,7 @@ (vector-copy! (-> gp-0 curve-matrix uvec) arg2) (set! (-> gp-0 pos-index 0) arg3) (set! (-> gp-0 pos-index 1) arg4) - (set! (-> gp-0 dist) - (vector-vector-distance (the-as vector (-> gp-0 curve-matrix)) (-> gp-0 curve-matrix uvec)) - ) + (set! (-> gp-0 dist) (vector-vector-distance (-> gp-0 curve-matrix rvec) (-> gp-0 curve-matrix uvec))) (if (not (-> arg0 segment-list)) (set! (-> arg0 tail-segment) gp-0) ) @@ -1247,7 +1245,7 @@ (set! sv-48 (-> this nav network)) (cond ((< (vector-vector-distance arg0 arg1) 13107.2) - (nav-network-method-23 (-> this nav) s5-0 (the-as vector (hover-nav-control-method-17 this)) arg1 -1 -1) + (nav-network-method-23 (-> this nav) s5-0 (-> (hover-nav-control-method-17 this) world-sphere) arg1 -1 -1) (hover-nav-control-method-31 this) ) (else @@ -1265,17 +1263,17 @@ (.lvf vf4 (&-> v1-21 quad)) (.lvf vf5 (&-> a0-12 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-304 quad) vf6) (vector-normalize! sv-304 (-> sv-52 s0-0 radius)) (let ((v1-26 arg1)) (let ((a0-14 s3-0)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-14 quad)) ) (.lvf vf5 (&-> sv-304 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-26 quad) vf6) ) 0 @@ -1344,7 +1342,7 @@ (nav-network-method-23 (-> this nav) s5-0 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> sv-48 (-> s5-0 segment-list pos-index 0) pos) -1 (-> s5-0 segment-list pos-index 0) @@ -1384,7 +1382,7 @@ (vector-copy! (-> v1-0 curve-matrix fvec) arg0) ) (else - (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (the-as vector (-> v1-0 curve-matrix))) + (vector-! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix uvec) (-> v1-0 curve-matrix rvec)) (vector-float*! (-> v1-0 curve-matrix fvec) (-> v1-0 curve-matrix fvec) 0.5) ) ) @@ -1394,7 +1392,7 @@ (vector-! (-> v1-0 curve-matrix trans) (-> (the-as hover-nav-path-segment a2-6) curve-matrix uvec) - (the-as vector (-> v1-0 curve-matrix)) + (-> v1-0 curve-matrix rvec) ) (vector-float*! (-> v1-0 curve-matrix trans) (-> v1-0 curve-matrix trans) -0.5) ) @@ -1569,7 +1567,7 @@ (else (let ((f30-0 (path-control-method-29 s5-1 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (-> s3-0 current-index) (the-as float #f) ) @@ -1577,7 +1575,7 @@ ) (if (< (path-control-method-29 s5-1 - (the-as vector (hover-nav-control-method-17 this)) + (-> (hover-nav-control-method-17 this) world-sphere) (+ (-> s3-0 current-index) 1) (the-as float #f) ) @@ -1601,11 +1599,13 @@ (t0-1 -1) (t1-0 -1) ) - (s1-2 s2-2 s0-0 (the-as vector sv-128) a3-4 t0-1 t1-0) + (s1-2 s2-2 s0-0 (-> sv-128 world-sphere) a3-4 t0-1 t1-0) ) ) (let ((s2-3 (new 'stack-no-clear 'vector))) - (if (and (< (path-control-method-29 s5-1 (the-as vector s4-0) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) 12288.0) + (if (and (< (path-control-method-29 s5-1 (-> s4-0 world-sphere) (+ (-> s3-0 end-index) -1) (the-as float s2-3)) + 12288.0 + ) (< (vector-vector-distance s2-3 (get-point-at-percent-along-path! s5-1 (new 'stack-no-clear 'vector) 1.0 'interp) @@ -1630,7 +1630,7 @@ (+! s3-1 -1) ) ) - (nav-network-method-23 (-> this nav) (-> this path-info) (the-as vector s4-0) s2-4 -1 -1) + (nav-network-method-23 (-> this nav) (-> this path-info) (-> s4-0 world-sphere) s2-4 -1 -1) ) ) ) @@ -1638,7 +1638,7 @@ (hover-nav-control-method-31 this) ) (arg0 - (hover-nav-control-method-30 this (the-as vector (hover-nav-control-method-17 this)) arg0) + (hover-nav-control-method-30 this (-> (hover-nav-control-method-17 this) world-sphere) arg0) ) ) 0 @@ -1675,8 +1675,8 @@ (.mov at-0 f0-6) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-7 quad) vf1) (vector+! a1-3 v1-5 a0-7) ) @@ -1723,7 +1723,7 @@ (local-vars (sv-48 vector) (sv-128 float) (sv-144 float)) (let ((s5-0 (-> this root))) (let ((s4-0 (hover-nav-control-method-17 this))) - (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s4-0) (-> s5-0 trans)))) + (let ((v1-2 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 world-sphere) (-> s5-0 trans)))) (set! sv-48 (vector-! (new 'stack-no-clear 'vector) (-> this dest-pos) v1-2)) ) (when (not (logtest? (-> this flags) (hover-nav-flags hnf0))) @@ -1737,12 +1737,12 @@ (set! sv-144 (the-as float 0.0)) (let* ((t0-0 (hover-nav-control-method-33 this)) (f0-4 (s2-0 s1-0 s0-0 sv-128 sv-144 t0-0)) - (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (the-as vector s4-0) s3-0 (/ f0-4 f30-0))) + (t0-2 (vector+float*! (new 'stack-no-clear 'vector) (-> s4-0 world-sphere) s3-0 (/ f0-4 f30-0))) (s4-1 (nav-network-method-27 (-> this nav) (new 'stack-no-clear 'vector) (-> this root process) - (the-as vector s4-0) + (-> s4-0 world-sphere) t0-2 (-> s4-0 world-sphere w) ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc index dd49f4d6025..cd0930cc6a8 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/hover/robo-hover_REF.gc @@ -1498,11 +1498,7 @@ (let ((s3-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) - (vector-normalize-copy! - (new 'stack-no-clear 'vector) - (the-as vector (-> this node-list data arg2 bone transform)) - 1.0 - ) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data arg2 bone transform rvec) 1.0) (* 273.06668 arg3) ) ) @@ -1742,8 +1738,8 @@ (let ((v1-1 s1-0)) (.lvf vf4 (&-> s0-0 quad)) (.lvf vf5 (&-> sv-80 quad)) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-1 quad) vf6) ) (vector-normalize! s1-0 1.0) @@ -1867,7 +1863,7 @@ ) (ja-post) (quaternion-from-two-vectors! - (the-as quaternion (-> this wrist-quat)) + (-> this wrist-quat 0) (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 14 bone transform uvec) 1.0) (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 15 bone transform uvec) 1.0) ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc index d485a526a1f..41964fccf73 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc @@ -1148,11 +1148,11 @@ ) (vector-! s4-0 v1-3 (-> this root trans)) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-5 vf1) (let* ((f30-0 v1-5) (f0-0 arg0) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc index ca5b53cce70..bcd2d152032 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/mantis_REF.gc @@ -984,9 +984,9 @@ (.lvf vf5 (&-> s2-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (let ((f30-1 (vector-length s5-1))) @@ -1430,9 +1430,9 @@ (.lvf vf5 (&-> s4-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) ) @@ -1602,8 +1602,8 @@ (vector-reset! s5-1) (dotimes (s4-1 (-> *collide-cache* num-tris)) (let* ((v1-16 (-> *collide-cache* tris s4-1)) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (the-as vector (-> v1-16 vertex)))) - (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (the-as vector (-> v1-16 vertex)))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 1) (-> v1-16 vertex 0))) + (s1-1 (vector-! (new 'stack-no-clear 'vector) (-> v1-16 vertex 2) (-> v1-16 vertex 0))) (s3-0 (new 'stack-no-clear 'vector)) ) (vector-normalize! s2-1 1.0) @@ -1793,9 +1793,9 @@ (.lvf vf5 (&-> s2-1 quad)) (.lvf vf4 (&-> s3-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-0 quad) vf6) ) (mantis-method-203 this (the-as process-focusable s5-0) s4-1) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc index 3eeee588adb..03b10efbd2a 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc @@ -1420,7 +1420,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-3 y) 0.0) (vector-normalize! gp-3 12288.0) (vector+! gp-3 gp-3 (-> self root trans)) @@ -1435,7 +1435,7 @@ (-> self root trans) ) (set-time! (-> self state-time)) - (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-5 y) 0.0) (vector-normalize! gp-5 4096.0) (vector+! gp-5 gp-5 (-> self root trans)) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc index c177a014a3c..364d3656a0d 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc @@ -1000,7 +1000,7 @@ (set! (-> s5-1 uvec y) 0.0) (vector-normalize! (-> s5-1 uvec) 1.0) (vector-normalize-copy! (-> s5-1 fvec) (-> s5-1 rvec) 1.0) - (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (the-as vector (-> self upper-rotation-matrix))) + (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (-> self upper-rotation-matrix rvec)) (set! (-> self arm-rot-mult arg1) (* (-> self arm-rot-mult arg1) (vector-dot (-> s5-1 uvec) (-> self upper-rotation-matrix fvec))) ) @@ -1175,9 +1175,9 @@ ) (.lvf vf4 (&-> a0-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-14 quad) vf6) ) (vector-copy! s5-1 (-> self incoming attack-direction)) @@ -1665,8 +1665,8 @@ "Common implementation of post. Runs ja-post." (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) (vector-rotate-around-y! - (the-as vector (-> this upper-rotation-matrix)) - (the-as vector (-> this rotation-matrix)) + (-> this upper-rotation-matrix rvec) + (-> this rotation-matrix rvec) (-> this torso-angle) ) (vector-copy! (-> this upper-rotation-matrix uvec) (-> this rotation-matrix uvec)) @@ -1691,7 +1691,7 @@ (s5-1 (-> this rotation-matrix)) (f0-3 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-9)) ) - (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (if (< (vector-dot (-> this me-to-focus-dir) (-> s5-1 rvec)) 0.0) (set! f0-3 (* -1.0 f0-3)) ) (set! (-> this me-to-focus-angle) f0-3) @@ -1784,7 +1784,7 @@ (cspace<-parented-transformq-joint! arg0 arg1) (quaternion-vector-angle! (the-as quaternion s4-0) - (the-as vector (-> (the-as roboguard s3-0) upper-rotation-matrix)) + (-> (the-as roboguard s3-0) upper-rotation-matrix rvec) (* (-> (the-as roboguard s3-0) arm-rot (the-as int s2-0)) (-> (the-as roboguard s3-0) arm-rot-mult (the-as int s2-0)) ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc index 6dfd0582883..5c574427df3 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/spyder_REF.gc @@ -798,7 +798,7 @@ (set! (-> a1-0 y) 22528.0) (set! (-> a1-0 z) 22528.0) (set! (-> a1-0 w) 1.0) - (vector-! (the-as vector v1-0) a0-2 a1-0) + (vector-! (-> v1-0 min) a0-2 a1-0) ) (let ((v1-2 (-> s5-0 bbox max)) (a0-4 (-> this root trans)) @@ -836,9 +836,9 @@ ) (.lvf vf4 (&-> a0-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (vector-copy! s2-0 s3-0) @@ -853,9 +853,9 @@ ) (.lvf vf4 (&-> a0-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-10 quad) vf6) ) (vector-float*! (-> s5-0 move-dist) v1-15 -32768.0) @@ -881,9 +881,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc index 6d179d4f4aa..c80d3372633 100644 --- a/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc @@ -903,11 +903,11 @@ (vector-normalize! s1-1 204800.0) (let ((v1-20 s1-1)) (let ((a0-19 s1-1)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> a0-19 quad)) ) (.lvf vf5 (&-> sv-144 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-20 quad) vf6) ) (vector-! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc index 3773428ea10..b160d3c7305 100644 --- a/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc @@ -184,7 +184,7 @@ (logior! (-> s5-1 0 flags) (squad-target-flag updated)) (cond ((or (logtest? (-> s5-1 0 flags) (squad-target-flag force-visible)) - (probe-backgnd-collision this arg0 (the-as vector (-> s4-0 1))) + (probe-backgnd-collision this arg0 (-> s4-0 1 position)) ) (logior! (-> s5-1 0 flags) (squad-target-flag visible-now visible-recently visible-ever)) (set-time! (-> s5-1 0 last-seen-time)) @@ -460,11 +460,11 @@ (let ((v1-18 (-> s2-0 vec1)) (a0-9 (-> s1-0 bounds)) ) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> v1-18 quad)) (.lvf vf5 (&-> a0-9 quad)) ) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-688 quad) vf6) (set! sv-704 0) (while (< sv-704 16) @@ -501,11 +501,11 @@ (vector-float*! (-> s2-0 vec0) (-> s2-0 vec0) (-> s2-0 float3)) ) (.lvf vf1 (&-> (-> s2-0 vec0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-40 vf1) (let ((f0-17 v1-40) (f1-4 (/ arg3 2)) diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc index 54ebe7055df..9f71763a104 100644 --- a/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/turret-control_REF.gc @@ -264,9 +264,9 @@ (.lvf vf5 (&-> v1-10 quad)) ) (.lvf vf4 (&-> arg1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-4 quad) vf6) ) (forward-up->quaternion s4-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) @@ -560,7 +560,7 @@ (logior! (-> s4-0 params options) (projectile-options po16)) (matrix-copy! (-> s4-0 mat0) (-> arg0 node-list data (-> this info joint-index) bone transform)) (dotimes (s3-0 (-> this info barrel-count)) - (vector-matrix*! (-> s4-0 vec2) (the-as vector (-> this info barrel-array s3-0)) (-> s4-0 mat0)) + (vector-matrix*! (-> s4-0 vec2) (-> this info barrel-array s3-0 local-pos) (-> s4-0 mat0)) (vector-copy! (-> s4-0 vec3) (-> s4-0 mat0 fvec)) (set! (-> s4-0 params pos quad) (-> s4-0 vec2 quad)) (vector-float*! (-> s4-0 params vel) (-> s4-0 vec3) (-> this info shot-speed)) diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc index ab7c5d94bb2..b1c34f1a606 100644 --- a/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc @@ -22,13 +22,9 @@ ;; definition for method 15 of type hud-vehicle-health ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-vehicle-health)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (+ (the int (* -100.0 (-> this offset))) 5) - 366 - ) + (set-hud-piece-position! (-> this sprites 0) (+ (the int (* -100.0 (-> this offset))) 5) 366) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 6) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 6) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) @@ -89,7 +85,3 @@ (the-as hud-vehicle-health gp-0) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc index cfe16b254b7..b3ffff0920c 100644 --- a/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/race/race-hud_REF.gc @@ -4,11 +4,7 @@ ;; definition for method 15 of type hud-race-timer ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-timer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 266 - (the int (+ 50.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 266 (the int (+ 50.0 (* -100.0 (-> this offset))))) (let ((s5-0 (new 'stack-no-clear 'array 'time-frame 5))) (set! (-> s5-0 0) (the-as time-frame (min #x1b773f (-> *game-info* race-timer)))) (set! (-> s5-0 2) (the-as time-frame (/ (-> s5-0 0) #x4650))) @@ -23,7 +19,7 @@ (format (-> this strings 1 text) "~2,'0D:" (-> s5-0 3)) (format (-> this strings 2 text) "~2,'0D" (-> s5-0 4)) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 -22) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -40 -22) (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this strings 0 pos) 40 0) (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this strings 1 pos) 33 0) ((method-of-type hud draw) this) @@ -71,16 +67,12 @@ ;; definition for method 15 of type hud-race-lap-counter ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-lap-counter)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 504 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 504 (the int (+ 20.0 (* -100.0 (-> this offset))))) (set! (-> this strings 0 scale) 0.55) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -40 5) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -20 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) -50 0) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -40 5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -20 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) -50 0) ((method-of-type hud draw) this) 0 (none) @@ -134,11 +126,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-race-position)) (local-vars (s4-0 int)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 20 - (the int (+ 20.0 (* -100.0 (-> this offset)))) - ) + (set-hud-piece-position! (-> this sprites 0) 20 (the int (+ 20.0 (* -100.0 (-> this offset))))) (let ((s5-0 (-> this values 0 current))) (dotimes (v1-2 16) (set! (-> this sprites v1-2 scale-x) 0.0) @@ -146,7 +134,7 @@ ) (set! (-> this sprites s5-0 scale-x) 0.8) (set! (-> this sprites s5-0 scale-y) 0.8) - (set-as-offset-from! (-> this sprites s5-0) (the-as vector4w (-> this sprites)) 0 0) + (set-as-offset-from! (-> this sprites s5-0) (-> this sprites 0 pos) 0 0) 0 (let ((v1-14 (-> *common-text* language-id))) (cond @@ -174,7 +162,7 @@ (when (!= s4-0 -1) (set-as-offset-from! (-> this sprites s4-0) - (the-as vector4w (-> this sprites s5-0)) + (-> this sprites s5-0 pos) (if (zero? s5-0) 28 52 @@ -466,7 +454,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc index 13515a1c531..c9c07a2fc77 100644 --- a/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/race/race-manager_REF.gc @@ -37,9 +37,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) #t ) @@ -249,11 +249,11 @@ (let ((v1-39 (new 'stack-no-clear 'inline-array 'vector 1))) (vector-! (-> v1-39 0) (-> this position) (the-as vector (-> arg0 info finish-sphere))) (.lvf vf1 (&-> (-> v1-39 0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-29 vf1) (let ((f0-7 a0-29) (f1-1 (-> arg0 info finish-sphere r)) @@ -811,9 +811,9 @@ ) (.lvf vf4 (&-> v1-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) (+! (-> s5-1 rvec y) 22528.0) @@ -916,9 +916,9 @@ ) (.lvf vf4 (&-> a2-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-0 quad) vf6) ) (let ((t0-1 (-> v1-8 mat trans))) @@ -931,9 +931,9 @@ ) (.lvf vf4 (&-> a2-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t0-1 quad) vf6) ) (vector-copy! (-> a1-20 start-position) (-> v1-8 mat trans)) diff --git a/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc index e977e0737ac..62de3c32bbc 100644 --- a/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc +++ b/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc @@ -346,7 +346,7 @@ (mem-copy! (the-as pointer (-> gp-0 2)) (the-as pointer (-> this samples v1-7)) 32) ) (let ((f30-0 (- arg2 (the float s1-0)))) - (vector-lerp! (-> arg0 pos) (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 1)) f30-0) + (vector-lerp! (-> arg0 pos) (-> gp-0 0 pos) (-> gp-0 1 pos) f30-0) (quaternion-slerp! (-> arg0 quat) (-> gp-0 0 quat) (-> gp-0 1 quat) f30-0) (set! (-> arg0 stick-x) (the int (+ 0.5 (* (the float (-> gp-0 1 stick-x)) f30-0) (* (the float (-> gp-0 0 stick-x)) (- 1.0 f30-0)))) @@ -361,11 +361,11 @@ ) ) (set! (-> arg0 flags) (-> gp-0 0 flags)) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 1)) (the-as vector (-> gp-0 0))) - (vector-float*! (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 4)) 15.0) - (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 2)) (the-as vector (-> gp-0 1))) - (vector-float*! (the-as vector (-> gp-0 3 quat)) (the-as vector (-> gp-0 4)) 15.0) - (vector-lerp! arg1 (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 3 quat)) f30-0) + (vector-! (-> gp-0 4 pos) (-> gp-0 1 pos) (-> gp-0 0 pos)) + (vector-float*! (-> gp-0 3 pos) (-> gp-0 4 pos) 15.0) + (vector-! (-> gp-0 4 pos) (-> gp-0 2 pos) (-> gp-0 1 pos)) + (vector-float*! (-> gp-0 3 quat vec) (-> gp-0 4 pos) 15.0) + (vector-lerp! arg1 (-> gp-0 3 pos) (-> gp-0 3 quat vec) f30-0) ) ) ) @@ -402,11 +402,11 @@ (f2-1 (vector-dot (-> s4-0 fvec) (-> s4-0 trans))) ) (.lvf vf1 (&-> (-> s4-0 fvec) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (let ((f0-8 (fmax f0-7 (fmin f1-1 (/ f2-1 v1-15))))) (if (< gp-0 arg1) @@ -659,25 +659,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) - (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (vector-! v1-11 (-> arg1 slice-corners 2) (-> arg1 slice-corners 0)) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s4-0 (new 'stack-no-clear 'vector)) (s3-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s4-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 1) (-> arg1 slice-corners 0)) (vector-cross! s3-0 s4-0 v1-11) ) (else - (vector-! s4-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-! s4-0 (-> arg1 slice-corners 3) (-> arg1 slice-corners 0)) (vector-cross! s3-0 v1-11 s4-0) ) ) (vector-normalize! s3-0 1.0) (set-vector! s4-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (the-as vector (-> arg1 slice-corners)) s3-0))) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (-> arg1 slice-corners 0) s3-0))) (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s4-0 f0-10) ) ) @@ -713,7 +713,7 @@ (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 112) (while (nonzero? s1-0) (+! s1-0 -1) - (let ((a1-7 (-> (&-> (-> s4-0 slice-table) 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) + (let ((a1-7 (-> (&-> s4-0 slice-table 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) (when (race-mesh-method-19 this (the-as int a1-7) s2-0) (if (or (= (-> arg0 slice-id) -1) (< (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg0 search-sphere)) @@ -765,25 +765,25 @@ (let ((v1-11 (new 'stack-no-clear 'vector)) (a0-7 (new 'stack-no-clear 'vector)) ) - (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) - (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (vector-! v1-11 (-> arg1 slice-corners 2) (-> arg1 slice-corners 0)) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners 0)) (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) (s5-0 (new 'stack-no-clear 'vector)) (s4-0 (new 'stack-no-clear 'vector)) ) (cond ((< f0-5 0.0) - (vector-! s5-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-! s5-0 (-> arg1 slice-corners 1) (-> arg1 slice-corners 0)) (vector-cross! s4-0 s5-0 v1-11) ) (else - (vector-! s5-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-! s5-0 (-> arg1 slice-corners 3) (-> arg1 slice-corners 0)) (vector-cross! s4-0 v1-11 s5-0) ) ) (vector-normalize! s4-0 1.0) (set-vector! s5-0 0.0 -1.0 0.0 1.0) - (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (the-as vector (-> arg1 slice-corners)) s4-0))) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (-> arg1 slice-corners 0) s4-0))) (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s5-0 f0-10) ) ) @@ -825,7 +825,7 @@ (when (not (logtest? a2-4 a1-2)) (set! (-> arg0 cell-bits 0 data a0-1) (logior a2-4 a1-2)) (let* ((v1-5 (the-as object (+ (the-as uint (-> this hash cells)) (* v1-3 4)))) - (s3-0 (&-> (-> this hash slice-table) 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) + (s3-0 (&-> this hash slice-table 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) (s1-0 (-> (the-as race-mesh-hash-cell v1-5) slice-count)) ) (when (nonzero? s1-0) @@ -946,7 +946,7 @@ (defmethod race-mesh-method-14 ((this race-mesh) (arg0 race-mesh-slice-query)) (let* ((f30-0 (vector-line-distance-point! (-> arg0 pt-on-slice) - (the-as vector (-> arg0 slice-corners)) + (-> arg0 slice-corners 0) (-> arg0 slice-corners 1) (the-as vector #f) ) diff --git a/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc index fa22b9d3e7c..6d9879f1951 100644 --- a/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/boss/deswalk-obs_REF.gc @@ -1187,7 +1187,7 @@ (gp-2 (new 'stack-no-clear 'vector)) (s5-3 (-> s5-2 ragdoll)) ) - (vector-! gp-2 (the-as vector (-> s4-0 prim-core)) v1-46) + (vector-! gp-2 (-> s4-0 prim-core world-sphere) v1-46) (set! (-> gp-2 y) 0.0) (vector-normalize! gp-2 (lerp-scale 4096.0 16384.0 f30-0 2.0 16.0)) (dotimes (v1-47 (the-as int (-> s5-3 num-joints))) @@ -1992,13 +1992,9 @@ ;; definition for method 15 of type hud-deswalk ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-deswalk)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (let ((f30-0 (the float (-> this values 0 current)))) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 8 67) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 8 67) (set! (-> this sprites 4 scale-x) (* 0.164 f30-0)) (cond ((< 90.0 f30-0) @@ -2027,9 +2023,9 @@ ) ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 9 66) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 66) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 4 66) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 9 66) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -51 66) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 4 66) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc index 4195d2f5925..beeefd592b3 100644 --- a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-head_REF.gc @@ -424,11 +424,11 @@ (let* ((t9-2 vector-normalize-copy!) (a0-3 (new 'stack-no-clear 'vector)) (v1-3 (abs (-> s4-0 nose))) - (s3-0 (t9-2 a0-3 (the-as vector (&-> (-> arg0 bone) transform quad v1-3)) 1.0)) + (s3-0 (t9-2 a0-3 (the-as vector (&-> arg0 bone transform quad v1-3)) 1.0)) (t9-3 vector-normalize-copy!) (a0-4 (new 'stack-no-clear 'vector)) (v1-6 (abs (-> s4-0 up))) - (s1-0 (t9-3 a0-4 (the-as vector (&-> (-> arg0 bone) transform quad v1-6)) 1.0)) + (s1-0 (t9-3 a0-4 (the-as vector (&-> arg0 bone transform quad v1-6)) 1.0)) (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 target) (-> arg0 bone transform trans))) (s5-1 (new 'stack-no-clear 'matrix)) ) @@ -626,8 +626,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-7 quad) vf1) ) (vector-copy! (-> self pre-move-transv) (-> v1-1 transv)) diff --git a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc index 3e4643d0aa1..ea79baafa29 100644 --- a/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/boss/terraformer-setup_REF.gc @@ -131,9 +131,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (+! (-> s5-0 collision-pt y) 204.8) @@ -1047,7 +1047,7 @@ ) ) (set-time! (-> self state-time)) - (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (let ((gp-3 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self traj initial-position)))) (set! (-> gp-3 y) 0.0) (vector-normalize! gp-3 12288.0) (vector+! gp-3 gp-3 (-> self root trans)) @@ -1077,9 +1077,9 @@ ) (.lvf vf4 (&-> v1-72 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-35 quad) vf6) ) ) @@ -1227,7 +1227,7 @@ ) :trans (behavior () (ja :num! (loop!)) - (vector<-cspace! (-> self root trans) (the-as cspace (-> self node-list data))) + (vector<-cspace! (-> self root trans) (-> self node-list data 0)) ) :code sleep-code :post (behavior () @@ -1421,7 +1421,7 @@ ) (set! (-> self sand-drop-part) (create-launch-control (-> *part-group-id-table* 436) self)) (set! (-> self water-drop-part) (create-launch-control (-> *part-group-id-table* 439) self)) - ((method-of-type cam-float-seeker init) (the-as cam-float-seeker (-> self foot-lock)) 0.0 0.005 0.04 0.9) + ((method-of-type cam-float-seeker init) (-> self foot-lock lock) 0.0 0.005 0.04 0.9) (set! (-> self foot-lock initialized) #f) (set! (-> self foot-marks) (new 'process 'terraformer-foot-mark-pt-array)) (cond @@ -1819,9 +1819,9 @@ ) (.lvf vf4 (&-> v1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-0 quad) vf6) ) ) @@ -1936,7 +1936,7 @@ (set! (-> a1-26 y) 327680.0) (set! (-> a1-26 z) 32768.0) (set! (-> a1-26 w) 1.0) - (vector-! (the-as vector a2-30) a0-30 a1-26) + (vector-! (-> a2-30 min) a0-30 a1-26) ) (let ((a1-27 (-> s5-4 bbox max)) (a0-31 (new 'stack-no-clear 'vector)) @@ -1982,7 +1982,7 @@ ) ) ) - ((method-of-type cam-float-seeker update!) (the-as cam-float-seeker (-> self foot-lock)) 0.0) + ((method-of-type cam-float-seeker update!) (-> self foot-lock lock) 0.0) (if (-> self foot-lock initialized) (vector-lerp! gp-0 @@ -2040,11 +2040,11 @@ (vector-! s4-0 (-> (the-as process-drawable s5-0) root trans) s4-0) (set! (-> s4-0 y) 0.0) (.lvf vf1 (&-> s4-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-19 vf1) (let ((f0-1 v1-19) (f1-0 1.0) @@ -2318,9 +2318,9 @@ ) (.lvf vf4 (&-> v1-22 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) ) (else @@ -3225,13 +3225,9 @@ ;; definition for method 15 of type hud-terraformer ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-terraformer)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 4 48) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 4 48) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/desert-chase_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/desert-chase_REF.gc index 52144551454..0ad1b53c1b7 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/desert-chase_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/desert-chase_REF.gc @@ -1148,13 +1148,9 @@ ;; definition for method 15 of type hud-desert-chase-marauders ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-desert-chase-marauders)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 482.0 (* 130.0 (-> this offset)))) - 25 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 482.0 (* 130.0 (-> this offset)))) 25) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 45) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/desert-jump_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/desert-jump_REF.gc index be3638ced6b..73a9e0fd95e 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/desert-jump_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/desert-jump_REF.gc @@ -443,9 +443,9 @@ (the int (+ 30.0 (* -100.0 (-> this offset)))) ) (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 15 10) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 15 10) (let ((f30-1 (the float (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) @@ -520,13 +520,9 @@ ;; definition for method 15 of type hud-desert-catapult-count ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-desert-catapult-count)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 482.0 (* 130.0 (-> this offset)))) - 25 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 482.0 (* 130.0 (-> this offset)))) 25) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 60) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 60) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc index 9d30662c74d..45896fcdce0 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/marauder_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-marauder ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-marauder)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 195 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 195) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -10 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -10 33) ((method-of-type hud draw) this) 0 (none) @@ -615,8 +611,8 @@ (-> arg3 param 1) (vector+! (-> this root trans) (-> this root trans) (the-as vector v1-1)) (vector+! - (the-as vector (-> this jump-info traj)) - (the-as vector (-> this jump-info traj)) + (-> this jump-info traj initial-position) + (-> this jump-info traj initial-position) (the-as vector v1-1) ) (vector+! (-> this jump-info start-pos) (-> this jump-info start-pos) (the-as vector v1-1)) @@ -1215,9 +1211,9 @@ (.lvf vf5 (&-> a0-16 quad)) (.lvf vf4 (&-> v1-33 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (set! (-> self jump-attack) #t) @@ -1326,9 +1322,9 @@ (.lvf vf5 (&-> s5-1 quad)) (.lvf vf4 (&-> s4-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-4 quad) vf6) ) ) @@ -1349,9 +1345,9 @@ ) (.lvf vf5 (&-> s4-2 quad)) (.lvf vf4 (&-> s5-2 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) (t9-13 this a1-11 a2-1 819200.0 (the-as vector #f)) ) @@ -1708,9 +1704,9 @@ (.lvf vf5 (&-> a0-6 quad)) (.lvf vf4 (&-> v1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((a1-2 gp-1)) @@ -1723,9 +1719,9 @@ ) (.lvf vf4 (&-> v1-14 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (vector-copy! (-> self root trans) gp-1) @@ -1754,9 +1750,9 @@ ) (.lvf vf4 (&-> s5-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-2 quad) vf6) ) (+! f28-0 (seconds-per-frame)) @@ -1783,9 +1779,9 @@ (.lvf vf5 (&-> a0-22 quad)) (.lvf vf4 (&-> v1-63 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (let ((a1-9 gp-3)) @@ -1798,9 +1794,9 @@ ) (.lvf vf4 (&-> v1-64 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (set! (-> self enemy-flags) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc index 9c188d5469b..356c4517ffe 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/wcar-catapult_REF.gc @@ -2049,7 +2049,7 @@ (let* ((s5-0 (-> this node-list data 3 bone transform)) (s4-0 (-> this node-list data 3 bone transform fvec)) (a1-4 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg1 point) (-> this root trans)) 1.0)) - (f0-1 (vector-dot (the-as vector s5-0) a1-4)) + (f0-1 (vector-dot (-> s5-0 rvec) a1-4)) (s5-1 (< 0.0 f0-1)) (s4-1 (< (vector-vector-angle-safe s4-0 a1-4) 5461.3335)) (a1-6 (new 'stack 'debris-tuning (the-as uint 1))) @@ -2317,7 +2317,7 @@ (set! (-> this draw lod-set lod 0 dist) 1105920.0) (set! (-> this rider-hand-joint-array 0) 3) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc b/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc index 4cb9857bae8..b9f4f2d6b22 100644 --- a/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/chase/wcar-marauder-b_REF.gc @@ -342,7 +342,7 @@ (set! (-> this draw lod-set lod 0 dist) 1105920.0) (set! (-> this rider-hand-joint-array 0) 3) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc index 4cfe23f0534..7a8718884f3 100644 --- a/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/des-bbush-tasks_REF.gc @@ -93,7 +93,7 @@ (defmethod draw ((this hud-wasbbv-goal)) (local-vars (v1-7 int) (s5-0 int)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) @@ -151,8 +151,8 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) (set! (-> this strings 1 scale) 0.65) (case (-> *setting-control* user-default language) (((language-enum korean)) @@ -190,7 +190,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-wasbbv-score)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 70 ) @@ -226,8 +226,8 @@ (format (clear *temp-string*) (lookup-text! *common-text* (-> *wasbbv-hud-info* score-text) #f)) (s5-1 s4-1 s3-0 *temp-string*) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 40 -40) (let ((v1-9 (-> *setting-control* user-default language))) (set! (-> this strings 1 scale) (cond @@ -281,7 +281,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-wasbbv-counter)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (- 512.0 (* 72.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) 95 ) @@ -309,7 +309,7 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (the-as vector4w (-> this sprites)) 32 -8) + (set-as-offset-from! (the-as hud-sprite (-> s5-0 0 pos)) (-> this sprites 0 pos) 32 -8) ) ((method-of-type hud draw) this) 0 diff --git a/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc index db00abe3789..ede8d2929fd 100644 --- a/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/des-burning-bush_REF.gc @@ -409,9 +409,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -495,17 +495,13 @@ ) (.lvf vf4 (&-> a0-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-10 quad) vf6) ) (vector-! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 vec1)) - (forward-down->inv-matrix - (the-as matrix (-> *camera* slave 0 tracking)) - (-> gp-0 vec3) - (-> *camera* local-down) - ) + (forward-down->inv-matrix (-> *camera* slave 0 tracking inv-mat) (-> gp-0 vec3) (-> *camera* local-down)) ) (matrix-copy! (-> gp-0 mat) (-> self node-list data 3 bone transform)) (matrix->trans (-> gp-0 mat) (-> gp-0 vec2)) @@ -588,9 +584,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) @@ -909,11 +905,11 @@ ) (.lvf vf4 (&-> a2-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-23 quad) vf6) - (t9-3 (the-as matrix a0-7) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) + (t9-3 (-> a0-7 inv-mat) (vector-! a1-1 v1-23 gp-0) (-> *camera* local-down)) ) ) ) @@ -1003,9 +999,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) (t9-0 a0-0 a1-0 #f self) ) diff --git a/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc index d9fb3086415..3b4644b21a6 100644 --- a/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/des-bush_REF.gc @@ -1183,7 +1183,7 @@ ) (vector-! a1-0 a1-0 (-> self root trans)) (let ((a0-12 (-> self root quat))) - (when (desert-chase-ring-cleared? (the-as vector a0-12) a1-0 self) + (when (desert-chase-ring-cleared? (-> a0-12 vec) a1-0 self) (if (-> self is-final?) (sound-play "ring-final") (sound-play "ring-pass") @@ -1487,10 +1487,10 @@ ;; definition for method 15 of type hud-spider-killed ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-spider-killed)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 65 125) + (set-hud-piece-position! (-> this sprites 0) 65 125) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) ((method-of-type hud draw) this) 0 (none) @@ -2021,8 +2021,8 @@ (.mov vf2 v1-14) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-240 quad) vf1) (set! sv-256 (-> s5-0 trans)) (set! sv-272 (new 'stack-no-clear 'vector)) @@ -2034,8 +2034,8 @@ (.mov vf2 v1-19) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-272 quad) vf1) (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) ) @@ -3123,8 +3123,8 @@ (.mov vf2 v1-16) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-240 quad) vf1) (set! sv-256 (-> s5-0 trans)) (set! sv-272 (new 'stack-no-clear 'vector)) @@ -3136,8 +3136,8 @@ (.mov vf2 v1-21) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-272 quad) vf1) (s1-0 s2-0 s0-0 sv-240 sv-256 sv-272) ) diff --git a/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc index 4a0841398e9..24cb95df49e 100644 --- a/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc @@ -76,11 +76,11 @@ ) (set! (-> this spring-pos y) 0.0) (.lvf vf1 (&-> (-> this spring-pos) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-2 vf1) (let ((f0-10 v1-2)) (when (< 1.0 f0-10) @@ -94,34 +94,34 @@ (set! (-> s5-0 7 x) 2730.6667) (set! (-> s5-0 7 z) (sin (/ (-> s5-0 7 x) 2))) (set! (-> s5-0 7 y) (cos (/ (-> s5-0 7 x) 2))) - (vector-rotate90-around-y! (the-as vector (-> s5-0 6)) (-> this spring-pos)) - (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (* -1.0 (-> s5-0 7 z))) - (vector-rotate*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) (the-as matrix (-> s5-0 2))) + (vector-rotate90-around-y! (-> s5-0 6 vec) (-> this spring-pos)) + (vector-float*! (-> s5-0 6 vec) (-> s5-0 6 vec) (* -1.0 (-> s5-0 7 z))) + (vector-rotate*! (-> s5-0 6 vec) (-> s5-0 6 vec) (the-as matrix (-> s5-0 2))) (set! (-> s5-0 0 x) (-> s5-0 6 x)) (set! (-> s5-0 0 y) (-> s5-0 6 y)) (set! (-> s5-0 0 z) (-> s5-0 6 z)) (let ((f0-25 1.0)) (.lvf vf1 (&-> (-> s5-0 6) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-16 vf1) (set! (-> s5-0 0 w) (sqrtf (- f0-25 v1-16))) ) (quaternion-copy! (-> this jmods 0 rotation) (-> s5-0 0)) - (vector-float*! (the-as vector (-> s5-0 6)) (the-as vector (-> s5-0 6)) 1.0) + (vector-float*! (-> s5-0 6 vec) (-> s5-0 6 vec) 1.0) (set! (-> s5-0 0 x) (-> s5-0 6 x)) (set! (-> s5-0 0 y) (-> s5-0 6 y)) (set! (-> s5-0 0 z) (-> s5-0 6 z)) (let ((f0-32 1.0)) (.lvf vf1 (&-> (-> s5-0 6) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-21 vf1) (set! (-> s5-0 0 w) (sqrtf (- f0-32 v1-21))) ) @@ -509,7 +509,7 @@ ) (set! (-> this exploder-anim) (the-as uint 8)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmods)) + (-> this jmods 0) this (the-as uint 4) (joint-mod-base-flags attached) @@ -635,7 +635,7 @@ ) (set! (-> this exploder-anim) (the-as uint 8)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmods)) + (-> this jmods 0) this (the-as uint 4) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc index 4b6d1b772c5..ece333ec6ca 100644 --- a/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/desert-mood_REF.gc @@ -64,7 +64,7 @@ ;; definition for function init-mood-desertg (defun init-mood-desertg ((arg0 mood-context)) - (let ((v1-1 (&-> (-> arg0 state) 4))) + (let ((v1-1 (&-> arg0 state 4))) (set! (-> v1-1 0) (the-as uint 8192000.0)) (set! (-> v1-1 1) (the-as uint 221184.0)) (set! (-> v1-1 2) (the-as uint 8601600.0)) @@ -100,7 +100,7 @@ (when (and (= (-> *level* level arg2 status) 'active) (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) ) - (let ((v1-8 (&-> (-> arg0 state) 4))) + (let ((v1-8 (&-> arg0 state 4))) (set! (-> v1-8 0) (the-as uint 8192000.0)) (set! (-> v1-8 1) (the-as uint 221184.0)) (set! (-> v1-8 2) (the-as uint 8601600.0)) @@ -112,7 +112,7 @@ ) (set! (-> arg0 times 7 w) 1.0) (light-group-lerp! - (the-as light-group (-> arg0 light-group)) + (-> arg0 light-group 0) (the-as (pointer light-group) (-> arg0 light-group)) (-> arg0 light-group 2) f0-5 @@ -168,7 +168,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc b/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc index be1cdf10f8f..9b2b540aa3f 100644 --- a/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/desert-scenes_REF.gc @@ -868,7 +868,7 @@ ;; definition for function spt-func-part-desert-shot-edges (defun spt-func-part-desert-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-track-root arg0 arg1 (the-as vector arg2)) + (sparticle-track-root arg0 arg1 (-> arg2 launchrot)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) ) @@ -934,7 +934,7 @@ ;; definition for function spt-func-spt-func-part-desert-barrier-puffs (defun spt-func-spt-func-part-desert-barrier-puffs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -1031,7 +1031,7 @@ ;; definition for function spt-func-spt-func-part-desert-barrier-sparks (defun spt-func-spt-func-part-desert-barrier-sparks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc index 18ff8e762c3..9a50b683df6 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast-2_REF.gc @@ -105,9 +105,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-22 quad) vf6) ) (+! (-> self root trans y) 10240.0) @@ -588,12 +588,7 @@ (if (= s5-0 (-> self des-path node-count)) (go-virtual die) ) - (vector-lerp! - gp-0 - (the-as vector (-> self des-path node s4-0)) - (the-as vector (-> self des-path node s5-0)) - f30-0 - ) + (vector-lerp! gp-0 (-> self des-path node s4-0 position) (-> self des-path node s5-0 position) f30-0) ) (seek-toward-heading-vec! (-> self root) @@ -808,7 +803,7 @@ (let* ((a1-30 (-> sv-512 gp-8)) (a2-9 (-> sv-512 (+ gp-8 1))) (s5-8 (new 'stack-no-clear 'vector)) - (f0-47 (vector-segment-distance-point! sv-516 (the-as vector a1-30) (the-as vector a2-9) s5-8)) + (f0-47 (vector-segment-distance-point! sv-516 (-> a1-30 position) (-> a2-9 position) s5-8)) ) (when (or (= sv-504 -1) (< f0-47 sv-500)) (set! sv-500 f0-47) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc index cd1012ea1a5..71baad3ff29 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc @@ -1594,9 +1594,9 @@ (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> s2-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-3 quad) vf6) ) (let ((s3-4 (-> self target-gun-pos))) @@ -1607,9 +1607,9 @@ (.lvf vf5 (&-> gp-0 quad)) (.lvf vf4 (&-> s4-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-4 quad) vf6) ) ) @@ -1648,12 +1648,7 @@ (if (= v1-9 (-> self des-path node-count)) (set! v1-9 0) ) - (vector-lerp! - gp-0 - (the-as vector (-> self des-path node a1-0)) - (the-as vector (-> self des-path node v1-9)) - f0-8 - ) + (vector-lerp! gp-0 (-> self des-path node a1-0 position) (-> self des-path node v1-9 position) f0-8) ) (seek-toward-heading-vec! (-> self root) @@ -2351,8 +2346,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> this des-path node s5-0)) - (the-as vector (-> this des-path node (+ s5-0 1))) + (-> this des-path node s5-0 position) + (-> this des-path node (+ s5-0 1) position) *color-red* #f (the-as rgba -1) @@ -2389,8 +2384,8 @@ (.lvf vf4 (&-> sv-128 quad)) (.lvf vf5 (&-> v0-2 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-144 quad) vf6) (rot-zxy-from-vector! s0-0 (-> arg0 bone transform fvec)) (rot-zxy-from-vector! s1-0 sv-160) @@ -2435,8 +2430,8 @@ (.lvf vf4 (&-> sv-112 quad)) (.lvf vf5 (&-> v0-1 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-128 quad) vf6) (rot-zxy-from-vector! s2-0 (-> arg0 bone transform fvec)) (rot-zxy-from-vector! s1-0 s0-0) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc index ca87f350429..f57b95de1a1 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/desert-hover_REF.gc @@ -22,13 +22,9 @@ ;; definition for method 15 of type hud-beast ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-beast)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) @@ -250,7 +246,3 @@ (update-rates! (-> *display* target-clock) 1.0) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc index 315d30066a4..f3ddb277471 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/mh-flyer_REF.gc @@ -1101,7 +1101,7 @@ (vector-length-max! s5-0 655360.0) (vector-v++! s4-0 s5-0) ) - (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (let* ((v1-21 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (-> self rotation-matrix rvec))) (f0-6 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-21) 245760.0 -245760.0)) ) (seek! (-> self pitch-angle) f0-6 (* 32768.0 (seconds-per-frame))) @@ -1110,17 +1110,10 @@ gp-0 (the-as quaternion *y-vector*) (-> self pitch-angle) - (the-as vector (-> self rotation-matrix)) + (-> self rotation-matrix rvec) ) (let* ((v1-25 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) - (f0-12 (lerp-scale - -15473.777 - 15473.777 - (vector-dot (the-as vector (-> self rotation-matrix)) v1-25) - 131072.0 - -131072.0 - ) - ) + (f0-12 (lerp-scale -15473.777 15473.777 (vector-dot (-> self rotation-matrix rvec) v1-25) 131072.0 -131072.0)) ) (seek! (-> self bank-angle) f0-12 (* 10922.667 (seconds-per-frame))) ) @@ -1278,7 +1271,7 @@ ) (let ((a1-10 (-> self des-path node (-> self path-pos)))) (vector-copy! (-> self move-dest) (-> a1-10 position)) - (if (< (vector-vector-distance (-> self root trans) (the-as vector a1-10)) 327680.0) + (if (< (vector-vector-distance (-> self root trans) (-> a1-10 position)) 327680.0) (+! (-> self path-pos) 1) ) ) diff --git a/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc b/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc index f2fe9383598..b4698b487b9 100644 --- a/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/hover/scorpion-gun_REF.gc @@ -554,7 +554,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-scorpion-gun)) (set! (-> this sprites 0 color w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 32 208) + (set-hud-piece-position! (-> this sprites 0) 32 208) (set! (-> this sprites 0 color w) (the int (-> this alpha 0))) (set! (-> this sprites 1 color w) 0) (set-hud-piece-position! (-> this sprites 1) 480 208) @@ -790,8 +790,8 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-14 quad) vf5) ) (sparticle-set-conerot s5-0 s3-2) @@ -1160,9 +1160,9 @@ ) (when (logtest? (process-mask enemy projectile) (-> s1-0 mask)) (if #f - (add-debug-sphere #t (bucket-id debug) (the-as vector s0-0) (-> s0-0 world-sphere w) *color-red*) + (add-debug-sphere #t (bucket-id debug) (-> s0-0 world-sphere) (-> s0-0 world-sphere w) *color-red*) ) - (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (the-as vector s0-0) (-> gp-0 trans))) + (let* ((a1-7 (vector-! (new 'stack-no-clear 'vector) (-> s0-0 world-sphere) (-> gp-0 trans))) (f28-0 (vector-length a1-7)) ) (when (< f28-0 1024000.0) @@ -1215,7 +1215,7 @@ ) (let ((s5-4 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as process-focusable s4-2) root root-prim prim-core)) + (-> (the-as process-focusable s4-2) root root-prim prim-core world-sphere) (-> gp-1 trans) ) ) @@ -2040,22 +2040,21 @@ (s3-0 (-> gp-0 path node (-> gp-0 prev-pos))) (s4-0 (new 'stack-no-clear 'inline-array 'vector 1)) ) - (let ((f30-1 (vector-segment-distance-point! (-> self trans) (the-as vector s3-0) (the-as vector s5-0) (-> s4-0 0))) - ) + (let ((f30-1 (vector-segment-distance-point! (-> self trans) (-> s3-0 position) (-> s5-0 position) (-> s4-0 0)))) (set! (-> gp-0 curr-pos) - (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (the-as vector s3-0) (-> s4-0 0)) - (vector-vector-distance (the-as vector s3-0) (the-as vector s5-0)) + (+ (the float (-> gp-0 prev-pos)) (/ (vector-vector-distance (-> s3-0 position) (-> s4-0 0)) + (vector-vector-distance (-> s3-0 position) (-> s5-0 position)) ) ) ) (let ((s3-1 (new 'stack-no-clear 'inline-array 'vector 2))) - (vector-! (-> s3-1 1) (the-as vector s5-0) (-> s4-0 0)) + (vector-! (-> s3-1 1) (-> s5-0 position) (-> s4-0 0)) (vector+float*! (-> s3-1 0) (-> s4-0 0) (-> s3-1 1) (lerp-scale 0.0 1.0 f30-1 122880.0 20480.0)) (send-event (handle->process (-> self scorp)) 'ai-set-target-position (-> s3-1 0)) ) ) (send-event (handle->process (-> self scorp)) 'ai-set-target-speed #x48700000) - (when (< (vector-vector-distance (the-as vector s5-0) (-> s4-0 0)) 40960.0) + (when (< (vector-vector-distance (-> s5-0 position) (-> s4-0 0)) 40960.0) (+! (-> gp-0 prev-pos) 1) (+! (-> gp-0 next-pos) 1) (when (>= (-> gp-0 next-pos) (the-as int (-> gp-0 path node-count))) @@ -2077,8 +2076,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> self path-info path node gp-1)) - (the-as vector (-> self path-info path node (+ gp-1 1))) + (-> self path-info path node gp-1 position) + (-> self path-info path node (+ gp-1 1) position) *color-red* #f (the-as rgba -1) @@ -2202,7 +2201,7 @@ ) (let ((f30-0 0.0)) (dotimes (s4-0 (the-as int (-> gp-0 path node-count))) - (let ((f0-0 (vector-vector-distance (target-pos 0) (the-as vector (-> gp-0 path node s4-0))))) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> gp-0 path node s4-0 position)))) (when (or (= s5-0 -1) (< f0-0 f30-0)) (set! s5-0 s4-0) (set! f30-0 f0-0) @@ -2269,8 +2268,8 @@ (add-debug-line #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 node s4-1)) - (the-as vector (-> s5-0 node (+ s4-1 1))) + (-> s5-0 node s4-1 position) + (-> s5-0 node (+ s4-1 1) position) *color-red* #f (the-as rgba -1) @@ -2284,7 +2283,7 @@ s2-1 (the-as bucket-id s1-1) *temp-string* - (the-as vector (-> s5-0 node s4-1)) + (-> s5-0 node s4-1 position) (font-color red) (the-as vector2h #f) ) @@ -2415,7 +2414,7 @@ (when v1-8 (let ((gp-0 (new 'stack-no-clear 'vector))) (if (send-event (handle->process v1-8) 'get-cam-info (-> self trans) gp-0) - (forward-up->inv-matrix (the-as matrix (-> self tracking)) gp-0 *y-vector*) + (forward-up->inv-matrix (-> self tracking inv-mat) gp-0 *y-vector*) ) ) ) diff --git a/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc index d8ad09f0142..696173c0a15 100644 --- a/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc @@ -149,13 +149,9 @@ ;; definition for method 15 of type hud-desert-lizards ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-desert-lizards)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) 3) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 45) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc b/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc index 1b03a82835c..11311d314ae 100644 --- a/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/oasis/ash-oasis-course_REF.gc @@ -227,7 +227,7 @@ :skip-to -1 :on-set (lambda ((arg0 ashelin-oasis)) (bot-method-223 arg0) - (move-to-point! (-> arg0 root) (the-as vector (-> arg0 course spots 0))) + (move-to-point! (-> arg0 root) (-> arg0 course spots 0 center)) (let ((v1-6 25)) (set! (-> arg0 hit-points) (the float v1-6)) (set! (-> arg0 enemy-info default-hit-points) (the float v1-6)) @@ -263,9 +263,9 @@ (logior! (-> arg0 bot-flags) (bot-flag bf06)) (logior! (-> arg0 bot-flags) (bot-flag bf20)) (let ((s5-0 (-> arg0 course spots))) - (vector-! (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 2)) (the-as vector (-> s5-0 1))) + (vector-! (the-as vector (-> arg0 frontline)) (-> s5-0 2 center) (-> s5-0 1 center)) (vector-normalize! (-> arg0 frontline) 1.0) - (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (the-as vector (-> s5-0 1))))) + (set! (-> arg0 frontline w) (- (vector-dot (the-as vector (-> arg0 frontline)) (-> s5-0 1 center)))) ) (set-frontline arg0) (let ((v1-23 (get-task-by-type (-> arg0 ai-ctrl) asht-wait-spot arg0))) diff --git a/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc index 2a15c1513b0..3f534777563 100644 --- a/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc @@ -741,7 +741,7 @@ (defmethod draw ((this hud-wasbbv-goal-time)) (local-vars (v1-7 int) (s5-0 int)) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) 70 ) @@ -777,8 +777,8 @@ (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f)) (s4-0 s3-0 s2-0 *temp-string*) ) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -40 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -40 -40) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc index 2f21ceed8c7..c67c9930426 100644 --- a/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/race/kleever-rider_REF.gc @@ -59,7 +59,7 @@ (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 y) (seconds-per-frame)) - (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 rvec))) (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) @@ -269,7 +269,7 @@ (set! (-> gp-0 vec2 z) (sin (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 w) (cos (-> gp-0 vec2 x))) (set! (-> gp-0 vec2 y) (seconds-per-frame)) - (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (the-as vector (-> gp-0 mat0)))) + (set! (-> gp-0 vec0 x) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 rvec))) (set! (-> gp-0 vec0 y) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 uvec))) (set! (-> gp-0 vec0 z) (vector-dot (-> gp-0 vec1) (-> gp-0 mat0 fvec))) (let ((f1-6 (+ (* 0.03 (-> gp-0 vec2 z)) (* -1.0 (-> gp-0 vec0 x) (-> self accel-factor x))))) diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/neo-satellite_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/neo-satellite_REF.gc index 7e518e263c0..ad80c7b63f3 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/neo-satellite_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/neo-satellite_REF.gc @@ -2436,7 +2436,7 @@ (let ((s5-0 (the-as neo-sat (handle->process (-> this parent-handle))))) (the-as vector (when (not (and (-> s5-0 next-state) (= (-> s5-0 next-state name) 'neo-sat-sit-and-spin))) (dotimes (s4-0 (-> this knots length)) - (let* ((f0-0 (neo-sat-method-218 s5-0 (the-as vector (-> this knots data s4-0)))) + (let* ((f0-0 (neo-sat-method-218 s5-0 (-> this knots data s4-0 pos))) (f0-1 (+ 614.4 f0-0)) ) (set! (-> this knots data s4-0 pos y) (fmax (-> this knots data s4-0 pos y) f0-1)) @@ -2467,9 +2467,7 @@ (when (and (-> this next-state) (= (-> this next-state name) 'neo-sat-sit-and-spin)) (let ((f30-1 (- (-> a1-3 y) (neo-sat-method-218 this a1-3)))) (dotimes (s2-0 (-> gp-1 knots length)) - (set! (-> gp-1 knots data s2-0 pos y) - (+ f30-1 (neo-sat-method-218 this (the-as vector (-> gp-1 knots data s2-0)))) - ) + (set! (-> gp-1 knots data s2-0 pos y) (+ f30-1 (neo-sat-method-218 this (-> gp-1 knots data s2-0 pos)))) (set! (-> gp-1 knots data s2-0 prev-pos y) (-> gp-1 knots data s2-0 pos y)) ) ) @@ -2564,7 +2562,7 @@ 0.0 (let ((f0-2 0.0)) (dotimes (a2-3 (-> a0-15 knots length)) - (vector+float*! (the-as vector (-> a0-15 knots data a2-3)) a1-3 v1-5 (* (the float a2-3) f0-2)) + (vector+float*! (-> a0-15 knots data a2-3 pos) a1-3 v1-5 (* (the float a2-3) f0-2)) (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> a0-15 knots data 0 prev-pos)) (* a2-3 64)))) (-> a0-15 knots data a2-3 pos quad) ) @@ -2893,7 +2891,7 @@ ;; definition for function spt-func-part-neo-sat-shockwave-hot (defun spt-func-part-neo-sat-shockwave-hot ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) - (sparticle-height-set arg0 arg1 (the-as vector arg2)) + (sparticle-height-set arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -3796,7 +3794,7 @@ (s3-0 (new 'stack-no-clear 'collide-query)) ) (vector-copy! (-> s3-0 start-pos) (-> v1-18 pos)) - (vector-! (-> s3-0 move-dist) (the-as vector a0-8) (the-as vector v1-18)) + (vector-! (-> s3-0 move-dist) (-> a0-8 pos) (-> v1-18 pos)) (let ((v1-19 s3-0)) (set! (-> v1-19 radius) 40.96) (set! (-> v1-19 collide-with) (collide-spec jak player-list)) diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc index ecae94f24d5..433f6c30747 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/rope-prim-system_REF.gc @@ -62,11 +62,11 @@ (vector-copy! sv-112 (-> this knots data s5-0 pos)) (cond ((< s5-0 (+ (-> this knots length) -1)) - (vector-! sv-116 (the-as vector (-> this knots data (+ s5-0 1))) sv-112) - (set! sv-136 (vector-vector-distance sv-112 (the-as vector (-> this knots data (+ s5-0 1))))) + (vector-! sv-116 (-> this knots data (+ s5-0 1) pos) sv-112) + (set! sv-136 (vector-vector-distance sv-112 (-> this knots data (+ s5-0 1) pos))) ) (else - (vector-! sv-116 sv-112 (the-as vector (-> this knots data (+ s5-0 -1)))) + (vector-! sv-116 sv-112 (-> this knots data (+ s5-0 -1) pos)) ) ) (let ((f0-7 (/ f30-0 (-> this uv-repeat-dist)))) @@ -213,7 +213,7 @@ (call-parent-method this) (let ((v1-1 (handle->process (-> this proc)))) (vector<-cspace! - (the-as vector (-> this knots data)) + (-> this knots data 0 pos) (-> (the-as process-drawable v1-1) node-list data (-> this info joint-info-array 0 joint-index)) ) ) @@ -245,14 +245,14 @@ ) (s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as process-drawable s4-0) - node-list - data - (-> this info joint-info-array 0 joint-index) - bone - transform - ) - ) + (-> (the-as process-drawable s4-0) + node-list + data + (-> this info joint-info-array 0 joint-index) + bone + transform + rvec + ) 1.0 ) ) @@ -279,7 +279,7 @@ (a0-15 (-> this knots data s5-2)) (s2-1 (new 'stack-no-clear 'vector)) ) - (vector-! s2-1 (the-as vector a0-15) (the-as vector v1-18)) + (vector-! s2-1 (-> a0-15 pos) (-> v1-18 pos)) (vector-normalize! s2-1 1.0) (let ((s3-1 (-> this joint-mods data s5-2))) (let ((s1-0 matrix-u-f-compose) diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/rope-system_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/rope-system_REF.gc index ba92499e99c..99058075ccf 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/rope-system_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/rope-system_REF.gc @@ -100,13 +100,13 @@ (let* ((s1-0 (-> this knot-constraints data s5-0)) (s4-0 (-> this knots data s5-0)) (s3-0 (-> this knots data (+ s5-0 1))) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-0) (the-as vector s4-0))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 pos) (-> s4-0 pos))) ) 0.0 (vector-normalize-ret-len! s2-1 1.0) (let ((f30-0 (-> this knot-constraints data s5-0 length))) - (vector-normalize! (the-as vector s1-0) 1.0) - (let ((f0-3 (vector-dot s2-1 (the-as vector s1-0)))) + (vector-normalize! (-> s1-0 dir) 1.0) + (let ((f0-3 (vector-dot s2-1 (-> s1-0 dir)))) (when (< f0-3 0.999) (let ((s0-0 (new 'stack-no-clear 'vector))) 0.0 @@ -128,7 +128,7 @@ ) ) ) - (vector-cross! s0-0 s2-1 (the-as vector s1-0)) + (vector-cross! s0-0 s2-1 (-> s1-0 dir)) (vector-normalize! s0-0 1.0) (vector-rotate-around-axis! s2-1 (the-as quaternion s2-1) f28-0 s0-0) ) @@ -136,7 +136,7 @@ (if (< s5-0 (+ (-> this knot-constraints length) -1)) (set! (-> this knot-constraints data (+ s5-0 1) dir quad) (-> s2-1 quad)) ) - (vector+float*! (the-as vector s3-0) (the-as vector s4-0) s2-1 f30-0) + (vector+float*! (-> s3-0 pos) (-> s4-0 pos) s2-1 f30-0) ) ) ) @@ -179,13 +179,13 @@ (let* ((s1-0 (-> this knot-constraints data s5-0)) (s3-0 (-> this knots data s5-0)) (s2-0 (-> this knots data (+ s5-0 1))) - (s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-0) (the-as vector s3-0))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> s2-0 pos) (-> s3-0 pos))) ) 0.0 (vector-normalize-ret-len! s4-1 1.0) (let ((f30-0 (-> this knot-constraints data s5-0 length))) - (vector-normalize! (the-as vector s1-0) 1.0) - (let ((f0-3 (vector-dot s4-1 (the-as vector s1-0)))) + (vector-normalize! (-> s1-0 dir) 1.0) + (let ((f0-3 (vector-dot s4-1 (-> s1-0 dir)))) (when (< f0-3 0.999) (let ((s0-0 (new 'stack-no-clear 'vector))) 0.0 @@ -207,7 +207,7 @@ ) ) ) - (vector-cross! s0-0 s4-1 (the-as vector s1-0)) + (vector-cross! s0-0 s4-1 (-> s1-0 dir)) (vector-normalize! s0-0 1.0) (let* ((f0-7 (-> this knots data s5-0 mass)) (f2-3 (-> this knots data (+ s5-0 1) mass)) @@ -234,8 +234,8 @@ (.mov vf2 v1-41) ) ) - (.add.x.vf vf1 vf0 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.add.x.vf.w vf1 vf0 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> sv-256 quad) vf1) (add-debug-line #f (bucket-id debug) s1-1 sv-368 *color-red* #f (the-as rgba -1)) (vector-rotate-around-axis! sv-240 (the-as quaternion sv-240) f24-0 s0-0) @@ -298,9 +298,9 @@ (a0-42 s3-0) (f0-11 f30-0) ) - (vector+float*! v1-49 (the-as vector a0-42) sv-240 f0-11) + (vector+float*! v1-49 (-> a0-42 pos) sv-240 f0-11) ) - (vector+float*! s1-1 (the-as vector s2-0) sv-256 f30-0) + (vector+float*! s1-1 (-> s2-0 pos) sv-256 f30-0) (let ((s0-3 add-debug-text-3d)) (set! sv-272 (the-as symbol #f)) (set! sv-288 583) @@ -335,14 +335,14 @@ (s0-4 sv-320 (the-as bucket-id sv-336) a2-11 a3-10 (the-as font-color t0-8) (the-as vector2h t1-6)) ) ) - (vector-lerp! (the-as vector s3-0) (the-as vector s3-0) s1-1 f28-0) + (vector-lerp! (-> s3-0 pos) (-> s3-0 pos) s1-1 f28-0) ) (let ((t9-25 vector-lerp!) (a0-51 s2-0) (a1-24 s2-0) (a3-12 f26-0) ) - (t9-25 (the-as vector a0-51) (the-as vector a1-24) sv-368 a3-12) + (t9-25 (-> a0-51 pos) (-> a1-24 pos) sv-368 a3-12) ) ) ) @@ -361,14 +361,7 @@ (t0-9 6) (t1-7 #f) ) - (s1-2 - s0-5 - (the-as bucket-id sv-384) - a2-14 - (the-as vector a3-13) - (the-as font-color t0-9) - (the-as vector2h t1-7) - ) + (s1-2 s0-5 (the-as bucket-id sv-384) a2-14 (-> a3-13 pos) (the-as font-color t0-9) (the-as vector2h t1-7)) ) ) (let ((s1-3 add-debug-text-3d) @@ -386,29 +379,22 @@ (t0-10 6) (t1-8 #f) ) - (s1-3 - s0-6 - (the-as bucket-id sv-416) - a2-15 - (the-as vector a3-14) - (the-as font-color t0-10) - (the-as vector2h t1-8) - ) + (s1-3 s0-6 (the-as bucket-id sv-416) a2-15 (-> a3-14 pos) (the-as font-color t0-10) (the-as vector2h t1-8)) ) ) - (vector-! s4-1 (the-as vector s2-0) (the-as vector s3-0)) + (vector-! s4-1 (-> s2-0 pos) (-> s3-0 pos)) (vector-normalize! s4-1 1.0) - (rope-system-method-16 this (the-as vector s3-0) (the-as vector s2-0) s5-0) + (rope-system-method-16 this (-> s3-0 pos) (-> s2-0 pos) s5-0) (when (< s5-0 (+ (-> this knot-constraints length) -1)) (cond ((logtest? (-> this flags) (rope-system-flag rs4)) (vector-lerp! - (the-as vector (-> this knot-constraints data (+ s5-0 1))) - (the-as vector (-> this knot-constraints data (+ s5-0 1))) + (-> this knot-constraints data (+ s5-0 1) dir) + (-> this knot-constraints data (+ s5-0 1) dir) s4-1 (* (-> this angular-mass-seek-rate) (seconds-per-frame)) ) - (vector-normalize! (the-as vector (-> this knot-constraints data (+ s5-0 1))) 1.0) + (vector-normalize! (-> this knot-constraints data (+ s5-0 1) dir) 1.0) ) (else (let ((v1-78 (-> this knot-constraints data (+ s5-0 1)))) @@ -432,11 +418,11 @@ (dotimes (s5-0 (+ (-> this knots length) -1)) (let* ((s4-0 (-> this knots data s5-0)) (s3-0 (-> this knots data (+ s5-0 1))) - (s2-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector s3-0) (the-as vector s4-0))) + (s2-1 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 pos) (-> s4-0 pos))) ) 0.0 (vector-normalize-ret-len! s2-1 1.0) - (vector+float*! (the-as vector s3-0) (the-as vector s4-0) s2-1 (-> this knot-constraints data s5-0 length)) + (vector+float*! (-> s3-0 pos) (-> s4-0 pos) s2-1 (-> this knot-constraints data s5-0 length)) ) ) #f @@ -477,7 +463,7 @@ (let ((a1-0 (-> this knots data s5-0)) (a2-0 (-> this knots data (+ s5-0 1))) ) - (rope-system-method-16 this (the-as vector a1-0) (the-as vector a2-0) s5-0) + (rope-system-method-16 this (-> a1-0 pos) (-> a2-0 pos) s5-0) ) ) #f @@ -538,11 +524,7 @@ (defmethod rope-system-method-23 ((this rope-system)) (dotimes (s5-0 (-> this knot-constraints length)) (let ((s4-0 (-> this knot-constraints data s5-0))) - (vector-! - (-> s4-0 dir) - (the-as vector (-> this knots data (+ s5-0 1))) - (the-as vector (-> this knots data s5-0)) - ) + (vector-! (-> s4-0 dir) (-> this knots data (+ s5-0 1) pos) (-> this knots data s5-0 pos)) (set! (-> s4-0 length) (vector-normalize-ret-len! (-> s4-0 dir) 1.0)) ) ) diff --git a/test/decompiler/reference/jak3/levels/desert/rescue/wland-passenger_REF.gc b/test/decompiler/reference/jak3/levels/desert/rescue/wland-passenger_REF.gc index 1ba91084a06..c00de73f41d 100644 --- a/test/decompiler/reference/jak3/levels/desert/rescue/wland-passenger_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/rescue/wland-passenger_REF.gc @@ -543,9 +543,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> t2-0 quad) vf6) ) (let ((a2-1 arg0)) @@ -558,9 +558,9 @@ ) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-1 quad) vf6) ) ) @@ -574,9 +574,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -970,7 +970,7 @@ (let ((v1-14 (-> this nav)) (a1-10 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-10 vertex)) arg0 (the-as vector (-> v1-14 state mesh bounds))) + (vector-! (-> a1-10 vertex 0) arg0 (the-as vector (-> v1-14 state mesh bounds))) (set! (-> a1-10 vertex1 x) (-> v1-14 nearest-y-threshold)) (set! (-> a1-10 data 20) (the-as uint 2)) (if (nav-mesh-method-45 (-> v1-14 state mesh) a1-10) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc index 61c7fd4d816..6d1ea85ce89 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc @@ -69,7 +69,7 @@ ) (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) (when (>= f30-0 0.0) - (vector+float*! (the-as vector (-> gp-0 vec)) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (vector+float*! (-> gp-0 vec 0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) (vector-copy! (-> gp-0 vec 1) (-> gp-0 cquery best-other-tri normal)) (when (< (-> gp-0 vec 1 y) (cos 3640.889)) (vector-reset! (-> gp-0 vec 1)) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc index c89598a0e12..9983cfd9a68 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc @@ -253,20 +253,20 @@ ) (set! (-> s5-1 1 rvec quad) (-> (the-as process-drawable s4-0) root trans quad)) (vector+float*! - (the-as vector (-> s5-1 1)) - (the-as vector (-> s5-1 1)) + (-> s5-1 1 rvec) + (-> s5-1 1 rvec) (-> s5-1 2 uvec) (* (cos (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) ) (vector+float*! - (the-as vector (-> s5-1 1)) - (the-as vector (-> s5-1 1)) + (-> s5-1 1 rvec) + (-> s5-1 1 rvec) (-> s5-1 2 fvec) (* (sin (-> s5-1 3 uvec x)) (-> s5-1 3 uvec y)) ) - (when (nav-mesh-method-11 (-> this nav-mesh) (the-as vector (-> s5-1 1))) - (when (nav-mesh-method-12 (-> this nav-mesh) (the-as vector (-> s5-1 1)) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) - (when (or (= (vector-vector-distance-squared (the-as vector (-> s5-1 1)) (-> s5-1 1 uvec)) 0.0) + (when (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 rvec)) + (when (nav-mesh-method-12 (-> this nav-mesh) (-> s5-1 1 rvec) 40960.0 (the-as nav-poly (-> s5-1 1 uvec))) + (when (or (= (vector-vector-distance-squared (-> s5-1 1 rvec) (-> s5-1 1 uvec)) 0.0) (nav-mesh-method-11 (-> this nav-mesh) (-> s5-1 1 uvec)) ) (let ((s4-5 (new 'stack-no-clear 'cquery-with-5vec))) @@ -275,7 +275,7 @@ (vector-copy! (-> s4-5 cquery start-pos) (-> s4-5 vec 0)) (vector-reset! (-> s4-5 vec 1)) (set! (-> s4-5 vec 1 y) 1.0) - (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (the-as vector (-> s4-5 vec))) + (vector-! (-> s4-5 vec 2) (-> s5-1 2 trans) (-> s4-5 vec 0)) (set! (-> s4-5 vec 2 y) 0.0) (vector-normalize! (-> s4-5 vec 2) 1.0) (set-vector! (-> s4-5 cquery move-dist) 0.0 -614400.0 0.0 1.0) @@ -291,11 +291,11 @@ ) (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-5 cquery)))) (when (>= f30-0 0.0) - (vector+float*! (the-as vector (-> s4-5 vec)) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) + (vector+float*! (-> s4-5 vec 0) (-> s4-5 cquery start-pos) (-> s4-5 cquery move-dist) f30-0) (set! (-> s5-1 3 rvec quad) (-> s4-5 vec 0 quad)) (set! (-> s5-1 3 rvec w) 20480.0) (let ((f0-31 1024000.0)) - (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (the-as vector (-> s4-5 vec)))) + (when (or (< (* f0-31 f0-31) (vector-vector-distance-squared (-> s5-1 1 fvec) (-> s4-5 vec 0))) (not (sphere-in-view-frustum? (the-as sphere (-> s5-1 3)))) ) (vector-copy! (-> s4-5 vec 1) (-> s4-5 cquery best-other-tri normal)) @@ -304,7 +304,7 @@ (set! (-> s4-5 vec 1 y) 1.0) ) (forward-up-nopitch->quaternion (the-as quaternion (-> s5-1 2)) (-> s4-5 vec 2) (-> s4-5 vec 1)) - (spawn-unit this (the-as vector (-> s4-5 vec)) (the-as quaternion (-> s5-1 2))) + (spawn-unit this (-> s4-5 vec 0) (the-as quaternion (-> s5-1 2))) ) ) ) @@ -351,11 +351,11 @@ (vector-copy! (-> s5-1 0 fvec) (-> (the-as process-focusable v1-8) root transv)) (let ((f0-0 8192.0)) (.lvf vf1 (&-> (-> s5-1 0 fvec) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-14 vf1) (if (< f0-0 a0-14) (vector-copy! (-> s5-1 0 trans) (-> s5-1 0 fvec)) @@ -364,9 +364,9 @@ ) (set! (-> s5-1 0 trans y) 0.0) (vector-normalize! (-> s5-1 0 trans) 1.0) - (vector-rotate-around-y! (the-as vector (-> s5-1 1)) (-> s5-1 0 trans) 14563.556) + (vector-rotate-around-y! (-> s5-1 1 rvec) (-> s5-1 0 trans) 14563.556) (vector-rotate-around-y! (-> s5-1 1 uvec) (-> s5-1 0 trans) -14563.556) - (set! (-> s5-1 1 rvec w) (- (vector-dot (the-as vector (-> s5-1 1)) (-> s5-1 0 uvec)))) + (set! (-> s5-1 1 rvec w) (- (vector-dot (-> s5-1 1 rvec) (-> s5-1 0 uvec)))) (set! (-> s5-1 1 uvec w) (- (vector-dot (-> s5-1 1 uvec) (-> s5-1 0 uvec)))) (dotimes (s4-1 10) (let* ((s2-0 (handle->process (-> this units s4-1))) @@ -382,9 +382,9 @@ (set! (-> s5-1 0 rvec quad) (-> (the-as process-focusable s3-0) root trans quad)) (when (not (logtest? (-> (the-as process-focusable s3-0) draw status) (draw-control-status on-screen))) (let ((f0-8 614400.0)) - (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (the-as vector (-> s5-1 0)))) - (or (< (vector4-dot (the-as vector (-> s5-1 1)) (the-as vector (-> s5-1 0))) 0.0) - (< (vector4-dot (-> s5-1 1 uvec) (the-as vector (-> s5-1 0))) 0.0) + (when (or (and (< (* f0-8 f0-8) (vector-vector-distance-squared (-> s5-1 0 uvec) (-> s5-1 0 rvec))) + (or (< (vector4-dot (-> s5-1 1 rvec) (-> s5-1 0 rvec)) 0.0) + (< (vector4-dot (-> s5-1 1 uvec) (-> s5-1 0 rvec)) 0.0) ) ) (zero? (-> this target-count)) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc index f1ee551fc7a..0b1d6b83051 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc @@ -83,7 +83,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -92,7 +92,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -101,7 +101,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc index 953349a7bb2..238c17b78f2 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-marauder_REF.gc @@ -463,7 +463,7 @@ (setup-draw-masks this (the-as int (-> this info setup look-select))) (+! (-> this info setup look-select) 1) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc index d9358165c0c..bd942c39b1c 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc @@ -179,7 +179,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 17) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -188,7 +188,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -197,7 +197,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc index a3916fd6ffa..715c9111bb6 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc @@ -71,8 +71,8 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-15 quad) vf5) ) (sparticle-set-conerot s5-0 s3-2) @@ -348,9 +348,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (set! (-> *part-id-table* 980 init-specs 4 initial-valuef) (vector-length s5-1)) (draw-beam (-> *part-id-table* 980) a1-0 s5-1 #f) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc index 9b950c9d973..a12ac857c09 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc @@ -239,7 +239,7 @@ (init (-> this jmod-gun-kick) this (the-as uint 10) (joint-mod-base-flags attached trans)) (vector-copy! (-> this turret-local-pos) (new 'static 'vector :y 10485.76 :z 12288.0 :w 1.0)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 4) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc index f1e200901e2..c9fb5ebbc4c 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc @@ -175,7 +175,7 @@ ) ) (vector-copy! (-> gp-0 mat fvec) (-> gp-0 gun-local-dir)) - (vector-cross! (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) + (vector-cross! (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) (vector+float*! (-> gp-0 mat trans) (-> gp-0 gun-local-pos) (-> gp-0 gun-local-dir) -12288.0) (if (logtest? (-> *part-group-id-table* 227 flags) (sp-group-flag sp13)) (part-tracker-spawn @@ -304,7 +304,7 @@ (init (-> this jmod-gun-tilt) this (the-as uint 5) (joint-mod-base-flags attached trans quat)) (init (-> this jmod-gun-kick) this (the-as uint 6) (joint-mod-base-flags attached trans)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 7) (joint-mod-base-flags attached) @@ -314,7 +314,7 @@ (init (-> this jmod-axles 3) this (the-as uint 16) (joint-mod-base-flags attached)) (vector-copy! (-> this turret-local-pos) (new 'static 'vector :y 10485.76 :z -10240.0 :w 1.0)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 9) (joint-mod-base-flags attached) @@ -323,7 +323,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 12) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 20) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 10) (joint-mod-base-flags attached trans) @@ -332,7 +332,7 @@ (init (-> this jmod-shock-mids 2) this (the-as uint 13) (joint-mod-base-flags attached trans)) (init (-> this jmod-shock-mids 3) this (the-as uint 21) (joint-mod-base-flags attached trans)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-bots)) + (-> this jmod-shock-bots 0) this (the-as uint 11) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc index 1fad2ce38bd..8360453a28e 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc @@ -83,7 +83,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 17) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -92,7 +92,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -101,7 +101,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc index 535568ae32d..09977a54528 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc @@ -475,7 +475,7 @@ (set! (-> this rider-hand-joint-array 0) 14) (set! (-> this shoot-delay) (the-as uint 300)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -484,14 +484,14 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 10) (joint-mod-base-flags attached) ) (init (-> this jmod-shock-tops 1) this (the-as uint 12) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-bots)) + (-> this jmod-shock-bots 0) this (the-as uint 11) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc index 9ea7e3f4e64..9d8d219c857 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc @@ -164,8 +164,8 @@ (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) (set! (-> s5-1 mat trans x) (seconds-per-frame)) (vector-matrix*! (-> s5-1 mat uvec) (new 'static 'vector :y 20480.0 :z -8192.0 :w 1.0) (-> this rbody matrix)) - (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (the-as vector (-> s5-1 mat))) - (vector-! (-> s5-1 mat fvec) (the-as vector (-> s5-1 mat)) (-> this ant-tip-vel)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (-> s5-1 mat rvec)) + (vector-! (-> s5-1 mat fvec) (-> s5-1 mat rvec) (-> this ant-tip-vel)) (vector-copy! (-> this ant-tip-vel) (-> s5-1 mat rvec)) (vector-float*! (-> s5-1 mat fvec) (-> s5-1 mat fvec) (/ 1.0 (-> s5-1 mat trans x))) (vector+float*! @@ -191,11 +191,11 @@ ) (set! (-> this spring-pos y) 0.0) (.lvf vf1 (&-> (-> this spring-pos) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-33 vf1) (let ((f0-27 v1-33)) (when (< 1.0 f0-27) @@ -217,11 +217,11 @@ (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) (let ((f0-42 1.0)) (.lvf vf1 (&-> (-> s5-2 vec0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-47 vf1) (set! (-> s5-2 quat0 w) (sqrtf (- f0-42 v1-47))) ) @@ -232,11 +232,11 @@ (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) (let ((f0-49 1.0)) (.lvf vf1 (&-> (-> s5-2 vec0) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-52 vf1) (set! (-> s5-2 quat0 w) (sqrtf (- f0-49 v1-52))) ) @@ -260,7 +260,7 @@ (alloc-rbody-control! this *v-turtle-constants*) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -269,7 +269,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-antenna)) + (-> this jmod-antenna 0) this (the-as uint 9) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc index f6a5c530d53..688e035e3d6 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc @@ -83,7 +83,7 @@ (vector-copy! (-> this local-gun-pos 1) (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0)) (set! (-> this rider-hand-joint-array 0) 8) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 5) (joint-mod-base-flags attached) @@ -92,7 +92,7 @@ (init (-> this jmod-axles 2) this (the-as uint 4) (joint-mod-base-flags attached)) (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + (-> this jmod-shock-tops 0) this (the-as uint 11) (joint-mod-base-flags attached) @@ -101,7 +101,7 @@ (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) ((method-of-type joint-mod-set-local init) - (the-as joint-mod-set-local (-> this jmod-shock-mids)) + (-> this jmod-shock-mids 0) this (the-as uint 12) (joint-mod-base-flags attached trans) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc index 0cf8cdf5c3f..7daaae5a79f 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc @@ -3867,17 +3867,12 @@ (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) ) - (vector-matrix*! (the-as vector (-> s5-0 vec0)) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) + (vector-matrix*! (-> s5-0 vec0 0) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) 0 (vector-copy! (-> s5-0 vec0 2) (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0)) (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (- (-> s5-0 vec0 7 y) (-> s5-0 vec0 7 x))) - (vector+float*! - (-> s5-0 vec0 1) - (the-as vector (-> s5-0 vec0)) - (-> s5-0 vec0 3) - (+ 16384.0 (-> s5-0 vec0 7 x)) - ) + (vector+float*! (-> s5-0 vec0 1) (-> s5-0 vec0 0) (-> s5-0 vec0 3) (+ 16384.0 (-> s5-0 vec0 7 x))) (let ((s4-0 (new 'stack 'boxed-array collide-shape 128))) (set! (-> s4-0 length) (fill-actor-list-for-sphere *actor-hash* @@ -3903,7 +3898,7 @@ ) (when a0-14 (vector-copy! (-> s5-0 vec0 6) (get-trans a0-14 3)) - (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (the-as vector (-> s5-0 vec0))) + (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (-> s5-0 vec0 0)) (matrix-transpose! (-> s5-0 mat1) (-> s5-0 mat0)) (vector-matrix*! (-> s5-0 vec0 2) (-> s5-0 vec0 5) (-> s5-0 mat1)) (set! (-> s5-0 vec0 2 x) 0.0) @@ -4121,7 +4116,7 @@ (vector-copy! (-> s5-1 vec1 1) (-> s5-1 vec0 9)) (set! (-> s5-1 vec1 1 x) (* (-> s5-1 vec1 1 x) (-> s3-1 x-scale))) (set! (-> s5-1 vec1 0 x) (* (-> s5-1 vec1 0 x) (-> s3-1 x-scale))) - (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (the-as vector (-> s5-1 vec1))) + (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (-> s5-1 vec1 0)) (set! (-> s5-1 float2) (- (-> s5-1 vec0 8 data s4-1) (* (atan (-> s5-1 vec1 2 x) (-> s5-1 vec1 2 y)) (-> s3-1 x-scale))) ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc index d1c4821a786..e7021048cb0 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-ai_REF.gc @@ -127,11 +127,11 @@ (f0-13 (* f0-11 f0-11)) ) (.lvf vf1 (&-> (-> gp-0 mat trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-50 vf1) (if (< f0-13 v1-50) (vector-copy! (-> gp-0 force) (-> gp-0 mat trans)) @@ -153,7 +153,7 @@ (set! (-> gp-0 ground-normal-sum y) 0.0) (set! (-> gp-0 ground-pos y) 0.0) (set! (-> gp-0 wsphere z) (nearest-dist2-between-moving-points - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 mat fvec) (-> gp-0 mat trans) @@ -167,7 +167,7 @@ (vector+float*! (-> gp-0 p-body) (-> gp-0 ground-normal-sum) (-> gp-0 ground-pos) 0.0) (vector-! (-> gp-0 world-normal) (-> gp-0 axis) (-> gp-0 p-body)) (vector-normalize! (-> gp-0 world-normal) 1.0) - (vector+float*! (-> gp-0 velocity) (the-as vector (-> gp-0 mat)) (-> gp-0 world-normal) 163840.0) + (vector+float*! (-> gp-0 velocity) (-> gp-0 mat rvec) (-> gp-0 world-normal) 163840.0) (set! (-> gp-0 wheel-axis x) (/ (-> gp-0 wheel-axis x) 2)) 0 ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc index a25a84e38f7..9f5bc69c02d 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc @@ -28,7 +28,7 @@ ;; definition for method 15 of type hud-vehicle-turbo ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-vehicle-turbo)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (* -100.0 (-> this offset))) 336) + (set-hud-piece-position! (-> this sprites 0) (the int (* -100.0 (-> this offset))) 336) (let* ((f0-5 (the float (the int (-> *game-info* vehicle-turbo-ready)))) (f0-7 (* 120.0 (fmax 0.33 f0-5))) (v1-5 (-> *game-info* race-number-turbos)) @@ -48,10 +48,10 @@ ) ) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 32 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 32 0) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 32 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 1 pos) 32 0) (dotimes (s5-0 3) - (set-as-offset-from! (-> this sprites (+ s5-0 3)) (the-as vector4w (-> this sprites s5-0)) 0 0) + (set-as-offset-from! (-> this sprites (+ s5-0 3)) (-> this sprites s5-0 pos) 0 0) ) ((method-of-type hud draw) this) 0 diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc index 0f31cbf9690..7ffaacfdfb2 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc @@ -426,12 +426,12 @@ (-> (the-as wvehicle-physics-work arg1) ground-pos) (-> sv-16 position) ) - (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (-> arg1 probe-work-array))) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (-> arg1 probe-work-array 0 local-pos)) (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) (set! (-> arg1 probe-work-array 0 world-normal z) (/ (/ (-> s1-2 side-vel) -2) - (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (-> arg1 probe-work-array)) (-> arg1 normal)))) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (-> arg1 probe-work-array 0 local-pos) (-> arg1 normal)))) ) ) (set! (-> arg1 probe-work-array 0 world-normal w) 0.0) @@ -469,7 +469,7 @@ ) (vector-float*! (-> arg1 force) - (the-as vector (-> arg1 probe-work-array)) + (-> arg1 probe-work-array 0 local-pos) (-> arg1 probe-work-array 0 world-normal z) ) (vector+float*! @@ -572,11 +572,11 @@ (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) (let ((f0-27 0.0)) (.lvf vf1 (&-> (-> gp-0 ground-normal-sum) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-51 vf1) (if (= f0-27 v1-51) (set! (-> gp-0 ground-normal-sum y) 1.0) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc index deb71c587c8..4f6d07a899a 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-race_REF.gc @@ -66,13 +66,13 @@ (set! (-> s3-0 velocity x) 819200.0) (quaternion-copy! (the-as quaternion (-> s3-0 force)) (-> s5-0 path-sample quat)) (vector-float*! (-> s3-0 mat fvec) (-> s5-0 lin-velocity) f28-0) - (vector-! (-> s3-0 mat trans) (the-as vector (-> s5-0 path-sample)) (-> s4-0 position)) + (vector-! (-> s3-0 mat trans) (-> s5-0 path-sample pos) (-> s4-0 position)) (.lvf vf1 (&-> (-> s3-0 mat trans) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-23 vf1) (let ((f0-6 v1-23) (f1-5 1.0) @@ -90,26 +90,26 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) - (vector-! (the-as vector (-> s3-0 mat)) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) - (vector-float*! (the-as vector (-> s3-0 mat)) (the-as vector (-> s3-0 mat)) 16.0) + (vector-! (-> s3-0 mat rvec) (-> s3-0 mat fvec) (-> s4-0 lin-velocity)) + (vector-float*! (-> s3-0 mat rvec) (-> s3-0 mat rvec) 16.0) (let* ((v1-31 (-> s3-0 mat)) (f0-10 (-> s3-0 velocity x)) (f0-12 (* f0-10 f0-10)) ) (.lvf vf1 (&-> v1-31 rvec quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-32 vf1) (if (< f0-12 v1-32) - (vector-normalize! (the-as vector (-> s3-0 mat)) (-> s3-0 velocity x)) + (vector-normalize! (-> s3-0 mat rvec) (-> s3-0 velocity x)) ) ) (let ((a1-10 (-> s4-0 lin-velocity))) @@ -122,9 +122,9 @@ ) (.lvf vf4 (&-> v1-36 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-10 quad) vf6) ) (let ((a1-11 (-> s4-0 position))) @@ -137,9 +137,9 @@ ) (.lvf vf4 (&-> v1-37 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-11 quad) vf6) ) (quaternion-pseudo-seek @@ -286,18 +286,18 @@ (let ((f0-35 (+ (-> s4-0 path-t) (* 1.875 (/ 1.0 (-> gp-0 vec13 z)) (-> gp-0 vec13 y))))) (race-path-method-11 (-> s4-0 path) (-> gp-0 sample) (-> gp-0 vec12) f0-35) ) - (vector-! (-> gp-0 vec6) (the-as vector (-> s4-0 path-sample)) (-> gp-0 vec0)) + (vector-! (-> gp-0 vec6) (-> s4-0 path-sample pos) (-> gp-0 vec0)) (let* ((f0-36 (-> gp-0 float5)) (f1-24 1.0) (f2-8 40960.0) (f1-25 (/ f1-24 (* f2-8 f2-8))) ) (.lvf vf1 (&-> (-> gp-0 vec6) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-90 vf1) (set! (-> gp-0 float5) (+ f0-36 (* f1-25 v1-90))) ) @@ -320,9 +320,9 @@ ) (.lvf vf4 (&-> v1-94 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-20 quad) vf6) ) (vector-! (-> gp-0 vec7) (-> gp-0 vec5) (-> gp-0 vec1)) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc index 1087478e79d..f0d2b26eb7b 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc @@ -333,7 +333,7 @@ ;; definition for method 171 of type wvehicle ;; WARN: Return type mismatch int vs none. (defmethod wvehicle-method-171 ((this wvehicle) (arg0 vector) (arg1 int)) - (vector-matrix*! arg0 (the-as vector (-> this info rider attach-point-array arg1)) (-> this rbody matrix)) + (vector-matrix*! arg0 (-> this info rider attach-point-array arg1 local-pos) (-> this rbody matrix)) 0 (none) ) @@ -556,19 +556,19 @@ (f0-1 (* f0-0 (* f1-0 f1-0))) ) (.lvf vf1 (&-> (-> this rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-8 vf1) (when (and (< v1-8 f0-1) (begin (.lvf vf1 (&-> (-> this rbody lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f1-4 v1-13) (f2-0 614.4) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc index ec12ca33a52..2f1e2a81b1a 100644 --- a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc @@ -243,11 +243,11 @@ (f1-2 16384.0) ) (.lvf vf1 (&-> a0-18 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-19 vf1) (< a0-19 (* f1-2 f1-2)) ) @@ -255,11 +255,11 @@ (f1-5 4.0) ) (.lvf vf1 (&-> a0-22 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-23 vf1) (< a0-23 (* f1-5 f1-5)) ) @@ -360,15 +360,14 @@ ) (set! (-> this engine-rpm) (-> s4-0 mat uvec x)) (set! (-> s4-0 mat uvec w) (the-as float (current-time))) - (vector-! (the-as vector (-> s4-0 mat)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (vector-! (-> s4-0 mat rvec) (-> this rbody lin-velocity) (-> this surface-velocity)) (when (not (logtest? (-> this v-flags) (vehicle-flag in-air))) - (let ((f0-12 (* (/ (fmax 0.0 (vector-dot (the-as vector (-> s4-0 mat)) (-> this rbody matrix fvec))) - (-> this avg-drive-wheel-radius) - ) - (-> this gear-ratio) - (-> this final-drive-ratio) - ) - ) + (let ((f0-12 + (* (/ (fmax 0.0 (vector-dot (-> s4-0 mat rvec) (-> this rbody matrix fvec))) (-> this avg-drive-wheel-radius)) + (-> this gear-ratio) + (-> this final-drive-ratio) + ) + ) ) (set! (-> s4-0 mat uvec y) (* 9.549297 f0-12)) ) @@ -468,7 +467,7 @@ (s4-0 (new 'stack-no-clear 'matrix)) ) (set! (-> s4-0 rvec z) (-> this controls throttle)) - (set! (-> s4-0 uvec x) (vector-dot (the-as vector (-> this rbody matrix)) (-> this rbody ang-velocity))) + (set! (-> s4-0 uvec x) (vector-dot (-> this rbody matrix rvec) (-> this rbody ang-velocity))) (set! (-> s4-0 rvec w) (-> this rbody matrix fvec y)) (set! (-> s4-0 uvec y) (+ (-> s4-0 rvec w) (* -1.0 (-> s4-0 uvec x)))) (if (and (< (cos 12743.111) (-> s4-0 rvec w)) @@ -717,7 +716,7 @@ (s5-0 (new 'stack-no-clear 'inline-array 'matrix 2)) ) (set! (-> s5-0 0 trans z) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) - (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (the-as vector (-> this rbody matrix)))) + (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix rvec))) (set! (-> s5-0 0 trans y) (/ (* 2.0 (fabs (-> s5-0 0 trans w))) (fmax 409.6 (-> s5-0 0 trans z)))) (set! (-> s5-0 0 trans x) (/ (-> s4-0 handling tire-steering-speed-factor) @@ -890,11 +889,11 @@ ;; WARN: Return type mismatch symbol vs none. (defmethod alloc-rbody-control! ((this wvehicle) (arg0 rigid-body-object-constants)) (let ((s4-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) - (vector-y-quaternion! (the-as vector (-> s4-0 0)) (-> this root quat)) + (vector-y-quaternion! (-> s4-0 0 vec) (-> this root quat)) (vector+float*! (-> this root trans) (-> this root trans) - (the-as vector (-> s4-0 0)) + (-> s4-0 0 vec) (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) ) (quaternion-axis-angle! diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc index 9a1a5678db7..23f79438bf8 100644 --- a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-effects_REF.gc @@ -18,7 +18,7 @@ (fmax 0.0 (* (-> this power-level) (-> this force-scale) (-> this engine-thrust))) ) (set! (-> s5-0 work vec0 w) (-> this fog-fade)) - (quaternion-rotate-local-z! (the-as quaternion (-> s5-0 work)) (-> this root quat) 5461.3335) + (quaternion-rotate-local-z! (-> s5-0 work quat0) (-> this root quat) 5461.3335) (dotimes (s4-0 2) (vector-matrix*! (-> s5-0 vec0) (-> this info particles thruster-local-pos s4-0) (-> s5-0 mat)) (vehicle-draw-thruster (-> this info particle-common) (the-as vehicle-draw-thruster-params (-> s5-0 work))) diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc index 16e360893d6..8e885273ad0 100644 --- a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-physics_REF.gc @@ -92,9 +92,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) @@ -146,11 +146,11 @@ (logclear! (-> this v-flags) (vehicle-flag in-air)) (logior! (-> this v-flags) (vehicle-flag on-flight-level)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-78 vf1) (if (= v1-78 0.0) (set! (-> s1-1 ground-normal y) 1.0) @@ -260,11 +260,11 @@ (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-75 0.0)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-177 vf1) (< f0-75 v1-177) ) @@ -378,7 +378,7 @@ (quaternion->matrix (the-as matrix (-> s1-1 1)) (the-as quaternion (-> s1-1 0))) (vector-copy! (-> gp-0 dir) (-> s1-1 2)) ) - (let ((f0-14 (vector-dot (the-as vector (-> gp-0 mat)) (-> gp-0 dir)))) + (let ((f0-14 (vector-dot (-> gp-0 mat rvec) (-> gp-0 dir)))) (set! sv-1040 (* (-> s4-0 info mass) (-> s4-0 extra gravity))) (let ((f1-11 f0-14)) (set! sv-1044 (+ (* f1-11 f1-11 f0-14) (* 0.075 (vector-dot (-> gp-0 mat fvec) (-> s5-0 ang-velocity))))) @@ -437,7 +437,7 @@ (set! f0-35 (* f0-35 (-> s4-0 handling air-steering-factor))) ) (vector+float*! (-> gp-0 world-pos) (-> s5-0 position) (-> gp-0 mat fvec) 7782.4) - (vector-float*! (-> gp-0 force) (the-as vector (-> gp-0 mat)) (* 2.0 f0-35)) + (vector-float*! (-> gp-0 force) (-> gp-0 mat rvec) (* 2.0 f0-35)) ) ) (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc index 4c97620c910..a2913a843b7 100644 --- a/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle-util_REF.gc @@ -50,7 +50,7 @@ (vector-reset! (-> gp-0 mat fvec)) (cond ((logtest? (-> this flags) (vehicle-controller-flag on-straightaway)) - (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-pos) (-> this turn-enter-point) (-> gp-0 mat rvec)) (let ((f0-5 (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)))) (vector+float*! (-> gp-0 force) (-> this turn-enter-point) (-> this turn-enter-dir) (- f0-5)) (vector-copy! (-> gp-0 velocity) (-> this turn-enter-dir)) @@ -60,11 +60,11 @@ (when (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) (let ((f1-4 (* 0.5 (/ 1.0 (-> this turn-accel))))) (.lvf vf1 (&-> arg1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-24 vf1) (let ((f2-2 v1-24) (f3-1 (-> this max-turn-speed)) @@ -81,7 +81,7 @@ (if (not (logtest? (-> this flags) (vehicle-controller-flag no-slowing-for-turns))) (set! (-> gp-0 dir x) (fmin (-> gp-0 dir x) (-> this max-turn-speed))) ) - (vector-! (-> gp-0 world-pos) (the-as vector (-> gp-0 mat)) (-> this dest-circle)) + (vector-! (-> gp-0 world-pos) (-> gp-0 mat rvec) (-> this dest-circle)) (vector-normalize! (-> gp-0 world-pos) 1.0) (set! (-> gp-0 velocity x) (- (-> gp-0 world-pos z))) (set! (-> gp-0 velocity y) 0.0) @@ -92,7 +92,7 @@ (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> this dest-circle w)) (vector+! (-> gp-0 force) (-> this dest-circle) (-> gp-0 world-pos)) (when (logtest? (-> this flags) (vehicle-controller-flag attached)) - (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 steering-axis) (-> this turn-exit-point) (-> gp-0 mat rvec)) (when (and (< (vector-dot (-> this turn-exit-dir) (-> gp-0 steering-axis)) 0.0) (>= (vector-dot (-> this turn-exit-dir) (-> gp-0 mat trans)) (cos 8192.0)) ) @@ -117,7 +117,7 @@ ) (countdown (s4-1 (fill-actor-list-for-sphere (-> this traffic object-hash) - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (* 1.5 f30-1) s3-1 @@ -134,13 +134,13 @@ (when (and v1-70 (not (logtest? (-> v1-70 v-flags) (vehicle-flag dead))) (nonzero? (-> v1-70 flight-level-index))) (vector-copy! (-> gp-0 lift-dir) (-> v1-70 root trans)) (vector-copy! (-> gp-0 normal) (-> v1-70 root transv)) - (vector-! (-> gp-0 tmp) (the-as vector (-> gp-0 mat)) (-> gp-0 lift-dir)) + (vector-! (-> gp-0 tmp) (-> gp-0 mat rvec) (-> gp-0 lift-dir)) (.lvf vf1 (&-> (-> gp-0 tmp) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a0-35 vf1) (let ((f1-12 a0-35)) (vector-float*! (-> gp-0 axis) (-> gp-0 tmp) (/ 1.0 (sqrtf f1-12))) @@ -170,7 +170,7 @@ ) (when (< (cos 8192.0) (- (vector-dot (-> gp-0 mat trans) (-> gp-0 axis)))) (when (< (nearest-dist2-between-moving-points - (the-as vector (-> gp-0 mat)) + (-> gp-0 mat rvec) (-> gp-0 mat uvec) (-> gp-0 lift-dir) (-> gp-0 normal) @@ -192,13 +192,13 @@ ) ) (when (not (logtest? (-> this flags) (vehicle-controller-flag ignore-others))) - (vector-! (-> gp-0 world-pos) (-> gp-0 force) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-pos) (-> gp-0 force) (-> gp-0 mat rvec)) (.lvf vf1 (&-> (-> gp-0 world-pos) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-87 vf1) (let ((f0-39 v1-87)) (logclear! (-> this flags) (vehicle-controller-flag off-path)) @@ -226,7 +226,7 @@ ) (cond ((logtest? (-> this flags) (vehicle-controller-flag direct-mode)) - (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-normal) (-> this turn-exit-point) (-> gp-0 mat rvec)) (vector-normalize! (-> gp-0 world-normal) (-> gp-0 dir x)) (vector-! (-> gp-0 world-pos) (-> gp-0 world-normal) (-> gp-0 mat uvec)) (vector-float*! (-> gp-0 world-pos) (-> gp-0 world-pos) 3.0) @@ -237,11 +237,11 @@ ) ) (else - (vector+float*! (-> gp-0 local-pos) (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) 0.4) + (vector+float*! (-> gp-0 local-pos) (-> gp-0 mat rvec) (-> gp-0 mat uvec) 0.4) (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-enter-point)) (cond ((< (vector-dot (-> gp-0 world-pos) (-> this turn-enter-dir)) 0.0) - (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (the-as vector (-> gp-0 mat))) + (vector-! (-> gp-0 world-normal) (-> this turn-enter-point) (-> gp-0 mat rvec)) ) ((begin (vector-! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> this turn-exit-point)) diff --git a/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc index 9fab0dbed66..77ca2a31ca0 100644 --- a/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc @@ -143,11 +143,11 @@ (>= (-> this rbody matrix uvec y) (cos 910.2222)) ) (.lvf vf1 (&-> (-> this rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f0-1 v1-13) (f1-0 0.5) @@ -165,19 +165,19 @@ (f0-4 (* f0-3 (* f1-3 f1-3))) ) (.lvf vf1 (&-> (-> this rbody ang-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-25 vf1) (when (and (< v1-25 f0-4) (begin (.lvf vf1 (&-> (-> this rbody lin-velocity) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-30 vf1) (let ((f1-7 v1-30) (f2-0 614.4) @@ -580,11 +580,11 @@ (cond ((logtest? (vehicle-flag camera-rapid-tracking-mode) (-> this v-flags)) (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-14 vf1) (let ((f0-1 v1-14) (f1-2 122880.0) @@ -599,11 +599,11 @@ (f0-4 (* f0-2 f0-2)) ) (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-24 vf1) (if (< f0-4 v1-24) (vehicle-method-86 this) @@ -899,9 +899,7 @@ ) (else (let ((f1-3 - (* 0.000024414063 - (vector-dot (the-as vector (-> this node-list data 0 bone transform)) (-> this target-acceleration)) - ) + (* 0.000024414063 (vector-dot (-> this node-list data 0 bone transform rvec) (-> this target-acceleration))) ) ) (+! (-> this controls steering) (* 0.1 (- f1-3 (-> this controls steering)))) @@ -1060,7 +1058,7 @@ (set! (-> s5-0 velocity x) (get-inv-mass arg0)) (init-rbody-impact-from-tshape! this (the-as rigid-body-impact (-> s5-0 mat)) arg1) (if (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) - (rigid-body-control-method-23 (-> this rbody) (the-as vector (-> s5-0 mat)) (-> s5-0 mat fvec)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 mat rvec) (-> s5-0 mat fvec)) (vector-copy! (-> s5-0 mat fvec) (-> this root transv)) ) (let ((v1-17 (-> arg0 root))) @@ -1110,7 +1108,7 @@ (impulse-handler this) (let ((a2-4 (new 'stack-no-clear 'vector))) (vector-float*! a2-4 (-> s5-0 mat uvec) (* -1.0 (-> s5-0 mat trans x))) - (apply-impact! (-> this rbody) (the-as vector (-> s5-0 mat)) a2-4) + (apply-impact! (-> this rbody) (-> s5-0 mat rvec) a2-4) ) (rigid-body-control-method-12 (-> this rbody) 1.0) (init-velocities! (-> this rbody)) @@ -1121,11 +1119,11 @@ (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-75 prim1 cprim prim-core world-sphere quad)) (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-75 prim2 cprim prim-core world-sphere quad)) ) - (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 mat)) *color-blue*) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 mat rvec) *color-blue*) (add-debug-vector #t (bucket-id debug-no-zbuf1) - (the-as vector (-> s5-0 mat)) + (-> s5-0 mat rvec) (-> s5-0 mat uvec) (-> s5-0 mat trans x) *color-blue* diff --git a/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc index db9021ff687..3bf0b54d0cb 100644 --- a/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc @@ -376,7 +376,7 @@ (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) ) ((method-of-type joint-mod-rotate-local init) - (the-as joint-mod-rotate-local (-> this jmod-axles)) + (-> this jmod-axles 0) this (the-as uint 14) (joint-mod-base-flags attached) diff --git a/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc b/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc index 1799d13389d..06c17cbec82 100644 --- a/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/conveyor_REF.gc @@ -235,8 +235,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-0 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> this collide-bounds r))) @@ -278,8 +278,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-1 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> this collide-bounds r))) @@ -311,15 +311,15 @@ (.lvf vf1 (&-> this collide-bounds quad)) (.lvf vf2 (&-> a0-9 prim-core world-sphere quad)) (.sub.vf vf3 vf1 vf2) - (.add.w.vf vf4 vf1 vf2 :mask #b1000) - (.mul.vf vf3 vf3 vf3 :mask #b111) - (.mul.w.vf vf4 vf4 vf4 :mask #b1000) - (.mul.x.vf acc vf0 vf3 :mask #b1000) - (.add.mul.y.vf acc vf0 vf3 acc :mask #b1000) - (.add.mul.z.vf vf3 vf0 vf3 acc :mask #b1000) - (.sub.w.vf vf3 vf3 vf4 :mask #b1000) + (.add.w.vf.w vf4 vf1 vf2) + (.mul.vf.xyz vf3 vf3 vf3) + (.mul.w.vf.w vf4 vf4 vf4) + (.mul.x.vf.w acc vf0 vf3) + (.add.mul.y.vf.w acc vf0 vf3 acc) + (.add.mul.z.vf.w vf3 vf0 vf3 acc) + (.sub.w.vf.w vf3 vf3 vf4) (let ((f0-2 0.0)) - (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.add.w.vf.x vf3 vf0 vf3) (.mov a0-10 vf3) (let ((s4-0 (-> v1-23 process))) (b! (< f0-2 a0-10) cfg-27) @@ -388,7 +388,7 @@ (set! (-> this leading quad) (-> s2-1 0 pull-dir quad)) (set! (-> this leading y) 0.0) (vector-normalize! (-> this leading) 1.0) - (set! (-> this leading w) (- (vector-dot (the-as vector (-> s2-1 0)) (the-as vector (-> this leading))))) + (set! (-> this leading w) (- (vector-dot (-> s2-1 0 start) (the-as vector (-> this leading))))) ) (let ((f0-19 (/ 1.0 (the float s4-0))) (f30-0 0.0) diff --git a/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc index b4ed2344a7e..73207d93a7a 100644 --- a/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/fac-gunturret_REF.gc @@ -501,7 +501,7 @@ (vector-flatten! s4-0 s4-0 (-> this init-mat uvec)) (vector-normalize! s4-0 1.0) (set! (-> this desired-twist) - (atan (vector-dot (the-as vector (-> this init-mat)) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) + (atan (vector-dot (-> this init-mat rvec) s4-0) (vector-dot (-> this init-mat fvec) s4-0)) ) (cond (#t @@ -834,9 +834,9 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-2 quad) vf6) ) (vector-float*! s4-0 *up-vector* (* 4096.0 (rand-vu-float-range 20.0 30.0))) @@ -850,9 +850,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (let ((a0-8 (-> s5-0 fountain-rand-transv-hi))) @@ -863,9 +863,9 @@ (.lvf vf5 (&-> v1-5 quad)) ) (.lvf vf4 (&-> s4-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc index 12e53f4816e..abfca673c54 100644 --- a/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/fac-robotank-turret_REF.gc @@ -621,7 +621,7 @@ (format 0 "Fix Los control update~%") ) (if *target* - (look-at! (-> *target* neck) (the-as vector (-> self root root-prim prim-core)) 'attacking self) + (look-at! (-> *target* neck) (-> self root root-prim prim-core world-sphere) 'attacking self) ) (set! (-> self aim-pos 0 quad) (-> self aim-pos 1 quad)) (vector-copy! (-> self aim-pos 1) (get-trans gp-0 0)) @@ -629,7 +629,7 @@ (s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-l 0)))) ) (let ((v1-24 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> self gun-joint-r 0))))) - (vector-! s5-2 (-> self aim-pos 1) (the-as vector (-> self aim-pos))) + (vector-! s5-2 (-> self aim-pos 1) (-> self aim-pos 0)) (vector-float*! s5-2 s5-2 (* 0.8 (-> self clock frames-per-second))) (set! (-> s5-2 y) 0.0) (vector+! s5-2 (-> self aim-pos 1) s5-2) diff --git a/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc index 414d9f4b491..f51bd46bf73 100644 --- a/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/fac-robotank_REF.gc @@ -466,8 +466,8 @@ (quaternion-rotate-local-x! s4-2 s4-2 f30-4) ) ) - (vector-orient-by-quat! (the-as vector (-> self pov-cam-offset)) (-> self pov-cam-offset 1) s4-2) - (vector+! (the-as vector (-> self pov-cam-offset)) (the-as vector (-> self pov-cam-offset)) s3-4) + (vector-orient-by-quat! (-> self pov-cam-offset 0) (-> self pov-cam-offset 1) s4-2) + (vector+! (-> self pov-cam-offset 0) (-> self pov-cam-offset 0) s3-4) ) ) ) @@ -711,9 +711,9 @@ ) (.lvf vf4 (&-> a1-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-17 quad) vf6) ) (vector-float*! v1-34 *up-vector* 81920.0) @@ -727,9 +727,9 @@ ) (.lvf vf4 (&-> a0-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-14 quad) vf6) ) (let ((a1-12 (-> s5-3 fountain-rand-transv-hi))) @@ -740,9 +740,9 @@ (.lvf vf5 (&-> a0-21 quad)) ) (.lvf vf4 (&-> v1-34 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-12 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc b/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc index bbc0b66dd56..29bc3987f34 100644 --- a/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/fac-tower_REF.gc @@ -661,8 +661,8 @@ ) (set! (-> s3-0 quad) (-> s2-0 fvec quad)) (set! (-> s3-0 y) 0.0) - (vector-normalize! (the-as vector s3-0) 1.0) - (vector-rotate-around-axis! (the-as vector s3-0) s3-0 (-> this pitch) (-> s2-0 rvec)) + (vector-normalize! (-> s3-0 vec) 1.0) + (vector-rotate-around-axis! (-> s3-0 vec) s3-0 (-> this pitch) (-> s2-0 rvec)) (let ((a0-11 s4-0)) (let ((v1-11 s5-0)) (let ((a1-5 409600.0)) @@ -671,9 +671,9 @@ (.lvf vf5 (&-> s3-0 quad)) (.lvf vf4 (&-> v1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-11 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc index 6d19fa41dda..2b8358a7629 100644 --- a/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factory-boss-setup_REF.gc @@ -767,8 +767,8 @@ (.mov at-0 f0-6) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-22 quad) vf1) ) (vector-copy! (-> self root transv) (-> self pre-move-transv)) @@ -2241,14 +2241,10 @@ ;; definition for method 15 of type hud-factory-boss ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-factory-boss)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 0 0) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 0 0) (let ((f30-0 (* 25.0 (the float (- 4 (-> this values 0 current)))))) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 8 67) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 8 67) (set! (-> this sprites 5 scale-x) (* 0.164 f30-0)) (cond ((< 50.0 f30-0) @@ -2271,9 +2267,9 @@ ) ) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 9 66) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -51 66) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 4 66) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 9 66) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) -51 66) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 4 66) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc index b600a5e5256..5fbf991ffd5 100644 --- a/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factory-hud_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-factory-damage ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-factory-damage)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -71 -5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -71 -5) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-4)))) @@ -51,7 +47,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc index a139257cb85..cb6a008f143 100644 --- a/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factory-manager_REF.gc @@ -707,9 +707,9 @@ ) (.lvf vf4 (&-> a0-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-4 quad) vf6) ) (let ((a1-2 s5-0)) @@ -722,9 +722,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (let ((s3-0 (new 'stack-no-clear 'vector))) @@ -852,11 +852,11 @@ ) (let ((f0-22 0.0)) (.lvf vf1 (&-> s2-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-64 vf1) (if (>= f0-22 v1-64) (vector-reset! s3-0) @@ -942,9 +942,9 @@ ) (.lvf vf4 (&-> a0-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-9 quad) vf6) ) (let ((a1-1 s5-0)) @@ -957,17 +957,17 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (.lvf vf1 (&-> gp-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-12 vf1) v1-12 (vector-! gp-0 (get-trans *target* 3) s5-0) @@ -1104,9 +1104,9 @@ ) (.lvf vf4 (&-> a1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-1 quad) vf6) ) (let ((a2-2 v1-1)) @@ -1119,9 +1119,9 @@ ) (.lvf vf4 (&-> a0-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) (let ((a2-3 (-> gp-0 fountain-rand-transv-lo))) @@ -1134,9 +1134,9 @@ ) (.lvf vf4 (&-> a0-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-3 quad) vf6) ) (let ((a1-5 (-> gp-0 fountain-rand-transv-hi))) @@ -1147,9 +1147,9 @@ (.lvf vf5 (&-> a0-4 quad)) ) (.lvf vf4 (&-> v1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) ) @@ -1570,9 +1570,9 @@ ) (.lvf vf4 (&-> a0-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-20 quad) vf6) ) ) @@ -1586,9 +1586,9 @@ ) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (let ((a0-9 (-> gp-0 fountain-rand-transv-hi))) @@ -1599,9 +1599,9 @@ (.lvf vf5 (&-> v1-22 quad)) ) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-9 quad) vf6) ) ) @@ -1984,13 +1984,13 @@ ((= *fac-wave* 2) (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-tower-01 factoryb-minimap))) (set! (-> this sprites 0 angle) 16384.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 455 225) + (set-hud-piece-position! (-> this sprites 0) 455 225) (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) ) (else (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-fac-target-01 factoryb-minimap))) (set! (-> this sprites 0 angle) 0.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 488 225) + (set-hud-piece-position! (-> this sprites 0) 488 225) (set-hud-piece-position! (the-as hud-sprite (-> this strings 0 pos)) 488 257) ) ) diff --git a/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc b/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc index 921a4d95c81..d9685aead28 100644 --- a/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factory-part_REF.gc @@ -619,7 +619,7 @@ ;; definition for function spt-func-fact-torch (defun spt-func-fact-torch ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (live-func-curve arg0 arg1 (the-as vector arg2)) + (live-func-curve arg0 arg1 (-> arg2 launchrot)) (spt-func-relative-pos arg0 arg1 (the-as sprite-vec-data-3d arg2)) (sparticle-torch-spline-align arg0 arg1 (the-as sprite-vec-data-2d arg2)) (none) @@ -834,7 +834,3 @@ (defpart 2959 :init-specs ((:fade-b 1.3653333)) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc b/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc index a4a4254e91c..c28e518a0cb 100644 --- a/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/factoryc-obs2_REF.gc @@ -351,8 +351,8 @@ (.lvf vf1 (&-> s4-1 quad)) (.lvf vf2 (&-> s3-1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (if (< (the int v1-10) 0) (vector-negate-in-place! s4-1) @@ -523,8 +523,8 @@ (.lvf vf1 (&-> s4-1 quad)) (.lvf vf2 (&-> s3-1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (if (< (the int v1-10) 0) (vector-negate-in-place! s4-1) @@ -744,8 +744,8 @@ (.lvf vf1 (&-> s4-1 quad)) (.lvf vf2 (&-> s3-1 quad)) (.mul.vf vf1 vf1 vf2) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov v1-10 vf1) (if (< (the int v1-10) 0) (vector-negate-in-place! s4-1) @@ -1457,10 +1457,7 @@ ) ) (when (time-elapsed? (-> self no-collision-timer) (-> *TARGET-bank* hit-invulnerable-timeout)) - (let ((s4-1 - (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> self node-list data 3 bone transform))) - ) - ) + (let ((s4-1 (vector-negate! (new 'stack-no-clear 'vector) (-> self node-list data 3 bone transform rvec)))) (set! (-> s4-1 y) 0.0) (vector-xz-normalize! s4-1 1.0) (when (send-event diff --git a/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc index 6ad338420f1..f0843caf571 100644 --- a/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/ffight-projectile_REF.gc @@ -379,9 +379,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 2851 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 2851 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc index 242728146c3..b8d80fe3d97 100644 --- a/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/ftank-projectile_REF.gc @@ -306,9 +306,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 2866 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 2866 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc index c9548450175..4bc3f907af6 100644 --- a/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/fturret-projectile_REF.gc @@ -417,9 +417,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 2878 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 2878 init-specs 4 initial-valuef) (vector-length s5-1)) diff --git a/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc b/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc index 66af01496b2..e5e020ec546 100644 --- a/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/h-warf_REF.gc @@ -1087,9 +1087,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) @@ -1184,11 +1184,11 @@ (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-107 vf1) (< f0-54 v1-107) ) @@ -1338,10 +1338,10 @@ (when (and (< 0.0 (-> this rbody matrix uvec y)) (and (logtest? (-> this v-flags) (vehicle-flag riding)) (not (-> this bounce-state?))) ) - (vector-! (the-as vector (-> s2-2 mat)) (-> this root trans) *h-warf-center-of-level*) + (vector-! (-> s2-2 mat rvec) (-> this root trans) *h-warf-center-of-level*) (set! (-> s2-2 mat rvec y) 0.0) - (vector-normalize! (the-as vector (-> s2-2 mat)) 1.0) - (set! (-> s2-2 world-pos x) (h-warf-method-163 this (the-as vector (-> s2-2 mat)))) + (vector-normalize! (-> s2-2 mat rvec) 1.0) + (set! (-> s2-2 world-pos x) (h-warf-method-163 this (-> s2-2 mat rvec))) (set! (-> s2-2 world-normal x) (-> s2-2 world-pos x)) (vector-reset! s3-0) (vector+! s3-0 s3-0 (-> this info info cm-offset-joint)) @@ -1544,7 +1544,7 @@ (vector-normalize! s3-1 1.0) (vector-float*! s4-0 - (the-as vector (-> this rbody matrix)) + (-> this rbody matrix rvec) (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-3) ) ) @@ -1777,9 +1777,9 @@ ) (.lvf vf4 (&-> v1-18 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (set! (-> *part-id-table* 2761 init-specs 11 initial-valuef) diff --git a/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc index 79f5007b7ef..9ec0a3c055d 100644 --- a/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/lfaccity-mood_REF.gc @@ -241,7 +241,7 @@ (dotimes (s4-0 (-> this particles length)) (cond ((-> this particles data s4-0 inited?) - (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (the-as vector (-> this particles data s4-0)) s5-0)) + (let ((v1-6 (vector-matrix*! (new 'stack-no-clear 'vector) (-> this particles data s4-0 original-pos) s5-0)) (a1-4 (-> this actor-group 0 data s4-0 actor)) ) (when a1-4 diff --git a/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc b/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc index ac524d40473..a989fc00fa8 100644 --- a/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/lfacrm1-mood_REF.gc @@ -49,9 +49,9 @@ (set! (-> a1-0 0 dir2 extra x) 0.0) (set! (-> a1-0 0 ambi extra x) 0.3) (light-group-lerp! - (the-as light-group a1-0) + (-> a1-0 0) (the-as (pointer light-group) a1-0) - (the-as light-group a2-1) + (-> a2-1 0) (-> (the-as lfacrm1-states v1-0) door-current-interp) ) ) @@ -70,9 +70,9 @@ (else (let ((gp-0 (the-as object (-> arg0 state)))) (vector4-lerp! - (the-as vector (-> arg0 times)) - (the-as vector (-> arg0 times)) - (the-as vector (-> *level* level-default mood-context times)) + (-> arg0 times 0) + (-> arg0 times 0) + (-> *level* level-default mood-context times 0) (-> (the-as lfacrm1-states gp-0) door-current-interp) ) (set! (-> arg0 times 1 w) 1.0) diff --git a/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc b/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc index c1df0d8d122..fac43668c0f 100644 --- a/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/missile-bot_REF.gc @@ -377,11 +377,11 @@ (f0-6 (* f0-4 f0-4)) ) (.lvf vf1 (&-> s1-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a2-3 vf1) (vector+float*! v1-10 a0-11 a1-7 (sqrtf (- f0-6 a2-3))) ) @@ -395,11 +395,11 @@ (let ((f0-13 (* -0.5 (vector-vector-distance arg0 s4-0)))) (set! (-> s2-3 y) 0.0) (.lvf vf1 (&-> s2-3 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-22 vf1) (let ((f1-3 v1-22) (f2-0 20480.0) @@ -906,7 +906,7 @@ (update! (-> this main-wobble) a1-4) ) ) - (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this main-wobble)) 1.0))) + (let ((a2-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this main-wobble value) 1.0))) (quaternion-from-two-vectors! (-> this main-jm quat) (new 'static 'vector :y 1.0) a2-5) ) (let ((t9-13 (method-of-type nav-enemy enemy-common-post))) @@ -958,10 +958,7 @@ ((zero? v1-85) (vector<-cspace! s5-1 (-> this node-list data 3)) (+! (-> s5-1 y) 8192.0) - (let ((v0-33 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble)) 819.2) - ) - ) + (let ((v0-33 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 0 value) 819.2))) (vector+! s5-1 s5-1 v0-33) ) (set! sv-304 s4-0) @@ -985,10 +982,7 @@ (vector-normalize! s5-1 4096.0) (vector+! s5-1 s5-1 s2-0) (+! (-> s5-1 y) 4096.0) - (let ((v0-36 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 1)) 819.2) - ) - ) + (let ((v0-36 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 1 value) 819.2))) (vector+! s5-1 s5-1 v0-36) ) (set! sv-304 s4-0) @@ -1012,10 +1006,7 @@ (vector-normalize! s5-1 4096.0) (vector+! s5-1 s5-1 s1-0) (+! (-> s5-1 y) 4096.0) - (let ((v0-39 - (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> this lightning-wobble 2)) 819.2) - ) - ) + (let ((v0-39 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this lightning-wobble 2 value) 819.2))) (vector+! s5-1 s5-1 v0-39) ) (set! sv-304 s4-0) diff --git a/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc b/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc index 5e9c5a732d9..2ef765e8f38 100644 --- a/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc +++ b/test/decompiler/reference/jak3/levels/factory/warf-projectile_REF.gc @@ -466,9 +466,9 @@ (.lvf vf5 (&-> a0-4 quad)) ) (.lvf vf4 (&-> v1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (vector-normalize! s5-1 1.0) (warf-projectile-method-42 this s3-0) @@ -1130,9 +1130,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-0 quad) vf6) (gun-warf-shot-method-41 this a1-0 s4-1) (vector-normalize! s4-1 1.0) @@ -1227,9 +1227,9 @@ ) (.lvf vf5 (&-> a2-1 quad)) (.lvf vf4 (&-> v1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) (spawn (-> this part) a1-1) ) diff --git a/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc b/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc index 194975f91f0..f9623950a5f 100644 --- a/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/for-turret-shot_REF.gc @@ -394,9 +394,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s4-0 quad) vf6) (let ((f28-0 (-> *part-id-table* 1065 init-specs 4 initial-valuef))) (set! (-> *part-id-table* 1065 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) diff --git a/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc b/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc index d097cacbcdd..656f4f7a98a 100644 --- a/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/for-turret_REF.gc @@ -107,9 +107,9 @@ (dotimes (v1-3 30) (set! (-> this sprites v1-3 color w) (the int (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp)))) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 44 0) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 44 44) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 44 0) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 44 44) (set! sv-80 (* 0.5 (- 1.0 (-> this offset)) (-> this fade-interp))) (let ((v1-8 (new 'stack-no-clear 'vector))) (set! (-> v1-8 x) 255.0) @@ -140,22 +140,22 @@ (set! (-> a0-23 color quad) (-> sv-92 quad)) ) ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 13 6) - (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) 25 10) - (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) 34 19) - (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites)) 39 32) - (set-as-offset-from! (-> this sprites 8) (the-as vector4w (-> this sprites)) 39 47) - (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites)) 34 59) - (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites)) 25 67) - (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites)) 13 71) - (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites)) -1 71) - (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites)) -14 67) - (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites)) -22 59) - (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites)) -27 47) - (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites)) -27 32) - (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites)) -22 19) - (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites)) -14 10) - (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites)) -1 6) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 13 6) + (set-as-offset-from! (-> this sprites 5) (-> this sprites 0 pos) 25 10) + (set-as-offset-from! (-> this sprites 6) (-> this sprites 0 pos) 34 19) + (set-as-offset-from! (-> this sprites 7) (-> this sprites 0 pos) 39 32) + (set-as-offset-from! (-> this sprites 8) (-> this sprites 0 pos) 39 47) + (set-as-offset-from! (-> this sprites 9) (-> this sprites 0 pos) 34 59) + (set-as-offset-from! (-> this sprites 10) (-> this sprites 0 pos) 25 67) + (set-as-offset-from! (-> this sprites 11) (-> this sprites 0 pos) 13 71) + (set-as-offset-from! (-> this sprites 12) (-> this sprites 0 pos) -1 71) + (set-as-offset-from! (-> this sprites 13) (-> this sprites 0 pos) -14 67) + (set-as-offset-from! (-> this sprites 14) (-> this sprites 0 pos) -22 59) + (set-as-offset-from! (-> this sprites 15) (-> this sprites 0 pos) -27 47) + (set-as-offset-from! (-> this sprites 16) (-> this sprites 0 pos) -27 32) + (set-as-offset-from! (-> this sprites 17) (-> this sprites 0 pos) -22 19) + (set-as-offset-from! (-> this sprites 18) (-> this sprites 0 pos) -14 10) + (set-as-offset-from! (-> this sprites 19) (-> this sprites 0 pos) -1 6) (let ((f0-27 (the float (-> this values 1 current)))) (cond ((>= f0-27 100.0) @@ -197,15 +197,15 @@ ) ) ) - (set-as-offset-from! (-> this sprites 20) (the-as vector4w (-> this sprites)) 0 45) - (set-as-offset-from! (-> this sprites 22) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 24) (the-as vector4w (-> this sprites)) 2 44) - (set-as-offset-from! (-> this sprites 26) (the-as vector4w (-> this sprites)) 2 45) - (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites)) 0 14) - (set-as-offset-from! (-> this sprites 23) (the-as vector4w (-> this sprites)) 0 44) - (set-as-offset-from! (-> this sprites 25) (the-as vector4w (-> this sprites)) -30 44) - (set-as-offset-from! (-> this sprites 27) (the-as vector4w (-> this sprites)) -30 14) - (set-as-offset-from! (-> this sprites 29) (the-as vector4w (-> this sprites)) -26 18) + (set-as-offset-from! (-> this sprites 20) (-> this sprites 0 pos) 0 45) + (set-as-offset-from! (-> this sprites 22) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 24) (-> this sprites 0 pos) 2 44) + (set-as-offset-from! (-> this sprites 26) (-> this sprites 0 pos) 2 45) + (set-as-offset-from! (-> this sprites 21) (-> this sprites 0 pos) 0 14) + (set-as-offset-from! (-> this sprites 23) (-> this sprites 0 pos) 0 44) + (set-as-offset-from! (-> this sprites 25) (-> this sprites 0 pos) -30 44) + (set-as-offset-from! (-> this sprites 27) (-> this sprites 0 pos) -30 14) + (set-as-offset-from! (-> this sprites 29) (-> this sprites 0 pos) -26 18) (set! (-> this sprites 29 color x) 32) (set! (-> this sprites 29 color y) 230) (set! (-> this sprites 29 color z) 32) @@ -311,7 +311,7 @@ ) (set! sv-384 (the int (* -70.0 (sin sv-240)))) (let ((a3-36 (+ (the int (* -70.0 (cos sv-240))) 44))) - (s2-6 s1-2 (the-as vector4w s0-2) sv-384 a3-36) + (s2-6 s1-2 (-> s0-2 0 pos) sv-384 a3-36) ) ) (set! (-> this sprites 28 angle) (+ -8192.0 sv-240)) @@ -350,7 +350,7 @@ ) (('set-hud-pos) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as int (-> arg3 param 0)) (the-as int (+ (-> arg3 param 1) -4)) ) @@ -969,7 +969,7 @@ (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self aim-pos) (-> self muzzle-pos)))) (let ((s5-4 (joint-node for-turret-lod0-jg elevatebarrel))) (vector-normalize! gp-5 1.0) - (vector-flatten! gp-5 gp-5 (the-as vector (-> s5-4 bone transform))) + (vector-flatten! gp-5 gp-5 (-> s5-4 bone transform rvec)) ) (set! (-> self dest-rotx) (- (vector-x-angle gp-5))) ) diff --git a/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc index d68a245e262..079bc705d21 100644 --- a/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/forest-kill-plants_REF.gc @@ -34,9 +34,9 @@ ) ) ) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 8 2) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 2 pos) 40 16) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 2 pos) 1 16) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 2 pos) 8 2) (let ((f30-1 (the float (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127) @@ -49,7 +49,7 @@ ) (when (>= 10 (-> this values 0 current)) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites 3)) 20 62) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 3 pos) 20 62) ) ((method-of-type hud draw) this) 0 @@ -114,7 +114,7 @@ ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-green-eco-gauge)) (set-hud-piece-position! (-> this sprites 1) 256 (- 40 (the int (* 50.0 (-> this offset))))) - (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) -55 -5) + (set-as-offset-from! (-> this sprites 0) (-> this sprites 1 pos) -55 -5) (set! (-> this sprites 0 pos z) #xfffff1) (set! (-> this sprites 1 pos z) #xfffff2) (let ((f0-5 (if *target* diff --git a/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc index 3130a129008..ec888bd0b8d 100644 --- a/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/forest-part_REF.gc @@ -526,14 +526,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-10 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-10 conerot quad) vf1) (.mov v1-11 vf1) ) (else (.lvf vf1 (&-> v1-10 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-10 conerot quad) vf1) (.mov v1-12 vf1) ) @@ -568,14 +568,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-17 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-18 vf1) ) @@ -713,14 +713,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-10 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-10 conerot quad) vf1) (.mov v1-11 vf1) ) (else (.lvf vf1 (&-> v1-10 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-10 conerot quad) vf1) (.mov v1-12 vf1) ) @@ -781,14 +781,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-49 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-50 vf1) ) @@ -991,7 +991,7 @@ ;; definition for function spt-func-part-mh-plant-rebirth-rocks (defun spt-func-part-mh-plant-rebirth-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -2241,7 +2241,7 @@ ;; definition for function spt-func-part-for-statue-rise-rocks (defun spt-func-part-for-statue-rise-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-for-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -2301,7 +2301,7 @@ ;; definition for function spt-func-part-for-statue-rise-rocks-bounce1 (defun spt-func-part-for-statue-rise-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-for-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -2311,7 +2311,7 @@ (defun spt-func-for-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) diff --git a/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc index 61be0e9d769..9f9bceb2a90 100644 --- a/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/forest-ring-chase_REF.gc @@ -1365,13 +1365,9 @@ ;; definition for method 15 of type hud-forest-ring-chase ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-forest-ring-chase)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 150 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 150) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 55) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 5 55) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc index a2a8b2aac28..4b1296dd4ed 100644 --- a/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/forest-tasks_REF.gc @@ -4,15 +4,11 @@ ;; definition for method 15 of type hud-neo-spawners ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-neo-spawners)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -3 47) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -3 47) (format (clear (-> this strings 1 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) -5 45) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) -5 45) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc b/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc index 4bdca3724a6..fb14fb3afc7 100644 --- a/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/foresta-obs_REF.gc @@ -208,7 +208,7 @@ (-> arg1 quat) (quaternion-vector-angle! (the-as quaternion (new 'stack-no-clear 'vector)) - (the-as vector (-> (the-as for-log s4-0) shakers (the-as int s3-0))) + (-> (the-as for-log s4-0) shakers (the-as int s3-0) axis) (-> (the-as for-log s4-0) shakers (the-as int s3-0) shake) ) ) diff --git a/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc b/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc index eae04a3c5ae..46f9a88cd44 100644 --- a/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc +++ b/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc @@ -69,11 +69,11 @@ ) (('set-hud-pos) (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) + (-> this sprites 0) (the-as int (+ (-> arg3 param 0) -16)) (the-as int (-> arg3 param 1)) ) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 2 2) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) 2 2) (set! (-> this sprites 0 pos z) (the-as int (-> arg3 param 2))) (set! v0-0 (+ (-> this sprites 0 pos z) 1)) (set! (-> this sprites 1 pos z) (the-as int v0-0)) diff --git a/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc index cfed4fdce20..8a2a59dbb9f 100644 --- a/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/glider/glider-hud_REF.gc @@ -4,19 +4,10 @@ ;; definition for method 15 of type hud-glider-altitude ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-glider-altitude)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - 256 - (+ (the int (* 50.0 (-> this offset))) 376) - ) + (set-hud-piece-position! (-> this sprites 0) 256 (+ (the int (* 50.0 (-> this offset))) 376)) (set! (-> this sprites 0 pos z) #xfffff0) (let ((f0-4 (fmax 0.0 (fmin 1.0 (the-as float (-> this values 0 current)))))) - (set-as-offset-from! - (-> this sprites 1) - (the-as vector4w (-> this sprites)) - (+ (the int (* 120.0 f0-4)) -60) - 0 - ) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) (+ (the int (* 120.0 f0-4)) -60) 0) ) (set! (-> this sprites 1 pos z) #xfffff1) ((method-of-type hud draw) this) @@ -52,7 +43,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc index 06dc06befe0..1b507aae151 100644 --- a/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/glider/glider-manager_REF.gc @@ -1124,9 +1124,9 @@ ) (.lvf vf4 (&-> a1-13 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-2 quad) vf6) ) (set! (-> a0-42 w) (-> s5-1 pos w)) @@ -1503,9 +1503,9 @@ ) (.lvf vf4 (&-> v1-73 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-29 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc index 143ec4cc0de..13f98d3dd46 100644 --- a/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc +++ b/test/decompiler/reference/jak3/levels/glider/glider-ring_REF.gc @@ -514,9 +514,9 @@ ) (.lvf vf4 (&-> s5-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-1 quad) vf6) ) ) @@ -531,9 +531,9 @@ ) (.lvf vf4 (&-> s5-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-3 quad) vf6) ) ) @@ -568,7 +568,7 @@ (set! (-> self blinky-gone?) #t) ) (when (and (-> self shootable) (not (or (-> self shot) (-> self blinky-gone?)))) - (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (the-as cspace (-> self node-list data))))) + (let ((a1-10 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 0)))) (set! (-> *part-id-table* 2555 init-specs 10 initial-valuef) (the float (-> self center-joint))) (spawn (-> self blinky-part) a1-10) ) @@ -787,9 +787,9 @@ (.lvf vf5 (&-> v1-37 quad)) (.lvf vf4 (&-> a1-11 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-17 quad) vf6) ) (vector-copy! (-> self save-pos) (-> self root trans)) diff --git a/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc b/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc index e5a7ebdd886..a6096dd263a 100644 --- a/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc +++ b/test/decompiler/reference/jak3/levels/glider/h-glider_REF.gc @@ -725,9 +725,9 @@ ) (.lvf vf4 (&-> v1-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (rigid-body-control-method-23 s3-0 (-> s0-0 probe-pos) (-> s0-0 velocity)) @@ -822,11 +822,11 @@ (vector+! (-> s1-1 tire-force) (-> s1-1 tire-force) (-> arg1 force)) (when (and (< 0.0 (-> this info handling tire-friction-factor)) (let ((f0-54 0.0)) (.lvf vf1 (&-> (-> s1-1 ground-normal) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-107 vf1) (< f0-54 v1-107) ) @@ -931,11 +931,11 @@ (when (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) (begin (.lvf vf1 (&-> (-> this rbody lin-momentum) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-15 vf1) (= v1-15 0.0) ) @@ -1158,7 +1158,7 @@ (vector-normalize! s3-1 1.0) (vector-float*! s4-0 - (the-as vector (-> this rbody matrix)) + (-> this rbody matrix rvec) (* -512.0 (vector-dot (-> this rbody lin-velocity) s3-1) f30-4) ) ) @@ -1185,11 +1185,11 @@ ) (let ((f0-133 0.0)) (.lvf vf1 (&-> (-> this progression-plane) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-267 vf1) (if (and (< f0-133 v1-267) (< (vector-dot (-> this progression-plane) (-> this root trans)) (+ -4096.0 (-> this progression-plane w))) @@ -1346,11 +1346,11 @@ (cond (#f (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-2 vf1) (let ((f0-0 v1-2) (f1-0 122880.0) @@ -1365,11 +1365,11 @@ (f0-3 (* f0-1 f0-1)) ) (.lvf vf1 (&-> (-> this root transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-12 vf1) (if (< f0-3 v1-12) (vehicle-method-86 this) diff --git a/test/decompiler/reference/jak3/levels/gungame/gun-dummy-part_REF.gc b/test/decompiler/reference/jak3/levels/gungame/gun-dummy-part_REF.gc index f3cd740506d..8d6b1ddd62a 100644 --- a/test/decompiler/reference/jak3/levels/gungame/gun-dummy-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/gungame/gun-dummy-part_REF.gc @@ -772,7 +772,7 @@ (arg3 sparticle-launcher) (arg4 sparticle-launch-state) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 x-y-z-sx)) (check-drop-group-center arg0 arg1 (the-as sparticle-launchinfo arg2)) (spt-func-ground-spark-bounce arg0 arg1 arg2 arg3 arg4) (none) @@ -892,7 +892,3 @@ (:rotate-z (degrees 0) (degrees 3600)) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/gungame/gun-dummy_REF.gc b/test/decompiler/reference/jak3/levels/gungame/gun-dummy_REF.gc index 920fdafde48..5e1bb3ee523 100644 --- a/test/decompiler/reference/jak3/levels/gungame/gun-dummy_REF.gc +++ b/test/decompiler/reference/jak3/levels/gungame/gun-dummy_REF.gc @@ -458,9 +458,9 @@ (.lvf vf5 (&-> s3-4 quad)) (.lvf vf4 (&-> a1-23 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-63 quad) vf6) ) (let ((a0-65 (-> this root transv))) @@ -469,8 +469,8 @@ (.mov at-0 f0-50) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-65 quad) vf1) ) ) diff --git a/test/decompiler/reference/jak3/levels/gungame/gungame-manager_REF.gc b/test/decompiler/reference/jak3/levels/gungame/gungame-manager_REF.gc index 7783abe2f51..ecb83260a0d 100644 --- a/test/decompiler/reference/jak3/levels/gungame/gungame-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/gungame/gungame-manager_REF.gc @@ -1180,9 +1180,9 @@ (.lvf vf5 (&-> v1-5 quad)) ) (.lvf vf4 (&-> arg0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-1 quad) vf6) v0-1 ) diff --git a/test/decompiler/reference/jak3/levels/hiphog/hiphog-part_REF.gc b/test/decompiler/reference/jak3/levels/hiphog/hiphog-part_REF.gc index a0ceadc25ab..b1dfaeea94c 100644 --- a/test/decompiler/reference/jak3/levels/hiphog/hiphog-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/hiphog/hiphog-part_REF.gc @@ -1321,14 +1321,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1371,14 +1371,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1421,14 +1421,14 @@ ((< (-> gp-0 w) 0.0) (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-4 vf1) ) (else (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) (.lvf vf2 (&-> gp-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) (.mov v1-5 vf1) ) @@ -1715,7 +1715,3 @@ (:rotate-y (degrees 33.436)) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc index f997d9be68c..6476081a9bf 100644 --- a/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc +++ b/test/decompiler/reference/jak3/levels/mhcity/destroy-dark-eco_REF.gc @@ -28,13 +28,9 @@ ;; definition for method 15 of type hud-eco-egg ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-eco-egg)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) @@ -1501,9 +1497,9 @@ ) (.lvf vf4 (&-> s4-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) (let ((s2-1 s5-0)) @@ -1516,9 +1512,9 @@ ) (.lvf vf4 (&-> s4-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-1 quad) vf6) ) (let ((s2-2 s5-0)) @@ -1531,9 +1527,9 @@ ) (.lvf vf4 (&-> s4-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-2 quad) vf6) ) (let ((s2-3 gp-0)) @@ -1546,9 +1542,9 @@ ) (.lvf vf4 (&-> s4-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-3 quad) vf6) ) (let ((s2-4 gp-0)) @@ -1561,9 +1557,9 @@ ) (.lvf vf4 (&-> s4-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-4 quad) vf6) ) (let ((s2-5 gp-0)) @@ -1576,9 +1572,9 @@ ) (.lvf vf4 (&-> s4-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-5 quad) vf6) ) (set! sv-48 (process-spawn diff --git a/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc b/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc index 30345033af3..cf638af86f2 100644 --- a/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc @@ -2220,10 +2220,10 @@ (vector-! sv-1040 sv-692 sv-1024) (vector-normalize! sv-1040 f28-1) (let ((v1-64 sv-692)) - (.mov.vf vf6 vf0 :mask #b1000) + (.mov.vf.w vf6 vf0) (.lvf vf4 (&-> sv-1024 quad)) (.lvf vf5 (&-> sv-1040 quad)) - (.add.vf vf6 vf4 vf5 :mask #b111) + (.add.vf.xyz vf6 vf4 vf5) (.svf (&-> v1-64 quad) vf6) ) 0 @@ -2248,11 +2248,11 @@ (vector-reset! s2-1) (vector-reset! s1-1) (dotimes (s0-1 4) - (vector+! s2-1 s2-1 (the-as vector (-> gp-0 foot s0-1))) + (vector+! s2-1 s2-1 (-> gp-0 foot s0-1 ground-pos)) (when (> s0-1 0) (set! sv-1072 (vector-normalize! - (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> gp-0 foot s0-1)) (the-as vector (-> gp-0 foot))) + (vector-! (new 'stack-no-clear 'vector) (-> gp-0 foot s0-1 ground-pos) (-> gp-0 foot 0 ground-pos)) 1.0 ) ) @@ -2661,11 +2661,11 @@ (init-vf0-vector) (vector-copy! arg0 (-> this incoming attack-direction)) (.lvf vf1 (&-> arg0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-2 vf1) (when (= v1-2 0.0) (vector-z-quaternion! arg0 (-> this root quat)) @@ -3082,8 +3082,8 @@ (s4-3 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) ) (dotimes (s3-1 4) - (vector-orient-by-quat! s5-3 (the-as vector (-> *gekko-foot-offset* s3-1)) (-> this root quat)) - (vector+float*! (the-as vector (-> this foot s3-1)) (-> this root trans) s5-3 (-> this scale)) + (vector-orient-by-quat! s5-3 (-> *gekko-foot-offset* s3-1 ground-pos) (-> this root quat)) + (vector+float*! (-> this foot s3-1 ground-pos) (-> this root trans) s5-3 (-> this scale)) (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this foot 0 ground-normal)) (* 96 s3-1)))) (-> s4-3 quad) ) diff --git a/test/decompiler/reference/jak3/levels/mine/manta_REF.gc b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc index 158ea0b6afe..2116441fefa 100644 --- a/test/decompiler/reference/jak3/levels/mine/manta_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc @@ -1259,11 +1259,11 @@ ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod manta-method-195 ((this manta)) - (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (the-as vector (-> this move-matrix))))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this move-matrix rvec)))) (set! (-> s5-1 y) (-> this attack-y-offset)) (vector-normalize! s5-1 (-> this move-force)) (vector-copy! (-> this move-matrix fvec) s5-1) - (vector+! (-> this move-matrix uvec) (the-as vector (-> this move-matrix)) s5-1) + (vector+! (-> this move-matrix uvec) (-> this move-matrix rvec) s5-1) ) (vector-! (-> this move-matrix trans) (-> this focus-pos) (-> this move-matrix uvec)) (vector-normalize! (-> this move-matrix trans) 24576.0) @@ -1408,8 +1408,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-5 vf1) (let ((f0-1 a2-5) (f1-1 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) @@ -1449,8 +1449,8 @@ ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.add.y.vf.x vf1 vf1 vf1) + (.add.z.vf.x vf1 vf1 vf1) (.mov a2-12 vf1) (let ((f0-2 a2-12) (f1-5 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) @@ -1477,7 +1477,7 @@ (when (logtest? (the-as collide-spec s4-0) (-> v1-27 root-prim prim-core collide-as)) (when (!= v1-27 (-> this root)) (let* ((s2-1 - (vector-! (new 'stack-no-clear 'vector) (the-as vector s5-0) (the-as vector (-> v1-27 root-prim prim-core))) + (vector-! (new 'stack-no-clear 'vector) (-> s5-0 world-sphere) (-> v1-27 root-prim prim-core world-sphere)) ) (f0-3 (vector-length s2-1)) ) @@ -1504,10 +1504,7 @@ (defmethod manta-method-201 ((this manta) (arg0 float)) (let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 2))) (set! (-> gp-0 0 rvec quad) (-> this move-vel quad)) - (vector-normalize! - (the-as vector (-> gp-0 0)) - (vector-vector-distance (-> this dest-pos) (-> this root trans)) - ) + (vector-normalize! (-> gp-0 0 rvec) (vector-vector-distance (-> this dest-pos) (-> this root trans))) (let ((v1-2 (-> gp-0 1))) (set! (-> v1-2 rvec x) 0.0) (set! (-> v1-2 rvec y) 0.0) @@ -1534,7 +1531,7 @@ ) (vector-float*! (-> gp-0 0 fvec) (-> gp-0 0 uvec) 4.0) (vector-float*! (-> gp-0 0 trans) (-> gp-0 0 uvec) 0.5) - (vector-orient-by-quat! (-> gp-0 1 fvec) (the-as vector (-> gp-0 1)) (-> this root quat)) + (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 rvec) (-> this root quat)) (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 fvec)) (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 uvec) (-> this root quat)) diff --git a/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc index 1c1cfa21b72..ebae39e3153 100644 --- a/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc @@ -792,17 +792,17 @@ (let ((a2-7 v1-11)) (let ((f0-4 1.0)) (.lvf vf1 (&-> a2-7 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a3-8 f0-4)) (.mov vf3 a3-8) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc b/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc index 8f09924a019..bb5d9a10262 100644 --- a/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc @@ -62,9 +62,7 @@ (else (let ((s5-0 (the-as mined-states (-> arg0 state)))) (let ((s4-1 (-> *level* level arg2 bsp light-hash))) - (set! (-> s5-0 light 0) - (set-mined-filter-light! "light-3802" s4-1 (the-as vector (-> s5-0 filter)) (-> s5-0 light 0)) - ) + (set! (-> s5-0 light 0) (set-mined-filter-light! "light-3802" s4-1 (-> s5-0 filter 0) (-> s5-0 light 0))) (set! (-> s5-0 light 1) (set-mined-filter-light! "light-3803" s4-1 (-> s5-0 filter 1) (-> s5-0 light 1))) ) (set! (-> arg0 times 0 w) 1.0) diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc index 40e18129b5d..1221252486a 100644 --- a/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc @@ -475,8 +475,8 @@ (.mov at-0 f0-7) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> v1-13 quad) vf1) ) (let ((f30-1 (fabs (- (-> gp-0 x) (-> (target-pos 0) x))))) diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc index 5f5ee1d8bc2..a0980d28861 100644 --- a/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc @@ -39,7 +39,7 @@ (defun spt-func-pillar-rocks-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) @@ -553,7 +553,7 @@ ;; definition for function spt-func-part-prebot-eco-pillar-rocks (defun spt-func-part-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-pillar-rocks-bounce1 arg0 arg1 arg2) (none) ) @@ -616,7 +616,7 @@ ;; definition for function spt-func-part-prebot-eco-pillar-rocks-bounce1 (defun spt-func-part-prebot-eco-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-pillar-rocks-bounce2 arg0 arg1 arg2) (none) ) @@ -1700,10 +1700,6 @@ ;; definition for function spt-func-part-prebot-eco-pillar-shatter (defun spt-func-part-prebot-eco-pillar-shatter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc index f8564122d1e..13e51e1e271 100644 --- a/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc @@ -27,7 +27,7 @@ ) (else (set! (-> s4-1 neck-angle target) (fmin 1.0 (* 0.00012207031 (acos f30-0)))) - (if (< (vector-dot s3-1 (the-as vector (-> arg0 bone transform))) 0.0) + (if (< (vector-dot s3-1 (-> arg0 bone transform rvec)) 0.0) (set! (-> s4-1 neck-angle target) (- (-> s4-1 neck-angle target))) ) ) @@ -86,19 +86,19 @@ (set! (-> v1-0 z) arg2) (set! (-> v1-0 w) 1.0) (.lvf vf1 (&-> (-> self light-flash value) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov a3-2 vf1) (let ((f0-4 a3-2)) (.lvf vf1 (&-> v1-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-1 vf1) (when (< f0-4 v1-1) (set-vector! (-> self light-flash value) arg0 arg1 arg2 1.0) @@ -168,7 +168,7 @@ (update! (-> self light-pulse) (-> self light-pulse-flicker value)) ) (let ((a0-27 (new 'stack-no-clear 'vector))) - (vector+! a0-27 (-> self light-flash value) (the-as vector (-> self light-pulse))) + (vector+! a0-27 (-> self light-flash value) (-> self light-pulse value)) (set! (-> a0-27 x) (fmax 0.0 (-> a0-27 x))) (set! (-> a0-27 y) (fmax 0.0 (-> a0-27 y))) (set! (-> a0-27 z) (fmax 0.0 (-> a0-27 z))) @@ -1447,7 +1447,7 @@ ) ) (else - (let ((f0-14 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-14 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-0 1024.0) ) (if (< f0-14 (* f1-0 f1-0)) @@ -1624,7 +1624,7 @@ (dotimes (gp-12 2) (send-event (handle->process (-> self swords gp-12)) 'scale #x3ff33333) ) - (let ((f0-46 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-46 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-15 1024.0) ) (when (< f0-46 (* f1-15 f1-15)) @@ -2094,7 +2094,7 @@ ) (ja :num! (seek!)) (when (ja-done? 0) - (let ((f0-18 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-18 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-0 1024.0) ) (cond @@ -2152,7 +2152,7 @@ (= v1-174 prebot-swords-vertical-hold-ja) ) ) - (let ((f0-25 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (let ((f0-25 (vector-vector-distance-squared (-> self position target) (-> self position value))) (f1-3 1024.0) ) (< f0-25 (* f1-3 f1-3)) @@ -2445,12 +2445,8 @@ ;; definition for method 15 of type hud-prebot ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-prebot)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 150 - ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) -9 70) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 150) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) -9 70) (case (-> this values 0 current) ((1) (set! (-> this sprites 4 scale-x) 6.0) @@ -2474,9 +2470,9 @@ 0 ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) -8 68) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 68) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -12 68) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) -8 68) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -51 68) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -12 68) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/mine/rat_REF.gc b/test/decompiler/reference/jak3/levels/mine/rat_REF.gc index 5a40a85b11a..9e363da092a 100644 --- a/test/decompiler/reference/jak3/levels/mine/rat_REF.gc +++ b/test/decompiler/reference/jak3/levels/mine/rat_REF.gc @@ -1369,7 +1369,7 @@ (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) (let ((gp-0 (-> (the-as ragdoll-proc (-> self ragdoll-proc process 0)) ragdoll))) (enable-ragdoll! gp-0 self) - (quaternion-copy! (-> self root quat) (the-as quaternion (-> gp-0 ragdoll-joints))) + (quaternion-copy! (-> self root quat) (-> gp-0 ragdoll-joints 0 quat)) ) (let ((a1-6 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-6 from) (process->ppointer self)) @@ -1627,7 +1627,7 @@ (vector+! (-> arg0 bone transform trans) (-> arg0 bone transform trans) - (the-as vector (-> (the-as rat gp-0) roll-transform)) + (-> (the-as rat gp-0) roll-transform trans) ) ) (none) diff --git a/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc b/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc index 643be26644a..35dad00c801 100644 --- a/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc +++ b/test/decompiler/reference/jak3/levels/nest/egg-spider_REF.gc @@ -149,8 +149,8 @@ ;; definition for function spt-func-part-egg-spider-clumps (defun spt-func-part-egg-spider-clumps ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -212,8 +212,8 @@ ;; definition for function spt-func-part-egg-spider-clumps-mass (defun spt-func-part-egg-spider-clumps-mass ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -272,8 +272,8 @@ ;; definition for function spt-func-part-egg-spider-clumps-pop (defun spt-func-part-egg-spider-clumps-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -333,8 +333,8 @@ ;; definition for function spt-func-part-egg-spider-clumps-stays (defun spt-func-part-egg-spider-clumps-stays ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) - (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) + (check-drop-level-egg-spider-dirt-rubble arg0 arg1 (-> arg2 launchrot)) (none) ) @@ -878,9 +878,9 @@ ) (.lvf vf4 (&-> s4-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s5-1 quad) vf6) ) (let* ((s5-2 (new 'stack-no-clear 'vector)) @@ -905,9 +905,9 @@ (.lvf vf5 (&-> s3-0 quad)) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s1-3 quad) vf6) ) ) @@ -1222,9 +1222,9 @@ ) (.lvf vf4 (&-> v1-16 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (vector-normalize! s2-0 1.0) @@ -1238,9 +1238,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (vector-normalize! (-> self vec-up) 1.0) @@ -1742,7 +1742,7 @@ (let ((a1-2 (new 'stack-no-clear 'nav-poly))) (set! (-> a1-2 vertex1 x) 122880.0) (set! (-> a1-2 data 20) (the-as uint 2)) - (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (vector-! (-> a1-2 vertex 0) s3-0 (the-as vector (-> s4-0 bounds))) (vector-copy! s3-0 (-> a1-2 vertex 0)) (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) (when a1-3 @@ -1832,9 +1832,9 @@ ) (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-1 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc index cfdb761723b..a952b200323 100644 --- a/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc +++ b/test/decompiler/reference/jak3/levels/nest/mh-bat_REF.gc @@ -1122,7 +1122,7 @@ (let ((s5-0 (cubic-curve-method-12 (-> self move-curve) (new 'stack-no-clear 'vector) 0.0)) (s4-0 (vector-flatten! (new 'stack-no-clear 'vector) (-> self root transv) (-> self rotation-matrix fvec))) ) - (vector-flatten! s5-0 s5-0 (the-as vector (-> self rotation-matrix))) + (vector-flatten! s5-0 s5-0 (-> self rotation-matrix rvec)) (set! (-> s5-0 y) (fmax 0.0 (-> s5-0 y))) (seek! (-> self flap-interp) @@ -1176,7 +1176,7 @@ (vector-length-max! s5-0 327680.0) (vector-v++! s4-0 s5-0) ) - (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (the-as vector (-> self rotation-matrix)))) + (let* ((v1-13 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 (-> self rotation-matrix rvec))) (f0-3 (lerp-scale 9102.223 -9102.223 (vector-dot (-> self rotation-matrix fvec) v1-13) 245760.0 -245760.0)) ) (seek! (-> self pitch-angle) f0-3 (* 32768.0 (seconds-per-frame))) @@ -1185,17 +1185,10 @@ gp-0 (the-as quaternion *y-vector*) (-> self pitch-angle) - (the-as vector (-> self rotation-matrix)) + (-> self rotation-matrix rvec) ) (let* ((v1-17 (vector-flatten! (new 'stack-no-clear 'vector) s5-0 *y-vector*)) - (f0-9 (lerp-scale - -15473.777 - 15473.777 - (vector-dot (the-as vector (-> self rotation-matrix)) v1-17) - 163840.0 - -163840.0 - ) - ) + (f0-9 (lerp-scale -15473.777 15473.777 (vector-dot (-> self rotation-matrix rvec) v1-17) 163840.0 -163840.0)) ) (seek! (-> self bank-angle) f0-9 (* 10922.667 (seconds-per-frame))) ) @@ -1598,19 +1591,19 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a0-2 quad) vf1) ) (let ((s3-0 (new 'stack-no-clear 'nav-poly))) - (vector-! (the-as vector (-> s3-0 vertex)) v1-1 (the-as vector (-> s5-0 bounds))) + (vector-! (-> s3-0 vertex 0) v1-1 (the-as vector (-> s5-0 bounds))) (set! (-> s3-0 vertex1 x) 40960000.0) (set! (-> s3-0 data 20) (the-as uint 3)) (let ((a2-0 (nav-mesh-method-45 s5-0 s3-0))) (when a2-0 (clamp-vector-to-mesh-cross-gaps s5-0 - (the-as vector (-> s3-0 vertex)) + (-> s3-0 vertex 0) a2-0 s4-0 2048.0 @@ -1622,8 +1615,8 @@ (.mov at-1 f0-2) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> gp-0 quad) vf1) gp-0 ) diff --git a/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc index 387626d96ad..ee4dc8a0239 100644 --- a/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/nest/mh-centipede-part_REF.gc @@ -171,7 +171,7 @@ ;; definition for function spt-func-part-mh-centipede-before-breach-rocks (defun spt-func-part-mh-centipede-before-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -305,7 +305,7 @@ ;; definition for function spt-func-part-mh-centipede-breach-rocks (defun spt-func-part-mh-centipede-breach-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -365,7 +365,7 @@ ;; definition for function spt-func-part-mh-centipede-breach-rocks-bounce1 (defun spt-func-part-mh-centipede-breach-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -375,7 +375,7 @@ (defun spt-func-ground-dirt-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) (cond ((or (< (-> arg1 omega) (-> arg2 launchrot y)) (< 0.0 (-> arg1 vel-sxvel y))) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) ) (else (set! (-> arg1 acc x) 0.0) @@ -660,7 +660,7 @@ ;; definition for function spt-func-part-mh-centipede-impact-rocks (defun spt-func-part-mh-centipede-impact-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce1 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) @@ -719,7 +719,7 @@ ;; definition for function spt-func-part-mh-centipede-impact-rocks-bounce1 (defun spt-func-part-mh-centipede-impact-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (spt-func-ground-dirt-bounce2 arg0 arg1 arg2 (the-as none arg3) (the-as none arg4)) (none) ) diff --git a/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc b/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc index 393b586347f..a8b5c369bc3 100644 --- a/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc +++ b/test/decompiler/reference/jak3/levels/nest/mh-centipede_REF.gc @@ -716,9 +716,9 @@ ) (.lvf vf4 (&-> v1-21 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-22 quad) vf6) ) (+! (-> self root trans y) 4096.0) @@ -1147,9 +1147,9 @@ ) (.lvf vf4 (&-> v1-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (+! (-> s5-0 collision-pt y) 204.8) @@ -1561,9 +1561,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> arg0 quad) vf6) #t ) @@ -1652,9 +1652,9 @@ (.mov vf3 v1-44) ) ) - (.add.x.vf vf4 vf0 vf0 :mask #b1000) + (.add.x.vf.w vf4 vf0 vf0) (.mul.x.vf acc vf2 vf3) - (.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111) + (.add.mul.w.vf.xyz vf4 vf1 vf0 acc) (.svf (&-> s0-1 quad) vf4) ) (vector-normalize! (-> s4-0 fvec) (* 3.0 (-> this current-anim radius))) @@ -1957,14 +1957,14 @@ ) (when s3-0 (get-intersect-point s5-1 s2-0 (-> self root) s4-0) - (vector-! s5-1 s5-1 (the-as vector (-> s3-0 prim-core))) + (vector-! s5-1 s5-1 (-> s3-0 prim-core world-sphere)) (set! (-> s5-1 y) 0.0) (.lvf vf1 (&-> s5-1 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-13 vf1) (let ((f0-1 v1-13) (f1-0 1.0) @@ -2991,7 +2991,7 @@ (set! (-> gp-0 y) (fmax (-> gp-0 y) (+ 16384.0 (-> self landing-position y)))) (vector-! gp-0 gp-0 (-> s5-0 0 trans)) (vector-normalize! gp-0 1.0) - (forward-down->inv-matrix (the-as matrix (-> s5-0 0 tracking)) gp-0 (new 'static 'vector :y -1.0)) + (forward-down->inv-matrix (-> s5-0 0 tracking inv-mat) gp-0 (new 'static 'vector :y -1.0)) ) ) ) @@ -3293,12 +3293,8 @@ ;; definition for method 15 of type hud-mh-centipede ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-mh-centipede)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 452.0 (* 130.0 (-> this offset)))) - 130 - ) - (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) 0 37) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 452.0 (* 130.0 (-> this offset)))) 130) + (set-as-offset-from! (-> this sprites 4) (-> this sprites 0 pos) 0 37) (set! (-> this sprites 4 scale-x) (* 0.164 (the float (-> this values 1 current)))) (cond ((< 75 (-> this values 1 current)) @@ -3334,11 +3330,11 @@ 0 ) ) - (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) 1 36) - (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -59 36) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 36) + (set-as-offset-from! (-> this sprites 3) (-> this sprites 0 pos) 1 36) + (set-as-offset-from! (-> this sprites 2) (-> this sprites 0 pos) -59 36) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -4 36) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 5 15) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) 5 15) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/palace/roof/palroof-part_REF.gc b/test/decompiler/reference/jak3/levels/palace/roof/palroof-part_REF.gc index 8ff053accec..b99ba671ddb 100644 --- a/test/decompiler/reference/jak3/levels/palace/roof/palroof-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/palace/roof/palroof-part_REF.gc @@ -195,7 +195,7 @@ (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 4061) s3-0) ) ) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 rvec)) (none) ) @@ -421,7 +421,3 @@ (:rotate-y (degrees 0)) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc index ba1dd64bbcc..c7c08ed5366 100644 --- a/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/precursor/precura-obs2_REF.gc @@ -351,8 +351,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> s3-0 quad) vf1) (set! (-> s3-0 y) 0.0) (vector-float*! s3-0 s3-0 10.0) @@ -361,7 +361,7 @@ (a0-26 s1-0) (a1-6 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-6 vertex)) (the-as vector a0-26) (the-as vector (-> v1-28 state mesh bounds))) + (vector-! (-> a1-6 vertex 0) (-> a0-26 world-sphere) (the-as vector (-> v1-28 state mesh bounds))) (set! (-> a1-6 vertex1 x) (-> v1-28 nearest-y-threshold)) (set! (-> a1-6 data 20) (the-as uint 2)) (let ((a2-4 (nav-mesh-method-45 (-> v1-28 state mesh) a1-6))) @@ -369,7 +369,7 @@ (a2-4 (clamp-vector-to-mesh-cross-gaps s2-0 - (the-as vector s1-0) + (-> s1-0 world-sphere) a2-4 s3-0 204.8 @@ -405,7 +405,7 @@ (a0-41 (-> self root root-prim prim-core)) (a1-9 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-9 vertex)) (the-as vector a0-41) (the-as vector (-> v1-44 state mesh bounds))) + (vector-! (-> a1-9 vertex 0) (-> a0-41 world-sphere) (the-as vector (-> v1-44 state mesh bounds))) (set! (-> a1-9 vertex1 x) (-> v1-44 nearest-y-threshold)) (set! (-> a1-9 data 20) (the-as uint 2)) (let ((v1-46 (nav-mesh-method-45 (-> v1-44 state mesh) a1-9))) diff --git a/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc index 7e9fe8c3878..4b4a36023ff 100644 --- a/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/precursor/precura-obs_REF.gc @@ -2429,9 +2429,9 @@ ) (.lvf vf4 (&-> a0-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-1 quad) vf6) ) (vector-reset! s4-0) @@ -2445,9 +2445,9 @@ ) (.lvf vf4 (&-> v1-3 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (let ((a1-4 (-> gp-0 fountain-rand-transv-lo))) @@ -2460,9 +2460,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (let ((a0-7 (-> gp-0 fountain-rand-transv-hi))) @@ -2473,9 +2473,9 @@ (.lvf vf5 (&-> v1-5 quad)) ) (.lvf vf4 (&-> s4-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-7 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc b/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc index edd24bdc99b..f52bbb2bf12 100644 --- a/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/precursor/precurc-obs_REF.gc @@ -351,9 +351,9 @@ ) (.lvf vf4 (&-> v1-30 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (move-to-point! (-> this root) s5-0) @@ -381,9 +381,9 @@ ) (.lvf vf4 (&-> v1-48 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 quad) vf6) ) (move-to-point! (-> this root) s5-2) diff --git a/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc b/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc index acc66839ded..79855638231 100644 --- a/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc @@ -691,16 +691,16 @@ ) (.lvf vf4 (&-> v1-7 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 quad) vf6) ) (let ((v1-8 (-> this nav)) (a0-3 s5-0) (a1-2 (new 'stack-no-clear 'nav-poly)) ) - (vector-! (the-as vector (-> a1-2 vertex)) a0-3 (the-as vector (-> v1-8 state mesh bounds))) + (vector-! (-> a1-2 vertex 0) a0-3 (the-as vector (-> v1-8 state mesh bounds))) (set! (-> a1-2 vertex1 x) (-> v1-8 nearest-y-threshold)) (set! (-> a1-2 data 20) (the-as uint 2)) (let ((s4-0 (nav-mesh-method-45 (-> v1-8 state mesh) a1-2))) diff --git a/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc b/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc index bea8be2f3eb..ee6ef68847c 100644 --- a/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc @@ -443,13 +443,13 @@ (let ((a0-4 (-> this nav-mesh-jumps data s4-0 mesh))) (when a0-4 (when (or (= arg1 (saberfish-find-behavior none)) (= (-> this nav-mesh-jumps data s4-0 in-water?) sv-88)) - (vector-! (the-as vector (-> sv-64 vertex)) sv-84 (the-as vector (-> a0-4 bounds))) + (vector-! (-> sv-64 vertex 0) sv-84 (the-as vector (-> a0-4 bounds))) (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-16 vf1) (let ((f0-1 v1-16) (f1-0 (-> a0-4 bounds r)) diff --git a/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc b/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc index 1446c97d745..6bb4a4e3d87 100644 --- a/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc @@ -1070,11 +1070,11 @@ (vector-! s5-0 (-> self root trans) gp-0) (let ((f0-0 16384.0)) (.lvf vf1 (&-> s5-0 quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-10 vf1) (if (< f0-0 v1-10) (vector-normalize! s5-0 16384.0) @@ -2588,8 +2588,8 @@ (.lvf vf4 (&-> v1-33 quad)) (.lvf vf5 (&-> a0-22 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-592 quad) vf6) (set! sv-608 (new 'stack-no-clear 'vector)) (let ((s0-1 (new 'stack-no-clear 'vector)) @@ -2805,7 +2805,7 @@ (if (not a0-2) (return (the-as nav-poly #f)) ) - (vector-! (the-as vector (-> gp-0 vertex)) (-> this root trans) (the-as vector (-> a0-2 bounds))) + (vector-! (-> gp-0 vertex 0) (-> this root trans) (the-as vector (-> a0-2 bounds))) (set! (-> gp-0 vertex1 x) 40960.0) (set! (-> gp-0 data 20) (the-as uint 3)) (nav-mesh-method-45 a0-2 gp-0) diff --git a/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc index 4a7fb33e294..ffa70037574 100644 --- a/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc @@ -865,7 +865,7 @@ ;; definition for method 37 of type sew-move-plat (defmethod sew-move-plat-method-37 ((this sew-move-plat)) - (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (the-as vector (-> this positions))))) + (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 0)))) (logand (+ (-> this dest-pos-index) 1) 1) (if (< f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 1))) 0 @@ -980,7 +980,7 @@ (set! (-> this current-pos-index) 0) (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) - (get-point-at-percent-along-path! (-> this path) (the-as vector (-> this positions)) 0.0 'interp) + (get-point-at-percent-along-path! (-> this path) (-> this positions 0) 0.0 'interp) (get-point-at-percent-along-path! (-> this path) (-> this positions 1) 1.0 'interp) (vector-copy! (-> this basetrans) (-> this root trans)) (set! (-> this current-pos-index) (sew-move-plat-method-37 this)) diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc index dadc3a463ba..1fd17d95b1e 100644 --- a/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc @@ -45,7 +45,7 @@ ) (vector-! gp-1 (target-pos 0) (-> self root trans)) (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) - (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + (f1-2 (fabs (vector-dot gp-1 (-> self node-list data 5 bone transform rvec)))) ) (if (and (< 4096.0 f0-1) (>= 81920.0 f1-2) (< f30-0 450560.0)) (go-virtual active) @@ -77,7 +77,7 @@ ) (vector-! gp-1 (target-pos 0) (-> self root trans)) (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) - (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + (f1-2 (fabs (vector-dot gp-1 (-> self node-list data 5 bone transform rvec)))) ) (when (or (>= 0.0 f0-1) (< 81920.0 f1-2) (>= f30-0 450560.0)) (if (nonzero? (-> self sound-id)) @@ -138,7 +138,7 @@ (set! f1-1 (* 0.2 (- 45.0 f0-0) f1-1)) ) ) - (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-1) + (vector+float*! s4-0 s4-0 (-> this node-list data arg0 bone transform rvec) f1-1) ) ) (else @@ -151,7 +151,7 @@ (set! f1-2 (* 0.2 (- 90.0 f0-0) f1-2)) ) ) - (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-2) + (vector+float*! s4-0 s4-0 (-> this node-list data arg0 bone transform rvec) f1-2) ) ) ) @@ -440,9 +440,9 @@ ) (.lvf vf5 (&-> a0-2 quad)) (.lvf vf4 (&-> v1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-0 quad) vf6) (launch-particles (-> *part-id-table* 4940) gp-0) (launch-particles (-> *part-id-table* 4941) gp-0) diff --git a/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc b/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc index 1b23944773a..a90c0619502 100644 --- a/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc +++ b/test/decompiler/reference/jak3/levels/stadium/dm-mine-spider_REF.gc @@ -705,7 +705,7 @@ (vector-copy! (-> a1-3 start-pos) (-> this root root-prim prim-core world-sphere)) (vector-! (-> a1-3 move-dist) - (the-as vector (-> (the-as collide-shape s3-1) root-prim prim-core)) + (-> (the-as collide-shape s3-1) root-prim prim-core world-sphere) (-> a1-3 start-pos) ) (let ((v1-6 a1-3)) @@ -870,9 +870,9 @@ (.lvf vf5 (&-> s4-1 quad)) (.lvf vf4 (&-> a0-20 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-30 quad) vf6) ) ) @@ -1405,7 +1405,7 @@ (let ((a1-2 (new 'stack-no-clear 'nav-poly))) (set! (-> a1-2 vertex1 x) 122880.0) (set! (-> a1-2 data 20) (the-as uint 2)) - (vector-! (the-as vector (-> a1-2 vertex)) s3-0 (the-as vector (-> s4-0 bounds))) + (vector-! (-> a1-2 vertex 0) s3-0 (the-as vector (-> s4-0 bounds))) (vector-copy! s3-0 (-> a1-2 vertex 0)) (let ((a1-3 (nav-mesh-method-45 s4-0 a1-2))) (when a1-3 @@ -1635,7 +1635,7 @@ (cond ((and (= arg0 3) (type? gp-0 collide-shape)) (let ((v0-1 (new 'static 'vector))) - (vector+! v0-1 (the-as vector (-> gp-0 root-prim prim-core)) (new 'static 'vector :y 16384.0 :w 1.0)) + (vector+! v0-1 (-> gp-0 root-prim prim-core world-sphere) (new 'static 'vector :y 16384.0 :w 1.0)) (set! (-> v0-1 w) 1638.4) v0-1 ) diff --git a/test/decompiler/reference/jak3/levels/stadium/king-rider_REF.gc b/test/decompiler/reference/jak3/levels/stadium/king-rider_REF.gc index 734757cfd76..f8b04d8aed9 100644 --- a/test/decompiler/reference/jak3/levels/stadium/king-rider_REF.gc +++ b/test/decompiler/reference/jak3/levels/stadium/king-rider_REF.gc @@ -166,11 +166,11 @@ (f0-6 (* f0-4 f0-4)) ) (.lvf vf1 (&-> (-> *target* control transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-26 vf1) (if (< f0-6 v1-26) (set-time! (-> self last-moved-time)) diff --git a/test/decompiler/reference/jak3/levels/stadium/rubble-obs_REF.gc b/test/decompiler/reference/jak3/levels/stadium/rubble-obs_REF.gc index 6ec3ec6aaaa..6d69c4ae08d 100644 --- a/test/decompiler/reference/jak3/levels/stadium/rubble-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/stadium/rubble-obs_REF.gc @@ -807,9 +807,9 @@ ) (.lvf vf4 (&-> v1-17 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (vector-normalize! (vector-cross! s4-0 s2-0 s3-0) 1.0) diff --git a/test/decompiler/reference/jak3/levels/stadium/rubble-part_REF.gc b/test/decompiler/reference/jak3/levels/stadium/rubble-part_REF.gc index af20ae9a23a..ce4ad679eb7 100644 --- a/test/decompiler/reference/jak3/levels/stadium/rubble-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/stadium/rubble-part_REF.gc @@ -239,7 +239,7 @@ ;; definition for function spt-func-part-rub-elec-gate (defun spt-func-part-rub-elec-gate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) (spt-func-match-part-def arg0 arg1 arg2) - (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (sparticle-texture-animate arg0 arg1 (-> arg2 launchrot)) (none) ) diff --git a/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc b/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc index a779d20959f..3510a53e7ec 100644 --- a/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/flamer-hover_REF.gc @@ -194,7 +194,7 @@ (vector-normalize! s5-1 2048.0) (vector/! s5-1 s5-1 (-> this root scale)) (vector-rotate-around-z! s5-1 s5-1 (-> this flit-angle)) - (vector-seek! (the-as vector (-> this flit-joint transform)) s5-1 (* 32768.0 (seconds-per-frame))) + (vector-seek! (-> this flit-joint transform trans) s5-1 (* 32768.0 (seconds-per-frame))) ) (update-trans! (-> this sound) (-> this root trans)) (update-vol! (-> this sound) (-> this sound-volume)) diff --git a/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc b/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc index 916ea395eda..a98d12f5a4e 100644 --- a/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/hover-training_REF.gc @@ -22,13 +22,9 @@ ;; definition for method 15 of type hud-hover ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-hover)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 165 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 165) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -20 50) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -20 50) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc index a7e9f51e637..366cdfe4b9f 100644 --- a/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/temple-mood_REF.gc @@ -222,7 +222,7 @@ (set! (-> s5-1 ambi extra x) 0.8) ) (let ((v1-10 (-> arg0 light-group 3))) - (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (-> arg0 times 0) 0.55) (vector+! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> v1-10 ambi color)) diff --git a/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc index fa348f074cb..ae35a9484c3 100644 --- a/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/temple-obs2_REF.gc @@ -879,17 +879,17 @@ ) (let ((f0-2 1.0)) (.lvf vf1 (&-> a2-2 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-13 f0-2)) (.mov vf3 v1-13) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) @@ -900,17 +900,17 @@ ) (let ((f0-3 1.0)) (.lvf vf1 (&-> a1-9 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((v1-18 f0-3)) (.mov vf3 v1-18) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc index 2d773a9647c..efe8a0899dc 100644 --- a/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc @@ -1545,9 +1545,9 @@ ) (.lvf vf4 (&-> a1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-16 quad) vf6) (set! (-> a0-5 state meet data 0 quad) (-> v1-16 quad)) ) @@ -1563,9 +1563,9 @@ ) (.lvf vf4 (&-> a1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-20 quad) vf6) (vector-copy! (-> a0-8 state meet data (+ (-> a0-8 state points-to-draw) -1)) v1-20) ) @@ -1833,9 +1833,9 @@ ) (.lvf vf4 (&-> a0-30 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-39 quad) vf6) ) (let ((v1-42 (-> this path curve cverts 1))) @@ -1848,9 +1848,9 @@ ) (.lvf vf4 (&-> a0-32 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-42 quad) vf6) ) ) diff --git a/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc b/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc index 2f42f99862e..09665a24a40 100644 --- a/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/temple-part_REF.gc @@ -1265,14 +1265,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-0 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-1 vf1) ) @@ -1938,7 +1938,3 @@ (:rotate-y (degrees 0)) ) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc b/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc index c12720d2c02..75a3e22fba1 100644 --- a/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/templed-obs_REF.gc @@ -1063,17 +1063,17 @@ (let ((v1-16 (-> *tpl-bbridge-array* s5-2 tumble-axis))) (let ((f0-0 1.0)) (.lvf vf1 (&-> v1-16 quad)) - (.mul.vf vf2 vf1 vf1 :mask #b111) + (.mul.vf.xyz vf2 vf1 vf1) (let ((a0-9 f0-0)) (.mov vf3 a0-9) ) ) - (.mul.x.vf acc vf0 vf2 :mask #b1000) - (.add.mul.y.vf acc vf0 vf2 acc :mask #b1000) - (.add.mul.z.vf vf2 vf0 vf2 acc :mask #b1000) + (.mul.x.vf.w acc vf0 vf2) + (.add.mul.y.vf.w acc vf0 vf2 acc) + (.add.mul.z.vf.w vf2 vf0 vf2 acc) (.isqrt.vf Q vf3 vf2 :fsf #b0 :ftf #b11) (.wait.vf) - (.mul.vf vf1 vf1 Q :mask #b111) + (.mul.vf.xyz vf1 vf1 Q) (.nop.vf) (.nop.vf) (.nop.vf) diff --git a/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc b/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc index 485167f6114..69da420ac70 100644 --- a/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc +++ b/test/decompiler/reference/jak3/levels/temple/templex-mood_REF.gc @@ -43,7 +43,7 @@ (set! (-> s5-1 ambi extra x) 0.8) ) (let ((v1-10 (-> arg0 light-group 3))) - (vector-float*! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> arg0 times)) 0.55) + (vector-float*! (the-as vector (-> v1-10 ambi color)) (-> arg0 times 0) 0.55) (vector+! (the-as vector (-> v1-10 ambi color)) (the-as vector (-> v1-10 ambi color)) diff --git a/test/decompiler/reference/jak3/levels/title/title-obs_REF.gc b/test/decompiler/reference/jak3/levels/title/title-obs_REF.gc index c5a2fb06153..e611f5a67d7 100644 --- a/test/decompiler/reference/jak3/levels/title/title-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/title/title-obs_REF.gc @@ -1422,9 +1422,9 @@ (.lvf vf5 (&-> t0-8 quad)) ) (.lvf vf4 (&-> v1-40 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-42 quad) vf6) ) (reverse-transform-point! gp-2 a1-7 a2-3 a3-0) @@ -1447,9 +1447,9 @@ ) (.lvf vf4 (&-> s5-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> gp-4 quad) vf6) ) (let ((gp-5 (new diff --git a/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc b/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc index 8e4011c5dcd..a71d2562177 100644 --- a/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc +++ b/test/decompiler/reference/jak3/levels/volcano/flamer-lava_REF.gc @@ -601,8 +601,8 @@ (.mov at-0 f0-0) ) (.mov vf2 at-0) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-2 quad) vf1) ) (vector-! v1-1 a0-2 (-> this main-joint-vel)) @@ -612,8 +612,8 @@ (.mov at-1 f0-1) ) (.mov vf2 at-1) - (.mov.vf vf1 vf0 :mask #b1000) - (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.mov.vf.w vf1 vf0) + (.mul.x.vf.xyz vf1 vf1 vf2) (.svf (&-> a2-4 quad) vf1) ) (vector-copy! (-> this main-joint-pos) a1-1) @@ -811,7 +811,7 @@ (vector-normalize! s5-2 2048.0) (vector/! s5-2 s5-2 (-> this root scale)) (vector-rotate-around-z! s5-2 s5-2 (-> this flit-angle)) - (vector-seek! (the-as vector (-> this flit-joint transform)) s5-2 (* 32768.0 (seconds-per-frame))) + (vector-seek! (-> this flit-joint transform trans) s5-2 (* 32768.0 (seconds-per-frame))) ) (update-trans! (-> this sound) (-> this root trans)) (update! (-> this sound)) diff --git a/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc b/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc index 28656103a65..8e21561505d 100644 --- a/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc +++ b/test/decompiler/reference/jak3/levels/volcano/spiky-frog_REF.gc @@ -1003,7 +1003,7 @@ (set! (-> a0-2 param0) (lambda ((arg0 cspace) (arg1 transformq)) (let ((v1-0 (-> arg0 param1))) - (vector+! (-> arg1 trans) (-> arg1 trans) (the-as vector (-> (the-as spiky-frog v1-0) roll-transform))) + (vector+! (-> arg1 trans) (-> arg1 trans) (-> (the-as spiky-frog v1-0) roll-transform trans)) (quaternion*! (-> arg1 quat) (-> arg1 quat) (-> (the-as spiky-frog v1-0) roll-transform quat)) ) (quaternion-normalize! (-> arg1 quat)) diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc index 22b716c4122..df2eb0c9df4 100644 --- a/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-obs_REF.gc @@ -844,7 +844,7 @@ (s2-0 (new 'stack-no-clear 'vector)) (s3-0 (vector<-cspace! (new 'stack-no-clear 'vector) s4-0)) ) - (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 bone transform)) 1.0))) + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-0 bone transform rvec) 1.0))) (vector-float*! s2-0 s1-0 diff --git a/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc b/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc index 688bbe96e1c..d432d4e81e2 100644 --- a/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/volcano/volcano-part_REF.gc @@ -46,7 +46,7 @@ ;; definition for function spt-func-part-volcano-embers (defun spt-func-part-volcano-embers ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -483,7 +483,7 @@ ;; definition for function spt-func-part-lava-ball-spout-puff (defun spt-func-part-lava-ball-spout-puff ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) - (sparticle-motion-blur arg0 arg1 (the-as vector arg2)) + (sparticle-motion-blur arg0 arg1 (-> arg2 launchrot)) (check-drop-group-center arg0 arg1 arg2) (none) ) @@ -603,14 +603,14 @@ ((< (-> s4-0 w) 0.0) (.lvf vf1 (&-> v1-8 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-8 conerot quad) vf1) (.mov v1-9 vf1) ) (else (.lvf vf1 (&-> v1-8 conerot quad)) (.lvf vf2 (&-> s4-0 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> v1-8 conerot quad) vf1) (.mov v1-10 vf1) ) @@ -645,14 +645,14 @@ ((< (-> s5-1 w) 0.0) (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.sub.vf vf1 vf0 vf2 :mask #b111) + (.sub.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-15 vf1) ) (else (.lvf vf1 (&-> arg2 conerot quad)) (.lvf vf2 (&-> s5-1 quad)) - (.add.vf vf1 vf0 vf2 :mask #b111) + (.add.vf.xyz vf1 vf0 vf2) (.svf (&-> arg2 conerot quad) vf1) (.mov v1-16 vf1) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc index 03f4d2559d7..93ac8f8b96b 100644 --- a/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/bbush/des-bush-time-chase_REF.gc @@ -1539,14 +1539,14 @@ ;; definition for method 15 of type freeze-time-hud ;; WARN: Return type mismatch int vs none. (defmethod draw ((this freeze-time-hud)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 447 70) + (set-hud-piece-position! (-> this sprites 0) 447 70) (format (clear (-> this strings 0 text)) "~2,'0D" (/ (-> this values 0 current) 100)) (format (clear (-> this strings 2 text)) ":") (format (clear (-> this strings 3 text)) "~2,'0D" (mod (-> this values 0 current) 100)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -15 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) 0 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) 15 -8) - (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (-> this sprites 0 pos) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (-> this sprites 0 pos) 15 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (-> this sprites 0 pos) 0 -40) (let ((s5-3 (new 'stack 'font-context diff --git a/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc b/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc index c4007137b52..a0035e3af5e 100644 --- a/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc @@ -1406,13 +1406,9 @@ ;; definition for method 15 of type hud-kanga-lizard ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-kanga-lizard)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 472.0 (* 130.0 (-> this offset)))) - 160 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 472.0 (* 130.0 (-> this offset)))) 160) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -16 65) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -16 65) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc index a1b8a2530da..e11ac138815 100644 --- a/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc @@ -1228,7 +1228,7 @@ (f30-0 (* (rand-vu-float-range 0.0 136.53334) f28-0)) (f0-8 (* (rand-vu-float-range -13.653334 54.613335) f28-0)) ) - (vector-float*! s4-0 (the-as vector (-> s5-0 origin)) f26-0) + (vector-float*! s4-0 (-> s5-0 origin rvec) f26-0) (let ((a1-5 s4-0)) (let ((v1-8 s4-0)) (let ((a0-10 (-> s5-0 origin uvec))) @@ -1239,9 +1239,9 @@ ) (.lvf vf4 (&-> v1-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (let ((a1-6 s4-0)) @@ -1254,9 +1254,9 @@ ) (.lvf vf4 (&-> v1-9 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-6 quad) vf6) ) ) @@ -1554,7 +1554,7 @@ (initialize (-> self part) (-> *part-group-id-table* 253) self) (set! (-> self parts-alive?) #t) ) - (spawn-from-cspace (-> self part) (the-as cspace (-> self node-list data))) + (spawn-from-cspace (-> self part) (-> self node-list data 0)) ) (else (when (-> self parts-alive?) diff --git a/test/decompiler/reference/jak3/levels/wascity/traffic-util_REF.gc b/test/decompiler/reference/jak3/levels/wascity/traffic-util_REF.gc index 9f80d912d10..e737d3cf2b9 100644 --- a/test/decompiler/reference/jak3/levels/wascity/traffic-util_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/traffic-util_REF.gc @@ -15,18 +15,10 @@ (local-vars (sv-48 (function _varargs_ object))) (dotimes (s5-0 (-> this segment-count)) (let ((s4-0 (-> this segment-array s5-0))) - (add-debug-line - #t - (bucket-id debug) - (the-as vector (-> s4-0 vertex)) - (-> s4-0 vertex 1) - *color-white* - #f - *color-black* - ) + (add-debug-line #t (bucket-id debug) (-> s4-0 vertex 0) (-> s4-0 vertex 1) *color-white* #f *color-black*) (let ((s3-1 (vector-float*! (new 'stack-no-clear 'vector) - (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> s4-0 vertex)) (-> s4-0 vertex 1)) + (vector+! (new 'stack-no-clear 'vector) (-> s4-0 vertex 0) (-> s4-0 vertex 1)) 0.5 ) ) @@ -142,8 +134,8 @@ ) (.lvf vf4 (&-> v1-0 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-1 quad) vf5) ) (let ((a0-2 (-> s5-0 max))) @@ -153,8 +145,8 @@ ) (.lvf vf4 (&-> v1-1 quad)) ) - (.add.x.vf vf5 vf0 vf0 :mask #b1000) - (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.add.x.vf.w vf5 vf0 vf0) + (.add.x.vf.xyz vf5 vf4 vf6) (.svf (&-> a0-2 quad) vf5) ) (lookup-cell-for-point this (-> arg0 min) (-> s5-0 min)) @@ -184,7 +176,7 @@ ;; definition for method 12 of type grid-info ;; WARN: Return type mismatch int vs none. (defmethod debug-draw-grid ((this grid-info) (arg0 rgba)) - (draw-grid (the-as vector (-> this box)) (-> this box max) (-> this dimension-array) arg0) + (draw-grid (-> this box min) (-> this box max) (-> this dimension-array) arg0) 0 (none) ) @@ -451,9 +443,7 @@ (s3-0 (-> v1-18 segment-array 0)) ) (countdown (s2-0 (-> v1-18 segment-count)) - (if (and (= (-> s3-0 tracker-id) sv-24) - (line-sphere-intersection? sv-20 (the-as vector (-> s3-0 vertex)) (-> s3-0 vertex 1)) - ) + (if (and (= (-> s3-0 tracker-id) sv-24) (line-sphere-intersection? sv-20 (-> s3-0 vertex 0) (-> s3-0 vertex 1))) (sv-32 sv-28 s3-0) ) (&+! s3-0 48) @@ -483,7 +473,7 @@ (dotimes (s3-0 16) (let ((s2-0 (-> arg0 suppressor array s3-0))) (when (logtest? (-> s2-0 flags) (traffic-suppression-box-flag in-use)) - (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (the-as vector (-> s2-0 bbox))) + (lookup-cell-for-point (-> this grid-info) (-> s4-0 1) (-> s2-0 bbox min)) (lookup-cell-for-point (-> this grid-info) (-> s4-0 2) (-> s2-0 bbox max)) (set! (-> s4-0 0 y) (-> s4-0 1 y)) (countdown (v1-15 (+ (- 1 (-> s4-0 1 y)) (-> s4-0 2 y))) @@ -677,9 +667,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-8 quad) vf6) ) (set! (-> s5-0 6 w) (* 1024.0 (the float (-> s2-0 radius)))) @@ -714,9 +704,9 @@ ) (.lvf vf4 (&-> v1-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-13 quad) vf6) ) ) @@ -730,9 +720,9 @@ ) (.lvf vf4 (&-> v1-27 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-14 quad) vf6) ) ) @@ -982,7 +972,7 @@ (let ((s2-1 (-> sv-260 segment-array a2-14))) (set! (-> s2-1 vertex 0 quad) (-> sv-248 quad)) (vector-copy! (-> s2-1 vertex 1) (-> sv-104 pos)) - (set! (-> s2-1 length) (vector-vector-distance (the-as vector (-> s2-1 vertex)) (-> s2-1 vertex 1))) + (set! (-> s2-1 length) (vector-vector-distance (-> s2-1 vertex 0) (-> s2-1 vertex 1))) (let* ((f0-9 (if (logtest? (-> s4-2 flags) (nav-node-flag-byte pedestrian)) 24576.0 49152.0 diff --git a/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc index a57c36635fe..6fa98a165a8 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc @@ -942,7 +942,7 @@ (-> v1-4 display?) ) (let ((s4-0 (-> *minimap-class-list* 121))) - (if (< (vector-vector-distance (target-pos 0) (the-as vector s4-0)) 1474560.0) + (if (< (vector-vector-distance (target-pos 0) (-> s4-0 default-position)) 1474560.0) (send-event this 'complete) ) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc index 6e22a3b1cb7..d3a6f31682d 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wascity-turret_REF.gc @@ -174,9 +174,9 @@ ) (.lvf vf4 (&-> a1-2 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-2 quad) vf6) ) (vector-float*! v1-1 *up-vector* 81920.0) @@ -190,9 +190,9 @@ ) (.lvf vf4 (&-> a0-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a2-3 quad) vf6) ) (let ((a1-5 (-> s5-0 fountain-rand-transv-hi))) @@ -203,9 +203,9 @@ (.lvf vf5 (&-> a0-6 quad)) ) (.lvf vf4 (&-> v1-1 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) ) @@ -357,9 +357,9 @@ ) (.lvf vf4 (&-> v1-28 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 quad) vf6) ) (let ((a1-3 (-> s5-0 trans))) @@ -372,9 +372,9 @@ ) (.lvf vf4 (&-> v1-29 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (spawn-from-mat (-> this part) s5-0) @@ -411,9 +411,9 @@ ) (.lvf vf4 (&-> a0-19 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-55 quad) vf6) ) (let ((a1-9 (-> s5-0 trans))) @@ -426,9 +426,9 @@ ) (.lvf vf4 (&-> v1-56 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-9 quad) vf6) ) (spawn-from-mat (-> this reticle-part) s5-0) @@ -916,9 +916,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -957,9 +957,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v0-0 quad) vf6) v0-0 ) @@ -1273,8 +1273,8 @@ (.lvf vf4 (&-> v1-21 world-sphere quad)) (.lvf vf5 (&-> a0-8 quad)) ) - (.mov.vf vf6 vf0 :mask #b1000) - (.sub.vf vf6 vf4 vf5 :mask #b111) + (.mov.vf.w vf6 vf0) + (.sub.vf.xyz vf6 vf4 vf5) (.svf (&-> sv-912 quad) vf6) (let ((f24-0 (vector-length sv-912))) (if (= f24-0 0.0) @@ -1297,7 +1297,7 @@ (when (= (-> s0-0 type) maker) ) (if #f - (add-debug-sphere #t (bucket-id debug) (the-as vector sv-896) (-> sv-896 world-sphere w) *color-red*) + (add-debug-sphere #t (bucket-id debug) (-> sv-896 world-sphere) (-> sv-896 world-sphere w) *color-red*) ) (let* ((t9-8 vector-normalize-copy!) (a0-22 (new 'stack-no-clear 'vector)) @@ -1368,9 +1368,9 @@ ) (.lvf vf4 (&-> v1-89 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-43 quad) vf6) ) ) @@ -1388,7 +1388,7 @@ (let* ((a1-19 (vector-! (new 'stack-no-clear 'vector) - (the-as vector (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core)) + (-> (the-as collide-shape-prim-group sv-976) child sv-992 prim-core world-sphere) (-> s5-0 trans) ) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc index 279e25c3a29..ede08d58648 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasdef-hud_REF.gc @@ -4,9 +4,9 @@ ;; definition for method 15 of type hud-wasdef-damage ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-wasdef-damage)) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 256 40) + (set-hud-piece-position! (-> this sprites 0) 256 40) (set! (-> this sprites 0 pos z) #xfffff0) - (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -59 -5) + (set-as-offset-from! (-> this sprites 1) (-> this sprites 0 pos) -59 -5) (set! (-> this sprites 1 pos z) #xfffff0) (let ((f0-1 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) (set! (-> this sprites 1 color x) (the int (* 255.0 (- 1.0 f0-1)))) @@ -50,7 +50,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc index e2f13f062db..9684b3636c1 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasdef-manager_REF.gc @@ -947,9 +947,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-11 quad) vf6) ) ) @@ -1475,9 +1475,9 @@ ) (.lvf vf4 (&-> v1-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-3 quad) vf6) ) (let* ((f0-5 (* 0.18333334 (vector-vector-xz-distance s5-0 s3-0))) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc index bc9e73bbc69..b557b74e71a 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasgun-hud_REF.gc @@ -17,7 +17,7 @@ ) (+! (-> s5-0 x) -1792.0) (+! (-> s5-0 y) -1840.0) - (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (-> s5-0 x)) (the int (-> s5-0 y))) + (set-hud-piece-position! (-> this sprites 0) (the int (-> s5-0 x)) (the int (-> s5-0 y))) ) ) (set! (-> this sprites 0 pos z) #xfffff0) @@ -126,7 +126,7 @@ (s4-2 (new 'stack 'vector4w)) ) (b! (< (-> this minfo s5-3 pos y) (+ -20480.0 (get-base-height *ocean-map*))) cfg-53) - (transform-point-vector! s3-3 (the-as vector (-> this minfo s5-3))) + (transform-point-vector! s3-3 (-> this minfo s5-3 pos)) (if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) (set! (-> s3-3 x) (- (-> s3-3 x))) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc index 37d7ec083c7..e90427f7a8d 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasgun-manager_REF.gc @@ -1466,9 +1466,9 @@ ) (.lvf vf4 (&-> a0-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-1 quad) vf6) ) (vector-float*! s5-0 (-> this pvel) 1.0) @@ -1482,9 +1482,9 @@ ) (.lvf vf4 (&-> v1-4 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-4 quad) vf6) ) (let ((a1-5 (-> gp-0 fountain-rand-transv-lo))) @@ -1497,9 +1497,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-5 quad) vf6) ) (let ((a0-8 (-> gp-0 fountain-rand-transv-hi))) @@ -1510,9 +1510,9 @@ (.lvf vf5 (&-> v1-6 quad)) ) (.lvf vf4 (&-> s5-0 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-8 quad) vf6) ) ) @@ -1886,9 +1886,9 @@ ) (.lvf vf4 (&-> v1-5 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-0 quad) vf6) ) (set! (-> gp-0 w) (-> *skeet-offset-table* s4-0 w)) @@ -2452,9 +2452,9 @@ ) (.lvf vf4 (&-> s4-6 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s2-0 quad) vf6) ) (set! (-> *skeet-launcher-pos* y) 36864.0) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc index 18159e5724b..c8034f30090 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/nst-tasks_REF.gc @@ -4,13 +4,9 @@ ;; definition for method 15 of type hud-nest-cocoons ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-nest-cocoons)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 200 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 200) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -25 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -25 33) ((method-of-type hud draw) this) 0 (none) @@ -136,7 +132,7 @@ ) ) (cond - ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (the-as vector (-> *minimap-class-list* 9)))) + ((and (< 819200.0 (vector-vector-xz-distance (target-pos 0) (-> *minimap-class-list* 9 default-position))) (or (= (level-status? *level* 'desert #f) 'active) (= (level-status? *level* 'waswide #f) 'active)) ) (if (not (-> this minimap)) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc index e1517b17a38..f1b8861cc84 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/sig-rider_REF.gc @@ -201,11 +201,11 @@ (f0-6 (* f0-4 f0-4)) ) (.lvf vf1 (&-> (-> *target* control transv) quad)) - (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.add.w.vf.x vf2 vf0 vf0) (.mul.vf vf1 vf1 vf1) - (.mul.x.vf acc vf2 vf1 :mask #b1) - (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) - (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mul.x.vf.x acc vf2 vf1) + (.add.mul.y.vf.x acc vf2 vf1 acc) + (.add.mul.z.vf.x vf1 vf2 vf1 acc) (.mov v1-48 vf1) (if (< f0-6 v1-48) (set-time! (-> self last-moved-time)) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc index cd1450cd42e..a92021e3a3f 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstada-part_REF.gc @@ -2174,7 +2174,7 @@ (if (rand-vu-percent? 0.85) (launch-particles (-> *part-id-table* 1967) - :launch-state (the-as sparticle-launch-state (-> self part data)) + :launch-state (-> self part data 0) :launch-control (-> self part) s5-0 ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc index 994acc52da6..1dd25842866 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadb-obs_REF.gc @@ -212,13 +212,9 @@ ;; definition for method 15 of type hud-arena-tokens ;; WARN: Return type mismatch int vs none. (defmethod draw ((this hud-arena-tokens)) - (set-hud-piece-position! - (the-as hud-sprite (-> this sprites)) - (the int (+ 462.0 (* 130.0 (-> this offset)))) - 180 - ) + (set-hud-piece-position! (-> this sprites 0) (the int (+ 462.0 (* 130.0 (-> this offset)))) 180) (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) - (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -14 33) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this sprites 0 pos) -14 33) ((method-of-type hud draw) this) 0 (none) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc index 5e2435436a4..0a06135194f 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wasstadium/wasstadc-obs_REF.gc @@ -223,9 +223,9 @@ ) (.lvf vf5 (&-> sv-176 quad)) (.lvf vf4 (&-> sv-160 quad)) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> sv-192 quad) vf6) (sv-144 s0-1 sv-192) ) @@ -798,9 +798,9 @@ ) (.lvf vf4 (&-> v1-26 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-7 vertex0 quad) vf6) (t9-12 a0-17 a1-7) ) @@ -1537,9 +1537,9 @@ ) (.lvf vf4 (&-> s2-0 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-1 quad) vf6) ) ) @@ -1697,9 +1697,9 @@ ) (.lvf vf4 (&-> v1-12 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-2 vertex0 quad) vf6) (t9-6 a0-7 a1-2) ) @@ -1826,9 +1826,9 @@ ) (.lvf vf4 (&-> v1-10 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a1-1 vertex0 quad) vf6) (t9-5 a0-6 a1-1) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc index b93b3f5586e..0962ef47f0a 100644 --- a/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc @@ -446,7 +446,7 @@ (-> arg1 quat) (quaternion-vector-angle! (the-as quaternion (new 'stack-no-clear 'vector)) - (the-as vector (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0))) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) axis) (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) shake) ) ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wlander-male_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wlander-male_REF.gc index 55cad1bc865..8591741d8df 100644 --- a/test/decompiler/reference/jak3/levels/wascity/wlander-male_REF.gc +++ b/test/decompiler/reference/jak3/levels/wascity/wlander-male_REF.gc @@ -554,9 +554,9 @@ (.lvf vf5 (&-> s5-1 quad)) (.lvf vf4 (&-> s2-1 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> s3-4 quad) vf6) ) ) @@ -570,7 +570,7 @@ (new 'stack-no-clear 'vector) (let ((a0-15 t0-0)) (let ((v1-25 t0-0)) - (let ((a1-12 (&-> (-> this node-list data (-> this gun-joint) bone) transform quad (-> this gun-axis)))) + (let ((a1-12 (&-> this node-list data (-> this gun-joint) bone transform quad (-> this gun-axis)))) (let ((a2-3 (-> this gun-length))) (.mov vf7 a2-3) ) @@ -578,9 +578,9 @@ ) (.lvf vf4 (&-> v1-25 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> a0-15 quad) vf6) ) (spawn-guard-projectile this t0-0 (-> this target-pos) 819200.0 t0-0) @@ -631,9 +631,9 @@ (.lvf vf5 (&-> s4-0 quad)) (.lvf vf4 (&-> a0-8 quad)) ) - (.add.x.vf vf6 vf0 vf0 :mask #b1000) - (.mul.x.vf acc vf5 vf7 :mask #b111) - (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.add.x.vf.w vf6 vf0 vf0) + (.mul.x.vf.xyz acc vf5 vf7) + (.add.mul.w.vf.xyz vf6 vf4 vf0 acc) (.svf (&-> v1-12 quad) vf6) ) (quaternion-rotate-local-y! (-> gp-0 rotation) (-> this root quat) 32768.0) diff --git a/test/decompiler/test_FormExpressionBuildLong.cpp b/test/decompiler/test_FormExpressionBuildLong.cpp index b181e746577..5dacfa8ad5b 100644 --- a/test/decompiler/test_FormExpressionBuildLong.cpp +++ b/test/decompiler/test_FormExpressionBuildLong.cpp @@ -2842,7 +2842,7 @@ TEST_F(FormRegressionTestJak1, Method19ResTag) { " (goto cfg-73)\n" " )\n" " (let ((t3-13 t4-1)\n" - " (t4-4 (&-> (-> arg0 tag) t4-1))\n" + " (t4-4 (&-> arg0 tag t4-1))\n" " )\n" " (while\n" " (not\n" diff --git a/test/decompiler/test_gkernel_jak1_decomp.cpp b/test/decompiler/test_gkernel_jak1_decomp.cpp index 95e0919d25f..aa1d9354aa3 100644 --- a/test/decompiler/test_gkernel_jak1_decomp.cpp +++ b/test/decompiler/test_gkernel_jak1_decomp.cpp @@ -2761,7 +2761,7 @@ TEST_F(FormRegressionTestJak1, ExprMethod18DeadPoolHeap) { " (-> s4-0 process)\n" " (relocate\n" " (-> s4-0 process)\n" - " (&- (gap-location arg0 a1-3) (the-as uint (&-> (-> s4-0 process) type)))\n" + " (&- (gap-location arg0 a1-3) (the-as uint (&-> s4-0 process type)))\n" " )\n" " )\n" " )\n"