MCPcopy Create free account
hub / github.com/devkitPro/3ds-hbmenu / drawingDrawImage

Function drawingDrawImage

source/drawing.c:342–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void drawingDrawImage(ImageId id, u32 color, float x, float y)
343{
344 const imageInfo_s* p = &g_imageData[id];
345 drawingWithTex(&s_imagesTex, color);
346
347 // Calculate texcoords
348 float tcTopLeft[2], tcTopRight[2], tcBotLeft[2], tcBotRight[2];
349 const Tex3DS_SubTexture* subtex = Tex3DS_GetSubTexture(s_imagesTexInfo, id);
350 Tex3DS_SubTextureBottomLeft (subtex, &tcBotLeft[0], &tcBotLeft[1]);
351 Tex3DS_SubTextureBottomRight(subtex, &tcBotRight[0], &tcBotRight[1]);
352 Tex3DS_SubTextureTopLeft (subtex, &tcTopLeft[0], &tcTopLeft[1]);
353 Tex3DS_SubTextureTopRight (subtex, &tcTopRight[0], &tcTopRight[1]);
354
355 drawingAddVertex(x, y+p->height, tcBotLeft[0], tcBotLeft[1]);
356 drawingAddVertex(x+p->width, y+p->height, tcBotRight[0], tcBotRight[1]);
357 drawingAddVertex(x, y, tcTopLeft[0], tcTopLeft[1]);
358 drawingAddVertex(x+p->width, y, tcTopRight[0], tcTopRight[1]);
359 drawingSubmitPrim(GPU_TRIANGLE_STRIP, 4);
360}
361
362void drawingDrawWave(float* points, u32 num_points, float x, float width, float dy_top, float dy_bot)
363{

Callers 5

drawingBottomScreenFunction · 0.85
menuDrawEntryFunction · 0.85
menuDrawBotFunction · 0.85
bubbleDrawFunction · 0.85
backgroundDrawTopFunction · 0.85

Calls 3

drawingWithTexFunction · 0.85
drawingAddVertexFunction · 0.85
drawingSubmitPrimFunction · 0.85

Tested by

no test coverage detected