├── MSharedCommandTable.h
├── ZInterfaceItem.h
├── MSharedCommandTable.cpp
├── ZGameInterface.h
├── ZPost.h
├── ZWeapon.cpp
├── ZCombatInterface.h
├── ZCharacter.cpp
├── ZMyCharacter.cpp
├── ZCharacter.h
├── CombatInterface.xml
├── ZCombatChat.h
├── ZCombatInterface.cpp
├── ZCombatChat.cpp
├── ZGame.cpp
└── ZGameInterface.cpp
/MSharedCommandTable.h:
--------------------------------------------------------------------------------
1 | //addnew
2 | #define MC_FIND_WEAPON 50069
3 |
--------------------------------------------------------------------------------
/ZInterfaceItem.h:
--------------------------------------------------------------------------------
1 | //add
2 | #define ZIITEM_COMBAT_NOTFRAME "KillNotificationsFrame"
3 |
--------------------------------------------------------------------------------
/MSharedCommandTable.cpp:
--------------------------------------------------------------------------------
1 | //add
2 | C(MC_FIND_WEAPON, "Find.Weapon", "FindWeapon", MCDT_PEER2PEER);
3 | P(MPT_INT, "weapon")
4 |
--------------------------------------------------------------------------------
/ZGameInterface.h:
--------------------------------------------------------------------------------
1 | //find
2 | //void OnReplay();
3 | //add below
4 | void LoadWeapons();
5 | void LoadBlank();
6 | void LoadEmojis();
7 |
--------------------------------------------------------------------------------
/ZPost.h:
--------------------------------------------------------------------------------
1 | //add
2 | inline void ZPostLastWeaponUsed(int nWeapon)
3 | {
4 | ZPOSTCMD1(MC_FIND_WEAPON, MCommandParameterInt((MMatchWeaponType)nWeapon));
5 | }
6 |
--------------------------------------------------------------------------------
/ZWeapon.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | //void ZWeaponRocket::Explosion()
3 | //{
4 | //add inside {
5 | ZPostLastWeaponUsed(MWT_ROCKET);
6 |
7 | //find
8 | //void ZWeaponItemKit::Explosion()
9 | //{
10 | //add inside {
11 | ZPostLastWeaponUsed(MWT_FRAGMENTATION);
12 |
--------------------------------------------------------------------------------
/ZCombatInterface.h:
--------------------------------------------------------------------------------
1 | //find
2 | // ZCombatChat m_Chat;
3 | // ZCombatChat m_AdminMsg;
4 | //add below
5 | ZNotifyKills m_NotifyKills;
6 |
7 | //find
8 | // void OutputChatMsg(const char* szMsg);
9 | // void OutputChatMsg(MCOLOR color, const char* szMsg);
10 | //add below
11 | void OutputNotifyKills(const char* szMsg);
12 |
--------------------------------------------------------------------------------
/ZCharacter.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | //ZObject::OnDamaged(pAttacker,srcPos,damageType,weaponType,fDamage,fPiercingRatio,nMeleeType);
3 | //if(damageType==ZD_MELEE) OnDamagedAnimation(pAttacker,nMeleeType);
4 | //m_dwStatusBitPackingValue.Ref().m_bDamaged = true;
5 | //add below
6 |
7 | SetWeaponDamaged((MMatchWeaponType)weaponType);
8 | ZPostLastWeaponUsed(weaponType);
9 |
--------------------------------------------------------------------------------
/ZMyCharacter.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | //void ZMyCharacter::InitStatus()
3 | //{
4 | //add inside {
5 | SetWeaponDamaged(MWT_NONE);
6 | ZPostLastWeaponUsed(MWT_NONE);
7 |
8 | //find
9 | //void ZMyCharacter::OnDamaged(ZObject* pAttacker, rvector srcPos, ZDAMAGETYPE damageType, MMatchWeaponType weaponType, float fDamage, float fPiercingRatio, int nMeleeType)
10 | //{
11 | //add inside {
12 | SetWeaponDamaged(weaponType);
13 | ZPostLastWeaponUsed(weaponType);
14 |
--------------------------------------------------------------------------------
/ZCharacter.h:
--------------------------------------------------------------------------------
1 | //find
2 | //struct ZCharacterStatus
3 | //{
4 | //add inside
5 | MMatchWeaponType LastWeapon;
6 |
7 | //find
8 | //ZCharacterStatus() :
9 | //add inside
10 | LastWeapon(MWT_NONE),
11 |
12 | //find
13 | //void SetAdminHide(bool bHide) { m_dwStatusBitPackingValue.Ref().m_bAdminHide = bHide; }
14 | //add below
15 | MMatchWeaponType WType;
16 | void SetWeaponDamaged(MMatchWeaponType wWeapon) { WType = wWeapon; }
17 | MMatchWeaponType GetWeaponDamaged() { return WType; }
18 | MMatchWeaponType GetLastW() { return GetStatus().Ref().LastWeapon; }
19 |
--------------------------------------------------------------------------------
/CombatInterface.xml:
--------------------------------------------------------------------------------
1 |
2 | NullFrameLook
3 |
4 | 0
5 | 40
6 | 30
7 | 150
8 |
9 |
10 | false
11 |
12 |
26 |
--------------------------------------------------------------------------------
/ZCombatChat.h:
--------------------------------------------------------------------------------
1 | //add
2 | class ZNotifyKills
3 | {
4 | private:
5 | protected:
6 | ZIDLResource* m_pIDLResource;
7 | unsigned long int m_nLastChattingMsgTime;
8 | bool m_bShowOutput;
9 |
10 | void UpdateChattingBox();
11 | void ProcessChatMsg();
12 | public:
13 | MTextArea* m_pChattingOutput;
14 |
15 |
16 | int nLines;
17 |
18 | ZNotifyKills();
19 | virtual ~ZNotifyKills();
20 | bool Create(char* szOutputTxtarea, bool bUsePlayerList);
21 | void Destroy();
22 |
23 | void Update();
24 | void OutputChatMsg(const char* szMsg);
25 | void OutputChatMsg(MCOLOR color, const char* szMsg);
26 |
27 | void OnDraw(MDrawContext* pDC);
28 | void SetFont(MFont* pFont);
29 |
30 | void ShowOutput(bool bShow);
31 | };
32 |
--------------------------------------------------------------------------------
/ZCombatInterface.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | // m_AdminMsg.Create("CombatChatOutputAdmin", false);
3 | // MFont* pFont = MFontManager::Get("FONTb11b");
4 | // m_AdminMsg.SetFont(pFont);
5 | // m_AdminMsg.m_pChattingOutput->ReleaseFocus();
6 | //add below
7 |
8 | m_NotifyKills.Create("KillNotifications", true);
9 | m_NotifyKills.ShowOutput(ZGetConfiguration()->GetViewGameChat());
10 | m_NotifyKills.m_pChattingOutput->ReleaseFocus();
11 | MFont* pFontCustom3 = MFontManager::Get("FONTa7");
12 | m_NotifyKills.SetFont(pFontCustom3);
13 |
14 | //find
15 | //m_Chat.OnDraw(pDC);
16 | //
17 | // if (!m_bSkipUIDrawByRule)
18 | // {
19 | //add inside {
20 |
21 | m_NotifyKills.OnDraw(pDC);
22 |
23 | //add new
24 | void ZCombatInterface::OutputNotifyKills(const char* szMsg)
25 | {
26 | m_NotifyKills.OutputChatMsg(szMsg);
27 | }
28 |
29 | //find
30 | //void ZCombatInterface::ShowInfo(bool bVisible)
31 | //{
32 | //add inside {
33 | pWidget = m_pIDLResource->FindWidget(ZIITEM_COMBAT_NOTFRAME);
34 | if (pWidget != NULL)
35 | {
36 | pWidget->Show(bVisible);
37 | }
38 |
39 | //find
40 | //m_Chat.Update();
41 | //m_AdminMsg.Update();
42 | //add below
43 | m_NotifyKills.Update();
44 |
--------------------------------------------------------------------------------
/ZCombatChat.cpp:
--------------------------------------------------------------------------------
1 | //add
2 | ZNotifyKills::ZNotifyKills()
3 | {
4 | m_nLastChattingMsgTime = 0;
5 | m_pIDLResource = ZApplication::GetGameInterface()->GetIDLResource();
6 |
7 | m_pChattingOutput = NULL;
8 | m_bShowOutput = true;
9 | }
10 |
11 | ZNotifyKills::~ZNotifyKills()
12 | {
13 |
14 | }
15 |
16 | bool ZNotifyKills::Create(char* szOutputTxtarea, bool bUsePlayerList)
17 | {
18 |
19 | MWidget* pWidget = m_pIDLResource->FindWidget("KillNotifications");
20 | if (pWidget != NULL)
21 | {
22 | pWidget->SetListener(ZGetCombatChatInputListener());
23 | }
24 |
25 | m_pChattingOutput = NULL;
26 | pWidget = m_pIDLResource->FindWidget(szOutputTxtarea);
27 | if (pWidget != NULL)
28 | {
29 | m_pChattingOutput = ((MTextArea*)pWidget);
30 | }
31 |
32 | if (m_pChattingOutput != NULL)
33 | {
34 | m_pChattingOutput->Clear();
35 | }
36 | return true;
37 | }
38 |
39 | void ZNotifyKills::Destroy()
40 | {
41 | MWidget* pChatFrame = ZGetGameInterface()->GetIDLResource()->FindWidget("KillNotificationsFrame");
42 | //pChatFrame->Draw(false);
43 | pChatFrame->Hide();
44 | pChatFrame->SetVisible(false);
45 | pChatFrame->Enable(false);
46 | pChatFrame->Show(false);
47 |
48 | m_pChattingOutput = NULL;
49 | }
50 |
51 | void ZNotifyKills::Update()
52 | {
53 | UpdateChattingBox();
54 | }
55 |
56 | void ZNotifyKills::UpdateChattingBox()
57 | {
58 | if (m_pChattingOutput == NULL) return;
59 |
60 | if (m_pChattingOutput->GetLineCount() > 0)
61 | {
62 | unsigned long int nNowTime = timeGetTime();
63 |
64 | #define CHAT_DELAY_TIME 3000
65 | if ((nNowTime - m_nLastChattingMsgTime) > CHAT_DELAY_TIME)
66 | {
67 | m_pChattingOutput->DeleteFirstLine();
68 | m_nLastChattingMsgTime = nNowTime;
69 | }
70 | }
71 | }
72 |
73 | void ZNotifyKills::OutputChatMsg(const char* szMsg)
74 | {
75 | if (m_pChattingOutput == NULL) return;
76 |
77 | if (m_pChattingOutput->GetLineCount() == 0)
78 | for (int i = 0; i < (MAX_CHAT_OUTPUT_LINE - 1); i++) m_pChattingOutput->DeleteFirstLine();
79 | m_pChattingOutput->AddText(szMsg);
80 |
81 | ProcessChatMsg();
82 | }
83 |
84 | void ZNotifyKills::OutputChatMsg(MCOLOR color, const char* szMsg)
85 | {
86 | if (m_pChattingOutput == NULL) return;
87 |
88 | if (m_pChattingOutput->GetLineCount() == 0)
89 | for (int i = 0; i < (MAX_CHAT_OUTPUT_LINE - 1); i++) m_pChattingOutput->DeleteFirstLine();
90 | m_pChattingOutput->AddText(szMsg, color);
91 |
92 | ProcessChatMsg();
93 | }
94 | void ZNotifyKills::ProcessChatMsg()
95 | {
96 | while ((m_pChattingOutput->GetLineCount() > 9))
97 | {
98 | m_pChattingOutput->DeleteFirstLine();
99 | }
100 |
101 |
102 | if (m_pChattingOutput->GetLineCount() >= 1)
103 | {
104 | m_nLastChattingMsgTime = timeGetTime();
105 | }
106 | }
107 | void ZNotifyKills::OnDraw(MDrawContext* pDC)
108 | {
109 | MWidget* pChatFrame = ZGetGameInterface()->GetIDLResource()->FindWidget("KillNotificationsFrame");
110 | MWidget* pChatArea = ZGetGameInterface()->GetIDLResource()->FindWidget("KillNotifications");
111 | pDC->SetColor(0xFF, 0xFF, 0xFF, 50);
112 | pChatArea->SetVisible(true);
113 | pChatArea->Enable(true);
114 | pChatFrame->SetVisible(true);
115 | pChatFrame->Enable(true);
116 | pChatFrame->Show(true);
117 |
118 | }
119 |
120 | void ZNotifyKills::SetFont(MFont* pFont)
121 | {
122 | MFont* pFontFodase = MFontManager::Get("FONTa9b");
123 | ProcessChatMsg();
124 | m_pChattingOutput->SetFont(pFontFodase);
125 | }
126 |
127 |
128 | void ZNotifyKills::ShowOutput(bool bShow)
129 | {
130 | if (m_pChattingOutput) m_pChattingOutput->Show(bShow);
131 | m_bShowOutput = bShow;
132 | }
133 |
--------------------------------------------------------------------------------
/ZGame.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | /*
3 | case MC_MATCH_STAGE_ENTERBATTLE:
4 | {
5 | unsigned char nParam;
6 | pCommand->GetParameter(&nParam, 0, MPT_UCHAR);
7 |
8 | MCommandParameter* pParam = pCommand->GetParameter(1);
9 | if (pParam->GetType() != MPT_BLOB) break;
10 | void* pBlob = pParam->GetPointer();
11 |
12 | MTD_PeerListNode* pPeerNode = (MTD_PeerListNode*)MGetBlobArrayElement(pBlob, 0);
13 | OnStageEnterBattle(MCmdEnterBattleParam(nParam), pPeerNode);
14 | }
15 | break;
16 | */
17 | //add below
18 | case MC_FIND_WEAPON:
19 | {
20 | int WeaponType;
21 |
22 | pCommand->GetParameter(&WeaponType, 0, MPT_INT);
23 |
24 | ZCharacter* pCharacter = (ZCharacter*)ZGetCharacterManager()->Find(pCommand->GetSenderUID());
25 | if (pCharacter == NULL) break;
26 |
27 | pCharacter->GetStatus().CheckCrc();
28 | pCharacter->GetStatus().Ref().LastWeapon = (MMatchWeaponType)WeaponType;
29 | pCharacter->GetStatus().MakeCrc();
30 | }
31 | break;
32 |
33 | //find
34 | /*
35 | if (ZGetMyUID() == pOwnerCharacter->GetUID())
36 | {
37 | ZItem* pSelItem = pOwnerCharacter->GetItems()->GetSelectedWeapon();
38 | if (pSelItem && pSelItem->GetDesc() &&
39 | pSelItem->GetDesc()->IsSpendableItem())
40 | {
41 | ZMyItemNode* pItemNode = ZGetMyInfo()->GetItemList()->GetEquipedItem((MMatchCharItemParts)sel_type);
42 | if (pItemNode)
43 | {
44 | pItemNode->SetItemCount(pItemNode->GetItemCount() - 1);
45 | ZPostRequestUseSpendableNormalItem(pItemNode->GetUID());
46 | }
47 | }
48 | }
49 | */
50 | //add below
51 | pOwnerCharacter->SetWeaponDamaged(pItem->GetDesc()->m_nWeaponType.Ref());
52 | ZPostLastWeaponUsed(pItem->GetDesc()->m_nWeaponType.Ref());
53 |
54 |
55 | //find
56 | /*
57 | if(Z_VIDEO_DYNAMICLIGHT)
58 | ZGetStencilLight()->AddLightSource( v1, 2.0f, 75 );
59 | */
60 | //add below
61 | pOwnerCharacter->SetWeaponDamaged(pItem->GetDesc()->m_nWeaponType.Ref());
62 | ZPostLastWeaponUsed(pItem->GetDesc()->m_nWeaponType.Ref());
63 |
64 |
65 | //find
66 | /*
67 | if(wtype == MWT_SHOTGUN)
68 | {
69 | OnPeerShot_Shotgun(pItem,pOwnerCharacter,fShotTime,pos,to);
70 | return;
71 | } else {
72 | OnPeerShot_Range(sel_type,uid,fShotTime,pos,to);
73 |
74 | rvector position;
75 | pOwnerCharacter->GetWeaponTypePos( weapon_dummy_muzzle_flash , &position );
76 | if( ZGetConfiguration()->GetVideo()->bDynamicLight )
77 | {
78 | RGetDynamicLightManager()->AddLight( GUNFIRE, position );
79 | }
80 | }
81 | */
82 | //add below
83 | pOwnerCharacter->SetWeaponDamaged(pItem->GetDesc()->m_nWeaponType.Ref());
84 | ZPostLastWeaponUsed(pItem->GetDesc()->m_nWeaponType.Ref());
85 |
86 | //add new
87 | #define PREFIX "\xbd"
88 | char* GetWeaponName(MMatchWeaponType WeaponType)
89 | {
90 | static char szType[38][64] =
91 | {
92 | "MWT_NONE",
93 |
94 | // Melee Weapons
95 | "E", // MWT_DAGGER
96 | "R", // MWT_DUAL_DAGGER
97 | "Q", // MWT_KATANA
98 | "O", // MWT_DOUBLE_KATANA
99 | "L", // MWT_GREAT_SWORD
100 |
101 | // Range Weapons
102 | "Y", // MWT_PISTOL
103 | "T", // MWT_PISTOLx2
104 | "Y", // MWT_REVOLVER
105 | "T", // MWT_REVOLVERx2
106 | "U", // MWT_SMG
107 | "I", // MWT_SMGx2
108 | "S", // MWT_SHOTGUN
109 | "S", // MWT_SAWED_SHOTGUN
110 | "P", // MWT_RIFLE
111 | "F", // MWT_MACHINEGUN
112 | "A", // MWT_ROCKET
113 | "D", // MWT_SNIFER
114 |
115 | "G", // MWT_MED_KIT
116 | "G", // MWT_REPAIR_KIT
117 | "MWT_BULLET_KIT",
118 | "MWT_FLASH_BANG",
119 | "H", // MWT_FRAGMENTATION
120 | "MWT_SMOKE_GRENADE",
121 | "H", // MWT_FRAGMENTATION
122 | "MWT_SKILL",
123 |
124 | "MWT_ENCHANT_FIRE",
125 | "MWT_ENCHANT_COLD",
126 | "MWT_ENCHANT_LIGHTNING",
127 | "MWT_ENCHANT_POISON",
128 |
129 | "MWT_POTION",
130 | "J",
131 | "MWT_DYNAMITYE",
132 |
133 | "MWT_STUNGRENADE",
134 | "MWT_LANDMINE",
135 | "MWT_SPYCASE",
136 |
137 | "MWT_END" };
138 | return szType[WeaponType];
139 | }
140 |
141 | //find
142 | //void ZGame::OnPeerDieMessage(ZCharacter* pVictim, ZCharacter* pAttacker)
143 | //{
144 | //add inside {
145 | char szFeed[512];
146 | if (RGetIsWidthScreen() || RGetIsLongScreen())
147 | {
148 | switch (pAttacker->GetTeamID())
149 | {
150 | case MMT_ALL:
151 | sprintf(szFeed, "%sK %s %s%s %s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
152 | break;
153 | case MMT_RED:
154 | sprintf(szFeed, "%sK ^1%s %s%s ^H%s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
155 | break;
156 | case MMT_BLUE:
157 | sprintf(szFeed, "%sK ^H%s %s%s ^1%s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
158 | break;
159 | default:
160 | sprintf(szFeed, "%sK %s %s%s %s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
161 | break;
162 | }
163 | if (pVictim == pAttacker)
164 | {
165 | switch (pAttacker->GetTeamID())
166 | {
167 | case MMT_RED:
168 | sprintf(szFeed, "%sK %sW ^1%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
169 | break;
170 | case MMT_BLUE:
171 | sprintf(szFeed, "%sK %sW ^H%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
172 | break;
173 | default:
174 | sprintf(szFeed, "%sK %sW ^M%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
175 | break;
176 | }
177 | }
178 | }
179 | else {
180 | switch (pAttacker->GetTeamID())
181 | {
182 | case MMT_ALL:
183 | sprintf(szFeed, "%sK ^1%s %s%s %s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
184 | break;
185 | case MMT_RED:
186 | sprintf(szFeed, "%sK ^1%s %s%s ^H%s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
187 | break;
188 | case MMT_BLUE:
189 | sprintf(szFeed, "%sK ^H%s %s%s ^1%s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
190 | break;
191 | default:
192 | sprintf(szFeed, "%sK ^1%s %s%s %s", PREFIX, pAttacker->GetProperty()->GetName(), PREFIX, GetWeaponName(pAttacker->GetLastW()), pVictim->GetProperty()->GetName());
193 | break;
194 | }
195 |
196 | if (pVictim == pAttacker)
197 | {
198 | switch (pAttacker->GetTeamID())
199 | {
200 | case MMT_RED:
201 | sprintf(szFeed, "%sK %sW ^1%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
202 | break;
203 | case MMT_BLUE:
204 | sprintf(szFeed, "%sK %sW ^H%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
205 | break;
206 | default:
207 | sprintf(szFeed, "%sK %sW ^M%s", PREFIX, PREFIX, pAttacker->GetProperty()->GetName());
208 | break;
209 | }
210 | }
211 | ZGetCombatInterface()->OutputNotifyKills(szFeed);
212 | ZGetCombatInterface()->OutputNotifyKills("\n");
213 | }
214 |
--------------------------------------------------------------------------------
/ZGameInterface.cpp:
--------------------------------------------------------------------------------
1 | //find
2 | //ZGameInterface::ZGameInterface(const char* szName, MWidget* pParent, MListener* pListener) : ZInterface(szName,pParent,pListener)
3 | //{
4 | //add inside {
5 | LoadWeapons();
6 | LoadBlank();
7 |
8 | //add new
9 | #include
10 | #include
11 | struct Emoji
12 | {
13 | char A, B, C;
14 | char name[20];
15 | Emoji(char a, char b, char c, char* Name)
16 | {
17 | A = a;
18 | B = b;
19 | C = c;
20 | memset(Name, 0, 20);
21 | strcpy(name, Name);
22 | }
23 | Emoji(char a, char b, char* Name)
24 | {
25 | A = a;
26 | B = b;
27 | C = ' ';
28 | memset(Name, 0, 20);
29 | strcpy(name, Name);
30 | }
31 |
32 | };
33 |
34 | typedef std::vector Emojis;
35 |
36 | Emojis m_Emoji;
37 |
38 | typedef std::vector Weapons;
39 |
40 | Weapons m_Weapons;
41 |
42 | typedef std::vector Blank;
43 |
44 | Blank m_Blank;
45 |
46 | void ZGameInterface::LoadEmojis()
47 | {
48 | m_Emoji.push_back(new Emoji(':', 'D', "happy.png"));
49 | m_Emoji.push_back(new Emoji(':', '*', "kiss.png"));
50 | m_Emoji.push_back(new Emoji(';', '/', "cry.png"));
51 | m_Emoji.push_back(new Emoji(';', '(', "crymore.png"));
52 | m_Emoji.push_back(new Emoji(':', 'S', "wut.png"));
53 | m_Emoji.push_back(new Emoji(':', 'P', "lick.png"));
54 | m_Emoji.push_back(new Emoji(':', '/', "angry.png"));
55 | m_Emoji.push_back(new Emoji(':', '(', "sad.png"));
56 | m_Emoji.push_back(new Emoji('<', '3', "love.png"));
57 | m_Emoji.push_back(new Emoji(';', ')', "wink.png"));
58 | m_Emoji.push_back(new Emoji(':', '|', "bru.png"));
59 | m_Emoji.push_back(new Emoji(':', ')', "smile.png"));
60 | m_Emoji.push_back(new Emoji(':', 'O', "sorprise.png"));
61 | }
62 |
63 | void ZGameInterface::LoadWeapons()
64 | {
65 | m_Weapons.push_back(new Emoji('\xbd', 'Q', "sword.png"));
66 | m_Weapons.push_back(new Emoji('\xbd', 'W', "suicidio.png"));
67 | m_Weapons.push_back(new Emoji('\xbd', 'E', "dagger.png"));
68 | m_Weapons.push_back(new Emoji('\xbd', 'R', "dualdagger.png"));
69 | m_Weapons.push_back(new Emoji('\xbd', 'T', "dualpistol.png"));
70 | m_Weapons.push_back(new Emoji('\xbd', 'Y', "singlepistol.png"));
71 | m_Weapons.push_back(new Emoji('\xbd', 'U', "smg.png"));
72 | m_Weapons.push_back(new Emoji('\xbd', 'I', "smgx2.png"));
73 | m_Weapons.push_back(new Emoji('\xbd', 'O', "kodachis.png"));
74 | m_Weapons.push_back(new Emoji('\xbd', 'P', "rifle.png"));
75 | m_Weapons.push_back(new Emoji('\xbd', 'A', "rocket.png"));
76 | m_Weapons.push_back(new Emoji('\xbd', 'S', "shotgun.png"));
77 | m_Weapons.push_back(new Emoji('\xbd', 'D', "sniper.png"));
78 | m_Weapons.push_back(new Emoji('\xbd', 'F', "lmg.png"));
79 | m_Weapons.push_back(new Emoji('\xbd', 'G', "mina.png"));
80 | m_Weapons.push_back(new Emoji('\xbd', 'H', "grenade.png"));
81 | m_Weapons.push_back(new Emoji('\xbd', 'J', "trap.png"));
82 | }
83 |
84 | void ZGameInterface::LoadBlank()
85 | {
86 | m_Blank.push_back(new Emoji('\xbd', 'K', "blank.png"));
87 | }
88 |
89 | unsigned long int MMColorSetKillFeed[] =
90 | {
91 | 0xFF808080,0xFFFF0000,0xFF00FF00,0xFF0000FF,0xFFFFFF00,0xFF800000,
92 | 0xFF008000,0xFF000080,0xFF808000,0xFFFFFFFF,0xFF00FFFF,0xFF388E8E,
93 | 0xFF7D9EC0,0xFFC67171,0xFFF5F5DC,0xFFA9A9A9,0xFFEECFA1,0xFFEE7600,
94 | 0xFFCDC0B0,0xFF000000,0xFF8B2323,0xFFCDAA7D,0xFF458B00,0xFFD2691E,
95 | 0xFF6495ED,0xFFFFB90F,0xFF8B008B,0xFF2F4F4F,0xFF7CFC00,0xFFEEE685,
96 | 0xFF8470FF,0xFFFFE4E1,0xFFEE4000,0xFF8E8E38,0xFFFFA54F,0xFFFF6347,
97 | 0xFF8B8B00,0xFFF5F5F5,0xFF00E5EE,0xFF708090,0xFFF4A460,0xFF03FE4A,
98 | 0xFFFFE4E0,0xFFEE4001,0xFF8E8E3E,
99 | };
100 |
101 | int MDrawContext::TextMultiLine(MRECT& r, const char* szText, int nLineGap, bool bAutoNextLine, int nIndentation, int nSkipLine, MPOINT* pPositions)
102 | {
103 | bool bColorSupport = true;
104 |
105 | MBeginProfile(99, "MDrawContext::TextMultiLine");
106 |
107 | int nLine = 0;
108 | MFont* pFont = GetFont();
109 |
110 | int nLength = strlen(szText);
111 | int xRight = 0;
112 | int ArmasxRight = 0;
113 |
114 | int y = r.y;
115 | char* szCurrent = (char*)szText;
116 | MPOINT* pCurrentPos = pPositions;
117 | do {
118 | MCOLOR prevColor = GetColor();
119 | SetColor(0, 0, 0, 255 * ((int)Z_ETC_CHATOPACITY / 100.f));
120 | //SetColor(0xFF000000);
121 | char* szCurrentCpy = GetPureText(szCurrent);
122 | FillRectangle(r.x, y, pFont->GetWidth(szCurrentCpy), pFont->GetHeight());
123 | pFont->GetWidth(szCurrentCpy), 200.f * 1.1 / 800.f * (float)MGetWorkspaceWidth();
124 | SetColor(prevColor);
125 | int nX = nLine == 0 ? 0 : nIndentation;
126 |
127 | int nOriginalCharCount = MMGetNextLinePos(pFont, szCurrent, r.w - nX, bAutoNextLine, true);
128 |
129 | if (nSkipLine <= nLine)
130 | {
131 | int nCharCount = min(nOriginalCharCount, MAX_CHAR_A_LINE);
132 | char buffer[256];
133 | if (bColorSupport) {
134 |
135 | // Text
136 | #define FLUSHPOS(_Pos) if(pCurrentPos!=NULL){ \
137 | for(int i=0; buffer[i]!=NULL; i++){ \
138 | pCurrentPos[i+szCurrent-szText].x = _Pos+pFont->GetWidth(buffer, i); \
139 | pCurrentPos[i+szCurrent-szText].y = y; \
140 | } \
141 | }
142 |
143 | #define FLUSH if(buffer[0]) { Text(r.x+nLastX+xRight, y, buffer); FLUSHPOS(r.x+nLastX); nLastX=nX; buffer[0]=0;pcurbuf=buffer; }
144 |
145 | //Armas
146 | #define ARMASFLUSHPOS(_Pos) if(pCurrentPos!=NULL){ \
147 | for(int i=0; buffer[i]!=NULL; i++){ \
148 | pCurrentPos[i+szCurrent-szText].x = _Pos+pFont->GetWidth(buffer, i); \
149 | pCurrentPos[i+szCurrent-szText].y = y; \
150 | } \
151 | }
152 |
153 | #define ARMASFLUSH if(buffer[0]) { Text(r.x+nLastX+ArmasxRight, y, buffer); ARMASFLUSHPOS(r.x+nLastX); nLastX=nX; buffer[0]=0;pcurbuf=buffer; }
154 |
155 | int nLastX = nX;
156 |
157 | buffer[0] = 0;
158 | char* pcurbuf = buffer;
159 | for (int i = 0; i < nCharCount; i++)
160 | {
161 |
162 | unsigned char c = szCurrent[i], cc = szCurrent[i + 1];
163 |
164 | if (c == '^' && ('0' <= cc) && (cc <= 'Z'))
165 | {
166 |
167 | FLUSH;
168 | SetColor(MCOLOR(MMColorSetKillFeed[cc - '0']));
169 | i++;
170 | continue;
171 | }
172 |
173 | for (Emojis::iterator emoji = m_Emoji.begin(); emoji != m_Emoji.end(); emoji++) {
174 |
175 | if (szCurrent[i - 1] == ' ' && szCurrent[i] == (*emoji)->A && szCurrent[i + 1] == (*emoji)->B) {
176 | FLUSH;
177 | SetBitmap(MBitmapManager::Get((*emoji)->name));
178 | int nSize = 30;
179 | Draw((r.x + nX) + xRight, y, nSize, nSize);
180 | c = ' ';
181 | cc = ' ';
182 | szCurrent[i] = ' ';
183 | szCurrent[i + 1] = ' ';
184 | xRight += 10;
185 | }
186 | }
187 | for (Emojis::iterator emoji = m_Blank.begin(); emoji != m_Blank.end(); emoji++) {
188 |
189 | if (szCurrent[i] == (*emoji)->A && szCurrent[i + 1] == (*emoji)->B) {
190 | ARMASFLUSH;
191 | SetBitmap(MBitmapManager::Get((*emoji)->name));
192 | Draw((r.x + nX) + ArmasxRight, y, 1, 1);
193 | c = ' ';
194 | cc = ' ';
195 | szCurrent[i] = ' ';
196 | szCurrent[i + 1] = ' ';
197 | y += 30;
198 | }
199 | }
200 |
201 | for (Emojis::iterator emoji = m_Weapons.begin(); emoji != m_Weapons.end(); emoji++) {
202 |
203 | if (szCurrent[i] == (*emoji)->A && szCurrent[i + 1] == (*emoji)->B) {
204 | ARMASFLUSH;
205 | SetBitmap(MBitmapManager::Get((*emoji)->name));
206 | int nSize = 20;
207 | Draw((r.x + nX) + ArmasxRight, y, 70, 20);
208 | //Draw((r.x + nX) + ArmasxRight, y, nSize, nSize);
209 | c = ' ';
210 | cc = ' ';
211 | szCurrent[i] = ' ';
212 | szCurrent[i + 1] = ' ';
213 | ArmasxRight += 20;
214 | }
215 | }
216 | if (ZGetGame() && ZGetConfiguration()->GetEtc()->bEmote)
217 | {
218 |
219 | unsigned char cminus = szCurrent[i - 1], c = szCurrent[i], cc = szCurrent[i + 1], ccc = szCurrent[i + 2], cccc = szCurrent[i + 3];
220 |
221 | if (c == '^' && ('0' <= cc) && (cc <= 'Z'))
222 | {
223 | xRight = 0;
224 | FLUSH;
225 | i++;
226 | continue;
227 | }
228 |
229 | else if (c == ':' && (cc == 'D' || cc == 'd'))
230 | {
231 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
232 | FLUSH;
233 | SetBitmap(MBitmapManager::Get("1.png"));
234 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
235 | c = ' ';
236 | cc = ' ';
237 | szCurrent[i] = ' ';
238 | szCurrent[i + 1] = ' ';
239 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
240 | }
241 | else if ((cminus == ' ') && (c == ':') && (cc == 'D' || cc == 'd') && (ccc == ' ' || !ccc)) {
242 | FLUSH;
243 | SetBitmap(MBitmapManager::Get("1.png"));
244 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
245 | c = ' ';
246 | cc = ' ';
247 | szCurrent[i] = ' ';
248 | szCurrent[i + 1] = ' ';
249 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
250 | }
251 | }
252 |
253 |
254 | else if (c == ':' && (')' == cc))
255 | {
256 |
257 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
258 | FLUSH;
259 | SetBitmap(MBitmapManager::Get("3.png"));
260 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
261 | c = ' ';
262 | cc = ' ';
263 | szCurrent[i] = ' ';
264 | szCurrent[i + 1] = ' ';
265 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
266 |
267 | }
268 | else if ((cminus == ' ') && (c == ':') && (cc == ')') && (ccc == ' ' || !ccc)) {
269 | FLUSH;
270 | SetBitmap(MBitmapManager::Get("3.png"));
271 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
272 | c = ' ';
273 | cc = ' ';
274 | szCurrent[i] = ' ';
275 | szCurrent[i + 1] = ' ';
276 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
277 | }
278 | }
279 | else if (c == ':' && ('(' == cc))
280 | {
281 |
282 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
283 | FLUSH;
284 | SetBitmap(MBitmapManager::Get("4.png"));
285 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
286 | c = ' ';
287 | cc = ' ';
288 | szCurrent[i] = ' ';
289 | szCurrent[i + 1] = ' ';
290 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
291 |
292 | }
293 | else if ((cminus == ' ') && (c == ':') && (cc == '(') && (ccc == ' ' || !ccc)) {
294 | FLUSH;
295 | SetBitmap(MBitmapManager::Get("4.png"));
296 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
297 | c = ' ';
298 | cc = ' ';
299 | szCurrent[i] = ' ';
300 | szCurrent[i + 1] = ' ';
301 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
302 |
303 |
304 | }
305 | }
306 | else if (c == ':' && ('P' == cc || 'p' == cc))
307 | {
308 |
309 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
310 | FLUSH;
311 | SetBitmap(MBitmapManager::Get("5.png"));
312 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
313 | c = ' ';
314 | cc = ' ';
315 | szCurrent[i] = ' ';
316 | szCurrent[i + 1] = ' ';
317 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
318 |
319 | }
320 | else if ((cminus == ' ') && (c == ':') && ('P' == cc || 'p' == cc) && (ccc == ' ' || !ccc)) {
321 | FLUSH;
322 | SetBitmap(MBitmapManager::Get("5.png"));
323 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
324 | c = ' ';
325 | cc = ' ';
326 | szCurrent[i] = ' ';
327 | szCurrent[i + 1] = ' ';
328 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
329 |
330 |
331 | }
332 | }
333 | else if (c == ':' && ('/' == cc))
334 | {
335 |
336 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
337 | FLUSH;
338 | SetBitmap(MBitmapManager::Get("6.png"));
339 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
340 | c = ' ';
341 | cc = ' ';
342 | szCurrent[i] = ' ';
343 | szCurrent[i + 1] = ' ';
344 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
345 |
346 | }
347 | else if ((cminus == ' ') && (c == ':') && (cc == '/') && (ccc == ' ' || !ccc)) {
348 | FLUSH;
349 | SetBitmap(MBitmapManager::Get("6.png"));
350 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
351 | c = ' ';
352 | cc = ' ';
353 | szCurrent[i] = ' ';
354 | szCurrent[i + 1] = ' ';
355 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
356 |
357 |
358 | }
359 | }
360 | else if (c == '<' && ('3' == cc))
361 | {
362 |
363 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
364 | FLUSH;
365 | SetBitmap(MBitmapManager::Get("7.png"));
366 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
367 | c = ' ';
368 | cc = ' ';
369 | szCurrent[i] = ' ';
370 | szCurrent[i + 1] = ' ';
371 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
372 |
373 | }
374 | else if ((cminus == ' ') && (c == '<') && (cc == '3') && (ccc == ' ' || !ccc)) {
375 | FLUSH;
376 | SetBitmap(MBitmapManager::Get("7.png"));
377 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
378 | c = ' ';
379 | cc = ' ';
380 | szCurrent[i] = ' ';
381 | szCurrent[i + 1] = ' ';
382 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
383 |
384 |
385 | }
386 | }
387 | else if (c == '^' && ('_' == cc) && ('^' == ccc))
388 | {
389 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
390 | FLUSH;
391 | SetBitmap(MBitmapManager::Get("8.png"));
392 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
393 | c = ' ';
394 | cc = ' ';
395 | ccc = ' ';
396 | szCurrent[i] = ' ';
397 | szCurrent[i + 1] = ' ';
398 | szCurrent[i + 2] = ' ';
399 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
400 | }
401 | else if ((cminus == ' ') && (c == '^') && (cc == '_') && (ccc == '^') && (cccc == ' ' || !cccc)) {
402 | FLUSH;
403 | SetBitmap(MBitmapManager::Get("8.png"));
404 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
405 | c = ' ';
406 | cc = ' ';
407 | ccc = ' ';
408 | szCurrent[i] = ' ';
409 | szCurrent[i + 1] = ' ';
410 | szCurrent[i + 2] = ' ';
411 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
412 | }
413 | }
414 | else if ((c == 'O' || c == 'o') && (':' == cc) && (')' == ccc))
415 | {
416 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
417 | FLUSH;
418 | SetBitmap(MBitmapManager::Get("9.png"));
419 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
420 | c = ' ';
421 | cc = ' ';
422 | ccc = ' ';
423 | szCurrent[i] = ' ';
424 | szCurrent[i + 1] = ' ';
425 | szCurrent[i + 2] = ' ';
426 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
427 | }
428 | else if ((cminus == ' ') && (c == 'O' || c == 'o') && (cc == ':') && (ccc == ')') && (cccc == ' ' || !cccc)) {
429 | FLUSH;
430 | SetBitmap(MBitmapManager::Get("9.png"));
431 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
432 | c = ' ';
433 | cc = ' ';
434 | ccc = ' ';
435 | szCurrent[i] = ' ';
436 | szCurrent[i + 1] = ' ';
437 | szCurrent[i + 2] = ' ';
438 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
439 | }
440 | }
441 | else if (c == ':' && ('@' == cc))
442 | {
443 |
444 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
445 | FLUSH;
446 | SetBitmap(MBitmapManager::Get("10.png"));
447 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
448 | c = ' ';
449 | cc = ' ';
450 | szCurrent[i] = ' ';
451 | szCurrent[i + 1] = ' ';
452 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
453 |
454 | }
455 | else if ((cminus == ' ') && (c == ':') && (cc == '@') && (ccc == ' ' || !ccc)) {
456 | FLUSH;
457 | SetBitmap(MBitmapManager::Get("10.png"));
458 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
459 | c = ' ';
460 | cc = ' ';
461 | szCurrent[i] = ' ';
462 | szCurrent[i + 1] = ' ';
463 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
464 |
465 |
466 | }
467 | }
468 |
469 | else if (c == ';' && ('(' == cc))
470 | {
471 |
472 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
473 | FLUSH;
474 | SetBitmap(MBitmapManager::Get("2.png"));
475 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
476 | c = ' ';
477 | cc = ' ';
478 | szCurrent[i] = ' ';
479 | szCurrent[i + 1] = ' ';
480 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
481 |
482 | }
483 | else if ((cminus == ' ') && (c == ';') && (cc == '(') && (ccc == ' ' || !ccc)) {
484 | FLUSH;
485 | SetBitmap(MBitmapManager::Get("2.png"));
486 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
487 | c = ' ';
488 | cc = ' ';
489 | szCurrent[i] = ' ';
490 | szCurrent[i + 1] = ' ';
491 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
492 |
493 |
494 | }
495 | }
496 |
497 | else if (c == ';' && (')' == cc))
498 | {
499 |
500 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
501 | FLUSH;
502 | SetBitmap(MBitmapManager::Get("12.png"));
503 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
504 | c = ' ';
505 | cc = ' ';
506 | szCurrent[i] = ' ';
507 | szCurrent[i + 1] = ' ';
508 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
509 |
510 | }
511 | else if ((cminus == ' ') && (c == ';') && (cc == ')') && (ccc == ' ' || !ccc)) {
512 | FLUSH;
513 | SetBitmap(MBitmapManager::Get("12.png"));
514 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
515 | c = ' ';
516 | cc = ' ';
517 | szCurrent[i] = ' ';
518 | szCurrent[i + 1] = ' ';
519 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
520 |
521 |
522 | }
523 | }
524 | else if (c == ':' && ('O' == cc || 'o' == cc))
525 | {
526 |
527 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
528 | FLUSH;
529 | SetBitmap(MBitmapManager::Get("13.png"));
530 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
531 | c = ' ';
532 | cc = ' ';
533 | szCurrent[i] = ' ';
534 | szCurrent[i + 1] = ' ';
535 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
536 |
537 | }
538 | else if ((cminus == ' ') && (c == ':') && ('O' == cc || 'o' == cc) && (ccc == ' ' || !ccc)) {
539 | FLUSH;
540 | SetBitmap(MBitmapManager::Get("13.png"));
541 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
542 | c = ' ';
543 | cc = ' ';
544 | szCurrent[i] = ' ';
545 | szCurrent[i + 1] = ' ';
546 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
547 |
548 |
549 | }
550 | }
551 | else if (c == '-' && ('_' == cc) && ('-' == ccc))
552 | {
553 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
554 | FLUSH;
555 | SetBitmap(MBitmapManager::Get("14.png"));
556 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
557 | c = ' ';
558 | cc = ' ';
559 | ccc = ' ';
560 | szCurrent[i] = ' ';
561 | szCurrent[i + 1] = ' ';
562 | szCurrent[i + 2] = ' ';
563 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
564 | }
565 | else if ((cminus == ' ') && (c == '-') && (cc == '_') && (ccc == '-') && (cccc == ' ' || !cccc)) {
566 | FLUSH;
567 | SetBitmap(MBitmapManager::Get("14.png"));
568 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
569 | c = ' ';
570 | cc = ' ';
571 | ccc = ' ';
572 | szCurrent[i] = ' ';
573 | szCurrent[i + 1] = ' ';
574 | szCurrent[i + 2] = ' ';
575 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
576 | }
577 | }
578 | else if (c == ':' && ('*' == cc))
579 | {
580 |
581 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
582 | FLUSH;
583 | SetBitmap(MBitmapManager::Get("15.png"));
584 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
585 | c = ' ';
586 | cc = ' ';
587 | szCurrent[i] = ' ';
588 | szCurrent[i + 1] = ' ';
589 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
590 |
591 | }
592 | else if ((cminus == ' ') && (c == ':') && (cc == '*') && (ccc == ' ' || !ccc)) {
593 | FLUSH;
594 | SetBitmap(MBitmapManager::Get("15.png"));
595 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
596 | c = ' ';
597 | cc = ' ';
598 | szCurrent[i] = ' ';
599 | szCurrent[i + 1] = ' ';
600 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
601 |
602 | }
603 | }
604 | else if ((cminus == ' ') && (c == ':') && (cc == 'v') && (ccc == ' ' || !ccc)) {
605 | FLUSH;
606 | SetBitmap(MBitmapManager::Get("16.png"));
607 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
608 | c = ' ';
609 | cc = ' ';
610 | szCurrent[i] = ' ';
611 | szCurrent[i + 1] = ' ';
612 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
613 |
614 | }
615 | }
616 | else if (c == ':' && ('7' == cc))
617 | {
618 |
619 | if (strlen(szText) == strlen(ZGetMyInfo()->GetCharName()) + 5) {
620 | FLUSH;
621 | SetBitmap(MBitmapManager::Get("17.png"));
622 | Draw((r.x + nX), y, (float)RGetScreenWidth() / (float)800 * 11, (float)RGetScreenWidth() / (float)800 * 11);
623 | c = ' ';
624 | cc = ' ';
625 | szCurrent[i] = ' ';
626 | szCurrent[i + 1] = ' ';
627 | xRight = (float)RGetScreenWidth() / (float)1920 * 6;
628 |
629 | }
630 | else if (c == ':' && ('M' == cc || 'm' == cc))
631 | {
632 |
633 | }
634 | }
635 | int w;
636 |
637 | *(pcurbuf++) = c;
638 | if (c > 127 && i < nCharCount) {
639 | *(pcurbuf++) = cc;
640 | w = pFont->GetWidth(szCurrent + i, 2);
641 | i++;
642 | }
643 | else w = pFont->GetWidth(szCurrent + i, 1);
644 |
645 | *pcurbuf = 0;
646 |
647 | nX += w;
648 | }
649 |
650 | FLUSH;
651 | }
652 | else
653 | {
654 | strncpy(buffer, szCurrent, nCharCount);
655 | buffer[nCharCount] = 0;
656 | Text(r.x + nX, y, buffer);
657 | FLUSHPOS(r.x + nX);
658 | }
659 | y += pFont->GetHeight() + nLineGap;
660 | }
661 |
662 | szCurrent += nOriginalCharCount;
663 | nLine++;
664 | if (y >= r.y + r.h) break;
665 | } while (szCurrent < szText + nLength);
666 |
667 | MEndProfile(99);
668 | return nLine - nSkipLine;
669 | }
670 |
--------------------------------------------------------------------------------