X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=4335ecaee98b1315a50928a8eca565c2ea7ae9e8;hb=57675025108b7ad3989737f18ebfeec8e5e44889;hp=f5d32e48495cd61b96a98b69daba2c778baecb01;hpb=ad88c8db0051fd6d9082fc61a124efd407113632;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index f5d32e4..4335eca 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -166,9 +166,31 @@ int main(int argc, char **argv) { normalFont.MapChar(':', 10, 0); normalFont.MapChar('!', 10, 0); normalFont.MapChar('?', 10, 0); + // TODO: add '.' character battleRes.normalFont = &normalFont; - battleRes.spellMenuPrototype = Menu(&normalFont, 12, 6, 8, 2, 32); + SDL_Surface *disabledFontImg(IMG_Load("test-data/disabled-font.png")); + Sprite disabledFontSprite(disabledFontImg, 16, 16); + Font disabledFont(&disabledFontSprite); + disabledFont.MapRange('A', 'M', 0, 1); + disabledFont.MapRange('N', 'Z', 0, 2); + disabledFont.MapRange('a', 'm', 0, 3); + disabledFont.MapRange('n', 'z', 0, 4); + disabledFont.MapChar(':', 10, 0); + disabledFont.MapChar('!', 10, 0); + disabledFont.MapChar('?', 10, 0); + // TODO: add '.' character + battleRes.disabledFont = &disabledFont; + + SDL_Surface *handCursorImg(IMG_Load("test-data/cursor-hand.png")); + Sprite handCursorSprite(handCursorImg, 32, 32); + battleRes.menuCursor = &handCursorSprite; + + battleRes.spellMenuHeadline = "Please choose a spell."; + battleRes.spellMenuPrototype = Menu(&normalFont, &disabledFont, &handCursorSprite, 12, 6, 8, 2, 32); + + battleRes.itemMenuHeadline = "Please choose an item."; + battleRes.itemMenuPrototype = Menu(&normalFont, &disabledFont, &handCursorSprite, 15, 6, 8, 1, 32); BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes)); battleState->AddMonster(monster);