MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / onUpdate

Function onUpdate

src/OpenLoco/src/Ui/Windows/MapWindow.cpp:1105–1134  ·  view source on GitHub ↗

0x0046BA5B

Source from the content-addressed store, hash-verified

1103
1104 // 0x0046BA5B
1105 static void onUpdate(Window& self)
1106 {
1107 self.frameNo++;
1108 self.callPrepareDraw();
1109
1110 WindowManager::invalidateWidget(WindowType::map, self.number, self.currentTab + widx::tabOverall);
1111
1112 mapFrameNumber++;
1113
1114 if (getCurrentRotation() != self.var_846)
1115 {
1116 self.var_846 = getCurrentRotation();
1117 clearMap();
1118 }
1119
1120 auto i = 80;
1121
1122 while (i > 0)
1123 {
1124 setMapPixels(self);
1125 i--;
1126 }
1127
1128 self.invalidate();
1129
1130 auto x = self.x + self.width - 104;
1131 auto y = self.y + 44;
1132
1133 setHoverItemTab(&self, x, y);
1134 }
1135
1136 // 0x0046B9E7
1137 static void getScrollSize([[maybe_unused]] Window& self, [[maybe_unused]] uint32_t scrollIndex, int32_t& scrollWidth, int32_t& scrollHeight)

Callers

nothing calls this directly

Calls 7

invalidateWidgetFunction · 0.85
getCurrentRotationFunction · 0.85
clearMapFunction · 0.85
setMapPixelsFunction · 0.85
setHoverItemTabFunction · 0.85
callPrepareDrawMethod · 0.80
invalidateMethod · 0.45

Tested by

no test coverage detected