Korean translation (84 source files, 876 lines): - Translated all EUC-KR/CP949 Korean developer comments to English across 84 source files in Gameleap/code/. Zero Korean bytes remain outside the intentional font-table headers (D3FFontEdit2/fontedit all.h etc.). - Comment markers: //상훈 앞/뒤 -> //sanghoon begin/end (Sang-hun's code region markers); //상훈짱 begin/end, //상훈.. variants; // 鉉 -> // hyun (second developer's markers); // 鉉 - start/end patterns. - Functional string translations in recscore.cpp (mw4 + mw4print copies): body-part return values (왼발/오른발/etc. -> Left Leg/Right Leg/etc.), kill-announcer format strings (~30 entries), and the nonmfc.h assert dialog. - GosView profiler: 킪 -> us (microseconds) in timing display strings. - Network/socket code (ctcl.cpp, mugsocs.h, ctime.cpp across Launcher/ MW4Application/MW4GameEd2/AnimScript): state-machine comments, socket ID comments, login/session management comments. - render.hpp CHSH_Device member comments; GUIRadarManager.cpp drawing routine comments; hudchat/hudcomp2/huddamage/hudmap/hudweapon/hudtarg HUD component comments. - DXRasterizer.cpp: cleaned residual U+FFFD replacement characters left from a prior partial encoding conversion. UTF-8 encoding cleanup (76+ files): - Latin-1 single bytes converted to proper UTF-8 multi-byte sequences: © (0xA9) in 3dsmax4/Maxscrpt Autodesk/Wainwright copyright headers, ® (0xAE) in gosHelp/Remote.cpp, · (0xB7) bullet points in ai command.hpp, Û (0xDB) in SafeChain_Test.cpp tool header, ß (0xDF) in AnimationSuite version strings (8 files). - Font lookup tables (D3FFontEdit2/, fontedit/ *.h) intentionally left as-is: raw byte values are C array data, not text. Language DLL: - Replaced Gameleap/mw4/Language.dll (original Korean binary) and MW4/Language.dll with freshly built English version from Language - Win32 English config (Language.dsp). Fixes Korean button labels in the GameOS exception/crash dialog (??? ??... / ?? / ??? were showing instead of More Details.../Continue/Exit).
258 lines
5.6 KiB
C++
258 lines
5.6 KiB
C++
|
|
#pragma once
|
|
|
|
#include "MW4.hpp"
|
|
#include "Sensor.hpp"
|
|
#include "hudcomp.hpp"
|
|
|
|
namespace MechWarrior4
|
|
{
|
|
|
|
class GUIRadarManager: public HUDComponent
|
|
{
|
|
typedef HUDComponent inherited;
|
|
protected:
|
|
Scalar radarRange;
|
|
Scalar radarRangeOrg;
|
|
// Point3D displayPos;
|
|
// Vector3D displaySize;
|
|
int radarx,radary,radarw,radarh;
|
|
Stuff::SlotOf <Entity*> m_CurrentTarget;
|
|
HUDText *m_RangeText;
|
|
|
|
|
|
// void SetDisplayPosition(Stuff::Scalar xloc,Stuff::Scalar yloc) {displayPos.x=xloc; displayPos.y=yloc;}
|
|
// void SetDisplaySize(Stuff::Scalar xsize,Stuff::Scalar ysize) {displaySize.x=xsize; displaySize.y=ysize;}
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction, Destruction
|
|
//
|
|
public:
|
|
GUIRadarManager();
|
|
~GUIRadarManager();
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Public Data
|
|
//
|
|
protected:
|
|
struct ShotEntry
|
|
{
|
|
ObjectID entity;
|
|
Stuff::Time timeadded;
|
|
ShotEntry (ObjectID p1,Stuff::Time p2)
|
|
{
|
|
entity = p1;
|
|
timeadded = p2;
|
|
}
|
|
};
|
|
void DrawImplementation(void);
|
|
Stuff::Time m_RotateTime;
|
|
Stuff::Scalar zrot;
|
|
Stuff::Scalar m_TorsoTwist;
|
|
int m_RadarMode;
|
|
stlport::vector<ShotEntry> m_ShotList;
|
|
//sanghoon begin
|
|
int hsh_fdraw;
|
|
//sanghoon end
|
|
bool OnShotList (ObjectID who);
|
|
void ClipLine (Scalar& xpt1,Scalar& ypt1,Scalar& xpt2,Scalar& ypt2,Scalar cx,Scalar cy,Scalar rad);
|
|
|
|
public:
|
|
virtual void Reset (void);
|
|
|
|
void AddShot (ObjectID who);
|
|
void SetVehicle(Vehicle *vehicle);
|
|
void SetRange(Stuff::Scalar range);
|
|
Stuff::Scalar GetRange(bool bOrg = true) const;
|
|
virtual void Update (Stuff::Time till);
|
|
void TorsoTwist (Stuff::Scalar value)
|
|
{ m_TorsoTwist = value; }
|
|
void CurrentTarget (Entity *obj)
|
|
{
|
|
m_CurrentTarget.Remove ();
|
|
if (obj)
|
|
m_CurrentTarget.Add (obj);
|
|
}
|
|
};
|
|
|
|
class HUDHeat : public HUDComponent
|
|
{
|
|
protected:
|
|
|
|
typedef HUDComponent inherited;
|
|
int m_Alpha;
|
|
Stuff::Time m_AlphaTime;
|
|
DWORD m_HeatColor[3];
|
|
int m_Heat;
|
|
int m_TargetHeat;
|
|
int m_BaseBottom;
|
|
HUDText *m_HeatText;
|
|
|
|
void DrawImplementation(void);
|
|
|
|
public:
|
|
HUDHeat();
|
|
~HUDHeat();
|
|
virtual void Update (Stuff::Time till);
|
|
void Heat (int value)
|
|
{
|
|
if (value != m_TargetHeat)
|
|
{
|
|
char text[15];
|
|
m_TargetHeat = value;
|
|
m_Alpha = 255;
|
|
// MSL 5.02 Heat Scale Header
|
|
sprintf (text,"%5.0f %%",m_TargetHeat*1.0f);
|
|
m_HeatText->UpdateText (text);
|
|
}
|
|
}
|
|
};
|
|
|
|
class HUDCoolant : public HUDComponent
|
|
{
|
|
protected:
|
|
|
|
typedef HUDComponent inherited;
|
|
int m_Alpha;
|
|
Stuff::Time m_AlphaTime;
|
|
int m_Cool;
|
|
int m_TargetCool;
|
|
int m_BaseBottom;
|
|
|
|
void DrawImplementation(void);
|
|
|
|
public:
|
|
HUDCoolant();
|
|
~HUDCoolant();
|
|
virtual void Update (Stuff::Time till);
|
|
void Coolant (int value)
|
|
{
|
|
if (value != m_TargetCool)
|
|
{
|
|
m_TargetCool = value;
|
|
m_Alpha = 255;
|
|
}
|
|
}
|
|
};
|
|
|
|
class HUDJump : public HUDComponent
|
|
{
|
|
protected:
|
|
|
|
typedef HUDComponent inherited;
|
|
int m_Alpha;
|
|
Stuff::Time m_AlphaTime;
|
|
Stuff::Scalar m_Jump;
|
|
Stuff::Scalar m_MaxJump;
|
|
Stuff::Scalar m_TargetJump;
|
|
int m_BaseBottom;
|
|
|
|
void DrawImplementation(void);
|
|
|
|
public:
|
|
HUDJump();
|
|
~HUDJump();
|
|
virtual void Update (Stuff::Time till);
|
|
void Jump (Stuff::Scalar value,Stuff::Scalar maxvalue)
|
|
{
|
|
m_MaxJump = maxvalue;
|
|
if (value > maxvalue)
|
|
value = maxvalue;
|
|
|
|
if (maxvalue != 0)
|
|
m_Jump = value/maxvalue;
|
|
else
|
|
m_Jump = -1.0f;
|
|
}
|
|
};
|
|
|
|
class HUDSpeed : public HUDComponent
|
|
{
|
|
protected:
|
|
|
|
typedef HUDComponent inherited;
|
|
int m_Alpha;
|
|
Stuff::Time m_AlphaTime;
|
|
Scalar m_Speed;
|
|
Scalar m_MaxForwardSpeed,m_MaxReverseSpeed;
|
|
Scalar m_TargetSpeed;
|
|
int m_BaseBottom;
|
|
HUDText *m_SpeedText;
|
|
|
|
void DrawImplementation(void);
|
|
|
|
public:
|
|
HUDSpeed();
|
|
~HUDSpeed();
|
|
virtual void Update (Stuff::Time till);
|
|
void Speed (Stuff::Scalar value,Stuff::Scalar forwardmin,Stuff::Scalar reversemin,Stuff::Scalar maxforwardspeed,Stuff::Scalar maxreversespeed)
|
|
{
|
|
char text[15];
|
|
if ((value < forwardmin) && (value > reversemin))
|
|
value = 0;
|
|
if (value != m_TargetSpeed)
|
|
{
|
|
m_TargetSpeed = value;
|
|
m_Alpha = 255;
|
|
int temp = (int) m_TargetSpeed;
|
|
sprintf (text,"%dkph",temp);
|
|
m_SpeedText->UpdateText (text);
|
|
}
|
|
}
|
|
};
|
|
|
|
|
|
|
|
class HUDNav : public HUDComponent
|
|
{
|
|
protected:
|
|
typedef HUDComponent inherited;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// Construction, Destruction
|
|
//
|
|
void DrawImplementation(void);
|
|
|
|
int m_PlayerFacing;
|
|
int m_NavPointFacing;
|
|
int m_NavPointRange;
|
|
int m_BaseLeft,m_BaseRight;
|
|
HUDText *navPointName,*navPointRange;
|
|
HUDText *navText[41];
|
|
HUDText *playerAngle;
|
|
char m_NavPointName[MAX_HUD_TEXT],m_NavPointRangeText[MAX_HUD_TEXT];
|
|
DWORD m_NavAlpha;
|
|
Stuff::Time m_NavAlphaTime;
|
|
|
|
public:
|
|
HUDNav();
|
|
~HUDNav();
|
|
|
|
virtual void Update (Stuff::Time till);
|
|
|
|
void PlayerFacing (int value)
|
|
{
|
|
char text[10];
|
|
m_PlayerFacing = value;
|
|
itoa (value,text,10);
|
|
playerAngle->UpdateText (text);
|
|
}
|
|
void NavPointFacing (int value)
|
|
{ m_NavPointFacing = value; }
|
|
void NavPointRange (int value)
|
|
{
|
|
m_NavPointRange = value;
|
|
sprintf (m_NavPointRangeText,"%d",value);
|
|
navPointRange->UpdateText (m_NavPointRangeText);
|
|
}
|
|
void NavPointName (const char *name)
|
|
{
|
|
Str_Copy (m_NavPointName,name,MAX_HUD_TEXT);
|
|
Verify (navPointName);
|
|
navPointName->UpdateText (m_NavPointName);
|
|
}
|
|
|
|
};
|
|
|
|
|
|
} |