MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / drawTile

Method drawTile

3ds/source/MainScreen.cpp:152–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void MainScreen::drawTile(size_t k) const
153{
154 const int x = cellX(k);
155 const int y = cellY(k);
156 C2D_DrawRectSolid(x, y, 0.5f, TILE, TILE, COLOR_CARD);
157 C2D_Image icon = TitleCatalog::get().icon(k, backupKind);
158 if (icon.subtex->width == 48) {
159 // Native 48px SMDH icon fills the 48px tile 1:1 — no scaling, no aliasing.
160 C2D_DrawImageAt(icon, x, y, 0.5f, nullptr, 1.0f, 1.0f);
161 }
162 else {
163 // Smaller icons (DS/other) sit centered, unscaled.
164 const int off = (TILE - icon.subtex->width) / 2;
165 C2D_DrawImageAt(icon, x + off, y + off, 0.5f, nullptr, 1.0f, 1.0f);
166 }
167}
168
169void MainScreen::drawTop(void) const
170{

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
iconMethod · 0.45

Tested by

no test coverage detected