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

Method drawTile

3ds/source/MainScreen.cpp:185–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void MainScreen::drawTile(size_t k) const
186{
187 const int x = cellX(k);
188 const int y = cellY(k);
189 C2D_DrawRectSolid(x, y, 0.5f, TILE, TILE, COLOR_CARD);
190 C2D_Image icon = TitleCatalog::get().icon(k, backupKind);
191 if (icon.subtex->width == 48) {
192 // Native 48px SMDH icon fills the 48px tile 1:1 — no scaling, no aliasing.
193 C2D_DrawImageAt(icon, x, y, 0.5f, nullptr, 1.0f, 1.0f);
194 }
195 else {
196 // Smaller icons (DS/other) sit centered, unscaled.
197 const int off = (TILE - icon.subtex->width) / 2;
198 C2D_DrawImageAt(icon, x + off, y + off, 0.5f, nullptr, 1.0f, 1.0f);
199 }
200}
201
202void MainScreen::drawTop(void) const
203{

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
iconMethod · 0.45

Tested by

no test coverage detected