| 340 | } |
| 341 | |
| 342 | void 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 | |
| 362 | void drawingDrawWave(float* points, u32 num_points, float x, float width, float dy_top, float dy_bot) |
| 363 | { |
no test coverage detected