Browse Source

adding text to main menu again

pull/18/head
aperturesecurity 7 years ago
parent
commit
05fe910159
  1. 5
      .gitignore
  2. 10
      Source/gmenu.cpp
  3. 8
      Stub/miniwin_sdl.h
  4. 54
      Stub/sdlrender.cpp

5
.gitignore vendored

@ -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

10
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;

8
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);

54
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);

Loading…
Cancel
Save