2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

More gun implementations, and script objects

This commit is contained in:
2016-12-09 18:35:20 -08:00
parent be40ebc8db
commit 5793c8df87
25 changed files with 459 additions and 26 deletions

View File

@@ -1,9 +1,52 @@
#include "CGunWeapon.hpp"
#include "GameGlobalObjects.hpp"
#include "CSimplePool.hpp"
namespace urde
{
const char* CGunWeapon::skBeamXferNames[5] =
{
"PowerXfer",
"IceXfer",
"WaveXfer",
"PlasmaXfer",
"PhazonXfer"
};
CGunWeapon::CGunWeapon(u32, EWeaponType type, TUniqueId, EMaterialTypes, const zeus::CVector3f& vec)
const char* CGunWeapon::skSuitArmNames[8] =
{
"PowerArm",
"GravityArm",
"VariaArm",
"PhazonArm",
"FusionArm",
"FusionArmG",
"FusionArmV",
"FusionArmP",
};
s32 GetWeaponIndex(EWeaponType type)
{
if (type == EWeaponType::Power)
return 0;
else if (type == EWeaponType::Ice)
return 1;
else if (type == EWeaponType::Wave)
return 2;
else if (type == EWeaponType::Plasma)
return 3;
else if (type == EWeaponType::Phazon)
return 4;
return 0;
}
CGunWeapon::CGunWeapon(ResId ancsId, EWeaponType type, TUniqueId uid, EMaterialTypes mType, const zeus::CVector3f& vec)
: x4_(vec),
x104_gunCharacter(g_SimplePool->GetObj({ancsId, FOURCC('ANCS')})),
x13c_armCharacter(g_SimplePool->GetObj(skSuitArmNames[0])),
x1c0_weaponType(type),
x1c4_uid(uid),
x1c8_matType(mType)
{
}