diff --git a/SonLVL INI Files/ARZ/Leaves.xml b/SonLVL INI Files/ARZ/Leaves.xml
index 1e00e995..da69ceb0 100644
--- a/SonLVL INI Files/ARZ/Leaves.xml
+++ b/SonLVL INI Files/ARZ/Leaves.xml
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/SonLVL INI Files/CNZ/Pinball mode.xml b/SonLVL INI Files/CNZ/Pinball mode.xml
index 35a32db4..515c22a3 100644
--- a/SonLVL INI Files/CNZ/Pinball mode.xml
+++ b/SonLVL INI Files/CNZ/Pinball mode.xml
@@ -3,35 +3,35 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/SonLVL INI Files/CPZ/Section of Pipe.xml b/SonLVL INI Files/CPZ/Section of Pipe.xml
index 885bfb99..32d1cb17 100644
--- a/SonLVL INI Files/CPZ/Section of Pipe.xml
+++ b/SonLVL INI Files/CPZ/Section of Pipe.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/SonLVL INI Files/Common/Invisible lava marker.xml b/SonLVL INI Files/Common/Invisible lava marker.xml
index 83029c34..daace250 100644
--- a/SonLVL INI Files/Common/Invisible lava marker.xml
+++ b/SonLVL INI Files/Common/Invisible lava marker.xml
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/SonLVL INI Files/Common/InvisibleBlock.cs b/SonLVL INI Files/Common/InvisibleBlock.cs
index 5e27adcf..20f3c9f2 100644
--- a/SonLVL INI Files/Common/InvisibleBlock.cs
+++ b/SonLVL INI Files/Common/InvisibleBlock.cs
@@ -12,7 +12,7 @@ class InvisibleBlock : ObjectDefinition
public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../art/nemesis/Monitor and contents.nem", CompressionType.Nemesis);
- string mapfile = "../mappings/sprite/obj74.asm";
+ string mapfile = "../mappings/sprite/Invisible block.asm";
img = ObjectHelper.MapASMToBmp(artfile, mapfile, 0, 0);
}
diff --git a/SonLVL INI Files/Common/Monitor.xml b/SonLVL INI Files/Common/Monitor.xml
index a426d233..934521b3 100644
--- a/SonLVL INI Files/Common/Monitor.xml
+++ b/SonLVL INI Files/Common/Monitor.xml
@@ -3,48 +3,48 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/SonLVL INI Files/Common/PathSwapper.cs b/SonLVL INI Files/Common/PathSwapper.cs
index 55685522..647ccbf1 100644
--- a/SonLVL INI Files/Common/PathSwapper.cs
+++ b/SonLVL INI Files/Common/PathSwapper.cs
@@ -16,7 +16,7 @@ public override void Init(ObjectData data)
{
List tmpartfile = new List();
tmpartfile.AddRange(ObjectHelper.OpenArtFile("Common/pathswapper-art.bin", CompressionType.Nemesis));
- string mapfile = "../mappings/sprite/obj03.asm";
+ string mapfile = "../mappings/sprite/Pathswapper.asm";
byte[] artfile1 = tmpartfile.ToArray();
img = ObjectHelper.MapASMToBmp(artfile1, mapfile, 0, 0);
Point off;
diff --git a/SonLVL INI Files/EHZ/Waterfall.xml b/SonLVL INI Files/EHZ/Waterfall.xml
index c394fbd4..05ceb9d1 100644
--- a/SonLVL INI Files/EHZ/Waterfall.xml
+++ b/SonLVL INI Files/EHZ/Waterfall.xml
@@ -3,19 +3,19 @@
-
+
-
+
-
+
-
+
diff --git a/SonLVL INI Files/HTZ/Lift stake.xml b/SonLVL INI Files/HTZ/Lift stake.xml
index b4718c1d..f1e16506 100644
--- a/SonLVL INI Files/HTZ/Lift stake.xml
+++ b/SonLVL INI Files/HTZ/Lift stake.xml
@@ -11,11 +11,11 @@
-
+
-
+
diff --git a/SonLVL INI Files/HTZ/Seesaw.xml b/SonLVL INI Files/HTZ/Seesaw.xml
index 21b90ebb..52987f63 100644
--- a/SonLVL INI Files/HTZ/Seesaw.xml
+++ b/SonLVL INI Files/HTZ/Seesaw.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/SonLVL INI Files/MTZ/Bolt end and rope.xml b/SonLVL INI Files/MTZ/Bolt end and rope.xml
index 711cc8b1..34bd7d9b 100644
--- a/SonLVL INI Files/MTZ/Bolt end and rope.xml
+++ b/SonLVL INI Files/MTZ/Bolt end and rope.xml
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/SonLVL INI Files/OOZ/Falling oil.xml b/SonLVL INI Files/OOZ/Falling oil.xml
index fd234d43..39824e6b 100644
--- a/SonLVL INI Files/OOZ/Falling oil.xml
+++ b/SonLVL INI Files/OOZ/Falling oil.xml
@@ -3,39 +3,39 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/SonLVL INI Files/OOZ/PushSpring.xml b/SonLVL INI Files/OOZ/PushSpring.xml
index 82a1e207..8ca7d086 100644
--- a/SonLVL INI Files/OOZ/PushSpring.xml
+++ b/SonLVL INI Files/OOZ/PushSpring.xml
@@ -3,11 +3,11 @@
-
+
-
+
diff --git a/SonLVL INI Files/SCZ/Clouds.xml b/SonLVL INI Files/SCZ/Clouds.xml
index 0b34f3a1..6a203526 100644
--- a/SonLVL INI Files/SCZ/Clouds.xml
+++ b/SonLVL INI Files/SCZ/Clouds.xml
@@ -3,15 +3,15 @@
-
+
-
+
-
+
diff --git a/SonLVL INI Files/WFZ/Cycling palette switcher.xml b/SonLVL INI Files/WFZ/Cycling palette switcher.xml
index d3846163..480455fd 100644
--- a/SonLVL INI Files/WFZ/Cycling palette switcher.xml
+++ b/SonLVL INI Files/WFZ/Cycling palette switcher.xml
@@ -3,19 +3,19 @@
-
+
-
+
-
+
-
+
diff --git a/SonLVL INI Files/obj.ini b/SonLVL INI Files/obj.ini
index 1b65f5d8..76225eee 100644
--- a/SonLVL INI Files/obj.ini
+++ b/SonLVL INI Files/obj.ini
@@ -2,7 +2,7 @@
codefile=Common/RingGroup.cs
codetype=S2ObjectDefinitions.Common.RingGroup
art=../art/nemesis/Ring.nem
-mapasm=../mappings/sprite/obj37_a.asm
+mapasm=../mappings/sprite/Ring.asm
pal=1
spacing=24
[Sonic]
@@ -17,7 +17,7 @@ codetype=S2ObjectDefinitions.Common.PathSwapper
[0D]
name=Signpost
art=../art/nemesis/Signpost.nem
-mapasm=../mappings/sprite/obj0D_a.asm
+mapasm=../mappings/sprite/1P signpost.asm
frame=2
[26]
xmlfile=Common/Monitor.xml
@@ -35,5 +35,5 @@ codetype=S2ObjectDefinitions.Common.InvisibleBlock
[79]
name=Star Post
art=../art/nemesis/Star pole.nem
-mapasm=../mappings/sprite/obj79_a.asm
+mapasm=../mappings/sprite/Starpost.asm
rememberstate=True
\ No newline at end of file
diff --git a/SonLVL INI Files/objCNZ.ini b/SonLVL INI Files/objCNZ.ini
index cea9d363..5964f7b9 100644
--- a/SonLVL INI Files/objCNZ.ini
+++ b/SonLVL INI Files/objCNZ.ini
@@ -1,7 +1,7 @@
[44]
name=Round Bumper
art=../art/nemesis/Round bumper from CNZ.nem
-mapasm=../mappings/sprite/obj44.asm
+mapasm=../mappings/sprite/Round bumper from CNZ.asm
frame=0
pal=2
rememberstate=True
@@ -46,6 +46,6 @@ xmlfile=CNZ/Bumper.xml
[D8]
name=Colored Point Block
art=../art/nemesis/Drop target from CNZ.nem
-mapasm=../mappings/sprite/objD8.asm
+mapasm=../mappings/sprite/Drop target from CNZ.asm
frame=0
pal=2
\ No newline at end of file
diff --git a/SonLVL INI Files/objMTZ.ini b/SonLVL INI Files/objMTZ.ini
index b539d3be..ac04f0d8 100644
--- a/SonLVL INI Files/objMTZ.ini
+++ b/SonLVL INI Files/objMTZ.ini
@@ -67,7 +67,7 @@ xmlfile=MTZ/Gear.xml
[71]
name=Lava Bubble
art=../art/nemesis/Lava bubble from MTZ.nem
-mapasm=../mappings/sprite/obj71_b.asm
+mapasm=../mappings/sprite/Lava bubble from MTZ.asm
frame=3
pal=2
[9F]
diff --git a/mappings/sprite/obj0D_a.asm b/mappings/sprite/1P signpost.asm
similarity index 100%
rename from mappings/sprite/obj0D_a.asm
rename to mappings/sprite/1P signpost.asm
diff --git a/mappings/sprite/obj0D_b.asm b/mappings/sprite/2P signpost.asm
similarity index 100%
rename from mappings/sprite/obj0D_b.asm
rename to mappings/sprite/2P signpost.asm
diff --git a/mappings/sprite/obj04_b.asm b/mappings/sprite/ARZ water surface.asm
similarity index 100%
rename from mappings/sprite/obj04_b.asm
rename to mappings/sprite/ARZ water surface.asm
diff --git a/mappings/sprite/obj1C_b.asm b/mappings/sprite/ARZ waterfall.asm
similarity index 100%
rename from mappings/sprite/obj1C_b.asm
rename to mappings/sprite/ARZ waterfall.asm
diff --git a/mappings/sprite/obj1C_e.asm b/mappings/sprite/Bolt end and rope from MTZ.asm
similarity index 100%
rename from mappings/sprite/obj1C_e.asm
rename to mappings/sprite/Bolt end and rope from MTZ.asm
diff --git a/mappings/sprite/obj04_a.asm b/mappings/sprite/CPZ and HPZ water surface.asm
similarity index 100%
rename from mappings/sprite/obj04_a.asm
rename to mappings/sprite/CPZ and HPZ water surface.asm
diff --git a/mappings/sprite/obj0C.asm b/mappings/sprite/CPZ unused platform.asm
similarity index 100%
rename from mappings/sprite/obj0C.asm
rename to mappings/sprite/CPZ unused platform.asm
diff --git a/mappings/sprite/obj1C_d.asm b/mappings/sprite/Cascading oil from OOZ 2.asm
similarity index 100%
rename from mappings/sprite/obj1C_d.asm
rename to mappings/sprite/Cascading oil from OOZ 2.asm
diff --git a/mappings/sprite/obj1C_c.asm b/mappings/sprite/Cascading oil from OOZ.asm
similarity index 100%
rename from mappings/sprite/obj1C_c.asm
rename to mappings/sprite/Cascading oil from OOZ.asm
diff --git a/mappings/sprite/objB3.asm b/mappings/sprite/Clouds from SCZ.asm
similarity index 100%
rename from mappings/sprite/objB3.asm
rename to mappings/sprite/Clouds from SCZ.asm
diff --git a/mappings/sprite/objDA.asm b/mappings/sprite/Continue sprites.asm
similarity index 100%
rename from mappings/sprite/objDA.asm
rename to mappings/sprite/Continue sprites.asm
diff --git a/mappings/sprite/objD8.asm b/mappings/sprite/Drop target from CNZ.asm
similarity index 100%
rename from mappings/sprite/objD8.asm
rename to mappings/sprite/Drop target from CNZ.asm
diff --git a/mappings/sprite/obj1C_a.asm b/mappings/sprite/Edge of ground from EHZ and HTZ.asm
similarity index 100%
rename from mappings/sprite/obj1C_a.asm
rename to mappings/sprite/Edge of ground from EHZ and HTZ.asm
diff --git a/mappings/sprite/obj27.asm b/mappings/sprite/Explosion.asm
similarity index 100%
rename from mappings/sprite/obj27.asm
rename to mappings/sprite/Explosion.asm
diff --git a/mappings/sprite/obj28_a.asm b/mappings/sprite/Flicky, Locky, and Cucky.asm
similarity index 100%
rename from mappings/sprite/obj28_a.asm
rename to mappings/sprite/Flicky, Locky, and Cucky.asm
diff --git a/mappings/sprite/obj39.asm b/mappings/sprite/Game over and time over.asm
similarity index 100%
rename from mappings/sprite/obj39.asm
rename to mappings/sprite/Game over and time over.asm
diff --git a/mappings/sprite/obj37_c.asm b/mappings/sprite/Giant ring flash.asm
similarity index 100%
rename from mappings/sprite/obj37_c.asm
rename to mappings/sprite/Giant ring flash.asm
diff --git a/mappings/sprite/obj37_b.asm b/mappings/sprite/Giant ring.asm
similarity index 100%
rename from mappings/sprite/obj37_b.asm
rename to mappings/sprite/Giant ring.asm
diff --git a/mappings/sprite/obj12.asm b/mappings/sprite/HPZ emerald.asm
similarity index 100%
rename from mappings/sprite/obj12.asm
rename to mappings/sprite/HPZ emerald.asm
diff --git a/mappings/sprite/obj13.asm b/mappings/sprite/HPZ waterfall.asm
similarity index 100%
rename from mappings/sprite/obj13.asm
rename to mappings/sprite/HPZ waterfall.asm
diff --git a/mappings/sprite/obj7D.asm b/mappings/sprite/Hidden points at end of stage.asm
similarity index 100%
rename from mappings/sprite/obj7D.asm
rename to mappings/sprite/Hidden points at end of stage.asm
diff --git a/mappings/sprite/obj35.asm b/mappings/sprite/Invincibility stars.asm
similarity index 100%
rename from mappings/sprite/obj35.asm
rename to mappings/sprite/Invincibility stars.asm
diff --git a/mappings/sprite/obj74.asm b/mappings/sprite/Invisible block.asm
similarity index 100%
rename from mappings/sprite/obj74.asm
rename to mappings/sprite/Invisible block.asm
diff --git a/mappings/sprite/obj7C.asm b/mappings/sprite/Large pylon from CPZ.asm
similarity index 100%
rename from mappings/sprite/obj7C.asm
rename to mappings/sprite/Large pylon from CPZ.asm
diff --git a/mappings/sprite/obj71_b.asm b/mappings/sprite/Lava bubble from MTZ.asm
similarity index 100%
rename from mappings/sprite/obj71_b.asm
rename to mappings/sprite/Lava bubble from MTZ.asm
diff --git a/mappings/sprite/obj31_a.asm b/mappings/sprite/Lava marker blank.asm
similarity index 100%
rename from mappings/sprite/obj31_a.asm
rename to mappings/sprite/Lava marker blank.asm
diff --git a/mappings/sprite/obj31_b.asm b/mappings/sprite/Lava marker.asm
similarity index 100%
rename from mappings/sprite/obj31_b.asm
rename to mappings/sprite/Lava marker.asm
diff --git a/mappings/sprite/obj0F.asm b/mappings/sprite/Menu from the title screen.asm
similarity index 100%
rename from mappings/sprite/obj0F.asm
rename to mappings/sprite/Menu from the title screen.asm
diff --git a/mappings/sprite/obj26.asm b/mappings/sprite/Monitor.asm
similarity index 100%
rename from mappings/sprite/obj26.asm
rename to mappings/sprite/Monitor.asm
diff --git a/mappings/sprite/obj03.asm b/mappings/sprite/Pathswapper.asm
similarity index 100%
rename from mappings/sprite/obj03.asm
rename to mappings/sprite/Pathswapper.asm
diff --git a/mappings/sprite/obj28_c.asm b/mappings/sprite/Picky.asm
similarity index 100%
rename from mappings/sprite/obj28_c.asm
rename to mappings/sprite/Picky.asm
diff --git a/mappings/sprite/obj28_e.asm b/mappings/sprite/Pocky and Pecky.asm
similarity index 100%
rename from mappings/sprite/obj28_e.asm
rename to mappings/sprite/Pocky and Pecky.asm
diff --git a/mappings/sprite/obj29.asm b/mappings/sprite/Points.asm
similarity index 100%
rename from mappings/sprite/obj29.asm
rename to mappings/sprite/Points.asm
diff --git a/mappings/sprite/obj71_a.asm b/mappings/sprite/Pulsating orb from HPZ.asm
similarity index 100%
rename from mappings/sprite/obj71_a.asm
rename to mappings/sprite/Pulsating orb from HPZ.asm
diff --git a/mappings/sprite/obj45.asm b/mappings/sprite/Push spring from OOZ.asm
similarity index 100%
rename from mappings/sprite/obj45.asm
rename to mappings/sprite/Push spring from OOZ.asm
diff --git a/mappings/sprite/obj28_b.asm b/mappings/sprite/Ricky, Wocky, Micky, Tocke, and Becky.asm
similarity index 100%
rename from mappings/sprite/obj28_b.asm
rename to mappings/sprite/Ricky, Wocky, Micky, Tocke, and Becky.asm
diff --git a/mappings/sprite/obj37_a.asm b/mappings/sprite/Ring.asm
similarity index 100%
rename from mappings/sprite/obj37_a.asm
rename to mappings/sprite/Ring.asm
diff --git a/mappings/sprite/obj28_d.asm b/mappings/sprite/Rocky.asm
similarity index 100%
rename from mappings/sprite/obj28_d.asm
rename to mappings/sprite/Rocky.asm
diff --git a/mappings/sprite/obj44.asm b/mappings/sprite/Round bumper from CNZ.asm
similarity index 100%
rename from mappings/sprite/obj44.asm
rename to mappings/sprite/Round bumper from CNZ.asm
diff --git a/mappings/sprite/obj14_b.asm b/mappings/sprite/Seesaw Sol.asm
similarity index 100%
rename from mappings/sprite/obj14_b.asm
rename to mappings/sprite/Seesaw Sol.asm
diff --git a/mappings/sprite/obj14_a.asm b/mappings/sprite/Seesaw.asm
similarity index 100%
rename from mappings/sprite/obj14_a.asm
rename to mappings/sprite/Seesaw.asm
diff --git a/mappings/sprite/obj38.asm b/mappings/sprite/Shield.asm
similarity index 100%
rename from mappings/sprite/obj38.asm
rename to mappings/sprite/Shield.asm
diff --git a/mappings/sprite/obj0B.asm b/mappings/sprite/Small yellow moving platform from CPZ.asm
similarity index 100%
rename from mappings/sprite/obj0B.asm
rename to mappings/sprite/Small yellow moving platform from CPZ.asm
diff --git a/mappings/sprite/obj8A.asm b/mappings/sprite/Sonic 1 credits.asm
similarity index 100%
rename from mappings/sprite/obj8A.asm
rename to mappings/sprite/Sonic 1 credits.asm
diff --git a/mappings/sprite/obj0E.asm b/mappings/sprite/Sonic and Tails from the title screen.asm
similarity index 100%
rename from mappings/sprite/obj0E.asm
rename to mappings/sprite/Sonic and Tails from the title screen.asm
diff --git a/mappings/sprite/objCF.asm b/mappings/sprite/Sprites from the ending sequence.asm
similarity index 100%
rename from mappings/sprite/objCF.asm
rename to mappings/sprite/Sprites from the ending sequence.asm
diff --git a/mappings/sprite/obj79_b.asm b/mappings/sprite/Starpost stars.asm
similarity index 100%
rename from mappings/sprite/obj79_b.asm
rename to mappings/sprite/Starpost stars.asm
diff --git a/mappings/sprite/obj79_a.asm b/mappings/sprite/Starpost.asm
similarity index 100%
rename from mappings/sprite/obj79_a.asm
rename to mappings/sprite/Starpost.asm
diff --git a/mappings/sprite/obj7E.asm b/mappings/sprite/Super Sonic stars.asm
similarity index 100%
rename from mappings/sprite/obj7E.asm
rename to mappings/sprite/Super Sonic stars.asm
diff --git a/mappings/sprite/obj46.asm b/mappings/sprite/Unused rolling ball from OOZ.asm
similarity index 100%
rename from mappings/sprite/obj46.asm
rename to mappings/sprite/Unused rolling ball from OOZ.asm
diff --git a/mappings/sprite/objBB.asm b/mappings/sprite/WFZ unknown object.asm
similarity index 100%
rename from mappings/sprite/objBB.asm
rename to mappings/sprite/WFZ unknown object.asm
diff --git a/mappings/sprite/obj08.asm b/mappings/sprite/Water splash and dust.asm
similarity index 100%
rename from mappings/sprite/obj08.asm
rename to mappings/sprite/Water splash and dust.asm
diff --git a/mappings/sprite/obj49.asm b/mappings/sprite/Waterfall from EHZ.asm
similarity index 100%
rename from mappings/sprite/obj49.asm
rename to mappings/sprite/Waterfall from EHZ.asm
diff --git a/mappings/spriteDPLC/obj0D.asm b/mappings/spriteDPLC/2P signpost.asm
similarity index 100%
rename from mappings/spriteDPLC/obj0D.asm
rename to mappings/spriteDPLC/2P signpost.asm
diff --git a/mappings/spriteDPLC/obj08.asm b/mappings/spriteDPLC/Water splash and dust.asm
similarity index 100%
rename from mappings/spriteDPLC/obj08.asm
rename to mappings/spriteDPLC/Water splash and dust.asm
diff --git a/s2.asm b/s2.asm
index 35aa92a4..11367973 100644
--- a/s2.asm
+++ b/s2.asm
@@ -542,7 +542,6 @@ Vint_Lag:
bra.s VintRet
; ---------------------------------------------------------------------------
-
; loc_4C4:
.isInLevelMode:
tst.b (Water_flag).w
@@ -567,7 +566,6 @@ Vint_Lag:
bra.s .afterSetPalette
; ---------------------------------------------------------------------------
-
; loc_526:
.useUnderwaterPalette:
dma68kToVDP Underwater_palette,$0000,palette_line_size*4,CRAM
@@ -1331,11 +1329,12 @@ sndDriverInput:
rts
; End of function sndDriverInput
+; ===========================================================================
+; These 'jmpTo' blocks were generated by the compiler (believed to be ProASM
+; for the Amiga) whenever an imported function was called that was out-of-bounds;
+; they are missing in REV02, since they switched over to a DOS-based setup using SNASM68K.
jmpTos JmpTo_LoadTilesAsYouMove,JmpTo_SegaScr_VInt
-
-
-
; ---------------------------------------------------------------------------
; Subroutine to initialize joypads
; ---------------------------------------------------------------------------
@@ -4493,7 +4492,7 @@ TitleScreen_Loop:
; If the intro is still playing, then don't let the start button
; begin the game.
- tst.b (IntroSonic+obj0e_intro_complete).w
+ tst.b (IntroSonic+titleintro_intro_complete).w
beq.w TitleScreen_Loop
; If the start button has not been pressed, then loop back and keep
@@ -4905,7 +4904,7 @@ Level_PlayBgm:
move.b (a1,d0.w),d0 ; load from music playlist
move.w d0,(Level_Music).w ; store level music
bsr.w PlayMusic ; play level music
- move.b #ObjID_TitleCard,(TitleCard+id).w ; load Obj34 (level title card) at $FFFFB080
+ move.b #ObjID_TitleCard,(TitleCard+id).w ; load Obj_TitleCard at $FFFFB080
; loc_40DA:
Level_TtlCard:
move.b #VintID_TitleCard,(Vint_routine).w
@@ -4913,8 +4912,8 @@ Level_TtlCard:
jsr (RunObjects).l
jsr (BuildSprites).l
bsr.w RunPLC_RAM
- move.w (TitleCard_ZoneName+x_pos).w,d0
- cmp.w (TitleCard_ZoneName+titlecard_x_target).w,d0 ; has title card sequence finished?
+ move.w (TitleCard_ZoneNameText+x_pos).w,d0
+ cmp.w (TitleCard_ZoneNameText+titlecard_x_target).w,d0 ; has title card sequence finished?
bne.s Level_TtlCard ; if not, branch
tst.l (Plc_Buffer).w ; are there any items in the pattern load cue?
bne.s Level_TtlCard ; if yes, branch
@@ -4956,11 +4955,11 @@ Level_TtlCard:
+
cmpi.b #chemical_plant_zone,(Current_Zone).w ; check if zone == CPZ
bne.s + ; branch if not
- move.b #ObjID_CPZPylon,(CPZPylon+id).w ; load Obj7C (CPZ pylon) at $FFFFB340
+ move.b #ObjID_CPZPylon,(CPZPylon+id).w ; load Obj_CPZPylon (CPZ pylon) at $FFFFB340
+
cmpi.b #oil_ocean_zone,(Current_Zone).w ; check if zone == OOZ
bne.s Level_ClrHUD ; branch if not
- move.b #ObjID_Oil,(Oil+id).w ; load Obj07 (OOZ oil) at $FFFFB380
+ move.b #ObjID_Oil,(Oil+id).w ; load Obj_Oil at $FFFFB380
; Level_LoadObj: misnomer now
Level_ClrHUD:
moveq #0,d0
@@ -5049,7 +5048,7 @@ Level_FromCheckpoint:
+
bsr.w PalLoad_Water_ForFade
+
- move.w #-1,(TitleCard_ZoneName+titlecard_leaveflag).w
+ move.w #-1,(TitleCard_ZoneNameText+titlecard_leaveflag).w
move.b #$E,(TitleCard_Left+routine).w ; make the left part move offscreen
move.w #$A,(TitleCard_Left+titlecard_location).w
@@ -5062,14 +5061,14 @@ Level_FromCheckpoint:
bne.s - ; loop while the title card background is still loaded
lea (TitleCard).w,a1
- move.b #$16,TitleCard_ZoneName-TitleCard+routine(a1)
- move.w #$2D,TitleCard_ZoneName-TitleCard+anim_frame_duration(a1)
- move.b #$16,TitleCard_Zone-TitleCard+routine(a1)
- move.w #$2D,TitleCard_Zone-TitleCard+anim_frame_duration(a1)
- tst.b TitleCard_ActNumber-TitleCard+id(a1)
+ move.b #$16,TitleCard_ZoneNameText-TitleCard+routine(a1)
+ move.w #$2D,TitleCard_ZoneNameText-TitleCard+anim_frame_duration(a1)
+ move.b #$16,TitleCard_ZoneText-TitleCard+routine(a1)
+ move.w #$2D,TitleCard_ZoneText-TitleCard+anim_frame_duration(a1)
+ tst.b TitleCard_ActNumberText-TitleCard+id(a1)
beq.s + ; branch if the act number has been unloaded
- move.b #$16,TitleCard_ActNumber-TitleCard+routine(a1)
- move.w #$2D,TitleCard_ActNumber-TitleCard+anim_frame_duration(a1)
+ move.b #$16,TitleCard_ActNumberText-TitleCard+routine(a1)
+ move.w #$2D,TitleCard_ActNumberText-TitleCard+anim_frame_duration(a1)
+ move.b #0,(Control_Locked).w
move.b #0,(Control_Locked_P2).w
move.b #1,(Level_started_flag).w
@@ -5174,8 +5173,8 @@ InitPlayers:
move.w (Player_mode).w,d0
bne.s InitPlayers_Alone ; branch if this isn't a Sonic and Tails game
- move.b #ObjID_Sonic,(MainCharacter+id).w ; load Obj01 Sonic object at $FFFFB000
- move.b #ObjID_SpindashDust,(Sonic_Dust+id).w ; load Obj08 Sonic's spindash dust/splash object at $FFFFD100
+ move.b #ObjID_Sonic,(MainCharacter+id).w ; load Obj_Sonic at $FFFFB000
+ move.b #ObjID_SpindashDust,(Sonic_Dust+id).w ; load Sonic's Obj_SplashDust at $FFFFD100
cmpi.b #wing_fortress_zone,(Current_Zone).w
beq.s + ; skip loading Tails if this is WFZ
@@ -5184,12 +5183,12 @@ InitPlayers:
cmpi.b #sky_chase_zone,(Current_Zone).w
beq.s + ; skip loading Tails if this is SCZ
- move.b #ObjID_Tails,(Sidekick+id).w ; load Obj02 Tails object at $FFFFB040
+ move.b #ObjID_Tails,(Sidekick+id).w ; load Obj_Tails object at $FFFFB040
move.w (MainCharacter+x_pos).w,(Sidekick+x_pos).w
move.w (MainCharacter+y_pos).w,(Sidekick+y_pos).w
subi.w #$20,(Sidekick+x_pos).w
addi_.w #4,(Sidekick+y_pos).w
- move.b #ObjID_SpindashDust,(Tails_Dust+id).w ; load Obj08 Tails' spindash dust/splash object at $FFFFD140
+ move.b #ObjID_SpindashDust,(Tails_Dust+id).w ; load Tails' Obj_SplashDust at $FFFFD140
+
rts
; ===========================================================================
@@ -5198,14 +5197,14 @@ InitPlayers_Alone: ; either Sonic or Tails but not both
subq.w #1,d0
bne.s InitPlayers_TailsAlone ; branch if this is a Tails alone game
- move.b #ObjID_Sonic,(MainCharacter+id).w ; load Obj01 Sonic object at $FFFFB000
- move.b #ObjID_SpindashDust,(Sonic_Dust+id).w ; load Obj08 Sonic's spindash dust/splash object at $FFFFD100
+ move.b #ObjID_Sonic,(MainCharacter+id).w ; load Obj_Sonic at $FFFFB000
+ move.b #ObjID_SpindashDust,(Sonic_Dust+id).w ; load Sonic's Obj_SplashDust at $FFFFD100
rts
; ===========================================================================
; loc_44D0:
InitPlayers_TailsAlone:
- move.b #ObjID_Tails,(MainCharacter+id).w ; load Obj02 Tails object at $FFFFB000
- move.b #ObjID_SpindashDust,(Tails_Dust+id).w ; load Obj08 Tails' spindash dust/splash object at $FFFFD100
+ move.b #ObjID_Tails,(MainCharacter+id).w ; load Obj_Tails object at $FFFFB000
+ move.b #ObjID_SpindashDust,(Tails_Dust+id).w ; load Tails' Obj_SplashDust at $FFFFD100
addi_.w #4,(MainCharacter+y_pos).w
rts
; End of function InitPlayers
@@ -6085,7 +6084,7 @@ ChangeRingFrame:
subq.b #1,(Rings_anim_counter).w
bpl.s +
move.b #7,(Rings_anim_counter).w
- addq.b #1,(Rings_anim_frame).w ; animate rings in the level (obj25)
+ addq.b #1,(Rings_anim_frame).w ; animate rings in the level (Obj_Ring)
andi.b #3,(Rings_anim_frame).w
+
subq.b #1,(Unknown_anim_counter).w
@@ -6104,7 +6103,7 @@ ChangeRingFrame:
move.w d0,(Ring_spill_anim_accum).w
rol.w #7,d0
andi.w #3,d0
- move.b d0,(Ring_spill_anim_frame).w ; animate scattered rings (obj37)
+ move.b d0,(Ring_spill_anim_frame).w ; animate scattered rings (Obj_LostRings)
subq.b #1,(Ring_spill_anim_counter).w
+
rts
@@ -6621,7 +6620,7 @@ SpecialStage:
move.l #0,(Camera_Y_pos_copy).w
cmpi.w #1,(Player_mode).w ; is this a Tails alone game?
bgt.s + ; if yes, branch
- move.b #ObjID_SonicSS,(MainCharacter+id).w ; load Obj09 (special stage Sonic)
+ move.b #ObjID_SonicSS,(MainCharacter+id).w ; load Obj_SSSonic
tst.w (Player_mode).w ; is this a Sonic and Tails game?
bne.s ++ ; if not, branch
+ move.b #ObjID_TailsSS,(Sidekick+id).w ; load Obj10 (special stage Tails)
@@ -9756,10 +9755,11 @@ Obj5F_MapUnc_7240: include "mappings/sprite/obj5F_a.asm"
; sprite mappings
; -----------------------------------------------------------------------------------
Obj5F_MapUnc_72D2: include "mappings/sprite/obj5F_b.asm"
+
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 87 - Number of rings in Special Stage
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Sprite_7356:
Obj87:
moveq #0,d0
@@ -10365,11 +10365,11 @@ ContinueScreen:
clr.b (Level_started_flag).w
clr.l (Camera_X_pos_copy).w
move.l #$1000000,(Camera_Y_pos_copy).w
- move.b #ObjID_ContinueChars,(MainCharacter+id).w ; load ObjDB (Sonic on continue screen)
- move.b #ObjID_ContinueChars,(Sidekick+id).w ; load ObjDB (Tails on continue screen)
+ move.b #ObjID_ContinueChars,(MainCharacter+id).w ; load Obj_ContinueChars (Sonic on continue screen)
+ move.b #ObjID_ContinueChars,(Sidekick+id).w ; load Obj_ContinueChars (Tails on continue screen)
move.b #6,(Sidekick+routine).w ; => ObjDB_Tails_Init
- move.b #ObjID_ContinueText,(ContinueText+id).w ; load ObjDA (continue screen text)
- move.b #ObjID_ContinueIcons,(ContinueIcons+id).w ; load ObjDA (continue icons)
+ move.b #ObjID_ContinueText,(ContinueText+id).w ; load Obj_ContinueText (continue screen text)
+ move.b #ObjID_ContinueIcons,(ContinueIcons+id).w ; load Obj_ContinueText (continue icons)
move.b #4,(ContinueIcons+routine).w ; => loc_7AD0
jsr (RunObjects).l
jsr (BuildSprites).l
@@ -10472,28 +10472,29 @@ ContinueScreen_AdditionalLetters:
titleLetters "CONTINUE"
charset ; revert character set
+
; ===========================================================================
; ----------------------------------------------------------------------------
; Object DA - Continue text
; ----------------------------------------------------------------------------
-; loc_7A68:
-ObjDA: ; (screen-space obj)
+; Sprite_7A68: ObjDA:
+Obj_ContinueText: ; (screen-space obj)
moveq #0,d0
move.b routine(a0),d0
- move.w ObjDA_Index(pc,d0.w),d1
- jmp ObjDA_Index(pc,d1.w)
-; ===========================================================================
-; Obj_DA_subtbl:
-ObjDA_Index: offsetTable
- offsetTableEntry.w ObjDA_Init ; 0
- offsetTableEntry.w JmpTo2_DisplaySprite ; 2
- offsetTableEntry.w loc_7AD0 ; 4
- offsetTableEntry.w loc_7B46 ; 6
-; ===========================================================================
-; loc_7A7E:
-ObjDA_Init:
+ move.w ContinueText_Index(pc,d0.w),d1
+ jmp ContinueText_Index(pc,d1.w)
+; ===========================================================================
+; off_7A76: Obj_DA_subtbl: ObjDA_Index:
+ContinueText_Index: offsetTable
+ offsetTableEntry.w ContinueText_Init ; 0
+ offsetTableEntry.w JmpTo2_DisplaySprite ; 2
+ offsetTableEntry.w loc_7AD0 ; 4
+ offsetTableEntry.w loc_7B46 ; 6
+; ===========================================================================
+; loc_7A7E: ObjDA_Init:
+ContinueText_Init:
addq.b #2,routine(a0)
- move.l #ObjDA_MapUnc_7CB6,mappings(a0)
+ move.l #MapUnc_ContinueSprites,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_ContinueText,0,1),art_tile(a0)
jsrto JmpTo_Adjust2PArtPointer
move.b #0,render_flags(a0)
@@ -10504,15 +10505,15 @@ ObjDA_Init:
JmpTo2_DisplaySprite ; JmpTo
jmp (DisplaySprite).l
; ===========================================================================
-; word_7AB2:
-ObjDA_XPositions:
+; word_7AB2: ObjDA_XPositions:
+ContinueText_XPositions:
dc.w $116, $12A, $102, $13E, $EE, $152, $DA, $166
dc.w $C6, $17A, $B2, $18E, $9E, $1A2, $8A; 8
; ===========================================================================
loc_7AD0:
movea.l a0,a1
- lea_ ObjDA_XPositions,a2
+ lea_ ContinueText_XPositions,a2
moveq #0,d1
move.b (Continue_count).w,d1
subq.b #2,d1
@@ -10529,7 +10530,7 @@ loc_7AD0:
move.b d1,d2
andi.b #1,d2
-- _move.b #ObjID_ContinueIcons,id(a1) ; load objDA
+- _move.b #ObjID_ContinueIcons,id(a1) ; load Obj_ContinueText
move.w (a2)+,x_pixel(a1)
tst.b d2
beq.s +
@@ -10538,7 +10539,7 @@ loc_7AD0:
move.w #$D0,y_pixel(a1)
move.b #4,mapping_frame(a1)
move.b #6,routine(a1)
- move.l #ObjDA_MapUnc_7CB6,mappings(a1)
+ move.l #MapUnc_ContinueSprites,mappings(a1)
move.w #make_art_tile(ArtTile_ArtNem_ContinueText_2,0,1),art_tile(a1)
jsrto JmpTo_Adjust2PArtPointer2
move.b #0,render_flags(a1)
@@ -10572,31 +10573,32 @@ JmpTo3_DisplaySprite ; JmpTo
JmpTo2_DeleteObject ; JmpTo
jmp (DeleteObject).l
+
; ===========================================================================
; ----------------------------------------------------------------------------
; Object DB - Sonic lying down or Tails nagging (on the continue screen)
; ----------------------------------------------------------------------------
-; Sprite_7B82:
-ObjDB:
+; Sprite_7B82: ObjDB:
+Obj_ContinueChars:
; a0=character
moveq #0,d0
move.b routine(a0),d0
- move.w ObjDB_Index(pc,d0.w),d1
- jsr ObjDB_Index(pc,d1.w)
+ move.w ContinueChars_Index(pc,d0.w),d1
+ jsr ContinueChars_Index(pc,d1.w)
jmp (DisplaySprite).l
; ===========================================================================
-; off_7B96: ObjDB_States:
-ObjDB_Index: offsetTable
- offsetTableEntry.w ObjDB_Sonic_Init ; 0
- offsetTableEntry.w ObjDB_Sonic_Wait ; 2
- offsetTableEntry.w ObjDB_Sonic_Run ; 4
- offsetTableEntry.w ObjDB_Tails_Init ; 6
- offsetTableEntry.w ObjDB_Tails_Wait ; 8
- offsetTableEntry.w ObjDB_Tails_Run ; $A
-; ===========================================================================
-; loc_7BA2:
-ObjDB_Sonic_Init:
- addq.b #2,routine(a0) ; => ObjDB_Sonic_Wait
+; off_7B96: ObjDB_States: ObjDB_Index:
+ContinueChars_Index: offsetTable
+ offsetTableEntry.w ContinueChars_Sonic_Init ; 0
+ offsetTableEntry.w ContinueChars_Sonic_Wait ; 2
+ offsetTableEntry.w ContinueChars_Sonic_Run ; 4
+ offsetTableEntry.w ContinueChars_Tails_Init ; 6
+ offsetTableEntry.w ContinueChars_Tails_Wait ; 8
+ offsetTableEntry.w ContinueChars_Tails_Run ; $A
+; ===========================================================================
+; loc_7BA2: ObjDB_Sonic_Init:
+ContinueChars_Sonic_Init:
+ addq.b #2,routine(a0) ; => ContinueChars_Sonic_Wait
move.w #$9C,x_pos(a0)
move.w #$19C,y_pos(a0)
move.l #MapUnc_Sonic,mappings(a0)
@@ -10605,23 +10607,23 @@ ObjDB_Sonic_Init:
move.b #2,priority(a0)
move.b #AniIDSonAni_Lying,anim(a0)
-; loc_7BD2:
-ObjDB_Sonic_Wait:
+; loc_7BD2: ObjDB_Sonic_Wait:
+ContinueChars_Sonic_Wait:
tst.b (Ctrl_1_Press).w ; is start pressed?
- bmi.s ObjDB_Sonic_StartRunning ; if yes, branch
+ bmi.s ContinueChars_Sonic_StartRunning ; if yes, branch
jsr (Sonic_Animate).l
jmp (LoadSonicDynPLC).l
; ---------------------------------------------------------------------------
-; loc_7BE4:
-ObjDB_Sonic_StartRunning:
- addq.b #2,routine(a0) ; => ObjDB_Sonic_Run
+; loc_7BE4: ObjDB_Sonic_StartRunning:
+ContinueChars_Sonic_StartRunning:
+ addq.b #2,routine(a0) ; => ContinueChars_Sonic_Run
move.b #AniIDSonAni_LieDown,anim(a0)
clr.w inertia(a0)
move.b #SndID_SpindashRev,d0 ; super peel-out sound
bsr.w PlaySound
-; loc_7BFA:
-ObjDB_Sonic_Run:
+; loc_7BFA: ObjDB_Sonic_Run:
+ContinueChars_Sonic_Run:
cmpi.w #$800,inertia(a0)
bne.s +
move.w #$1000,x_vel(a0)
@@ -10634,27 +10636,27 @@ ObjDB_Sonic_Run:
jsr (Sonic_Animate).l
jmp (LoadSonicDynPLC).l
; ===========================================================================
-; loc_7C22:
-ObjDB_Tails_Init:
- addq.b #2,routine(a0) ; => ObjDB_Tails_Wait
+; loc_7C22: ObjDB_Tails_Init:
+ContinueChars_Tails_Init:
+ addq.b #2,routine(a0) ; => ContinueChars_Tails_Wait
move.w #$B8,x_pos(a0)
move.w #$1A0,y_pos(a0)
- move.l #ObjDA_MapUnc_7CB6,mappings(a0)
+ move.l #MapUnc_ContinueSprites,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_ContinueTails,0,0),art_tile(a0)
move.b #1< ObjDB_Tails_Run
+; loc_7C64: ObjDB_Tails_StartRunning:
+ContinueChars_Tails_StartRunning:
+ addq.b #2,routine(a0) ; => ContinueChars_Tails_Run
move.l #MapUnc_Tails,mappings(a0)
move.w #make_art_tile(ArtTile_ArtUnc_Tails,0,0),art_tile(a0)
move.b #AniIDSonAni_Walk,anim(a0)
@@ -10662,8 +10664,8 @@ ObjDB_Tails_StartRunning:
move.b #SndID_SpindashRev,d0 ; super peel-out sound
bsr.w PlaySound
-; loc_7C88:
-ObjDB_Tails_Run:
+; loc_7C88: ObjDB_Tails_Run:
+ContinueChars_Tails_Run:
cmpi.w #$720,inertia(a0)
bne.s +
move.w #$1000,x_vel(a0)
@@ -10677,21 +10679,22 @@ ObjDB_Tails_Run:
jmp (LoadTailsDynPLC).l
; ===========================================================================
; animation script for continue screen Tails nagging
-; off_7CB0
-Ani_objDB: offsetTable
+; off_7CB0 Ani_objDB:
+Ani_ContinueChars: offsetTable
offsetTableEntry.w + ; 0
+ dc.b 9, 2, 3,$FF
even
-; -------------------------------------------------------------------------------
+
+; ---------------------------------------------------------------------------
; Sprite mappings for text, countdown, stars, and Tails on the continue screen
; Art starts at $A000 in VRAM
-; -------------------------------------------------------------------------------
-ObjDA_MapUnc_7CB6: include "mappings/sprite/objDA.asm"
-
- jmpTos JmpTo_Adjust2PArtPointer2,JmpTo_Adjust2PArtPointer
-
+; ---------------------------------------------------------------------------
+; ObjDA_MapUnc_7CB6:
+MapUnc_ContinueSprites: include "mappings/sprite/Continue sprites.asm"
+; ===========================================================================
+ jmpTos JmpTo_Adjust2PArtPointer2,JmpTo_Adjust2PArtPointer
; ===========================================================================
; loc_7D50:
@@ -13353,7 +13356,7 @@ ObjCA_Init:
sub_A22A:
lea (EndSeqPaletteChanger).w,a1
- move.b #ObjID_TtlScrPalChanger,id(a1) ; load objC9 (palette change handler) at $FFFFB0C0
+ move.b #ObjID_TtlScrPalChanger,id(a1) ; load Obj_TtlScrPalChanger at $FFFFB0C0
move.b d0,subtype(a1)
addq.b #2,routine(a0)
move.w d1,objoff_3C(a0)
@@ -13441,7 +13444,7 @@ loc_A2F2:
moveq #$E,d0
move.b #ObjID_Tails,id(a1) ; load Tails object
move.b #$81,obj_control(a1)
- move.b #ObjID_TailsTails,(Tails_Tails_Cutscene+id).w ; load Obj05 (Tails' tails) at $FFFFB080
+ move.b #ObjID_TailsTails,(Tails_Tails_Cutscene+id).w ; load Obj_TailsTails at $FFFFB080
move.w a1,(Tails_Tails_Cutscene+parent).w
rts
; ===========================================================================
@@ -13619,7 +13622,7 @@ loc_A4B6:
clr.b anim(a0)
clr.b anim_frame(a0)
clr.b anim_frame_duration(a0)
- move.l #ObjCF_MapUnc_ADA2,mappings(a0)
+ move.l #MapUnc_EndingSprites,mappings(a0)
move.w #make_art_tile(ArtTile_ArtKos_LevelArt,0,0),art_tile(a0)
jsr (Adjust2PArtPointer).l
subi.w #$14,x_pos(a0)
@@ -13650,6 +13653,9 @@ loc_A53A:
move.w d0,y_pos(a1)
move.w x_pos(a0),x_pos(a1)
move.l #(1<<24)|(0<<16)|(AniIDSonAni_Wait<<8)|(AniIDSonAni_Wait<<0),mapping_frame(a1)
+ ; Sonic doesn't use the lower bit of 'anim_frame_duration' at
+ ; all, so this instead sets its duration to 1 and clears an
+ ; unused value.
move.w #$100,anim_frame_duration(a1)
rts
; ===========================================================================
@@ -13893,28 +13899,28 @@ word_A874:
dc.w $30,$1E ; 15
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object CE - Sonic and Tails jumping off the plane from ending sequence
-; ----------------------------------------------------------------------------
-; Sprite_A894:
-ObjCE:
+; ---------------------------------------------------------------------------
+; Sprite_A894: ObjCE:
+Obj_EndingSeqChars:
moveq #0,d0
move.b routine(a0),d0
- move.w ObjCE_Index(pc,d0.w),d1
- jmp ObjCE_Index(pc,d1.w)
+ move.w EndingSeqChars_Index(pc,d0.w),d1
+ jmp EndingSeqChars_Index(pc,d1.w)
; ===========================================================================
-; off_A8A2:
-ObjCE_Index: offsetTable
- offsetTableEntry.w ObjCE_Init ; 0
+; off_A8A2: ObjCE_Index:
+EndingSeqChars_Index: offsetTable
+ offsetTableEntry.w EndingSeqChars_Init ; 0
offsetTableEntry.w loc_A902 ; 2
offsetTableEntry.w loc_A936 ; 4
offsetTableEntry.w BranchTo_JmpTo5_DisplaySprite ; 6
; ===========================================================================
-; loc_A8AA:
-ObjCE_Init:
- lea (ObjB3_SubObjData).l,a1
+; loc_A8AA: ObjCE_Init:
+EndingSeqChars_Init:
+ lea (SCZCloud_SubObjData).l,a1
jsrto JmpTo_LoadSubObject_Part3
- move.l #ObjCF_MapUnc_ADA2,mappings(a0)
+ move.l #MapUnc_EndingSprites,mappings(a0)
move.w #make_art_tile(ArtTile_ArtKos_LevelArt,0,1),art_tile(a0)
move.b #1,priority(a0)
jsr (Adjust2PArtPointer).l
@@ -13989,27 +13995,28 @@ byte_A980:
byte_A984:
dc.b -8, 0
dc.b -$50,-$40 ; 2
+
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object CF - "Plane's helixes" from ending sequence
-; ----------------------------------------------------------------------------
-; Sprite_A988:
-ObjCF:
+; ---------------------------------------------------------------------------
+; Sprite_A988: ObjCF:
+Obj_TornadoHelixes:
moveq #0,d0
move.b routine(a0),d0
- move.w ObjCF_Index(pc,d0.w),d1
- jmp ObjCF_Index(pc,d1.w)
+ move.w TornadoHelixes_Index(pc,d0.w),d1
+ jmp TornadoHelixes_Index(pc,d1.w)
; ===========================================================================
-; off_A996:
-ObjCF_Index: offsetTable
- offsetTableEntry.w ObjCF_Init ; 0
- offsetTableEntry.w ObjCF_Animate ; 2
+; off_A996: ObjCF_Index:
+TornadoHelixes_Index: offsetTable
+ offsetTableEntry.w TornadoHelixes_Init ; 0
+ offsetTableEntry.w TornadoHelixes_Animate ; 2
; ===========================================================================
-; loc_A99A:
-ObjCF_Init:
- lea (ObjB3_SubObjData).l,a1
+; loc_A99A: ObjCF_Init:
+TornadoHelixes_Init:
+ lea (SCZCloud_SubObjData).l,a1
jsrto JmpTo_LoadSubObject_Part3
- move.l #ObjCF_MapUnc_ADA2,mappings(a0)
+ move.l #MapUnc_EndingSprites,mappings(a0)
move.w #make_art_tile(ArtTile_ArtKos_LevelArt,0,1),art_tile(a0)
move.b #3,priority(a0)
jsr (Adjust2PArtPointer).l
@@ -14023,15 +14030,15 @@ ObjCF_Init:
move.w d0,objoff_32(a0)
rts
; ===========================================================================
-; loc_A9E4:
-ObjCF_Animate:
- lea (Ani_objCF).l,a1
+; loc_A9E4: ObjCF_Animate:
+TornadoHelixes_Animate:
+ lea (Ani_TornadoHelixes).l,a1
jsrto JmpTo_AnimateSprite
bra.w loc_A90E
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object CB - Background clouds from ending sequence
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Sprite_A9F2:
ObjCB:
moveq #0,d0
@@ -14047,7 +14054,7 @@ ObjCB_Index: offsetTable
; ===========================================================================
; loc_AA06:
ObjCB_Init:
- lea (ObjB3_SubObjData).l,a1
+ lea (SCZCloud_SubObjData).l,a1
jsrto JmpTo_LoadSubObject_Part3
move.w art_tile(a0),d0
andi.w #$1FFF,d0
@@ -14133,7 +14140,7 @@ ObjCD_Index: offsetTable
; ===========================================================================
; loc_AAC0:
ObjCD_Init:
- lea (Obj28_SubObjData).l,a1
+ lea (Animal_SubObjData).l,a1
jsrto JmpTo_LoadSubObject_Part3
move.l (RNG_seed).w,d0
ror.l #3,d0
@@ -14327,9 +14334,9 @@ ChildObject_AD66: childObjectData objoff_3E, ObjID_EndingSeqBird, $00
ChildObject_AD6A: childObjectData objoff_3E, ObjID_EndingSeqSonic, $00
ChildObject_AD6E: childObjectData objoff_3E, ObjID_TornadoHelixes, $00
-; off_AD72:
-Obj28_SubObjData:
- subObjData Obj28_MapUnc_11E1C,make_art_tile(ArtTile_ArtNem_Animal_2,0,0),1<= 0), delete the object
bsr.w ObjectMove ; move the points
addi.w #$18,y_vel(a0) ; slow down
bra.w DisplaySprite
+
; ===========================================================================
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj28_MapUnc_11E1C: include "mappings/sprite/obj28_a.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj28_MapUnc_11E1C:
+MapUnc_Animal1: include "mappings/sprite/Flicky, Locky, and Cucky.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj28_MapUnc_11E40: include "mappings/sprite/obj28_b.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj28_MapUnc_11E40:
+MapUnc_Animal2: include "mappings/sprite/Ricky, Wocky, Micky, Tocke, and Becky.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj28_MapUnc_11E64: include "mappings/sprite/obj28_c.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj28_MapUnc_11E64:
+MapUnc_Animal3: include "mappings/sprite/Picky.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj28_MapUnc_11E88: include "mappings/sprite/obj28_d.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj28_MapUnc_11E88:
+MapUnc_Animal4: include "mappings/sprite/Rocky.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj28_MapUnc_11EAC: include "mappings/sprite/obj28_e.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj28_MapUnc_11EAC:
+MapUnc_Animal5: include "mappings/sprite/Pocky and Pecky.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj29_MapUnc_11ED0: include "mappings/sprite/obj29.asm"
+; ---------------------------------------------------------------------------
+; Obj29_MapUnc_11ED0:
+MapUnc_Points: include "mappings/sprite/Points.asm"
jmpTos JmpTo_RandomNumber
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
-; Object 25 - A ring (usually only placed through placement mode)
-; ----------------------------------------------------------------------------
-; Obj_Ring:
-Obj25:
+; ---------------------------------------------------------------------------
+; Object 25 - A ring (only placed through debug mode)
+; ---------------------------------------------------------------------------
+; Sprite_11F44: Obj25:
+Obj_Ring:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj25_Index(pc,d0.w),d1
- jmp Obj25_Index(pc,d1.w)
-; ===========================================================================
-; Obj_25_subtbl:
-Obj25_Index: offsetTable
- offsetTableEntry.w Obj25_Init ; 0
- offsetTableEntry.w Obj25_Animate ; 2
- offsetTableEntry.w Obj25_Collect ; 4
- offsetTableEntry.w Obj25_Sparkle ; 6
- offsetTableEntry.w Obj25_Delete ; 8
-; ===========================================================================
-; Obj_25_sub_0:
-Obj25_Init:
+ move.w Ring_Index(pc,d0.w),d1
+ jmp Ring_Index(pc,d1.w)
+; ===========================================================================
+; off_11F52: Obj_25_subtbl: Obj25_Index:
+Ring_Index: offsetTable
+ offsetTableEntry.w Ring_Init ; 0
+ offsetTableEntry.w Ring_Animate ; 2
+ offsetTableEntry.w Ring_Collect ; 4
+ offsetTableEntry.w Ring_Sparkle ; 6
+ offsetTableEntry.w Ring_Delete ; 8
+; ===========================================================================
+; loc_11F5C: Obj_25_sub_0: Obj25_Init:
+Ring_Init:
addq.b #2,routine(a0)
move.w x_pos(a0),objoff_32(a0)
- move.l #Obj25_MapUnc_12382,mappings(a0)
+ move.l #MapUnc_RingObj,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Ring,1,0),art_tile(a0)
bsr.w Adjust2PArtPointer
move.b #1< Obj0F_Main
+; loc_13616: Obj0F_Init:
+TitleMenu_Init:
+ addq.b #2,routine(a0) ; => TitleMenu_Main
move.w #128+320/2+8,x_pixel(a0)
move.w #128+224/2+92,y_pixel(a0)
- move.l #Obj0F_MapUnc_13B70,mappings(a0)
+ move.l #MapUnc_TitleMenu,mappings(a0)
move.w #make_art_tile(ArtTile_VRAM_Start,0,0),art_tile(a0)
bsr.w Adjust2PArtPointer
andi.b #1,(Title_screen_option).w
move.b (Title_screen_option).w,mapping_frame(a0)
-
-; loc_13644:
-Obj0F_Main:
+; loc_13644: Obj0F_Main:
+TitleMenu_Main:
moveq #0,d2
move.b (Title_screen_option).w,d2
move.b (Ctrl_1_Press).w,d0
@@ -27012,14 +27049,14 @@ Obj0F_Main:
rts
; ===========================================================================
; animation script
-; off_13686:
-Ani_obj0E: offsetTable
- offsetTableEntry.w Ani_obj0E_Sonic ; 0
- offsetTableEntry.w Ani_obj0E_Tails ; 1
- offsetTableEntry.w Ani_obj0E_FlashingStar ; 2
- offsetTableEntry.w Ani_obj0E_FallingStar ; 3
-; byte_1368E:
-Ani_obj0E_Sonic:
+; off_13686: Ani_obj0E:
+Ani_TitleIntro: offsetTable
+ offsetTableEntry.w Ani_TitleIntro_Sonic ; 0
+ offsetTableEntry.w Ani_TitleIntro_Tails ; 1
+ offsetTableEntry.w Ani_TitleIntro_FlashingStars ; 2
+ offsetTableEntry.w Ani_TitleIntro_FallingStar ; 3
+; byte_1368E: Ani_obj0E_Sonic:
+Ani_TitleIntro_Sonic:
dc.b 1
dc.b 5
dc.b 6
@@ -27033,8 +27070,8 @@ Ani_obj0E_Sonic:
endif
dc.b $FA
even
-; byte_13694:
-Ani_obj0E_Tails:
+; byte_13694: Ani_obj0E_Tails:
+Ani_TitleIntro_Tails:
dc.b 1
dc.b 0
dc.b 1
@@ -27043,8 +27080,8 @@ Ani_obj0E_Tails:
dc.b 4
dc.b $FA
even
-; byte_1369C:
-Ani_obj0E_FlashingStar:
+; byte_1369C: Ani_obj0E_FlashingStar:
+Ani_TitleIntro_FlashingStars:
dc.b 1
dc.b $C
dc.b $D
@@ -27053,8 +27090,8 @@ Ani_obj0E_FlashingStar:
dc.b $C
dc.b $FA
even
-; byte_136A4:
-Ani_obj0E_FallingStar:
+; byte_136A4: Ani_obj0E_FallingStar:
+Ani_TitleIntro_FallingStar:
dc.b 3
dc.b $C
dc.b $F
@@ -27063,17 +27100,16 @@ Ani_obj0E_FallingStar:
; -----------------------------------------------------------------------------
; Sprite Mappings - Flashing stars from intro (Obj0E)
; -----------------------------------------------------------------------------
-Obj0E_MapUnc_136A8: include "mappings/sprite/obj0E.asm"
+; Obj0E_MapUnc_136A8:
+MapUnc_TitleIntro: include "mappings/sprite/Sonic and Tails from the title screen.asm"
; -----------------------------------------------------------------------------
; sprite mappings
; -----------------------------------------------------------------------------
-Obj0F_MapUnc_13B70: include "mappings/sprite/obj0F.asm"
+; Obj0F_MapUnc_13B70:
+MapUnc_TitleMenu: include "mappings/sprite/Menu from the title screen.asm"
jmpTos0 JmpTo4_PlaySound,JmpTo4_PlayMusic
-
-
-
; ===========================================================================
; ----------------------------------------------------------------------------
; Object 34 - level title card (screen with red, yellow, and blue)
@@ -27085,34 +27121,36 @@ titlecard_vram_dest = objoff_36 ; target of VRAM write
titlecard_vram_dest_2P = objoff_38 ; target of VRAM write
titlecard_split_point = objoff_3A ; point to split drawing for yellow and red portions
titlecard_leaveflag = objoff_3E ; whether or not titlecard is leaving screen
-; Sprite_13C48:
-Obj34: ; (note: screen-space obj)
+
+; Sprite_13C48: Obj34:
+Obj_TitleCard: ; (note: screen-space obj)
moveq #0,d0
move.b routine(a0),d0
- move.w Obj34_Index(pc,d0.w),d1
- jmp Obj34_Index(pc,d1.w)
-; ===========================================================================
-Obj34_Index: offsetTable
- offsetTableEntry.w Obj34_Init ; 0 - create all the title card objects
- offsetTableEntry.w Obj34_BackgroundIn ; 2 - the background, coming in
- offsetTableEntry.w Obj34_BottomPartIn ; 4 - the yellow part at the bottom, coming in
- offsetTableEntry.w Obj34_LeftPartIn ; 6 - the red part on the left, coming in
- offsetTableEntry.w Obj34_ZoneName ; 8 - the name of the zone, coming in
- offsetTableEntry.w Obj34_Zone ; $A - the word "ZONE", coming in
- offsetTableEntry.w Obj34_ActNumber ; $C - the act number, coming in
- offsetTableEntry.w Obj34_LeftPartOut ; $E - red part on the left, going out
- offsetTableEntry.w Obj34_BottomPartOut ; $10 - yellow part at the bottom, going out
- offsetTableEntry.w Obj34_BackgroundOutInit ; $12 - the background, going out (first frame)
- offsetTableEntry.w Obj34_BackgroundOut ; $14 - the background, going out
- offsetTableEntry.w Obj34_WaitAndGoAway ; $16 - wait and go away, used by the zone name, "ZONE" and the act number
-; ===========================================================================
-; loc_13C6E:
-Obj34_Init:
+ move.w TitleCard_Index(pc,d0.w),d1
+ jmp TitleCard_Index(pc,d1.w)
+; ===========================================================================
+; off_13C56: Obj34_Index:
+TitleCard_Index: offsetTable
+ offsetTableEntry.w TitleCard_Init ; 0 - create all the title card objects
+ offsetTableEntry.w TitleCard_BackgroundIn ; 2 - the background, coming in
+ offsetTableEntry.w TitleCard_BottomPartIn ; 4 - the yellow part at the bottom, coming in
+ offsetTableEntry.w TitleCard_LeftPartIn ; 6 - the red part on the left, coming in
+ offsetTableEntry.w TitleCard_ZoneName ; 8 - the name of the zone, coming in
+ offsetTableEntry.w TitleCard_Zone ; $A - the word "ZONE", coming in
+ offsetTableEntry.w TitleCard_ActNumber ; $C - the act number, coming in
+ offsetTableEntry.w TitleCard_LeftPartOut ; $E - red part on the left, going out
+ offsetTableEntry.w TitleCard_BottomPartOut ; $10 - yellow part at the bottom, going out
+ offsetTableEntry.w TitleCard_BackgroundOutInit ; $12 - the background, going out (first frame)
+ offsetTableEntry.w TitleCard_BackgroundOut ; $14 - the background, going out
+ offsetTableEntry.w TitleCard_WaitAndGoAway ; $16 - wait and go away, used by the zone name, "ZONE" and the act number
+; ===========================================================================
+; loc_13C6E: Obj34_Init:
+TitleCard_Init:
lea (a0),a1
- lea Obj34_TitleCardData(pc),a2
+ lea TitleCardData(pc),a2
- moveq #(Obj34_TitleCardData_End-Obj34_TitleCardData)/$A-1,d1
-- _move.b #ObjID_TitleCard,id(a1) ; load obj34
+ moveq #(TitleCardData_End-TitleCardData)/$A-1,d1
+- _move.b #ObjID_TitleCard,id(a1) ; load Obj_TitleCard
move.b (a2)+,routine(a1)
move.l #MapUnc_TitleCards,mappings(a1)
move.b (a2)+,mapping_frame(a1)
@@ -27146,20 +27184,20 @@ titlecardobjdata macro routine,frame,width,duration,xstart,xstop,y
dc.b routine,frame,width,duration
dc.w 128+xstart,128+xstop,128+y
endm
-; word_13CD4:
-Obj34_TitleCardData:
+; word_13CD4: Obj34_TitleCardData:
+TitleCardData:
titlecardobjdata 8, 0, $80, $1B, 320+128, 160, 56 ; zone name
titlecardobjdata $A, $11, $40, $1C, 0-88, 200, 80 ; "ZONE"
titlecardobjdata $C, $12, $18, $1C, 0-24, 264, 80 ; act number
titlecardobjdata 2, 0, 0, 0, 0-128, 0-128, 0-128 ; blue background
titlecardobjdata 4, $15, $48, 8, 320+232, 232, 160 ; bottom yellow part
titlecardobjdata 6, $16, 8, $15, 0, 112, 112 ; left red part
-Obj34_TitleCardData_End:
+TitleCardData_End:
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
-; sub_13D10:
-Obj34_Wait:
+; sub_13D10: Obj34_Wait:
+TitleCard_Wait:
subq.b #1,anim_frame_duration(a0) ; subtract 1
bne.s + ; if it's not 0, branch
move.b #1,anim_frame_duration(a0) ; reset to 1
@@ -27167,11 +27205,11 @@ Obj34_Wait:
; ---------------------------------------------------------------------------
+ addq.w #4,sp ; don't run the code after the call to this routine
rts
-; End of function Obj34_Wait
+; End of function TitleCard_Wait
; ===========================================================================
-; loc_13D22:
-Obj34_BackgroundIn: ; the blue background (green when playing as Knuckles), coming in
+; loc_13D22: Obj34_BackgroundIn:
+TitleCard_BackgroundIn: ; the blue background (green when playing as Knuckles), coming in
moveq #$10,d0
moveq #8,d1
tst.w (Two_player_mode).w ; if two-player mode is on (1)
@@ -27196,11 +27234,11 @@ Obj34_BackgroundIn: ; the blue background (green when playing as Knuckles), comi
+
rts
; ===========================================================================
-; loc_13D58:
-Obj34_BottomPartIn: ; the yellow part at the bottom, coming in
- jsr Obj34_Wait(pc)
+; loc_13D58: Obj34_BottomPartIn:
+TitleCard_BottomPartIn: ; the yellow part at the bottom, coming in
+ jsr TitleCard_Wait(pc)
move.w titlecard_location(a0),d0
- bmi.w Obj34_MoveTowardsTargetPosition
+ bmi.w TitleCard_MoveTowardsTargetPosition
add.w d0,d0
move.w #$80*$14/2,d1 ; $14 half-cells down (for 2P mode)
tst.w (Two_player_mode).w
@@ -27222,13 +27260,13 @@ Obj34_BottomPartIn: ; the yellow part at the bottom, coming in
move.w titlecard_location(a0),titlecard_split_point(a0)
cmpi.w #6,titlecard_location(a0) ; if titlecard_location(a0) is 6,
seq titlecard_location(a0) ; then set it to $FF, else set it to $00
- bra.w Obj34_MoveTowardsTargetPosition
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
-; loc_13DA6:
-Obj34_LeftPartIn: ; the red part on the left, coming in
- jsr Obj34_Wait(pc)
+; loc_13DA6: Obj34_LeftPartIn:
+TitleCard_LeftPartIn: ; the red part on the left, coming in
+ jsr TitleCard_Wait(pc)
tst.w titlecard_location(a0)
- bmi.w Obj34_MoveTowardsTargetPosition
+ bmi.w TitleCard_MoveTowardsTargetPosition
move.w #VRAM_Plane_A_Name_Table,titlecard_vram_dest(a0)
tst.w (Two_player_mode).w
beq.s +
@@ -27238,22 +27276,22 @@ Obj34_LeftPartIn: ; the red part on the left, coming in
move.w titlecard_location(a0),titlecard_split_point(a0)
cmpi.w #$E,titlecard_location(a0)
seq titlecard_location(a0)
- bra.w Obj34_MoveTowardsTargetPosition
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
-; loc_13DDC:
-Obj34_ZoneName: ; the name of the zone, coming in
- jsr Obj34_Wait(pc)
+; loc_13DDC: Obj34_ZoneName:
+TitleCard_ZoneName: ; the name of the zone, coming in
+ jsr TitleCard_Wait(pc)
move.b (Current_Zone).w,mapping_frame(a0)
- bra.s Obj34_MoveTowardsTargetPosition
+ bra.s TitleCard_MoveTowardsTargetPosition
; ===========================================================================
-; loc_13DE8:
-Obj34_Zone: ; the word "ZONE", coming in
- jsr Obj34_Wait(pc)
- bra.s Obj34_MoveTowardsTargetPosition
+; loc_13DE8: Obj34_Zone:
+TitleCard_Zone: ; the word "ZONE", coming in
+ jsr TitleCard_Wait(pc)
+ bra.s TitleCard_MoveTowardsTargetPosition
; ===========================================================================
-; loc_13DEE:
-Obj34_ActNumber: ; the act number, coming in
- jsr Obj34_Wait(pc)
+; loc_13DEE: Obj34_ActNumber:
+TitleCard_ActNumber: ; the act number, coming in
+ jsr TitleCard_Wait(pc)
move.b (Current_Zone).w,d0 ; get the current zone
cmpi.b #sky_chase_zone,d0 ; is it Sky Chase?
beq.s BranchTo9_DeleteObject ; if yes, branch
@@ -27271,8 +27309,8 @@ Obj34_ActNumber: ; the act number, coming in
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
-; sub_13E1C:
-Obj34_MoveTowardsTargetPosition:
+; sub_13E1C: Obj34_MoveTowardsTargetPosition:
+TitleCard_MoveTowardsTargetPosition:
moveq #$10,d0 ; Movement speed
move.w x_pixel(a0),d1
cmp.w titlecard_x_target(a0),d1
@@ -27289,15 +27327,15 @@ Obj34_MoveTowardsTargetPosition:
bra.w DisplaySprite
.return:
rts
-; End of function Obj34_MoveTowardsTargetPosition
+; End of function TitleCard_MoveTowardsTargetPosition
; ===========================================================================
BranchTo9_DeleteObject ; BranchTo
bra.w DeleteObject
; ===========================================================================
-; loc_13E42:
-Obj34_LeftPartOut: ; red part on the left, going out
+; loc_13E42: Obj34_LeftPartOut:
+TitleCard_LeftPartOut: ; red part on the left, going out
move.w titlecard_location(a0),d0
bpl.s +
move.b #$10,TitleCard_Bottom-TitleCard_Left+routine(a0)
@@ -27320,8 +27358,8 @@ Obj34_LeftPartOut: ; red part on the left, going out
+
bra.w loc_13EC4
; ===========================================================================
-; loc_13E84:
-Obj34_BottomPartOut: ; yellow part at the bottom, going out
+; loc_13E84: Obj34_BottomPartOut:
+TitleCard_BottomPartOut: ; yellow part at the bottom, going out
move.w titlecard_location(a0),d0
cmpi.w #$28,d0
bne.s +
@@ -27363,8 +27401,8 @@ loc_13EC4:
; ---------------------------------------------------------------------------
+ rts
; ===========================================================================
-; loc_13EE6:
-Obj34_BackgroundOutInit: ; the background, going out
+; loc_13EE6: Obj34_BackgroundOutInit:
+TitleCard_BackgroundOutInit: ; the background, going out
move.l a0,-(sp)
move.l d7,-(sp)
bsr.w DeformBgLayer
@@ -27372,8 +27410,8 @@ Obj34_BackgroundOutInit: ; the background, going out
movea.l (sp)+,a0 ; load 0bj address
addi_.b #2,routine(a0)
move.w #$F0,titlecard_location(a0)
-; loc_13EFE:
-Obj34_BackgroundOut:
+; loc_13EFE: Obj34_BackgroundOut:
+TitleCard_BackgroundOut:
move.w titlecard_location(a0),d0
subi.w #$20,d0
cmpi.w #-$30,d0
@@ -27382,8 +27420,8 @@ Obj34_BackgroundOut:
move.w d0,titlecard_vram_dest(a0)
rts
; ===========================================================================
-; loc_13F18:
-Obj34_WaitAndGoAway:
+; loc_13F18: Obj34_WaitAndGoAway:
+TitleCard_WaitAndGoAway:
tst.w anim_frame_duration(a0)
beq.s +
subq.w #1,anim_frame_duration(a0)
@@ -27393,19 +27431,19 @@ Obj34_WaitAndGoAway:
moveq #$20,d0
move.w x_pixel(a0),d1
cmp.w titlecard_x_source(a0),d1
- beq.s Obj34_LoadStandardWaterAndAnimalArt
+ beq.s TitleCard_LoadStandardWaterAndAnimalArt
bhi.s +
neg.w d0
+
sub.w d0,x_pixel(a0)
cmpi.w #$200,x_pixel(a0)
- bhi.s Obj34_LoadStandardWaterAndAnimalArt
+ bhi.s TitleCard_LoadStandardWaterAndAnimalArt
+
bra.w DisplaySprite
; ===========================================================================
-; loc_13F44:
-Obj34_LoadStandardWaterAndAnimalArt:
- cmpa.w #TitleCard_ZoneName,a0 ; is this the zone name object?
+; loc_13F44: Obj34_LoadStandardWaterAndAnimalArt:
+TitleCard_LoadStandardWaterAndAnimalArt:
+ cmpa.w #TitleCard_ZoneNameText,a0 ; is this the zone name object?
bne.s + ; if not, just delete the title card
moveq #PLCID_StdWtr,d0 ; load the standard water graphics
jsrto JmpTo3_LoadPLC
@@ -27444,20 +27482,21 @@ Animal_PLCTable: zoneOrderedTable 1,1
; ----------------------------------------------------------------------------
; Object 39 - Game/Time Over text
; ----------------------------------------------------------------------------
-; Sprite_13F74:
-Obj39: ; (screen-space obj)
+; Sprite_13F74: Obj39:
+Obj_GameOver: ; (screen-space obj)
moveq #0,d0
move.b routine(a0),d0
- move.w Obj39_Index(pc,d0.w),d1
- jmp Obj39_Index(pc,d1.w)
+ move.w GameOver_Index(pc,d0.w),d1
+ jmp GameOver_Index(pc,d1.w)
; ===========================================================================
-Obj39_Index: offsetTable
- offsetTableEntry.w Obj39_Init ; 0
- offsetTableEntry.w Obj39_SlideIn ; 2
- offsetTableEntry.w Obj39_Wait ; 4
+; off_13F82: Obj39_Index:
+GameOver_Index: offsetTable
+ offsetTableEntry.w GameOver_Init ; 0
+ offsetTableEntry.w GameOver_SlideIn ; 2
+ offsetTableEntry.w GameOver_Wait ; 4
; ===========================================================================
-; loc_13F88:
-Obj39_Init:
+; loc_13F88: Obj39_Init:
+GameOver_Init:
tst.l (Plc_Buffer).w
beq.s +
rts ; wait until the art is loaded
@@ -27470,24 +27509,24 @@ Obj39_Init:
move.w #$1F0,x_pixel(a0)
+
move.w #$F0,y_pixel(a0)
- move.l #Obj39_MapUnc_14C6C,mappings(a0)
+ move.l #MapUnc_GameOver,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Game_Over,0,1),art_tile(a0)
bsr.w Adjust2PArtPointer
move.b #0,render_flags(a0)
move.b #0,priority(a0)
-; loc_13FCC:
-Obj39_SlideIn:
+; loc_13FCC: Obj39_SlideIn:
+GameOver_SlideIn:
moveq #$10,d1
cmpi.w #$120,x_pixel(a0)
- beq.s Obj39_SetTimer
+ beq.s GameOver_SetTimer
blo.s +
neg.w d1
+
add.w d1,x_pixel(a0)
bra.w DisplaySprite
; ===========================================================================
-; loc_13FE2:
-Obj39_SetTimer:
+; loc_13FE2: Obj39_SetTimer:
+GameOver_SetTimer:
move.w #$2D0,anim_frame_duration(a0)
addq.b #2,routine(a0)
if fixBugs
@@ -27498,47 +27537,47 @@ Obj39_SetTimer:
rts
endif
; ===========================================================================
-; loc_13FEE:
-Obj39_Wait:
+; loc_13FEE: Obj39_Wait:
+GameOver_Wait:
btst #0,mapping_frame(a0)
- bne.w Obj39_Display
+ bne.w GameOver_Display
move.b (Ctrl_1_Press).w,d0
or.b (Ctrl_2_Press).w,d0
andi.b #button_B_mask|button_C_mask|button_A_mask,d0
- bne.s Obj39_Dismiss
+ bne.s GameOver_Dismiss
tst.w anim_frame_duration(a0)
- beq.s Obj39_Dismiss
+ beq.s GameOver_Dismiss
subq.w #1,anim_frame_duration(a0)
bra.w DisplaySprite
; ===========================================================================
-; loc_14014:
-Obj39_Dismiss:
+; loc_14014: Obj39_Dismiss:
+GameOver_Dismiss:
tst.b (Time_Over_flag).w
- bne.s Obj39_TimeOver
+ bne.s GameOver_TimeOver
tst.b (Time_Over_flag_2P).w
- bne.s Obj39_TimeOver
+ bne.s GameOver_TimeOver
move.b #GameModeID_ContinueScreen,(Game_Mode).w ; => ContinueScreen
tst.b (Continue_count).w
- bne.s Obj39_Check2PMode
+ bne.s GameOver_Check2PMode
move.b #GameModeID_SegaScreen,(Game_Mode).w ; => SegaScreen
- bra.s Obj39_Check2PMode
+ bra.s GameOver_Check2PMode
; ===========================================================================
-; loc_14034:
-Obj39_TimeOver:
+; loc_14034: Obj39_TimeOver:
+GameOver_TimeOver:
clr.l (Saved_Timer).w
move.w #1,(Level_Inactive_flag).w
-; loc_1403E:
-Obj39_Check2PMode:
+; loc_1403E: Obj39_Check2PMode:
+GameOver_Check2PMode:
tst.w (Two_player_mode).w
- beq.s Obj39_Display
+ beq.s GameOver_Display
move.w #0,(Level_Inactive_flag).w
move.b #GameModeID_2PResults,(Game_Mode).w ; => TwoPlayerResults
move.w #VsRSID_Act,(Results_Screen_2P).w
tst.b (Time_Over_flag).w
- bne.s Obj39_Display
+ bne.s GameOver_Display
tst.b (Time_Over_flag_2P).w
- bne.s Obj39_Display
+ bne.s GameOver_Display
move.w #1,(Game_Over_2P).w
move.w #VsRSID_Zone,(Results_Screen_2P).w
jsrto JmpTo_sub_8476
@@ -27548,8 +27587,8 @@ Obj39_Check2PMode:
addq.w #1,a4
+
move.b #-2,(a4)
-; BranchTo17_DisplaySprite
-Obj39_Display:
+; BranchTo17_DisplaySprite Obj39_Display:
+GameOver_Display:
bra.w DisplaySprite
; ===========================================================================
; ----------------------------------------------------------------------------
@@ -27566,7 +27605,7 @@ Obj3A: ; (screen-space obj)
Obj3A_Index: offsetTable
offsetTableEntry.w loc_140AC ; 0
offsetTableEntry.w loc_14102 ; 2
- offsetTableEntry.w BranchTo_Obj34_MoveTowardsTargetPosition ; 4
+ offsetTableEntry.w BranchTo_TitleCard_MoveTowardsTargetPosition ; 4
offsetTableEntry.w loc_14146 ; 6
offsetTableEntry.w loc_14168 ; 8
offsetTableEntry.w loc_1419C ; $A
@@ -27623,7 +27662,7 @@ loc_14102:
loc_14118:
move.b d0,mapping_frame(a0)
- bsr.w Obj34_MoveTowardsTargetPosition
+ bsr.w TitleCard_MoveTowardsTargetPosition
move.w x_pixel(a0),d0
cmp.w titlecard_x_target(a0),d0
bne.w return_14138
@@ -27637,9 +27676,9 @@ return_14138:
loc_1413A:
tst.w (Perfect_rings_left).w
bne.w DeleteObject
-
-BranchTo_Obj34_MoveTowardsTargetPosition ; BranchTo
- bra.w Obj34_MoveTowardsTargetPosition
+; BranchTo_Obj34_MoveTowardsTargetPosition
+BranchTo_TitleCard_MoveTowardsTargetPosition ; BranchTo
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
loc_14146:
@@ -27649,12 +27688,12 @@ loc_14146:
cmpi.b #wing_fortress_zone,d0
beq.s loc_1415E
cmpi.b #death_egg_zone,d0
- bne.w Obj34_MoveTowardsTargetPosition
+ bne.w TitleCard_MoveTowardsTargetPosition
loc_1415E:
move.b #5,mapping_frame(a0)
- bra.w Obj34_MoveTowardsTargetPosition
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
loc_14168:
@@ -27677,7 +27716,7 @@ loc_1418E:
loc_14194:
move.b d0,mapping_frame(a0)
- bra.w Obj34_MoveTowardsTargetPosition
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
loc_1419C:
@@ -27968,7 +28007,7 @@ Obj6F_Index: offsetTable
offsetTableEntry.w Obj6F_Emerald4 ; $E
offsetTableEntry.w Obj6F_Emerald5 ; $10
offsetTableEntry.w Obj6F_Emerald6 ; $12
- offsetTableEntry.w BranchTo3_Obj34_MoveTowardsTargetPosition ; $14
+ offsetTableEntry.w BranchTo3_TitleCard_MoveTowardsTargetPosition ; $14
offsetTableEntry.w Obj6F_P1Rings ; $16
offsetTableEntry.w Obj6F_P2Rings ; $18
offsetTableEntry.w Obj6F_DeleteIfNotEmerald ; $1A
@@ -28022,12 +28061,12 @@ Obj6F_InitEmeraldText:
+
move.w titlecard_x_target(a0),d0
cmp.w x_pixel(a0),d0
- bne.s BranchTo2_Obj34_MoveTowardsTargetPosition
+ bne.s BranchTo2_TitleCard_MoveTowardsTargetPosition
move.b #$1C,routine(a0) ; => Obj6F_TimedDisplay
move.w #$B4,anim_frame_duration(a0)
-
-BranchTo2_Obj34_MoveTowardsTargetPosition ; BranchTo
- bra.w Obj34_MoveTowardsTargetPosition
+; BranchTo2_Obj34_MoveTowardsTargetPosition
+BranchTo2_TitleCard_MoveTowardsTargetPosition ; BranchTo
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
;loc_14484
Obj6F_InitResultTitle:
@@ -28049,7 +28088,7 @@ Obj6F_InitResultTitle:
addq.w #1,d0 ; "Tails got a" or "Tails has all the"
+
move.b d0,mapping_frame(a0)
- bra.w Obj34_MoveTowardsTargetPosition
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
;loc_144B6
Obj6F_Emerald6:
@@ -28131,15 +28170,15 @@ loc_1455A:
addq.w #5,d0 ; Rings text with zero points
+
move.b d0,mapping_frame(a0)
-
-BranchTo3_Obj34_MoveTowardsTargetPosition ; BranchTo
- bra.w Obj34_MoveTowardsTargetPosition
+; BranchTo3_Obj34_MoveTowardsTargetPosition
+BranchTo3_TitleCard_MoveTowardsTargetPosition ; BranchTo
+ bra.w TitleCard_MoveTowardsTargetPosition
; ===========================================================================
;loc_14568
Obj6F_DeleteIfNotEmerald:
tst.b (Got_Emerald).w
beq.w DeleteObject
- bra.s BranchTo3_Obj34_MoveTowardsTargetPosition
+ bra.s BranchTo3_TitleCard_MoveTowardsTargetPosition
; ===========================================================================
;loc_14572
Obj6F_TimedDisplay:
@@ -28256,7 +28295,7 @@ Obj6F_InitAndMoveSuperMsg:
move.w x_pixel(a0),d0
cmp.w titlecard_x_source(a0),d0
bne.s Obj6F_MoveTowardsSourcePosition
- move.b #$14,next_object+routine(a0) ; => BranchTo3_Obj34_MoveTowardsTargetPosition
+ move.b #$14,next_object+routine(a0) ; => BranchTo3_TitleCard_MoveTowardsTargetPosition
subq.w #8,next_object+y_pixel(a0)
move.b #$1A,next_object+mapping_frame(a0) ; "Now Sonic can"
move.b #$34,routine(a0) ; => Obj6F_MoveAndDisplay
@@ -28267,14 +28306,14 @@ Obj6F_InitAndMoveSuperMsg:
clr.w x_pixel(a1)
move.w #$120,titlecard_x_target(a1)
move.w #$B4,y_pixel(a1)
- move.b #$14,routine(a1) ; => BranchTo3_Obj34_MoveTowardsTargetPosition
+ move.b #$14,routine(a1) ; => BranchTo3_TitleCard_MoveTowardsTargetPosition
move.b #$1C,mapping_frame(a1) ; "Super Sonic"
move.l #Obj6F_MapUnc_14ED0,mappings(a1)
move.b #$78,width_pixels(a1)
move.b #0,render_flags(a1)
bra.w DisplaySprite
; ===========================================================================
-; Modified copy of `Obj34_MoveTowardsTargetPosition`. It has a higher speed
+; Modified copy of `TitleCard_MoveTowardsTargetPosition`. It has a higher speed
; and moves the object toward its source instead of its destination.
;loc_14714 Obj6F_MoveToTargetPos
Obj6F_MoveTowardsSourcePosition:
@@ -28300,7 +28339,7 @@ Obj6F_MoveTowardsSourcePosition:
Obj6F_MoveAndDisplay:
move.w x_pixel(a0),d0
cmp.w titlecard_x_target(a0),d0
- bne.w Obj34_MoveTowardsTargetPosition
+ bne.w TitleCard_MoveTowardsTargetPosition
move.w #$B4,anim_frame_duration(a0)
move.b #$20,routine(a0) ; => Obj6F_TimedDisplay
if removeJmpTos
@@ -28336,15 +28375,15 @@ Obj6F_SubObjectMetaData_End:
MapUnc_TitleCards: mappingsTable
.zone_names: zoneOrderedOffsetTable 2,1
zoneOffsetTableEntry.w TC_EHZ ; Emerald Hill Zone
- zoneOffsetTableEntry.w TC_EHZ ; XXX unused (unknown)
+ zoneOffsetTableEntry.w TC_EHZ ; XXX unused (Ocean Wind Zone)
zoneOffsetTableEntry.w TC_EHZ ; XXX unused (Wood Zone)
- zoneOffsetTableEntry.w TC_EHZ ; XXX unused (unknown)
+ zoneOffsetTableEntry.w TC_EHZ ; XXX unused (Sand Shower Zone)
zoneOffsetTableEntry.w TC_MTZ ; Metropolis Zone Act 1 and 2
zoneOffsetTableEntry.w TC_MTZ ; Metropolis Zone Act 3
zoneOffsetTableEntry.w TC_WFZ ; Wing Fortress Zone
zoneOffsetTableEntry.w TC_HTZ ; Hill Top Zone
zoneOffsetTableEntry.w TC_HPZ ; XXX Hidden Palace Zone
- zoneOffsetTableEntry.w TC_EHZ ; XXX unused (Cyber City Zone)
+ zoneOffsetTableEntry.w TC_EHZ ; XXX unused (Rock World Zone)
zoneOffsetTableEntry.w TC_OOZ ; Oil Ocean Zone
zoneOffsetTableEntry.w TC_MCZ ; Mystic Cave Zone
zoneOffsetTableEntry.w TC_CNZ ; Casino Night Zone
@@ -28591,7 +28630,8 @@ TC_RedStripes_End
; -------------------------------------------------------------------------------
; sprite mappings
; -------------------------------------------------------------------------------
-Obj39_MapUnc_14C6C: include "mappings/sprite/obj39.asm"
+; Obj39_MapUnc_14C6C:
+MapUnc_GameOver: include "mappings/sprite/Game over and time over.asm"
; -------------------------------------------------------------------------------
; sprite mappings - end-of-level results screen title cards
@@ -28739,7 +28779,7 @@ Obj6F_MapUnc_14ED0: include "mappings/sprite/obj6F.asm"
;loc_15584: ; level title card drawing function called from Vint
DrawLevelTitleCard:
lea (VDP_data_port).l,a6
- tst.w (TitleCard_ZoneName+titlecard_leaveflag).w
+ tst.w (TitleCard_ZoneNameText+titlecard_leaveflag).w
bne.w loc_15670
moveq #$3F,d5
move.l #make_block_tile_pair(ArtTile_ArtNem_TitleCard+$5A,0,0,0,1),d6
@@ -28810,7 +28850,7 @@ loc_15614:
move.l #make_block_tile_pair_2p(ArtTile_ArtNem_TitleCard+$58,0,0,0,1),d6 ; VRAM location of graphic to fill on left side (2p)
loc_15634:
- lea (TitleCard_Left+titlecard_vram_dest).w,a0 ; obj34 red title card left side part
+ lea (TitleCard_Left+titlecard_vram_dest).w,a0 ; Obj_TitleCard red title card left side part
moveq #1,d7 ; Once for P1, once for P2 (if in 2p mode)
move.w #$8F80,VDP_control_port-VDP_data_port(a6) ; VRAM pointer increment: $0080
@@ -29684,27 +29724,27 @@ RunObjectDisplayOnly:
; This array contains the pointers to all the objects used in the game.
; ---------------------------------------------------------------------------
Obj_Index: ; ObjPtrs: ; loc_1600C:
-ObjPtr_Sonic: dc.l Obj01 ; Sonic
-ObjPtr_Tails: dc.l Obj02 ; Tails
-ObjPtr_PlaneSwitcher: dc.l Obj03 ; Collision plane/layer switcher
-ObjPtr_WaterSurface: dc.l Obj04 ; Surface of the water
-ObjPtr_TailsTails: dc.l Obj05 ; Tails' tails
-ObjPtr_Spiral: dc.l Obj06 ; Rotating cylinder in MTZ, twisting spiral pathway in EHZ
-ObjPtr_Oil: dc.l Obj07 ; Oil in OOZ
+ObjPtr_Sonic: dc.l Obj_Sonic ; Sonic
+ObjPtr_Tails: dc.l Obj_Tails ; Tails
+ObjPtr_PlaneSwitcher: dc.l Obj_PlaneSwitcher ; Collision plane/layer switcher
+ObjPtr_WaterSurface: dc.l Obj_WaterSurface ; Surface of the water
+ObjPtr_TailsTails: dc.l Obj_TailsTails ; Tails' tails
+ObjPtr_Spiral: dc.l Obj_Spiral ; Rotating cylinder in MTZ, twisting spiral pathway in EHZ
+ObjPtr_Oil: dc.l Obj_Oil ; Oil in OOZ
ObjPtr_SpindashDust:
-ObjPtr_Splash: dc.l Obj08 ; Water splash in Aquatic Ruin Zone, Spindash dust
-ObjPtr_SonicSS: dc.l Obj09 ; Sonic in Special Stage
-ObjPtr_SmallBubbles: dc.l Obj0A ; Small bubbles from Sonic's face while underwater
-ObjPtr_TippingFloor: dc.l Obj0B ; Section of pipe that tips you off from CPZ
- dc.l Obj0C ; Small floating platform (unused)
-ObjPtr_Signpost: dc.l Obj0D ; End of level signpost
-ObjPtr_TitleIntro: dc.l Obj0E ; Title screen intro animation
-ObjPtr_TitleMenu: dc.l Obj0F ; Title screen menu
+ObjPtr_Splash: dc.l Obj_SplashDust ; Water splash in Aquatic Ruin Zone, Spindash dust
+ObjPtr_SonicSS: dc.l Obj_SSSonic ; Sonic in Special Stage
+ObjPtr_SmallBubbles: dc.l Obj_SmallBubbles ; Small bubbles from Sonic's face while underwater
+ObjPtr_TippingFloor: dc.l Obj_TippingFloor ; Section of pipe that tips you off from CPZ
+ObjPtr_CPZUnusedPltfm: dc.l Obj_CPZUnusedPltfm ; Small floating platform (unused)
+ObjPtr_Signpost: dc.l Obj_Signpost ; End of level signpost
+ObjPtr_TitleIntro: dc.l Obj_TitleIntro ; Title screen intro animation
+ObjPtr_TitleMenu: dc.l Obj_TitleMenu ; Title screen menu
ObjPtr_TailsSS: dc.l Obj10 ; Tails in Special Stage
ObjPtr_Bridge: dc.l Obj11 ; Bridge in Emerald Hill Zone and Hidden Palace Zone
-ObjPtr_HPZEmerald: dc.l Obj12 ; Emerald from Hidden Palace Zone (unused)
-ObjPtr_HPZWaterfall: dc.l Obj13 ; Waterfall in Hidden Palace Zone (unused)
-ObjPtr_Seesaw: dc.l Obj14 ; Seesaw from Hill Top Zone
+ObjPtr_HPZEmerald: dc.l Obj_HPZEmerald ; Emerald from Hidden Palace Zone (unused)
+ObjPtr_HPZWaterfall: dc.l Obj_HPZWaterfall ; Waterfall in Hidden Palace Zone (unused)
+ObjPtr_Seesaw: dc.l Obj_Seesaw ; Seesaw from Hill Top Zone
ObjPtr_SwingingPlatform:dc.l Obj15 ; Swinging platform from Aquatic Ruin Zone
ObjPtr_HTZLift: dc.l Obj16 ; Diagonally moving lift from HTZ
dc.l Obj17 ; GHZ rotating log helix spikes (from Sonic 1, unused)
@@ -29717,7 +29757,7 @@ ObjPtr_HPZCollapsPform: dc.l Obj1A ; Collapsing platform from HPZ (and GHZ)
ObjPtr_SpeedBooster: dc.l Obj1B ; Speed booster from from CPZ
ObjPtr_Scenery:
ObjPtr_BridgeStake:
-ObjPtr_FallingOil: dc.l Obj1C ; Bridge stake in Emerald Hill Zone and Hill Top Zone, falling oil in Oil Ocean Zone
+ObjPtr_FallingOil: dc.l Obj_Scenery ; Bridge stake in Emerald Hill Zone and Hill Top Zone, falling oil in Oil Ocean Zone
ObjPtr_BlueBalls: dc.l Obj1D ; Blue balls in CPZ (jumping droplets hazard)
ObjPtr_CPZSpinTube: dc.l Obj1E ; Spin tube from CPZ
ObjPtr_CollapsPform: dc.l Obj1F ; Collapsing platform from ARZ, MCZ and OOZ (and MZ, SLZ and SBZ)
@@ -29726,31 +29766,31 @@ ObjPtr_2PResults: dc.l Obj21 ; 2P results
ObjPtr_ArrowShooter: dc.l Obj22 ; Arrow shooter from ARZ
ObjPtr_FallingPillar: dc.l Obj23 ; Pillar that drops its lower part from ARZ
ObjPtr_ARZBubbles: dc.l Obj24 ; Bubbles in Aquatic Ruin Zone
-ObjPtr_Ring: dc.l Obj25 ; A ring
-ObjPtr_Monitor: dc.l Obj26 ; Monitor
-ObjPtr_Explosion: dc.l Obj27 ; An explosion, giving off an animal and 100 points
-ObjPtr_Animal: dc.l Obj28 ; Animal and the 100 points from a badnik
-ObjPtr_Points: dc.l Obj29 ; "100 points" text
+ObjPtr_Ring: dc.l Obj_Ring ; A ring
+ObjPtr_Monitor: dc.l Obj_Monitor ; Monitor
+ObjPtr_Explosion: dc.l Obj_Explosion ; An explosion, giving off an animal and 100 points
+ObjPtr_Animal: dc.l Obj_Animal ; Animal and the 100 points from a badnik
+ObjPtr_Points: dc.l Obj_Points ; "100 points" text
ObjPtr_Stomper: dc.l Obj2A ; Stomper from MCZ
ObjPtr_RisingPillar: dc.l Obj2B ; Rising pillar from ARZ
ObjPtr_LeavesGenerator: dc.l Obj2C ; Sprite that makes leaves fly off when you hit it from ARZ
ObjPtr_Barrier: dc.l Obj2D ; One way barrier from CPZ and DEZ
-ObjPtr_MonitorContents: dc.l Obj2E ; Monitor contents (code for power-up behavior and rising image)
+ObjPtr_MonitorContents: dc.l Obj_MonitorContents ; Monitor contents (code for power-up behavior and rising image)
ObjPtr_SmashableGround: dc.l Obj2F ; Smashable ground in Hill Top Zone
ObjPtr_RisingLava: dc.l Obj30 ; Large rising lava during earthquake in HTZ
-ObjPtr_LavaMarker: dc.l Obj31 ; Lava collision marker
+ObjPtr_LavaMarker: dc.l Obj_LavaMarker ; Lava collision marker
ObjPtr_BreakableBlock:
ObjPtr_BreakableRock: dc.l Obj32 ; Breakable block/rock from CPZ and HTZ
ObjPtr_OOZPoppingPform: dc.l Obj33 ; Green platform from OOZ
-ObjPtr_TitleCard: dc.l Obj34 ; level title card (screen with red, yellow, and blue)
-ObjPtr_InvStars: dc.l Obj35 ; Invincibility Stars
+ObjPtr_TitleCard: dc.l Obj_TitleCard ; level title card (screen with red, yellow, and blue)
+ObjPtr_InvStars: dc.l Obj_InvStars ; Invincibility Stars
ObjPtr_Spikes: dc.l Obj36 ; Vertical spikes
-ObjPtr_LostRings: dc.l Obj37 ; Scattering rings (generated when Sonic is hurt and has rings)
-ObjPtr_Shield: dc.l Obj38 ; Shield
+ObjPtr_LostRings: dc.l Obj_LostRings ; Scattering rings (generated when Sonic is hurt and has rings)
+ObjPtr_Shield: dc.l Obj_Shield ; Shield
ObjPtr_GameOver:
-ObjPtr_TimeOver: dc.l Obj39 ; Game/Time Over text
+ObjPtr_TimeOver: dc.l Obj_GameOver ; Game/Time Over text
ObjPtr_Results: dc.l Obj3A ; End of level results screen
- dc.l Obj3B ; Purple rock (from Sonic 1, unused)
+ dc.l Obj3B ; Purple rock (leftover from S1) (unused)
dc.l Obj3C ; Breakable wall (leftover from S1) (mostly unused)
ObjPtr_OOZLauncher: dc.l Obj3D ; Block thingy in OOZ that launches you into the round ball things
ObjPtr_EggPrison: dc.l Obj3E ; Egg prison
@@ -29759,12 +29799,12 @@ ObjPtr_Springboard: dc.l Obj40 ; Pressure spring from CPZ, ARZ, and MCZ (the red
ObjPtr_Spring: dc.l Obj41 ; Spring
ObjPtr_SteamSpring: dc.l Obj42 ; Steam Spring from MTZ
ObjPtr_SlidingSpike: dc.l Obj43 ; Sliding spike obstacle thing from OOZ
-ObjPtr_RoundBumper: dc.l Obj44 ; Round bumper from Casino Night Zone
-ObjPtr_OOZSpring: dc.l Obj45 ; Pressure spring from OOZ
-ObjPtr_OOZBall: dc.l Obj46 ; Ball from OOZ (unused, beta leftover)
+ObjPtr_RoundBumper: dc.l Obj_RoundBumper ; Round bumper from Casino Night Zone
+ObjPtr_OOZSpring: dc.l Obj_OOZSpring ; Pressure spring from OOZ
+ObjPtr_OOZBall: dc.l Obj_OOZBall ; Ball from OOZ (unused, beta leftover)
ObjPtr_Button: dc.l Obj47 ; Button
ObjPtr_LauncherBall: dc.l Obj48 ; Round ball thing from OOZ that fires you off in a different direction
-ObjPtr_EHZWaterfall: dc.l Obj49 ; Waterfall from EHZ
+ObjPtr_EHZWaterfall: dc.l Obj_EHZWaterfall ; Waterfall from EHZ
ObjPtr_Octus: dc.l Obj4A ; Octus (octopus badnik) from OOZ
ObjPtr_Buzzer: dc.l Obj4B ; Buzzer (Buzz bomber) from EHZ
dc.l ObjNull ; Used to be the "BBat" badnik from HPZ
@@ -29790,7 +29830,7 @@ ObjPtr_StartBanner:
ObjPtr_EndingController:dc.l Obj5F ; Start banner/"Ending controller" from Special Stage
ObjPtr_SSRing: dc.l Obj60 ; Rings from Special Stage
ObjPtr_SSBomb: dc.l Obj61 ; Bombs from Special Stage
- dc.l ObjNull ; Obj62
+ dc.l ObjNull ; Used to be a timer for the Special Stage
ObjPtr_SSShadow: dc.l Obj63 ; Character shadow from Special Stage
ObjPtr_MTZTwinStompers: dc.l Obj64 ; Twin stompers from MTZ
ObjPtr_MTZLongPlatform: dc.l Obj65 ; Long moving platform from MTZ
@@ -29812,31 +29852,31 @@ ObjPtr_HPZBridgeStake:
ObjPtr_PulsingOrb: dc.l Obj71 ; Bridge stake and pulsing orb from Hidden Palace Zone
ObjPtr_CNZConveyorBelt: dc.l Obj72 ; Conveyor belt from CNZ
ObjPtr_RotatingRings: dc.l Obj73 ; Solid rotating ring thing from Mystic Cave Zone (mostly unused)
-ObjPtr_InvisibleBlock: dc.l Obj74 ; Invisible solid block
+ObjPtr_InvisibleBlock: dc.l Obj_InvisibleBlock ; Invisible solid block
ObjPtr_MCZBrick: dc.l Obj75 ; Brick from MCZ
ObjPtr_SlidingSpikes: dc.l Obj76 ; Spike block that slides out of the wall from MCZ
ObjPtr_MCZBridge: dc.l Obj77 ; Bridge from MCZ
ObjPtr_CPZStaircase: dc.l Obj78 ; Stairs from CPZ that move down to open the way
-ObjPtr_Starpost: dc.l Obj79 ; Star pole / starpost / checkpoint
+ObjPtr_Starpost: dc.l Obj_Starpost ; Star pole / starpost / checkpoint
ObjPtr_SidewaysPform: dc.l Obj7A ; Platform that moves back and fourth on top of water in CPZ
ObjPtr_PipeExitSpring: dc.l Obj7B ; Warp pipe exit spring from CPZ
-ObjPtr_CPZPylon: dc.l Obj7C ; Big pylon in foreground of CPZ
- dc.l Obj7D ; Points that can be gotten at the end of an act (unused leftover from S1)
-ObjPtr_SuperSonicStars: dc.l Obj7E ; Super Sonic's stars
+ObjPtr_CPZPylon: dc.l Obj_CPZPylon ; Big pylon in foreground of CPZ
+ObjPtr_HiddenBonus: dc.l Obj_HiddenBonus ; Points that can be gotten at the end of an act (unused leftover from S1)
+ObjPtr_SuperSonicStars: dc.l Obj_SuperSonicStars ; Super Sonic's stars
ObjPtr_VineSwitch: dc.l Obj7F ; Vine switch that you hang off in MCZ
ObjPtr_MovingVine: dc.l Obj80 ; Vine that you hang off and it moves down from MCZ
ObjPtr_MCZDrawbridge: dc.l Obj81 ; Long invisible vertical barrier
ObjPtr_SwingingPform: dc.l Obj82 ; Platform that is usually swinging, from ARZ
ObjPtr_ARZRotPforms: dc.l Obj83 ; 3 adjoined platforms from ARZ that rotate in a circle
ObjPtr_ForcedSpin:
-ObjPtr_PinballMode: dc.l Obj84 ; Pinball mode enable/disable (CNZ)
+ObjPtr_PinballMode: dc.l Obj_PinballMode ; Pinball mode enable/disable (CNZ)
ObjPtr_LauncherSpring: dc.l Obj85 ; Spring from CNZ that you hold jump on to pull back further
ObjPtr_Flipper: dc.l Obj86 ; Flipper from CNZ
ObjPtr_SSNumberOfRings: dc.l Obj87 ; Number of rings in Special Stage
ObjPtr_SSTailsTails: dc.l Obj88 ; Tails' tails in Special Stage
ObjPtr_ARZBoss: dc.l Obj89 ; ARZ boss
- dc.l Obj8A ; Sonic Team Presents/Credits (seemingly unused leftover from S1)
-ObjPtr_WFZPalSwitcher: dc.l Obj8B ; Cycling palette switcher from Wing Fortress Zone
+ObjPtr_S1CreditsText: dc.l Obj_S1CreditsText ; Sonic Team Presents/Credits (seemingly unused leftover from S1)
+ObjPtr_WFZPalSwitcher: dc.l Obj_WFZPalSwitcher ; Cycling palette switcher from Wing Fortress Zone
ObjPtr_Whisp: dc.l Obj8C ; Whisp (blowfly badnik) from ARZ
ObjPtr_GrounderInWall: dc.l Obj8D ; Grounder in wall, from ARZ
ObjPtr_GrounderInWall2: dc.l Obj8D ; Obj8E = Obj8D
@@ -29868,7 +29908,7 @@ ObjPtr_Grabber: dc.l ObjA7 ; Grabber (spider badnik) from CPZ
ObjPtr_GrabberLegs: dc.l ObjA8 ; Grabber's legs from CPZ
ObjPtr_GrabberBox: dc.l ObjA9 ; The little hanger box thing a Grabber's string comes out of
ObjPtr_GrabberString: dc.l ObjAA ; The thin white string a Grabber hangs from
- dc.l ObjAB ; Unknown (maybe unused?)
+ObjPtr_Grabber2: dc.l Obj_Grabber2 ; Grabber duplicate without AI
ObjPtr_Balkiry: dc.l ObjAC ; Balkiry (jet badnik) from SCZ
ObjPtr_CluckerBase: dc.l ObjAD ; Clucker's base from WFZ
ObjPtr_Clucker: dc.l ObjAE ; Clucker (chicken badnik) from WFZ
@@ -29876,7 +29916,7 @@ ObjPtr_MechaSonic: dc.l ObjAF ; Mecha Sonic / Silver Sonic from DEZ
ObjPtr_SonicOnSegaScr: dc.l ObjB0 ; Sonic on the Sega screen
ObjPtr_SegaHideTM: dc.l ObjB1 ; Object that hides TM symbol on JP region
ObjPtr_Tornado: dc.l ObjB2 ; The Tornado (Tails' plane)
-ObjPtr_Cloud: dc.l ObjB3 ; Clouds (placeable object) from SCZ
+ObjPtr_Cloud: dc.l Obj_SCZCloud ; Clouds (placeable object) from SCZ
ObjPtr_VPropeller: dc.l ObjB4 ; Vertical propeller from WFZ
ObjPtr_HPropeller: dc.l ObjB5 ; Horizontal propeller from WFZ
ObjPtr_TiltingPlatform: dc.l ObjB6 ; Tilting platform from WFZ
@@ -29884,7 +29924,7 @@ ObjPtr_VerticalLaser: dc.l ObjB7 ; Unused huge vertical laser from WFZ
ObjPtr_WallTurret: dc.l ObjB8 ; Wall turret from WFZ
ObjPtr_Laser: dc.l ObjB9 ; Laser from WFZ that shoots down the Tornado
ObjPtr_WFZWheel: dc.l ObjBA ; Wheel from WFZ
- dc.l ObjBB ; Unknown
+ObjPtr_WFZUnknown: dc.l Obj_WFZUnknown ; Unknown WFZ hazard (behaves like badnik)
ObjPtr_WFZShipFire: dc.l ObjBC ; Fire coming out of Robotnik's ship in WFZ
ObjPtr_SmallMetalPform: dc.l ObjBD ; Ascending/descending metal platforms from WFZ
ObjPtr_LateralCannon: dc.l ObjBE ; Lateral cannon (temporary platform that pops in/out) from WFZ
@@ -29898,14 +29938,14 @@ ObjPtr_WFZBoss: dc.l ObjC5 ; WFZ boss
ObjPtr_Eggman: dc.l ObjC6 ; Eggman
ObjPtr_Eggrobo: dc.l ObjC7 ; Eggrobo (final boss) from Death Egg
ObjPtr_Crawl: dc.l ObjC8 ; Crawl (shield badnik) from CNZ
-ObjPtr_TtlScrPalChanger:dc.l ObjC9 ; "Palette changing handler" from title screen
+ObjPtr_TtlScrPalChanger:dc.l Obj_TtlScrPalChanger ; "Palette changing handler" from title screen
ObjPtr_CutScene: dc.l ObjCA ; Cut scene at end of game
ObjPtr_EndingSeqClouds: dc.l ObjCB ; Background clouds from ending sequence
ObjPtr_EndingSeqTrigger:dc.l ObjCC ; Trigger for rescue plane and birds from ending sequence
ObjPtr_EndingSeqBird: dc.l ObjCD ; Birds from ending sequence
ObjPtr_EndingSeqSonic:
-ObjPtr_EndingSeqTails: dc.l ObjCE ; Sonic and Tails jumping off the plane from ending sequence
-ObjPtr_TornadoHelixes: dc.l ObjCF ;"Plane's helixes" from ending sequence
+ObjPtr_EndingSeqTails: dc.l Obj_EndingSeqChars ; Sonic and Tails jumping off the plane from ending sequence
+ObjPtr_TornadoHelixes: dc.l Obj_TornadoHelixes ; "Plane's helixes" from ending sequence
dc.l ObjNull ; ObjD0
dc.l ObjNull ; ObjD1
ObjPtr_CNZRectBlocks: dc.l ObjD2 ; Flashing blocks that appear and disappear in a rectangular shape that you can walk across, from CNZ
@@ -29914,18 +29954,18 @@ ObjPtr_CNZBigBlock: dc.l ObjD4 ; Big block from CNZ that moves back and fourth
ObjPtr_Elevator: dc.l ObjD5 ; Elevator from CNZ
ObjPtr_PointPokey: dc.l ObjD6 ; Pokey that gives out points from CNZ
ObjPtr_Bumper: dc.l ObjD7 ; Bumper from Casino Night Zone
-ObjPtr_BonusBlock: dc.l ObjD8 ; Block thingy from CNZ that disappears after 3 hits
-ObjPtr_Grab: dc.l ObjD9 ; Invisible sprite that you can hang on to, like the blocks in WFZ
+ObjPtr_BonusBlock: dc.l Obj_BonusBlock ; Block thingy from CNZ that disappears after 3 hits
+ObjPtr_Grab: dc.l Obj_Grab ; Invisible sprite that you can hang on to, like the blocks in WFZ
ObjPtr_ContinueText:
-ObjPtr_ContinueIcons: dc.l ObjDA ; Continue text
-ObjPtr_ContinueChars: dc.l ObjDB ; Sonic lying down or Tails nagging (continue screen)
-ObjPtr_RingPrize: dc.l ObjDC ; Ring prize from Casino Night Zone
+ObjPtr_ContinueIcons: dc.l Obj_ContinueText ; Continue text
+ObjPtr_ContinueChars: dc.l Obj_ContinueChars ; Sonic lying down or Tails nagging (continue screen)
+ObjPtr_RingPrize: dc.l Obj_RingPrize ; Ring prize from Casino Night Zone
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 4C, 4D, 4E, 4F, 62, D0, and D1
; Object removed from the game. All it does is deallocate its array.
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
ObjNull: ;;
bra.w DeleteObject
@@ -29955,8 +29995,8 @@ ObjectMoveAndFall:
move.l d3,y_pos(a0) ; store new y position
rts
; End of function ObjectMoveAndFall
-; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; ---------------------------------------------------------------------------
; Subroutine translating object speed to update object position
; This moves the object horizontally and vertically
@@ -29981,8 +30021,8 @@ ObjectMove:
move.l d3,y_pos(a0) ; update y-axis position
rts
; End of function ObjectMove
-; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; ---------------------------------------------------------------------------
; Routines to mark an enemy/monitor/ring/platform as destroyed
; ---------------------------------------------------------------------------
@@ -30582,7 +30622,7 @@ DrawSprite_Loop:
; developers placed an $80 byte large spill buffer after
; 'Sprite_Table', to 'catch' the overflow. Unfortunately, this spill
; buffer is not big enough to catch all overflow: this oversight is
- ; responsible for the famous 'Ashua' bug. To fix this, we'll just
+ ; responsible for the famous 'Ashura' bug. To fix this, we'll just
; undo this optimistaion. Sonic 3 & Knuckles undid this optimistaion
; too, but heavily optimised the rest of 'BuildSprites' to make up
; for it.
@@ -32088,7 +32128,7 @@ RingsMgr_SortRings:
; sprite mappings
; -------------------------------------------------------------------------------
-; Custom mappings format. Compare to Obj25_MapUnc_12382.
+; Custom mappings format. Compare to MapUnc_RingObj.
; Differences include...
; No 'sprite pieces per frame' value (hardcoded to 1)
@@ -34390,31 +34430,31 @@ word_19194_End
; Object 0D - End of level sign post
; ----------------------------------------------------------------------------
; OST:
-obj0D_spinframe = objoff_30 ; $30(a0)
-obj0D_sparkleframe = objoff_34 ; $34(a0)
-obj0D_finalanim = objoff_36 ; $36(a0) ; 4 if Tails only, 3 otherwise (determines what character to show)
+signpost_spinframe = objoff_30 ; $30(a0)
+signpost_sparkleframe = objoff_34 ; $34(a0)
+signpost_finalanim = objoff_36 ; $36(a0) ; 4 if Tails only, 3 otherwise (determines what character to show)
; ----------------------------------------------------------------------------
-
-Obj0D:
+; Sprite_191B8: Obj0D:
+Obj_Signpost:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj0D_Index(pc,d0.w),d1
- jsr Obj0D_Index(pc,d1.w)
- lea (Ani_obj0D).l,a1
+ move.w Signpost_Index(pc,d0.w),d1
+ jsr Signpost_Index(pc,d1.w)
+ lea (Ani_Signpost).l,a1
bsr.w AnimateSprite
bsr.w PLCLoad_Signpost
bra.w MarkObjGone
; ===========================================================================
-; off_191D8: Obj_0D_subtbl: Obj0D_States:
-Obj0D_Index: offsetTable
- offsetTableEntry.w Obj0D_Init ; 0
- offsetTableEntry.w Obj0D_Main ; 2
+; off_191D8: Obj_0D_subtbl: Obj0D_States: Obj0D_Index:
+Signpost_Index: offsetTable
+ offsetTableEntry.w Signpost_Init ; 0
+ offsetTableEntry.w Signpost_Main ; 2
; ===========================================================================
-; loc_191DC: Obj_0D_sub_0:
-Obj0D_Init:
+; loc_191DC: Obj_0D_sub_0: Obj0D_Init:
+Signpost_Init:
tst.w (Two_player_mode).w
beq.s loc_19208
- move.l #Obj0D_MapUnc_19656,mappings(a0)
+ move.l #MapUnc_Signpost2P,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_2p_Signpost,0,0),art_tile(a0)
move.b #-1,(Signpost_prev_frame).w
moveq #0,d1
@@ -34434,19 +34474,19 @@ loc_19208:
rts
; ---------------------------------------------------------------------------
loc_1921E:
- move.l #Obj0D_MapUnc_195BE,mappings(a0)
+ move.l #MapUnc_Signpost1P,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Signpost,0,0),art_tile(a0)
loc_1922C:
- addq.b #2,routine(a0) ; => Obj0D_Main
+ addq.b #2,routine(a0) ; => Signpost_Main
bsr.w Adjust2PArtPointer
move.b #1< Obj0D_Main_State2
+ move.b #2,routine_secondary(a0) ; => Signpost_Main_State2
cmpi.b #$C,(Loser_Time_Left).w
bhi.s loc_192A0
move.w (Level_Music).w,d0
jsr (PlayMusic).l ; play zone music
loc_192A0:
- tst.b obj0D_finalanim(a0)
+ tst.b signpost_finalanim(a0)
bne.w loc_19350
- move.b #3,obj0D_finalanim(a0)
+ move.b #3,signpost_finalanim(a0)
cmpi.w #2,(Player_mode).w
bne.s loc_192BC
- move.b #4,obj0D_finalanim(a0)
+ move.b #4,signpost_finalanim(a0)
loc_192BC:
tst.w (Two_player_mode).w
@@ -34499,18 +34539,18 @@ loc_192D6:
jsr (PlayMusic).l
clr.b (Update_HUD_timer_2P).w
move.w #(0<<8)|(1<<0),anim(a0)
- move.w #0,obj0D_spinframe(a0)
+ move.w #0,signpost_spinframe(a0)
move.w (Tails_Max_X_pos).w,(Tails_Min_X_pos).w
- move.b #2,routine_secondary(a0) ; => Obj0D_Main_State2
+ move.b #2,routine_secondary(a0) ; => Signpost_Main_State2
cmpi.b #$C,(Loser_Time_Left).w
bhi.s loc_1932E
move.w (Level_Music).w,d0
jsr (PlayMusic).l
loc_1932E:
- tst.b obj0D_finalanim(a0)
+ tst.b signpost_finalanim(a0)
bne.s loc_19350
- move.b #4,obj0D_finalanim(a0)
+ move.b #4,signpost_finalanim(a0)
tst.w (Two_player_mode).w
beq.s loc_19350
move.w #$3C3C,(Loser_Time_Left).w
@@ -34520,45 +34560,46 @@ loc_1932E:
loc_19350:
moveq #0,d0
move.b routine_secondary(a0),d0
- move.w Obj0D_Main_States(pc,d0.w),d1
- jmp Obj0D_Main_States(pc,d1.w)
+ move.w Signpost_Main_States(pc,d0.w),d1
+ jmp Signpost_Main_States(pc,d1.w)
; ===========================================================================
-Obj0D_Main_States: offsetTable
- offsetTableEntry.w Obj0D_Main_StateNull ; 0
- offsetTableEntry.w Obj0D_Main_State2 ; 2
- offsetTableEntry.w Obj0D_Main_State3 ; 4
- offsetTableEntry.w Obj0D_Main_State4 ; 6
+; off_1935E: Obj0D_Main_States:
+Signpost_Main_States: offsetTable
+ offsetTableEntry.w Signpost_Main_StateNull ; 0
+ offsetTableEntry.w Signpost_Main_State2 ; 2
+ offsetTableEntry.w Signpost_Main_State3 ; 4
+ offsetTableEntry.w Signpost_Main_State4 ; 6
; ===========================================================================
-; return_19366:
-Obj0D_Main_StateNull:
+; return_19366: Obj0D_Main_StateNull:
+Signpost_Main_StateNull:
rts
; ===========================================================================
-; loc_19368:
-Obj0D_Main_State2:
- subq.w #1,obj0D_spinframe(a0)
+; loc_19368: Obj0D_Main_State2:
+Signpost_Main_State2:
+ subq.w #1,signpost_spinframe(a0)
bpl.s loc_19398
- move.w #60,obj0D_spinframe(a0)
+ move.w #60,signpost_spinframe(a0)
addq.b #1,anim(a0)
cmpi.b #3,anim(a0)
bne.s loc_19398
- move.b #4,routine_secondary(a0) ; => Obj0D_Main_State3
- move.b obj0D_finalanim(a0),anim(a0)
+ move.b #4,routine_secondary(a0) ; => Signpost_Main_State3
+ move.b signpost_finalanim(a0),anim(a0)
tst.w (Two_player_mode).w
beq.s loc_19398
- move.b #6,routine_secondary(a0) ; => Obj0D_Main_State4
+ move.b #6,routine_secondary(a0) ; => Signpost_Main_State4
loc_19398:
subq.w #1,objoff_32(a0)
bpl.s return_19406
move.w #$B,objoff_32(a0)
moveq #0,d0
- move.b obj0D_sparkleframe(a0),d0
- addq.b #2,obj0D_sparkleframe(a0)
- andi.b #$E,obj0D_sparkleframe(a0)
- lea Obj0D_RingSparklePositions(pc,d0.w),a2
+ move.b signpost_sparkleframe(a0),d0
+ addq.b #2,signpost_sparkleframe(a0)
+ andi.b #$E,signpost_sparkleframe(a0)
+ lea Signpost_RingSparklePositions(pc,d0.w),a2
bsr.w AllocateObject
bne.s return_19406
- _move.b #ObjID_Ring,id(a1) ; load obj25 (a ring) for the sparkly effects over the signpost
+ _move.b #ObjID_Ring,id(a1) ; load Obj_Ring for the sparkly effects over the signpost
move.b #6,routine(a1) ; => Obj_25_sub_6
move.b (a2)+,d0
ext.w d0
@@ -34568,7 +34609,7 @@ loc_19398:
ext.w d0
add.w y_pos(a0),d0
move.w d0,y_pos(a1)
- move.l #Obj25_MapUnc_12382,mappings(a1)
+ move.l #MapUnc_RingObj,mappings(a1)
move.w #make_art_tile(ArtTile_ArtNem_Ring,1,0),art_tile(a1)
bsr.w Adjust2PArtPointer2
move.b #1< Obj0D_Main_StateNull
+ move.b #0,routine_secondary(a0) ; => Signpost_Main_StateNull
;loc_19452:
Load_EndOfAct:
lea (MainCharacter).w,a1 ; a1=character
@@ -34674,9 +34715,9 @@ TimeBonuses:
dc.w 50, 50, 50, 50, 0
TimeBonuses_End:
; ===========================================================================
-; loc_194FC:
-Obj0D_Main_State4:
- subq.w #1,obj0D_spinframe(a0)
+; loc_194FC: Obj0D_Main_State4:
+Signpost_Main_State4:
+ subq.w #1,signpost_spinframe(a0)
bpl.s return_19532
tst.b (Time_Over_flag).w
bne.s return_19532
@@ -34703,7 +34744,7 @@ PLCLoad_Signpost:
cmp.b (Signpost_prev_frame).w,d0
beq.s return_1958C
move.b d0,(Signpost_prev_frame).w
- lea (Obj0D_MapRUnc_196EE).l,a2
+ lea (MapRUnc_Signpost2P).l,a2
add.w d0,d0
adda.w (a2,d0.w),a2
move.w (a2)+,d5
@@ -34733,8 +34774,8 @@ return_1958C:
rts
; ===========================================================================
; animation script
-; off_1958E:
-Ani_obj0D: offsetTable
+; off_1958E: Ani_obj0D:
+Ani_Signpost: offsetTable
offsetTableEntry.w byte_19598 ; 0
offsetTableEntry.w byte_1959B ; 1
offsetTableEntry.w byte_195A9 ; 2
@@ -34750,26 +34791,26 @@ byte_195B7: dc.b $0F, $00, $FF
rev02even
byte_195BA: dc.b $0F, $01, $FF
even
-; -------------------------------------------------------------------------------
-; sprite mappings - Primary sprite table for object 0D (signpost)
-; -------------------------------------------------------------------------------
-; SprTbl_0D_Primary:
-Obj0D_MapUnc_195BE: include "mappings/sprite/obj0D_a.asm"
-; -------------------------------------------------------------------------------
-; sprite mappings - Secondary sprite table for object 0D (signpost)
-; -------------------------------------------------------------------------------
-; SprTbl_0D_Scndary:
-Obj0D_MapUnc_19656: include "mappings/sprite/obj0D_b.asm"
-; -------------------------------------------------------------------------------
-; dynamic pattern loading cues
-; -------------------------------------------------------------------------------
-Obj0D_MapRUnc_196EE: include "mappings/spriteDPLC/obj0D.asm"
-; ===========================================================================
-
- jmpTos ; Empty
+; ---------------------------------------------------------------------------
+; sprite mappings - signposts in one player
+; ---------------------------------------------------------------------------
+; SprTbl_0D_Primary: Obj0D_MapUnc_195BE:
+MapUnc_Signpost1P: include "mappings/sprite/1P signpost.asm"
+; ---------------------------------------------------------------------------
+; sprite mappings - signposts in two player
+; ---------------------------------------------------------------------------
+; SprTbl_0D_Scndary: Obj0D_MapUnc_19656:
+MapUnc_Signpost2P: include "mappings/sprite/2P signpost.asm"
+; ---------------------------------------------------------------------------
+; dynamic pattern loading cues - signposts in two player
+; ---------------------------------------------------------------------------
+; Obj0D_MapRUnc_196EE:
+MapRUnc_Signpost2P: include "mappings/spriteDPLC/2P signpost.asm"
+; ===========================================================================
+ jmpTos ; Empty
; ---------------------------------------------------------------------------
; Solid object subroutines (includes spikes, blocks, rocks etc)
@@ -34833,7 +34874,8 @@ return_19776:
; ===========================================================================
; there are a few slightly different SolidObject functions
-; specialized for certain objects, in this case, obj74 and obj30
+; specialized for certain objects, in this case, Obj_InvisibleBlock
+; and obj30
; These check for solidity even if the object is off-screen
; loc_19778: SolidObject74_30:
SolidObject_Always:
@@ -35827,32 +35869,32 @@ loc_19F4C:
; ----------------------------------------------------------------------------
; Object 01 - Sonic
; ----------------------------------------------------------------------------
-; Sprite_19F50: Object_Sonic:
-Obj01:
+; Sprite_19F50: Object_Sonic: Obj01:
+Obj_Sonic:
; a0=character
tst.w (Debug_placement_mode).w ; is debug mode being used?
- beq.s Obj01_Normal ; if not, branch
+ beq.s Sonic_Normal ; if not, branch
jmp (DebugMode).l
; ---------------------------------------------------------------------------
-; loc_19F5C:
-Obj01_Normal:
+; loc_19F5C: Obj01_Normal:
+Sonic_Normal:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj01_Index(pc,d0.w),d1
- jmp Obj01_Index(pc,d1.w)
-; ===========================================================================
-; off_19F6A: Obj01_States:
-Obj01_Index: offsetTable
- offsetTableEntry.w Obj01_Init ; 0
- offsetTableEntry.w Obj01_Control ; 2
- offsetTableEntry.w Obj01_Hurt ; 4
- offsetTableEntry.w Obj01_Dead ; 6
- offsetTableEntry.w Obj01_Gone ; 8
- offsetTableEntry.w Obj01_Respawning ; $A
-; ===========================================================================
-; loc_19F76: Obj_01_Sub_0: Obj01_Main:
-Obj01_Init:
- addq.b #2,routine(a0) ; => Obj01_Control
+ move.w Sonic_Index(pc,d0.w),d1
+ jmp Sonic_Index(pc,d1.w)
+; ===========================================================================
+; off_19F6A: Obj01_States: Obj01_Index:
+Sonic_Index: offsetTable
+ offsetTableEntry.w Sonic_Init ; 0
+ offsetTableEntry.w Sonic_Control ; 2
+ offsetTableEntry.w Sonic_Hurt ; 4
+ offsetTableEntry.w Sonic_Dead ; 6
+ offsetTableEntry.w Sonic_Gone ; 8
+ offsetTableEntry.w Sonic_Respawning ; $A
+; ===========================================================================
+; loc_19F76: Obj_01_Sub_0: Obj01_Main: Obj01_Init:
+Sonic_Init:
+ addq.b #2,routine(a0) ; => Sonic_Control
move.b #$13,y_radius(a0) ; this sets Sonic's collision height (2*pixels)
move.b #9,x_radius(a0)
move.l #MapUnc_Sonic,mappings(a0)
@@ -35863,7 +35905,7 @@ Obj01_Init:
move.w #$C,(Sonic_acceleration).w ; set Sonic's acceleration
move.w #$80,(Sonic_deceleration).w ; set Sonic's deceleration
tst.b (Last_star_pole_hit).w
- bne.s Obj01_Init_Continued
+ bne.s Sonic_Init_Continued
; only happens when not starting at a checkpoint:
move.w #make_art_tile(ArtTile_ArtUnc_Sonic,0,0),art_tile(a0)
bsr.w Adjust2PArtPointer
@@ -35873,8 +35915,8 @@ Obj01_Init:
move.w y_pos(a0),(Saved_y_pos).w
move.w art_tile(a0),(Saved_art_tile).w
move.w top_solid_bit(a0),(Saved_Solid_bits).w
-
-Obj01_Init_Continued:
+; Obj01_Init_Continued:
+Sonic_Init_Continued:
move.b #0,flips_remaining(a0)
move.b #4,flip_speed(a0)
move.b #0,(Super_Sonic_flag).w
@@ -35895,8 +35937,8 @@ Obj01_Init_Continued:
; ---------------------------------------------------------------------------
; Normal state for Sonic
; ---------------------------------------------------------------------------
-; loc_1A030: Obj_01_Sub_2:
-Obj01_Control:
+; loc_1A030: Obj_01_Sub_2: Obj01_Control:
+Sonic_Control:
tst.w (Debug_mode_flag).w ; is debug cheat enabled?
beq.s + ; if not, branch
btst #button_B,(Ctrl_1_Press).w ; is button B pressed?
@@ -35914,8 +35956,8 @@ Obj01_Control:
moveq #0,d0
move.b status(a0),d0
andi.w #1< Obj01_Control
+ subq.b #2,routine(a0) ; => Sonic_Control
move.w #$78,invulnerable_time(a0)
move.b #0,spindash_flag(a0)
@@ -37859,7 +37904,7 @@ JmpTo_KillCharacter ; JmpTo
; seems to be unused
; loc_1B1CA:
Sonic_HurtInstantRecover:
- subq.b #2,routine(a0) ; => Obj01_Control
+ subq.b #2,routine(a0) ; => Sonic_Control
move.b #0,routine_secondary(a0)
bsr.w Sonic_RecordPos
bsr.w Sonic_Animate
@@ -37872,8 +37917,8 @@ Sonic_HurtInstantRecover:
; ...poor Sonic
; ---------------------------------------------------------------------------
-; loc_1B1E6: Obj_01_Sub_6:
-Obj01_Dead:
+; loc_1B1E6: Obj_01_Sub_6: Obj01_Dead:
+Sonic_Dead:
tst.w (Debug_mode_flag).w
beq.s +
btst #button_B,(Ctrl_1_Press).w
@@ -37899,22 +37944,22 @@ CheckGameOver:
addi.w #$100,d0
cmp.w y_pos(a0),d0
bge.w return_1B31A
- move.b #8,routine(a0) ; => Obj01_Gone
+ move.b #8,routine(a0) ; => Sonic_Gone
move.w #60,restart_countdown(a0)
addq.b #1,(Update_HUD_lives).w ; update lives counter
subq.b #1,(Life_count).w ; subtract 1 from number of lives
- bne.s Obj01_ResetLevel ; if it's not a game over, branch
+ bne.s Sonic_ResetLevel ; if it's not a game over, branch
move.w #0,restart_countdown(a0)
move.b #ObjID_GameOver,(GameOver_GameText+id).w ; load Obj39 (game over text)
move.b #ObjID_GameOver,(GameOver_OverText+id).w ; load Obj39 (game over text)
move.b #1,(GameOver_OverText+mapping_frame).w
move.w a0,(GameOver_GameText+parent).w
clr.b (Time_Over_flag).w
-; loc_1B26E:
-Obj01_Finished:
+; loc_1B26E: Obj01_Finished:
+Sonic_Finished:
clr.b (Update_HUD_timer).w
clr.b (Update_HUD_timer_2P).w
- move.b #8,routine(a0) ; => Obj01_Gone
+ move.b #8,routine(a0) ; => Sonic_Gone
move.w #MusID_GameOver,d0
jsr (PlayMusic).l
moveq #PLCID_GameOver,d0
@@ -37925,23 +37970,24 @@ Obj01_Finished:
; ---------------------------------------------------------------------------
; Sonic when the level is restarted
; ---------------------------------------------------------------------------
-; loc_1B28E:
-Obj01_ResetLevel:
+; loc_1B28E: Obj01_ResetLevel:
+Sonic_ResetLevel:
tst.b (Time_Over_flag).w
- beq.s Obj01_ResetLevel_Part2
+ beq.s Sonic_ResetLevel_Part2
move.w #0,restart_countdown(a0)
move.b #ObjID_TimeOver,(TimeOver_TimeText+id).w ; load Obj39
move.b #ObjID_TimeOver,(TimeOver_OverText+id).w ; load Obj39
move.b #2,(TimeOver_TimeText+mapping_frame).w
move.b #3,(TimeOver_OverText+mapping_frame).w
move.w a0,(TimeOver_TimeText+parent).w
- bra.s Obj01_Finished
+ bra.s Sonic_Finished
; ---------------------------------------------------------------------------
-Obj01_ResetLevel_Part2:
+; Obj01_ResetLevel_Part2:
+Sonic_ResetLevel_Part2:
tst.w (Two_player_mode).w
beq.s return_1B31A
move.b #0,(Scroll_lock).w
- move.b #$A,routine(a0) ; => Obj01_Respawning
+ move.b #$A,routine(a0) ; => Sonic_Respawning
move.w (Saved_x_pos).w,x_pos(a0)
move.w (Saved_y_pos).w,y_pos(a0)
move.w (Saved_art_tile).w,art_tile(a0)
@@ -37959,12 +38005,13 @@ Obj01_ResetLevel_Part2:
return_1B31A:
rts
+
; ===========================================================================
; ---------------------------------------------------------------------------
; Sonic when he's offscreen and waiting for the level to restart
; ---------------------------------------------------------------------------
-; loc_1B31C: Obj_01_Sub_8:
-Obj01_Gone:
+; loc_1B31C: Obj_01_Sub_8: Obj01_Gone:
+Sonic_Gone:
tst.w restart_countdown(a0)
beq.s +
subq.w #1,restart_countdown(a0)
@@ -37972,23 +38019,24 @@ Obj01_Gone:
move.w #1,(Level_Inactive_flag).w
+
rts
+
; ===========================================================================
; ---------------------------------------------------------------------------
; Sonic when he's waiting for the camera to scroll back to where he respawned
; ---------------------------------------------------------------------------
-; loc_1B330: Obj_01_Sub_A:
-Obj01_Respawning:
+; loc_1B330: Obj_01_Sub_A: Obj01_Respawning:
+Sonic_Respawning:
tst.w (Camera_X_pos_diff).w
bne.s +
tst.w (Camera_Y_pos_diff).w
bne.s +
- move.b #2,routine(a0) ; => Obj01_Control
+ move.b #2,routine(a0) ; => Sonic_Control
+
bsr.w Sonic_Animate
bsr.w LoadSonicDynPLC
jmp (DisplaySprite).l
-; ===========================================================================
+; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to animate Sonic's sprites
; See also: AnimateSprite
@@ -38493,8 +38541,8 @@ return_1B89A:
; ----------------------------------------------------------------------------
; Object 02 - Tails
; ----------------------------------------------------------------------------
-; Sprite_1B8A4: Object_Tails:
-Obj02:
+; Sprite_1B8A4: Object_Tails: Obj02:
+Obj_Tails:
; a0=character
cmpi.w #2,(Player_mode).w
bne.s +
@@ -38504,21 +38552,21 @@ Obj02:
+
moveq #0,d0
move.b routine(a0),d0
- move.w Obj02_Index(pc,d0.w),d1
- jmp Obj02_Index(pc,d1.w)
-; ===========================================================================
-; off_1B8CC: Obj02_States:
-Obj02_Index: offsetTable
- offsetTableEntry.w Obj02_Init ; 0
- offsetTableEntry.w Obj02_Control ; 2
- offsetTableEntry.w Obj02_Hurt ; 4
- offsetTableEntry.w Obj02_Dead ; 6
- offsetTableEntry.w Obj02_Gone ; 8
- offsetTableEntry.w Obj02_Respawning ; $A
-; ===========================================================================
-; loc_1B8D8: Obj02_Main:
-Obj02_Init:
- addq.b #2,routine(a0) ; => Obj02_Normal
+ move.w Tails_Index(pc,d0.w),d1
+ jmp Tails_Index(pc,d1.w)
+; ===========================================================================
+; off_1B8CC: Obj02_States: Obj02_Index:
+Tails_Index: offsetTable
+ offsetTableEntry.w Tails_Init ; 0
+ offsetTableEntry.w Tails_Control ; 2
+ offsetTableEntry.w Tails_Hurt ; 4
+ offsetTableEntry.w Tails_Dead ; 6
+ offsetTableEntry.w Tails_Gone ; 8
+ offsetTableEntry.w Tails_Respawning ; $A
+; ===========================================================================
+; loc_1B8D8: Obj02_Main: Obj02_Init:
+Tails_Init:
+ addq.b #2,routine(a0) ; => Tails_Normal
move.b #$F,y_radius(a0) ; this sets Tails' collision height (2*pixels) to less than Sonic's height
move.b #9,x_radius(a0)
move.l #MapUnc_Tails,mappings(a0)
@@ -38529,9 +38577,9 @@ Obj02_Init:
move.w #$C,(Tails_acceleration).w ; set Tails' acceleration
move.w #$80,(Tails_deceleration).w ; set Tails' deceleration
cmpi.w #2,(Player_mode).w
- bne.s Obj02_Init_2Pmode
+ bne.s Tails_Init_2Pmode
tst.b (Last_star_pole_hit).w
- bne.s Obj02_Init_Continued
+ bne.s Tails_Init_Continued
; only happens when not starting at a checkpoint:
move.w #make_art_tile(ArtTile_ArtUnc_Tails,0,0),art_tile(a0)
bsr.w Adjust2PArtPointer
@@ -38541,18 +38589,18 @@ Obj02_Init:
move.w y_pos(a0),(Saved_y_pos).w
move.w art_tile(a0),(Saved_art_tile).w
move.w top_solid_bit(a0),(Saved_Solid_bits).w
- bra.s Obj02_Init_Continued
+ bra.s Tails_Init_Continued
; ===========================================================================
-; loc_1B952:
-Obj02_Init_2Pmode:
+; loc_1B952: Obj02_Init_2Pmode:
+Tails_Init_2Pmode:
move.w #make_art_tile(ArtTile_ArtUnc_Tails,0,0),art_tile(a0)
bsr.w Adjust2PArtPointer
move.w (MainCharacter+top_solid_bit).w,top_solid_bit(a0)
tst.w (MainCharacter+art_tile).w
- bpl.s Obj02_Init_Continued
+ bpl.s Tails_Init_Continued
ori.w #high_priority,art_tile(a0)
-; loc_1B96E:
-Obj02_Init_Continued:
+; loc_1B96E: Obj02_Init_Continued:
+Tails_Init_Continued:
move.w x_pos(a0),(Saved_x_pos_2P).w
move.w y_pos(a0),(Saved_y_pos_2P).w
move.w art_tile(a0),(Saved_art_tile_2P).w
@@ -38563,41 +38611,41 @@ Obj02_Init_Continued:
move.w #0,(Tails_CPU_routine).w ; set AI state to TailsCPU_Init
move.w #0,(Tails_control_counter).w
move.w #0,(Tails_respawn_counter).w
- move.b #ObjID_TailsTails,(Tails_Tails+id).w ; load Obj05 (Tails' Tails) at $FFFFD000
+ move.b #ObjID_TailsTails,(Tails_Tails+id).w ; load Obj_TailsTails at $FFFFD000
move.w a0,(Tails_Tails+parent).w ; set its parent object to this
; ---------------------------------------------------------------------------
; Normal state for Tails
; ---------------------------------------------------------------------------
-; loc_1B9B4:
-Obj02_Control:
+; loc_1B9B4: Obj02_Control:
+Tails_Control:
cmpa.w #MainCharacter,a0
- bne.s Obj02_Control_Joypad2
+ bne.s Tails_Control_Joypad2
move.w (Ctrl_1_Logical).w,(Ctrl_2_Logical).w
tst.b (Control_Locked).w ; are controls locked?
- bne.s Obj02_Control_Part2 ; if yes, branch
+ bne.s Tails_Control_Part2 ; if yes, branch
move.w (Ctrl_1).w,(Ctrl_2_Logical).w ; copy new held buttons, to enable joypad control
move.w (Ctrl_1).w,(Ctrl_1_Logical).w
- bra.s Obj02_Control_Part2
+ bra.s Tails_Control_Part2
; ---------------------------------------------------------------------------
-; loc_1B9D4:
-Obj02_Control_Joypad2:
+; loc_1B9D4: Obj02_Control_Joypad2:
+Tails_Control_Joypad2:
tst.b (Control_Locked_P2).w
bne.s +
move.w (Ctrl_2).w,(Ctrl_2_Logical).w
+
tst.w (Two_player_mode).w
- bne.s Obj02_Control_Part2
+ bne.s Tails_Control_Part2
bsr.w TailsCPU_Control
-; loc_1B9EA:
-Obj02_Control_Part2:
+; loc_1B9EA: Obj02_Control_Part2:
+Tails_Control_Part2:
btst #0,obj_control(a0) ; is Tails flying, or interacting with another object that holds him in place or controls his movement somehow?
bne.s + ; if yes, branch to skip Tails' control
moveq #0,d0
move.b status(a0),d0
andi.w #1< Obj02_Control
+ move.b #2,routine(a0) ; => Tails_Control
move.w #$78,invulnerable_time(a0)
move.b #0,spindash_flag(a0)
@@ -40704,12 +40755,12 @@ JmpTo2_KillCharacter ; JmpTo
; ---------------------------------------------------------------------------
; Tails when he dies
-; .
+; Poor bugger
; ---------------------------------------------------------------------------
-; loc_1CC50:
-Obj02_Dead:
- bsr.w Obj02_CheckGameOver
+; loc_1CC50: Obj02_Dead:
+Tails_Dead:
+ bsr.w Tails_CheckGameOver
jsr (ObjectMoveAndFall).l
bsr.w Tails_RecordPos
bsr.w Tails_Animate
@@ -40718,8 +40769,8 @@ Obj02_Dead:
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
-; loc_1CC6C:
-Obj02_CheckGameOver:
+; loc_1CC6C: Obj02_CheckGameOver:
+Tails_CheckGameOver:
cmpi.w #2,(Player_mode).w ; is it a Tails Alone game?
beq.w CheckGameOver ; if yes, branch... goodness, code reuse
move.b #1,(Scroll_lock_P2).w
@@ -40730,22 +40781,22 @@ Obj02_CheckGameOver:
bge.w return_1CD8E
move.b #2,routine(a0)
tst.w (Two_player_mode).w
- bne.s Obj02_CheckGameOver_2Pmode
+ bne.s Tails_CheckGameOver_2Pmode
bra.w TailsCPU_Despawn
; ---------------------------------------------------------------------------
-; loc_1CCA2:
-Obj02_CheckGameOver_2Pmode:
+; loc_1CCA2: Obj02_CheckGameOver_2Pmode:
+Tails_CheckGameOver_2Pmode:
addq.b #1,(Update_HUD_lives_2P).w
subq.b #1,(Life_count_2P).w
- bne.s Obj02_ResetLevel
+ bne.s Tails_ResetLevel
move.w #0,restart_countdown(a0)
move.b #ObjID_GameOver,(GameOver_GameText+id).w ; load Obj39
move.b #ObjID_GameOver,(GameOver_OverText+id).w ; load Obj39
move.b #1,(GameOver_OverText+mapping_frame).w
move.w a0,(GameOver_GameText+parent).w
clr.b (Time_Over_flag_2P).w
-; loc_1CCCC:
-Obj02_Finished:
+; loc_1CCCC: Obj02_Finished:
+Tails_Finished:
clr.b (Update_HUD_timer).w
clr.b (Update_HUD_timer_2P).w
move.b #8,routine(a0)
@@ -40753,22 +40804,22 @@ Obj02_Finished:
jsr (PlayMusic).l
moveq #PLCID_GameOver,d0
jmp (LoadPLC).l
-; End of function Obj02_CheckGameOver
+; End of function Tails_CheckGameOver
; ===========================================================================
; ---------------------------------------------------------------------------
; Tails when the level is restarted
; ---------------------------------------------------------------------------
-; loc_1CCEC:
-Obj02_ResetLevel:
+; loc_1CCEC: Obj02_ResetLevel:
+Tails_ResetLevel:
tst.b (Time_Over_flag).w
if gameRevision=0
- bne.s Obj02_ResetLevel_Part3
+ bne.s Tails_ResetLevel_Part3
else
- beq.s Obj02_ResetLevel_Part2
+ beq.s Tails_ResetLevel_Part2
tst.b (Time_Over_flag_2P).w
- beq.s Obj02_ResetLevel_Part3
+ beq.s Tails_ResetLevel_Part3
move.w #0,restart_countdown(a0)
clr.b (Update_HUD_timer).w
clr.b (Update_HUD_timer_2P).w
@@ -40777,20 +40828,22 @@ Obj02_ResetLevel:
endif
; ---------------------------------------------------------------------------
-Obj02_ResetLevel_Part2:
+; Obj02_ResetLevel_Part2:
+Tails_ResetLevel_Part2:
tst.b (Time_Over_flag_2P).w
- beq.s Obj02_ResetLevel_Part3
+ beq.s Tails_ResetLevel_Part3
move.w #0,restart_countdown(a0)
move.b #ObjID_TimeOver,(TimeOver_TimeText+id).w ; load Obj39
move.b #ObjID_TimeOver,(TimeOver_OverText+id).w ; load Obj39
move.b #2,(TimeOver_TimeText+mapping_frame).w
move.b #3,(TimeOver_OverText+mapping_frame).w
move.w a0,(TimeOver_TimeText+parent).w
- bra.s Obj02_Finished
+ bra.s Tails_Finished
; ---------------------------------------------------------------------------
-Obj02_ResetLevel_Part3:
+; Obj02_ResetLevel_Part3:
+Tails_ResetLevel_Part3:
move.b #0,(Scroll_lock_P2).w
- move.b #$A,routine(a0) ; => Obj02_Respawning
+ move.b #$A,routine(a0) ; => Tails_Respawning
move.w (Saved_x_pos_2P).w,x_pos(a0)
move.w (Saved_y_pos_2P).w,y_pos(a0)
move.w (Saved_art_tile_2P).w,art_tile(a0)
@@ -40807,12 +40860,13 @@ Obj02_ResetLevel_Part3:
return_1CD8E:
rts
+
; ===========================================================================
; ---------------------------------------------------------------------------
; Tails when he's offscreen and waiting for the level to restart
; ---------------------------------------------------------------------------
-; loc_1CD90:
-Obj02_Gone:
+; loc_1CD90: Obj02_Gone:
+Tails_Gone:
tst.w restart_countdown(a0)
beq.s +
subq.w #1,restart_countdown(a0)
@@ -40820,12 +40874,13 @@ Obj02_Gone:
move.w #1,(Level_Inactive_flag).w
+
rts
+
; ===========================================================================
; ---------------------------------------------------------------------------
; Tails when he's waiting for the camera to scroll back to where he respawned
; ---------------------------------------------------------------------------
-; loc_1CDA4:
-Obj02_Respawning:
+; loc_1CDA4: Obj02_Respawning:
+Tails_Respawning:
tst.w (Camera_X_pos_diff_P2).w
bne.s +
tst.w (Camera_Y_pos_diff_P2).w
@@ -40835,8 +40890,8 @@ Obj02_Respawning:
bsr.w Tails_Animate
bsr.w LoadTailsDynPLC
jmp (DisplaySprite).l
-; ===========================================================================
+; ===========================================================================
; ---------------------------------------------------------------------------
; Subroutine to animate Tails' sprites
; See also: AnimateSprite and Sonic_Animate
@@ -41087,7 +41142,7 @@ loc_1D006:
lsr.b #3,d0
andi.b #$C,d0
move.b d0,d3
- lea (Obj05Ani_Directional).l,a1
+ lea (TailsTailsAni_Directional).l,a1
move.b #3,anim_frame_duration(a0)
bsr.w TAnim_Do2
add.b d3,mapping_frame(a0)
@@ -41271,26 +41326,26 @@ TPLC_ReadEntry:
return_1D1FE:
rts
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 05 - Tails' tails
-; ----------------------------------------------------------------------------
-; Sprite_1D200:
-Obj05:
+; ---------------------------------------------------------------------------
+; Sprite_1D200: Obj05:
+Obj_TailsTails:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj05_Index(pc,d0.w),d1
- jmp Obj05_Index(pc,d1.w)
+ move.w TailsTails_Index(pc,d0.w),d1
+ jmp TailsTails_Index(pc,d1.w)
; ===========================================================================
-; off_1D20E: Obj05_States:
-Obj05_Index: offsetTable
- offsetTableEntry.w Obj05_Init ; 0
- offsetTableEntry.w Obj05_Main ; 2
+; off_1D20E: Obj05_States: Obj05_Index:
+TailsTails_Index: offsetTable
+ offsetTableEntry.w TailsTails_Init ; 0
+ offsetTableEntry.w TailsTails_Main ; 2
; ===========================================================================
Obj05_parent_prev_anim = objoff_30
-; loc_1D212
-Obj05_Init:
+; loc_1D212 Obj05_Init:
+TailsTails_Init:
addq.b #2,routine(a0) ; => Obj05_Main
move.l #MapUnc_Tails,mappings(a0)
move.w #make_art_tile(ArtTile_ArtUnc_Tails_Tails,0,0),art_tile(a0)
@@ -41298,9 +41353,8 @@ Obj05_Init:
move.b #2,priority(a0)
move.b #$18,width_pixels(a0)
move.b #1<
dc.b 3 ; TailsAni_Roll -> Directional
dc.b 3 ; TailsAni_Roll2 -> Directional
@@ -41376,91 +41430,98 @@ Obj05AniSelection:
; ---------------------------------------------------------------------------
; Animation script - Tails' tails
; ---------------------------------------------------------------------------
-; off_1D2C0:
-Obj05AniData: offsetTable
- offsetTableEntry.w Obj05Ani_Blank ; 0
- offsetTableEntry.w Obj05Ani_Swish ; 1
- offsetTableEntry.w Obj05Ani_Flick ; 2
- offsetTableEntry.w Obj05Ani_Directional ; 3
- offsetTableEntry.w Obj05Ani_DownLeft ; 4
- offsetTableEntry.w Obj05Ani_Down ; 5
- offsetTableEntry.w Obj05Ani_DownRight ; 6
- offsetTableEntry.w Obj05Ani_Spindash ; 7
- offsetTableEntry.w Obj05Ani_Skidding ; 8
- offsetTableEntry.w Obj05Ani_Pushing ; 9
- offsetTableEntry.w Obj05Ani_Hanging ; $A
-
-Obj05Ani_Blank: dc.b $20, 0,$FF
+; off_1D2C0: Obj05AniData:
+TailsTailsAniData: offsetTable
+ offsetTableEntry.w TailsTailsAni_Blank ; 0
+ offsetTableEntry.w TailsTailsAni_Swish ; 1
+ offsetTableEntry.w TailsTailsAni_Flick ; 2
+ offsetTableEntry.w TailsTailsAni_Directional ; 3
+ offsetTableEntry.w TailsTailsAni_DownLeft ; 4
+ offsetTableEntry.w TailsTailsAni_Down ; 5
+ offsetTableEntry.w TailsTailsAni_DownRight ; 6
+ offsetTableEntry.w TailsTailsAni_Spindash ; 7
+ offsetTableEntry.w TailsTailsAni_Skidding ; 8
+ offsetTableEntry.w TailsTailsAni_Pushing ; 9
+ offsetTableEntry.w TailsTailsAni_Hanging ; $A
+; Obj05Ani_Blank:
+TailsTailsAni_Blank: dc.b $20, 0,$FF
rev02even
-Obj05Ani_Swish: dc.b 7, 9, $A, $B, $C, $D,$FF
+; Obj05Ani_Swish:
+TailsTailsAni_Swish: dc.b 7, 9, $A, $B, $C, $D,$FF
rev02even
-Obj05Ani_Flick: dc.b 3, 9, $A, $B, $C, $D,$FD, 1
+; Obj05Ani_Flick:
+TailsTailsAni_Flick: dc.b 3, 9, $A, $B, $C, $D,$FD, 1
rev02even
-Obj05Ani_Directional: dc.b $FC,$49,$4A,$4B,$4C,$FF ; Tails is moving right
+; Obj05Ani_Directional:
+TailsTailsAni_Directional: dc.b $FC,$49,$4A,$4B,$4C,$FF ; Tails is moving right
rev02even
-Obj05Ani_DownLeft: dc.b 3,$4D,$4E,$4F,$50,$FF ; Tails is moving up-right
+; Obj05Ani_DownLeft:
+TailsTailsAni_DownLeft: dc.b 3,$4D,$4E,$4F,$50,$FF ; Tails is moving up-right
rev02even
-Obj05Ani_Down: dc.b 3,$51,$52,$53,$54,$FF ; Tails is moving up
+; Obj05Ani_Down:
+TailsTailsAni_Down: dc.b 3,$51,$52,$53,$54,$FF ; Tails is moving up
rev02even
-Obj05Ani_DownRight: dc.b 3,$55,$56,$57,$58,$FF ; Tails is moving up-left
+; Obj05Ani_DownRight:
+TailsTailsAni_DownRight: dc.b 3,$55,$56,$57,$58,$FF ; Tails is moving up-left
rev02even
-Obj05Ani_Spindash: dc.b 2,$81,$82,$83,$84,$FF
+; Obj05Ani_Spindash:
+TailsTailsAni_Spindash: dc.b 2,$81,$82,$83,$84,$FF
rev02even
-Obj05Ani_Skidding: dc.b 2,$87,$88,$89,$8A,$FF
+; Obj05Ani_Skidding:
+TailsTailsAni_Skidding: dc.b 2,$87,$88,$89,$8A,$FF
rev02even
-Obj05Ani_Pushing: dc.b 9,$87,$88,$89,$8A,$FF
+; Obj05Ani_Pushing:
+TailsTailsAni_Pushing: dc.b 9,$87,$88,$89,$8A,$FF
rev02even
-Obj05Ani_Hanging: dc.b 9,$81,$82,$83,$84,$FF
+; Obj05Ani_Hanging:
+TailsTailsAni_Hanging: dc.b 9,$81,$82,$83,$84,$FF
even
; ===========================================================================
jmpTos JmpTo2_KillCharacter
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 0A - Small bubbles from Sonic's face while underwater
-; ----------------------------------------------------------------------------
-obj0a_time_until_freeze = objoff_2C
-obj0a_current_dplc = objoff_2E
-obj0a_original_x_pos = objoff_30
-obj0a_seconds_between_numbers_timer = objoff_32
-obj0a_seconds_between_numbers = objoff_33
-obj0a_total_bubbles_to_spawn = objoff_34
-obj0a_flags = objoff_36
-obj0a_timer = objoff_38
-obj0a_next_bubble_timer = objoff_3A
-;obj0a_character = objoff_3C
+; ---------------------------------------------------------------------------
+smallbubbles_time_until_freeze = objoff_2C
+smallbubbles_current_dplc = objoff_2E
+smallbubbles_original_x_pos = objoff_30
+smallbubbles_seconds_between_numbers_timer = objoff_32
+smallbubbles_seconds_between_numbers = objoff_33
+smallbubbles_total_bubbles_to_spawn = objoff_34
+smallbubbles_flags = objoff_36
+smallbubbles_timer = objoff_38
+smallbubbles_next_bubble_timer = objoff_3A
+;smallbubbles_character = objoff_3C
-; Sprite_1D320:
-Obj0A:
+; Sprite_1D320: Obj0A:
+Obj_SmallBubbles:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj0A_Index(pc,d0.w),d1
- jmp Obj0A_Index(pc,d1.w)
-; ===========================================================================
-; off_1D32E: Obj0A_States:
-Obj0A_Index: offsetTable
- offsetTableEntry.w Obj0A_Init ; 0
- offsetTableEntry.w Obj0A_Animate ; 2
- offsetTableEntry.w Obj0A_ChkWater ; 4
- offsetTableEntry.w Obj0A_Display ; 6
- offsetTableEntry.w JmpTo5_DeleteObject ; 8
- offsetTableEntry.w Obj0A_Countdown ; $A
- offsetTableEntry.w Obj0A_AirLeft ; $C
- offsetTableEntry.w Obj0A_DisplayNumber ; $E
- offsetTableEntry.w JmpTo5_DeleteObject ; $10
-; ===========================================================================
-; loc_1D340: Obj0A_Main:
-Obj0A_Init:
+ move.w SmallBubbles_Index(pc,d0.w),d1
+ jmp SmallBubbles_Index(pc,d1.w)
+; ===========================================================================
+; off_1D32E: Obj0A_States: Obj0A_Index:
+SmallBubbles_Index: offsetTable
+ offsetTableEntry.w SmallBubbles_Init ; 0
+ offsetTableEntry.w SmallBubbles_Animate ; 2
+ offsetTableEntry.w SmallBubbles_ChkWater ; 4
+ offsetTableEntry.w SmallBubbles_Display ; 6
+ offsetTableEntry.w JmpTo5_DeleteObject ; 8
+ offsetTableEntry.w SmallBubbles_Countdown ; $A
+ offsetTableEntry.w SmallBubbles_AirLeft ; $C
+ offsetTableEntry.w SmallBubbles_DisplayNumber ; $E
+ offsetTableEntry.w JmpTo5_DeleteObject ; $10
+; ===========================================================================
+; loc_1D340: Obj0A_Main: Obj0A_Init:
+SmallBubbles_Init:
addq.b #2,routine(a0) ; Obj0A_Animate
; Use different mappings depending on which player the bubbles
; are coming from.
move.l #Obj24_MapUnc_1FBF6,mappings(a0)
- tst.b obj0a_character+3(a0)
+ tst.b smallbubbles_character+3(a0)
beq.s +
move.l #Obj24_MapUnc_1FC18,mappings(a0)
+
@@ -41470,62 +41531,60 @@ Obj0A_Init:
move.b #1,priority(a0)
move.b subtype(a0),d0
bpl.s loc_1D388
- addq.b #8,routine(a0) ; Obj0A_Countdown
+ addq.b #8,routine(a0) ; SmallBubbles_Countdown
andi.w #$7F,d0
; Yes, this is actually configurable, but it is normally only ever
; set to 2 seconds. The countdown starts at 12 seconds remaining, and
; the numbers count from 5 to 0, so 2 seconds is ideal.
- move.b d0,obj0a_seconds_between_numbers(a0)
- bra.w Obj0A_Countdown
+ move.b d0,smallbubbles_seconds_between_numbers(a0)
+ bra.w SmallBubbles_Countdown
; ===========================================================================
loc_1D388:
move.b d0,anim(a0)
- move.w x_pos(a0),obj0a_original_x_pos(a0)
+ move.w x_pos(a0),smallbubbles_original_x_pos(a0)
move.w #-$88,y_vel(a0)
-
-; loc_1D398:
-Obj0A_Animate:
- lea (Ani_obj0A).l,a1
+; loc_1D398: Obj0A_Animate:
+SmallBubbles_Animate:
+ lea (Ani_SmallBubbles).l,a1
jsr (AnimateSprite).l
-
-; loc_1D3A4:
-Obj0A_ChkWater:
+; loc_1D3A4: Obj0A_ChkWater:
+SmallBubbles_ChkWater:
move.w (Water_Level_1).w,d0
cmp.w y_pos(a0),d0 ; has bubble reached the water surface?
- blo.s Obj0A_Wobble ; if not, branch
+ blo.s SmallBubbles_Wobble ; if not, branch
; pop the bubble:
- move.b #6,routine(a0) ; Obj0A_Display
+ move.b #6,routine(a0) ; SmallBubbles_Display
addq.b #7,anim(a0)
cmpi.b #$D,anim(a0)
- beq.s Obj0A_Display
- blo.s Obj0A_Display
+ beq.s SmallBubbles_Display
+ blo.s SmallBubbles_Display
move.b #$D,anim(a0)
- bra.s Obj0A_Display
+ bra.s SmallBubbles_Display
; ===========================================================================
-; loc_1D3CA:
-Obj0A_Wobble:
+; loc_1D3CA: Obj0A_Wobble:
+SmallBubbles_Wobble:
; If in a wind-tunnel, then make the bubbles move to the right.
tst.b (WindTunnel_flag).w
beq.s +
- addq.w #4,obj0a_original_x_pos(a0)
+ addq.w #4,smallbubbles_original_x_pos(a0)
+
; Wiggle the bubble left and right.
move.b angle(a0),d0
addq.b #1,angle(a0)
andi.w #$7F,d0
- lea (Obj0A_WobbleData).l,a1
+ lea (SmallBubbles_WobbleData).l,a1
move.b (a1,d0.w),d0
ext.w d0
- add.w obj0a_original_x_pos(a0),d0
+ add.w smallbubbles_original_x_pos(a0),d0
move.w d0,x_pos(a0)
if fixBugs
; This isn't actually a bugfix: it's just that a later bugfix pushes
; this call out of range, so it has to be extended to a word.
- bsr.w Obj0A_BecomeNumberMaybe
+ bsr.w SmallBubbles_BecomeNumberMaybe
else
- bsr.s Obj0A_BecomeNumberMaybe
+ bsr.s SmallBubbles_BecomeNumberMaybe
endif
jsr (ObjectMove).l
_btst #render_flags.on_screen,render_flags(a0)
@@ -41536,22 +41595,21 @@ Obj0A_Wobble:
JmpTo4_DeleteObject ; JmpTo
jmp (DeleteObject).l
; ===========================================================================
-; loc_1D40E:
-Obj0A_DisplayNumber:
- movea.l obj0a_character(a0),a2 ; a2=character
+; loc_1D40E: Obj0A_DisplayNumber:
+SmallBubbles_DisplayNumber:
+ movea.l smallbubbles_character(a0),a2 ; a2=character
cmpi.b #12,air_left(a2)
bhi.s JmpTo5_DeleteObject
-
-; loc_1D41A:
-Obj0A_Display:
- bsr.s Obj0A_BecomeNumberMaybe
- lea (Ani_obj0A).l,a1
+; loc_1D41A: Obj0A_Display:
+SmallBubbles_Display:
+ bsr.s SmallBubbles_BecomeNumberMaybe
+ lea (Ani_SmallBubbles).l,a1
jsr (AnimateSprite).l
if fixBugs
; If you stand in very shallow water and begin drowning, the
; countdown graphics will appear incorrectly. The cause is a missing
- ; call to 'Obj0A_LoadCountdownArt'.
- bsr.w Obj0A_LoadCountdownArt
+ ; call to 'SmallBubbles_LoadCountdownArt'.
+ bsr.w SmallBubbles_LoadCountdownArt
endif
jmp (DisplaySprite).l
; ===========================================================================
@@ -41559,22 +41617,22 @@ Obj0A_Display:
JmpTo5_DeleteObject ; JmpTo
jmp (DeleteObject).l
; ===========================================================================
-; loc_1D434:
-Obj0A_AirLeft:
- movea.l obj0a_character(a0),a2 ; a2=character
+; loc_1D434: Obj0A_AirLeft:
+SmallBubbles_AirLeft:
+ movea.l smallbubbles_character(a0),a2 ; a2=character
cmpi.b #12,air_left(a2) ; check air remaining
bhi.s JmpTo6_DeleteObject ; if higher than $C, branch
- subq.w #1,obj0a_timer(a0)
- bne.s Obj0A_Display2
- move.b #$E,routine(a0) ; Obj0A_DisplayNumber
+ subq.w #1,smallbubbles_timer(a0)
+ bne.s SmallBubbles_Display2
+ move.b #$E,routine(a0) ; SmallBubbles_DisplayNumber
addq.b #7,anim(a0)
- bra.s Obj0A_Display
+ bra.s SmallBubbles_Display
; ===========================================================================
-; loc_1D452:
-Obj0A_Display2:
- lea (Ani_obj0A).l,a1
+; loc_1D452: Obj0A_Display2:
+SmallBubbles_Display2:
+ lea (Ani_SmallBubbles).l,a1
jsr (AnimateSprite).l
- bsr.w Obj0A_LoadCountdownArt
+ bsr.w SmallBubbles_LoadCountdownArt
_btst #render_flags.on_screen,render_flags(a0)
_beq.s JmpTo6_DeleteObject
jmp (DisplaySprite).l
@@ -41583,17 +41641,17 @@ Obj0A_Display2:
JmpTo6_DeleteObject ; JmpTo
jmp (DeleteObject).l
; ===========================================================================
-; loc_1D474: Obj0A_ShowNumber:
-Obj0A_BecomeNumberMaybe:
- tst.w obj0a_timer(a0)
+; loc_1D474: Obj0A_ShowNumber: Obj0A_BecomeNumberMaybe:
+SmallBubbles_BecomeNumberMaybe:
+ tst.w smallbubbles_timer(a0)
beq.s return_1D4BE
- subq.w #1,obj0a_timer(a0)
+ subq.w #1,smallbubbles_timer(a0)
bne.s return_1D4BE
cmpi.b #7,anim(a0)
bhs.s return_1D4BE
; Turn this bubble into a number.
- move.w #15,obj0a_timer(a0)
+ move.w #15,smallbubbles_timer(a0)
clr.w y_vel(a0)
move.b #1< loc_1DA80
- move.l #Obj35_MapUnc_1DCBC,mappings(a1)
+ move.l #MapUnc_InvStars,mappings(a1)
move.w #make_art_tile(ArtTile_ArtNem_Invincible_stars,0,0),art_tile(a1)
bsr.w Adjust2PArtPointer2
move.b #1< Obj79_Main
- move.l #Obj79_MapUnc_1F424,mappings(a0)
+ move.w Starpost_Index(pc,d0.w),d1
+ jmp Starpost_Index(pc,d1.w)
+; ===========================================================================
+; off_1F0C2: Obj79_States: Obj79_Index:
+Starpost_Index: offsetTable
+ offsetTableEntry.w Starpost_Init ; 0
+ offsetTableEntry.w Starpost_Main ; 2
+ offsetTableEntry.w Starpost_Animate ; 4
+ offsetTableEntry.w Starpost_Dongle ; 6
+ offsetTableEntry.w Starpost_Star ; 8
+; ===========================================================================
+; loc_1F0CC: Obj79_Init:
+Starpost_Init:
+ addq.b #2,routine(a0) ; => Starpost_Main
+ move.l #MapUnc_Starpost,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Checkpoint,0,0),art_tile(a0)
jsrto JmpTo3_Adjust2PArtPointer
move.b #1< Obj79_Dongle
+ _move.b #ObjID_Starpost,id(a1) ; load Obj_Starpost
+ move.b #6,routine(a1) ; => Starpost_Dongle
move.w x_pos(a0),objoff_30(a1)
move.w y_pos(a0),objoff_32(a1)
subi.w #$14,objoff_32(a1)
@@ -44192,11 +44250,11 @@ Obj79_CheckActivation:
beq.s loc_1F206
cmpi.w #50,(Ring_count).w
blo.s loc_1F206
- bsr.w Obj79_MakeSpecialStars
+ bsr.w Starpost_MakeSpecialStars
loc_1F206:
move.b #1,anim(a0)
- bsr.w Obj79_SaveData
+ bsr.w Starpost_SaveData
lea (Object_Respawn_Table).w,a2
moveq #0,d0
move.b respawn_index(a0),d0
@@ -44222,16 +44280,16 @@ loc_1F222:
return_1F22E:
rts
; ===========================================================================
-; loc_1F230:
-Obj79_Animate:
- lea (Ani_obj79).l,a1
+; loc_1F230: Obj79_Animate:
+Starpost_Animate:
+ lea (Ani_Starpost).l,a1
jsrto JmpTo2_AnimateSprite
jmp (MarkObjGone).l
; ===========================================================================
-; loc_1F240:
-Obj79_Dongle:
+; loc_1F240: Obj79_Dongle:
+Starpost_Dongle:
subq.w #1,objoff_36(a0)
- bpl.s Obj79_MoveDonglyThing
+ bpl.s Starpost_MoveDonglyThing
movea.w parent(a0),a1 ; a1=object
cmpi.b #ObjID_Starpost,id(a1)
bne.s +
@@ -44240,8 +44298,8 @@ Obj79_Dongle:
+
jmp (DeleteObject).l
; ===========================================================================
-; loc_1F262:
-Obj79_MoveDonglyThing:
+; loc_1F262: Obj79_MoveDonglyThing:
+Starpost_MoveDonglyThing:
move.b angle(a0),d0
subi.b #$10,angle(a0)
subi.b #$40,d0
@@ -44257,10 +44315,10 @@ Obj79_MoveDonglyThing:
jmp (MarkObjGone).l
; ===========================================================================
; hit a starpost / save checkpoint
-; loc_1F298:
-Obj79_SaveData:
- cmpa.w #MainCharacter,a3 ; is it player 1?
- bne.w Obj79_SaveDataPlayer2 ; if not, branch
+; loc_1F298: Obj79_SaveData:
+Starpost_SaveData:
+ cmpa.w #MainCharacter,a3 ; is it player 1?
+ bne.w Starpost_SaveDataPlayer2 ; if not, branch
move.b subtype(a0),(Last_star_pole_hit).w
move.b (Last_star_pole_hit).w,(Saved_Last_star_pole_hit).w
move.w x_pos(a0),(Saved_x_pos).w
@@ -44286,8 +44344,8 @@ Obj79_SaveData:
rts
; ===========================================================================
; second player hit a checkpoint in 2-player mode
-; loc_1F326:
-Obj79_SaveDataPlayer2:
+; loc_1F326: Obj79_SaveDataPlayer2:
+Starpost_SaveDataPlayer2:
move.b subtype(a0),(Last_star_pole_hit_2P).w
move.b (Last_star_pole_hit_2P).w,(Saved_Last_star_pole_hit_2P).w
move.w x_pos(a0),(Saved_x_pos_2P).w
@@ -44300,8 +44358,8 @@ Obj79_SaveDataPlayer2:
rts
; ===========================================================================
; continue from a starpost / load checkpoint
-; loc_1F35E:
-Obj79_LoadData:
+; loc_1F35E: Obj79_LoadData:
+Starpost_LoadData:
move.b (Saved_Last_star_pole_hit).w,(Last_star_pole_hit).w
move.w (Saved_x_pos).w,(MainCharacter+x_pos).w
move.w (Saved_y_pos).w,(MainCharacter+y_pos).w
@@ -44342,8 +44400,8 @@ return_1F412:
rts
; ===========================================================================
; animation script
-; off_1F414:
-Ani_obj79: offsetTable
+; off_1F414: Ani_obj79:
+Ani_Starpost: offsetTable
offsetTableEntry.w byte_1F41A ; 0
offsetTableEntry.w byte_1F41D ; 1
offsetTableEntry.w byte_1F420 ; 2
@@ -44356,28 +44414,30 @@ byte_1F41D:
byte_1F420:
dc.b 3, 0, 4,$FF
even
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj79_MapUnc_1F424: include "mappings/sprite/obj79_a.asm"
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
+; Obj79_MapUnc_1F424:
+MapUnc_Starpost: include "mappings/sprite/Starpost.asm"
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj79_MapUnc_1F4A0: include "mappings/sprite/obj79_b.asm"
-; ===========================================================================
+; ---------------------------------------------------------------------------
+; Obj79_MapUnc_1F4A0:
+MapUnc_Starpost_SpecialStars: include "mappings/sprite/Starpost stars.asm"
-; loc_1F4C4:
-Obj79_MakeSpecialStars:
+; ===========================================================================
+; loc_1F4C4: Obj79_MakeSpecialStars:
+Starpost_MakeSpecialStars:
moveq #4-1,d1 ; execute the loop 4 times (1 for each star)
moveq #0,d2
- bsr.w AllocateObjectAfterCurrent
bne.s + ; rts
- _move.b id(a0),id(a1) ; load obj79
- move.l #Obj79_MapUnc_1F4A0,mappings(a1)
+ _move.b id(a0),id(a1) ; load Obj_Starpost
+ move.l #MapUnc_Starpost_SpecialStars,mappings(a1)
move.w #make_art_tile(ArtTile_ArtNem_Checkpoint,0,0),art_tile(a1)
move.b #1< Obj79_Star
+ move.b #8,routine(a1) ; => Starpost_Star
move.w x_pos(a0),d0
move.w d0,x_pos(a1)
move.w d0,objoff_30(a1)
@@ -44396,8 +44456,8 @@ Obj79_MakeSpecialStars:
+
rts
; ===========================================================================
-; loc_1F536:
-Obj79_Star:
+; loc_1F536: Obj79_Star:
+Starpost_Star:
move.b collision_property(a0),d0
beq.w loc_1F554
andi.b #1,d0
@@ -44491,27 +44551,24 @@ JmpTo10_DeleteObject ; JmpTo
jmpTos JmpTo_MarkObjGone,JmpTo2_AnimateSprite,JmpTo3_Adjust2PArtPointer
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
-; Object 7D - Points that can be gotten at the end of an act (leftover from S1) (unused)
-; ----------------------------------------------------------------------------
-; Sprite_1F624:
-Obj7D:
+; ---------------------------------------------------------------------------
+; Object 7D - Points that can be gotten at the end of an act (leftover from S1) (unused)
+; ---------------------------------------------------------------------------
+; Sprite_1F624: Obj7D:
+Obj_HiddenBonus:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj7D_Index(pc,d0.w),d1
- jmp Obj7D_Index(pc,d1.w)
+ move.w HiddenBonus_Index(pc,d0.w),d1
+ jmp HiddenBonus_Index(pc,d1.w)
; ===========================================================================
-; off_1F632: Obj7D_States:
-Obj7D_Index: offsetTable
- offsetTableEntry.w Obj7D_Init ; 0
- offsetTableEntry.w Obj7D_Main ; 2
+; off_1F632: Obj7D_States: Obj7D_Index:
+HiddenBonus_Index: offsetTable
+ offsetTableEntry.w HiddenBonus_Init ; 0
+ offsetTableEntry.w HiddenBonus_Main ; 2
; ===========================================================================
-; loc_1F636:
-Obj7D_Init:
+; loc_1F636: Obj7D_Init:
+HiddenBonus_Init:
moveq #$10,d2
move.w d2,d3
add.w d3,d3
@@ -44520,18 +44577,18 @@ Obj7D_Init:
sub.w x_pos(a0),d0
add.w d2,d0
cmp.w d3,d0
- bhs.s Obj7D_NoAdd
+ bhs.s HiddenBonus_NoAdd
move.w y_pos(a1),d1
sub.w y_pos(a0),d1
add.w d2,d1
cmp.w d3,d1
- bhs.s Obj7D_NoAdd
+ bhs.s HiddenBonus_NoAdd
tst.w (Debug_placement_mode).w
- bne.s Obj7D_NoAdd
+ bne.s HiddenBonus_NoAdd
tst.b (f_bigring).w
- bne.s Obj7D_NoAdd
+ bne.s HiddenBonus_NoAdd
addq.b #2,routine(a0)
- move.l #Obj7D_MapUnc_1F6FE,mappings(a0)
+ move.l #MapUnc_HiddenBonus,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_EndPoints,0,1),art_tile(a0)
jsrto JmpTo4_Adjust2PArtPointer
ori.b #1< Obj44_Main
- move.l #Obj44_MapUnc_1F85A,mappings(a0)
+ move.w RoundBumper_Index(pc,d0.w),d1
+ jmp RoundBumper_Index(pc,d1.w)
+; ===========================================================================
+; off_1F73E: Obj44_States: Obj44_Index:
+RoundBumper_Index: offsetTable
+ offsetTableEntry.w RoundBumper_Init ; 0
+ offsetTableEntry.w RoundBumper_Main ; 2
+; ===========================================================================
+; loc_1F742: Obj44_Init:
+RoundBumper_Init:
+ addq.b #2,routine(a0) ; => RoundBumper_Main
+ move.l #MapUnc_RoundBumper,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_CNZRoundBumper,2,0),art_tile(a0)
jsrto JmpTo5_Adjust2PArtPointer
move.b #1< Obj03_MainX
- move.l #Obj03_MapUnc_1FFB8,mappings(a0)
+; loc_1FCF6: Obj03_Init:
+PlaneSwitcher_Init:
+ addq.b #2,routine(a0) ; => PlaneSwitcher_MainX
+ move.l #MapUnc_PlaneSwitcher,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Ring,1,0),art_tile(a0)
jsrto JmpTo7_Adjust2PArtPointer
ori.b #1< Obj03_MainY
+ beq.s PlaneSwitcher_Init_CheckX
+; Obj03_Init_CheckY: PlaneSwitcher_Init_CheckY:
+ addq.b #2,routine(a0) ; => PlaneSwitcher_MainY
andi.w #7,d0
move.b d0,mapping_frame(a0)
andi.w #3,d0
@@ -45175,7 +45224,7 @@ Obj03_Init:
bhs.s +
move.b #1,objoff_35(a0)
+
- bra.w Obj03_MainY
+ bra.w PlaneSwitcher_MainY
; ===========================================================================
word_1FD68:
dc.w $20
@@ -45183,8 +45232,8 @@ word_1FD68:
dc.w $80 ; 2
dc.w $100 ; 3
; ===========================================================================
-; loc_1FD70:
-Obj03_Init_CheckX:
+; loc_1FD70: Obj03_Init_CheckX:
+PlaneSwitcher_Init_CheckX:
andi.w #3,d0
move.b d0,mapping_frame(a0)
add.w d0,d0
@@ -45197,12 +45246,10 @@ Obj03_Init_CheckX:
+
lea (Sidekick).w,a1 ; a1=character
cmp.w x_pos(a1),d1
- bhs.s +
+ bhs.s PlaneSwitcher_MainX
move.b #1,objoff_35(a0)
-+
-
-; loc_1FDA4:
-Obj03_MainX:
+; loc_1FDA4: Obj03_MainX:
+PlaneSwitcher_MainX:
tst.w (Debug_placement_mode).w
bne.w return_1FEAC
move.w x_pos(a0),d1
@@ -45212,7 +45259,7 @@ Obj03_MainX:
lea (Sidekick).w,a1 ; a1=character
+ tst.b (a2)+
- bne.s Obj03_MainX_Alt
+ bne.s PlaneSwitcher_MainX_Alt
cmp.w x_pos(a1),d1
bhi.w return_1FEAC
move.b #1,-1(a2)
@@ -45246,8 +45293,8 @@ Obj03_MainX:
ori.w #high_priority,art_tile(a1)
bra.s return_1FEAC
; ===========================================================================
-; loc_1FE38:
-Obj03_MainX_Alt:
+; loc_1FE38: Obj03_MainX_Alt:
+PlaneSwitcher_MainX_Alt:
cmp.w x_pos(a1),d1
bls.w return_1FEAC
move.b #0,-1(a2)
@@ -45283,8 +45330,8 @@ Obj03_MainX_Alt:
return_1FEAC:
rts
; ===========================================================================
-
-Obj03_MainY:
+; loc_1FEAE: Obj03_MainY:
+PlaneSwitcher_MainY:
tst.w (Debug_placement_mode).w
bne.w return_1FFB6
move.w y_pos(a0),d1
@@ -45294,7 +45341,7 @@ Obj03_MainY:
lea (Sidekick).w,a1 ; a1=character
+ tst.b (a2)+
- bne.s Obj03_MainY_Alt
+ bne.s PlaneSwitcher_MainY_Alt
cmp.w y_pos(a1),d1
bhi.w return_1FFB6
move.b #1,-1(a2)
@@ -45328,8 +45375,8 @@ Obj03_MainY:
ori.w #high_priority,art_tile(a1)
bra.s return_1FFB6
; ===========================================================================
-; loc_1FF42:
-Obj03_MainY_Alt:
+; loc_1FF42: Obj03_MainY_Alt:
+PlaneSwitcher_MainY_Alt:
cmp.w y_pos(a1),d1
bls.w return_1FFB6
move.b #0,-1(a2)
@@ -45365,43 +45412,40 @@ Obj03_MainY_Alt:
return_1FFB6:
rts
; ===========================================================================
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj03_MapUnc_1FFB8: include "mappings/sprite/obj03.asm"
+; ---------------------------------------------------------------------------
+; Obj03_MapUnc_1FFB8:
+MapUnc_PlaneSwitcher: include "mappings/sprite/Pathswapper.asm"
; ===========================================================================
jmpTos JmpTo7_Adjust2PArtPointer
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 0B - Section of pipe that tips you off from CPZ
-; ----------------------------------------------------------------------------
-; Sprite_2009C:
-Obj0B:
+; ---------------------------------------------------------------------------
+tippingfloor_duration_current = objoff_30
+tippingfloor_duration_initial = objoff_32
+tippingfloor_delay = objoff_36
+
+; Sprite_2009C: Obj0B:
+Obj_TippingFloor:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj0B_Index(pc,d0.w),d1
- jmp Obj0B_Index(pc,d1.w)
+ move.w TippingFloor_Index(pc,d0.w),d1
+ jmp TippingFloor_Index(pc,d1.w)
; ===========================================================================
-; off_200AA:
-Obj0B_Index: offsetTable
- offsetTableEntry.w Obj0B_Init ; 0
+; off_200AA: Obj0B_Index:
+TippingFloor_Index: offsetTable
+ offsetTableEntry.w TippingFloor_Init ; 0
offsetTableEntry.w loc_20104 ; 2
offsetTableEntry.w loc_20112 ; 4
; ===========================================================================
-
-obj0B_duration_current = objoff_30
-obj0B_duration_initial = objoff_32
-obj0B_delay = objoff_36
-
-; loc_200B0:
-Obj0B_Init:
+; loc_200B0: Obj0B_Init:
+TippingFloor_Init:
addq.b #2,routine(a0)
- move.l #Obj0B_MapUnc_201A0,mappings(a0)
+ move.l #MapUnc_TippingFloor,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_CPZAnimatedBits,3,1),art_tile(a0)
jsrto JmpTo8_Adjust2PArtPointer
ori.b #1< Obj04_Action
- move.l #Obj04_MapUnc_20A0E,mappings(a0)
+ move.w WaterSurface_Index(pc,d0.w),d1
+ jmp WaterSurface_Index(pc,d1.w)
+; ===========================================================================
+; off_208EA: Obj04_Index:
+WaterSurface_Index: offsetTable
+ offsetTableEntry.w WaterSurface_Init ; 0
+ offsetTableEntry.w WaterSurface_Action ; 2
+ offsetTableEntry.w WaterSurface_Action2 ; 4
+; ===========================================================================
+; loc_208F0: Obj04_Main: Obj04_Init:
+WaterSurface_Init:
+ addq.b #2,routine(a0) ; => WaterSurface_Action
+ move.l #MapUnc_WaterSurface_CPZHPZ,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_WaterSurface,0,1),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
move.b #1< Obj31_Main
+; loc_20E02: Obj31_Init:
+LavaMarker_Init:
+ addq.b #2,routine(a0) ; => LavaMarker_Main
moveq #0,d0
move.b subtype(a0),d0
- move.b Obj31_CollisionFlagsBySubtype(pc,d0.w),collision_flags(a0)
+ move.b LavaMarker_CollisionFlagsBySubtype(pc,d0.w),collision_flags(a0)
if fixBugs
- move.l #Obj31_MapUnc_20E74,mappings(a0)
+ move.l #MapUnc_LavaMarker,mappings(a0)
else
; This dumb code is a workaround for the bug below.
- move.l #Obj31_MapUnc_20E6C,mappings(a0)
+ move.l #MapUnc_LavaMarker_Blank,mappings(a0)
tst.w (Debug_placement_mode).w
beq.s +
- move.l #Obj31_MapUnc_20E74,mappings(a0)
+ move.l #MapUnc_LavaMarker,mappings(a0)
+
endif
move.w #make_art_tile(ArtTile_ArtNem_Powerups,0,1),art_tile(a0)
@@ -46053,9 +46093,8 @@ Obj31_Init:
move.b #$80,width_pixels(a0)
move.b #4,priority(a0)
move.b subtype(a0),mapping_frame(a0)
-
-; loc_20E46:
-Obj31_Main:
+; loc_20E46: Obj31_Main:
+LavaMarker_Main:
tst.w (Two_player_mode).w
bne.s +
move.w x_pos(a0),d0
@@ -46076,39 +46115,38 @@ JmpTo18_DeleteObject ; JmpTo
endif
; ===========================================================================
if ~~fixBugs
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite non-mappings
-; -------------------------------------------------------------------------------
-Obj31_MapUnc_20E6C: include "mappings/sprite/obj31_a.asm"
+; ---------------------------------------------------------------------------
+; Obj31_MapUnc_20E6C:
+MapUnc_LavaMarker_Blank: include "mappings/sprite/Lava marker blank.asm"
endif
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj31_MapUnc_20E74: include "mappings/sprite/obj31_b.asm"
-; ===========================================================================
-
-
-
+; ---------------------------------------------------------------------------
+; Obj31_MapUnc_20E74:
+MapUnc_LavaMarker: include "mappings/sprite/Lava marker.asm"
-; ----------------------------------------------------------------------------
+; ===========================================================================
+; ---------------------------------------------------------------------------
; Object 74 - Invisible solid block
-; ----------------------------------------------------------------------------
-; Sprite_20EE0:
-Obj74:
+; ---------------------------------------------------------------------------
+; Sprite_20EE0: Obj74:
+Obj_InvisibleBlock:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj74_Index(pc,d0.w),d1
- jmp Obj74_Index(pc,d1.w)
-; ===========================================================================
-; off_20EEE: Obj74_States:
-Obj74_Index: offsetTable
- offsetTableEntry.w Obj74_Init ; 0
- offsetTableEntry.w Obj74_Main ; 2
-; ===========================================================================
-; loc_20EF2:
-Obj74_Init:
- addq.b #2,routine(a0) ; => Obj74_Main
- move.l #Obj74_MapUnc_20F66,mappings(a0)
+ move.w InvisibleBlock_Index(pc,d0.w),d1
+ jmp InvisibleBlock_Index(pc,d1.w)
+; ===========================================================================
+; off_20EEE: Obj74_States: Obj74_Index:
+InvisibleBlock_Index: offsetTable
+ offsetTableEntry.w InvisibleBlock_Init ; 0
+ offsetTableEntry.w InvisibleBlock_Main ; 2
+; ===========================================================================
+; loc_20EF2: Obj74_Init:
+InvisibleBlock_Init:
+ addq.b #2,routine(a0) ; => InvisibleBlock_Main
+ move.l #MapUnc_InvisibleBlock,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Powerups,0,1),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
ori.b #1< Obj7C_Main
- move.l #Obj7C_MapUnc_2103C,mappings(a0)
+ move.w CPZPylon_Index(pc,d0.w),d1
+ jmp CPZPylon_Index(pc,d1.w)
+; ===========================================================================
+; off_20FE0: Obj7C_States: Obj7C_Index:
+CPZPylon_Index: offsetTable
+ offsetTableEntry.w CPZPylon_Init ; 0
+ offsetTableEntry.w CPZPylon_Main ; 2
+; ===========================================================================
+; loc_20FE4: Obj7C_Init:
+CPZPylon_Init:
+ addq.b #2,routine(a0) ; => CPZPylon_Main
+ move.l #MapUnc_CPZPylon,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_CPZMetalThings,2,1),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
move.b #$10,width_pixels(a0)
move.b #7,priority(a0)
-
-; loc_21006:
-Obj7C_Main:
+; loc_21006: Obj7C_Main:
+CPZPylon_Main:
+ ; The coding for this object is mostly based on the SLZ pylon from
+ ; Sonic 1, except that this is in the background and is programmed
+ ; to scroll at a slower speed.
move.w (Camera_X_pos).w,d1
andi.w #$3FF,d1
cmpi.w #$2E0,d1
@@ -46206,45 +46243,42 @@ Obj7C_Main:
; ---------------------------------------------------------------------------
+ rts
; ===========================================================================
-; -------------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; sprite mappings
-; -------------------------------------------------------------------------------
-Obj7C_MapUnc_2103C: include "mappings/sprite/obj7C.asm"
-
-
-
+; ---------------------------------------------------------------------------
+; Obj7C_MapUnc_2103C:
+MapUnc_CPZPylon: include "mappings/sprite/Large pylon from CPZ.asm"
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 27 - An explosion, giving off an animal and 100 points
-; ----------------------------------------------------------------------------
-; Sprite_21088:
-Obj27:
+; ---------------------------------------------------------------------------
+; Sprite_21088: Obj27:
+Obj_Explosion:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj27_Index(pc,d0.w),d1
- jmp Obj27_Index(pc,d1.w)
-; ===========================================================================
-; off_21096: Obj27_States:
-Obj27_Index: offsetTable
- offsetTableEntry.w Obj27_InitWithAnimal ; 0
- offsetTableEntry.w Obj27_Init ; 2
- offsetTableEntry.w Obj27_Main ; 4
-; ===========================================================================
-; loc_2109C: Obj27_Init:
-Obj27_InitWithAnimal:
- addq.b #2,routine(a0) ; => Obj27_Init
+ move.w Explosion_Index(pc,d0.w),d1
+ jmp Explosion_Index(pc,d1.w)
+; ===========================================================================
+; off_21096: Obj27_States: Obj27_Index:
+Explosion_Index: offsetTable
+ offsetTableEntry.w Explosion_InitWithAnimal ; 0
+ offsetTableEntry.w Explosion_Init ; 2
+ offsetTableEntry.w Explosion_Main ; 4
+; ===========================================================================
+; loc_2109C: Obj27_Init: Obj27_InitWithAnimal:
+Explosion_InitWithAnimal:
+ addq.b #2,routine(a0) ; => Explosion_Init
jsrto JmpTo2_AllocateObject
- bne.s Obj27_Init
+ bne.s Explosion_Init
_move.b #ObjID_Animal,id(a1) ; load obj28 (Animal and 100 points)
move.w x_pos(a0),x_pos(a1)
move.w y_pos(a0),y_pos(a1)
move.w objoff_3E(a0),objoff_3E(a1) ; Set by Touch_KillEnemy
-
-; loc_210BE: Obj27_Init2:
-Obj27_Init:
- addq.b #2,routine(a0) ; => Obj27_Main
- move.l #Obj27_MapUnc_21120,mappings(a0)
+; loc_210BE: Obj27_Init2: Obj27_Init:
+Explosion_Init:
+ addq.b #2,routine(a0) ; => Explosion_Main
+ move.l #MapUnc_Explosion,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Explosion,0,0),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
move.b #1< Obj84_MainX
- move.l #Obj03_MapUnc_1FFB8,mappings(a0)
+; loc_21176: Obj84_Init:
+PinballMode_Init:
+ addq.b #2,routine(a0) ; => PinballMode_MainX
+ move.l #MapUnc_PlaneSwitcher,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Ring,0,0),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
ori.b #1< Obj84_MainY
+ beq.s PinballMode_Init_CheckX
+ addq.b #2,routine(a0) ; => PinballMode_MainY
andi.w #7,d0
move.b d0,mapping_frame(a0)
andi.w #3,d0
@@ -46323,7 +46354,7 @@ Obj84_Init:
bhs.s +
move.b #1,objoff_35(a0)
+
- bra.w Obj84_MainY
+ bra.w PinballMode_MainY
; ===========================================================================
word_211E8:
dc.w $20
@@ -46331,8 +46362,8 @@ word_211E8:
dc.w $80 ; 2
dc.w $100 ; 3
; ===========================================================================
-; loc_211F0:
-Obj84_Init_CheckX:
+; loc_211F0: Obj84_Init_CheckX:
+PinballMode_Init_CheckX:
andi.w #3,d0
move.b d0,mapping_frame(a0)
add.w d0,d0
@@ -46345,12 +46376,10 @@ Obj84_Init_CheckX:
+
lea (Sidekick).w,a1 ; a1=character
cmp.w x_pos(a1),d1
- bhs.s Obj84_MainX
+ bhs.s PinballMode_MainX
move.b #1,objoff_35(a0)
-
-; loc_21224:
-Obj84_MainX:
-
+; loc_21224: Obj84_MainX:
+PinballMode_MainX:
tst.w (Debug_placement_mode).w
bne.s return_21284
move.w x_pos(a0),d1
@@ -46362,7 +46391,7 @@ Obj84_MainX:
beq.s return_21284
+ tst.b (a2)+
- bne.s Obj84_MainX_Alt
+ bne.s PinballMode_MainX_Alt
cmp.w x_pos(a1),d1
bhi.s return_21284
move.b #1,-1(a2)
@@ -46386,8 +46415,8 @@ Obj84_MainX:
return_21284:
rts
; ===========================================================================
-; loc_21286:
-Obj84_MainX_Alt:
+; loc_21286: Obj84_MainX_Alt:
+PinballMode_MainX_Alt:
cmp.w x_pos(a1),d1
bls.s return_21284
move.b #0,-1(a2)
@@ -46425,9 +46454,8 @@ loc_212C4:
rts
; ===========================================================================
-; loc_212F6:
-Obj84_MainY:
-
+; loc_212F6: Obj84_MainY:
+PinballMode_MainY:
tst.w (Debug_placement_mode).w
bne.s return_21350
move.w y_pos(a0),d1
@@ -46443,7 +46471,7 @@ Obj84_MainY:
endif
+
tst.b (a2)+
- bne.s Obj84_MainY_Alt
+ bne.s PinballMode_MainY_Alt
cmp.w y_pos(a1),d1
bhi.s return_21350
move.b #1,-1(a2)
@@ -46467,8 +46495,8 @@ Obj84_MainY:
return_21350:
rts
; ===========================================================================
-; loc_21352:
-Obj84_MainY_Alt:
+; loc_21352: Obj84_MainY_Alt:
+PinballMode_MainY_Alt:
cmp.w y_pos(a1),d1
bls.s return_21350
move.b #0,-1(a2)
@@ -46490,25 +46518,22 @@ Obj84_MainY_Alt:
+ move.b #0,pinball_mode(a1)
rts
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 8B - Cycling palette switcher from Wing Fortress Zone
-; ----------------------------------------------------------------------------
-; Sprite_21392:
-Obj8B:
+; ---------------------------------------------------------------------------
+; Sprite_21392: Obj8B:
+Obj_WFZPalSwitcher:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj8B_Index(pc,d0.w),d1
- jsr Obj8B_Index(pc,d1.w)
+ move.w WFZPalSwitcher_Index(pc,d0.w),d1
+ jsr WFZPalSwitcher_Index(pc,d1.w)
jmp (MarkObjGone3).l
; ===========================================================================
-; off_213A6:
-Obj8B_Index: offsetTable
- offsetTableEntry.w Obj8B_Init ; 0
- offsetTableEntry.w Obj8B_Main ; 2
+; off_213A6: Obj8B_Index:
+WFZPalSwitcher_Index: offsetTable
+ offsetTableEntry.w WFZPalSwitcher_Init ; 0
+ offsetTableEntry.w WFZPalSwitcher_Main ; 2
; ===========================================================================
word_213AA:
dc.w $20
@@ -46516,10 +46541,10 @@ word_213AA:
dc.w $80 ; 2
dc.w $100 ; 3
; ===========================================================================
-; loc_213B2:
-Obj8B_Init:
+; loc_213B2: Obj8B_Init:
+WFZPalSwitcher_Init:
addq.b #2,routine(a0)
- move.l #Obj03_MapUnc_1FFB8,mappings(a0)
+ move.l #MapUnc_PlaneSwitcher,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_Ring,0,0),art_tile(a0)
jsrto JmpTo12_Adjust2PArtPointer
ori.b #1< Obj06_Spiral
+; loc_214FA: Obj06_Init:
+Spiral_Init:
+ addq.b #2,routine(a0) ; => Spiral_Corkscrew
move.b #$D0,width_pixels(a0)
tst.b subtype(a0)
- bpl.s Obj06_Spiral
- addq.b #2,routine(a0) ; => Obj06_Cylinder
- bra.w Obj06_Cylinder
-
+ bpl.s Spiral_Corkscrew
+ addq.b #2,routine(a0) ; => Spiral_Cylinder
+ bra.w Spiral_Cylinder
; ===========================================================================
; spiral pathway from EHZ
-; loc_21512:
-Obj06_Spiral:
+; loc_21512: Obj06_Spiral:
+Spiral_Corkscrew:
lea (MainCharacter).w,a1 ; a1=character
moveq #p1_standing_bit,d6
bsr.s +
@@ -46728,30 +46748,28 @@ return_215BE:
loc_215C0:
mvabs.w inertia(a1),d0
cmpi.w #$600,d0
- blo.s Obj06_Spiral_CharacterFallsOff
+ blo.s Spiral_Corkscrew_CharacterFallsOff
btst #status.player.in_air,status(a1)
- bne.s Obj06_Spiral_CharacterFallsOff
+ bne.s Spiral_Corkscrew_CharacterFallsOff
move.w x_pos(a1),d0
sub.w x_pos(a0),d0
addi.w #$D0,d0
- bmi.s Obj06_Spiral_CharacterFallsOff
+ bmi.s Spiral_Corkscrew_CharacterFallsOff
cmpi.w #$1A0,d0
- blo.s Obj06_Spiral_MoveCharacter
-
-; loc_215EA:
-Obj06_Spiral_CharacterFallsOff:
+ blo.s Spiral_Corkscrew_MoveCharacter
+; loc_215EA: Obj06_Spiral_CharacterFallsOff:
+Spiral_Corkscrew_CharacterFallsOff:
bclr #status.player.on_object,status(a1)
bclr d6,status(a0)
move.b #0,flips_remaining(a1)
move.b #4,flip_speed(a1)
rts
-
; ---------------------------------------------------------------------------
-; loc_21602:
-Obj06_Spiral_MoveCharacter:
+; loc_21602: Obj06_Spiral_MoveCharacter:
+Spiral_Corkscrew_MoveCharacter:
btst #status.player.on_object,status(a1)
beq.s return_215BE
- move.b Obj06_CosineTable(pc,d0.w),d1
+ move.b Spiral_CosineTable(pc,d0.w),d1
ext.w d1
move.w y_pos(a0),d2
add.w d1,d2
@@ -46762,15 +46780,14 @@ Obj06_Spiral_MoveCharacter:
move.w d2,y_pos(a1)
lsr.w #3,d0
andi.w #$3F,d0
- move.b Obj06_FlipAngleTable(pc,d0.w),flip_angle(a1)
+ move.b Spiral_FlipAngleTable(pc,d0.w),flip_angle(a1)
rts
-
; ===========================================================================
; Fun fact - Sega had a patent which included the original source code
; for these tables: https://patents.google.com/patent/US5411272
-; byte_21634:
+; byte_21634: Obj06_FlipAngleTable:
; sloopdirtbl:
-Obj06_FlipAngleTable:
+Spiral_FlipAngleTable:
dc.b $00,$00
dc.b $01,$01,$16,$16,$16,$16,$2C,$2C
dc.b $2C,$2C,$42,$42,$42,$42,$58,$58
@@ -46779,9 +46796,9 @@ Obj06_FlipAngleTable:
dc.b $B0,$B0,$C6,$C6,$C6,$C6,$DC,$DC
dc.b $DC,$DC,$F2,$F2,$F2,$F2,$01,$01
dc.b $00,$00
-; byte_21668:
+; byte_21668: Obj06_CosineTable:
; slooptbl:
-Obj06_CosineTable:
+Spiral_CosineTable:
dc.b 32, 32, 32, 32, 32, 32, 32, 32
dc.b 32, 32, 32, 32, 32, 32, 32, 32
@@ -46849,11 +46866,10 @@ Obj06_CosineTable:
dc.b 32, 32, 32, 32, 32, 32, 32, 32
even
-
; ===========================================================================
; rotating meshed cage from MTZ
-; loc_21808:
-Obj06_Cylinder:
+; loc_21808: Obj06_Cylinder:
+Spiral_Cylinder:
lea (MainCharacter).w,a1 ; a1=character
lea (MTZCylinder_Angle_Sonic).w,a2
moveq #p1_standing_bit,d6
@@ -46955,35 +46971,32 @@ return_2191E:
jmpTos JmpTo6_CalcSine
-
-
-
; ===========================================================================
; ----------------------------------------------------------------------------
; Object 14 - See saw from Hill Top Zone
; ----------------------------------------------------------------------------
-; Sprite_21928:
-Obj14:
+; Sprite_21928: Obj14:
+Obj_Seesaw:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj14_Index(pc,d0.w),d1
- jsr Obj14_Index(pc,d1.w)
+ move.w Seesaw_Index(pc,d0.w),d1
+ jsr Seesaw_Index(pc,d1.w)
move.w objoff_30(a0),d0
jmpto JmpTo_MarkObjGone2
; ===========================================================================
-; off_2193E:
-Obj14_Index: offsetTable
- offsetTableEntry.w Obj14_Init ; 0
- offsetTableEntry.w Obj14_Main ; 2
+; off_2193E: Obj14_Index:
+Seesaw_Index: offsetTable
+ offsetTableEntry.w Seesaw_Init ; 0
+ offsetTableEntry.w Seesaw_Main ; 2
offsetTableEntry.w return_21A74 ; 4
- offsetTableEntry.w Obj14_Ball_Init ; 6
- offsetTableEntry.w Obj14_Ball_Main ; 8
- offsetTableEntry.w Obj14_Ball_Fly ; $A
+ offsetTableEntry.w Seesaw_Ball_Init ; 6
+ offsetTableEntry.w Seesaw_Ball_Main ; 8
+ offsetTableEntry.w Seesaw_Ball_Fly ; $A
; ===========================================================================
-; loc_2194A:
-Obj14_Init:
+; loc_2194A: Obj14_Init:
+Seesaw_Init:
addq.b #2,routine(a0)
- move.l #Obj14_MapUnc_21CF0,mappings(a0)
+ move.l #MapUnc_SeesawMain,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_HtzSeeSaw,0,0),art_tile(a0)
jsrto JmpTo13_Adjust2PArtPointer
ori.b #1< Obj07_Main
+; loc_24032: Obj07_Init:
+Oil_Init:
+ addq.b #2,routine(a0) ; => Oil_Main
move.w #$758,y_pos(a0)
move.b #$20,width_pixels(a0)
move.w y_pos(a0),objoff_30(a0)
move.b #$30,oil_char1submersion(a0)
bset #status.npc.no_balancing,status(a0)
-
-; loc_24054:
-Obj07_Main:
+; loc_24054: Obj07_Main:
+Oil_Main:
; check player 1
tst.w (Debug_placement_mode).w
- bne.w Obj07_End
+ bne.w Oil_End
lea (MainCharacter).w,a1 ; a1=character
moveq #p1_standing,d1
move.b status(a0),d0
and.b d1,d0
- bne.s Obj07_CheckKillChar1
+ bne.s Oil_CheckKillChar1
cmpi.b #$30,oil_char1submersion(a0)
- beq.s Obj07_CheckSupportChar1
+ beq.s Oil_CheckSupportChar1
addq.b #1,oil_char1submersion(a0)
- bra.s Obj07_CheckSupportChar1
+ bra.s Oil_CheckSupportChar1
; ---------------------------------------------------------------------------
-; loc_24078:
-Obj07_CheckKillChar1:
+; loc_24078: Obj07_CheckKillChar1:
+Oil_CheckKillChar1:
tst.b oil_char1submersion(a0)
- beq.s Obj07_SuffocateCharacter
+ beq.s Oil_SuffocateCharacter
subq.b #1,oil_char1submersion(a0)
-
-; loc_24082:
-Obj07_CheckSupportChar1:
+; loc_24082: Obj07_CheckSupportChar1:
+Oil_CheckSupportChar1:
moveq #$20,d1
moveq #0,d3
move.b oil_char1submersion(a0),d3
@@ -49687,20 +49694,19 @@ Obj07_CheckSupportChar1:
moveq #p2_standing,d1
move.b status(a0),d0
and.b d1,d0
- bne.s Obj07_CheckKillChar2
+ bne.s Oil_CheckKillChar2
cmpi.b #$30,oil_char2submersion(a0)
- beq.s Obj07_CheckSupportChar2
+ beq.s Oil_CheckSupportChar2
addq.b #1,oil_char2submersion(a0)
- bra.s Obj07_CheckSupportChar2
+ bra.s Oil_CheckSupportChar2
; ---------------------------------------------------------------------------
-; loc_240B4:
-Obj07_CheckKillChar2:
+; loc_240B4: Obj07_CheckKillChar2:
+Oil_CheckKillChar2:
tst.b oil_char2submersion(a0)
- beq.s Obj07_SuffocateCharacter
+ beq.s Oil_SuffocateCharacter
subq.b #1,oil_char2submersion(a0)
-
-; loc_240BE:
-Obj07_CheckSupportChar2:
+; loc_240BE: Obj07_CheckSupportChar2:
+Oil_CheckSupportChar2:
moveq #$20,d1
moveq #0,d3
move.b oil_char2submersion(a0),d3
@@ -49711,8 +49717,8 @@ Obj07_CheckSupportChar2:
rts
; ---------------------------------------------------------------------------
-; loc_240D6:
-Obj07_SuffocateCharacter:
+; loc_240D6: Obj07_SuffocateCharacter:
+Oil_SuffocateCharacter:
not.b d1
and.b d1,status(a0)
move.l a0,-(sp)
@@ -49720,43 +49726,40 @@ Obj07_SuffocateCharacter:
movea.l a1,a0
jsrto JmpTo3_KillCharacter
movea.l (sp)+,a0 ; load 0bj address
-
-Obj07_End:
+; return_240E8: Obj07_End:
+Oil_End:
rts
; ===========================================================================
jmpTos JmpTo3_KillCharacter,JmpTo_PlatformObject_SingleCharacter
-
-
-
; ===========================================================================
-; ----------------------------------------------------------------------------
+; ---------------------------------------------------------------------------
; Object 45 - Pressure spring from OOZ
-; ----------------------------------------------------------------------------
-obj45_strength = objoff_30
-obj45_frame = objoff_32
-obj45_original_x_pos = objoff_34
+; ---------------------------------------------------------------------------
+oozspring_strength = objoff_30
+oozspring_frame = objoff_32
+oozspring_original_x_pos = objoff_34
-; Sprite_240F8:
-Obj45:
+; Sprite_240F8: Obj45:
+Obj_OOZSpring:
moveq #0,d0
move.b routine(a0),d0
- move.w Obj45_Index(pc,d0.w),d1
- jsr Obj45_Index(pc,d1.w)
+ move.w OOZSpring_Index(pc,d0.w),d1
+ jsr OOZSpring_Index(pc,d1.w)
jmpto JmpTo11_MarkObjGone
; ===========================================================================
-; off_2410A:
-Obj45_Index: offsetTable
- offsetTableEntry.w Obj45_Init ; 0
- offsetTableEntry.w Obj45_Vertical ; 2
- offsetTableEntry.w Obj45_Horizontal ; 4
+; off_2410A: Obj45_Index:
+OOZSpring_Index: offsetTable
+ offsetTableEntry.w OOZSpring_Init ; 0
+ offsetTableEntry.w OOZSpring_Vertical ; 2
+ offsetTableEntry.w OOZSpring_Horizontal ; 4
; ===========================================================================
-; loc_24110:
-Obj45_Init:
+; loc_24110: Obj45_Init:
+OOZSpring_Init:
; Much of this object's code is copied from the spring object, Obj41.
addq.b #2,routine(a0)
- move.l #Obj45_MapUnc_2451A,mappings(a0)
+ move.l #MapUnc_OOZSpring,mappings(a0)
move.w #make_art_tile(ArtTile_ArtNem_PushSpring,2,0),art_tile(a0)
ori.b #1<