MCPcopy Create free account
hub / github.com/EasyRPG/Player / Refresh

Method Refresh

src/window_actortarget.cpp:33–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void Window_ActorTarget::Refresh() {
34 contents->Clear();
35
36 item_max = Main_Data::game_party->GetActors().size();
37
38 int y = 0;
39 for (int i = 0; i < item_max; ++i) {
40 const Game_Actor& actor = *(Main_Data::game_party->GetActors()[i]);
41
42 DrawActorFace(actor, 0, i * 48 + y);
43 DrawActorName(actor, 48 + 8, i * 48 + 2 + y);
44 DrawActorLevel(actor, 48 + 8, i * 48 + 2 + 16 + y);
45 DrawActorState(actor, 48 + 8, i * 48 + 2 + 16 + 16 + y);
46 int digits = (actor.MaxHpValue() >= 1000 || actor.MaxSpValue() >= 1000) ? 4 : 3;
47 int x_offset = 48 + 8 + 46 + (digits == 3 ? 12 : 0);
48 DrawActorHp(actor, x_offset, i * 48 + 2 + 16 + y, digits);
49 DrawActorSp(actor, x_offset, i * 48 + 2 + 16 + 16 + y, digits);
50
51 y += 10;
52 }
53}
54
55void Window_ActorTarget::UpdateCursorRect() {
56 if (index < -10) { // Entire Party

Callers

nothing calls this directly

Calls 5

ClearMethod · 0.45
sizeMethod · 0.45
GetActorsMethod · 0.45
MaxHpValueMethod · 0.45
MaxSpValueMethod · 0.45

Tested by

no test coverage detected