From 439bb716440d809cc4f60ca7946e3a4679672f88 Mon Sep 17 00:00:00 2001 From: Stephen Simpson Date: Thu, 13 Oct 2011 02:19:44 -0500 Subject: Updated effects for even more params --- src/effects.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/effects.cpp b/src/effects.cpp index 8d0e565..40f08a2 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1004,7 +1004,7 @@ const char* effects_name_list [] = { "Wm_ob_treasureboxwait_b" }; -extern "C" void SpawnEffect(const char*, int, Vec*, int, int); +extern "C" bool SpawnEffect(const char*, int, Vec*, S16Vec*, Vec*); // Just call CreateEffect(this, number_between_0_and_1000); bool CreateEffect(dEn_c* enemy, int effect_num) { @@ -1022,7 +1022,7 @@ bool CreateEffect(Vec* pos, S16Vec* rot, Vec* scale, int effect_num) { return false; if (effect_num < 0) return false; - Vec tempVec = (Vec){ pos.x, pos.y, 5500.0 }; + Vec tempVec = (Vec){ pos->x, pos->y, 5500.0 }; const char* effect_name = effects_name_list[effect_num]; return SpawnEffect(effect_name, 0, &tempVec, rot, scale); } @@ -1030,8 +1030,8 @@ bool CreateEffect(Vec* pos, S16Vec* rot, Vec* scale, int effect_num) { bool CreateEffect(const char* name, Vec* pos) { //check effects name list bool exists = false; - for( int ii = 0; ii < sizeof(effect_name_list); ii++) { - if (strncmp(name, effects_name_list[ii], strlen(effects_name_list) ) ) { + for( int ii = 0; ii < sizeof(effects_name_list); ii++) { + if (memcmp(name, effects_name_list[ii], strlen(effects_name_list[ii]) ) ) { exists = true; break; } -- cgit v1.2.3