Skip to content

Commit

Permalink
Flags: Fix class names
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Feb 23, 2025
1 parent 4493b1a commit a352759
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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 @@ class Game_Interpreter_Battle : public Game_Interpreter
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);
void ResetPagesExecuted();

void SetCurrentEnemyTargetIndex(int idx);
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

0 comments on commit a352759

Please sign in to comment.