Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes for liblcf #492 and CloneEvent fix #3357

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/game_interpreter_battle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ bool Game_Interpreter_Battle::AreConditionsMet(const lcf::rpg::TroopPageConditio
}

int Game_Interpreter_Battle::ScheduleNextPage(Game_Battler* source) {
lcf::rpg::TroopPageCondition::Flags f;
lcf::rpg::TroopPageCondition::TroopPageCondition_Flags f;
for (auto& ff: f.flags) ff = true;

return ScheduleNextPage(f, source);
}

static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::Flags page, lcf::rpg::TroopPageCondition::Flags required) {
static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags page, lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required) {
for (size_t i = 0; i < page.flags.size(); ++i) {
if (required.flags[i] && page.flags[i]) {
return true;
Expand All @@ -198,7 +198,7 @@ static bool HasRequiredCondition(lcf::rpg::TroopPageCondition::Flags page, lcf::
return false;
}

int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::Flags required_conditions, Game_Battler* source) {
int Game_Interpreter_Battle::ScheduleNextPage(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required_conditions, Game_Battler* source) {
if (IsRunning()) {
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game_interpreter_battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
static bool AreConditionsMet(const lcf::rpg::TroopPageCondition& condition, Game_Battler* source);

int ScheduleNextPage(Game_Battler* source);
int ScheduleNextPage(lcf::rpg::TroopPageCondition::Flags required_conditions, Game_Battler* source);
int ScheduleNextPage(lcf::rpg::TroopPageCondition::TroopPageCondition_Flags required_conditions, Game_Battler* source);

Check failure on line 53 in src/game_interpreter_battle.h

View workflow job for this annotation

GitHub Actions / ubuntu:22.04

'lcf::rpg::TroopPageCondition::TroopPageCondition_Flags' has not been declared

Check failure on line 53 in src/game_interpreter_battle.h

View workflow job for this annotation

GitHub Actions / debian:12

'lcf::rpg::TroopPageCondition::TroopPageCondition_Flags' has not been declared
void ResetPagesExecuted();

void SetCurrentEnemyTargetIndex(int idx);
Expand Down
5 changes: 4 additions & 1 deletion src/game_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,13 @@ bool Game_Map::CloneMapEvent(int src_map_id, int src_event_id, int target_x, int
}), new_event);

auto game_event = Game_Event(GetMapId(), &*insert_it);
game_event.data()->easyrpg_clone_event_id = source_event->ID;
game_event.data()->easyrpg_clone_map_id = src_map_id;

events.insert(
std::upper_bound(events.begin(), events.end(), game_event, [](const auto& e, const auto& e2) {
return e.GetId() < e2.GetId();
}), Game_Event(GetMapId(), &*insert_it));
}), std::move(game_event));

UpdateUnderlyingEventReferences();

Expand Down
2 changes: 1 addition & 1 deletion src/scene_battle_rpg2k3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ bool Scene_Battle_Rpg2k3::CheckBattleEndAndScheduleEvents(EventTriggerType tt, G
return false;
}

lcf::rpg::TroopPageCondition::Flags flags;
lcf::rpg::TroopPageCondition::TroopPageCondition_Flags flags;
switch (tt) {
case EventTriggerType::eBeforeBattleAction:
flags.turn = flags.turn_actor = flags.turn_enemy = flags.command_actor = true;
Expand Down
Loading