void Interface::Load()
{
this->BindObject(eSAMPLEBUTTON, 0x7AA4, 16, 15, 175, 1);
// ----
this->BindObject(eRANK_MAIN, 0x7A5A, 222, 303, -1, -1);
this->BindObject(eRANK_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eRANK_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eRANK_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eRANK_BUTTON, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eRANK_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eRANK_TAB1, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eRANK_TAB2, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eRANK_TAB3, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eRANK_TAB4, 0x7AAE, 72, 22, -1, -1);
this->BindObject(eCAMERA_MAIN, 0x787A, 54, 18, 174, 0);
this->BindObject(eCAMERA_BUTTON1, 0x787B, 16, 12, 175.5, 1);
this->BindObject(eCAMERA_BUTTON2, 0x787C, 16, 12, 192.5, 1);
this->BindObject(eCRAFT_MAIN, 0x7A5A, 222, 303, -1, -1);
this->BindObject(eCRAFT_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eCRAFT_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eCRAFT_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eCRAFT_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eCRAFT_TAB1, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eCRAFT_TAB2, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eCRAFT_TAB3, 0x7AAD, 48, 22, -1, -1);
this->BindObject(eCRAFT_TAB4, 0x7AAE, 72, 22, -1, -1);
this->BindObject(eCRAFT_CLOSE, 0x7EC5, 36, 29, -1, -1);
this->BindObject(eCRAFT_INFOBG, 0x7AA3, 170, 21, -1, -1);
this->BindObject(eCRAFT_MONEYBG, 0x7A89, 170, 26, -1, -1);
this->BindObject(eCRAFT_FINISH, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eRESET_MAIN, 0x7A5A, 222, 303, -1, -1);
this->BindObject(eRESET_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eRESET_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eRESET_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eRESET_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eRESET_CLOSE, 0x7EC5, 36, 29, -1, -1);
this->BindObject(eRESET_INFOBG, 0x7AA3, 170, 21, -1, -1);
this->BindObject(eRESET_MONEYBG, 0x7A89, 170, 26, -1, -1);
this->BindObject(eRESET_FINISH, 0x7A5E, 128, 29, -1, -1);
this->BindObject(eNEWS_MAIN, 0x7A5A, 222, 303, -1, -1);
this->BindObject(eNEWS_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eNEWS_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eNEWS_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eNEWS_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eNEWS_INFOBG, 0x787D, 170, 21, -1, -1);
this->BindObject(eNEWS_CLOSE, 0x7EC5, 36, 29, -1, -1);
this->BindObject(eNEWS_BACK, 0x7A5E, 128, 29, -1, -1);
// ----
[COLOR=#ff0000]this->BindObject(eMINI_MAP_BG, 0x7882, 138, 265, -1, -1);[/COLOR]
[COLOR=#ff0000] this->BindObject(ePLAYER_POINT, 0x7883, 3, 3, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eNULL_MAP, 0x7884, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eLORENCIA_MAP, 0x7885, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eDUNGEON_MAP, 0x7886, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eDEVIAS_MAP, 0x7887, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eNORIA_MAP, 0x7888, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eLOSTTOWER_MAP, 0x7889, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] // Reserved 0x788A for EXILE[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eSTADIUM_MAP, 0x788B, 128, 128, -1, -1);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] this->BindObject(eATLANS_MAP, 0x788C, 128, 128, -1, -1);[/COLOR]
// ----
#ifdef __MAKELO__
this->BindObject(eOFFEXP_SWITCH, 32513, 57, 23, MAX_WIN_WIDTH-57, 0);
#endif
#ifdef __BEREZNUK__
this->BindObject(eTIME, 0x787E, 131, 70, -10, 359);
this->Data[eTIME].OnShow = true;
#endif
#ifdef __ROOT__
this->BindObject(eQUEST_MAIN, 0x7A5A, 222, 303, -1, -1);
this->BindObject(eQUEST_TITLE, 0x7A63, 230, 67, -1, -1);
this->BindObject(eQUEST_FRAME, 0x7A58, 230, 15, -1, -1);
this->BindObject(eQUEST_FOOTER, 0x7A59, 230, 50, -1, -1);
this->BindObject(eQUEST_DIV, 0x7A62, 223, 21, -1, -1);
this->BindObject(eQUEST_CLOSE, 0x7EC5, 36, 29, -1, -1);
#endif
// ----
SetOp((LPVOID)oAllowGUI_Call1, this->AllowGUI, ASM::CALL);
SetOp((LPVOID)oAllowGUI_Call2, this->AllowGUI, ASM::CALL);
SetOp((LPVOID)oDrawInterface_Call, this->Work, ASM::CALL);
SetOp((LPVOID)oLoadSomeForm_Call, this->LoadImages, ASM::CALL);
SetOp((LPVOID)0x00633FFB, this->LoadModels, ASM::CALL);
SetRange((LPVOID)0x0077FB7E, 7, ASM::NOP);
SetOp((LPVOID)0x0077FB7E, (LPVOID)CharacterInfoExtern, ASM::JMP);
#ifdef __NOVUS__
SetRange((LPVOID)0x00598C7D, 29, ASM::NOP);
SetOp((LPVOID)0x00598C7D, (LPVOID)StaffNameColor, ASM::JMP);
SetRange((LPVOID)0x005E496C, 13, ASM::NOP);
SetOp((LPVOID)0x005E496C, (LPVOID)AddSomeShine, ASM::JMP);
#endif
}
void Interface::Work()
{
gObjUser.Refresh();
gCamera.Rotate();
gCamera.Position();
// ----
#if defined __BEREZNUK__ || __MIX__ || __REEDLAN__ || __MUANGEL__ || __WHITE__ || __MEGAMU__ || __VIRNET__
gConnectEx.Run();
#endif
#ifdef __NOVUS__
gInterface.DrawCraftWindow();
#endif
#ifdef __MAKELO__
gInterface.DrawOffExpSwitch();
#endif
#ifdef __BEREZNUK__
gInterface.DrawTime();
#endif
// ----
gInterface.DrawCameraUI();
gInterface.DrawResetWindow();
gInterface.DrawNewsWindow();
[COLOR=#ff0000]gInterface.DrawMiniMapWindow();[/COLOR]
// ----
gInterface.DrawLifeBar();
#ifdef __RMOS__
gInterface.DrawQuestDialog();
#endif
// ----
pDrawInterface();
}
void Interface::LoadImages()
{
pLoadImage("Custom\\Interface\\CameraUI_BG.tga", 0x787A, 0x2601, 0x2900, 1, 0);
pLoadImage("Custom\\Interface\\CameraUI_Switch.tga", 0x787B, 0x2601, 0x2900, 1, 0);
pLoadImage("Custom\\Interface\\CameraUI_Reset.tga", 0x787C, 0x2601, 0x2900, 1, 0);
pLoadImage("Custom\\Interface\\NewsBoard_Title.tga", 0x787D, 0x2601, 0x2900, 1, 0);
// ----
[COLOR=#ff0000]pLoadImage("Custom\\Interface\\MiniMapUI.tga", 0x7882, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\PlayerPoint.jpg", 0x7883, 0x2600, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMapNull.tga", 0x7884, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // --[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap0.tga", 0x7885, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // --[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap1.tga", 0x7886, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // --[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap2.tga", 0x7887, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap3.tga", 0x7888, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap4.tga", 0x7889, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] // Exile Map 0x788A[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap6.tga", 0x788B, 0x2601, 0x2900, 1, 0);[/COLOR]
[COLOR=#ff0000] // ----[/COLOR]
[COLOR=#ff0000] pLoadImage("Custom\\Maps\\MiniMap7.tga", 0x788C, 0x2601, 0x2900, 1, 0);[/COLOR]
// ----
#ifdef __BEREZNUK__
pLoadImage("Custom\\Interface\\TimeBar.tga", 0x787E, 0x2601, 0x2900, 1, 0);
#endif
#ifdef __MAKELO__
pLoadImage("Interface\\newui_pcroom.tga", 32513, 0x2601, 0x2900, 1, 0);
#endif
// ----
pLoadSomeForm();
}
[COLOR=#ff0000]bool Interface::MiniMapCheck()[/COLOR]
[COLOR=#ff0000]{[/COLOR]
[COLOR=#ff0000] if(this->CheckWindow(Inventory) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(CashShop) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(ChaosBox) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Character) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(CommandWindow) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(ExpandInventory) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(ExpandWarehouse) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(FullMap) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(GensInfo) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Guild) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(NPC_Dialog) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(NPC_Julia) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(NPC_Titus) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(OtherStore) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Party) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(PetInfo) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Shop) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(SkillTree) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Store) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Trade) ||[/COLOR]
[COLOR=#ff0000] this->CheckWindow(Warehouse) )[/COLOR]
[COLOR=#ff0000] return true;[/COLOR]
[COLOR=#ff0000] return false;[/COLOR]
[COLOR=#ff0000]}[/COLOR]
[COLOR=#ff0000]bool Interface::CombinedChecks()[/COLOR]
[COLOR=#ff0000]{[/COLOR]
[COLOR=#ff0000] if( (this->CheckWindow(Inventory) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(ExpandInventory) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(Store)) || [/COLOR]
[COLOR=#ff0000] (this->CheckWindow(Inventory) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(Warehouse) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(ExpandWarehouse)) || [/COLOR]
[COLOR=#ff0000] (this->CheckWindow(Inventory) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(Character) [/COLOR]
[COLOR=#ff0000] && this->CheckWindow(Store)) )[/COLOR]
[COLOR=#ff0000] return true;[/COLOR]
[COLOR=#ff0000] return false;[/COLOR]
[COLOR=#ff0000]}
[/COLOR][COLOR=#0000cd]void Interface::DrawMiniMapWindow()
{
float MainWidth = 138.0;
float MainHeight = 265.0;
float StartY = 264.0;
float StartX = 512.0;
// ----
if( this->MiniMapCheck() || this->CombinedChecks() )
{
return;
}
// ----
switch(gObjUser.m_MapNumber)
{
case 0: //Lorencia
{
this->DrawGUI(eLORENCIA_MAP, StartX, StartY + 30);
}
break;
// --
case 1: //Dungeon
{
this->DrawGUI(eDUNGEON_MAP, StartX, StartY + 30);
}
break;
// --
case 2: //Devias
{
this->DrawGUI(eDEVIAS_MAP, StartX, StartY + 30);
}
break;
// --
case 3: //Noria
{
this->DrawGUI(eNORIA_MAP, StartX, StartY + 30);
}
break;
// --
case 4: //LostTower
{
this->DrawGUI(eLOSTTOWER_MAP, StartX, StartY + 30);
}
break;
// --
case 5: //Exile (disabled)
{
return;
}
break;
// --
case 6: //Stadium
{
this->DrawGUI(eSTADIUM_MAP, StartX, StartY + 30);
}
break;
// --
case 7: //Atlans
{
this->DrawGUI(eATLANS_MAP, StartX, StartY + 30);
}
break;
// --
default: //Default
{
this->DrawGUI(eNULL_MAP, StartX, StartY + 30);
}
break;
}
// ----
this->DrawGUI(eMINI_MAP_BG, StartX, StartY);
this->DrawGUI(ePLAYER_POINT, (float)(StartX - 1 + gObjUser.lpViewPlayer->MapPosX / 2), (float)(294 - 1 + ( 255 - gObjUser.lpViewPlayer->MapPosY ) / 2) );
}[/COLOR]