Ending: Rocket Coordinates?
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
Ending: Rocket Coordinates?
Are there patches to change the coordinates the BWB heads to, as well as its speed, for each phase of the space flight scenes?
There's three arrays that control the rocket flight:
1: 1597E to 159B9
2: 159BA to 15A65
3: 15A66 to 15B05
I believe they are pairs of deltaX/deltaY values that are applied to the ship's coords each frame or something, but I'm not sure how it works. I think deltaX and deltaY are two bytes a piece as well. All of the numbers are in between -3 and 3... maybe make a few really large and see what happens.
1: 1597E to 159B9
2: 159BA to 15A65
3: 15A66 to 15B05
I believe they are pairs of deltaX/deltaY values that are applied to the ship's coords each frame or something, but I'm not sure how it works. I think deltaX and deltaY are two bytes a piece as well. All of the numbers are in between -3 and 3... maybe make a few really large and see what happens.
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
Basically what I intend to do is scroll down at a relatively slow speed for something like 100 tiles. Animating from left to right each frame would be a pretty cool guy too.
This works for the speed, but it only scrolls down for about one screen height. (lemm dug this stuff out the other day.)
I imagine there's probably a for loop surrounding that area.
Edit:
Here's the loop condition:
Edit: Garg, I can see in theory how the loop might be restructured, but I can't figure out how to remove the X pushes to make room. The sprite just jitters all over the place.
This works for the speed, but it only scrolls down for about one screen height. (lemm dug this stuff out the other day.)
Code: Select all
%patch $834E $0W #X scroll lolololol
%patch $8354 $00 #X scroll hi
%patch $8359 $100W #Y scroll lo
%patch $835F $00 #X scroll hi
%patch $8363 $0W #X ship lo
%patch $8368 $00 #X ship hi
%patch $836c $100W #Y ship lo
%patch $8371 $00 #X ship hi
Edit:
Here's the loop condition:
Code: Select all
#Number of loops flight to earth pan lasts
%patch $8392 $C8 $00
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
So I have a theory that if I can free up some space in that routine it can be made to animate using an add, cmp and jne around ax. But if I nop out the rocket X deltas, the sprite breaks.
What I did manage is eliminating the scrolling code:
But removing these lines, with the intention of similarly preventing rocket sprite movement along one axis, instead breaks the sprite. It hovers in one spot for a second and then disappears.
I guess I'm missing an ingredient in dissecting the sprite shifting code, probably off in one of those calls laced throughout the loop.
What I did manage is eliminating the scrolling code:
Code: Select all
# Screen doesn't scroll horizontally on flight to earth
%patch $834A $90 $90 $90 $90 $90 $90
%patch $8350 $90 $90 $90 $90 $90
# Screen doesn't scroll vertically on flight to earth
%patch $8355 $90 $90 $90 $90 $90 $90
%patch $835B $90 $90 $90 $90 $90
Code: Select all
:0001.8360 8146FC0003 add word ptr [bp-04], 0300
:0001.8365 8356FE00 adc word ptr [bp-02], 0000
...
:0001.837F FF76FE push word ptr [bp-02]
:0001.8382 FF76FC push word ptr [bp-04]