mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- added a new 'Translate' struct which wraps the native methods of 'Translation'.
This is for use in actors where the name 'Translation' is shadowed by a local member variable.
This commit is contained in:
parent
19444194a5
commit
adf306d5b2
1 changed files with 17 additions and 1 deletions
|
@ -46,11 +46,27 @@ extend struct Translation
|
|||
{
|
||||
Color colors[256];
|
||||
|
||||
native int AddTranslation();
|
||||
native static bool SetPlayerTranslation(int group, int num, int plrnum, PlayerClass pclass);
|
||||
native static int GetID(Name transname);
|
||||
}
|
||||
|
||||
// This is needed because Actor contains a field named 'translation' which shadows the above.
|
||||
struct Translate version("4.5")
|
||||
{
|
||||
static int MakeID(int group, int num)
|
||||
{
|
||||
return (group << 16) + num;
|
||||
}
|
||||
static bool SetPlayerTranslation(int group, int num, int plrnum, PlayerClass pclass)
|
||||
{
|
||||
return Translation.SetPlayerTranslation(group, num, plrnum, pclass);
|
||||
}
|
||||
static int GetID(Name transname)
|
||||
{
|
||||
return Translation.GetID(transname);
|
||||
}
|
||||
}
|
||||
|
||||
struct DamageTypeDefinition native
|
||||
{
|
||||
native static bool IgnoreArmor(Name type);
|
||||
|
|
Loading…
Reference in a new issue