diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-09 01:48:06 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-09 01:48:06 -0500 |
commit | d4ba9bf11d4786c4df5e94c5241492c4eb43c2b6 (patch) | |
tree | 4afe8cd5a8fe9c8eba3031cc20a02ed08a0c9b43 /src/bossThwompaDomp.cpp | |
parent | f35befab481e013d76631baf6abec5f69ff703a6 (diff) | |
download | kamek-d4ba9bf11d4786c4df5e94c5241492c4eb43c2b6.tar.gz kamek-d4ba9bf11d4786c4df5e94c5241492c4eb43c2b6.zip |
Added a whole bunch of boss crap, soundplayers, retextures, and some mrsun improvements.
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 |