diff options
Diffstat (limited to 'src/bossThwompaDomp.cpp')
-rw-r--r-- | src/bossThwompaDomp.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/bossThwompaDomp.cpp b/src/bossThwompaDomp.cpp new file mode 100644 index 0000000..70a3d17 --- /dev/null +++ b/src/bossThwompaDomp.cpp @@ -0,0 +1,45 @@ +#include <common.h> +#include <game.h> +#include <g3dhax.h> + + +extern "C" bool CollidedWithTile(u8 *); +extern "C" void *SomeStrangeModification(dEn_c *); + +void ThwompaDompMoveC(dEn_c *Sprite) { + + + + bool FirstCheck; + bool SecondCheck; + + // Check for collisions with walls? + FirstCheck = CollidedWithTile(Sprite->classAt1EC); + SomeStrangeModification(Sprite); + SecondCheck = CollidedWithTile(Sprite->classAt1EC); + + OSReport("XPos = %f, FirstCheck = %d, SecondCheck = %d", Sprite->pos.x, FirstCheck, SecondCheck); + + if ((FirstCheck != 0) && (SecondCheck != 0)) { + OSReport("Actually doing something, I swear"); + + Sprite->pos.y = Sprite->pos.y + 16.0; + Sprite->pos.x = Sprite->pos.x - 180.0; + + if (Sprite->direction == 0) { + Sprite->direction = 1; + Sprite->pos.x = Sprite->pos.x - 80.0; } + else { + Sprite->direction = 0; + Sprite->pos.x = Sprite->pos.x + 80.0; } + } + else { + if (Sprite->direction == 0) { + Sprite->pos.x = Sprite->pos.x + 1.0; } + else { + Sprite->pos.x = Sprite->pos.x - 1.0; } + } + + + return; +}
\ No newline at end of file |