summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-09 01:40:14 -0600
committerColin Noga <Tempus@chronometry.ca>2012-03-09 01:40:14 -0600
commit59624313e01ef4269f2ca27babe522d407e200b0 (patch)
tree3ef69879f19f4eded72a310a94736e151a108cc7 /src/shyguy.cpp
parent05d99e2cf552024116356591be0a88bf862b89c9 (diff)
downloadkamek-59624313e01ef4269f2ca27babe522d407e200b0.tar.gz
kamek-59624313e01ef4269f2ca27babe522d407e200b0.zip
Redid all the boss and custom sprite junk, effect list, saved 25 kb - but bosses break
Diffstat (limited to '')
-rw-r--r--src/shyguy.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index d09edb2..73aaa44 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -2,9 +2,6 @@
#include <game.h>
#include <g3dhax.h>
#include <sfx.h>
-#include <stage.h>
-#include "effects.h"
-#include "player.h"
// Shy Guy Settings
@@ -135,6 +132,7 @@ daShyGuy *daShyGuy::build() {
///////////////////////
extern "C" void *PlaySound(dStageActor_c *, int soundID);
extern "C" void *PlaySoundAsync(dStageActor_c *, int soundID);
+ extern "C" bool SpawnEffect(const char*, int, Vec*, S16Vec*, Vec*);
extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char rot, char layer);
extern "C" u8 dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(daShyGuy *, Vec pos);
@@ -989,10 +987,10 @@ void daShyGuy::updateModelMatrices() {
if (this->timer == 80) {
if (this->direction == 1) {
- CreateEffect(&(Vec){this->pos.x + 7.0, this->pos.y + 14.0, this->pos.z - 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);
+ SpawnEffect("Wm_ob_keyget02_lighit", 0, &(Vec){this->pos.x + 7.0, this->pos.y + 14.0, this->pos.z - 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8});
}
else {
- CreateEffect(&(Vec){this->pos.x - 7.0, this->pos.y + 14.0, this->pos.z + 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8}, 966);
+ SpawnEffect("Wm_ob_keyget02_lighit", 0, &(Vec){this->pos.x - 7.0, this->pos.y + 14.0, this->pos.z + 5500.0}, &(S16Vec){0,0,0}, &(Vec){0.8, 0.8, 0.8});
}
}
@@ -1024,11 +1022,11 @@ void daShyGuy::updateModelMatrices() {
PlaySoundAsync(this, SE_EMY_CRASHER_PUNCH);
if (this->direction == 1) {
- CreateEffect(&(Vec){this->pos.x - 18.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5}, 123);
+ SpawnEffect("Wm_mr_wallkick_b_l", 0, &(Vec){this->pos.x - 18.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5});
Chuckles.addToList();
}
else {
- CreateEffect(&(Vec){this->pos.x + 18.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5}, 124);
+ SpawnEffect("Wm_mr_wallkick_s_r", 0, &(Vec){this->pos.x + 18.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5});
Knuckles.addToList();
}
}
@@ -1037,11 +1035,11 @@ void daShyGuy::updateModelMatrices() {
if(this->chrAnimation.isAnimationDone()) {
if (this->direction == 1) {
- CreateEffect(&(Vec){this->pos.x - 38.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 171);
+ SpawnEffect("Wm_mr_wirehit_hit", 0, &(Vec){this->pos.x - 38.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
Chuckles.removeFromList();
}
else {
- CreateEffect(&(Vec){this->pos.x + 38.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 171);
+ SpawnEffect("Wm_mr_wirehit_hit", 0, &(Vec){this->pos.x + 38.0, this->pos.y + 16.0, this->pos.z}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
Knuckles.removeFromList();
}
@@ -1228,7 +1226,7 @@ void daShyGuy::updateModelMatrices() {
void daShyGuy::beginState_GoDizzy() {
bindAnimChr_and_setUpdateRate("c18_L_DMG_F_1_R", 1, 0.0, 1.0);
- CreateEffect(318, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, 0);
+ SpawnEffect("Wm_en_spindamage", 0, &(Vec){this->pos.x, this->pos.y + 24.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
this->max_speed.x = 0;
this->speed.x = 0;
@@ -1309,7 +1307,7 @@ void daShyGuy::updateModelMatrices() {
// this->baln = 0;
balloonPhysics.removeFromList();
- CreateEffect(&(Vec){this->pos.x, this->pos.y - 32.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 337);
+ SpawnEffect("Wm_en_explosion_ln", 0, &(Vec){this->pos.x, this->pos.y - 32.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
type = 0;
}
@@ -1322,7 +1320,7 @@ void daShyGuy::updateModelMatrices() {
bool ret = calculateTileCollisions();
if (speed.y == 0.0) {
- CreateEffect(&(Vec){this->pos.x, this->pos.y, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 6);
+ SpawnEffect("Wm_en_sndlandsmk_s", 0, &(Vec){this->pos.x, this->pos.y, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
doStateChange(&StateID_GoDizzy);
}
}
@@ -1410,7 +1408,7 @@ void daShyGuy::updateModelMatrices() {
if (type > 5 && type < 9) {
this->renderBalloon = 0;
- CreateEffect(&(Vec){this->pos.x, this->pos.y - 32.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 337);
+ SpawnEffect("Wm_en_explosion_ln", 0, &(Vec){this->pos.x, this->pos.y - 32.0, 0}, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
}
}
void daShyGuy::executeState_Die() {