diff --git a/.gitignore b/.gitignore index b8c978e49..5a7414788 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ # Generated by VC++ 6 builds /vc60.idb -#ignore cmake cache -#build/* +#ignore cmake cache and keep devilution. +!build/devilution +build/* .vscode/tasks.json diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index 6b0f2f739..4df0713d3 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -328,6 +328,15 @@ BOOL __stdcall SBmpLoadImage(const char *pszFileName, PALETTEENTRY *pPalette, vo return 0; } + + + + + + + + + void __fastcall gmenu_print_text(int x, int y, char *pszStr) { char *v3; // edi @@ -352,6 +361,7 @@ void __fastcall gmenu_print_text(int x, int y, char *pszStr) } else{ DrawArtWithMask(v5-90, v4-250, 42, 42, 0, 242, pPcxFontImage); //pPcxFontImage + } v5 += lfontkern[v7] + 2; diff --git a/Stub/miniwin_sdl.h b/Stub/miniwin_sdl.h index 3d6ed31ce..ccec27e9c 100644 --- a/Stub/miniwin_sdl.h +++ b/Stub/miniwin_sdl.h @@ -31,13 +31,16 @@ void sdl_present_surface(); +extern int gdwFontWidth; +extern int gdwFontHeight; +extern void *pPcxFontImage; +extern unsigned char *pFont; void sdl_update_entire_surface(); //My SDL inclusions // - extern bool SorcerorCreateSelected; extern bool WarriorCreateSelected; extern bool RogueCreateSelected; @@ -143,5 +146,8 @@ void DrawPreGameOptions(int image , int ShowClasses); void DrawPreGameDifficultySelection(int image, int ShowClasses); + + typedef unsigned char BYTE; +void DrawPCXString(int x, int y, int w, int h, char *str, BYTE *font, void *pBuff); void DrawArtWithMask(int SX, int SY, int SW, int SH, int nFrame, BYTE bMask, void *pBuffer); \ No newline at end of file diff --git a/Stub/sdlrender.cpp b/Stub/sdlrender.cpp index d6ceb0551..ebe453b39 100644 --- a/Stub/sdlrender.cpp +++ b/Stub/sdlrender.cpp @@ -830,22 +830,50 @@ void SDL_RenderDiabloMainPage() // scrollrt_draw_cursor_back_buffer(); // Doesn't work? + char * MENIITEMS[5]= {"Single Player", "Multi Player", "Show Intro", "Play Credits","Exit Diablo"}; + + RenderDiabloLogo(); // print_title_str_large(); - gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.2), - "Single Player"); - gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.3), - "Multi Player"); - // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.3), "Show - // Replay"); - gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.4), - "Play Credits"); - gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.5), - "Exit Diablo"); - - DrawArtWithMask(PentPositionX1-90, PentPositionY1-250, 42, 42, Pentframe, 250, MenuPentegram); - DrawArtWithMask(PentPositionX2-90, PentPositionY2-250, 42, 42, Pentframe, 250, MenuPentegram); + int x = 150; + int y = 200; + for (int i = 0 ; i < 5 ; i++ ){ + + DrawPCXString( x, y, gdwFontWidth, gdwFontHeight, MENIITEMS[i], pFont, pPcxFontImage); + + y+= 50; + + + + } + + + + + + + + + + + + // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.2), "Single Player"); + // DrawPCXString( 150, 165, gdwFontWidth, gdwFontHeight, "Single Player", pFont, pPcxFontImage); + + // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.3), "Multi Player"); + + // DrawPCXString( 150, 215, gdwFontWidth, gdwFontHeight, "Multi Player", pFont, pPcxFontImage); + + + + // // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.3), "Show + // // Replay"); + // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.4), "Play Credits"); + // gmenu_print_text((SCREEN_WIDTH / 2) - (SCREEN_WIDTH * 0.2), (SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT * 0.5),"Exit Diablo"); + + DrawArtWithMask(PentPositionX1-90, PentPositionY1-220, 42, 42, Pentframe, 250, MenuPentegram); + DrawArtWithMask(PentPositionX2-90, PentPositionY2-220, 42, 42, Pentframe, 250, MenuPentegram); ADD_PlrStringXY(0, 600 - 150, 640, "DedicaTed To David Brevik, Erich Schaefer, Max Schaefer,", COL_BLUE);// Red isn't red ADD_PlrStringXY(0, 600 - 130, 640, " MaTT Uelman, and The Blizzard North Team ThaT Gave Us A Childhood.", COL_BLUE);