diff --git a/.gitignore b/.gitignore index 218d50fd8..488c7e6cf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ /vc60.idb #ignore cmake cache -/build/CMakeCache.txt +build/ + # ELF object file. diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index a5e03428f..6b0f2f739 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -61,6 +61,17 @@ int GameTitleWidth; void * TitleMenuText; void * MenuPentegram; + + +void *optbar_cel; +void *PentSpin_cel; +void *option_cel; +void *sgpLogo; +void *pTitlgrayCel_sgpBackCel; +void *pDiabfrCel; + + + #endif const unsigned char lfontframe[127] = @@ -330,22 +341,17 @@ void __fastcall gmenu_print_text(int x, int y, char *pszStr) v4 = y; v5 = x; - - // for(int z = 0; z < 30; z++){ - // char * A = TitleMenuText; - // printf("BIG TEXT %c\n", A[z]); - // } - for (i = *pszStr; *v3; i = *v3) { ++v3; v7 = lfontframe[fontidx[i]]; if (v7) if(gbRunGame == 1){ - CelDecodeLightOnly(v5, v4, (char *)BigTGold_cel, v7, 46); + //CelDecodeLightOnly(v5, v4, (char *)BigTGold_cel, v7, 46); + DrawArtWithMask(v5-90, v4-250, 42, 42, 0, 242, pPcxFontImage); //pPcxFontImage } else{ - DrawArtWithMask(v5-90, v4-250, 42, 42, 0, 242, pPcxFontImage); + DrawArtWithMask(v5-90, v4-250, 42, 42, 0, 242, pPcxFontImage); //pPcxFontImage } v5 += lfontkern[v7] + 2; @@ -366,11 +372,16 @@ void __cdecl gmenu_init_menu() dword_63448C = 0; byte_634464 = 0; +//Dont remove this + pPanelText = LoadFileInMem("CtrlPan\\SmalText.CEL", 0); + LoadArtImage("ui_art\\focus42.pcx", &MenuPentegram, 8, dwData); + +// LoadArtImage("ui_art\\cursor.pcx", &pPcxCursorImage, 1, dwData); gdwCursorWidth = dwData[0]; gdwCursorHeight = dwData[1]; - LoadArtImage("ui_art\\smlogo.pcx", &pPcxLogoImage, 15, dwData); + LoadArtImage("ui_art\\logo.pcx", &pPcxLogoImage, 15, dwData); gdwLogoWidth = dwData[0]; gdwLogoHeight = dwData[1]; @@ -393,7 +404,7 @@ void __cdecl gmenu_init_menu() gdwFont3Height = dwData[1]; pFont3 = LoadFileInMem("ui_art\\font16.bin", 0); - LoadArtImage("ui_art\\focus42.pcx", &MenuPentegram, 8, dwData); + } // 634464: using guessed type char byte_634464; // 634478: using guessed type char byte_634478; diff --git a/Stub/init.cpp b/Stub/init.cpp index de55d3e8f..ecb6ffe58 100644 --- a/Stub/init.cpp +++ b/Stub/init.cpp @@ -8,6 +8,7 @@ void *diabdat_mpq; void *patch_rt_mpq; + _SNETVERSIONDATA fileinfo; WNDPROC CurrentProc; int gbActive; @@ -91,13 +92,14 @@ WNDPROC __fastcall SetWindowProc(WNDPROC NewProc) void __cdecl init_archives() { - DUMMY(); + DUMMY(); // We will need to remove the find_file_in_std_directories funct when it comes to mobile SFileOpenArchive(find_file_in_std_directories("diabdat.mpq").c_str(), 1000, 0, &diabdat_mpq); assert(diabdat_mpq); SFileOpenArchive(find_file_in_std_directories("patch_rt.mpq").c_str(), 1000, 0, &patch_rt_mpq); assert(patch_rt_mpq); + } void __cdecl init_get_file_info() diff --git a/Stub/sdlrender.cpp b/Stub/sdlrender.cpp index 29d163928..d6ceb0551 100644 --- a/Stub/sdlrender.cpp +++ b/Stub/sdlrender.cpp @@ -771,13 +771,13 @@ void ShowCredts() void RenderDiabloLogo() { int MyPcxDelay = 60; - int MyPcxFRAME = (SDL_GetTicks() / MyPcxDelay) % 15; + int MyPcxFRAME = (SDL_GetTicks() / MyPcxDelay) % 15; // This is not how this should be done... MyPcxFRAME++; if (MyPcxFRAME >= 15) { MyPcxFRAME = 1; } - DrawArtWithMask(320 - (gdwLogoWidth / 2), 0, gdwLogoWidth, gdwLogoHeight, MyPcxFRAME, 250, pPcxLogoImage); + DrawArtWithMask(320 - (gdwLogoWidth / 2), -30, gdwLogoWidth, gdwLogoHeight, MyPcxFRAME, 250, pPcxLogoImage); } void DrawCursor(int mx, int my) @@ -847,8 +847,8 @@ void SDL_RenderDiabloMainPage() DrawArtWithMask(PentPositionX1-90, PentPositionY1-250, 42, 42, Pentframe, 250, MenuPentegram); DrawArtWithMask(PentPositionX2-90, PentPositionY2-250, 42, 42, Pentframe, 250, MenuPentegram); - ADD_PlrStringXY(0, 600 - 150, 640, "DedicaTed To David Brevik, Erich Schaefer, Max Schaefer,", COL_RED); - ADD_PlrStringXY(0, 600 - 130, 640, " MaTT Uelman, and The Blizzard North Team ThaT Gave Us A Childhood.", COL_RED); + 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); } void SDL_RenderDiabloSinglePlayerPage() diff --git a/Stub/storm.cpp b/Stub/storm.cpp index 315b928d3..aa29afa36 100644 --- a/Stub/storm.cpp +++ b/Stub/storm.cpp @@ -124,18 +124,18 @@ BOOL STORMAPI SFileGetFileArchive(HANDLE hFile, HANDLE archive) BOOL STORMAPI SFileOpenFile(const char *filename, HANDLE *phFile) { - BOOL result; //eprintf("%s: %s\n", __FUNCTION__, filename); + + BOOL result; - - result = SFileOpenFileEx((HANDLE)patch_rt_mpq, filename, 0, phFile); + result = SFileOpenFileEx((HANDLE)patch_rt_mpq, filename, 0, phFile); if (!result) { result = SFileOpenFileEx((HANDLE)diabdat_mpq, filename, 0, phFile); } if (!result || !*phFile) { - /*eprintf("%s: Not found: %s\n", __FUNCTION__, filename);*/ + eprintf("%s: Not found: %s\n", __FUNCTION__, filename); } return result; }