Skip to content
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
32 changes: 0 additions & 32 deletions src/window_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,38 +302,6 @@ void Window_Base::DrawCurrencyValue(int money, int cx, int cy) const {
contents->TextDraw(cx - gold_text_size.width, cy, Font::ColorDefault, gold.str(), Text::AlignRight);
}

void Window_Base::DrawGauge(const Game_Battler& actor, int cx, int cy, int alpha) const {
BitmapRef system2 = Cache::System2();
if (!system2) {
return;
}

bool full = actor.IsAtbGaugeFull();

// Which gauge (0 - 2)
int gauge_y = 32 + 2 * 16;

// Three components of the gauge
Rect gauge_left(0, gauge_y, 16, 16);
Rect gauge_center(16, gauge_y, 16, 16);
Rect gauge_right(32, gauge_y, 16, 16);

Rect dst_rect(cx + 16, cy, 25, 16);

contents->Blit(cx + 0, cy, *system2, gauge_left, alpha);
contents->Blit(cx + 16 + 25, cy, *system2, gauge_right, alpha);
contents->StretchBlit(dst_rect, *system2, gauge_center, alpha);

const auto atb = actor.GetAtbGauge();
const auto gauge_w = 25 * atb / actor.GetMaxAtbGauge();
if (gauge_w > 0) {
// Full or not full bar
Rect gauge_bar(full ? 64 : 48, gauge_y, 16, 16);
Rect bar_rect(cx + 16, cy, gauge_w, 16);
contents->StretchBlit(bar_rect, *system2, gauge_bar, alpha);
}
}

void Window_Base::DrawActorHpValue(const Game_Battler& actor, int cx, int cy) const {
contents->TextDraw(cx, cy, GetValueFontColor(actor.GetHp(), actor.GetMaxHp(), true), std::to_string(actor.GetHp()), Text::AlignRight);
}
Expand Down
1 change: 0 additions & 1 deletion src/window_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class Window_Base : public Window {
void DrawItemName(const lcf::rpg::Item& item, int cx, int cy, bool enabled = true) const;
void DrawSkillName(const lcf::rpg::Skill& skill, int cx, int cy, bool enabled = true) const;
void DrawCurrencyValue(int money, int cx, int cy) const;
void DrawGauge(const Game_Battler& actor, int cx, int cy, int alpha = 255) const;
void DrawActorHpValue(const Game_Battler& actor, int cx, int cy) const;
void DrawActorSpValue(const Game_Battler& actor, int cx, int cy) const;
int GetValueFontColor(int have, int max, bool can_knockout) const;
Expand Down
Loading