Skip to content

Commit

Permalink
- Small texture micro-optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Feb 19, 2024
1 parent 076c31c commit f7f0c65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cube/swiss/source/gui/FrameBufferMagic.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,11 @@ static void init_textures()
TPL_GetTexture(&imagesTPL, palimg, &palTexObj);
TPL_GetTexture(&buttonsTPL, checked_32, &checkedTexObj);
TPL_GetTexture(&buttonsTPL, unchecked_32, &uncheckedTexObj);
GX_InitTexObjWrapMode(&uncheckedTexObj, GX_MIRROR, GX_MIRROR);
TPL_GetTexture(&buttonsTPL, loading_16, &loadingTexObj);
GX_InitTexObjWrapMode(&loadingTexObj, GX_MIRROR, GX_MIRROR);
TPL_GetTexture(&buttonsTPL, star_16, &starTexObj);
GX_InitTexObjWrapMode(&starTexObj, GX_MIRROR, GX_REPEAT);
TPL_GetTexture(&imagesTPL, mp3img, &mp3imgTexObj);
TPL_GetTexture(&imagesTPL, dolimg, &dolimgTexObj);
TPL_GetTexture(&imagesTPL, dolcliimg, &dolcliimgTexObj);
Expand Down Expand Up @@ -563,9 +565,11 @@ static void _DrawImageNow(int textureId, int x, int y, int width, int height, in
break;
case TEX_UNCHECKED:
texObj = &uncheckedTexObj; color = (GXColor) {87,87,87,255};
s1*=2; s2*=2; t1*=2; t2*=2;
break;
case TEX_STAR:
texObj = &starTexObj; color = (GXColor) {255,255,0,255};
s1*=2; s2*=2;
break;
case TEX_GCLOADER:
texObj = &gcloaderTexObj; color = (GXColor) {216,216,216,255};
Expand Down
Binary file modified cube/swiss/source/images/buttons/star_16.tif
Binary file not shown.
Binary file modified cube/swiss/source/images/buttons/unchecked_32.tif
Binary file not shown.

0 comments on commit f7f0c65

Please sign in to comment.