SOTI, on Apr 29 2009, 10:27 AM, said:
Interesting. Is there any way possible a collision converter could be made from Sonic 1 to Sonic 2? I've been working on porting Sonic 1 levels to Sonic 2 using your program and I find working with collision to be a pain.
Not all Sonic 1 Angles are in Sonic 2, but you can use Collision Array, Angle and Curve data from Sonic 1 and Add some checks in your code and the game will work with both formats.
Some code of Sonic 2 Delta:
lea (AngleMap), A2 ; Offset_0x02D1EA
;--------------------------------------------------------------------------------
cmpi.b #$10, ($FFFFFE10).w ; Sonic 1 Levels above $10
bhi.s AM_S1_01 ; Sonic 1 Collision Support
cmpi.b #$05, ($FFFFFE10).w ; Sonic 1 - Green Hill
bne.s Not_AM_01 ; Sonic 1 Collision Support
AM_S1_01: ; Sonic 1 Collision Support
lea (AngleMap_S1), A2 ; Sonic 1 Collision Support
Not_AM_01: ; Sonic 1 Collision Support
;--------------------------------------------------------------------------------
........
AngleMap:; Offset_0x02D1EA:
incbin 'data\all\anglemap.dat'
Colision_Array_1:; Offset_0x02D2EA:
incbin 'data\all\c_array1.dat'
Colision_Array_2:; Offset_0x02E2EA:
incbin 'data\all\c_array2.dat'
AngleMap_S1:; Offset_0x02D1EA:
incbin 'data\all\anglemap.s1'
Colision_Array_S1_1:; Offset_0x02D2EA:
incbin 'data\all\c_array1.s1'
Colision_Array_S1_2:; Offset_0x02E2EA:
incbin 'data\all\c_array2.s1'
Hint: Change some patterns in 256x256 (editing to appear four 128x128) before converting Sonic 1 Levels to 128x128 and you will get all tiles ported like I do in Sonic 2 Delta. ex: Labyrinth in Sonic 2 Delta. The program will check if 128x128 has already converted ex: Chunk 256x256 Id "$00 has four 128x128 chunks equals and only the first one will be in converted other will be discarded. The compare method is not only visual the program will compare 16x16 property too in 256x256.
This post has been edited by Esrael: 29 April 2009 - 06:50 PM