Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -407,13 +407,13 @@ struct FramerateWindow : Window {
struct CachedDecimal {
StringID strid;
uint32 value;
uint32_t value;
inline void SetRate(double value, double target)
{
const double threshold_good = target * 0.95;
const double threshold_bad = target * 2 / 3;
this->value = (uint32)(value * 100);
this->value = (uint32_t)(value * 100);
this->strid = (value > threshold_good) ? STR_FRAMERATE_FPS_GOOD : (value < threshold_bad) ? STR_FRAMERATE_FPS_BAD : STR_FRAMERATE_FPS_WARN;
}
@@ -421,7 +421,7 @@ struct FramerateWindow : Window {
{
const double threshold_good = target / 3;
const double threshold_bad = target;
this->value = (uint32)(value * 100);
this->value = (uint32_t)(value * 100);
this->strid = (value < threshold_good) ? STR_FRAMERATE_MS_GOOD : (value > threshold_bad) ? STR_FRAMERATE_MS_BAD : STR_FRAMERATE_MS_WARN;
}
@@ -596,7 +596,7 @@ struct FramerateWindow : Window {
void DrawElementTimesColumn(const Rect &r, StringID heading_str, const CachedDecimal *values) const
{
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
uint16 skip = sb->GetPosition();
uint16_t skip = sb->GetPosition();
int drawable = this->num_displayed;
int y = r.top;
DrawString(r.left, r.right, y, heading_str, TC_FROMSTRING, SA_CENTER, true);
@@ -618,7 +618,7 @@ struct FramerateWindow : Window {
void DrawElementAllocationsColumn(const Rect &r) const
{
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
uint16 skip = sb->GetPosition();
uint16_t skip = sb->GetPosition();
int drawable = this->num_displayed;
int y = r.top;
DrawString(r.left, r.right, y, STR_FRAMERATE_MEMORYUSE, TC_FROMSTRING, SA_CENTER, true);
@@ -652,7 +652,7 @@ struct FramerateWindow : Window {
case WID_FRW_TIMES_NAMES: {
/* Render a column of titles for performance element names */
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
uint16 skip = sb->GetPosition();
uint16_t skip = sb->GetPosition();
int drawable = this->num_displayed;
int y = r.top + GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal; // first line contains headings in the value columns
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
@@ -945,7 +945,7 @@ struct FrametimeGraphWindow : Window {
/* Position of last rendered data point */
Point lastpoint = {
x_max,
(int)Scinterlate<int64>(y_zero, y_max, 0, this->vertical_scale, durations[point])
(int)Scinterlate<int64_t>(y_zero, y_max, 0, this->vertical_scale, durations[point])
};
/* Timestamp of last rendered data point */
TimingMeasurement lastts = timestamps[point];
@@ -975,8 +975,8 @@ struct FrametimeGraphWindow : Window {
/* Draw line from previous point to new point */
Point newpoint = {
(int)Scinterlate<int64>(x_zero, x_max, 0, (int64)draw_horz_scale, (int64)draw_horz_scale - (int64)time_sum),
(int)Scinterlate<int64>(y_zero, y_max, 0, (int64)draw_vert_scale, (int64)value)
(int)Scinterlate<int64_t>(x_zero, x_max, 0, (int64_t)draw_horz_scale, (int64_t)draw_horz_scale - (int64_t)time_sum),
(int)Scinterlate<int64_t>(y_zero, y_max, 0, (int64_t)draw_vert_scale, (int64_t)value)
};
if (newpoint.x > lastpoint.x) continue; // don't draw backwards
GfxDrawLine(lastpoint.x, lastpoint.y, newpoint.x, newpoint.y, c_lines);