MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / update

Method update

src/SB/Core/x/xHudFontMeter.cpp:75–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void xhud::font_meter_widget::update(F32 dt)
76
77{
78 char* format_text[3];
79 format_text[0] = 0;
80
81 F32 a;
82 S32 new_value;
83 basic_rect<F32> bounds;
84
85 U8 flag_1;
86 U8 flag_2;
87
88 this->updater(dt);
89 this->xf.id = this->font.id;
90 this->xf.space = this->font.space;
91 a = this->rc.size.x;
92 this->font.w = a;
93 this->xf.width = a;
94 a = this->rc.size.y;
95 this->font.h = a;
96 this->xf.height = a;
97
98 a = this->rc.a * (F32)this->start_font.c.a + 0.5;
99 if (a <= 0.0)
100 {
101 flag_1 = 0;
102 }
103 else if (a >= 255.0)
104 {
105 flag_1 = 255;
106 }
107 else if (a < 2.1474836e+09)
108 {
109 flag_1 = (U8)(S32)a;
110 }
111 else
112 {
113 flag_1 = (U8)(S32)(a - 2.1474836e+09);
114 }
115 this->font.c.a = flag_1;
116
117 a = this->rc.a * (F32)this->start_font.drop_c.a + 0.5;
118 if (a <= 0.0)
119 {
120 flag_1 = 0;
121 }
122 else if (a >= 255.0)
123 {
124 flag_1 = 255;
125 }
126 else if (a < 2.1474836e+09)
127 {
128 flag_1 = (U8)(S32)a;
129 }
130 else
131 {
132 flag_1 = (U8)(S32)(a - 2.1474836e+09);

Callers

nothing calls this directly

Calls 3

sprintfFunction · 0.85
boundsMethod · 0.80
updaterMethod · 0.45

Tested by

no test coverage detected