summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7ef23a4)
This makes it possible to create and play levels with a number of
eater arrays other than eight (which was a contant value before)
when using the EM game engine.
cav->key_score = level->score[SC_KEY];
cav->exit_score = level->score[SC_TIME_BONUS];
cav->key_score = level->score[SC_KEY];
cav->exit_score = level->score[SC_TIME_BONUS];
+ cav->num_eater_arrays = level->num_yamyam_contents;
+
for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
level->score[SC_KEY] = cav->key_score;
level->score[SC_TIME_BONUS] = cav->exit_score;
level->score[SC_KEY] = cav->key_score;
level->score[SC_TIME_BONUS] = cav->exit_score;
- level->num_yamyam_contents = MAX_ELEMENT_CONTENTS;
+ level->num_yamyam_contents = cav->num_eater_arrays;
- for (i = 0; i < level->num_yamyam_contents; i++)
+ for (i = 0; i < MAX_ELEMENT_CONTENTS; i++)
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
level->yamyam_content[i].e[x][y] =
for (y = 0; y < 3; y++)
for (x = 0; x < 3; x++)
level->yamyam_content[i].e[x][y] =
cav.wind_time = 0;
cav.wind_direction = 0;
cav.wind_time = 0;
cav.wind_direction = 0;
+ cav.num_eater_arrays = 8;
cav.num_ball_arrays = 8;
cav.testmode = FALSE;
cav.num_ball_arrays = 8;
cav.testmode = FALSE;
int wind_time; /* reset time for wind activity */
int wind_direction; /* wind direction */
int wind_time; /* reset time for wind activity */
int wind_direction; /* wind direction */
+ int num_eater_arrays; /* number of eater data arrays used */
int num_ball_arrays; /* number of ball data arrays used */
boolean testmode; /* flag for test mode */
int num_ball_arrays; /* number of ball data arrays used */
boolean testmode; /* flag for test mode */
lev.killed_out_of_time = FALSE;
lev.killed_out_of_time = FALSE;
- lev.num_ball_arrays = cav.num_ball_arrays;
+ lev.num_eater_arrays = cav.num_eater_arrays;
+ lev.num_ball_arrays = cav.num_ball_arrays;
for (i = 0; i < 8; i++)
for (j = 0; j < 9; j++)
for (i = 0; i < 8; i++)
for (j = 0; j < 9; j++)
int eater_pos; /* counter for eater array position */
int shine_cnt; /* counter for emerald/diamond shining */
int eater_pos; /* counter for eater array position */
int shine_cnt; /* counter for emerald/diamond shining */
+ int num_eater_arrays; /* number of eater data arrays used */
int num_ball_arrays; /* number of ball data arrays used */
int home_initial; /* number of players (initial) */
int num_ball_arrays; /* number of ball data arrays used */
int home_initial; /* number of players (initial) */
boom[x][y+1] = lev.eater_array[lev.eater_pos][7];
boom[x+1][y+1] = lev.eater_array[lev.eater_pos][8];
boom[x][y+1] = lev.eater_array[lev.eater_pos][7];
boom[x+1][y+1] = lev.eater_array[lev.eater_pos][8];
- lev.eater_pos = (lev.eater_pos + 1) % 8;
+ lev.eater_pos = (lev.eater_pos + 1) % lev.num_eater_arrays;
#if PLAY_ELEMENT_SOUND
play_element_sound(x, y, SOUND_boom, Xeater_n);
#if PLAY_ELEMENT_SOUND
play_element_sound(x, y, SOUND_boom, Xeater_n);