diff --git a/.gitignore b/.gitignore index e915029..2d526b3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,11 @@ ################################################################################ /.vs +/Debug +/Release +/x64 +/Speedy E.e424a3cb +/DATA +/IMAGE* +/MOVIE +/SOUND diff --git a/DATA/bench.blp b/DATA/bench.blp index 4c13427..da23b27 100644 --- a/DATA/bench.blp +++ b/DATA/bench.blp @@ -1 +1 @@ -Benchmark = 30 +Benchmark = -15725396 diff --git a/Debug/Speedy E.e424a3cb.tlog/CL.read.1.tlog b/Debug/Speedy E.e424a3cb.tlog/CL.read.1.tlog index 090c0b6..510afcd 100644 Binary files a/Debug/Speedy E.e424a3cb.tlog/CL.read.1.tlog and b/Debug/Speedy E.e424a3cb.tlog/CL.read.1.tlog differ diff --git a/Debug/Speedy E.e424a3cb.tlog/CL.write.1.tlog b/Debug/Speedy E.e424a3cb.tlog/CL.write.1.tlog index 97adc4b..0431e64 100644 Binary files a/Debug/Speedy E.e424a3cb.tlog/CL.write.1.tlog and b/Debug/Speedy E.e424a3cb.tlog/CL.write.1.tlog differ diff --git a/Debug/Speedy Eggbert 2 Source.exe b/Debug/Speedy Eggbert 2 Source.exe index d12c742..358602a 100644 Binary files a/Debug/Speedy Eggbert 2 Source.exe and b/Debug/Speedy Eggbert 2 Source.exe differ diff --git a/Debug/Speedy Eggbert 2 Source.log b/Debug/Speedy Eggbert 2 Source.log index 7307d30..e659577 100644 --- a/Debug/Speedy Eggbert 2 Source.log +++ b/Debug/Speedy Eggbert 2 Source.log @@ -1,4 +1,4 @@ - blupi.cpp + decor.cpp c:\users\jimmy\documents\github\sb2-decomp\def.h(241): warning C4005: 'MAXMOVEOBJECT': macro redefinition c:\users\jimmy\documents\github\sb2-decomp\def.h(83): note: see previous definition of 'MAXMOVEOBJECT' c:\users\jimmy\documents\github\sb2-decomp\def.h(480): warning C4005: 'WM_PHASE_PRIVATE': macro redefinition @@ -8,21 +8,34 @@ c:\users\jimmy\documents\github\sb2-decomp\resource.h(106): warning C4005: 'TX_S c:\users\jimmy\documents\github\sb2-decomp\decor.h(29): warning C4005: 'MAXMOVEOBJECT': macro redefinition c:\users\jimmy\documents\github\sb2-decomp\def.h(241): note: see previous definition of 'MAXMOVEOBJECT' c:\users\jimmy\documents\github\sb2-decomp\event.h(100): warning C4091: 'typedef ': ignored on left of '' when no variable is declared -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(242): warning C4101: 'targetlevel': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(238): warning C4101: 'rcRect': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(238): warning C4101: 'clip': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(242): warning C4101: 'i': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(241): warning C4101: 'posMouse': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(354): warning C4293: '<<': shift count negative or too big, undefined behavior -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(363): warning C4293: '<<': shift count negative or too big, undefined behavior -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(345): warning C4101: 'posMouse': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(615): warning C4101: 'num2': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(619): warning C4101: 'open': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(663): warning C4101: 'rcRect': unreferenced local variable -c:\users\jimmy\documents\github\sb2-decomp\blupi.cpp(798): warning C4101: 'timeStep': unreferenced local variable - Generating Code... - Skipping... (no relevant changes detected) - pixmap.cpp +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(132): warning C4101: 'i': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(543): warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(568): warning C4101: 'text': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(997): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(1033): warning C4553: '==': operator has no effect; did you intend '='? +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(1266): warning C4553: '==': operator has no effect; did you intend '='? +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(1519): warning C4553: '==': operator has no effect; did you intend '='? +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6521): warning C4101: 'type2': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6554): warning C4244: '=': conversion from 'LONG' to 'short', possible loss of data +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6577): warning C4101: 'players': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6692): warning C4101: 'rect2': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6691): warning C4101: 'rect1': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6693): warning C4101: 'rect3': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6774): warning C4101: 'moveObject': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(6789): warning C4101: 'tinyRect2': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(7855): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8097): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8152): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8174): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8210): warning C4101: 'src3': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8240): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8268): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8296): warning C4101: 'tinyRect': unreferenced local variable +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8775): warning C4553: '==': operator has no effect; did you intend '='? +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(9008): warning C4129: '%': unrecognized character escape sequence +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(9012): warning C4129: 'w': unrecognized character escape sequence +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(5295): warning C4715: 'CDecor::BlupiIsGround': not all control paths return a value +c:\users\jimmy\documents\github\sb2-decomp\decor.cpp(8218): warning C4715: 'CDecor::MoveObjectDetect': not all control paths return a value LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification blupi.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification pixmap.obj : warning LNK4006: "int __cdecl Benchmark(void)" (?Benchmark@@YAHXZ) already defined in blupi.obj; second definition ignored diff --git a/Debug/Speedy Eggbert 2 Source.pdb b/Debug/Speedy Eggbert 2 Source.pdb index 913234b..249feec 100644 Binary files a/Debug/Speedy Eggbert 2 Source.pdb and b/Debug/Speedy Eggbert 2 Source.pdb differ diff --git a/Debug/blupi.obj b/Debug/blupi.obj index a332492..d12dfb3 100644 Binary files a/Debug/blupi.obj and b/Debug/blupi.obj differ diff --git a/Debug/button.obj b/Debug/button.obj index 925c5a0..ffb4b8d 100644 Binary files a/Debug/button.obj and b/Debug/button.obj differ diff --git a/Debug/ddutil.obj b/Debug/ddutil.obj index ec3945a..f554af3 100644 Binary files a/Debug/ddutil.obj and b/Debug/ddutil.obj differ diff --git a/Debug/decor.obj b/Debug/decor.obj index 03d172b..d84dc72 100644 Binary files a/Debug/decor.obj and b/Debug/decor.obj differ diff --git a/Debug/event.obj b/Debug/event.obj index 07906b1..dccc377 100644 Binary files a/Debug/event.obj and b/Debug/event.obj differ diff --git a/Debug/jauge.obj b/Debug/jauge.obj index dee3c6e..79371a6 100644 Binary files a/Debug/jauge.obj and b/Debug/jauge.obj differ diff --git a/Debug/menu.obj b/Debug/menu.obj index 1c49991..2958432 100644 Binary files a/Debug/menu.obj and b/Debug/menu.obj differ diff --git a/Debug/misc.obj b/Debug/misc.obj index f994600..c5ae69e 100644 Binary files a/Debug/misc.obj and b/Debug/misc.obj differ diff --git a/Debug/movie.obj b/Debug/movie.obj index 1e825c6..3c9c434 100644 Binary files a/Debug/movie.obj and b/Debug/movie.obj differ diff --git a/Debug/network.obj b/Debug/network.obj index 61bd610..8ffd8c5 100644 Binary files a/Debug/network.obj and b/Debug/network.obj differ diff --git a/Debug/pixmap.obj b/Debug/pixmap.obj index 42e2c60..90b1d0e 100644 Binary files a/Debug/pixmap.obj and b/Debug/pixmap.obj differ diff --git a/Debug/sound.obj b/Debug/sound.obj index 52903c9..049ce27 100644 Binary files a/Debug/sound.obj and b/Debug/sound.obj differ diff --git a/Debug/text.obj b/Debug/text.obj index e524f2e..f6d3d71 100644 Binary files a/Debug/text.obj and b/Debug/text.obj differ diff --git a/Debug/vc140.idb b/Debug/vc140.idb index 3cd1e11..675244c 100644 Binary files a/Debug/vc140.idb and b/Debug/vc140.idb differ diff --git a/Debug/vc140.pdb b/Debug/vc140.pdb index faa461d..1af1b18 100644 Binary files a/Debug/vc140.pdb and b/Debug/vc140.pdb differ diff --git a/blupi.cpp b/blupi.cpp index 4f73f5d..17374ff 100644 --- a/blupi.cpp +++ b/blupi.cpp @@ -752,7 +752,6 @@ static BOOL DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) if (!g_pPixmap->CacheAll(TRUE, g_hWnd, g_bFullScreen, g_bTrueColor, g_bTrueColorDecor, g_mouseType, "init.blp", 0)) return FALSE; - OutputDebug("SavePalette\n"); g_pPixmap->SavePalette(); OutputDebug("InitSysPalette\n"); @@ -778,7 +777,7 @@ static BOOL DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) g_pEvent = new CEvent; if (g_pEvent == NULL) return InitFail("New event", FALSE); - g_pEvent->Create(g_hWnd, g_pPixmap, g_pDecor, g_pSound, g_pMovie, g_pNetwork); + g_pEvent->Create(hInstance, g_hWnd, g_pPixmap, g_pDecor, g_pSound, g_pNetwork, g_pMovie); g_pEvent->SetFullScreen(g_bFullScreen); g_pEvent->SetMouseType(g_mouseType); g_pEvent->ChangePhase(WM_PHASE_INIT); diff --git a/decor.cpp b/decor.cpp index 9b763b0..a263325 100644 --- a/decor.cpp +++ b/decor.cpp @@ -121,19 +121,8 @@ BOOL CDecor::LoadImages() void CDecor::InitGamer() { - int i; - BYTE* door; - m_nbVies = 3; - - door = m_doors; - - for (i != 0; i = 50; i++) - { - *(int*)door = 0x1010101; - door = door + 4; - } - return; + ZeroMemory(m_doors, sizeof(m_doors)); } // The only seemingly sane function. diff --git a/event.cpp b/event.cpp index 828cf9b..8361352 100644 --- a/event.cpp +++ b/event.cpp @@ -1286,7 +1286,7 @@ CEvent::CEvent() m_bCtrlDown = FALSE; m_input = 0; - for (i != 0; i = 20; i++) + for (i = 0; i < 20; i++) { m_menuIndex = 0; m_menuIndex++; @@ -1309,10 +1309,9 @@ CEvent::~CEvent() return; } -void CEvent::Create(HWND hWnd, CPixmap *pPixmap, CDecor *pDecor, - CSound *pSound, CMovie *pMovie, CNetwork *pNetwork) +void CEvent::Create(HINSTANCE hInstance, HWND hWnd, CPixmap *pPixmap, CDecor *pDecor, + CSound *pSound, CNetwork *pNetwork, CMovie *pMovie) { - HINSTANCE hInstance; POINT pos; m_hInstance = hInstance; diff --git a/event.h b/event.h index d92d548..40c2b23 100644 --- a/event.h +++ b/event.h @@ -108,7 +108,7 @@ public: void OutputNetDebug(const char* str); POINT GetMousePos(); - void Create(HWND hWnd, CPixmap *pPixmap, CDecor *pDecor, CSound *pSound, CMovie *pMovie, CNetwork *pNetwork); + void Create(HINSTANCE hInstance, HWND hWnd, CPixmap *pPixmap, CDecor *pDecor, CSound *pSound, CNetwork *pNetwork, CMovie *pMovie); void SetFullScreen(BOOL bFullScreen); void SetMouseType(int mouseType); int GetWorld(); diff --git a/pixmap.cpp b/pixmap.cpp index 972d164..a8ca72a 100644 --- a/pixmap.cpp +++ b/pixmap.cpp @@ -857,6 +857,7 @@ LABEL1: BOOL CPixmap::CacheAll(BOOL cache, HWND hWnd, BOOL bFullScreen, BOOL bTrueColor, BOOL bTrueColorDecor, int mouseType, const char* pFilename, int region) { + SetDebug(TRUE); // char filename[100]; char image[12]; POINT totalDim; @@ -898,7 +899,7 @@ BOOL CPixmap::CacheAll(BOOL cache, HWND hWnd, BOOL bFullScreen, BOOL bTrueColor, SavePalette(); OutputDebug("InitSysPalette\n"); InitSysPalette(); - SetDebug(FALSE); + //SetDebug(FALSE); if (cache == FALSE) { @@ -979,7 +980,6 @@ BOOL CPixmap::CacheAll(BOOL cache, HWND hWnd, BOOL bFullScreen, BOOL bTrueColor, SetTransparent(CHJAUGE, RGB(0, 0, 255)); if (BackgroundCache(CHTEXT, "text.blp", totalDim, iconDim, FALSE) != FALSE) { - return FALSE; SetTransparent(CHTEXT, RGB(0, 0, 255)); if (BackgroundCache(CHLITTLE, "little.blp", totalDim, iconDim, FALSE) != FALSE) { @@ -987,7 +987,6 @@ BOOL CPixmap::CacheAll(BOOL cache, HWND hWnd, BOOL bFullScreen, BOOL bTrueColor, Benchmark(); return TRUE; } - return FALSE; } return FALSE; } @@ -1027,7 +1026,7 @@ int CPixmap::Benchmark() pos.x = 13; pos.y = 13; QuickIcon(1, 1, pos); - num5++; + num5--; } while (num5); ftime(time); i = (int)time;