diff options
author | Stephen Simpson <megazig@gmail.com> | 2011-10-10 16:12:27 -0500 |
---|---|---|
committer | Stephen Simpson <megazig@gmail.com> | 2011-10-10 16:12:27 -0500 |
commit | 5f3eca3f6074605272b7bdde4a685d2f0934d6a7 (patch) | |
tree | 858805a7c4f495e202a5e954c7a320db57e83da1 /src/bossThwompaDomp.cpp | |
parent | a61758720db96f59e0fb82aab9f326d37e186a11 (diff) | |
parent | c83ed47633a037acd6cdab7d37087bca5edd6daa (diff) | |
download | kamek-5f3eca3f6074605272b7bdde4a685d2f0934d6a7.tar.gz kamek-5f3eca3f6074605272b7bdde4a685d2f0934d6a7.zip |
Merge branch 'level-select' of ssh://treeki.shacknet.nu:30000/Kamek into level-select
Diffstat (limited to '')
-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 |