Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbowman committed Oct 31, 2022
1 parent 962ae32 commit 215cfb1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,17 @@ void Engine::begin_game(Difficulty d, bool loadsave)

if (loadsave) {
loadgame();

} else {
hero_->set_flip(false, false);

// BUGFIX: FIXME! Elite boss unreachable otherwise...
p_->tile_modifications_.push_back({3, 19, 3, 13, 25});
p_->tile_modifications_.push_back({3, 0, 3, 14, 25});
p_->tile_modifications_.push_back({12, 0, 3, 14, 0});
p_->tile_modifications_.push_back({12, 1, 3, 14, 0});
p_->tile_modifications_.push_back({12, 19, 3, 13, 0});
p_->tile_modifications_.push_back({12, 18, 3, 13, 0});
}

g_.hp_ = 10 + p_->level_;
Expand Down Expand Up @@ -630,6 +639,11 @@ void Engine::load(int chunk_x, int chunk_y, bool restore)
// NOTE: when adding, uncomment corresponding hint in scenes.cpp
unlock_doors();
}

if (chunk_x == 1 and chunk_y == 7) {
// FIXME: mother enemy missing
unlock_doors();
}
}


Expand Down
2 changes: 2 additions & 0 deletions source/objects/enemies/heavy/chainsnake.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class Chainsnake : public Enemy
{
if (health_ == 0) {
kill();
platform().speaker().play_sound("snd_explo2", 6);
engine().g_.screenshake_ = 2;
for (auto& e : engine().enemies_) {
if (auto eg = dynamic_cast<ChainsnakeNeck*>(e.get())) {
if (eg->owner() == this) {
Expand Down
1 change: 1 addition & 0 deletions source/objects/enemies/heavy/soldier.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Soldier : public Enemy
if (health_ == 0) {
kill();
platform().speaker().play_sound("snd_explo2", 6);
engine().g_.screenshake_ = 2;
engine().add_object<BigExplo>(Vec2<Fixnum>{position_.x + 3, position_.y + 4});
return;
}
Expand Down
1 change: 1 addition & 0 deletions source/objects/hero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Blade : public Object
if (engine().p_->blade_ > 2) {
sprite_index_ = 195;
hitbox_.dimension_.size_ = {10, 16};
hitbox_.dimension_.origin_ = {8, 8};
}
}

Expand Down
11 changes: 11 additions & 0 deletions source/scenes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ void MapScene::show_worldmap()
bool left = false;
bool right = false;

if (x == 3 and y == 13) {
// BUGFIX for elite boss... FIXME by implementing the item that
// reveals all warp points.
down = true;
}
if (x == 3 and y == 14) {
// BUGFIX for elite boss... FIXME by implementing the item that
// reveals all warp points.
up = true;
}

if (y > 0 and data) {
auto above = loadrm(x, y - 1);
if (above) {
Expand Down

0 comments on commit 215cfb1

Please sign in to comment.