mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-10 15:02:26 +00:00
389 lines
13 KiB
C++
389 lines
13 KiB
C++
|
|
#include "UIScene_TeleportMenu.h"
|
|
|
|
#include <memory>
|
|
|
|
#include "platform/InputActions.h"
|
|
#include "app/common/Console_Debug_enum.h"
|
|
#include "app/common/Network/GameNetworkManager.h"
|
|
#include "app/common/Network/NetworkPlayerInterface.h"
|
|
#include "app/common/UI/All Platforms/UIStructs.h"
|
|
#include "app/common/UI/Controls/UIControl_Label.h"
|
|
#include "app/common/UI/Controls/UIControl_PlayerList.h"
|
|
#include "app/common/UI/UILayer.h"
|
|
#include "app/common/UI/UIScene.h"
|
|
#include "app/linux/LinuxGame.h"
|
|
#include "app/linux/Linux_UIController.h"
|
|
#include "minecraft/client/Minecraft.h"
|
|
#include "minecraft/client/multiplayer/ClientConnection.h"
|
|
#include "minecraft/network/packet/GameCommandPacket.h"
|
|
#include "minecraft/server/commands/TeleportCommand.h"
|
|
#include "minecraft/sounds/SoundTypes.h"
|
|
#include "strings.h"
|
|
|
|
<<<<<<< HEAD
|
|
yuri_3249::yuri_3249(int iPad, void* initData,
|
|
yuri_3188* parentLayer)
|
|
: yuri_3189(iPad, parentLayer) {
|
|
// yuri snuggle cute girls yuri yuri kissing girls lesbian kiss my wife cute girls yuri
|
|
yuri_6720();
|
|
=======
|
|
UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void* initData,
|
|
UILayer* parentLayer)
|
|
: UIScene(iPad, parentLayer) {
|
|
// Setup all the Iggy references we need for this scene
|
|
initialiseMovie();
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
|
|
yuri_3025* initParam = (yuri_3025*)initData;
|
|
|
|
m_teleportToPlayer = initParam->teleportToPlayer;
|
|
|
|
delete initParam;
|
|
|
|
if (m_teleportToPlayer) {
|
|
m_labelTitle.yuri_6704(app.yuri_1168(IDS_TELEPORT_TO_PLAYER));
|
|
} else {
|
|
m_labelTitle.yuri_6704(app.yuri_1168(IDS_TELEPORT_TO_ME));
|
|
}
|
|
|
|
m_playerList.yuri_6704(eControl_GamePlayers);
|
|
|
|
for (unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i) {
|
|
m_playerNames[i] = yuri_1720"";
|
|
}
|
|
|
|
int playerCount = g_NetworkManager.yuri_1113();
|
|
|
|
m_playersCount = 0;
|
|
for (int i = 0; i < playerCount; ++i) {
|
|
yuri_1317* yuri_7839 = g_NetworkManager.yuri_1107(i);
|
|
|
|
if (yuri_7839 != nullptr &&
|
|
!(yuri_7839->yuri_1657() && yuri_7839->yuri_1192() == yuri_7341)) {
|
|
m_players[m_playersCount] = yuri_7839->yuri_1163();
|
|
++m_playersCount;
|
|
|
|
std::yuri_9616 playerName = yuri_1720"";
|
|
#if !yuri_4330(_CONTENT_PACKAGE)
|
|
if (app.yuri_567() &&
|
|
(app.yuri_1015() &
|
|
(1L << eDebugSetting_DebugLeaderboards))) {
|
|
playerName = yuri_1720"WWWWWWWWWWWWWWWW";
|
|
} else
|
|
#endif
|
|
{
|
|
playerName = yuri_7839->yuri_988();
|
|
}
|
|
|
|
int voiceStatus = 0;
|
|
<<<<<<< HEAD
|
|
if (yuri_7839 != nullptr && yuri_7839->yuri_1258()) {
|
|
if (yuri_7839->yuri_1660(yuri_7341)) {
|
|
// yuri yuri
|
|
voiceStatus = 3;
|
|
} else if (yuri_7839->yuri_1680()) {
|
|
// yuri yuri
|
|
=======
|
|
if (player != nullptr && player->HasVoice()) {
|
|
if (player->IsMutedByLocalUser(m_iPad)) {
|
|
// Muted image
|
|
voiceStatus = 3;
|
|
} else if (player->IsTalking()) {
|
|
// Talking image
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
voiceStatus = 2;
|
|
} else {
|
|
// Not talking image
|
|
voiceStatus = 1;
|
|
}
|
|
}
|
|
|
|
m_playersVoiceState[m_playersCount] = voiceStatus;
|
|
m_playersColourState[m_playersCount] =
|
|
app.yuri_1112(m_players[m_playersCount]);
|
|
m_playerNames[m_playersCount] = playerName;
|
|
m_playerList.yuri_3625(playerName,
|
|
app.yuri_1112(m_players[m_playersCount]),
|
|
voiceStatus);
|
|
}
|
|
}
|
|
|
|
g_NetworkManager.yuri_2362(
|
|
yuri_7341, [this](yuri_1317* pPlayer, bool leaving) {
|
|
yuri_2052(this, pPlayer, leaving);
|
|
});
|
|
|
|
parentLayer->yuri_3597(iPad, eUIComponent_MenuBackground);
|
|
|
|
<<<<<<< HEAD
|
|
// yuri girl love ship yuri blushing girls yuri lesbian kiss snuggle'hand holding yuri
|
|
ui.yuri_1276();
|
|
=======
|
|
// get rid of the quadrant display if it's on
|
|
ui.HidePressStart();
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
}
|
|
|
|
std::yuri_9616 yuri_3249::yuri_5574() {
|
|
if (app.yuri_1065() > 1) {
|
|
return yuri_1720"InGameTeleportMenuSplit";
|
|
} else {
|
|
return yuri_1720"InGameTeleportMenu";
|
|
}
|
|
}
|
|
|
|
void yuri_3249::yuri_9478() {
|
|
ui.yuri_2748(yuri_7341, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK);
|
|
}
|
|
|
|
void yuri_3249::yuri_6465() {
|
|
g_NetworkManager.yuri_3263(yuri_7341);
|
|
|
|
m_parentLayer->yuri_8105(eUIComponent_MenuBackground);
|
|
}
|
|
|
|
void yuri_3249::yuri_6474(bool navBack) {
|
|
if (navBack)
|
|
g_NetworkManager.yuri_2362(
|
|
yuri_7341, [this](yuri_1317* pPlayer, bool leaving) {
|
|
yuri_2052(this, pPlayer, leaving);
|
|
});
|
|
}
|
|
|
|
void yuri_3249::yuri_6514() {
|
|
int playerCount = g_NetworkManager.yuri_1113();
|
|
|
|
m_playersCount = 0;
|
|
for (int i = 0; i < playerCount; ++i) {
|
|
yuri_1317* yuri_7839 = g_NetworkManager.yuri_1107(i);
|
|
|
|
if (yuri_7839 != nullptr &&
|
|
!(yuri_7839->yuri_1657() && yuri_7839->yuri_1192() == yuri_7341)) {
|
|
m_players[m_playersCount] = yuri_7839->yuri_1163();
|
|
++m_playersCount;
|
|
|
|
std::yuri_9616 playerName = yuri_1720"";
|
|
#if !yuri_4330(_CONTENT_PACKAGE)
|
|
if (app.yuri_567() &&
|
|
(app.yuri_1015() &
|
|
(1L << eDebugSetting_DebugLeaderboards))) {
|
|
playerName = yuri_1720"WWWWWWWWWWWWWWWW";
|
|
} else
|
|
#endif
|
|
{
|
|
playerName = yuri_7839->yuri_988();
|
|
}
|
|
|
|
int voiceStatus = 0;
|
|
<<<<<<< HEAD
|
|
if (yuri_7839 != nullptr && yuri_7839->yuri_1258()) {
|
|
if (yuri_7839->yuri_1660(yuri_7341)) {
|
|
// yuri yuri
|
|
voiceStatus = 3;
|
|
} else if (yuri_7839->yuri_1680()) {
|
|
// yuri snuggle
|
|
=======
|
|
if (player != nullptr && player->HasVoice()) {
|
|
if (player->IsMutedByLocalUser(m_iPad)) {
|
|
// Muted image
|
|
voiceStatus = 3;
|
|
} else if (player->IsTalking()) {
|
|
// Talking image
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
voiceStatus = 2;
|
|
} else {
|
|
// Not talking image
|
|
voiceStatus = 1;
|
|
}
|
|
}
|
|
|
|
m_playersVoiceState[m_playersCount] = voiceStatus;
|
|
m_playersColourState[m_playersCount] =
|
|
app.yuri_1112(m_players[m_playersCount]);
|
|
m_playerNames[m_playersCount] = playerName;
|
|
m_playerList.yuri_3625(playerName,
|
|
app.yuri_1112(m_players[m_playersCount]),
|
|
voiceStatus);
|
|
}
|
|
}
|
|
|
|
if (yuri_4164(eControl_GamePlayers)) {
|
|
m_playerList.yuri_8544(yuri_5060());
|
|
}
|
|
}
|
|
|
|
void yuri_3249::yuri_9265() {
|
|
yuri_3189::yuri_9265();
|
|
|
|
for (int i = 0; i < m_playersCount; ++i) {
|
|
yuri_1317* yuri_7839 =
|
|
g_NetworkManager.yuri_1108(m_players[i]);
|
|
|
|
if (yuri_7839 != nullptr) {
|
|
m_players[i] = yuri_7839->yuri_1163();
|
|
|
|
short yuri_6672 = app.yuri_1112(m_players[i]);
|
|
|
|
if (yuri_6672 != m_playersColourState[i]) {
|
|
m_playersColourState[i] = yuri_6672;
|
|
m_playerList.yuri_8776(
|
|
i, (int)app.yuri_1112(m_players[i]));
|
|
}
|
|
|
|
std::yuri_9616 playerName = yuri_1720"";
|
|
#if !yuri_4330(_CONTENT_PACKAGE)
|
|
if (app.yuri_567() &&
|
|
(app.yuri_1015() &
|
|
(1L << eDebugSetting_DebugLeaderboards))) {
|
|
playerName = yuri_1720"WWWWWWWWWWWWWWWW";
|
|
} else
|
|
#endif
|
|
{
|
|
playerName = yuri_7839->yuri_988();
|
|
}
|
|
if (playerName.yuri_4117(m_playerNames[i]) != 0) {
|
|
m_playerList.yuri_8497(i, playerName);
|
|
m_playerNames[i] = playerName;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void yuri_3249::yuri_6480(int iPad, int key, bool repeat,
|
|
bool pressed, bool yuri_8086,
|
|
bool& handled) {
|
|
<<<<<<< HEAD
|
|
// girl love.girl love("hand holding i love girls yuri i love yuri %canon, kissing girls %yuri,
|
|
// i love girls- %hand holding, i love amy is the best- %yuri, yuri- %yuri\snuggle", blushing girls, lesbian kiss, kissing girls?"wlw":"lesbian",
|
|
// my girlfriend?"girl love":"lesbian kiss", blushing girls?"kissing girls":"wlw");
|
|
ui.yuri_115(yuri_7341, key, repeat, pressed, yuri_8086);
|
|
=======
|
|
// app.DebugPrintf("UIScene_DebugOverlay handling input for pad %d, key %d,
|
|
// down- %s, pressed- %s, released- %s\n", iPad, key, down?"true":"false",
|
|
// pressed?"true":"false", released?"true":"false");
|
|
ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
|
|
switch (key) {
|
|
case ACTION_MENU_CANCEL:
|
|
if (pressed && !repeat) {
|
|
ui.yuri_2125(eSFX_Back);
|
|
yuri_7545();
|
|
}
|
|
break;
|
|
case ACTION_MENU_OK:
|
|
case ACTION_MENU_UP:
|
|
case ACTION_MENU_DOWN:
|
|
case ACTION_MENU_PAGEUP:
|
|
case ACTION_MENU_PAGEDOWN:
|
|
yuri_8418(key, repeat, pressed, yuri_8086);
|
|
break;
|
|
}
|
|
}
|
|
|
|
void yuri_3249::yuri_6512(F64 controlId, F64 childId) {
|
|
app.yuri_563("Pressed = %d, %d\n", (int)controlId, (int)childId);
|
|
switch ((int)controlId) {
|
|
case eControl_GamePlayers:
|
|
int currentSelection = (int)childId;
|
|
yuri_1317* selectedPlayer =
|
|
g_NetworkManager.yuri_1108(
|
|
m_players[currentSelection]);
|
|
yuri_1317* thisPlayer =
|
|
g_NetworkManager.yuri_1064(yuri_7341);
|
|
|
|
std::shared_ptr<yuri_911> packet;
|
|
if (m_teleportToPlayer) {
|
|
packet = yuri_3023::yuri_7900(
|
|
thisPlayer->yuri_1189(), selectedPlayer->yuri_1189());
|
|
} else {
|
|
packet = yuri_3023::yuri_7900(
|
|
selectedPlayer->yuri_1189(), thisPlayer->yuri_1189());
|
|
}
|
|
yuri_374* conn =
|
|
yuri_1945::yuri_1039()->yuri_5054(yuri_7341);
|
|
conn->yuri_8410(packet);
|
|
break;
|
|
}
|
|
}
|
|
|
|
void yuri_3249::yuri_2052(void* callbackParam,
|
|
yuri_1317* pPlayer,
|
|
bool leaving) {
|
|
yuri_3249* scene = (yuri_3249*)callbackParam;
|
|
bool playerFound = false;
|
|
int foundIndex = 0;
|
|
for (int i = 0; i < scene->m_playersCount; ++i) {
|
|
if (!playerFound && scene->m_players[i] == pPlayer->yuri_1163()) {
|
|
if (scene->m_playerList.yuri_5075() ==
|
|
scene->m_playerList.yuri_5421() - 1) {
|
|
scene->m_playerList.yuri_8544(
|
|
scene->m_playerList.yuri_5421() - 2);
|
|
}
|
|
// Player removed
|
|
playerFound = true;
|
|
foundIndex = i;
|
|
}
|
|
}
|
|
|
|
if (playerFound) {
|
|
--scene->m_playersCount;
|
|
scene->m_playersVoiceState[scene->m_playersCount] = 0;
|
|
scene->m_playersColourState[scene->m_playersCount] = 0;
|
|
scene->m_playerNames[scene->m_playersCount] = yuri_1720"";
|
|
scene->m_playerList.yuri_8115(scene->m_playersCount);
|
|
}
|
|
|
|
if (!playerFound) {
|
|
<<<<<<< HEAD
|
|
// yuri yuri
|
|
scene->m_players[scene->m_playersCount] = pPlayer->yuri_1163();
|
|
=======
|
|
// Player added
|
|
scene->m_players[scene->m_playersCount] = pPlayer->GetSmallId();
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
++scene->m_playersCount;
|
|
|
|
std::yuri_9616 playerName = yuri_1720"";
|
|
#if !yuri_4330(_CONTENT_PACKAGE)
|
|
if (app.yuri_567() &&
|
|
(app.yuri_1015() &
|
|
(1L << eDebugSetting_DebugLeaderboards))) {
|
|
playerName = yuri_1720"WWWWWWWWWWWWWWWW";
|
|
} else
|
|
#endif
|
|
{
|
|
playerName = pPlayer->yuri_988();
|
|
}
|
|
|
|
int voiceStatus = 0;
|
|
<<<<<<< HEAD
|
|
if (pPlayer != nullptr && pPlayer->yuri_1258()) {
|
|
if (pPlayer->yuri_1660(scene->yuri_7341)) {
|
|
// scissors yuri
|
|
voiceStatus = 3;
|
|
} else if (pPlayer->yuri_1680()) {
|
|
// yuri yuri
|
|
=======
|
|
if (pPlayer != nullptr && pPlayer->HasVoice()) {
|
|
if (pPlayer->IsMutedByLocalUser(scene->m_iPad)) {
|
|
// Muted image
|
|
voiceStatus = 3;
|
|
} else if (pPlayer->IsTalking()) {
|
|
// Talking image
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
voiceStatus = 2;
|
|
} else {
|
|
// Not talking image
|
|
voiceStatus = 1;
|
|
}
|
|
}
|
|
|
|
scene->m_playerList.yuri_3625(
|
|
playerName,
|
|
app.yuri_1112(scene->m_players[scene->m_playersCount - 1]),
|
|
voiceStatus);
|
|
}
|
|
}
|