int x,y;
/* Activate bad guys: */
-
for (y = 0; y < 15; y++)
{
for (x = 0; x < current_level.width; x++)
{
- if (current_level.dn_tiles[y][x] >= '0' && current_level.dn_tiles[y][x] <= '9')
+ if (current_level.ia_tiles[y][x] >= 1000 && current_level.ia_tiles[y][x] <= 1010)
{
- add_bad_guy(x * 32, y * 32, static_cast<BadGuyKind>(current_level.dn_tiles[y][x] - '0'));
- current_level.dn_tiles[y][x] = 0;
+ add_bad_guy(x * 32, y * 32,
+ static_cast<BadGuyKind>(current_level.ia_tiles[y][x] - 1000));
+ current_level.ia_tiles[y][x] = 0;
}
}
}
{
std::map<char, int> transtable;
transtable['.'] = 0;
- transtable['0'] = 0;
- transtable['1'] = 1;
- transtable['2'] = 2;
- transtable['x'] = 77;
+ transtable['0'] = 1000;
+ transtable['1'] = 1001;
+ transtable['2'] = 1002;
+ transtable['x'] = 104;
transtable['X'] = 77;
transtable['y'] = 78;
- transtable['Y'] = 78;
+ transtable['Y'] = 105;
transtable['A'] = 83;
transtable['B'] = 102;
transtable['!'] = 103;
if (!dying)
{
-
-
if( !on_ground())
{
if(under_solid())
if(size == SMALL)
{
+ Tile* tile = gettile(base.x, base.y);
+ Tile* tile2 = gettile(base.x + 31, base.y);
/* Get a distro from a brick? */
- if (gettile(base.x, base.y)->brick ||
- gettile(base.x, base.y)->brick)
+ if (tile->brick)
{
add_bouncy_distro((((int)base.x)
/ 32) * 32,
}
if (distro_counter <= 0)
- level_change(¤t_level,base.x,base.y - 1, TM_IA, 'a');
+ level_change(¤t_level,base.x,base.y - 1, TM_IA, tile->next_tile);
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
score = score + SCORE_DISTRO;
distros++;
}
- else if (gettile(base.x+ 31, base.y)->brick ||
- gettile(base.x+ 31, base.y)->brick)
- {
+ else if (tile2->brick)
+ {
add_bouncy_distro((((int)base.x + 31)
/ 32) * 32,
((int)base.y / 32) * 32);
}
if (distro_counter <= 0)
- level_change(¤t_level,base.x+ 31, base.y, TM_IA, 'a');
+ level_change(¤t_level,base.x+ 31, base.y, TM_IA, tile2->next_tile);
play_sound(sounds[SND_DISTRO], SOUND_CENTER_SPEAKER);
score = score + SCORE_DISTRO;
LispReader reader(lisp_cdr(element));
assert(reader.read_int("id", &tile->id));
- reader.read_bool("solid", &tile->solid);
- reader.read_bool("brick", &tile->brick);
- reader.read_bool("ice", &tile->ice);
- reader.read_bool("fullbox", &tile->fullbox);
- reader.read_bool("distro", &tile->distro);
- reader.read_int("data", (int*)&tile->data);
- reader.read_int("alpha", (int*)&tile->alpha);
- reader.read_int("anim-speed", &tile->anim_speed);
+ reader.read_bool("solid", &tile->solid);
+ reader.read_bool("brick", &tile->brick);
+ reader.read_bool("ice", &tile->ice);
+ reader.read_bool("fullbox", &tile->fullbox);
+ reader.read_bool("distro", &tile->distro);
+ reader.read_int("data", (int*)&tile->data);
+ reader.read_int("alpha", (int*)&tile->alpha);
+ reader.read_int("anim-speed", &tile->anim_speed);
reader.read_int("next-tile", &tile->next_tile);
- reader.read_int("next-tile2", &tile->next_tile2);
+ reader.read_int("next-tile2", &tile->next_tile2);
reader.read_string_vector("images", &tile->filenames);
for(std::vector<std::string>::iterator it = tile->filenames.begin();