From 22a1aa3a7440d815f99a95686439388de73efeb8 Mon Sep 17 00:00:00 2001 From: GabsPuNs Date: Fri, 5 Jun 2026 16:05:55 -0400 Subject: [PATCH] Cleanups --- Minecraft.Client/Chunk.cpp | 3 +- .../Common/Audio/Consoles_SoundEngine.h | 19 - Minecraft.Client/Common/Audio/SoundEngine.cpp | 12 +- .../Common/Colours/ColourTable.cpp | 2 +- .../UI/IUIScene_AbstractContainerMenu.cpp | 38 +- Minecraft.Client/Common/UI/UIFontData.cpp | 9 +- .../Common/UI/UIScene_Credits.cpp | 549 +----------- Minecraft.Client/Extrax64Stubs.cpp | 92 -- Minecraft.Client/LevelRenderer.h | 25 +- Minecraft.Client/LocalPlayer.cpp | 12 +- Minecraft.Client/TileRenderer.cpp | 1 - Minecraft.World/ByteArrayInputStream.cpp | 2 +- Minecraft.World/ByteArrayOutputStream.cpp | 2 +- Minecraft.World/C4JThread.cpp | 821 +----------------- Minecraft.World/C4JThread.h | 114 +-- Minecraft.World/CompressedTileStorage.cpp | 38 +- Minecraft.World/ConsoleSaveFileOriginal.cpp | 2 +- Minecraft.World/CustomLevelSource.cpp | 4 +- Minecraft.World/FlatLevelSource.cpp | 4 +- Minecraft.World/HellFlatLevelSource.cpp | 4 +- Minecraft.World/HellRandomLevelSource.cpp | 4 +- Minecraft.World/LevelChunk.cpp | 10 - Minecraft.World/RandomLevelSource.cpp | 4 +- Minecraft.World/Region.cpp | 4 + Minecraft.World/Region.h | 2 +- Minecraft.World/SparseDataStorage.cpp | 16 +- Minecraft.World/SparseLightStorage.cpp | 16 +- .../TheEndLevelRandomLevelSource.cpp | 4 +- Minecraft.World/x64headers/extraX64.h | 15 +- 29 files changed, 160 insertions(+), 1668 deletions(-) diff --git a/Minecraft.Client/Chunk.cpp b/Minecraft.Client/Chunk.cpp index c0f15106..b0386e4e 100644 --- a/Minecraft.Client/Chunk.cpp +++ b/Minecraft.Client/Chunk.cpp @@ -423,6 +423,7 @@ void Chunk::rebuild() Region region(level, x0 - r, y0 - r, z0 - r, x1 + r, y1 + r, z1 + r, r); TileRenderer tileRenderer(®ion, this->x, this->y, this->z, tileIds); +/* // AP - added a caching system for Chunk::rebuild to take advantage of // Basically we're storing of copy of the tileIDs array inside the region so that calls to Region::getTile can grab data // more quickly from this array rather than calling CompressedTileStorage. On the Vita the total thread time spent in @@ -432,7 +433,7 @@ void Chunk::rebuild() int zc = z >> 4; region.setCachedTiles(tileIds, xc, zc); #endif - +*/ PIXBeginNamedEvent(0,"Rebuild section C"); Tesselator::Bounds bounds; // 4J MGH - added { diff --git a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h index 5e8feebe..69475397 100644 --- a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h +++ b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h @@ -2,25 +2,6 @@ #include "..\..\..\Minecraft.World\SoundTypes.h" -#ifdef _XBOX - -#elif defined (__PS3__) -#undef __in -#undef __out -#include "..\..\PS3\Miles\include\mss.h" -#elif defined (__PSVITA__) -#include "..\..\PSVITA\Miles\include\mss.h" -#elif defined _DURANGO -// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles -#define _SEKRIT -#include "..\..\Durango\Miles\include\mss.h" -#elif defined _WINDOWS64 -#else // PS4 -// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles -#define _SEKRIT2 -#include "..\..\Orbis\Miles\include\mss.h" -#endif - typedef struct { float x,y,z; diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 88d0d9e8..de5c5139 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -18,9 +18,9 @@ #define MINIAUDIO_IMPLEMENTATION #include "../Libs/audio/miniaudio.h" -char SoundEngine::m_szMiscSoundPath[]={"Assets/Sounds/Misc/%s"}; -char SoundEngine::m_szUISoundPath[]={"Assets/Sounds/UI/%s"}; -char SoundEngine::m_szMusicPath[]={"Assets/Sounds/Music/"}; +char SoundEngine::m_szMiscSoundPath[] ={"Assets/Sounds/Misc/%s"}; +char SoundEngine::m_szUISoundPath[] ={"Assets/Sounds/UI/%s"}; +char SoundEngine::m_szMusicPath[] ={"Assets/Sounds/Music/"}; const char *SoundEngine::m_szStreamFileA[eStream_Max]= @@ -215,9 +215,9 @@ void SoundEngine::updateMiniAudio() { float x,y,z; - x=fabs(m_ListenerA[i].vPosition.x-s->info.x); - y=fabs(m_ListenerA[i].vPosition.y-s->info.y); - z=fabs(m_ListenerA[i].vPosition.z-s->info.z); + x=std::abs(m_ListenerA[i].vPosition.x-s->info.x); + y=std::abs(m_ListenerA[i].vPosition.y-s->info.y); + z=std::abs(m_ListenerA[i].vPosition.z-s->info.z); fDist=x+y+z; if(fDistm_colourValues, sizeof(int) * eMinecraftColour_COUNT); + memcpy( (void *)m_colourValues, (void *)defaultColours->m_colourValues, sizeof(int) * eMinecraftColour_COUNT); loadColoursFromData(pbData, dwLength); } void ColourTable::loadColoursFromData(PBYTE pbData, DWORD dwLength) diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index 195a11e4..c984b692 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -177,23 +177,23 @@ void IUIScene_AbstractContainerMenu::updateSlotPosition( ESceneSection eSection, #ifdef TAP_DETECTION IUIScene_AbstractContainerMenu::ETapState IUIScene_AbstractContainerMenu::GetTapInputType( float fInputX, float fInputY ) { - if ( ( fabs( fInputX ) < 0.3f ) && ( fabs( fInputY ) < 0.3f ) ) + if ( ( std::abs( fInputX ) < 0.3f ) && ( std::abs( fInputY ) < 0.3f ) ) { return eTapStateNoInput; } - else if ( ( fInputX < -0.3f ) && ( fabs( fInputY ) < 0.3f ) ) + else if ( ( fInputX < -0.3f ) && ( std::abs( fInputY ) < 0.3f ) ) { return eTapStateLeft; } - else if ( ( fInputX > 0.3f ) && ( fabs( fInputY ) < 0.3f ) ) + else if ( ( fInputX > 0.3f ) && ( std::abs( fInputY ) < 0.3f ) ) { return eTapStateRight; } - else if ( ( fInputY < -0.3f ) && ( fabs( fInputX ) < 0.3f ) ) + else if ( ( fInputY < -0.3f ) && ( std::abs( fInputX ) < 0.3f ) ) { return eTapStateDown; } - else if ( ( fInputY > 0.3f ) && ( fabs( fInputX ) < 0.3f ) ) + else if ( ( fInputY > 0.3f ) && ( std::abs( fInputX ) < 0.3f ) ) { return eTapStateUp; } @@ -353,10 +353,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } // Clamp to pointer extents. - if ( vPointerPos.x < m_fPointerMinX ) vPointerPos.x = m_fPointerMinX; - else if ( vPointerPos.x > m_fPointerMaxX ) vPointerPos.x = m_fPointerMaxX; - if ( vPointerPos.y < m_fPointerMinY ) vPointerPos.y = m_fPointerMinY; - else if ( vPointerPos.y > m_fPointerMaxY ) vPointerPos.y = m_fPointerMaxY; + vPointerPos.x = std::clamp(vPointerPos.x, m_fPointerMinX, m_fPointerMaxX); + vPointerPos.y = std::clamp(vPointerPos.y, m_fPointerMinY, m_fPointerMaxY); bStickInput = true; m_eCurrTapState=eTapStateNoInput; @@ -368,10 +366,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() #endif - - // If there is any input on sticks, move the pointer. - if ( ( fabs( fInputX ) >= 0.01f ) || ( fabs( fInputY ) >= 0.01f ) ) + if ( ( std::abs( fInputX ) >= 0.01f ) || ( std::abs( fInputY ) >= 0.01f ) ) { m_bPointerDrivenByMouse = false; fInputDirX = ( fInputX > 0.0f ) ? 1.0f : ( fInputX < 0.0f )?-1.0f : 0.0f; @@ -438,7 +434,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() m_fPointerAccelX += fInputX / 50.0f; m_fPointerAccelY += fInputY / 50.0f; - if ( fabsf( fInputX ) > fabsf( m_fPointerVelX + m_fPointerAccelX ) ) + if ( std::abs( fInputX ) > std::abs( m_fPointerVelX + m_fPointerAccelX ) ) { m_fPointerVelX += m_fPointerAccelX; } @@ -448,7 +444,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() m_fPointerVelX = fInputX; } - if ( fabsf( fInputY ) > fabsf( m_fPointerVelY + m_fPointerAccelY ) ) + if ( std::abs( fInputY ) > std::abs( m_fPointerVelY + m_fPointerAccelY ) ) { m_fPointerVelY += m_fPointerAccelY; } @@ -467,10 +463,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() vPointerPos.y -= fInputY; #endif // Clamp to pointer extents. - if ( vPointerPos.x < m_fPointerMinX ) vPointerPos.x = m_fPointerMinX; - else if ( vPointerPos.x > m_fPointerMaxX ) vPointerPos.x = m_fPointerMaxX; - if ( vPointerPos.y < m_fPointerMinY ) vPointerPos.y = m_fPointerMinY; - else if ( vPointerPos.y > m_fPointerMaxY ) vPointerPos.y = m_fPointerMaxY; + vPointerPos.x = std::clamp(vPointerPos.x, m_fPointerMinX, m_fPointerMaxX); + vPointerPos.y = std::clamp(vPointerPos.y, m_fPointerMinY, m_fPointerMaxY); bStickInput = true; } @@ -514,7 +508,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() bool bPointerIsOverSlot = false; // Centre position of item under pointer, use this to snap pointer to item. - D3DXVECTOR3 vSnapPos; + DirectX::XMFLOAT2 vSnapPos; for ( int iSection = m_eFirstSection; iSection < m_eMaxSection; ++iSection ) { @@ -739,10 +733,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } // Clamp to pointer extents. - if ( vPointerPos.x < m_fPointerMinX ) vPointerPos.x = m_fPointerMinX; - else if ( vPointerPos.x > m_fPointerMaxX ) vPointerPos.x = m_fPointerMaxX; - if ( vPointerPos.y < m_fPointerMinY ) vPointerPos.y = m_fPointerMinY; - else if ( vPointerPos.y > m_fPointerMaxY ) vPointerPos.y = m_fPointerMaxY; + vPointerPos.x = std::clamp(vPointerPos.x, m_fPointerMinX, m_fPointerMaxX); + vPointerPos.y = std::clamp(vPointerPos.y, m_fPointerMinY, m_fPointerMaxY); // Check if the pointer is outside of the panel. bool bPointerIsOutsidePanel = false; diff --git a/Minecraft.Client/Common/UI/UIFontData.cpp b/Minecraft.Client/Common/UI/UIFontData.cpp index e4349e1f..271aa657 100644 --- a/Minecraft.Client/Common/UI/UIFontData.cpp +++ b/Minecraft.Client/Common/UI/UIFontData.cpp @@ -9,11 +9,8 @@ SFontData SFontData::Mojangles_7 /* Font Name */ "Mojangles7", -#ifdef _XBOX - /* filename */ L"/font/Mojangles_7.png", -#else + /* Filename */ L"/font/Mojangles_7.png", -#endif /* Glyph count */ FONTSIZE, /* Codepoints */ SFontData::Codepoints, @@ -38,11 +35,7 @@ SFontData SFontData::Mojangles_11 /* Font Name */ "Mojangles11", -#ifdef _XBOX - /* filename */ L"/font/Mojangles_11.png", -#else /* Filename */ L"/font/Mojangles_11.png", -#endif /* Glyph count */ FONTSIZE, /* Codepoints */ SFontData::Codepoints, diff --git a/Minecraft.Client/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Common/UI/UIScene_Credits.cpp index ddde49a2..4460c29a 100644 --- a/Minecraft.Client/Common/UI/UIScene_Credits.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Credits.cpp @@ -6,505 +6,43 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = { - { L"MOJANG", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_ORIGINALDESIGN, NO_TRANSLATED_STRING,eLargeText }, - { L"Markus Persson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_PMPROD, NO_TRANSLATED_STRING,eLargeText }, - { L"Daniel Kaplan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_RESTOFMOJANG, NO_TRANSLATED_STRING,eMediumText }, - { L"%ls", IDS_CREDITS_LEADPC, NO_TRANSLATED_STRING,eLargeText }, - { L"Jens Bergensten", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_JON_KAGSTROM, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_CEO, NO_TRANSLATED_STRING,eLargeText }, - { L"Carl Manneh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_DOF, NO_TRANSLATED_STRING,eLargeText }, - { L"Lydia Winters", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_WCW, NO_TRANSLATED_STRING,eLargeText }, - { L"Karin Severinsson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_CUSTOMERSUPPORT, NO_TRANSLATED_STRING,eLargeText }, - { L"Marc Watson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_DESPROG, NO_TRANSLATED_STRING,eLargeText }, - { L"Aron Nieminen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_CHIEFARCHITECT, NO_TRANSLATED_STRING,eLargeText }, - { L"Daniel Frisk", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_CODENINJA, NO_TRANSLATED_STRING,eLargeText }, - { L"%ls", IDS_CREDITS_TOBIAS_MOLLSTAM, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_OFFICEDJ, NO_TRANSLATED_STRING,eLargeText }, - { L"Kristoffer Jelbring", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_DEVELOPER, NO_TRANSLATED_STRING,eLargeText }, - { L"Leonard Axelsson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_BULLYCOORD, NO_TRANSLATED_STRING,eLargeText }, - { L"Jakob Porser", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_ARTDEVELOPER, NO_TRANSLATED_STRING,eLargeText }, - { L"Junkboy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_EXPLODANIM, NO_TRANSLATED_STRING,eLargeText }, - { L"Mattis Grahm", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_CONCEPTART, NO_TRANSLATED_STRING,eLargeText }, - { L"Henrik Petterson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_CRUNCHER, NO_TRANSLATED_STRING,eLargeText }, - { L"Patrick Geuder", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%ls", IDS_CREDITS_MUSICANDSOUNDS, NO_TRANSLATED_STRING,eLargeText }, - { L"Daniel Rosenfeld (C418)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line + { L"MOJANG", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText }, + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"%ls", IDS_CREDITS_MUSICANDSOUNDS, NO_TRANSLATED_STRING, eLargeText }, + { L"Daniel Rosenfeld (C418)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, -// Added credit for horses - { L"Developers of Mo' Creatures:", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"John Olarte (DrZhark)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kent Christian Jensen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Dan Roque", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"4J Studios", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText }, + // Added credit for horses + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"Mo' Creatures Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText }, - { L"4J Studios", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"%ls", IDS_CREDITS_PROGRAMMING, NO_TRANSLATED_STRING,eLargeText }, - { L"Paddy Burns", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Richard Reavy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Stuart Ross", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"James Vaughan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mark Hughes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Harry Gordon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Thomas Kronberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - { L"Ian le Bruce", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Andy West", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Gordon McLean", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"Xbox LIVE Arcade Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText }, -#ifdef __PSVITA__ -// 4J-PB - Aaron didn't want to be in the credits { L"Aaron Puzey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Dawson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"Project-Zenith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText }, + { L"GabsPuN", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, - { L"%ls", IDS_CREDITS_ART, NO_TRANSLATED_STRING,eLargeText }, - { L"David Keningale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - { L"Pat McGovern", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif - { L"Alan Redmond", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - { L"Julian Laing", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"%ls", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING, eLargeText }, + { L"MinecraftConsoles Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText } - { L"Caitlin Goodale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Scott Sutherland", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif - { L"Chris Reeves", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kate Wright", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michael Hansen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - { L"Kate Flavell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif - { L"Donald Robertson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jamie Keddie", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Thomas Naylor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Brian Lindsay", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Hannah Watts", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Rebecca O'Neil", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, + // Dolby + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"", CREDIT_ICON, eCreditIcon_Dolby, eSmallText }, + { L"Dolby and the double-D symbol", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"are trademarks of Dolby Laboratories.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, - { L"%ls", IDS_CREDITS_QA, NO_TRANSLATED_STRING,eLargeText }, - { L"Steven Gary Woodward", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - { L"Richard Black", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#endif - { L"George Vaughan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING,eLargeText }, - { L"Chris van der Kuyl", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Roni Percy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Anne Clarke", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Anthony Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, -#ifdef _XBOX - // credits are in the XUI file -#elif defined(__PS3__) -// font credits - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING,eLargeText }, + // Font + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText }, -#elif defined(__ORBIS__) -// font credits - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING,eLargeText }, - -#elif defined(_DURANGO) - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"Xbox LIVE Arcade Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%s", IDS_CREDITS_LEADPRODUCER, NO_TRANSLATED_STRING,eLargeText }, - { L"Roger Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_PRODUCER, NO_TRANSLATED_STRING,eLargeText }, - { L"Stuart Platt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Riccardo Lenzi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_LEADTESTER, NO_TRANSLATED_STRING,eLargeText }, - { L"Bill Brown (Insight Global)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Brandon McCurry (Insight Global)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Hakim Ronaque, Joe Dunavant", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Paul Loynd, Jeffery Stephens", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Rial Lerum (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_DESIGNTEAM, NO_TRANSLATED_STRING,eLargeText }, - { L"Craig Leigh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_DEVELOPMENTTEAM, NO_TRANSLATED_STRING,eLargeText }, - { L"Scott Guest", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jeff \"Dextor\" Blazier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Yukie Yamaguchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jason Hewitt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_RELEASEMANAGEMENT, NO_TRANSLATED_STRING,eLargeText }, - { L"Isaac Aubrey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jordan Forbes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Josh Mulanax", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Shogo Ishii (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tyler Keenan (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Joshua Bullard (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"GTO-E Compliance", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Dominic Gara", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"James Small", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"%s", IDS_CREDITS_EXECPRODUCER, NO_TRANSLATED_STRING,eLargeText }, - { L"Mark Coates", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Avi Ben-Menahem", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Earnest Yuen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - - { L"%s", IDS_CREDITS_XBLADIRECTOR, NO_TRANSLATED_STRING,eLargeText }, - { L"Ted Woolsey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_BIZDEV, NO_TRANSLATED_STRING,eLargeText }, - { L"Cherie Lutz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Peter Zetterberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_PORTFOLIODIRECTOR, NO_TRANSLATED_STRING,eLargeText }, - { L"Chris Charla", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_PRODUCTMANAGER, NO_TRANSLATED_STRING,eLargeText }, - { L"Daniel McConnell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_MARKETING, NO_TRANSLATED_STRING,eLargeText }, - { L"Brandon Wells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michael Wolf", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"John Dongelmans", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_COMMUNITYMANAGER, NO_TRANSLATED_STRING,eLargeText }, - { L"Alex Hebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_REDMONDLOC, NO_TRANSLATED_STRING,eLargeText }, - { L"Zeb Wedell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Gabriella Mittiga (Pactera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Scott Fielding (Global Studio Consulting)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Yong Zhao (Hisoft Envisage Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Shogo Ishii (Insight Global)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_EUROPELOC, NO_TRANSLATED_STRING,eLargeText }, - { L"Gerard Dunne", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ricardo Cordoba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Magali Lucchini", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Malika Kherfi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Lizzy Untermann", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ian Walsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Alfonsina Mossello (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marika Mauri (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nobuhiro Izumisawa (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Sebastien Faucon (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jose Manuel Martinez (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Montse Garcia (Keywords International Ltd)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_ASIALOC, NO_TRANSLATED_STRING,eLargeText }, - { L"Takashi Sasaki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Changseon Ha", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Shinya Muto (Zip Global Corporation)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Hiroshi Hosoda (Zip Global Corporation)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Natsuko Kudo (Zip Global Corporation)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Yong-Hong Park (Zip Global Corporation)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Yuko Yoshida (Zip Global Corporation)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_USERRESEARCH, NO_TRANSLATED_STRING,eLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"User Research Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Tim Nichols", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"User Research Engineer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Michael Medlock", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kristie Fisher", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%s", IDS_CREDITS_MGSCENTRAL, NO_TRANSLATED_STRING,eLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"Test Team Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Dan Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_MILESTONEACCEPT, NO_TRANSLATED_STRING,eLargeText }, - { L"Justin Davis (VMC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Microsoft Studios Sentient Development Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Ellery Charlson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Frank Klier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jason Ronald", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Cullen Waters", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Steve Jackson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Barath Vasudevan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Derek Mantey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Henry Sterchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Scott Fintel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Soren Hannibal Nielsen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Meetali Goel (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Uladzimir Sadouski (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING,eLargeText }, - - { L"Allan Murphy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Allison Bokone", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Alvin Chen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Arthur Yung", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Brian Tyler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Daniel Taylor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Dave Reed", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Duoc Nguyen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Eric Voreis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Evelyn Thomas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jeff Braunstein", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jolynn Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Justin Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kareem Choudhry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kevin Cogger", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kevin La Chapelle", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Luc Rancourt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Matt Bronder", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michael Siebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mike Harsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mike Sterling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nick Rapp", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Orr Keshet", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Paul Hellyar", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Peter Giffin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Richard Moe", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Scott Selfon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Stephane St-Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Steve Spiller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Steven Trombetta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Theo Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tina Lemire", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tom Miller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Travis St. Onge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"Brianna Witherspoon (Nytec Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jim Pekola (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Greg Hjertager", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Masha Reutovski (Nytec Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Henry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Matt Golz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Gaffney (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jared Barnhill (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Laura Hawkins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"2nd Cavalry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"GTO Bug Bash Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Oliver Miyashita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kevin Salcedo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nick Bodenham", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Giggins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ben Board", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Peter Choi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Andy Su (CompuCom Systems Inc.)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"David Boker ", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Josh Bliggenstorfer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Paul Amer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Louise Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Karin Behland (Aquent LLC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"John Bruno", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Phil Spencer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"John Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Christi Davisson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jacob Farley (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chad Stringer (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Rick Rispoli (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Test by Experis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING,eLargeText }, - { L"Matt Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Gavin Kennedy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_SRTESTLEAD, NO_TRANSLATED_STRING,eLargeText }, - { L"Lloyd Bell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tim Attuquayefio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING,eLargeText }, - { L"Byron R. Monzon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marta Alombro", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_SDET, NO_TRANSLATED_STRING,eLargeText }, - { L"Valeriy Novytskyy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING,eLargeText }, - { L"Allyson Burk", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"David Scott", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"John Shearer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_ADDITIONALSTE, NO_TRANSLATED_STRING,eLargeText }, - { L"Chris Merritt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kimberlee Lyles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Eric Ranz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Russ Allen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING,eLargeText }, - { L"Michael Arvat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Josh Breese", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"April Culberson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jason Fox", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Clayton K. Hopper", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Matthew Howells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Alan Hume", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jacob Martin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kevin Lourigan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tyler Lovemark", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_RISE_LUGO, NO_TRANSLATED_STRING,eSmallText }, - { L"Ryan Naegeli", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Isaac Price", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Masha Reutovski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Brad Shockey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jonathan Tote", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marc Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Gillian Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jeffrey Woito", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tyler Young", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jae Yslas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Amanda Swalling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ben Dienes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Dustin Lukas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Emily Lovering", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nick Fowler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - // EVEN MORE CREDITS - { L"Test by Lionbridge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING,eLargeText }, - { L"Blazej Zawadzki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING,eLargeText }, - { L"Jakub Garwacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kamil Lahti", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mariusz Gelnicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Karol Falak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Lukasz Watroba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING,eLargeText }, - { L"Artur Grochowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Grzegorz Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Lukasz Derewonko", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Celej", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"Senior Test Engineers", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Arkadiusz Szczytowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Rafal Rawski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING,eLargeText }, - { L"Adrian Klepacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Aleksander Pietraszak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"Arkadiusz Kala", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Arkadiusz Sykula", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Bartlomiej Kmita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jakub Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jan Prejs", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jedrzej Kucharek", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kamil Dabrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Maciej Urlo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Maciej Wygoda", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marcin Piasecki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marcin Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marek Latacz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Biernat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Krupinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Warchal", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Wascinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Zbrzezniak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Milosz Maciejewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Pawel Kumanowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Przemyslaw Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tomasz Dabrowicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tomasz Trzebiatowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Wojciech Kujawa", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - { L"Blazej Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Damian Mielnik", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Dariusz Nowakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Dominik Rzeznicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jacek Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jakub Wozniakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jaroslaw Radzio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Kamil Kaczor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Karolina Szymanska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Konrad Mady", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Krzysztof Galazka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ludwik Miszta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Lukasz Kwiatkowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Marcin Krzysiak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Maslany", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michal Nyszka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Norbert Jankowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Piotr Daszewski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Radoslaw Kozlowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Tomasz Kalowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING,eLargeText }, - { L"David Hickey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Sean Kellogg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Adam Keating", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jerzy Tyminski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Paulina Sliwinska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - - - { L"Test by Shield", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eExtraLargeText }, - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"GTO Shared Service Test Manager", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Natahri Felton", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Shield Test Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Matt Giddings", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Shield IT Support", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"David Grant (Compucom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Primary Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eLargeText }, - { L"Alex Chen (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Alex Hunte (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Brian Boye (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Bridgette Cummins (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Chris Carleson (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Christopher Hermey (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"David Hendrickson (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Ioana Preda (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Jessica Jenkins (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Johnathan Ochs (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Michael Upham (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nicholas Johansson (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Nicholas Starner (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Torr Vickers (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - { L"Victoria Bruder (CompuCom Systems Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, - -#elif defined(_WIN64) -#elif defined(__PSVITA__) -// font credits - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING,eLargeText }, - -#endif - -#ifndef _XBOX -// Miles & Iggy credits - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"", CREDIT_ICON, eCreditIcon_Iggy,eSmallText }, // extra blank line - { L"Uses Iggy.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line -#ifdef __PS3__ - { L"Copyright (C) 2009-2013 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line -#else - { L"Copyright (C) 2009-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line -#endif -#ifdef __PS3__ - { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"", CREDIT_ICON, eCreditIcon_Dolby,eSmallText }, // extra blank line - { L"Dolby and the double-D symbol", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line - { L"are trademarks of Dolby Laboratories.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText }, // extra blank line -#endif -#endif - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"MinecraftConsoles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText}, - {L"Project Maintainers", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, - {L"smartcmd", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"codeHusky", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Patoke", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"rtm516", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"mattsumi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"dxf", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"la", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Thank you to our 100+ contributors on GitHub!", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, - {L"github.com/smartcmd/MinecraftConsoles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Additional Thanks", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, - {L"notpies - Security Fixes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText} + // Miles & Iggy credits + { L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, + { L"", CREDIT_ICON, eCreditIcon_Iggy, eSmallText }, + { L"Iggy. Ewwww", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText }, }; UIScene_Credits::UIScene_Credits(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer) @@ -534,15 +72,12 @@ UIScene_Credits::UIScene_Credits(int iPad, void *initData, UILayer *parentLayer) } else // using additional translated string. { - LPWSTR creditsString = new wchar_t[ 128 ]; + LPWSTR creditsString = new wchar_t[ 64 ]; if(gs_aCreditDefs[i].m_iStringID[1]!=NO_TRANSLATED_STRING) - { - swprintf( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ), app.GetString( gs_aCreditDefs[i].m_iStringID[1] ) ); - } + swprintf( creditsString, 64, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ), app.GetString( gs_aCreditDefs[i].m_iStringID[1] ) ); else - { - swprintf( creditsString, 128, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ) ); - } + swprintf( creditsString, 64, gs_aCreditDefs[i].m_Text, app.GetString( gs_aCreditDefs[i].m_iStringID[0] ) ); + setNextLabel(creditsString,gs_aCreditDefs[i].m_eType); delete [] creditsString; } @@ -605,9 +140,7 @@ void UIScene_Credits::tick() if(pDef->m_Text!=nullptr) // 4J-PB - think the RAD logo ones aren't set up yet and are coming is as null { if ( pDef->m_iStringID[0] == CREDIT_ICON ) - { addImage(static_cast(pDef->m_iStringID[1])); - } else // using additional translated string. { wstring sanitisedString = wstring(pDef->m_Text); @@ -620,20 +153,16 @@ void UIScene_Credits::tick() sanitisedString = replaceAll(sanitisedString, L"\u2013", L"-"); } - LPWSTR creditsString = new wchar_t[ 128 ]; + LPWSTR creditsString = new wchar_t[ 64 ]; if (pDef->m_iStringID[0]==NO_TRANSLATED_STRING) { - ZeroMemory(creditsString, 128); + ZeroMemory(creditsString, 64); memcpy( creditsString, sanitisedString.c_str(), sizeof(WCHAR) * sanitisedString.length() ); } else if(pDef->m_iStringID[1]!=NO_TRANSLATED_STRING) - { - swprintf( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ), app.GetString( pDef->m_iStringID[1] ) ); - } + swprintf( creditsString, 64, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ), app.GetString( pDef->m_iStringID[1] ) ); else - { - swprintf( creditsString, 128, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ) ); - } + swprintf( creditsString, 64, sanitisedString.c_str(), app.GetString( pDef->m_iStringID[0] ) ); setNextLabel(creditsString,pDef->m_eType); delete [] creditsString; @@ -652,9 +181,7 @@ void UIScene_Credits::handleInput(int iPad, int key, bool repeat, bool pressed, { case ACTION_MENU_CANCEL: if(pressed && !repeat) - { navigateBack(); - } break; case ACTION_MENU_OK: #ifdef __ORBIS__ @@ -704,4 +231,4 @@ void UIScene_Credits::addImage(ECreditIcons icon) void UIScene_Credits::handleRequestMoreData(F64 startIndex, bool up) { m_bAddNextLabel = true; -} +} \ No newline at end of file diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index ca8fca89..c84ec5fd 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -1,39 +1,9 @@ -#ifndef __PS3__ -//#include -#endif // __PS3__ - -#ifdef __PS3__ -#include "PS3\Sentient\SentientManager.h" -#include "StatsCounter.h" -#include "PS3\Social\SocialManager.h" -#include -#include -#elif defined _DURANGO -#include "Durango\Sentient\SentientManager.h" -#include "StatsCounter.h" -#include "Durango\Social\SocialManager.h" -#include "Durango\Sentient\DynamicConfigurations.h" -#include "Durango\DurangoExtras\xcompress.h" -#elif defined _WINDOWS64 #include "Windows64\Sentient\SentientManager.h" #include "StatsCounter.h" #include "Windows64\Social\SocialManager.h" #include "Windows64\Sentient\DynamicConfigurations.h" #include "Windows64\Network\WinsockNetLayer.h" #include "Windows64\Windows64_Xuid.h" -#elif defined __PSVITA__ -#include "PSVita\Sentient\SentientManager.h" -#include "StatsCounter.h" -#include "PSVita\Social\SocialManager.h" -#include "PSVita\Sentient\DynamicConfigurations.h" -#include -#else -#include "Orbis\Sentient\SentientManager.h" -#include "StatsCounter.h" -#include "Orbis\Social\SocialManager.h" -#include "Orbis\Sentient\DynamicConfigurations.h" -#include -#endif #if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) #ifdef _WINDOWS64 @@ -94,18 +64,6 @@ void PIXBeginNamedEvent(int a, const char* b, ...) va_end(args); #endif } -#if 0//__PSVITA__ -if (PixDepth < 64) -{ - char buf[512]; - va_list args; - va_start(args, b); - vsprintf(buf, b, args); - sceRazorCpuPushMarkerWithHud(buf, 0xffffffff, SCE_RAZOR_MARKER_ENABLE_HUD); -} -PixDepth += 1; -#endif - void PIXEndNamedEvent() { @@ -127,48 +85,6 @@ void PIXEndNamedEvent() void PIXSetMarkerDeprecated(int a, const char* b, ...) {} #endif -#if 0//__PSVITA__ -// 4J Stu - Removed this implementation in favour of a macro that will convert our string format -// conversion at compile time rather than at runtime -//void PIXBeginNamedEvent(int a, char *b, ...) -//{ -// char buf[256]; -// wchar_t wbuf[256]; -// va_list args; -// va_start(args,b); -// vsprintf(buf,b,args); -// -// mbstowcs(wbuf,buf,256); -// PIXBeginEvent(a,wbuf); -//} -// -//void PIXEndNamedEvent() -//{ -// PIXEndEvent(); -//} -// -//void PIXSetMarkerDeprecated(int a, char *b, ...) -//{ -// char buf[256]; -// wchar_t wbuf[256]; -// va_list args; -// va_start(args,b); -// vsprintf(buf,b,args); -// -// mbstowcs(wbuf,buf,256); -// PIXSetMarker(a, wbuf); -//} -#endif - -// void *D3DXBUFFER::GetBufferPointer() { return nullptr; } -// int D3DXBUFFER::GetBufferSize() { return 0; } -// void D3DXBUFFER::Release() {} - -// #ifdef _DURANGO -// void GetLocalTime(SYSTEMTIME *time) {} -// #endif - - bool IsEqualXUID(PlayerUID a, PlayerUID b) { #if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO) @@ -178,15 +94,7 @@ bool IsEqualXUID(PlayerUID a, PlayerUID b) #endif } -void XMemCpy(void* a, const void* b, size_t s) { memcpy(a, b, s); } -void XMemSet(void* a, int t, size_t s) { memset(a, t, s); } void XMemSet128(void* a, int t, size_t s) { memset(a, t, s); } -void* XPhysicalAlloc(SIZE_T a, ULONG_PTR b, ULONG_PTR c, DWORD d) { return malloc(a); } -void XPhysicalFree(void* a) { free(a); } - -D3DXVECTOR3::D3DXVECTOR3() {} -D3DXVECTOR3::D3DXVECTOR3(float x, float y, float z) : x(x), y(y), z(z) {} -D3DXVECTOR3& D3DXVECTOR3::operator += (CONST D3DXVECTOR3 & add) { x += add.x; y += add.y; z += add.z; return *this; } BYTE IQNetPlayer::GetSmallId() { return m_smallId; } void IQNetPlayer::SendData(IQNetPlayer * player, const void* pvData, DWORD dwDataSize, DWORD dwFlags) diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index b33ae5d5..b4d26819 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -46,23 +46,12 @@ private: public: static const int CHUNK_XZSIZE = 16; -#ifdef _LARGE_WORLDS static const int CHUNK_SIZE = 16; -#else - static const int CHUNK_SIZE = 16; -#endif + static constexpr int CHUNK_Y_COUNT = Level::maxBuildHeight / CHUNK_SIZE; -#if defined _WINDOWS64 - static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 2047 * 1024 * 1024; // Changed to 2047. 4J had set to 512. -#elif defined _XBOX_ONE - static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 512 * 1024 * 1024; // 4J - added -#elif defined __ORBIS__ - static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 448 * 1024 * 1024; // 4J - added - hard limit is 512 so giving a lot of headroom here for fragmentation (have seen 16MB lost to fragmentation in multiplayer crash dump before) -#elif defined __PS3__ - static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 110 * 1024 * 1024; // 4J - added -#else - static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 55 * 1024 * 1024; // 4J - added -#endif + + static constexpr int MAX_COMMANDBUFFER_ALLOCATIONS = 2048 * 2048 * 2048; // DURANGO: 512. ORBIS: 448. PS3: 110. X360: 55 + public: LevelRenderer(Minecraft *mc, Textures *textures); private: @@ -138,9 +127,9 @@ private: int m_freezeticks; // used to freeze the clouds // 4J - this block of declarations was scattered round the code but have gathered everything into one place - rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them + rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them CRITICAL_SECTION m_csRenderableTileEntities; - MultiPlayerLevel *level[4]; // 4J - now one per player + MultiPlayerLevel *level[4]; // 4J - now one per player Textures *textures; // vector *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore ClipChunkArray chunks[4]; // 4J - now one per player @@ -288,5 +277,5 @@ public: #endif void nonStackDirtyChunksAdded(); - int checkAllPresentChunks(bool *faultFound); // 4J - added for testing + int checkAllPresentChunks(bool *faultFound); // 4J - added for testing }; diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index c6f51f32..2bcb8f9b 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -1402,17 +1402,17 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed) // The new click position is normalised at one unit in the direction of movement, so that we don't gradually drift away if we detect the movement a fraction over // the unit distance each time - if( fabsf(dX) >= 1.0f ) + if( std::abs(dX) >= 1.0f ) { dX= ( dX < 0.0f ) ? ceilf(dX) : floorf(dX); newClick = true; } - else if( fabsf(dY) >= 1.0f ) + else if( std::abs(dY) >= 1.0f ) { dY= ( dY < 0.0f ) ? ceilf(dY) : floorf(dY); newClick = true; } - else if( fabsf(dZ) >= 1.0f ) + else if( std::abs(dZ) >= 1.0f ) { dZ= ( dZ < 0.0f ) ? ceilf(dZ) : floorf(dZ); newClick = true; @@ -1422,9 +1422,9 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed) { float fTarget = 1.0f - lastClickTolerance; - if( fabsf(dX) >= fTarget ) newClick = true; - if( fabsf(dY) >= fTarget ) newClick = true; - if( fabsf(dZ) >= fTarget ) newClick = true; + if( std::abs(dX) >= fTarget ) newClick = true; + if( std::abs(dY) >= fTarget ) newClick = true; + if( std::abs(dZ) >= fTarget ) newClick = true; } if( newClick ) diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp index 43f26c69..2efe53f7 100644 --- a/Minecraft.Client/TileRenderer.cpp +++ b/Minecraft.Client/TileRenderer.cpp @@ -443,7 +443,6 @@ bool TileRenderer::tesselateInWorld( Tile* tt, int x, int y, int z, int forceDat t->setMipmapEnable( true ); // 4J added return retVal; - } bool TileRenderer::tesselateAirPortalFrameInWorld(TheEndPortalFrameTile *tt, int x, int y, int z) diff --git a/Minecraft.World/ByteArrayInputStream.cpp b/Minecraft.World/ByteArrayInputStream.cpp index 15936087..b30f583f 100644 --- a/Minecraft.World/ByteArrayInputStream.cpp +++ b/Minecraft.World/ByteArrayInputStream.cpp @@ -95,7 +95,7 @@ int ByteArrayInputStream::read(byteArray b, unsigned int offset, unsigned int le } int k = min(length, count - pos); - XMemCpy(&b[offset], &buf[pos], k); + memcpy(&b[offset], &buf[pos], k); // std::copy( buf->data+pos, buf->data+pos+k, b->data + offset ); // Or this instead? pos += k; diff --git a/Minecraft.World/ByteArrayOutputStream.cpp b/Minecraft.World/ByteArrayOutputStream.cpp index e1cb2368..450ece93 100644 --- a/Minecraft.World/ByteArrayOutputStream.cpp +++ b/Minecraft.World/ByteArrayOutputStream.cpp @@ -76,7 +76,7 @@ void ByteArrayOutputStream::write(byteArray b, unsigned int offset, unsigned int buf.resize(newSize); } - XMemCpy(&buf[count], &b[offset], length); + memcpy(&buf[count], &b[offset], length); count += length; } diff --git a/Minecraft.World/C4JThread.cpp b/Minecraft.World/C4JThread.cpp index 9351b5cc..056ad0b0 100644 --- a/Minecraft.World/C4JThread.cpp +++ b/Minecraft.World/C4JThread.cpp @@ -3,27 +3,7 @@ std::vector C4JThread::ms_threadList; CRITICAL_SECTION C4JThread::ms_threadListCS; -#ifdef _XBOX_ONE - // 4J Stu - On XboxOne the main thread is not the one that does all the static init, so we have to set this up later -C4JThread *C4JThread::m_mainThread = nullptr; - -void C4JThread::StaticInit() -{ - m_mainThread = new C4JThread("Main thread"); -} -#else C4JThread C4JThread::m_mainThread("Main thread"); -#endif - -#ifdef __ORBIS__ -__thread SceKernelCpumask C4JThread::m_oldAffinityMask; -#endif - - -#if __PSVITA__ -static SceInt32 g_DefaultCPU; -static SceInt32 g_DefaultPriority; -#endif C4JThread::C4JThread( C4JThreadStartFunc* startFunc, void* param, const char* threadName, int stackSize/* = 0*/ ) { @@ -38,68 +18,17 @@ C4JThread::C4JThread( C4JThreadStartFunc* startFunc, void* param, const char* th if(m_stackSize < 16384) m_stackSize = 16384; -#ifdef __PS3__ - sprintf(m_threadName, "(4J) %s", threadName ); -#else sprintf_s(m_threadName,64, "(4J) %s", threadName ); -#endif m_isRunning = false; m_hasStarted = false; m_exitCode = STILL_ACTIVE; -#ifdef __PS3__ - m_completionFlag = new Event(Event::e_modeManualClear); - m_threadID = 0; - m_lastSleepTime = 0; - m_priority = 1002; // main thread has priority 1001 -#elif defined __ORBIS__ - m_completionFlag = new Event(Event::e_modeManualClear); - m_threadID = 0; - m_lastSleepTime = 0; - scePthreadAttrInit(&m_threadAttr); - int err = scePthreadAttrSetaffinity(&m_threadAttr, 63); // set the thread affinity to all cores to start with - assert(err == SCE_OK); - m_oldAffinityMask = 0; - m_priority = SCE_KERNEL_PRIO_FIFO_DEFAULT; -#elif defined __PSVITA__ - m_completionFlag = new Event(Event::e_modeManualClear); - m_threadID = 0; - m_lastSleepTime = 0; - m_priority = g_DefaultPriority; - //m_CPUMask = SCE_KERNEL_CPU_MASK_USER_ALL; - - // AP - I had trouble getting the cpu to change once the thread was created so I've hard coded them here - // The main work division is... - // 0 - Main - // 1 - Chunk/Tile Update - // 2 - Server/Audio - // These three can sometimes consume ALL the CPU time so they are set to below average priority so as not to block other critical threads - int CPU = SCE_KERNEL_CPU_MASK_USER_ALL; - if( !strcmp(threadName, "Chunk update") ) - { - CPU = SCE_KERNEL_CPU_MASK_USER_2; - m_priority = g_DefaultPriority + 1; - } - if( !strcmp(threadName, "Server" ) ) - { - CPU = SCE_KERNEL_CPU_MASK_USER_1; - m_priority = g_DefaultPriority + 1; - } - // make sure Tile Update doesn't go on cpu 0 because it will hold up the main thread. And it can't go on cpu 1 because Chunk Update crashes. - if( !strcmp(threadName, "Tile update") ) - { - CPU = SCE_KERNEL_CPU_MASK_USER_1; - } - - m_threadID = sceKernelCreateThread(m_threadName, entryPoint, g_DefaultPriority, m_stackSize, 0, CPU, nullptr); - app.DebugPrintf("***************************** start thread %s **************************\n", m_threadName); -#else m_threadID = 0; m_threadHandle = 0; m_threadHandle = CreateThread(nullptr, m_stackSize, entryPoint, this, CREATE_SUSPENDED, &m_threadID); -#endif + EnterCriticalSection(&ms_threadListCS); ms_threadList.push_back(this); LeaveCriticalSection(&ms_threadListCS); @@ -108,19 +37,12 @@ C4JThread::C4JThread( C4JThreadStartFunc* startFunc, void* param, const char* th // only used for the main thread C4JThread::C4JThread( const char* mainThreadName) { -#ifdef __PSVITA__ - user_registerthread(); -#endif - m_startFunc = nullptr; m_threadParam = nullptr; m_stackSize = 0; -#ifdef __PS3__ - sprintf(m_threadName, "(4J) %s", mainThreadName); -#else sprintf_s(m_threadName, 64, "(4J) %s", mainThreadName); -#endif + m_isRunning = true; m_hasStarted = true; m_lastSleepTime = System::currentTimeMillis(); @@ -128,28 +50,9 @@ C4JThread::C4JThread( const char* mainThreadName) // should be the first thread to be created, so init the static critical section for the threadlist here InitializeCriticalSection(&ms_threadListCS); - -#ifdef __PS3__ - m_completionFlag = new Event(Event::e_modeManualClear); - sys_ppu_thread_get_id(&m_threadID); -#elif defined __ORBIS__ - m_completionFlag = new Event(Event::e_modeManualClear); - m_threadID = scePthreadSelf(); - m_priority = SCE_KERNEL_PRIO_FIFO_DEFAULT; -#elif defined __PSVITA__ - m_completionFlag = new Event(Event::e_modeManualClear); - g_DefaultPriority = sceKernelGetThreadCurrentPriority(); - m_threadID = sceKernelGetThreadId(); - int err = sceKernelChangeThreadCpuAffinityMask(m_threadID, SCE_KERNEL_CPU_MASK_USER_0); -// sceKernelChangeThreadPriority(m_threadID, g_DefaultPriority + 1); - g_DefaultCPU = SCE_KERNEL_CPU_MASK_USER_ALL;//sceKernelGetThreadCpuAffinityMask(m_threadID); -#else m_threadID = GetCurrentThreadId(); m_threadHandle = GetCurrentThread(); -#endif -#ifdef _XBOX_ONE - SetThreadName(-1, m_threadName); -#endif + EnterCriticalSection(&ms_threadListCS); ms_threadList.push_back(this); LeaveCriticalSection(&ms_threadListCS); @@ -157,79 +60,19 @@ C4JThread::C4JThread( const char* mainThreadName) C4JThread::~C4JThread() { -#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ - delete m_completionFlag; -#endif - -#if defined __ORBIS__ - scePthreadJoin(m_threadID, nullptr); -#endif - EnterCriticalSection(&ms_threadListCS); - for (auto it = ms_threadList.begin(); it != ms_threadList.end(); it++) - { - if( (*it) == this ) - { - ms_threadList.erase(it); - LeaveCriticalSection(&ms_threadListCS); - return; - } - } + std::erase(ms_threadList, this); LeaveCriticalSection(&ms_threadListCS); -#ifdef _WINDOWS64 if (m_threadHandle != nullptr && m_threadHandle != (HANDLE)-2) { CloseHandle(m_threadHandle); m_threadHandle = nullptr; } -#endif } -#ifdef __PS3__ -void C4JThread::entryPoint(uint64_t param) -{ - C4JThread* pThread = (C4JThread*)param; - pThread->m_exitCode = (*pThread->m_startFunc)(pThread->m_threadParam); - pThread->m_completionFlag->Set(); - pThread->m_isRunning = false; - sys_ppu_thread_exit(0); -} -#elif defined __ORBIS__ -void * C4JThread::entryPoint(void *param) -{ - C4JThread* pThread = (C4JThread*)param; - pThread->m_exitCode = (*pThread->m_startFunc)(pThread->m_threadParam); - pThread->m_completionFlag->Set(); - pThread->m_isRunning = false; - scePthreadExit(nullptr); -} -#elif defined __PSVITA__ -struct StrArg { - C4JThread* Thread; -}; - -SceInt32 C4JThread::entryPoint(SceSize argSize, void *pArgBlock) -{ - StrArg *strArg = (StrArg*)pArgBlock; - C4JThread* pThread = strArg->Thread; - user_registerthread(); - pThread->m_exitCode = (*pThread->m_startFunc)(pThread->m_threadParam); - app.DebugPrintf("***************************** thread exit %s **************************\n", pThread->m_threadName); - pThread->m_completionFlag->Set(); - pThread->m_isRunning = false; - - // AP - make sure we clean up this thread's storage and memory - PSVitaTLSStorage::RemoveThread(pThread->m_threadID); - user_removethread(); - - sceKernelExitDeleteThread(nullptr); - - return pThread->m_exitCode; -} -#else DWORD WINAPI C4JThread::entryPoint(LPVOID lpParam) { C4JThread* pThread = static_cast(lpParam); @@ -238,35 +81,11 @@ DWORD WINAPI C4JThread::entryPoint(LPVOID lpParam) pThread->m_isRunning = false; return pThread->m_exitCode; } -#endif - - - void C4JThread::Run() { -#ifdef __PS3__ - // prio specifies the priority value of the PPU thread within the range from 0 to 3071 where 0 is the highest. - // One of the following values is set to flags: - // 0 - non-joinable non-interrupt thread - // SYS_PPU_THREAD_CREATE_JOINABLE - Create a joinable thread - // SYS_PPU_THREAD_CREATE_INTERRUPT - Create an interrupt thread - uint64_t flags = 0; - int err = sys_ppu_thread_create(&m_threadID, entryPoint, (uint64_t)this, m_priority, m_stackSize, flags, m_threadName); -#elif defined __ORBIS__ - scePthreadAttrSetstacksize(&m_threadAttr, m_stackSize); - scePthreadAttrSetguardsize(&m_threadAttr, 1024); - int ret = scePthreadCreate(&m_threadID, &m_threadAttr, entryPoint, this, m_threadName); - assert( ret == SCE_OK ); - scePthreadSetprio(m_threadID,m_priority); - scePthreadAttrDestroy(&m_threadAttr); -#elif defined __PSVITA__ - StrArg strArg = {this}; -// m_threadID = sceKernelCreateThread(m_threadName, entryPoint, m_priority, m_stackSize, 0, m_CPUMask, nullptr); - sceKernelStartThread( m_threadID, sizeof(strArg), &strArg); -#else ResumeThread(m_threadHandle); -#endif + m_lastSleepTime = System::currentTimeMillis(); m_isRunning = true; m_hasStarted = true; @@ -274,328 +93,78 @@ void C4JThread::Run() void C4JThread::SetProcessor( int proc ) { -#ifdef __PS3__ - // does nothing since we only have the 1 processor -#elif defined __ORBIS__ - scePthreadAttrSetaffinity(&m_threadAttr, 1 << proc); -#elif defined __PSVITA__ - int Proc = proc >> 1; // convert from 360's 3 cores * 2 hardware threads to Vita's 3 cores - int Mask = SCE_KERNEL_CPU_MASK_USER_0 << Proc; - //m_CPUMask = Mask; -// int err = sceKernelChangeThreadCpuAffinityMask(m_threadID, Mask); - int Newmask = sceKernelGetThreadCpuAffinityMask(m_threadID); - app.DebugPrintf("***************************** set thread proc %s %d %d %d **************************\n", m_threadName, proc, Mask, Newmask); -#elif defined _DURANGO - SetThreadAffinityMask(m_threadHandle, 1 << proc ); -#elif defined _WINDOWS64 SetThreadIdealProcessor(m_threadHandle, proc ); -#else - XSetThreadProcessor( m_threadHandle, proc); -#endif } void C4JThread::SetPriority( int priority ) { -#ifdef __PS3__ - switch(priority) - { - case THREAD_PRIORITY_LOWEST: m_priority = 1003; break; - case THREAD_PRIORITY_BELOW_NORMAL: m_priority = 1002; break; - case THREAD_PRIORITY_NORMAL: m_priority = 1001; break; // same as main thread - case THREAD_PRIORITY_ABOVE_NORMAL: m_priority = 1000; break; - case THREAD_PRIORITY_HIGHEST: m_priority = 999; break; - } - if(m_threadID != 0) - sys_ppu_thread_set_priority(m_threadID, m_priority); - //int erro = sys_ppu_thread_set_priority(m_threadID, priority); -#elif defined __ORBIS__ - - switch(priority) - { - case THREAD_PRIORITY_LOWEST: m_priority = SCE_KERNEL_PRIO_FIFO_LOWEST; break; - case THREAD_PRIORITY_BELOW_NORMAL: m_priority = SCE_KERNEL_PRIO_FIFO_LOWEST + ((SCE_KERNEL_PRIO_FIFO_DEFAULT-SCE_KERNEL_PRIO_FIFO_LOWEST)/2); break; - case THREAD_PRIORITY_NORMAL: m_priority = SCE_KERNEL_PRIO_FIFO_DEFAULT; break; // same as main thread - case THREAD_PRIORITY_ABOVE_NORMAL: m_priority = SCE_KERNEL_PRIO_FIFO_DEFAULT + ((SCE_KERNEL_PRIO_FIFO_HIGHEST-SCE_KERNEL_PRIO_FIFO_DEFAULT)/2); break; - case THREAD_PRIORITY_HIGHEST: m_priority = SCE_KERNEL_PRIO_FIFO_HIGHEST; break; - } - - if( m_threadID != 0 ) - { - scePthreadSetprio(m_threadID,m_priority); - } -#elif defined __PSVITA__ - int Mid = g_DefaultPriority;//(SCE_KERNEL_LOWEST_PRIORITY_USER + SCE_KERNEL_HIGHEST_PRIORITY_USER) / 2; - switch(priority) - { - case THREAD_PRIORITY_LOWEST: - m_priority = SCE_KERNEL_LOWEST_PRIORITY_USER; - break; - case THREAD_PRIORITY_BELOW_NORMAL: - m_priority = Mid + 1; - break; - case THREAD_PRIORITY_NORMAL: - m_priority = Mid; - break; // same as main thread - case THREAD_PRIORITY_ABOVE_NORMAL: - m_priority = Mid - 1; - break; - case THREAD_PRIORITY_HIGHEST: - m_priority = SCE_KERNEL_HIGHEST_PRIORITY_USER; - break; - } - -// sceKernelChangeThreadPriority(m_threadID, m_priority); - app.DebugPrintf("***************************** set thread prio %s %d %d **************************\n", m_threadName, priority, m_priority); -#else SetThreadPriority(m_threadHandle, priority); -#endif // __PS3__ } DWORD C4JThread::WaitForCompletion( int timeoutMs ) { -#ifdef __PS3__ - if(timeoutMs == INFINITE) - timeoutMs = SYS_NO_TIMEOUT ; - return m_completionFlag->WaitForSignal(timeoutMs); -#elif defined __ORBIS__ - return m_completionFlag->WaitForSignal( timeoutMs ); -#elif defined __PSVITA__ - return m_completionFlag->WaitForSignal( timeoutMs ); -/* SceUInt32 Timeout = timeoutMs * 1000; - SceInt32 err = sceKernelWaitThreadEnd(m_threadID, &m_exitCode, &Timeout); - if( err == 0 ) - { - return m_exitCode; - } - else - { - if( err == SCE_KERNEL_ERROR_WAIT_TIMEOUT ) - { - return WAIT_TIMEOUT; - } - else - { - // AP - not sure what to do here - return 0; - } - }*/ - -// return m_exitCode; -#else return WaitForSingleObject(m_threadHandle, timeoutMs); -#endif // __PS3__ } int C4JThread::GetExitCode() { -#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ - return m_exitCode; -#else DWORD exitcode = 0; GetExitCodeThread(m_threadHandle, &exitcode); return *((int *)&exitcode); -#endif } void C4JThread::Sleep( int millisecs ) { -#ifdef __PS3__ - if(millisecs == 0) - { - // https://ps3.scedev.net/forums/thread/116470/ - // "sys_timer_usleep(0) does not yield the CPU." - sys_ppu_thread_yield(); - } - else - sys_timer_usleep(millisecs * 1000); -#elif defined __ORBIS__ - sceKernelUsleep(((SceKernelUseconds)millisecs) * 1000); -#elif defined __PSVITA__ - // 4J Stu - 0 is an error, so add a tiny sleep when we just want to yield - sceKernelDelayThread(millisecs * 1000 + 1); -#else ::Sleep(millisecs); -#endif // __PS3__ } C4JThread* C4JThread::getCurrentThread() { -#ifdef __PS3__ - sys_ppu_thread_t currThreadID; - sys_ppu_thread_get_id(&currThreadID); -#elif defined __ORBIS__ - ScePthread currThreadID = scePthreadSelf(); -#elif defined __PSVITA__ - SceUID currThreadID = sceKernelGetThreadId(); -#else DWORD currThreadID = GetCurrentThreadId(); -#endif //__PS3__ + C4JThread* result = nullptr; + EnterCriticalSection(&ms_threadListCS); - for(size_t i=0;im_threadID) - { - LeaveCriticalSection(&ms_threadListCS); - return ms_threadList[i]; - } - } + auto it = std::find_if(ms_threadList.begin(), ms_threadList.end(), [currThreadID](C4JThread* t) { return t->m_threadID == currThreadID; }); + + if (it != ms_threadList.end()) + result = *it; LeaveCriticalSection(&ms_threadListCS); - return nullptr; + return result; } bool C4JThread::isMainThread() { -#ifdef _XBOX_ONE - return getCurrentThread() == m_mainThread; -#else return getCurrentThread() == &m_mainThread; -#endif } C4JThread::Event::Event(EMode mode/* = e_modeAutoClear*/) { m_mode = mode; -#ifdef __PS3__ - sys_event_flag_attribute_t attr; - // default values taken from sys_event_flag_attribute_initialize - attr.attr_protocol = SYS_SYNC_PRIORITY; - attr.attr_pshared = SYS_SYNC_NOT_PROCESS_SHARED; - attr.key = 0; - attr.flags = 0; - attr.type = SYS_SYNC_WAITER_SINGLE; - attr.name[0] = '\0'; - sys_event_flag_attribute_initialize(attr); - - int err = sys_event_flag_create(&m_event, &attr, 0); - -#elif defined __ORBIS__ - char name[1] = {0}; - sceKernelCreateEventFlag( &m_event, name, SCE_KERNEL_EVF_ATTR_TH_FIFO | SCE_KERNEL_EVF_ATTR_MULTI, 0, nullptr); -#elif defined __PSVITA__ - char name[1] = {0}; - m_event = sceKernelCreateEventFlag( name, SCE_KERNEL_EVF_ATTR_TH_FIFO | SCE_KERNEL_EVF_ATTR_MULTI, 0, nullptr); -#else m_event = CreateEvent( nullptr, (m_mode == e_modeManualClear), FALSE, nullptr ); -#endif //__PS3__ } - C4JThread::Event::~Event() { -#ifdef __PS3__ - sys_event_flag_destroy(m_event); -#elif defined __ORBIS__ - sceKernelDeleteEventFlag(m_event); -#elif defined __PSVITA__ - sceKernelDeleteEventFlag(m_event); -#else CloseHandle( m_event ); -#endif // __PS3__ } - void C4JThread::Event::Set() { -#ifdef __PS3__ - int err =sys_event_flag_set(m_event, 1); -#elif defined __ORBIS__ - sceKernelSetEventFlag(m_event, 1); -#elif defined __PSVITA__ - sceKernelSetEventFlag(m_event, 1); -#else SetEvent(m_event); -#endif //__PS3__ } void C4JThread::Event::Clear() { -#ifdef __PS3__ - int err =sys_event_flag_clear(m_event, ~(1)); -#elif defined __ORBIS__ - sceKernelClearEventFlag(m_event, ~(1)); -#elif defined __PSVITA__ - sceKernelClearEventFlag(m_event, ~1); -#else ResetEvent(m_event); -#endif //__PS3__ } DWORD C4JThread::Event::WaitForSignal( int timeoutMs ) { -#ifdef __PS3__ - if(timeoutMs == INFINITE) - timeoutMs = SYS_NO_TIMEOUT ; - int timoutMicrosecs = timeoutMs * 1000; - uint32_t mode = SYS_EVENT_FLAG_WAIT_AND; - if(m_mode == e_modeAutoClear) - mode |= SYS_EVENT_FLAG_WAIT_CLEAR; - int err = sys_event_flag_wait(m_event, 1, mode, 0, timoutMicrosecs); - - switch(err) - { - case CELL_OK: return WAIT_OBJECT_0; - case ETIMEDOUT: return WAIT_TIMEOUT; - case ECANCELED: return WAIT_ABANDONED; - default: return WAIT_FAILED; - } - -#elif defined __ORBIS__ - SceKernelUseconds timeoutMicrosecs; - SceKernelUseconds *pTimeoutMicrosecs; - if( timeoutMs == INFINITE ) - { - pTimeoutMicrosecs = nullptr; - } - else - { - timeoutMicrosecs = ((SceKernelUseconds)timeoutMs) * 1000; - pTimeoutMicrosecs = &timeoutMicrosecs; - } - uint32_t waitMode = SCE_KERNEL_EVF_WAITMODE_AND; - if(m_mode == e_modeAutoClear) - { - waitMode |= SCE_KERNEL_EVF_WAITMODE_CLEAR_PAT; - } - int err = sceKernelWaitEventFlag(m_event, 1, waitMode, nullptr, pTimeoutMicrosecs); - switch(err) - { - case SCE_OK: return WAIT_OBJECT_0; - case SCE_KERNEL_ERROR_ETIMEDOUT: return WAIT_TIMEOUT; - case SCE_KERNEL_ERROR_ECANCELED: return WAIT_ABANDONED; - default: return WAIT_FAILED; - } -#elif defined __PSVITA__ - SceUInt32 timeoutMicrosecs; - SceUInt32 *pTimeoutMicrosecs; - if( timeoutMs == INFINITE ) - { - pTimeoutMicrosecs = nullptr; - } - else - { - timeoutMicrosecs = ((SceInt32)timeoutMs) * 1000; - pTimeoutMicrosecs = &timeoutMicrosecs; - } - uint32_t waitMode = SCE_KERNEL_EVF_WAITMODE_AND; - if(m_mode == e_modeAutoClear) - { - waitMode |= SCE_KERNEL_EVF_WAITMODE_CLEAR_ALL; - } - int err = sceKernelWaitEventFlag(m_event, 1, waitMode, nullptr, pTimeoutMicrosecs); - switch(err) - { - case SCE_OK: return WAIT_OBJECT_0; - case SCE_KERNEL_ERROR_WAIT_TIMEOUT: return WAIT_TIMEOUT; - case SCE_KERNEL_ERROR_WAIT_CANCEL: return WAIT_ABANDONED; - default: return WAIT_FAILED; - } -#else return WaitForSingleObject(m_event, timeoutMs); -#endif // __PS3__ } C4JThread::EventArray::EventArray( int size, EMode mode/* = e_modeAutoClear*/) @@ -603,73 +172,33 @@ C4JThread::EventArray::EventArray( int size, EMode mode/* = e_modeAutoClear*/) assert(size<32); m_size = size; m_mode = mode; -#ifdef __PS3__ - sys_event_flag_attribute_t attr; - // default values taken from sys_event_flag_attribute_initialize - attr.attr_protocol = SYS_SYNC_PRIORITY; - attr.attr_pshared = SYS_SYNC_NOT_PROCESS_SHARED; - attr.key = 0; - attr.flags = 0; - attr.type = SYS_SYNC_WAITER_SINGLE; - attr.name[0] = '\0'; - sys_event_flag_attribute_initialize(attr); - int err = sys_event_flag_create(&m_events, &attr, 0); - assert(err == CELL_OK); -#elif defined __ORBIS__ - char name[1] = {0}; - sceKernelCreateEventFlag( &m_events, name, SCE_KERNEL_EVF_ATTR_TH_FIFO | SCE_KERNEL_EVF_ATTR_MULTI, 0, nullptr); -#elif defined __PSVITA__ - char name[1] = {0}; - m_events = sceKernelCreateEventFlag( name, SCE_KERNEL_EVF_ATTR_TH_FIFO | SCE_KERNEL_EVF_ATTR_MULTI, 0, nullptr); -#else + m_events = new HANDLE[size]; for(int i=0;i= 0) m_thread->SetProcessor(m_processor); + if(m_priority != THREAD_PRIORITY_HIGHEST+1) m_thread->SetPriority(m_priority); m_thread->Run(); @@ -1013,6 +267,7 @@ void C4JThread::EventQueue::sendEvent( Level* pLevel ) { if(m_thread == nullptr) init(); + EnterCriticalSection(&m_critSect); m_queue.push(pLevel); m_startEvent->Set(0); @@ -1024,6 +279,7 @@ void C4JThread::EventQueue::waitForFinish() { if(m_thread == nullptr) init(); + EnterCriticalSection(&m_critSect); if(m_queue.empty()) { @@ -1066,11 +322,11 @@ void C4JThread::EventQueue::threadPoll() EnterCriticalSection(&m_critSect); m_queue.pop(); + bListEmpty = m_queue.empty(); if(bListEmpty) - { m_finishedEvent->Set(); - } + LeaveCriticalSection(&m_critSect); } while(!bListEmpty); @@ -1078,31 +334,4 @@ void C4JThread::EventQueue::threadPoll() }; // ShutdownManager::HasFinished(ShutdownManager::eEventQueueThreads); -} - - -#ifdef __ORBIS__ - -void C4JThread::PushAffinityAllCores() -{ - assert(m_oldAffinityMask == 0); - int err; - ScePthread currThreadID = scePthreadSelf(); - err = scePthreadGetaffinity(currThreadID, &m_oldAffinityMask); - assert(err == SCE_OK); - err = scePthreadSetaffinity(currThreadID, 63); - assert(err == SCE_OK); - - -} - -void C4JThread::PopAffinity() -{ - int err; - ScePthread currThreadID = scePthreadSelf(); - err = scePthreadSetaffinity(currThreadID, m_oldAffinityMask); - m_oldAffinityMask = 0; - assert(err == SCE_OK); -} - -#endif // __ORBIS__ \ No newline at end of file +} \ No newline at end of file diff --git a/Minecraft.World/C4JThread.h b/Minecraft.World/C4JThread.h index cde74ec3..46189448 100644 --- a/Minecraft.World/C4JThread.h +++ b/Minecraft.World/C4JThread.h @@ -5,32 +5,6 @@ typedef int (C4JThreadStartFunc)(void* lpThreadParameter); class Level; -#if defined(_XBOX_ONE) || defined(__ORBIS__) - -#define CPU_CORE_MAIN_THREAD 0 - -#define CPU_CORE_SERVER 1 - -#define CPU_CORE_CHUNK_UPDATE 2 -#define CPU_CORE_REMOVE_PLAYER 2 - -#define CPU_CORE_CHUNK_REBUILD_A 3 -#define CPU_CORE_SAVE_THREAD_A 3 -#define CPU_CORE_UI_SCENE 3 -#define CPU_CORE_POST_PROCESSING 3 -#define CPU_CORE_DQR_REALTIMESESSION 3 - -#define CPU_CORE_CHUNK_REBUILD_B 4 -#define CPU_CORE_SAVE_THREAD_B 4 -#define CPU_CORE_TILE_UPDATE 4 -#define CPU_CORE_CONNECTIONS 4 - -#define CPU_CORE_CHUNK_REBUILD_C 5 -#define CPU_CORE_SAVE_THREAD_C 5 -#define CPU_CORE_LEADERBOARDS 5 // Orbis only - -#elif defined(_WINDOWS64) - #define CPU_CORE_MAIN_THREAD 0 #define CPU_CORE_CHUNK_REBUILD_A 1 @@ -54,31 +28,6 @@ class Level; #define CPU_CORE_CHUNK_REBUILD_C 8 #define CPU_CORE_SAVE_THREAD_C 8 -#else - -#define CPU_CORE_MAIN_THREAD 0 - -#define CPU_CORE_CHUNK_REBUILD_A 1 -#define CPU_CORE_SAVE_THREAD_A 1 -#define CPU_CORE_TILE_UPDATE 1 -#define CPU_CORE_CONNECTIONS 1 - -#define CPU_CORE_CHUNK_UPDATE 2 -#define CPU_CORE_REMOVE_PLAYER 2 - -#define CPU_CORE_CHUNK_REBUILD_B 3 -#define CPU_CORE_SAVE_THREAD_B 3 -#define CPU_CORE_UI_SCENE 3 -#define CPU_CORE_POST_PROCESSING 3 - -#define CPU_CORE_SERVER 4 - -#define CPU_CORE_CHUNK_REBUILD_C 5 -#define CPU_CORE_SAVE_THREAD_C 5 -#define CPU_CORE_LEADERBOARDS 5 // Sony only - -#endif - class C4JThread { public: @@ -99,15 +48,7 @@ public: private: EMode m_mode; - #ifdef __PS3__ - sys_event_flag_t m_event; - #elif defined __ORBIS__ - SceKernelEventFlag m_event; - #elif defined __PSVITA__ - SceUID m_event; - #else HANDLE m_event; - #endif // __PS3__ }; class EventArray @@ -122,7 +63,6 @@ public: EventArray(int size, EMode mode = e_modeAutoClear); ~EventArray(); - void Set(int index); void Clear(int index); void SetAll(); @@ -130,26 +70,14 @@ public: DWORD WaitForAll(int timeoutMs); DWORD WaitForAny(int timeoutMs); DWORD WaitForSingle(int index, int timeoutMs); -#ifdef __PS3__ - void Cancel(); -#endif private: int m_size; EMode m_mode; -#ifdef __PS3__ - sys_event_flag_t m_events; -#elif defined __ORBIS__ - SceKernelEventFlag m_events; -#elif defined __PSVITA__ - SceUID m_events; -#else - HANDLE* m_events; -#endif // __PS3__ + + HANDLE* m_events; }; - - class EventQueue { typedef void (UpdateFunc)(void* lpParameter); @@ -177,8 +105,6 @@ public: void waitForFinish(); }; - - C4JThread(C4JThreadStartFunc* startFunc, void* param, const char* threadName, int stackSize = 0); C4JThread( const char* mainThreadName ); // only used for the main thread ~C4JThread(); @@ -196,16 +122,6 @@ public: static bool isMainThread(); static char* getCurrentThreadName() { return getCurrentThread()->getName(); } -#ifdef __ORBIS__ - static void PushAffinityAllCores(); // PS4 only - static void PopAffinity(); - static __thread SceKernelCpumask m_oldAffinityMask; -#endif // __ORBIS__ - -#ifdef _XBOX_ONE - static void StaticInit(); -#endif - private: void* m_threadParam; C4JThreadStartFunc* m_startFunc; @@ -218,35 +134,12 @@ private: static std::vector ms_threadList; static CRITICAL_SECTION ms_threadListCS; -#ifdef _XBOX_ONE - // 4J Stu - On XboxOne the main thread is not the one that does all the static init, so we have to set this up later - static C4JThread *m_mainThread; -#else static C4JThread m_mainThread; -#endif -#ifdef __PS3__ - sys_ppu_thread_t m_threadID; - Event *m_completionFlag; - int m_priority; - static void entryPoint(uint64_t); -#elif defined __ORBIS__ - ScePthreadAttr m_threadAttr; - ScePthread m_threadID; - Event *m_completionFlag; - int m_priority; - static void *entryPoint(void *); -#elif defined __PSVITA__ - SceUID m_threadID; - Event *m_completionFlag; - int m_priority; - static SceInt32 entryPoint(SceSize argSize, void *pArgBlock); -#else DWORD m_threadID; HANDLE m_threadHandle; Event *m_completionFlag; static DWORD WINAPI entryPoint(LPVOID lpParam); -#endif }; void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName ); @@ -257,5 +150,4 @@ class CriticalSectionScopeLock public: CriticalSectionScopeLock(CRITICAL_SECTION* pCS) { m_pCS = pCS; EnterCriticalSection(m_pCS); } ~CriticalSectionScopeLock() { LeaveCriticalSection(m_pCS); } -}; - +}; \ No newline at end of file diff --git a/Minecraft.World/CompressedTileStorage.cpp b/Minecraft.World/CompressedTileStorage.cpp index 5b87a7ff..c3861159 100644 --- a/Minecraft.World/CompressedTileStorage.cpp +++ b/Minecraft.World/CompressedTileStorage.cpp @@ -54,8 +54,8 @@ CompressedTileStorage::CompressedTileStorage(CompressedTileStorage *copyFrom) allocatedSize = copyFrom->allocatedSize; if(allocatedSize > 0) { - indicesAndData = static_cast(XPhysicalAlloc(allocatedSize, MAXULONG_PTR, 4096, PAGE_READWRITE));//(unsigned char *)malloc(allocatedSize); - XMemCpy(indicesAndData, copyFrom->indicesAndData, allocatedSize); + indicesAndData = static_cast(malloc(allocatedSize)); + memcpy(indicesAndData, copyFrom->indicesAndData, allocatedSize); } else { @@ -74,7 +74,7 @@ CompressedTileStorage::CompressedTileStorage(byteArray initFrom, unsigned int in allocatedSize = 0; // We need 32768 bytes for a fully uncompressed chunk, plus 1024 for the index. Rounding up to nearest 4096 bytes for allocation - indicesAndData = static_cast(XPhysicalAlloc(32768 + 4096, MAXULONG_PTR, 4096, PAGE_READWRITE)); + indicesAndData = static_cast(malloc(32768 + 4096)); unsigned short *indices = (unsigned short *)indicesAndData; unsigned char *data = indicesAndData + 1024; @@ -124,7 +124,7 @@ CompressedTileStorage::CompressedTileStorage(bool isEmpty) // XPhysicalAlloc just maps to malloc on PS3, so allocate the smallest amount indicesAndData = (unsigned char *)XPhysicalAlloc(1024, MAXULONG_PTR, 4096, PAGE_READWRITE); #else - indicesAndData = static_cast(XPhysicalAlloc(4096, MAXULONG_PTR, 4096, PAGE_READWRITE)); + indicesAndData = static_cast(malloc(4096)); #endif //__PS3__ unsigned short *indices = (unsigned short *)indicesAndData; //unsigned char *data = indicesAndData + 1024; @@ -217,7 +217,7 @@ bool CompressedTileStorage::isSameAs(CompressedTileStorage *other) CompressedTileStorage::~CompressedTileStorage() { #if 1 - if(indicesAndData) XPhysicalFree(indicesAndData); + if(indicesAndData) free(indicesAndData); #else if( (unsigned int)indicesAndData >= MM_PHYSICAL_4KB_BASE ) { @@ -387,7 +387,7 @@ void CompressedTileStorage::setData(byteArray dataIn, unsigned int inOffset) // printf("%d: %d (0) %d (1) %d (2) %d (4) %d (8)\n", chunkTotal, type0 / chunkTotal, type1 / chunkTotal, type2 / chunkTotal, type4 / chunkTotal, type8 / chunkTotal); memToAlloc += 1024; // For the indices - unsigned char *newIndicesAndData = static_cast(XPhysicalAlloc(memToAlloc, MAXULONG_PTR, 4096, PAGE_READWRITE));//(unsigned char *)malloc( memToAlloc ); + unsigned char *newIndicesAndData = static_cast(malloc(memToAlloc));//(unsigned char *)malloc( memToAlloc ); unsigned char *pucData = newIndicesAndData + 1024; unsigned short usDataOffset = 0; unsigned short *newIndices = (unsigned short *) newIndicesAndData; @@ -436,8 +436,8 @@ void CompressedTileStorage::setData(byteArray dataIn, unsigned int inOffset) unsigned char *tile_types = pucData + usDataOffset; repacked = tile_types + tiletypecount; - XMemSet(tile_types, 255, tiletypecount); - XMemSet(repacked, 0,tiledatasize); + memset(tile_types, 255, tiletypecount); + memset(repacked, 0,tiledatasize); newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT; usDataOffset += tiletypecount + tiledatasize; int count = 0; @@ -820,7 +820,7 @@ void CompressedTileStorage::tick() toFree = deleteQueue[freeIndex].Pop(); // if( toFree ) printf("Deleting 0x%x\n", toFree); #if 1 - if( toFree ) XPhysicalFree(toFree); + if( toFree ) free(toFree); #else // Determine correct means to free this data - could have been allocated either with XPhysicalAlloc or malloc if( (unsigned int)toFree >= MM_PHYSICAL_4KB_BASE ) @@ -855,7 +855,7 @@ void CompressedTileStorage::compress_SPU(int upgradeBlock/*=-1*/) if(dataIn.neededCompressed) { - unsigned char *newIndicesAndData = (unsigned char *)XPhysicalAlloc(dataIn.newAllocatedSize, MAXULONG_PTR, 4096, PAGE_READWRITE);//(unsigned char *)malloc( memToAlloc ); + unsigned char *newIndicesAndData = (unsigned char *)malloc(dataIn.newAllocatedSize); memcpy(newIndicesAndData, compBuffer, dataIn.newAllocatedSize); queueForDelete( indicesAndData ); indicesAndData = newIndicesAndData; @@ -1057,7 +1057,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) if( needsCompressed ) { memToAlloc += 1024; // For the indices - unsigned char *newIndicesAndData = static_cast(XPhysicalAlloc(memToAlloc, MAXULONG_PTR, 4096, PAGE_READWRITE));//(unsigned char *)malloc( memToAlloc ); + unsigned char *newIndicesAndData = static_cast(malloc(memToAlloc)); if( newIndicesAndData == nullptr ) { DWORD lastError = GetLastError(); @@ -1095,7 +1095,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) { packed_data = data + ( ( blockIndices[i] >> INDEX_OFFSET_SHIFT ) & INDEX_OFFSET_MASK); usDataOffset = (usDataOffset + 3 ) & 0xfffc; - XMemCpy( pucData + usDataOffset, packed_data, 64 ); + memcpy( pucData + usDataOffset, packed_data, 64 ); newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT; usDataOffset += 64; } @@ -1109,7 +1109,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) int dataSize = 8 << indexTypeOld; // 8, 16 or 32 bytes of per-tile storage dataSize += 1 << ( 1 << indexTypeOld ); // 2, 4 or 16 bytes to store each tile type newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT; - XMemCpy( pucData + usDataOffset, packed_data, dataSize ); + memcpy( pucData + usDataOffset, packed_data, dataSize ); usDataOffset += dataSize; done = true; } @@ -1128,7 +1128,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) { unpacked_data = tempdata; int value = ( blockIndices[i] >> INDEX_TILE_SHIFT ) & INDEX_TILE_MASK; - XMemSet( tempdata, value, 64 ); + memset( tempdata, value, 64 ); } else { @@ -1178,7 +1178,7 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) else { usDataOffset = (usDataOffset + 3 ) & 0xfffc; // Make sure offset is 4 BYTE aligned - XMemCpy( pucData + usDataOffset, unpacked_data, 64 ); + memcpy( pucData + usDataOffset, unpacked_data, 64 ); newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT; usDataOffset += 64; } @@ -1195,8 +1195,8 @@ void CompressedTileStorage::compress(int upgradeBlock/*=-1*/) tile_types = pucData + usDataOffset; repacked = tile_types + tiletypecount; - XMemSet(tile_types, 255, tiletypecount); - XMemSet(repacked, 0,tiledatasize); + memset(tile_types, 255, tiletypecount); + memset(repacked, 0,tiledatasize); newIndices[i] |= ( usDataOffset & INDEX_OFFSET_MASK) << INDEX_OFFSET_SHIFT; usDataOffset += tiletypecount + tiledatasize; int count = 0; @@ -1357,9 +1357,9 @@ void CompressedTileStorage::read(DataInputStream *dis) // This delete should be safe to do in a non-thread safe way as the chunk is fully read before any external reference is available to it from another thread if( indicesAndData ) { - XPhysicalFree(indicesAndData); + free(indicesAndData); } - indicesAndData = static_cast(XPhysicalAlloc(allocatedSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + indicesAndData = static_cast(malloc(allocatedSize)); byteArray wrapper(indicesAndData, allocatedSize); dis->readFully(wrapper); diff --git a/Minecraft.World/ConsoleSaveFileOriginal.cpp b/Minecraft.World/ConsoleSaveFileOriginal.cpp index 489ca62d..8e0edd29 100644 --- a/Minecraft.World/ConsoleSaveFileOriginal.cpp +++ b/Minecraft.World/ConsoleSaveFileOriginal.cpp @@ -594,7 +594,7 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(FileEntry *file, DWORD nNumberOfByt // AP - use this to access the virtual memory VirtualMove( (void *)(uiCopyStart + nNumberOfBytesToWrite), ( void *)uiCopyStart, uiCopyEnd - uiCopyStart); #else - XMemCpy( (void *)(uiCopyStart + nNumberOfBytesToWrite), ( void *)uiCopyStart, uiCopyEnd - uiCopyStart ); + memcpy( (void *)(uiCopyStart + nNumberOfBytesToWrite), ( void *)uiCopyStart, uiCopyEnd - uiCopyStart ); #endif } } diff --git a/Minecraft.World/CustomLevelSource.cpp b/Minecraft.World/CustomLevelSource.cpp index e3bf8464..13fa55f0 100644 --- a/Minecraft.World/CustomLevelSource.cpp +++ b/Minecraft.World/CustomLevelSource.cpp @@ -367,7 +367,7 @@ LevelChunk *CustomLevelSource::getChunk(int xOffs, int zOffs) // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int blocksSize = Level::maxBuildHeight * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(blocksSize)); XMemSet128(tileData,0,blocksSize); byteArray blocks = byteArray(tileData,blocksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -406,7 +406,7 @@ LevelChunk *CustomLevelSource::getChunk(int xOffs, int zOffs) // 4J - this now creates compressed block data from the blocks array passed in, so moved it until after the blocks are actually finalised. We also // now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); - XPhysicalFree(tileData); + free(tileData); return levelChunk; #else diff --git a/Minecraft.World/FlatLevelSource.cpp b/Minecraft.World/FlatLevelSource.cpp index 36529d24..a9651e0b 100644 --- a/Minecraft.World/FlatLevelSource.cpp +++ b/Minecraft.World/FlatLevelSource.cpp @@ -69,7 +69,7 @@ LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) { // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int chunksSize = Level::genDepth * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(chunksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(chunksSize)); XMemSet128(tileData,0,chunksSize); byteArray blocks = byteArray(tileData,chunksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -87,7 +87,7 @@ LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) // 4J - this now creates compressed block data from the blocks array passed in, so moved it until after the blocks are actually finalised. We also // now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); - XPhysicalFree(tileData); + free(tileData); levelChunk->recalcHeightmap(); diff --git a/Minecraft.World/HellFlatLevelSource.cpp b/Minecraft.World/HellFlatLevelSource.cpp index 303bd24d..4b944139 100644 --- a/Minecraft.World/HellFlatLevelSource.cpp +++ b/Minecraft.World/HellFlatLevelSource.cpp @@ -114,7 +114,7 @@ LevelChunk *HellFlatLevelSource::getChunk(int xOffs, int zOffs) // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int chunksSize = Level::genDepth * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(chunksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(chunksSize)); XMemSet128(tileData,0,chunksSize); byteArray blocks = byteArray(tileData,chunksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -130,7 +130,7 @@ LevelChunk *HellFlatLevelSource::getChunk(int xOffs, int zOffs) // 4J - this now creates compressed block data from the blocks array passed in, so needs to be after data is finalised. // Also now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); - XPhysicalFree(tileData); + free(tileData); return levelChunk; } diff --git a/Minecraft.World/HellRandomLevelSource.cpp b/Minecraft.World/HellRandomLevelSource.cpp index c395c087..8bfdbf48 100644 --- a/Minecraft.World/HellRandomLevelSource.cpp +++ b/Minecraft.World/HellRandomLevelSource.cpp @@ -272,7 +272,7 @@ LevelChunk *HellRandomLevelSource::getChunk(int xOffs, int zOffs) // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int blocksSize = Level::genDepth * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(blocksSize)); XMemSet128(tileData,0,blocksSize); byteArray blocks = byteArray(tileData,blocksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -287,7 +287,7 @@ LevelChunk *HellRandomLevelSource::getChunk(int xOffs, int zOffs) // Also now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); levelChunk->setCheckAllLight(); - XPhysicalFree(tileData); + free(tileData); return levelChunk; } diff --git a/Minecraft.World/LevelChunk.cpp b/Minecraft.World/LevelChunk.cpp index 4e3a4164..04a9b21d 100644 --- a/Minecraft.World/LevelChunk.cpp +++ b/Minecraft.World/LevelChunk.cpp @@ -299,16 +299,6 @@ void LevelChunk::stopSharingTilesAndData() upperData = nullptr; } - /* - newDataLayer = new DataLayer(skyLight->data.length*2, level->depthBits); - XMemCpy(newDataLayer->data.data, skyLight->data.data, skyLight->data.length); - skyLight = newDataLayer; - - newDataLayer = new DataLayer(blockLight->data.length*2, level->depthBits); - XMemCpy(newDataLayer->data.data, blockLight->data.data, blockLight->data.length); - blockLight = newDataLayer; - */ - sharingTilesAndData = false; MemSect(0); LeaveCriticalSection(&m_csSharing); diff --git a/Minecraft.World/RandomLevelSource.cpp b/Minecraft.World/RandomLevelSource.cpp index aae2b701..b0656dec 100644 --- a/Minecraft.World/RandomLevelSource.cpp +++ b/Minecraft.World/RandomLevelSource.cpp @@ -468,7 +468,7 @@ LevelChunk *RandomLevelSource::getChunk(int xOffs, int zOffs) // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int blocksSize = Level::genDepth * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(blocksSize)); XMemSet128(tileData,0,blocksSize); byteArray blocks = byteArray(tileData,blocksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -507,7 +507,7 @@ LevelChunk *RandomLevelSource::getChunk(int xOffs, int zOffs) // 4J - this now creates compressed block data from the blocks array passed in, so moved it until after the blocks are actually finalised. We also // now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); - XPhysicalFree(tileData); + free(tileData); return levelChunk; } diff --git a/Minecraft.World/Region.cpp b/Minecraft.World/Region.cpp index 183ddd1c..ef375037 100644 --- a/Minecraft.World/Region.cpp +++ b/Minecraft.World/Region.cpp @@ -85,6 +85,7 @@ int Region::getTile(int x, int y, int z) int xc = (x >> 4); int zc = (z >> 4); +/* #ifdef __PSVITA__ // AP - added a caching system for Chunk::rebuild to take advantage of if( CachedTiles && xc == xcCached && zc == zcCached ) @@ -99,6 +100,7 @@ int Region::getTile(int x, int y, int z) return Tiles[ ( (x & 15) << 11 ) | ( (z & 15) << 7 ) ]; } #endif +*/ xc -= xc1; zc -= zc1; @@ -114,6 +116,7 @@ int Region::getTile(int x, int y, int z) return lc->getTile(x & 15, y, z & 15); } +/* // AP - added a caching system for Chunk::rebuild to take advantage of void Region::setCachedTiles(unsigned char *tiles, int xc, int zc) { @@ -126,6 +129,7 @@ void Region::setCachedTiles(unsigned char *tiles, int xc, int zc) } std::copy(tiles, tiles + size, CachedTiles.get()); } +*/ LevelChunk* Region::getLevelChunk(int x, int y, int z) { diff --git a/Minecraft.World/Region.h b/Minecraft.World/Region.h index dc7ec92f..7e16b5ae 100644 --- a/Minecraft.World/Region.h +++ b/Minecraft.World/Region.h @@ -59,5 +59,5 @@ public: LevelChunk* getLevelChunk(int x, int y, int z); // AP - added a caching system for Chunk::rebuild to take advantage of - void setCachedTiles(unsigned char *tiles, int xc, int zc); +// void setCachedTiles(unsigned char *tiles, int xc, int zc); }; \ No newline at end of file diff --git a/Minecraft.World/SparseDataStorage.cpp b/Minecraft.World/SparseDataStorage.cpp index 4c9a276a..bf575ded 100644 --- a/Minecraft.World/SparseDataStorage.cpp +++ b/Minecraft.World/SparseDataStorage.cpp @@ -35,7 +35,7 @@ SparseDataStorage::SparseDataStorage() { planeIndices[i] = i - 1; } - XMemSet(data, 0, 128 * 127); + memset(data, 0, 128 * 127); // Data and count packs together the pointer to our data and the count of planes allocated - 127 planes allocated in this case #pragma warning ( disable : 4826 ) @@ -99,7 +99,7 @@ SparseDataStorage::SparseDataStorage(SparseDataStorage *copyFrom) dataAndCount = ( sourceDataAndCount & 0xffff000000000000L ) | ( ((int64_t) destIndicesAndData ) & 0x0000ffffffffffffL ); #pragma warning ( default : 4826 ) - XMemCpy( destIndicesAndData, sourceIndicesAndData, sourceCount * 128 + 128 ); + memcpy( destIndicesAndData, sourceIndicesAndData, sourceCount * 128 + 128 ); #ifdef DATA_COMPRESSION_STATS count = sourceCount; @@ -147,7 +147,7 @@ void SparseDataStorage::setData(byteArray dataIn, unsigned int inOffset) // Allocate required storage unsigned char *planeIndices = static_cast(malloc(128 * allocatedPlaneCount + 128)); unsigned char *data = planeIndices + 128; - XMemCpy(planeIndices, _planeIndices, 128); + memcpy(planeIndices, _planeIndices, 128); // Second pass through to actually copy the data in to the storage allocated for the required planes unsigned char *pucOut = data; @@ -185,7 +185,7 @@ void SparseDataStorage::setData(byteArray dataIn, unsigned int inOffset) // Gets all data values into an array of length 16384. Destination data will have same order as original java game. void SparseDataStorage::getData(byteArray retArray, unsigned int retOffset) { - XMemSet(retArray.data + + retOffset, 0, 16384); + memset(retArray.data + + retOffset, 0, 16384); unsigned char *planeIndices, *data; getPlaneIndicesAndData(&planeIndices, &data); @@ -394,8 +394,8 @@ void SparseDataStorage::addNewPlane(int y) // Allocate new memory storage, copy over anything from old storage, and initialise remainder auto dataPointer = static_cast(malloc(linesUsed * 128 + 128)); - XMemCpy( dataPointer, lastDataPointer, 128 * lastLinesUsed + 128); - XMemSet( dataPointer + ( 128 * lastLinesUsed ) + 128, 0, 128 ); + memcpy( dataPointer, lastDataPointer, 128 * lastLinesUsed + 128); + memset( dataPointer + ( 128 * lastLinesUsed ) + 128, 0, 128 ); dataPointer[y] = lastLinesUsed; // Get new data and count packed info @@ -544,13 +544,13 @@ int SparseDataStorage::compress() { unsigned char *newIndicesAndData = static_cast(malloc(128 + 128 * planesToAlloc)); unsigned char *pucData = newIndicesAndData + 128; - XMemCpy( newIndicesAndData, _planeIndices, 128 ); + memcpy( newIndicesAndData, _planeIndices, 128 ); for( int i = 0; i < 128; i++ ) { if( newIndicesAndData[i] < ALL_0_INDEX ) { - XMemCpy( pucData, &data[ 128 * planeIndices[i] ], 128 ); + memcpy( pucData, &data[ 128 * planeIndices[i] ], 128 ); pucData += 128; } } diff --git a/Minecraft.World/SparseLightStorage.cpp b/Minecraft.World/SparseLightStorage.cpp index e1829686..eff0a8ae 100644 --- a/Minecraft.World/SparseLightStorage.cpp +++ b/Minecraft.World/SparseLightStorage.cpp @@ -35,7 +35,7 @@ SparseLightStorage::SparseLightStorage(bool sky) { planeIndices[i] = i; } - XMemSet(data, 0, 128 * 127); + memset(data, 0, 128 * 127); // Data and count packs together the pointer to our data and the count of planes allocated - 127 planes allocated in this case #pragma warning ( disable : 4826 ) @@ -99,7 +99,7 @@ SparseLightStorage::SparseLightStorage(SparseLightStorage *copyFrom) dataAndCount = ( sourceDataAndCount & 0xffff000000000000L ) | ( ((int64_t) destIndicesAndData ) & 0x0000ffffffffffffL ); #pragma warning ( default : 4826 ) - XMemCpy( destIndicesAndData, sourceIndicesAndData, sourceCount * 128 + 128 ); + memcpy( destIndicesAndData, sourceIndicesAndData, sourceCount * 128 + 128 ); #ifdef LIGHT_COMPRESSION_STATS count = sourceCount; @@ -151,7 +151,7 @@ void SparseLightStorage::setData(byteArray dataIn, unsigned int inOffset) // Allocate required storage unsigned char *planeIndices = static_cast(malloc(128 * allocatedPlaneCount + 128)); unsigned char *data = planeIndices + 128; - XMemCpy(planeIndices, _planeIndices, 128); + memcpy(planeIndices, _planeIndices, 128); // Second pass through to actually copy the data in to the storage allocated for the required planes unsigned char *pucOut = data; @@ -189,7 +189,7 @@ void SparseLightStorage::setData(byteArray dataIn, unsigned int inOffset) // Gets all lighting values into an array of length 16384. Destination data will have same order as original java game. void SparseLightStorage::getData(byteArray retArray, unsigned int retOffset) { - XMemSet(retArray.data + retOffset, 0, 16384); + memset(retArray.data + retOffset, 0, 16384); unsigned char *planeIndices, *data; getPlaneIndicesAndData(&planeIndices, &data); @@ -400,8 +400,8 @@ void SparseLightStorage::addNewPlane(int y) // Allocate new memory storage, copy over anything from old storage, and initialise remainder unsigned char *dataPointer = static_cast(malloc(linesUsed * 128 + 128)); - XMemCpy( dataPointer, lastDataPointer, 128 * lastLinesUsed + 128); - XMemSet( dataPointer + ( 128 * lastLinesUsed ) + 128, prefill, 128 ); + memcpy( dataPointer, lastDataPointer, 128 * lastLinesUsed + 128); + memset( dataPointer + ( 128 * lastLinesUsed ) + 128, prefill, 128 ); dataPointer[y] = lastLinesUsed; // Get new data and count packed info @@ -561,13 +561,13 @@ int SparseLightStorage::compress() { unsigned char *newIndicesAndData = static_cast(malloc(128 + 128 * planesToAlloc)); unsigned char *pucData = newIndicesAndData + 128; - XMemCpy( newIndicesAndData, _planeIndices, 128 ); + memcpy( newIndicesAndData, _planeIndices, 128 ); for( int i = 0; i < 128; i++ ) { if( newIndicesAndData[i] < ALL_0_INDEX ) { - XMemCpy( pucData, &data[ 128 * planeIndices[i] ], 128 ); + memcpy( pucData, &data[ 128 * planeIndices[i] ], 128 ); pucData += 128; } } diff --git a/Minecraft.World/TheEndLevelRandomLevelSource.cpp b/Minecraft.World/TheEndLevelRandomLevelSource.cpp index 237ce710..a3ddd869 100644 --- a/Minecraft.World/TheEndLevelRandomLevelSource.cpp +++ b/Minecraft.World/TheEndLevelRandomLevelSource.cpp @@ -168,7 +168,7 @@ LevelChunk *TheEndLevelRandomLevelSource::getChunk(int xOffs, int zOffs) BiomeArray biomes; // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed unsigned int blocksSize = Level::genDepth * 16 * 16; - BYTE *tileData = static_cast(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE)); + BYTE *tileData = static_cast(malloc(blocksSize)); XMemSet128(tileData,0,blocksSize); byteArray blocks = byteArray(tileData,blocksSize); // byteArray blocks = byteArray(16 * level->depth * 16); @@ -182,7 +182,7 @@ LevelChunk *TheEndLevelRandomLevelSource::getChunk(int xOffs, int zOffs) // 4J - this now creates compressed block data from the blocks array passed in, so moved it until after the blocks are actually finalised. We also // now need to free the passed in blocks as the LevelChunk doesn't use the passed in allocation anymore. LevelChunk *levelChunk = new LevelChunk(level, blocks, xOffs, zOffs); - XPhysicalFree(tileData); + free(tileData); levelChunk->recalcHeightmap(); diff --git a/Minecraft.World/x64headers/extraX64.h b/Minecraft.World/x64headers/extraX64.h index b8535552..0d6e7abb 100644 --- a/Minecraft.World/x64headers/extraX64.h +++ b/Minecraft.World/x64headers/extraX64.h @@ -125,11 +125,7 @@ private: CRITICAL_SECTION m_cs; }; -void XMemCpy(void *a, const void *b, size_t s); -void XMemSet(void *a, int t, size_t s); void XMemSet128(void *a, int t, size_t s); -void *XPhysicalAlloc(SIZE_T a, ULONG_PTR b, ULONG_PTR c, DWORD d); -void XPhysicalFree(void *a); class DLCManager; @@ -637,17 +633,8 @@ DWORD XGetLocale(); DWORD XEnableGuestSignin(BOOL fEnable); #endif -class D3DXVECTOR3 -{ -public: - D3DXVECTOR3(); - D3DXVECTOR3(float,float,float); - float x,y,z,pad; - D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& add ); -}; - #define QNET_E_SESSION_FULL 0 #define QNET_USER_MASK_USER0 1 #define QNET_USER_MASK_USER1 2 #define QNET_USER_MASK_USER2 4 -#define QNET_USER_MASK_USER3 8 +#define QNET_USER_MASK_USER3 8 \ No newline at end of file