Mercurial > mm7
changeset 819:9359c114f98c
More on screenshot
author | Nomad |
---|---|
date | Tue, 26 Mar 2013 14:14:39 +0200 |
parents | 352c5161fade |
children | 522591080ac5 |
files | UIBooks.cpp UIHouses.cpp UIPopup.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_6.cpp mm7_data.cpp mm7_data.h |
diffstat | 10 files changed, 90 insertions(+), 567 deletions(-) [+] |
line wrap: on
line diff
--- a/UIBooks.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/UIBooks.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -429,13 +429,13 @@ if ( !byte_5C6D50[dword_506528] ) { v2 = achievedAwardsIndex[dword_506528]; - a1.uFrameWidth = 460; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameHeight = 344; + a1.uFrameWidth = game_viewport_width; + a1.uFrameX = game_viewport_x; + a1.uFrameY = game_viewport_y; + a1.uFrameHeight = game_viewport_height; v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[]; - a1.uFrameZ = 467; - a1.uFrameW = 351; + a1.uFrameZ = game_viewport_z; + a1.uFrameW = game_viewport_w; if ( v3 ) a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, v3, 3u); } @@ -532,12 +532,12 @@ v1 = pViewport->uViewportTL_X + 398; } pRenderer->DrawTextureTransparent(v1, v9, v11); - a1.uFrameWidth = 460; - a1.uFrameHeight = 344; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameZ = 467; - a1.uFrameW = 351; + a1.uFrameWidth = game_viewport_width; + a1.uFrameHeight = game_viewport_height; + a1.uFrameX = game_viewport_x; + a1.uFrameY = game_viewport_y; + a1.uFrameZ = game_viewport_z; + a1.uFrameW = game_viewport_w; a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u); a1.uFrameX = 48; a1.uFrameY = 70; @@ -796,12 +796,12 @@ v7 = pViewport->uViewportTL_X + 397; LABEL_46: pRenderer->DrawTextureTransparent(v7, v23, v30); - a1.uFrameWidth = 460; - a1.uFrameHeight = 344; - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameZ = 467; - a1.uFrameW = 467; + a1.uFrameWidth = game_viewport_width; + a1.uFrameHeight = game_viewport_height; + a1.uFrameX = game_viewport_x; + a1.uFrameY = game_viewport_z; + a1.uFrameZ = game_viewport_z; + a1.uFrameW = game_viewport_w; a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u); a1.uFrameX = 48; a1.uFrameY = 70; @@ -1004,12 +1004,12 @@ dword_506540 = 0; DrawBook_Map_sub(97, 49, 361, 313, 0); pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr); - map_window.uFrameWidth = 460; - map_window.uFrameHeight = 344; - map_window.uFrameX = 8; - map_window.uFrameY = 8; - map_window.uFrameZ = 467; - map_window.uFrameW = 467; + map_window.uFrameWidth = game_viewport_width; + map_window.uFrameHeight = game_viewport_height; + map_window.uFrameX = game_viewport_x; + map_window.uFrameY = game_viewport_y; + map_window.uFrameZ = game_viewport_z; + map_window.uFrameW = game_viewport_w; map_id = pMapStats->GetMapInfo(pCurrentMapName); if ( map_id ) map_window.DrawTitleText(pBook2Font, -14, 12, 0, pMapStats->pInfos[map_id].pName, 3);
--- a/UIHouses.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/UIHouses.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -2597,7 +2597,7 @@ __debugbreak(); pOutString = pFontArrus; strcpy(pTmpBuf, pNPCTopics[354].pText); - dialog_window.uFrameWidth = 460; + dialog_window.uFrameWidth = game_viewport_width; dialog_window.uFrameZ = 452; pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0) + 7; if ( 352 - pTextHeight < 8 ) @@ -2616,7 +2616,7 @@ { __debugbreak(); strcpy(pTmpBuf, pNPCTopics[(uint)window_SpeakInHouse->ptr_1C + 247].pText); - dialog_window.uFrameWidth = 460; + dialog_window.uFrameWidth = game_viewport_width; dialog_window.uFrameZ = 452; v61 = pFontArrus->CalcTextHeight(pTmpBuf, &dialog_window, 12, 0); pTextHeight = v61 + 7;
--- a/UIPopup.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/UIPopup.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -1906,7 +1906,7 @@ a1.uFrameHeight += v6; if ( (signed int)a1.uFrameHeight < 150 ) a1.uFrameHeight = 150; - a1.uFrameWidth = 460; + a1.uFrameWidth = game_viewport_width; a1.DrawMessageBox(0); a1.uFrameWidth -= 12; a1.uFrameHeight -= 12;
--- a/mm7_2.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_2.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -562,7 +562,7 @@ v26 = 0; pParty->field_7B5_in_arena_quest = uDialogueType; memcpy(&window, pDialogueWindow, sizeof(window)); - window.uFrameWidth = 460; + window.uFrameWidth = game_viewport_width; window.uFrameZ = 452; v0 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[575], &window, 13, 0) + 7; pRenderer->BeginSceneD3D(); @@ -6290,10 +6290,12 @@ //v30 = width; //v2 = height; //v27 = height; - v23 = 452.0 / (double)width; - v25 = 336.0 / (double)height; + v23 = game_viewport_width / (double)width; + v25 = game_viewport_height / (double)height; + pPixels = (unsigned __int16 *)malloc(2 * height * width); memset(pPixels, 0 , 2 * height * width); + v3 = pPixels; if ( pRenderer->pRenderD3D ) { @@ -6310,17 +6312,24 @@ if ( pRenderer->LockSurface_DDraw4(pRenderer->pBackBuffer4, &Dst, DDLOCK_WAIT) ) { + for (uint i = game_viewport_y; i < game_viewport_y+16; ++i) + memset32((char *)Dst.lpSurface + i * Dst.lPitch, 0xF800F800, Dst.lPitch / 4); + for (uint i = game_viewport_y+32; i < game_viewport_y+32+16; ++i) + memset32((char *)Dst.lpSurface + i * Dst.lPitch, 0x07E007E0, Dst.lPitch / 4); + for (uint i = game_viewport_y+64; i < game_viewport_y+64+16; ++i) + memset32((char *)Dst.lpSurface + i * Dst.lPitch, 0x001F001F, Dst.lPitch / 4); + auto src = (unsigned __int16 *)Dst.lpSurface; auto dst = pPixels; for (uint y = 0; y < height; ++y) { - uint src_y = (y * v25 + 8.0f) * (Dst.lPitch / sizeof(short)); - assert(y * v25 + 8.0f < Dst.dwHeight); + uint src_y = (game_viewport_y + y * v25) * (Dst.lPitch / sizeof(short)); + assert((y + game_viewport_y) * v25 < Dst.dwHeight); assert(y < height); for (uint x = 0; x < width; ++x) { - uint src_x = x * v23 + 8.0; + uint src_x = game_viewport_x + x * v23; assert(src_x < Dst.dwWidth); assert(x < width); @@ -9196,10 +9205,12 @@ //_getcwd(v5, 120); //sprintfex(pIniFilename, "%s\\mm6.ini", v5); viewparams = new ViewingParams; - viewparams->uScreen_topL_X = GetPrivateProfileIntW(L"screen", L"vx1", 8, pIniFilename); - viewparams->uScreen_topL_Y = GetPrivateProfileIntW(L"screen", L"vy1", 8, pIniFilename); - viewparams->uScreen_BttmR_X = GetPrivateProfileIntW(L"screen", L"vx2", 468, pIniFilename); - viewparams->uScreen_BttmR_Y = GetPrivateProfileIntW(L"screen", L"vy2", 351, pIniFilename); + game_viewport_x = viewparams->uScreen_topL_X = GetPrivateProfileIntW(L"screen", L"vx1", 8, pIniFilename); + game_viewport_y = viewparams->uScreen_topL_Y = GetPrivateProfileIntW(L"screen", L"vy1", 8, pIniFilename); + game_viewport_z = viewparams->uScreen_BttmR_X = GetPrivateProfileIntW(L"screen", L"vx2", 468, pIniFilename); + game_viewport_w = viewparams->uScreen_BttmR_Y = GetPrivateProfileIntW(L"screen", L"vy2", 351, pIniFilename); + game_viewport_width = game_viewport_z - game_viewport_x; + game_viewport_height = game_viewport_w - game_viewport_y + 1; pAudioPlayer = new AudioPlayer; @@ -9435,508 +9446,6 @@ return uCurrentMenuID; } -/* - v17 = 0; - if ( v4 > -2005532222 ) - { - switch ( v4 + 2005532212 ) - { - case 0: - v7 = "DDERR_SURFACENOTATTACHED"; - goto LABEL_173; - case 10: - v7 = "DDERR_TOOBIGHEIGHT"; - goto LABEL_173; - case 20: - v7 = "DDERR_TOOBIGSIZE"; - goto LABEL_173; - case 30: - v7 = "DDERR_TOOBIGWIDTH"; - goto LABEL_173; - case 50: - v7 = "DDERR_UNSUPPORTEDFORMAT"; - goto LABEL_173; - case 60: - v7 = "DDERR_UNSUPPORTEDMASK"; - goto LABEL_173; - case 61: - v7 = "DDERR_INVALIDSTREAM"; - goto LABEL_173; - case 77: - v7 = "DDERR_VERTICALBLANKINPROGRESS"; - goto LABEL_173; - case 80: - v7 = "DDERR_WASSTILLDRAWING"; - goto LABEL_173; - case 100: - v7 = "DDERR_XALIGN"; - goto LABEL_173; - case 101: - v7 = "DDERR_INVALIDDIRECTDRAWGUID"; - goto LABEL_173; - case 102: - v7 = "DDERR_DIRECTDRAWALREADYCREATED"; - goto LABEL_173; - case 103: - v7 = "DDERR_NODIRECTDRAWHW"; - goto LABEL_173; - case 104: - v7 = "DDERR_PRIMARYSURFACEALREADYEXISTS"; - goto LABEL_173; - case 105: - v7 = "DDERR_NOEMULATION"; - goto LABEL_173; - case 106: - v7 = "DDERR_REGIONTOOSMALL"; - goto LABEL_173; - case 107: - v7 = "DDERR_CLIPPERISUSINGHWND"; - goto LABEL_173; - case 108: - v7 = "DDERR_NOCLIPPERATTACHED"; - goto LABEL_173; - case 109: - v7 = "DDERR_NOHWND"; - goto LABEL_173; - case 110: - v7 = "DDERR_HWNDSUBCLASSED"; - goto LABEL_173; - case 111: - v7 = "DDERR_HWNDALREADYSET"; - goto LABEL_173; - case 112: - v7 = "DDERR_NOPALETTEATTACHED"; - goto LABEL_173; - case 113: - v7 = "DDERR_NOPALETTEHW"; - goto LABEL_173; - case 114: - v7 = "DDERR_BLTFASTCANTCLIP"; - goto LABEL_173; - case 115: - v7 = "DDERR_NOBLTHW"; - goto LABEL_173; - case 116: - v7 = "DDERR_NODDROPSHW"; - goto LABEL_173; - case 117: - v7 = "DDERR_OVERLAYNOTVISIBLE"; - goto LABEL_173; - case 118: - v7 = "DDERR_NOOVERLAYDEST"; - goto LABEL_173; - case 119: - v7 = "DDERR_INVALIDPOSITION"; - goto LABEL_173; - case 120: - v7 = "DDERR_NOTAOVERLAYSURFACE"; - goto LABEL_173; - case 121: - v7 = "DDERR_EXCLUSIVEMODEALREADYSET"; - goto LABEL_173; - case 122: - v7 = "DDERR_NOTFLIPPABLE"; - goto LABEL_173; - case 123: - v7 = "DDERR_CANTDUPLICATE"; - goto LABEL_173; - case 125: - v7 = "DDERR_CANTCREATEDC"; - goto LABEL_173; - case 126: - v7 = "DDERR_NODC"; - goto LABEL_173; - case 127: - v7 = "DDERR_WRONGMODE"; - goto LABEL_173; - case 128: - v7 = "DDERR_IMPLICITLYCREATED"; - goto LABEL_173; - case 129: - v7 = "DDERR_NOTPALETTIZED"; - goto LABEL_173; - case 130: - v7 = "DDERR_UNSUPPORTEDMODE"; - goto LABEL_173; - case 131: - v7 = "DDERR_NOMIPMAPHW"; - goto LABEL_173; - case 132: - v7 = "DDERR_INVALIDSURFACETYPE"; - goto LABEL_173; - case 140: - v7 = "DDERR_NOOPTIMIZEHW"; - goto LABEL_173; - case 141: - v7 = "DDERR_NOTLOADED"; - goto LABEL_173; - case 142: - v7 = "DDERR_NOFOCUSWINDOW"; - goto LABEL_173; - case 160: - v7 = "DDERR_DCALREADYCREATED"; - goto LABEL_173; - case 170: - v7 = "DDERR_NONONLOCALVIDMEM"; - goto LABEL_173; - case 180: - v7 = "DDERR_CANTPAGELOCK"; - goto LABEL_173; - case 200: - v7 = "DDERR_CANTPAGEUNLOCK"; - goto LABEL_173; - case 220: - v7 = "DDERR_NOTPAGELOCKED"; - goto LABEL_173; - case 230: - v7 = "DDERR_MOREDATA"; - goto LABEL_173; - case 231: - v7 = "DDERR_EXPIRED"; - goto LABEL_173; - case 235: - v7 = "DDERR_VIDEONOTACTIVE"; - goto LABEL_173; - case 239: - v7 = "DDERR_DEVICEDOESNTOWNSURFACE"; - goto LABEL_173; - default: - goto LABEL_174; - case 124: - goto LABEL_176; - } - goto LABEL_176; - } - if ( v4 != -2005532222 ) - { - if ( v4 > -2005532447 ) - { - if ( v4 <= -2005532337 ) - { - if ( v4 == -2005532337 ) - { - v7 = "DDERR_NOVSYNCHW"; - goto LABEL_173; - } - if ( v4 > -2005532392 ) - { - if ( v4 == -2005532382 ) - { - v7 = "DDERR_NOROTATIONHW"; - goto LABEL_173; - } - if ( v4 == -2005532362 ) - { - v7 = "DDERR_NOSTRETCHHW"; - goto LABEL_173; - } - if ( v4 == -2005532356 ) - { - v7 = "DDERR_NOT4BITCOLOR"; - goto LABEL_173; - } - if ( v4 == -2005532355 ) - { - v7 = "DDERR_NOT4BITCOLORINDEX"; - goto LABEL_173; - } - if ( v4 == -2005532352 ) - { - v7 = "DDERR_NOT8BITCOLOR"; - goto LABEL_173; - } - if ( v4 == -2005532342 ) - { - v7 = "DDERR_NOTEXTUREHW"; - goto LABEL_173; - } - } - else - { - if ( v4 == -2005532392 ) - { - v7 = "DDERR_NORASTEROPHW"; - goto LABEL_173; - } - if ( v4 == -2005532442 ) - { - v7 = "DDERR_NOFLIPHW"; - goto LABEL_173; - } - if ( v4 == -2005532432 ) - { - v7 = "DDERR_NOGDI"; - goto LABEL_173; - } - if ( v4 == -2005532422 ) - { - v7 = "DDERR_NOMIRRORHW"; - goto LABEL_173; - } - if ( v4 == -2005532417 ) - { - v7 = "DDERR_NOTFOUND"; - goto LABEL_173; - } - if ( v4 == -2005532412 ) - { - v7 = "DDERR_NOOVERLAYHW"; - goto LABEL_173; - } - if ( v4 == -2005532402 ) - { - v7 = "DDERR_OVERLAPPINGRECTS"; - goto LABEL_173; - } - } - goto LABEL_174; - } - if ( v4 <= -2005532285 ) - { - if ( v4 == -2005532285 ) - { - v7 = "DDERR_PALETTEBUSY"; - goto LABEL_173; - } - if ( v4 == -2005532332 ) - { - v7 = "DDERR_NOZBUFFERHW"; - goto LABEL_173; - } - if ( v4 == -2005532322 ) - { - v7 = "DDERR_NOZOVERLAYHW"; - goto LABEL_173; - } - if ( v4 == DDERR_OUTOFCAPS ) - { - v7 = "DDERR_OUTOFCAPS"; - goto LABEL_173; - } - if ( v4 == DDERR_OUTOFVIDEOMEMORY ) - { - v7 = "DDERR_OUTOFVIDEOMEMORY"; - goto LABEL_173; - } - if ( v4 == DDERR_OVERLAYCANTCLIP ) - { - v7 = "DDERR_OVERLAYCANTCLIP"; - goto LABEL_173; - } - if ( v4 == DDERR_OVERLAYCOLORKEYONLYONEACTIVE ) - { - v7 = "DDERR_OVERLAYCOLORKEYONLYONEACTIVE"; - goto LABEL_173; - } - goto LABEL_174; - } - if ( v4 == -2005532272 ) - { - v7 = "DDERR_COLORKEYNOTSET"; - goto LABEL_173; - } - if ( v4 == -2005532262 ) - { - v7 = "DDERR_SURFACEALREADYATTACHED"; - goto LABEL_173; - } - if ( v4 == -2005532252 ) - { - v7 = "DDERR_SURFACEALREADYDEPENDENT"; - goto LABEL_173; - } - if ( v4 != -2005532242 ) - { - if ( v4 == -2005532237 ) - { - v7 = "DDERR_CANTLOCKSURFACE"; - goto LABEL_173; - } - if ( v4 == -2005532232 ) - { - v7 = "DDERR_SURFACEISOBSCURED"; - goto LABEL_173; - } - goto LABEL_174; - } - } - else - { - if ( v4 == -2005532447 ) - { - v7 = "DDERR_NOEXCLUSIVEMODE"; - goto LABEL_173; - } - if ( v4 <= -2005532562 ) - { - if ( v4 == -2005532562 ) - { - v7 = "DDERR_INVALIDCLIPLIST"; - goto LABEL_173; - } - if ( v4 > -2005532662 ) - { - if ( v4 == -2005532652 ) - { - v7 = "DDERR_CANNOTDETACHSURFACE"; - goto LABEL_173; - } - if ( v4 == -2005532632 ) - { - v7 = "DDERR_CURRENTLYNOTAVAIL"; - goto LABEL_173; - } - if ( v4 == -2005532617 ) - { - v7 = "DDERR_EXCEPTION"; - goto LABEL_173; - } - if ( v4 == -2005532582 ) - { - v7 = "DDERR_HEIGHTALIGN"; - goto LABEL_173; - } - if ( v4 == -2005532577 ) - { - v7 = "DDERR_INCOMPATIBLEPRIMARY"; - goto LABEL_173; - } - if ( v4 == -2005532572 ) - { - v7 = "DDERR_INVALIDCAPS"; - goto LABEL_173; - } - } - else - { - if ( v4 == -2005532662 ) - { - v7 = "DDERR_CANNOTATTACHSURFACE"; - goto LABEL_173; - } - if ( v4 == -2147467263 ) - { - v7 = "DDERR_UNSUPPORTED"; - goto LABEL_173; - } - if ( v4 == -2147467259 ) - { - v7 = "DDERR_GENERIC"; - goto LABEL_173; - } - if ( v4 == -2147221008 ) - { - v7 = "DDERR_NOTINITIALIZED"; - goto LABEL_173; - } - if ( v4 == -2147024882 ) - { - v7 = "DDERR_OUTOFMEMORY"; - goto LABEL_173; - } - if ( v4 == -2147024809 ) - { - v7 = "DDERR_INVALIDPARAMS"; - goto LABEL_173; - } - if ( v4 == -2005532667 ) - { - v7 = "DDERR_ALREADYINITIALIZED"; -LABEL_173: - v13 = strlen(v7); - v12 = (char *)v7; -LABEL_175: - std::stringoperator_assign__const_char_ptr__(&a1, v12, v13); - v13 = a3; - pRenderer->field_40110 = 0; - v15 = &v11; - std::string40E2C8(&v11, Str, (int)((char *)&hr + 3)); - v10 = 48; - LOBYTE(v17) = 1; - Str = (char *)&v9; - std::string40E2C8(&v9, "Direct Draw Error", (int)((char *)&a3 + 3)); - LOBYTE(v17) = 0; - CheckHRESULT_stru0::ShowMessageBox(v6, &a1, v9, v10, v11, v13); - v5 = 1; - goto LABEL_176; - } - } -LABEL_174: - sprintfex(&Src, "Unknown DirectDraw/Direct3D error number %X", v4); - v13 = strlen(&Src); - v12 = &Src; - goto LABEL_175; - } - if ( v4 > -2005532492 ) - { - if ( v4 == -2005532467 ) - { - v7 = "DDERR_NOCLIPLIST"; - goto LABEL_173; - } - if ( v4 == -2005532462 ) - { - v7 = "DDERR_NOCOLORCONVHW"; - goto LABEL_173; - } - if ( v4 == -2005532460 ) - { - v7 = "DDERR_NOCOOPERATIVELEVELSET"; - goto LABEL_173; - } - if ( v4 == -2005532457 ) - { - v7 = "DDERR_NOCOLORKEY"; - goto LABEL_173; - } - if ( v4 == -2005532452 ) - { - v7 = "DDERR_NOCOLORKEYHW"; - goto LABEL_173; - } - if ( v4 == -2005532450 ) - { - v7 = "DDERR_NODIRECTDRAWSUPPORT"; - goto LABEL_173; - } - goto LABEL_174; - } - if ( v4 == -2005532492 ) - { - v7 = "DDERR_NOALPHAHW"; - goto LABEL_173; - } - if ( v4 == -2005532552 ) - { - v7 = "DDERR_INVALIDMODE"; - goto LABEL_173; - } - if ( v4 == -2005532542 ) - { - v7 = "DDERR_INVALIDOBJECT"; - goto LABEL_173; - } - if ( v4 == -2005532527 ) - { - v7 = "DDERR_INVALIDPIXELFORMAT"; - goto LABEL_173; - } - if ( v4 != -2005532522 ) - { - if ( v4 == -2005532512 ) - { - v7 = "DDERR_LOCKEDSURFACES"; - goto LABEL_173; - } - if ( v4 == -2005532502 ) - { - v7 = "DDERR_NO3D"; - goto LABEL_173; - } - goto LABEL_174; - } - }*/ - //----- (00467D5D) -------------------------------------------------------- int __thiscall sub_467D5D(int _this) {
--- a/mm7_3.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_3.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -12428,7 +12428,7 @@ pFont = pFontArrus; if ( ptr_F8B1E8 && !byte_5B0938[0] ) strcpy(byte_5B0938, ptr_F8B1E8); - v5.uFrameWidth = 460; + v5.uFrameWidth = game_viewport_width; v5.uFrameZ = 452; v1 = pFontArrus->CalcTextHeight(byte_5B0938, &v5, 12, 0) + 7; if ( 352 - v1 < 8 ) @@ -12681,7 +12681,7 @@ if (pInString) { - pWindow.uFrameWidth = 460; + pWindow.uFrameWidth = game_viewport_width; pWindow.uFrameZ = 452; auto font = pFontArrus; v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7;
--- a/mm7_4.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_4.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -4298,8 +4298,8 @@ { memcpy(pDst + y * Dst.lPitch / 2, pSrc + y * 640, 8 * sizeof(__int16)); - memcpy(pDst + 8 + 460/*462*/ + y * Dst.lPitch / 2, - pSrc + 8 + 460/*462*/ + y * 640, 174/*172*/ * sizeof(__int16)); + memcpy(pDst + 8 + game_viewport_width/*462*/ + y * Dst.lPitch / 2, + pSrc + 8 + game_viewport_width/*462*/ + y * 640, 174/*172*/ * sizeof(__int16)); } for (uint y = 352; y < 480; ++y) @@ -6198,7 +6198,7 @@ a1.uFrameHeight += v6; if ( (signed int)a1.uFrameHeight < 150 ) a1.uFrameHeight = 150; - a1.uFrameWidth = 460; + a1.uFrameWidth = game_viewport_width; a1.DrawMessageBox(0); a1.uFrameWidth -= 12; a1.uFrameHeight -= 12; @@ -7296,7 +7296,7 @@ if ( v9 ) { v10 = v6->uFlags; - a1.uFrameWidth = 460; + a1.uFrameWidth = game_viewport_width; a1.uFrameZ = 452; pInString = (char *)*(&pNPCStats->field_17884 + ((v10 & 3) == 2) + 2 * v9); v11 = pFontArrus->CalcTextHeight(pInString, &a1, 13, 0);
--- a/mm7_5.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_5.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -10106,12 +10106,12 @@ v0 = &pParty->pPlayers[_506348_current_lloyd_playerid]; pRenderer->DrawTextureIndexed(8u, 8u, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]); v1 = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon - v22.uFrameX = 8; - v22.uFrameY = 8; + v22.uFrameX = game_viewport_x; + v22.uFrameY = game_viewport_y; v22.uFrameWidth = 428; - v22.uFrameHeight = 344; + v22.uFrameHeight = game_viewport_height; v22.uFrameZ = 435; - v22.uFrameW = 351; + v22.uFrameW = game_viewport_w; if ( !bRecallingBeacon ) v1 = pGlobalTXT_LocalizationStrings[375]; // Set Beacon sprintf(pTmpBuf, "%s", v1); @@ -10264,12 +10264,12 @@ pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook); pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); - v6.uFrameX = 8; - v6.uFrameY = 8; - v6.uFrameWidth = 460; - v6.uFrameHeight = 344; - v6.uFrameZ = 467; - v6.uFrameW = 351; + v6.uFrameX = game_viewport_x; + v6.uFrameY = game_viewport_y; + v6.uFrameWidth = game_viewport_width; + v6.uFrameHeight = game_viewport_height; + v6.uFrameZ = game_viewport_z; + v6.uFrameW = game_viewport_w; const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE, PARTY_QUEST_FOUNTAIN_PIERPONT, @@ -10432,12 +10432,12 @@ { v0 -= 12; } - a1.uFrameX = 8; - a1.uFrameY = 8; - a1.uFrameWidth = 460; - a1.uFrameHeight = 344; - a1.uFrameZ = 467; - a1.uFrameW = 467; + a1.uFrameX = game_viewport_x; + a1.uFrameY = game_viewport_y; + a1.uFrameWidth = game_viewport_width; + a1.uFrameHeight = game_viewport_height; + a1.uFrameZ = game_viewport_z; + a1.uFrameW = game_viewport_w; a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u); if ( pParty->uCurrentHour >= 12 ) {
--- a/mm7_6.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_6.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -2309,7 +2309,7 @@ v24 = 0; v23 = 1; v22 = 344; - v21 = 460; + v21 = game_viewport_width; v20 = 8; v19 = 8; pGUIWindow_Settings = v17; @@ -2353,7 +2353,7 @@ pGUIWindow_Settings->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0); pGUIWindow_Settings->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0); pGUIWindow_Settings->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0); - pGUIWindow_Settings->CreateButton(8, 8, 460, 344, 1, 0, 140, 0, 0, "", NULL); + pGUIWindow_Settings->CreateButton(8, 8, game_viewport_width, 344, 1, 0, 140, 0, 0, "", NULL); sub_421B2C_PlaceInInventory_or_DropPickedItem(); } if ( HIBYTE(a5) & 2 && !pGUIWindow_Settings )
--- a/mm7_data.cpp Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_data.cpp Tue Mar 26 14:14:39 2013 +0200 @@ -322,7 +322,19 @@ // Data declarations int game_starting_year = 0; +int game_viewport_width; +int game_viewport_height; +int game_viewport_x; +int game_viewport_y; +int game_viewport_z; +int game_viewport_w; + + +unsigned int saveload_dlg_xs[2] = {82, 0}; +unsigned int saveload_dlg_ys[2] = {60, 0}; +unsigned int saveload_dlg_zs[2] = {460, 640}; +unsigned int saveload_dlg_ws[2] = {344, 480}; int pWindowList_at_506F50_minus1_indexing[1]; int dword_4C9890[10]; // weak int dword_4C9920[16]; // weak @@ -949,10 +961,6 @@ char byte_4E94D1 = 9; // weak char _4E94D2_light_type = 6; // weak char byte_4E94D3 = 10; // weak -unsigned int saveload_dlg_xs[2] = {82, 0}; -unsigned int saveload_dlg_ys[2] = {60, 0}; -unsigned int saveload_dlg_zs[2] = {460, 640}; -unsigned int saveload_dlg_ws[2] = {344, 480}; int dword_4E98BC_bApplicationActive; // weak //char *off_4EB080; // idb char *pTransitionStrings[465] = {"", nullptr}; // 004EB080
--- a/mm7_data.h Tue Mar 26 13:14:41 2013 +0200 +++ b/mm7_data.h Tue Mar 26 14:14:39 2013 +0200 @@ -312,6 +312,12 @@ // Data declarations extern int game_starting_year; +extern int game_viewport_width; +extern int game_viewport_height; +extern int game_viewport_x; +extern int game_viewport_y; +extern int game_viewport_z; +extern int game_viewport_w; extern int pWindowList_at_506F50_minus1_indexing[1]; extern int dword_4C9890[10]; // weak