Actions

SCHG How-to

Make the Slots Bonus Game Rotate Smoothly

From Sonic Retro

Revision as of 23:50, 28 November 2019 by Dullhole (talk | contribs) (Created page with "{{GuideBy|Dullhole}} In ''Sonic 3 & Knuckles'', the Slots bonus game is mostly based on ''Sonic 1's'' Sp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

(Original guide by Dullhole)

In Sonic 3 & Knuckles, the Slots bonus game is mostly based on Sonic 1's Special Stages. As such, it ports many of the mechanics of those Special Stages, including the fact that it doesn't rotate very smoothly at all. This guide describes a way to make the Slots Bonus Game rotate more smoothly.

This tutorial assumes you are using the Sonic 3 & Knuckles GitHub disassembly and that you have basic knowledge on disassemblies.

Making it smooth

First, find Ending_4B356, it should look like this:

Ending_4B356:
		bsr.w	sub_4B4C4
		bsr.w	sub_4B592
		lea	($FFFF7800).l,a1
		move.b	(Stat_table).w,d0
		andi.b	#-4,d0
		jsr	(GetSineCosine).l

and remove the andi.b line, to make the stage itself rotate:

Ending_4B356:
		bsr.w	sub_4B4C4
		bsr.w	sub_4B592
		lea	($FFFF7800).l,a1
		move.b	(Stat_table).w,d0
		jsr	(GetSineCosine).l


Next find loc_4BF9A:

loc_4BF9A:
		move.b	(Stat_table).w,d0
		andi.b	#-4,d0
		jsr	(GetSineCosine).l

and remove the andi.b line there too, so that the slot machine at the middle of the level moves correctly:

loc_4BF9A:
		move.b	(Stat_table).w,d0
		jsr	(GetSineCosine).l


And that's it! Save and build and you should have a smoothly rotating Slots Bonus Game!

SCHG How-To Guide: Sonic the Hedgehog 3 and Knuckles
Fixing Bugs
Fix Blue Knuckles | Fix Tails' Respawn Speeds | Fix Super Sonic Bugs
Design Choices
Fix Scattered Rings' Underwater Physics | Edit Level Select Text & Pointers | Work with Water | Make the Slots Bonus Game Rotate Smoothly
Adding Features
Restore (Sonic 2) Options Menu