mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
new blob
This commit is contained in:
parent
cc65f7ee29
commit
faa4a989ce
|
|
@ -809,7 +809,8 @@ enum EControllerActions
|
||||||
|
|
||||||
ACTION_MENU_OK,
|
ACTION_MENU_OK,
|
||||||
ACTION_MENU_CANCEL,
|
ACTION_MENU_CANCEL,
|
||||||
ACTION_MAX_MENU = ACTION_MENU_CANCEL,
|
// 4jcraft added, off by one
|
||||||
|
ACTION_MAX_MENU = ACTION_MENU_CANCEL + 1,
|
||||||
|
|
||||||
MINECRAFT_ACTION_JUMP,
|
MINECRAFT_ACTION_JUMP,
|
||||||
MINECRAFT_ACTION_FORWARD,
|
MINECRAFT_ACTION_FORWARD,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ UIComponent_TutorialPopup::UIComponent_TutorialPopup(int iPad, void *initData, U
|
||||||
m_bSplitscreenGamertagVisible = false;
|
m_bSplitscreenGamertagVisible = false;
|
||||||
|
|
||||||
m_labelDescription.init(L"");
|
m_labelDescription.init(L"");
|
||||||
|
|
||||||
|
// 4jcraft added
|
||||||
|
m_tutorial = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring UIComponent_TutorialPopup::getMoviePath()
|
std::wstring UIComponent_TutorialPopup::getMoviePath()
|
||||||
|
|
@ -69,6 +72,9 @@ void UIComponent_TutorialPopup::SetTutorialDescription(TutorialPopupInfo *info)
|
||||||
{
|
{
|
||||||
m_interactScene = info->interactScene;
|
m_interactScene = info->interactScene;
|
||||||
|
|
||||||
|
// 4jcraft added
|
||||||
|
m_tutorial = info->tutorial;
|
||||||
|
|
||||||
std::wstring parsed = _SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc);
|
std::wstring parsed = _SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc);
|
||||||
parsed = _SetImage( parsed );
|
parsed = _SetImage( parsed );
|
||||||
parsed = ParseDescription(m_iPad, parsed);
|
parsed = ParseDescription(m_iPad, parsed);
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,9 @@ void MinecartRenderer::render(std::shared_ptr<Entity> _cart, double x, double y,
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
||||||
__int64 seed = cart->entityId * 493286711l;
|
// 4jcraft added a bunch of casts to prever overflow
|
||||||
seed = seed * seed * 4392167121l + seed * 98761;
|
int64_t seed = (int64_t)((uint64_t)cart->entityId * 493286711ULL);
|
||||||
|
seed = (int64_t)(((uint64_t)seed * (uint64_t)seed * 4392167121ULL) + ((uint64_t)seed * 98761ULL));
|
||||||
|
|
||||||
float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
|
float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
|
||||||
float yo = ((((seed >> 20) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
|
float yo = ((((seed >> 20) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
|
||||||
|
|
|
||||||
|
|
@ -3822,9 +3822,9 @@ bool TileRenderer::tesselateLilypadInWorld(Tile *tt, int x, int y, int z)
|
||||||
float u1 = tex->getU1(true);
|
float u1 = tex->getU1(true);
|
||||||
float v1 = tex->getV1(true);
|
float v1 = tex->getV1(true);
|
||||||
|
|
||||||
__int64 seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
|
// 4jcraft add a bunch of casts to prevent overflow (i pray to god)
|
||||||
seed = seed * seed * 42317861 + seed * 11;
|
int64_t seed = ((int64_t)x * 3129871) ^ ((int64_t)z * 116129781L) ^ ((int64_t)y);
|
||||||
|
seed = (int64_t)(((uint64_t)seed * (uint64_t)seed * 42317861ULL) + ((uint64_t)seed * 11ULL));
|
||||||
int dir = (int) ((seed >> 16) & 0x3);
|
int dir = (int) ((seed >> 16) & 0x3);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,8 @@ void Font::draw(const std::wstring& str, int x, int y, int color, bool dropShado
|
||||||
// if not set
|
// if not set
|
||||||
|
|
||||||
if (dropShadow) // divide RGB by 4, preserve alpha
|
if (dropShadow) // divide RGB by 4, preserve alpha
|
||||||
color = (color & 0xfcfcfc) >> 2 | (color & (-1 << 24));
|
// 4jcraft changed -1 << 24 to the value of 1 (0xFF FF FF FF)
|
||||||
|
color = (color & 0xfcfcfc) >> 2 | (color & (0xFFFFFFFF << 24));
|
||||||
|
|
||||||
glColor4f((color >> 16 & 255) / 255.0F, (color >> 8 & 255) / 255.0F, (color & 255) / 255.0F, (color >> 24 & 255) / 255.0F);
|
glColor4f((color >> 16 & 255) / 255.0F, (color >> 8 & 255) / 255.0F, (color & 255) / 255.0F, (color >> 24 & 255) / 255.0F);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3228,7 +3228,7 @@ void Level::tickClientSideTiles(int xo, int zo, LevelChunk *lc)
|
||||||
|
|
||||||
if (delayUntilNextMoodSound == 0)
|
if (delayUntilNextMoodSound == 0)
|
||||||
{
|
{
|
||||||
randValue = randValue * 3 + addend;
|
randValue = (unsigned) randValue * 3 + (unsigned) addend;
|
||||||
int val = (randValue >> 2);
|
int val = (randValue >> 2);
|
||||||
int x = (val & 15);
|
int x = (val & 15);
|
||||||
int z = ((val >> 8) & 15);
|
int z = ((val >> 8) & 15);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue