Mercurial > mm7
changeset 1096:f17cfb070f7a
uibook
author | Gloval |
---|---|
date | Sun, 26 May 2013 21:27:32 +0400 |
parents | 7c3772c91c7c |
children | e1ad5ccc13ae |
files | UIBooks.cpp |
diffstat | 1 files changed, 10 insertions(+), 80 deletions(-) [+] |
line wrap: on
line diff
--- a/UIBooks.cpp Sun May 26 18:56:45 2013 +0400 +++ b/UIBooks.cpp Sun May 26 21:27:32 2013 +0400 @@ -1662,6 +1662,12 @@ POINT v24; int v25; + static unsigned int texture_tab_coord1[9][2]= + {{406, 9}, {406, 46}, {406, 84}, {406,121}, {407,158}, {405, 196}, {405, 234}, {405, 272}, {405,309} }; + + static unsigned int texture_tab_coord0[9][2]= + {{415, 10}, {415, 46}, {415, 83}, {415,121}, {415,158}, {416, 196}, {416, 234}, {416, 271}, {416,307} }; + BookUI_Spellbook_DrawCurrentSchoolBackground(); //v0 = pPlayers[uActiveCharacter]; @@ -1740,90 +1746,14 @@ if ( player->lastOpenedSpellbookPage == v13 ) { pPageTexture = pTextures_tabs[v13][1]; - switch ( v13 ) - { - case 0: - v14 = 406; - v22 = 9; - goto LABEL_27; - case 1: - v14 = 406; - goto LABEL_38; - case 2: - v14 = 406; - v22 = 84; - goto LABEL_27; - case 3: - v14 = 406; - goto LABEL_26; - case 4: - v14 = 407; - goto LABEL_29; - case 5: - v15 = 196; - goto LABEL_34; - case 6: - v15 = 234; - goto LABEL_34; - case 7: - v15 = 272; - goto LABEL_34; - case 8: - v15 = 309; -LABEL_34: - v14 = 405; - break; - default: - break; - } + v14=texture_tab_coord1[v13][0]; + v15=texture_tab_coord1[v13][1]; } else { pPageTexture = pTextures_tabs[v13][0]; - switch ( v13 ) - { - case 0: - v14 = 415; - v22 = 10; - goto LABEL_27; - case 1: - v14 = 415; -LABEL_38: - v22 = 46; - goto LABEL_27; - case 2: - v14 = 415; - v22 = 83; - goto LABEL_27; - case 3: - v14 = 415; -LABEL_26: - v22 = 121; -LABEL_27: - v15 = v22; - break; - case 4: - v14 = 415; -LABEL_29: - v15 = 158; - break; - case 5: - v15 = 196; - goto LABEL_46; - case 6: - v15 = 234; - goto LABEL_46; - case 7: - v15 = 271; - goto LABEL_46; - case 8: - v15 = 307; -LABEL_46: - v14 = 416; - break; - default: - break; - } + v14=texture_tab_coord0[v13][0]; + v15=texture_tab_coord0[v13][1]; } pRenderer->DrawTextureTransparent(v14, v15, pPageTexture); v13 = v25;