diff options
author | Stephen Simpson <megazig@gmail.com> | 2011-10-12 21:38:04 -0500 |
---|---|---|
committer | Stephen Simpson <megazig@gmail.com> | 2011-10-12 21:38:04 -0500 |
commit | f8181cc353626d87ddf340d10846770da6622d1b (patch) | |
tree | 28ff496e85267096ab541b1e0f2118e570a0ab84 | |
parent | d7c926b2e0906e225adc2a330d19a4806b646ecc (diff) | |
download | kamek-f8181cc353626d87ddf340d10846770da6622d1b.tar.gz kamek-f8181cc353626d87ddf340d10846770da6622d1b.zip |
Updated some effects info
-rw-r--r-- | src/effects.cpp | 67 | ||||
-rw-r--r-- | src/effects.h | 5 |
2 files changed, 55 insertions, 17 deletions
diff --git a/src/effects.cpp b/src/effects.cpp index 68294a1..8d0e565 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1,7 +1,7 @@ #include "effects.h" const char* effects_name_list [] = { - "Wm_mr_2dlandsmoke", + "Wm_mr_2dlandsmoke", // 0000 "Wm_mr_cmnsndlandsmk", "Wm_mr_cmnlandsmoke", "Wm_en_landsmoke", @@ -11,7 +11,7 @@ const char* effects_name_list [] = { "Wm_en_burst_big", "Wm_en_burst_m", "Wm_en_burst_s", - "Wm_en_burst_ss", + "Wm_en_burst_ss", // 0010 "Wm_en_burst_water01", "Wm_en_burst_water02", "Wm_en_cmnwatertail", @@ -21,7 +21,7 @@ const char* effects_name_list [] = { "Wm_en_waterwave_in", "Wm_en_waterwave_in_a", "Wm_en_waterwave_in_b", - "Wm_en_firevanish", + "Wm_en_firevanish", // 0020 "Wm_en_watersplash", "Wm_en_watersplash_cld", "Wm_mr_watersplash", @@ -31,7 +31,7 @@ const char* effects_name_list [] = { "Wm_en_poisonwave_a", "Wm_en_poisonwave_b", "Wm_en_cmnmagmawave", - "Wm_en_magmawave", + "Wm_en_magmawave", // 0030 "Wm_en_magmawave_a", "Wm_en_magmawave_b", "Wm_en_vshit", @@ -41,7 +41,7 @@ const char* effects_name_list [] = { "Wm_en_vshit_ring", "Wm_en_comattack", "Wm_ob_cmnshotstar", - "Wm_ob_cmnshothit", + "Wm_ob_cmnshothit", // 0040 "Wm_ob_cmnshotspark", "Wm_ob_cmnsparkloop", "Wm_ob_cmnspark", @@ -51,7 +51,7 @@ const char* effects_name_list [] = { "Wm_ob_cmnboxsmoke", "Wm_ob_cmnboxgrain", "Wm_en_hit", - "Wm_en_hit_ring", + "Wm_en_hit_ring", // 0050 "Wm_mr_misshit", "Wm_mr_misshit_ring", "Wm_en_quicksand", @@ -61,7 +61,7 @@ const char* effects_name_list [] = { "Wm_mr_landsmoke", "Wm_mr_landsmoke_s", "Wm_mr_landsmoke_ss", - "Wm_mr_sealandsmk", + "Wm_mr_sealandsmk", // 0060 "Wm_mr_sealandsmk_s", "Wm_mr_sealandsmk_ss", "Wm_mr_sndlandsmk", @@ -71,7 +71,7 @@ const char* effects_name_list [] = { "Wm_mr_beachlandsmk_s", "Wm_mr_beachlandsmk_ss", "Wm_mr_slipsmoke", - "Wm_mr_slipsmoke_ss", + "Wm_mr_slipsmoke_ss", // 0070 "Wm_mr_slipsmoke_big", "Wm_mr_sndslipsmk", "Wm_mr_sndslipsmk_ss", @@ -81,7 +81,7 @@ const char* effects_name_list [] = { "Wm_mr_iceslipsmk_ss", "Wm_mr_brakesmoke", "Wm_mr_brakesmoke_ss", - "Wm_mr_sndbrakesmk", + "Wm_mr_sndbrakesmk", // 0080 "Wm_mr_sndbrakesmk_ss", "Wm_mr_beachbrakesmk", "Wm_mr_beachbrakesmk_ss", @@ -91,7 +91,7 @@ const char* effects_name_list [] = { "Wm_mr_quicksand", "Wm_mr_swimpaddle", "Wm_mr_flutterkick", - "Wm_mr_ivy", + "Wm_mr_ivy", // 0090 "Wm_en_firebar_fire", "Wm_en_firebar_ind", "Wm_en_firebar", @@ -101,7 +101,7 @@ const char* effects_name_list [] = { "Wm_mr_iceball_a", "Wm_mr_iceball_b", "Wm_mr_iceball", - "Wm_ob_icemisshit", + "Wm_ob_icemisshit", // 0100 "Wm_ob_icemisshit_smk", "Wm_mr_fireball_hit", "Wm_mr_fireball_hit01", @@ -112,7 +112,7 @@ const char* effects_name_list [] = { "Wm_mr_movecliff", "Wm_mr_cliffcatch", "Wm_mr_cliffcatch_cd", - "Wm_en_iron", + "Wm_en_iron", // 0110 "Wm_mr_wallkick_r", "Wm_mr_wallkick_up_r", "Wm_mr_wallkick_cld_r", @@ -122,7 +122,7 @@ const char* effects_name_list [] = { "Wm_mr_wallkick_l", "Wm_mr_wallkick_up_l", "Wm_mr_wallkick_cld_l", - "Wm_mr_wallkick_dn_l", + "Wm_mr_wallkick_dn_l", // 0120 "Wm_mr_wallkick_c_l", "Wm_mr_wallkick_b_l", "Wm_mr_wallkick_s_r", @@ -132,7 +132,7 @@ const char* effects_name_list [] = { "Wm_mr_wallkick_c_s_r", "Wm_mr_wallkick_b_s_r", "Wm_mr_wallkick_s_l", - "Wm_mr_wallkick_up_s_l", + "Wm_mr_wallkick_up_s_l", // 0130 "Wm_mr_wallkick_cld_s_l", "Wm_mr_wallkick_dn_s_l", "Wm_mr_wallkick_c_s_l", @@ -1010,11 +1010,44 @@ extern "C" void SpawnEffect(const char*, int, Vec*, int, int); bool CreateEffect(dEn_c* enemy, int effect_num) { if (effect_num > 1000) return false; - if (effect_num < 1000) + if (effect_num < 0) return false; Vec tempVec = (Vec){ enemy->pos.x, enemy->pos.y, 5500.0 }; const char* effect_name = effects_name_list[effect_num]; - SpawnEffect(effect_name, 0, &tempVec, 0, 0); - return true; + return SpawnEffect(effect_name, 0, &tempVec, 0, 0); +} + +bool CreateEffect(Vec* pos, S16Vec* rot, Vec* scale, int effect_num) { + if (effect_num > 1000) + return false; + if (effect_num < 0) + return false; + 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); +} + +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) ) ) { + exists = true; + break; + } + } + if (!exists) + return false; + return SpawnEffect(name, 0, pos, 0, 0); +} + +/* +void* CustomEffectSpawn(const char* name) { + // FILL ME IN + + //EGG::Effect* effect = new EGG::Effect(); + + // SKIP THE DTOR } +*/ diff --git a/src/effects.h b/src/effects.h index f3dad62..ea4ba2a 100644 --- a/src/effects.h +++ b/src/effects.h @@ -5,5 +5,10 @@ #include <game.h> bool CreateEffect(dEn_c* enemy, int effect_num); +bool CreateEffect(Vec* pos, S16Vec* rot, Vec* scale, int effect_num); +bool CreateEffect(const char* name, Vec* pos); + +// Actually will return an EGG::Effect instance +//void* CustomEffectSpawn(const char* name); #endif |