| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
This is still missing the support for player 2, but I've left traces
about it.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
The whole handling of player 2 will come whenever I set to implement
multi-player for this game.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
This allows for explosions to run after making the player to disappear,
and it re-runs the entering scene timer.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
For now this only applies to enemies, but it's general enough so it can
target any given coordinate, and hence any given object.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
This will be useful whenever we implement the re-appearance of enemies.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
| |
If we don't do this, then it's possible to incur into a buffer overflow
as the last allocated index is set to the next (out of buffer)
position. Whenever we start over on this function, then it will compare
for a good bullet on this position, and if it's not exactly $FF, then it
will allocate it without problems.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
This counter is useful to account for certain numbers in hot spots. This
way, and with a memory viewer or a debugger, you can directly tell
whenever something is off.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
| |
There were still some gaps where the check was failing, and trying to be
smart about it was going the "it's too complex for what I need here"
route. Hence, just go to the good old dumb algorithm of "check all
corners". For now the performance has not dropped, so let's hope that we
don't have to re-visit this one.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
This is in preparation to the 'homing' algorithm to re-use this one.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Everywhere except the 'basic' algorithm don't really need this
argument. In the beginning I was using it to define some custom
velocities, but in the end tweaking the inner timer on the 'extra' value
for all enemies turned out to be more productive. Hence, remove this
usage almost everywhere and make the code simpler as a side-effect.
The usage on 'basic' is still under revision, just to check if 'homing'
really needs to set a special argument whenever the 'homing' attack
needs this sort of behavior.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
This allows us to be able to initialize each enemy separately, giving a
more random appearance to it all. This will also come in handy whenever
we want to make enemies re-appear.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
Not the whole thing has been implemented, as it needs a rebump on the
'basic' algorithm so I can re-use it for 'homing' as well.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
This way enemies are a bit more off from the boundaries, avoiding
visually distracting scenarios.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of this, the 'reset' function can go into 'jetpac.s', as we
could consider it's part of the 'main' work. As a bonus, doing this
alignment gives us 3 bytes back from ROM space. Not that we care too
much about space, but it's amusing nonetheless.
The debug scope has been moved into its own file in include/. Admittedly
it's not the most crucial file in the project, but it makes things more
logical and it opens the door to more debugging utilities.
This leaves us with a vector.s file only containing interrupt
code. Thus, it just makes sense to rename it to interrupts.s, which in
the end makes things more organized.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
I apparently got them all messed up. Let's put them as they were
originally.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
For now only the basic algorithm has been written, but the framework for
adding the rest has also been written down.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
And also run rubocop on the CI for good measure.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
And don't let git ignore it. From now on this will be available in git
as well so to detect regressions.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
| |
This was mostly from an old implementation and no longer relevant.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function relies on a pre-computed table to get the "random" numbers
from, but most of the times this is used, it needs to be between some
safe boundaries.
Before this commit, this was done inside of the function, correcting the
fetched value to be above or below these limits. But there was a bug on
the below the grounds limit, in which the 'sbc' instruction could
subtract too much from the fetched value and make enemies appear below
the sky.
Now, this is easy to correct, but since we are cheating with a
pre-computed table, I thought it would be vastly easier to just get a
random table with the "proper" values. That is, random but within the
required boundaries already. Plus, it makes the
'random_valid_y_coordinate' function much faster.
This commit adds a ruby script in bin/ which produces a pseudo-random
table when called, making sure all the requirements are met. We have to
make sure to call this script if we ever change the boundaries at some
point.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
The previous commit only tackled the first enemy, this one handles the
"rest_o_enemies" code flow, which was entirely missing.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
|
| |
Enemies now have the ability to be displayed on screen, face at the
direction that they were assigned to at random during initialization
time, and they also have a timer that dictates some inner movement,
similarly as it happened in the original game.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
If we passed the --strict flag to nasm, then we want the statistics from
the full build, not the one specific to PAL systems.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
The 'nasm' assembler now implements this, which is quite
convenient. Define also a fake macro for it when the assembler is not
'nasm' just to bridge the gaps.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
|
| |
Some sprites like enemies and objects are meant to appear maximum at a
certain Y coordinate. Increase that as the former could mean sprites
going on about the scores, whereas that shouldn't be possible.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
| |
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|
| |
|
|
|
|
|
| |
The address sanitizer from nasm provides quite a few goodies, so let's
adapt the code more to it to benefit from those.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
|