Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
Make tables constant.
Browse files Browse the repository at this point in the history
Merged: rxi#52

Merge branch 'patch-1' of github.com:jacereda/microui
  • Loading branch information
namandixit committed Oct 29, 2024
2 parents 4b35d00 + bf2c325 commit 748959d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo/atlas.inl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ enum { ATLAS_WHITE = MU_ICON_MAX, ATLAS_FONT };
enum { ATLAS_WIDTH = 128, ATLAS_HEIGHT = 128 };


static unsigned char atlas_texture[ATLAS_WIDTH * ATLAS_HEIGHT] = {
static const unsigned char atlas_texture[ATLAS_WIDTH * ATLAS_HEIGHT] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down Expand Up @@ -426,6 +426,7 @@ static unsigned char atlas_texture[ATLAS_WIDTH * ATLAS_HEIGHT] = {
0x5f, 0xa3, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d,
0xe9, 0xea, 0xb4, 0x23, 0x00, 0x07, 0x98, 0xff, 0x61, 0x00, 0x27, 0xd4,
0xee, 0xe8, 0xe8, 0x2f, 0x32, 0xcf, 0xdd, 0xe5, 0xef, 0x33, 0x00, 0x00,

0x00, 0x89, 0xff, 0x41, 0x00, 0xea, 0xf9, 0xf6, 0xf6, 0x64, 0x00, 0x25,
0xcf, 0xfe, 0xd1, 0x6c, 0x90, 0xf6, 0xf6, 0xf6, 0xf9, 0xff, 0x00, 0xa0,
0xea, 0xca, 0xee, 0x3e, 0x00, 0x9e, 0xf3, 0xe2, 0xe3, 0x1c, 0x00, 0x00,
Expand Down Expand Up @@ -889,7 +890,7 @@ static unsigned char atlas_texture[ATLAS_WIDTH * ATLAS_HEIGHT] = {
};


static mu_Rect atlas[] = {
static const mu_Rect atlas[] = {
[ MU_ICON_CLOSE ] = { 88, 68, 16, 16 },
[ MU_ICON_CHECK ] = { 0, 0, 18, 18 },
[ MU_ICON_EXPANDED ] = { 118, 68, 7, 5 },
Expand All @@ -912,6 +913,7 @@ static mu_Rect atlas[] = {
[ ATLAS_FONT+46 ] = { 54, 68, 3, 17 },
[ ATLAS_FONT+47 ] = { 124, 34, 4, 17 },
[ ATLAS_FONT+48 ] = { 46, 34, 6, 17 },

[ ATLAS_FONT+49 ] = { 52, 34, 6, 17 },
[ ATLAS_FONT+50 ] = { 58, 34, 6, 17 },
[ ATLAS_FONT+51 ] = { 64, 34, 6, 17 },
Expand Down

0 comments on commit 748959d

Please sign in to comment.