Add ported code from ida.

This commit is contained in:
= 2025-06-07 11:20:47 -04:00
parent 691a16e9ad
commit f1aa61bf3b
98 changed files with 4684 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#include "assets_cod10_360.h"
Assets_COD10_360::Assets_COD10_360()
{
}
Assets_COD10_360::~Assets_COD10_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD10_360_H
#define ASSETS_COD10_360_H
#include "assets.h"
class Assets_COD10_360 : public Assets
{
public:
Assets_COD10_360();
~Assets_COD10_360();
protected:
private:
};
#endif // ASSETS_COD10_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod11_360.h"
Assets_COD11_360::Assets_COD11_360()
{
}
Assets_COD11_360::~Assets_COD11_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD11_360_H
#define ASSETS_COD11_360_H
#include "assets.h"
class Assets_COD11_360 : public Assets
{
public:
Assets_COD11_360();
~Assets_COD11_360();
protected:
private:
};
#endif // ASSETS_COD11_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod12_360.h"
Assets_COD12_360::Assets_COD12_360()
{
}
Assets_COD12_360::~Assets_COD12_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD12_360_H
#define ASSETS_COD12_360_H
#include "assets.h"
class Assets_COD12_360 : public Assets
{
public:
Assets_COD12_360();
~Assets_COD12_360();
protected:
private:
};
#endif // ASSETS_COD12_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod2_360.h"
Assets_COD2_360::Assets_COD2_360()
{
}
Assets_COD2_360::~Assets_COD2_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD2_360_H
#define ASSETS_COD2_360_H
#include "assets.h"
class Assets_COD2_360 : public Assets
{
public:
Assets_COD2_360();
~Assets_COD2_360();
protected:
private:
};
#endif // ASSETS_COD2_360_H

View File

@ -0,0 +1,113 @@
#include "assets_cod4_360.h"
Assets_COD4_360::Assets_COD4_360() {
}
Assets_COD4_360::~Assets_COD4_360() {
}
std::shared_ptr<Animation> Assets_COD4_360::Load_Animation(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<Model> Assets_COD4_360::Load_Model(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<Material> Assets_COD4_360::Load_Material(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<MaterialPixelShader> Assets_COD4_360::Load_MaterialPixelShader(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<MaterialTechSet> Assets_COD4_360::Load_MaterialTechSet(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<GfxImage> Assets_COD4_360::Load_GfxImage(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<SoundAliasList> Assets_COD4_360::Load_SoundAliasList(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<SoundCurve> Assets_COD4_360::Load_SoundCurve(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<LoadedSound> Assets_COD4_360::Load_LoadedSound(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<ClipMap> Assets_COD4_360::Load_ClipMap(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<ComWorld> Assets_COD4_360::Load_ComWorld(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<GameWorldSp> Assets_COD4_360::Load_GameWorldSp(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<GameWorldMp> Assets_COD4_360::Load_GameWorldMp(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<MapEnts> Assets_COD4_360::Load_MapEnts(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<GfxWorld> Assets_COD4_360::Load_GfxWorld(QDataStream *aZoneFileStream){
return nullptr;
}
std::shared_ptr<GfxLightDef> Assets_COD4_360::Load_GfxLightPtr(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<GameFont> Assets_COD4_360::Load_GameFont(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<MenuList> Assets_COD4_360::Load_MenuList(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<MenuDef> Assets_COD4_360::Load_MenuDef(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<LocalizeEntry> Assets_COD4_360::Load_LocalizeEntry(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<WeaponDef> Assets_COD4_360::Load_WeaponDef(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<SoundDriver> Assets_COD4_360::Load_SoundDriver(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<EffectDef> Assets_COD4_360::Load_EffectDef(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<ImpactTable> Assets_COD4_360::Load_ImpactTable(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<RawFile> Assets_COD4_360::Load_RawFile(QDataStream *aZoneFileStream) {
return nullptr;
}
std::shared_ptr<StringTable> Assets_COD4_360::Load_StringTable(QDataStream *aZoneFileStream) {
return nullptr;
}

View File

@ -0,0 +1,40 @@
#ifndef ASSETS_COD4_360_H
#define ASSETS_COD4_360_H
#include "assets.h"
class Assets_COD4_360 : public Assets
{
public:
Assets_COD4_360();
~Assets_COD4_360();
std::shared_ptr<Animation> Load_Animation(QDataStream *aZoneFileStream) override;
std::shared_ptr<Model> Load_Model(QDataStream *aZoneFileStream) override;
std::shared_ptr<Material> Load_Material(QDataStream *aZoneFileStream) override;
std::shared_ptr<MaterialPixelShader> Load_MaterialPixelShader(QDataStream *aZoneFileStream) override;
std::shared_ptr<MaterialTechSet> Load_MaterialTechSet(QDataStream *aZoneFileStream) override;
std::shared_ptr<GfxImage> Load_GfxImage(QDataStream *aZoneFileStream) override;
std::shared_ptr<SoundAliasList> Load_SoundAliasList(QDataStream *aZoneFileStream) override;
std::shared_ptr<SoundCurve> Load_SoundCurve(QDataStream *aZoneFileStream) override;
std::shared_ptr<LoadedSound> Load_LoadedSound(QDataStream *aZoneFileStream) override;
std::shared_ptr<ClipMap> Load_ClipMap(QDataStream *aZoneFileStream) override;
std::shared_ptr<ComWorld> Load_ComWorld(QDataStream *aZoneFileStream) override;
std::shared_ptr<GameWorldSp> Load_GameWorldSp(QDataStream *aZoneFileStream) override;
std::shared_ptr<GameWorldMp> Load_GameWorldMp(QDataStream *aZoneFileStream) override;
std::shared_ptr<MapEnts> Load_MapEnts(QDataStream *aZoneFileStream) override;
std::shared_ptr<GfxWorld> Load_GfxWorld(QDataStream *aZoneFileStream) override;
std::shared_ptr<GfxLightDef> Load_GfxLightPtr(QDataStream *aZoneFileStream) override;
std::shared_ptr<GameFont> Load_GameFont(QDataStream *aZoneFileStream) override;
std::shared_ptr<MenuList> Load_MenuList(QDataStream *aZoneFileStream) override;
std::shared_ptr<MenuDef> Load_MenuDef(QDataStream *aZoneFileStream) override;
std::shared_ptr<LocalizeEntry> Load_LocalizeEntry(QDataStream *aZoneFileStream) override;
std::shared_ptr<WeaponDef> Load_WeaponDef(QDataStream *aZoneFileStream) override;
std::shared_ptr<SoundDriver> Load_SoundDriver(QDataStream *aZoneFileStream) override;
std::shared_ptr<EffectDef> Load_EffectDef(QDataStream *aZoneFileStream) override;
std::shared_ptr<ImpactTable> Load_ImpactTable(QDataStream *aZoneFileStream) override;
std::shared_ptr<RawFile> Load_RawFile(QDataStream *aZoneFileStream) override;
std::shared_ptr<StringTable> Load_StringTable(QDataStream *aZoneFileStream) override;
};
#endif // ASSETS_COD4_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod5_360.h"
Assets_COD5_360::Assets_COD5_360()
{
}
Assets_COD5_360::~Assets_COD5_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD5_360_H
#define ASSETS_COD5_360_H
#include "assets.h"
class Assets_COD5_360 : public Assets
{
public:
Assets_COD5_360();
~Assets_COD5_360();
protected:
private:
};
#endif // ASSETS_COD5_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod6_360.h"
Assets_COD6_360::Assets_COD6_360()
{
}
Assets_COD6_360::~Assets_COD6_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD6_360_H
#define ASSETS_COD6_360_H
#include "assets.h"
class Assets_COD6_360 : public Assets
{
public:
Assets_COD6_360();
~Assets_COD6_360();
protected:
private:
};
#endif // ASSETS_COD6_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod7_360.h"
Assets_COD7_360::Assets_COD7_360()
{
}
Assets_COD7_360::~Assets_COD7_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD7_360_H
#define ASSETS_COD7_360_H
#include "assets.h"
class Assets_COD7_360 : public Assets
{
public:
Assets_COD7_360();
~Assets_COD7_360();
protected:
private:
};
#endif // ASSETS_COD7_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod8_360.h"
Assets_COD8_360::Assets_COD8_360()
{
}
Assets_COD8_360::~Assets_COD8_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD8_360_H
#define ASSETS_COD8_360_H
#include "assets.h"
class Assets_COD8_360 : public Assets
{
public:
Assets_COD8_360();
~Assets_COD8_360();
protected:
private:
};
#endif // ASSETS_COD8_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod9_360.h"
Assets_COD9_360::Assets_COD9_360()
{
}
Assets_COD9_360::~Assets_COD9_360()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD9_360_H
#define ASSETS_COD9_360_H
#include "assets.h"
class Assets_COD9_360 : public Assets
{
public:
Assets_COD9_360();
~Assets_COD9_360();
protected:
private:
};
#endif // ASSETS_COD9_360_H

View File

@ -0,0 +1,11 @@
#include "assets_cod10_pc.h"
Assets_COD10_PC::Assets_COD10_PC()
{
}
Assets_COD10_PC::~Assets_COD10_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD10_PC_H
#define ASSETS_COD10_PC_H
#include "assets.h"
class Assets_COD10_PC : public Assets
{
public:
Assets_COD10_PC();
~Assets_COD10_PC();
protected:
private:
};
#endif // ASSETS_COD10_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod11_pc.h"
Assets_COD11_PC::Assets_COD11_PC()
{
}
Assets_COD11_PC::~Assets_COD11_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD11_PC_H
#define ASSETS_COD11_PC_H
#include "assets.h"
class Assets_COD11_PC : public Assets
{
public:
Assets_COD11_PC();
~Assets_COD11_PC();
protected:
private:
};
#endif // ASSETS_COD11_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod12_pc.h"
Assets_COD12_PC::Assets_COD12_PC()
{
}
Assets_COD12_PC::~Assets_COD12_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD12_PC_H
#define ASSETS_COD12_PC_H
#include "assets.h"
class Assets_COD12_PC : public Assets
{
public:
Assets_COD12_PC();
~Assets_COD12_PC();
protected:
private:
};
#endif // ASSETS_COD12_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod4_pc.h"
Assets_COD4_PC::Assets_COD4_PC()
{
}
Assets_COD4_PC::~Assets_COD4_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD4_PC_H
#define ASSETS_COD4_PC_H
#include "assets.h"
class Assets_COD4_PC : public Assets
{
public:
Assets_COD4_PC();
~Assets_COD4_PC();
protected:
private:
};
#endif // ASSETS_COD4_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod5_pc.h"
Assets_COD5_PC::Assets_COD5_PC()
{
}
Assets_COD5_PC::~Assets_COD5_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD5_PC_H
#define ASSETS_COD5_PC_H
#include "assets.h"
class Assets_COD5_PC : public Assets
{
public:
Assets_COD5_PC();
~Assets_COD5_PC();
protected:
private:
};
#endif // ASSETS_COD5_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod6_pc.h"
Assets_COD6_PC::Assets_COD6_PC()
{
}
Assets_COD6_PC::~Assets_COD6_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD6_PC_H
#define ASSETS_COD6_PC_H
#include "assets.h"
class Assets_COD6_PC : public Assets
{
public:
Assets_COD6_PC();
~Assets_COD6_PC();
protected:
private:
};
#endif // ASSETS_COD6_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod7_pc.h"
Assets_COD7_PC::Assets_COD7_PC()
{
}
Assets_COD7_PC::~Assets_COD7_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD7_PC_H
#define ASSETS_COD7_PC_H
#include "assets.h"
class Assets_COD7_PC : public Assets
{
public:
Assets_COD7_PC();
~Assets_COD7_PC();
protected:
private:
};
#endif // ASSETS_COD7_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod8_pc.h"
Assets_COD8_PC::Assets_COD8_PC()
{
}
Assets_COD8_PC::~Assets_COD8_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD8_PC_H
#define ASSETS_COD8_PC_H
#include "assets.h"
class Assets_COD8_PC : public Assets
{
public:
Assets_COD8_PC();
~Assets_COD8_PC();
protected:
private:
};
#endif // ASSETS_COD8_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod9_pc.h"
Assets_COD9_PC::Assets_COD9_PC()
{
}
Assets_COD9_PC::~Assets_COD9_PC()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD9_PC_H
#define ASSETS_COD9_PC_H
#include "assets.h"
class Assets_COD9_PC : public Assets
{
public:
Assets_COD9_PC();
~Assets_COD9_PC();
protected:
private:
};
#endif // ASSETS_COD9_PC_H

View File

@ -0,0 +1,11 @@
#include "assets_cod10_ps3.h"
Assets_COD10_PS3::Assets_COD10_PS3()
{
}
Assets_COD10_PS3::~Assets_COD10_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD10_PS3_H
#define ASSETS_COD10_PS3_H
#include "assets.h"
class Assets_COD10_PS3 : public Assets
{
public:
Assets_COD10_PS3();
~Assets_COD10_PS3();
protected:
private:
};
#endif // ASSETS_COD10_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod11_ps3.h"
Assets_COD11_PS3::Assets_COD11_PS3()
{
}
Assets_COD11_PS3::~Assets_COD11_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD11_PS3_H
#define ASSETS_COD11_PS3_H
#include "assets.h"
class Assets_COD11_PS3 : public Assets
{
public:
Assets_COD11_PS3();
~Assets_COD11_PS3();
protected:
private:
};
#endif // ASSETS_COD11_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod12_ps3.h"
Assets_COD12_PS3::Assets_COD12_PS3()
{
}
Assets_COD12_PS3::~Assets_COD12_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD12_PS3_H
#define ASSETS_COD12_PS3_H
#include "assets.h"
class Assets_COD12_PS3 : public Assets
{
public:
Assets_COD12_PS3();
~Assets_COD12_PS3();
protected:
private:
};
#endif // ASSETS_COD12_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod4_ps3.h"
Assets_COD4_PS3::Assets_COD4_PS3()
{
}
Assets_COD4_PS3::~Assets_COD4_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD4_PS3_H
#define ASSETS_COD4_PS3_H
#include "assets.h"
class Assets_COD4_PS3 : public Assets
{
public:
Assets_COD4_PS3();
~Assets_COD4_PS3();
protected:
private:
};
#endif // ASSETS_COD4_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod5_ps3.h"
Assets_COD5_PS3::Assets_COD5_PS3()
{
}
Assets_COD5_PS3::~Assets_COD5_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD5_PS3_H
#define ASSETS_COD5_PS3_H
#include "assets.h"
class Assets_COD5_PS3 : public Assets
{
public:
Assets_COD5_PS3();
~Assets_COD5_PS3();
protected:
private:
};
#endif // ASSETS_COD5_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod6_ps3.h"
Assets_COD6_PS3::Assets_COD6_PS3()
{
}
Assets_COD6_PS3::~Assets_COD6_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD6_PS3_H
#define ASSETS_COD6_PS3_H
#include "assets.h"
class Assets_COD6_PS3 : public Assets
{
public:
Assets_COD6_PS3();
~Assets_COD6_PS3();
protected:
private:
};
#endif // ASSETS_COD6_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod7_ps3.h"
Assets_COD7_PS3::Assets_COD7_PS3()
{
}
Assets_COD7_PS3::~Assets_COD7_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD7_PS3_H
#define ASSETS_COD7_PS3_H
#include "assets.h"
class Assets_COD7_PS3 : public Assets
{
public:
Assets_COD7_PS3();
~Assets_COD7_PS3();
protected:
private:
};
#endif // ASSETS_COD7_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod8_ps3.h"
Assets_COD8_PS3::Assets_COD8_PS3()
{
}
Assets_COD8_PS3::~Assets_COD8_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD8_PS3_H
#define ASSETS_COD8_PS3_H
#include "assets.h"
class Assets_COD8_PS3 : public Assets
{
public:
Assets_COD8_PS3();
~Assets_COD8_PS3();
protected:
private:
};
#endif // ASSETS_COD8_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod9_ps3.h"
Assets_COD9_PS3::Assets_COD9_PS3()
{
}
Assets_COD9_PS3::~Assets_COD9_PS3()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD9_PS3_H
#define ASSETS_COD9_PS3_H
#include "assets.h"
class Assets_COD9_PS3 : public Assets
{
public:
Assets_COD9_PS3();
~Assets_COD9_PS3();
protected:
private:
};
#endif // ASSETS_COD9_PS3_H

View File

@ -0,0 +1,11 @@
#include "assets_cod4_wii.h"
Assets_COD4_Wii::Assets_COD4_Wii()
{
}
Assets_COD4_Wii::~Assets_COD4_Wii()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD4_WII_H
#define ASSETS_COD4_WII_H
#include "assets.h"
class Assets_COD4_Wii : public Assets
{
public:
Assets_COD4_Wii();
~Assets_COD4_Wii();
protected:
private:
};
#endif // ASSETS_COD4_WII_H

View File

@ -0,0 +1,11 @@
#include "assets_cod7_wii.h"
Assets_COD7_Wii::Assets_COD7_Wii()
{
}
Assets_COD7_Wii::~Assets_COD7_Wii()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD7_WII_H
#define ASSETS_COD7_WII_H
#include "assets.h"
class Assets_COD7_Wii : public Assets
{
public:
Assets_COD7_Wii();
~Assets_COD7_Wii();
protected:
private:
};
#endif // ASSETS_COD7_WII_H

View File

@ -0,0 +1,11 @@
#include "assets_cod8_wii.h"
Assets_COD8_Wii::Assets_COD8_Wii()
{
}
Assets_COD8_Wii::~Assets_COD8_Wii()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD8_WII_H
#define ASSETS_COD8_WII_H
#include "assets.h"
class Assets_COD8_Wii : public Assets
{
public:
Assets_COD8_Wii();
~Assets_COD8_Wii();
protected:
private:
};
#endif // ASSETS_COD8_WII_H

View File

@ -0,0 +1,11 @@
#include "assets_cod10_wiiu.h"
Assets_COD10_WiiU::Assets_COD10_WiiU()
{
}
Assets_COD10_WiiU::~Assets_COD10_WiiU()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD10_WIIU_H
#define ASSETS_COD10_WIIU_H
#include "assets.h"
class Assets_COD10_WiiU : public Assets
{
public:
Assets_COD10_WiiU();
~Assets_COD10_WiiU();
protected:
private:
};
#endif // ASSETS_COD10_WIIU_H

View File

@ -0,0 +1,11 @@
#include "assets_cod9_wiiu.h"
Assets_COD9_WiiU::Assets_COD9_WiiU()
{
}
Assets_COD9_WiiU::~Assets_COD9_WiiU()
{
}

View File

@ -0,0 +1,18 @@
#ifndef ASSETS_COD9_WIIU_H
#define ASSETS_COD9_WIIU_H
#include "assets.h"
class Assets_COD9_WiiU : public Assets
{
public:
Assets_COD9_WiiU();
~Assets_COD9_WiiU();
protected:
private:
};
#endif // ASSETS_COD9_WIIU_H

190
libs/assets/animparts.h Normal file
View File

@ -0,0 +1,190 @@
#ifndef ANIMPARTS_H
#define ANIMPARTS_H
#include <QString>
#include <QDataStream>
union XAnimDynamicFrames
{
quint8 (*_1)[3];
quint16 (*_2)[3];
};
union XAnimDynamicIndices
{
quint8 _1[1];
quint16 _2[1];
};
struct XAnimPartTransFrames
{
float mins[3];
float size[3];
XAnimDynamicFrames frames;
XAnimDynamicIndices indices;
};
union XAnimPartTransData
{
XAnimPartTransFrames frames;
float frame0[3];
};
struct XAnimPartTrans
{
quint16 size;
quint8 smallTrans;
XAnimPartTransData u;
};
struct XAnimDeltaPartQuatDataFrames
{
qint16 (*frames)[2];
XAnimDynamicIndices indices;
};
union XAnimDeltaPartQuatData
{
XAnimDeltaPartQuatDataFrames frames;
qint16 frame0[2];
};
struct XAnimDeltaPartQuat
{
quint16 size;
XAnimDeltaPartQuatData u;
};
struct XAnimDeltaPart
{
XAnimPartTrans *trans;
XAnimDeltaPartQuat *quat;
};
struct XAnimNotifyInfo
{
quint16 name;
float time;
};
struct XAnimIndices
{
quint8 *_1;
quint16 *_2;
void *data;
};
struct XAnimParts
{
qint32 namePtr;
QString name;
quint16 dataByteCount;
quint16 dataShortCount;
quint16 dataIntCount;
quint16 randomDataByteCount;
quint16 randomDataIntCount;
quint16 numframes;
bool bLoop;
bool bDelta;
quint8 boneCount[12];
quint8 notifyCount;
quint8 assetType;
bool pad;
unsigned int randomDataShortCount;
unsigned int indexCount;
float framerate;
float frequency;
quint16 *names;
quint8 *dataByte;
qint16 *dataShort;
int *dataInt;
qint16 *randomDataShort;
quint8 *randomDataByte;
int *randomDataInt;
XAnimIndices indices;
qint32 notifyPtr;
XAnimNotifyInfo notify;
qint32 deltaPartPtr;
XAnimDeltaPart deltaPart;
};
QDataStream& operator<<(QDataStream& out, const XAnimParts& in) {
out.writeRawData(reinterpret_cast<const char*>(&in.namePtr), 4);
out.writeRawData(reinterpret_cast<const char*>(&in.dataByteCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.dataShortCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.dataIntCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.randomDataByteCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.randomDataIntCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.numframes), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.bLoop), 1);
out.writeRawData(reinterpret_cast<const char*>(&in.bDelta), 1);
for (int i = 0; i < 12; i++) {
out.writeRawData(reinterpret_cast<const char*>(&in.boneCount[i]), 1);
}
out.writeRawData(reinterpret_cast<const char*>(&in.notifyCount), 1);
out.writeRawData(reinterpret_cast<const char*>(&in.assetType), 1);
out.writeRawData(reinterpret_cast<const char*>(&in.pad), 1);
out.writeRawData(reinterpret_cast<const char*>(&in.randomDataShortCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.indexCount), 2);
out.writeRawData(reinterpret_cast<const char*>(&in.framerate), 4);
out.writeRawData(reinterpret_cast<const char*>(&in.frequency), 4);
return out;
}
QDataStream& operator>>(QDataStream& in, XAnimParts& out) {
in.readRawData(reinterpret_cast<char*>(&out.namePtr), 4);
in.readRawData(reinterpret_cast<char*>(&out.dataByteCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.dataShortCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.dataIntCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.randomDataByteCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.randomDataIntCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.numframes), 2);
in.readRawData(reinterpret_cast<char*>(&out.bLoop), 1);
in.readRawData(reinterpret_cast<char*>(&out.bDelta), 1);
for (int i = 0; i < 12; i++) {
in.readRawData(reinterpret_cast<char*>(&out.boneCount[i]), 1);
}
in.readRawData(reinterpret_cast<char*>(&out.notifyCount), 1);
in.readRawData(reinterpret_cast<char*>(&out.assetType), 1);
in.readRawData(reinterpret_cast<char*>(&out.pad), 1);
in.readRawData(reinterpret_cast<char*>(&out.randomDataShortCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.indexCount), 2);
in.readRawData(reinterpret_cast<char*>(&out.framerate), 4);
in.readRawData(reinterpret_cast<char*>(&out.frequency), 4);
return in;
}
struct Animation {
QString name;
std::shared_ptr<XAnimParts> parts;
};
QDataStream& operator<<(QDataStream& out, const Animation& in) {
out << *in.parts;
return out;
}
QDataStream& operator>>(QDataStream& in, Animation& out) {
in >> *out.parts;
return in;
}
#endif // ANIMPARTS_H

112
libs/assets/asset.h Normal file
View File

@ -0,0 +1,112 @@
#ifndef ASSET_H
#define ASSET_H
#include "animparts.h"
#include "model.h"
#include "material.h"
#include "materialpixelshader.h"
#include "materialtechset.h"
#include "gfximage.h"
#include "soundalias.h"
#include "soundcurve.h"
#include "loadedsound.h"
#include "clipmap.h"
#include "comworld.h"
#include "gameworld.h"
#include "mapent.h"
#include "gfxworld.h"
#include "gfxlightdef.h"
#include "gfximage.h"
#include "font.h"
#include "menulist.h"
#include "menudef.h"
#include "localizeentry.h"
#include "weapondef.h"
#include "sounddriver.h"
#include "effectdef.h"
#include "effecttable.h"
#include "rawfile.h"
#include "stringtable.h"
enum XAssetType : qint32
{
ASSET_TYPE_XMODELPIECES = 0x0,
ASSET_TYPE_PHYSPRESET = 0x1,
ASSET_TYPE_XANIMPARTS = 0x2,
ASSET_TYPE_XMODEL = 0x3,
ASSET_TYPE_MATERIAL = 0x4,
ASSET_TYPE_PIXELSHADER = 0x5,
ASSET_TYPE_TECHNIQUE_SET = 0x6,
ASSET_TYPE_IMAGE = 0x7,
ASSET_TYPE_SOUND = 0x8,
ASSET_TYPE_SOUND_CURVE = 0x9,
ASSET_TYPE_LOADED_SOUND = 0xA,
ASSET_TYPE_CLIPMAP = 0xB,
ASSET_TYPE_CLIPMAP_PVS = 0xC,
ASSET_TYPE_COMWORLD = 0xD,
ASSET_TYPE_GAMEWORLD_SP = 0xE,
ASSET_TYPE_GAMEWORLD_MP = 0xF,
ASSET_TYPE_MAP_ENTS = 0x10,
ASSET_TYPE_GFXWORLD = 0x11,
ASSET_TYPE_LIGHT_DEF = 0x12,
ASSET_TYPE_UI_MAP = 0x13,
ASSET_TYPE_FONT = 0x14,
ASSET_TYPE_MENULIST = 0x15,
ASSET_TYPE_MENU = 0x16,
ASSET_TYPE_LOCALIZE_ENTRY = 0x17,
ASSET_TYPE_WEAPON = 0x18,
ASSET_TYPE_SNDDRIVER_GLOBALS = 0x19,
ASSET_TYPE_FX = 0x1A,
ASSET_TYPE_IMPACT_FX = 0x1B,
ASSET_TYPE_AITYPE = 0x1C,
ASSET_TYPE_MPTYPE = 0x1D,
ASSET_TYPE_CHARACTER = 0x1E,
ASSET_TYPE_XMODELALIAS = 0x1F,
ASSET_TYPE_RAWFILE = 0x20,
ASSET_TYPE_STRINGTABLE = 0x21,
ASSET_TYPE_COUNT = 0x22,
ASSET_TYPE_STRING = 0x22,
ASSET_TYPE_ASSETLIST = 0x23,
};
union XAssetHeader
{
XModelPieces *xmodelPieces;
PhysPreset *physPreset;
XAnimParts *parts;
Model *model;
Material *material;
MaterialPixelShader *pixelShader;
MaterialVertexShader *vertexShader;
MaterialTechSet *techniqueSet;
GfxImage *image;
SoundAliasList *sound;
SoundCurve *sndCurve;
LoadedSound *loadSnd;
ClipMap *clipMap;
ComWorld *comWorld;
GameWorldSp *gameWorldSp;
GameWorldMp *gameWorldMp;
MapEnts *mapEnts;
GfxWorld *gfxWorld;
GfxLightDef *lightDef;
GameFont *font;
MenuList *menuList;
MenuDef *menu;
LocalizeEntry *localize;
WeaponDef *weapon;
SoundDriver *sndDriverGlobals;
const EffectDef *fx;
ImpactTable *impactFx;
RawFile *rawfile;
StringTable *stringTable;
void *data;
};
struct XAsset
{
XAssetType type;
XAssetHeader header;
};
#endif // ASSET_H

20
libs/assets/assetlist.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef ASSETLIST_H
#define ASSETLIST_H
#include "asset.h"
struct ScriptStringList
{
int count;
QVector<qint32> stringPtrs;
QStringList scriptStrings;
};
struct XAssetList
{
ScriptStringList stringList;
int assetCount;
QVector<XAsset> assets;
};
#endif // ASSETLIST_H

44
libs/assets/assets.cpp Normal file
View File

@ -0,0 +1,44 @@
#include "assets.h"
#include <QFile>
#include <QDataStream>
#include <QDebug>
Assets::Assets()
// : mStem()
// , mSize()
// , mTagCount()
// , mTags()
// , mRecordCount()
// , mRecords()
// , mAssetMap()
{
}
Assets::~Assets() {
}
Assets::Assets(const Assets &aAssets) {
// mStem = aZoneFile.mStem;
// mSize = aZoneFile.mSize;
// mTagCount = aZoneFile.mTagCount;
// mTags = aZoneFile.mTags;
// mRecordCount = aZoneFile.mRecordCount;
// mRecords = aZoneFile.mRecords;
// mAssetMap = aZoneFile.mAssetMap;
}
Assets &Assets::operator=(const Assets &other) {
if (this != &other) {
// mStem = other.mStem;
// mSize = other.mSize;
// mTagCount = other.mTagCount;
// mTags = other.mTags;
// mRecordCount = other.mRecordCount;
// mRecords = other.mRecords;
// mAssetMap = other.mAssetMap;
}
return *this;
}

200
libs/assets/assets.h Normal file
View File

@ -0,0 +1,200 @@
#ifndef ASSETS_H
#define ASSETS_H
#include "animparts.h"
#include "model.h"
#include "material.h"
#include "materialpixelshader.h"
#include "materialtechset.h"
#include "gfximage.h"
#include "soundalias.h"
#include "soundcurve.h"
#include "loadedsound.h"
#include "clipmap.h"
#include "comworld.h"
#include "gameworld.h"
#include "mapent.h"
#include "gfxworld.h"
#include "gfxlightdef.h"
#include "gfximage.h"
#include "font.h"
#include "menulist.h"
#include "menudef.h"
#include "localizeentry.h"
#include "weapondef.h"
#include "sounddriver.h"
#include "effectdef.h"
#include "effecttable.h"
#include "rawfile.h"
#include "stringtable.h"
#include <QDebug>
#include <QObject>
struct AssetMap {
QVector<std::shared_ptr<Animation>> animations;
QVector<std::shared_ptr<Model>> models;
QVector<std::shared_ptr<Material>> materials;
QVector<std::shared_ptr<MaterialPixelShader>> pixelShaders;
QVector<std::shared_ptr<MaterialTechSet>> techSets;
QVector<std::shared_ptr<GfxWorld>> gfxWorlds;
QVector<std::shared_ptr<GfxLightDef>> gfxLightDefs;
QVector<std::shared_ptr<GfxImage>> images;
QVector<std::shared_ptr<SoundAliasList>> sounds;
QVector<std::shared_ptr<SoundCurve>> soundCurves;
QVector<std::shared_ptr<LoadedSound>> loadedSounds;
QVector<std::shared_ptr<ClipMap>> clipMaps;
QVector<std::shared_ptr<ComWorld>> comWorlds;
QVector<std::shared_ptr<GameWorldSp>> gameWorldSPs;
QVector<std::shared_ptr<GameWorldMp>> gameWorldMPs;
QVector<std::shared_ptr<MapEnts>> mapEntities;
QVector<std::shared_ptr<GameFont>> fonts;
QVector<std::shared_ptr<MenuList>> menuLists;
QVector<std::shared_ptr<MenuDef>> menuDefinitions;
QVector<std::shared_ptr<LocalizeEntry>> localizeEntries;
QVector<std::shared_ptr<WeaponDef>> weaponDefinitions;
QVector<std::shared_ptr<SoundDriver>> soundDrivers;
QVector<std::shared_ptr<EffectDef>> effectDefinitions;
QVector<std::shared_ptr<ImpactTable>> impactTables;
QVector<std::shared_ptr<RawFile>> rawFiles;
QVector<std::shared_ptr<StringTable>> stringTables;
};
class Assets : public QObject
{
Q_OBJECT
public:
AssetMap assetMap;
Assets();
~Assets();
Assets(const Assets &Assets);
Assets &operator=(const Assets &other);
virtual std::shared_ptr<Animation> Load_Animation(QDataStream *aZoneFileStream) {
Animation result = {};
// Load_XAnimPartsPtr()
qint32 animationptr;
*aZoneFileStream >> animationptr;
if (animationptr) {
if (animationptr != -1 && animationptr != -2) {
return nullptr;
}
// Load_XAnimParts()
XAnimParts animParts;
*aZoneFileStream >> animParts;
}
return std::make_shared<Animation>(result);
}
virtual QString Load_XString(QDataStream *aZoneFileStream) {
QString currentStr;
qint32 stringPtr;
*aZoneFileStream >> stringPtr;
if (stringPtr) {
if (stringPtr == -1) {
currentStr = Load_XStringCustom(aZoneFileStream);
}
else {
// Resolve from g_streamBlocks
}
}
return currentStr;
}
virtual QString Load_XStringCustom(QDataStream *aZoneFileStream) {
QString currentStr;
char currentChar;
*aZoneFileStream >> currentChar;
while (currentChar != 0) {
currentStr += currentChar;
*aZoneFileStream >> currentChar;
}
return currentStr;
}
virtual std::shared_ptr<Model> Load_Model(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<Material> Load_Material(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<MaterialPixelShader> Load_MaterialPixelShader(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<MaterialTechSet> Load_MaterialTechSet(QDataStream *aZoneFileStream) {
MaterialTechSet result = {};
// Load_MaterialTechSetPtr()
qint32 techSetPtr;
*aZoneFileStream >> techSetPtr;
if (techSetPtr) {
if (techSetPtr != -1 && techSetPtr != -2) {
return nullptr;
}
// Load_MaterialTechSet()
QByteArray varMaterialTechniqueSet(116, Qt::Uninitialized);
aZoneFileStream->readRawData(varMaterialTechniqueSet.data(), 116);
aZoneFileStream->skipRawData(4);
result.name = Load_XString(aZoneFileStream);
result.techniques = Load_MaterialTechniquePtrArray(aZoneFileStream, 26);
}
return std::make_shared<MaterialTechSet>(result);
}
virtual std::shared_ptr<GfxImage> Load_GfxImage(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<SoundAliasList> Load_SoundAliasList(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<SoundCurve> Load_SoundCurve(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<LoadedSound> Load_LoadedSound(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<ClipMap> Load_ClipMap(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<ComWorld> Load_ComWorld(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<GameWorldSp> Load_GameWorldSp(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<GameWorldMp> Load_GameWorldMp(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<MapEnts> Load_MapEnts(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<GfxWorld> Load_GfxWorld(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<GfxLightDef> Load_GfxLightPtr(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<GameFont> Load_GameFont(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<MenuList> Load_MenuList(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<MenuDef> Load_MenuDef(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<LocalizeEntry> Load_LocalizeEntry(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<WeaponDef> Load_WeaponDef(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<SoundDriver> Load_SoundDriver(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<EffectDef> Load_EffectDef(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<ImpactTable> Load_ImpactTable(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<RawFile> Load_RawFile(QDataStream *aZoneFileStream) = 0;
virtual std::shared_ptr<StringTable> Load_StringTable(QDataStream *aZoneFileStream) = 0;
virtual QVector<std::shared_ptr<MaterialTechnique>> Load_MaterialTechniquePtrArray(QDataStream *aZoneFileStream, int count) {
QVector<std::shared_ptr<MaterialTechnique>> result;
for (int i = 0; i < count; i++) {
qint32 materialTechniquePtr;
*aZoneFileStream >> materialTechniquePtr;
if (materialTechniquePtr) {
if (materialTechniquePtr == -1) {
result << Load_MaterialTechnique(aZoneFileStream);
}
}
}
return result;
}
virtual std::shared_ptr<MaterialTechnique> Load_MaterialTechnique(QDataStream *aZoneFileStream) {
int passCount;
qDebug() << "D3DResource size: " << sizeof(D3DResource);
return nullptr;
}
virtual std::shared_ptr<MaterialPass> Load_MaterialPassArray(QDataStream *aZoneFileStream) {
return nullptr;
}
private slots:
private:
};
#endif // ASSETS_H

129
libs/assets/assets.pro Normal file
View File

@ -0,0 +1,129 @@
QT += core widgets
TEMPLATE = lib
CONFIG += staticlib c++17
SOURCES += \
# Base class
assets.cpp \
# 360 classes
360/assets_cod2_360.cpp \
360/assets_cod4_360.cpp \
360/assets_cod5_360.cpp \
360/assets_cod6_360.cpp \
360/assets_cod7_360.cpp \
360/assets_cod8_360.cpp \
360/assets_cod9_360.cpp \
360/assets_cod10_360.cpp \
360/assets_cod11_360.cpp \
360/assets_cod12_360.cpp \
# PS3 classes
PS3/assets_cod4_ps3.cpp \
PS3/assets_cod5_ps3.cpp \
PS3/assets_cod6_ps3.cpp \
PS3/assets_cod7_ps3.cpp \
PS3/assets_cod8_ps3.cpp \
PS3/assets_cod9_ps3.cpp \
PS3/assets_cod10_ps3.cpp \
PS3/assets_cod11_ps3.cpp \
PS3/assets_cod12_ps3.cpp \
# PC classes
PC/assets_cod4_pc.cpp \
PC/assets_cod5_pc.cpp \
PC/assets_cod6_pc.cpp \
PC/assets_cod7_pc.cpp \
PC/assets_cod8_pc.cpp \
PC/assets_cod9_pc.cpp \
PC/assets_cod10_pc.cpp \
PC/assets_cod11_pc.cpp \
PC/assets_cod12_pc.cpp \
# Wii classes
Wii/assets_cod4_wii.cpp \
Wii/assets_cod7_wii.cpp \
Wii/assets_cod8_wii.cpp \
# WiiU classes
WiiU/assets_cod9_wiiu.cpp \
WiiU/assets_cod10_wiiu.cpp
HEADERS += \
# Base class
animparts.h \
asset.h \
assetlist.h \
assets.h \
# 360 classes
360/assets_cod2_360.h \
360/assets_cod4_360.h \
360/assets_cod5_360.h \
360/assets_cod6_360.h \
360/assets_cod7_360.h \
360/assets_cod8_360.h \
360/assets_cod9_360.h \
360/assets_cod10_360.h \
360/assets_cod11_360.h \
360/assets_cod12_360.h \
# PS3 classes
PS3/assets_cod4_ps3.h \
PS3/assets_cod5_ps3.h \
PS3/assets_cod6_ps3.h \
PS3/assets_cod7_ps3.h \
PS3/assets_cod8_ps3.h \
PS3/assets_cod9_ps3.h \
PS3/assets_cod10_ps3.h \
PS3/assets_cod11_ps3.h \
PS3/assets_cod12_ps3.h \
# PC classes
PC/assets_cod4_pc.h \
PC/assets_cod5_pc.h \
PC/assets_cod6_pc.h \
PC/assets_cod7_pc.h \
PC/assets_cod8_pc.h \
PC/assets_cod9_pc.h \
PC/assets_cod10_pc.h \
PC/assets_cod11_pc.h \
PC/assets_cod12_pc.h \
# Wii classes
Wii/assets_cod4_wii.h \
Wii/assets_cod7_wii.h \
Wii/assets_cod8_wii.h \
# WiiU classes
WiiU/assets_cod9_wiiu.h \
WiiU/assets_cod10_wiiu.h \
clipmap.h \
comworld.h \
d3dresource.h \
effectdef.h \
effecttable.h \
file.h \
font.h \
gameworld.h \
gfximage.h \
gfxlightdef.h \
gfxworld.h \
loadedsound.h \
localizeentry.h \
mapent.h \
material.h \
materialpixelshader.h \
materialtechset.h \
menudef.h \
menulist.h \
model.h \
rawfile.h \
soundalias.h \
soundcurve.h \
sounddriver.h \
stringtable.h \
weapondef.h
LIBS += \
-L$$OUT_PWD/../libs/core -lcore
INCLUDEPATH += \
$$PWD/../core \
$$PWD/../../third_party/dx9_sdk/include
DEPENDPATH += \
$$PWD/../core \
$$PWD/../../third_party/dx9_sdk/include
DESTDIR = $$OUT_PWD/../

233
libs/assets/clipmap.h Normal file
View File

@ -0,0 +1,233 @@
#ifndef CLIPMAP_H
#define CLIPMAP_H
#include "model.h"
#include "mapent.h"
#include "effectdef.h"
struct cStaticModelWritable
{
unsigned __int16 nextModelInWorldSector;
};
struct cStaticModel_s
{
cStaticModelWritable writable;
Model *xmodel;
float origin[3];
float invScaledAxis[3][3];
float absmin[3];
float absmax[3];
};
struct dmaterial_t
{
char material[64];
int surfaceFlags;
int contentFlags;
};
struct cNode_t
{
cplane_s *plane;
__int16 children[2];
};
struct cLeaf_t
{
unsigned __int16 firstCollAabbIndex;
unsigned __int16 collAabbCount;
int brushContents;
int terrainContents;
float mins[3];
float maxs[3];
int leafBrushNode;
__int16 cluster;
};
struct cLeafBrushNodeLeaf_t
{
unsigned __int16 *brushes;
};
struct cLeafBrushNodeChildren_t
{
float dist;
float range;
unsigned __int16 childOffset[2];
};
union cLeafBrushNodeData_t
{
cLeafBrushNodeLeaf_t leaf;
cLeafBrushNodeChildren_t children;
};
struct cLeafBrushNode_s
{
unsigned __int8 axis;
__int16 leafBrushCount;
int contents;
cLeafBrushNodeData_t data;
};
struct CollisionBorder
{
float distEq[3];
float zBase;
float zSlope;
float start;
float length;
};
struct CollisionPartition
{
unsigned __int8 triCount;
unsigned __int8 borderCount;
int firstTri;
CollisionBorder *borders;
};
union CollisionAabbTreeIndex
{
int firstChildIndex;
int partitionIndex;
};
struct CollisionAabbTree
{
float origin[3];
float halfSize[3];
unsigned __int16 materialIndex;
unsigned __int16 childCount;
CollisionAabbTreeIndex u;
};
struct cmodel_t
{
float mins[3];
float maxs[3];
float radius;
cLeaf_t leaf;
};
struct __declspec(align(16)) cbrush_t
{
float mins[3];
int contents;
float maxs[3];
unsigned int numsides;
cbrushside_t *sides;
__int16 axialMaterialNum[2][3];
unsigned __int8 *baseAdjacentSide;
__int16 firstAdjacentSideOffsets[2][3];
unsigned __int8 edgeCount[2][3];
};
enum DynEntityType : __int32
{
DYNENT_TYPE_INVALID = 0x0,
DYNENT_TYPE_CLUTTER = 0x1,
DYNENT_TYPE_DESTRUCT = 0x2,
DYNENT_TYPE_COUNT = 0x3,
};
struct GfxPlacement
{
float quat[4];
float origin[3];
};
struct XModelPieces;
struct DynEntityDef
{
DynEntityType type;
GfxPlacement pose;
Model *xModel;
unsigned __int16 brushModel;
unsigned __int16 physicsBrushModel;
const EffectDef *destroyFx;
XModelPieces *destroyPieces;
PhysPreset *physPreset;
int health;
PhysMass mass;
int contents;
};
struct DynEntityPose
{
GfxPlacement pose;
float radius;
};
struct DynEntityClient
{
int physObjId;
unsigned __int16 flags;
unsigned __int16 lightingHandle;
int health;
};
struct DynEntityColl
{
unsigned __int16 sector;
unsigned __int16 nextEntInSector;
float linkMins[2];
float linkMaxs[2];
};
struct ClipMap
{
const char *name;
int isInUse;
int planeCount;
cplane_s *planes;
unsigned int numStaticModels;
cStaticModel_s *staticModelList;
unsigned int numMaterials;
dmaterial_t *materials;
unsigned int numBrushSides;
cbrushside_t *brushsides;
unsigned int numBrushEdges;
unsigned __int8 *brushEdges;
unsigned int numNodes;
cNode_t *nodes;
unsigned int numLeafs;
cLeaf_t *leafs;
unsigned int leafbrushNodesCount;
cLeafBrushNode_s *leafbrushNodes;
unsigned int numLeafBrushes;
unsigned __int16 *leafbrushes;
unsigned int numLeafSurfaces;
unsigned int *leafsurfaces;
unsigned int vertCount;
float (*verts)[3];
int triCount;
unsigned __int16 *triIndices;
unsigned __int8 *triEdgeIsWalkable;
int borderCount;
CollisionBorder *borders;
int partitionCount;
CollisionPartition *partitions;
int aabbTreeCount;
CollisionAabbTree *aabbTrees;
unsigned int numSubModels;
cmodel_t *cmodels;
unsigned __int16 numBrushes;
cbrush_t *brushes;
int numClusters;
int clusterBytes;
unsigned __int8 *visibility;
int vised;
MapEnts *mapEnts;
cbrush_t *box_brush;
cmodel_t box_model;
unsigned __int16 dynEntCount[2];
DynEntityDef *dynEntDefList[2];
DynEntityPose *dynEntPoseList[2];
DynEntityClient *dynEntClientList[2];
DynEntityColl *dynEntCollList[2];
unsigned int checksum;
};
#endif // CLIPMAP_H

30
libs/assets/comworld.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef COMWORLD_H
#define COMWORLD_H
struct ComPrimaryLight
{
unsigned __int8 type;
unsigned __int8 canUseShadowMap;
unsigned __int8 exponent;
unsigned __int8 unused;
float color[3];
float dir[3];
float origin[3];
float radius;
float cosHalfFovOuter;
float cosHalfFovInner;
float cosHalfFovExpanded;
float rotationLimit;
float translationLimit;
const char *defName;
};
struct ComWorld
{
const char *name;
int isInUse;
unsigned int primaryLightCount;
ComPrimaryLight *primaryLights;
};
#endif // COMWORLD_H

15
libs/assets/d3dresource.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef D3DRESOURCE_H
#define D3DRESOURCE_H
struct D3DResource
{
unsigned int Common;
unsigned int ReferenceCount;
unsigned int Fence;
unsigned int ReadFence;
unsigned int Identifier;
unsigned int BaseFlush;
};
#endif // D3DRESOURCE_H

178
libs/assets/effectdef.h Normal file
View File

@ -0,0 +1,178 @@
#ifndef EFFECTDEF_H
#define EFFECTDEF_H
#include "material.h"
#include "model.h"
struct FxSpawnDefLooping
{
int intervalMsec;
int count;
};
struct FxIntRange
{
int base;
int amplitude;
};
struct FxSpawnDefOneShot
{
FxIntRange count;
};
union FxSpawnDef
{
FxSpawnDefLooping looping;
FxSpawnDefOneShot oneShot;
};
struct FxFloatRange
{
float base;
float amplitude;
};
struct FxElemAtlas
{
unsigned __int8 behavior;
unsigned __int8 index;
unsigned __int8 fps;
unsigned __int8 loopCount;
unsigned __int8 colIndexBits;
unsigned __int8 rowIndexBits;
__int16 entryCount;
};
struct FxElemVec3Range
{
float base[3];
float amplitude[3];
};
struct FxElemVelStateInFrame
{
FxElemVec3Range velocity;
FxElemVec3Range totalDelta;
};
struct FxElemVelStateSample
{
FxElemVelStateInFrame local;
FxElemVelStateInFrame world;
};
struct FxElemVisualState
{
unsigned __int8 color[4];
float rotationDelta;
float rotationTotal;
float size[2];
float scale;
};
struct FxElemVisStateSample
{
FxElemVisualState base;
FxElemVisualState amplitude;
};
struct FxElemMarkVisuals
{
Material *materials[2];
};
struct EffectDef;
union EffectDefRef
{
const EffectDef *handle;
const char *name;
};
union FxElemVisuals
{
const void *anonymous;
Material *material;
Model *model;
EffectDefRef effectDef;
const char *soundName;
};
union FxElemDefVisuals
{
FxElemMarkVisuals *markArray;
FxElemVisuals *array;
FxElemVisuals instance;
};
struct FxTrailVertex
{
float pos[2];
float normal[2];
float texCoord;
};
struct FxTrailDef
{
int scrollTimeMsec;
int repeatDist;
int splitDist;
int vertCount;
FxTrailVertex *verts;
int indCount;
unsigned __int16 *inds;
};
struct FxElemDef
{
int flags;
FxSpawnDef spawn;
FxFloatRange spawnRange;
FxFloatRange fadeInRange;
FxFloatRange fadeOutRange;
float spawnFrustumCullRadius;
FxIntRange spawnDelayMsec;
FxIntRange lifeSpanMsec;
FxFloatRange spawnOrigin[3];
FxFloatRange spawnOffsetRadius;
FxFloatRange spawnOffsetHeight;
FxFloatRange spawnAngles[3];
FxFloatRange angularVelocity[3];
FxFloatRange initialRotation;
FxFloatRange gravity;
FxFloatRange reflectionFactor;
FxElemAtlas atlas;
unsigned __int8 elemType;
unsigned __int8 visualCount;
unsigned __int8 velIntervalCount;
unsigned __int8 visStateIntervalCount;
const FxElemVelStateSample *velSamples;
const FxElemVisStateSample *visSamples;
FxElemDefVisuals visuals;
float collMins[3];
float collMaxs[3];
EffectDefRef effectOnImpact;
EffectDefRef effectOnDeath;
EffectDefRef effectEmitted;
FxFloatRange emitDist;
FxFloatRange emitDistVariance;
FxTrailDef *trailDef;
unsigned __int8 sortOrder;
unsigned __int8 lightingFrac;
unsigned __int8 useItemClip;
unsigned __int8 unused[1];
};
struct EffectDef
{
const char *name;
int flags;
int totalSize;
int msecLoopingLife;
int elemDefCountLooping;
int elemDefCountOneShot;
int elemDefCountEmission;
const FxElemDef *elemDefs;
};
#endif // EFFECTDEF_H

18
libs/assets/effecttable.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef EFFECTTABLE_H
#define EFFECTTABLE_H
#include "effectdef.h"
struct FxImpactEntry
{
const EffectDef *nonflesh[29];
const EffectDef *flesh[4];
};
struct ImpactTable
{
const char *name;
FxImpactEntry *table;
};
#endif // EFFECTTABLE_H

13
libs/assets/file.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef FILE_H
#define FILE_H
#include <QtTypes>
struct XFile
{
quint32 size;
quint32 externalSize;
quint32 blockSize[7];
};
#endif // FILE_H

30
libs/assets/font.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef FONT_H
#define FONT_H
#include "material.h"
struct Glyph
{
unsigned __int16 letter;
char x0;
char y0;
unsigned __int8 dx;
unsigned __int8 pixelWidth;
unsigned __int8 pixelHeight;
float s0;
float t0;
float s1;
float t1;
};
struct GameFont
{
const char *fontName;
int pixelHeight;
int glyphCount;
Material *material;
Material *glowMaterial;
Glyph *glyphs;
};
#endif // FONT_H

144
libs/assets/gameworld.h Normal file
View File

@ -0,0 +1,144 @@
#ifndef GAMEWORLD_H
#define GAMEWORLD_H
enum nodeType : __int32
{
NODE_BADNODE = 0x0,
NODE_PATHNODE = 0x1,
NODE_COVER_STAND = 0x2,
NODE_COVER_CROUCH = 0x3,
NODE_COVER_CROUCH_WINDOW = 0x4,
NODE_COVER_PRONE = 0x5,
NODE_COVER_RIGHT = 0x6,
NODE_COVER_LEFT = 0x7,
NODE_COVER_WIDE_RIGHT = 0x8,
NODE_COVER_WIDE_LEFT = 0x9,
NODE_CONCEALMENT_STAND = 0xA,
NODE_CONCEALMENT_CROUCH = 0xB,
NODE_CONCEALMENT_PRONE = 0xC,
NODE_REACQUIRE = 0xD,
NODE_BALCONY = 0xE,
NODE_SCRIPTED = 0xF,
NODE_NEGOTIATION_BEGIN = 0x10,
NODE_NEGOTIATION_END = 0x11,
NODE_TURRET = 0x12,
NODE_GUARD = 0x13,
NODE_NUMTYPES = 0x14,
NODE_DONTLINK = 0x14,
};
struct pathlink_s
{
float fDist;
unsigned __int16 nodeNum;
unsigned __int8 disconnectCount;
unsigned __int8 negotiationLink;
unsigned __int8 ubBadPlaceCount[4];
};
struct pathnode_constant_t
{
nodeType type;
unsigned __int16 spawnflags;
unsigned __int16 targetname;
unsigned __int16 script_linkName;
unsigned __int16 script_noteworthy;
unsigned __int16 target;
unsigned __int16 animscript;
int animscriptfunc;
float vOrigin[3];
float fAngle;
float forward[2];
float fRadius;
float minUseDistSq;
__int16 wOverlapNode[2];
__int16 wChainId;
__int16 wChainDepth;
__int16 wChainParent;
unsigned __int16 totalLinkCount;
pathlink_s *Links;
};
struct pathnode_dynamic_t
{
void *pOwner;
int iFreeTime;
int iValidTime[3];
int inPlayerLOSTime;
__int16 wLinkCount;
__int16 wOverlapCount;
__int16 turretEntNumber;
__int16 userCount;
};
struct pathnode_t;
struct pathnode_transient_t
{
int iSearchFrame;
pathnode_t *pNextOpen;
pathnode_t *pPrevOpen;
pathnode_t *pParent;
float fCost;
float fHeuristic;
float costFactor;
};
struct pathnode_t
{
pathnode_constant_t constant;
pathnode_dynamic_t dynamic;
pathnode_transient_t transient;
};
struct pathbasenode_t
{
float vOrigin[3];
unsigned int type;
};
struct pathnode_tree_nodes_t
{
int nodeCount;
unsigned __int16 *nodes;
};
struct pathnode_tree_t;
union pathnode_tree_info_t
{
pathnode_tree_t *child[2];
pathnode_tree_nodes_t s;
};
struct pathnode_tree_t
{
int axis;
float dist;
pathnode_tree_info_t u;
};
struct PathData
{
unsigned int nodeCount;
pathnode_t *nodes;
pathbasenode_t *basenodes;
unsigned int chainNodeCount;
unsigned __int16 *chainNodeForNode;
unsigned __int16 *nodeForChainNode;
int visBytes;
unsigned __int8 *pathVis;
int nodeTreeCount;
pathnode_tree_t *nodeTree;
};
struct GameWorldSp
{
const char *name;
PathData path;
};
struct GameWorldMp
{
const char *name;
};
#endif // GAMEWORLD_H

48
libs/assets/gfximage.h Normal file
View File

@ -0,0 +1,48 @@
#ifndef GFXIMAGE_H
#define GFXIMAGE_H
#include "material.h"
struct GfxImageLoadDef;
union GfxTexture
{
D3DBaseTexture *basemap;
D3DTexture *map;
D3DVolumeTexture *volmap;
D3DCubeTexture *cubemap;
GfxImageLoadDef *loadDef;
};
struct GfxImageLoadDef
{
unsigned __int8 levelCount;
unsigned __int8 flags;
__int16 dimensions[3];
int format;
GfxTexture texture;
};
struct CardMemory
{
int platform[1];
};
struct GfxImage
{
MapType mapType;
GfxTexture texture;
unsigned __int8 semantic;
CardMemory cardMemory;
unsigned __int16 width;
unsigned __int16 height;
unsigned __int16 depth;
unsigned __int8 category;
bool delayLoadPixels;
unsigned __int8 *pixels;
unsigned int baseSize;
unsigned __int16 streamSlot;
bool streaming;
const char *name;
};
#endif // GFXIMAGE_H

18
libs/assets/gfxlightdef.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef GFXLIGHTDEF_H
#define GFXLIGHTDEF_H
#include "gfximage.h"
struct GfxLightImage
{
GfxImage *image;
unsigned __int8 samplerState;
};
struct GfxLightDef
{
const char *name;
GfxLightImage attenuation;
int lmapLookupStart;
};
#endif // GFXLIGHTDEF_H

426
libs/assets/gfxworld.h Normal file
View File

@ -0,0 +1,426 @@
#ifndef GFXWORLD_H
#define GFXWORLD_H
#include "gfximage.h"
#include "gfxlightdef.h"
#include "model.h"
struct GfxStreamingAabbTree
{
unsigned __int16 firstItem;
unsigned __int16 itemCount;
unsigned __int16 firstChild;
unsigned __int16 childCount;
float mins[3];
float maxs[3];
};
struct GfxWorldStreamInfo
{
int aabbTreeCount;
GfxStreamingAabbTree *aabbTrees;
int leafRefCount;
int *leafRefs;
};
struct GfxWorldVertex
{
float xyz[3];
float binormalSign;
GfxColor color;
float texCoord[2];
float lmapCoord[2];
PackedUnitVec normal;
PackedUnitVec tangent;
};
struct GfxWorldVertexData
{
GfxWorldVertex *vertices;
D3DVertexBuffer worldVb;
};
struct GfxWorldVertexLayerData
{
unsigned __int8 *data;
D3DVertexBuffer layerVb;
};
struct SunLightParseParams
{
char name[64];
float ambientScale;
float ambientColor[3];
float diffuseFraction;
float sunLight;
float sunColor[3];
float diffuseColor[3];
bool diffuseColorHasBeenSet;
float angles[3];
};
struct GfxLight
{
unsigned __int8 type;
unsigned __int8 canUseShadowMap;
unsigned __int8 unused[2];
float color[3];
float dir[3];
float origin[3];
float radius;
float cosHalfFovOuter;
float cosHalfFovInner;
int exponent;
unsigned int spotShadowIndex;
GfxLightDef *def;
};
struct GfxReflectionProbe
{
float origin[3];
GfxImage *reflectionImage;
};
struct GfxWorldDpvsPlanes
{
int cellCount;
cplane_s *planes;
unsigned __int16 *nodes;
unsigned int *sceneEntCellBits;
};
struct GfxAabbTree
{
float mins[3];
float maxs[3];
unsigned __int16 childCount;
unsigned __int16 surfaceCount;
unsigned __int16 startSurfIndex;
unsigned __int16 smodelIndexCount;
unsigned __int16 *smodelIndexes;
int childrenOffset;
};
struct GfxPortal;
struct GfxPortalWritable
{
bool isQueued;
bool isAncestor;
unsigned __int8 recursionDepth;
unsigned __int8 hullPointCount;
float (*hullPoints)[2];
GfxPortal *queuedParent;
};
struct DpvsPlane
{
float coeffs[4];
unsigned __int8 side[3];
unsigned __int8 pad;
};
struct GfxCell;
struct GfxPortal
{
GfxPortalWritable writable;
DpvsPlane plane;
GfxCell *cell;
float (*vertices)[3];
unsigned __int8 vertexCount;
float hullAxis[2][3];
};
struct GfxCell
{
float mins[3];
float maxs[3];
int aabbTreeCount;
GfxAabbTree *aabbTree;
int portalCount;
GfxPortal *portals;
int cullGroupCount;
int *cullGroups;
unsigned __int8 reflectionProbeCount;
unsigned __int8 *reflectionProbes;
};
struct GfxLightmapArray
{
GfxImage *primary;
GfxImage *secondary;
};
struct GfxLightGridEntry
{
unsigned __int16 colorsIndex;
unsigned __int8 primaryLightIndex;
unsigned __int8 needsTrace;
};
struct GfxLightGridColors
{
unsigned __int8 rgb[56][3];
};
struct GfxLightGrid
{
bool hasLightRegions;
unsigned int sunPrimaryLightIndex;
unsigned __int16 mins[3];
unsigned __int16 maxs[3];
unsigned int rowAxis;
unsigned int colAxis;
unsigned __int16 *rowDataStart;
unsigned int rawRowDataSize;
unsigned __int8 *rawRowData;
unsigned int entryCount;
GfxLightGridEntry *entries;
unsigned int colorCount;
GfxLightGridColors *colors;
};
struct GfxBrushModelWritable
{
float mins[3];
float maxs[3];
};
struct GfxBrushModel
{
GfxBrushModelWritable writable;
float bounds[2][3];
unsigned int surfaceCount;
unsigned int startSurfIndex;
};
struct MaterialMemory
{
Material *material;
int memory;
};
struct sunflare_t
{
bool hasValidData;
Material *spriteMaterial;
Material *flareMaterial;
float spriteSize;
float flareMinSize;
float flareMinDot;
float flareMaxSize;
float flareMaxDot;
float flareMaxAlpha;
int flareFadeInTime;
int flareFadeOutTime;
float blindMinDot;
float blindMaxDot;
float blindMaxDarken;
int blindFadeInTime;
int blindFadeOutTime;
float glareMinDot;
float glareMaxDot;
float glareMaxLighten;
int glareFadeInTime;
int glareFadeOutTime;
float sunFxPosition[3];
};
struct XModelDrawInfo
{
unsigned __int16 lod;
unsigned __int16 surfId;
};
struct GfxSceneDynModel
{
XModelDrawInfo info;
unsigned __int16 dynEntId;
};
struct BModelDrawInfo
{
unsigned __int16 surfId;
};
struct GfxSceneDynBrush
{
BModelDrawInfo info;
unsigned __int16 dynEntId;
};
struct GfxShadowGeometry
{
unsigned __int16 surfaceCount;
unsigned __int16 smodelCount;
unsigned __int16 *sortedSurfIndex;
unsigned __int16 *smodelIndex;
};
struct GfxLightRegionAxis
{
float dir[3];
float midPoint;
float halfSize;
};
struct GfxLightRegionHull
{
float kdopMidPoint[9];
float kdopHalfSize[9];
unsigned int axisCount;
GfxLightRegionAxis *axis;
};
struct GfxLightRegion
{
unsigned int hullCount;
GfxLightRegionHull *hulls;
};
struct GfxStaticModelInst
{
float mins[3];
float maxs[3];
GfxColor groundLighting;
};
struct srfTriangles_t
{
int vertexLayerData;
int firstVertex;
unsigned __int16 vertexCount;
unsigned __int16 triCount;
int baseIndex;
float topMipMins[3];
float topMipMaxs[3];
};
struct GfxSurface
{
srfTriangles_t tris;
Material *material;
unsigned __int8 lightmapIndex;
unsigned __int8 reflectionProbeIndex;
unsigned __int8 primaryLightIndex;
bool castsSunShadow;
float bounds[2][3];
};
struct GfxCullGroup
{
float mins[3];
float maxs[3];
int surfaceCount;
int startSurfIndex;
};
struct GfxPackedPlacement
{
float origin[3];
PackedUnitVec axis[3];
float scale;
};
struct GfxStaticModelDrawInst
{
float cullDist;
GfxPackedPlacement placement;
Model *model;
unsigned __int8 reflectionProbeIndex;
unsigned __int8 primaryLightIndex;
unsigned __int16 lightingHandle;
unsigned __int8 flags;
};
struct GfxWorldDpvsStatic
{
unsigned int smodelCount;
unsigned int staticSurfaceCount;
unsigned int litSurfsBegin;
unsigned int litSurfsEnd;
unsigned int decalSurfsBegin;
unsigned int decalSurfsEnd;
unsigned int emissiveSurfsBegin;
unsigned int emissiveSurfsEnd;
unsigned int smodelVisDataCount;
unsigned int surfaceVisDataCount;
unsigned __int8 *smodelVisData[3];
unsigned __int8 *surfaceVisData[3];
unsigned int *lodData;
unsigned __int16 *sortedSurfIndex;
GfxStaticModelInst *smodelInsts;
GfxSurface *surfaces;
GfxCullGroup *cullGroups;
GfxStaticModelDrawInst *smodelDrawInsts;
GfxDrawSurf *surfaceMaterials;
unsigned int *surfaceCastsSunShadow;
volatile int usageCount;
};
struct GfxWorldDpvsDynamic
{
unsigned int dynEntClientWordCount[2];
unsigned int dynEntClientCount[2];
unsigned int *dynEntCellBits[2];
unsigned __int8 *dynEntVisData[2][3];
};
struct GfxWorld
{
const char *name;
const char *baseName;
int planeCount;
int nodeCount;
int indexCount;
unsigned __int16 *indices;
D3DIndexBuffer indexBuffer;
int surfaceCount;
GfxWorldStreamInfo streamInfo;
int skySurfCount;
int *skyStartSurfs;
GfxImage *skyImage;
unsigned __int8 skySamplerState;
unsigned int vertexCount;
GfxWorldVertexData vd;
unsigned int vertexLayerDataSize;
GfxWorldVertexLayerData vld;
SunLightParseParams sunParse;
GfxLight *sunLight;
float sunColorFromBsp[3];
unsigned int sunPrimaryLightIndex;
unsigned int primaryLightCount;
int cullGroupCount;
unsigned int reflectionProbeCount;
GfxReflectionProbe *reflectionProbes;
GfxTexture *reflectionProbeTextures;
GfxWorldDpvsPlanes dpvsPlanes;
int cellBitsCount;
GfxCell *cells;
int lightmapCount;
GfxLightmapArray *lightmaps;
GfxLightGrid lightGrid;
GfxTexture *lightmapPrimaryTextures;
GfxTexture *lightmapSecondaryTextures;
int modelCount;
GfxBrushModel *models;
float mins[3];
float maxs[3];
unsigned int checksum;
int materialMemoryCount;
MaterialMemory *materialMemory;
sunflare_t sun;
float outdoorLookupMatrix[4][4];
GfxImage *outdoorImage;
unsigned int *cellCasterBits;
GfxSceneDynModel *sceneDynModel;
GfxSceneDynBrush *sceneDynBrush;
unsigned int *primaryLightEntityShadowVis;
unsigned int *primaryLightDynEntShadowVis[2];
unsigned __int8 *nonSunPrimaryLightForModelDynEnt;
GfxShadowGeometry *shadowGeom;
GfxLightRegion *lightRegion;
GfxWorldDpvsStatic dpvs;
GfxWorldDpvsDynamic dpvsDyn;
};
#endif // GFXWORLD_H

72
libs/assets/loadedsound.h Normal file
View File

@ -0,0 +1,72 @@
#ifndef LOADEDSOUND_H
#define LOADEDSOUND_H
struct XMALOOPREGION
{
unsigned int LoopStart;
unsigned int LoopEnd;
unsigned __int8 LoopSubframeEnd;
unsigned __int8 LoopSubframeSkip;
};
struct XAUDIOPACKET_ALIGNED
{
char *pBuffer;
unsigned int BufferSize;
unsigned int LoopCount;
XMALOOPREGION XMALoop[6];
char *pContext;
};
union $A914CD29B804E77ACE08D070A31DB5AB
{
unsigned __int8 NumStreams;
unsigned __int8 ChannelCount;
};
struct XAUDIOXMAFORMAT
{
unsigned int SampleRate;
unsigned __int8 ChannelCount;
unsigned __int8 DecodeBufferSize;
};
union $9C5A25260C9CC66355FE8A35CC8403E0
{
XAUDIOXMAFORMAT Stream[6];
unsigned int SampleRate;
};
struct XAUDIOSOURCEFORMAT
{
unsigned __int8 SampleType;
$A914CD29B804E77ACE08D070A31DB5AB ___u1;
$9C5A25260C9CC66355FE8A35CC8403E0 ___u2;
};
struct XaIwXmaDataInfo
{
int totalMsec;
};
struct XaSeekTable
{
int size;
unsigned int *data;
};
struct XaSound
{
XAUDIOPACKET_ALIGNED packet;
XAUDIOSOURCEFORMAT format;
XaIwXmaDataInfo xaIwXmaDataInfo;
XaSeekTable seekTable;
};
struct LoadedSound
{
const char *name;
XaSound sound;
};
#endif // LOADEDSOUND_H

View File

@ -0,0 +1,18 @@
#ifndef LOCALIZEENTRY_H
#define LOCALIZEENTRY_H
#include <QString>
struct p_LocalizeEntry
{
const char *value;
const char *name;
};
struct LocalizeEntry : p_LocalizeEntry
{
QString value;
QString name;
};
#endif // LOCALIZEENTRY_H

11
libs/assets/mapent.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef MAPENT_H
#define MAPENT_H
struct MapEnts
{
const char *name;
char *entityString;
int numEntityChars;
};
#endif // MAPENT_H

219
libs/assets/material.h Normal file
View File

@ -0,0 +1,219 @@
#ifndef MATERIAL_H
#define MATERIAL_H
#include "materialtechset.h"
struct GfxDrawSurfFields
{
unsigned __int64 objectId : 16;
unsigned __int64 reflectionProbeIndex : 8;
unsigned __int64 customIndex : 5;
unsigned __int64 materialSortedIndex : 11;
unsigned __int64 prepass : 2;
unsigned __int64 primaryLightIndex : 8;
unsigned __int64 surfType : 4;
unsigned __int64 primarySortKey : 6;
unsigned __int64 unused : 4;
};
union GfxDrawSurf
{
GfxDrawSurfFields fields;
unsigned __int64 packed;
};
struct __declspec(align(8)) MaterialInfo
{
const char *name;
unsigned __int8 gameFlags;
unsigned __int8 sortKey;
unsigned __int8 textureAtlasRowCount;
unsigned __int8 textureAtlasColumnCount;
GfxDrawSurf drawSurf;
unsigned int surfaceTypeBits;
};
enum MapType : __int32
{
MAPTYPE_NONE = 0x0,
MAPTYPE_INVALID1 = 0x1,
MAPTYPE_INVALID2 = 0x2,
MAPTYPE_2D = 0x3,
MAPTYPE_3D = 0x4,
MAPTYPE_CUBE = 0x5,
MAPTYPE_COUNT = 0x6,
};
struct GPUTEXTURESIZE_1D
{
unsigned __int32 Width : 24;
};
struct GPUTEXTURESIZE_2D
{
unsigned __int32 Width : 13;
unsigned __int32 Height : 13;
};
struct GPUTEXTURESIZE_3D
{
unsigned __int32 Width : 11;
unsigned __int32 Height : 11;
unsigned __int32 Depth : 10;
};
struct GPUTEXTURESIZE_STACK
{
unsigned __int32 Width : 13;
unsigned __int32 Height : 13;
unsigned __int32 Depth : 6;
};
struct $FD14676823C8BF1A2A32FD1720A565E9
{
unsigned __int32 Type : 2;
unsigned __int32 SignX : 2;
unsigned __int32 SignY : 2;
unsigned __int32 SignZ : 2;
unsigned __int32 SignW : 2;
unsigned __int32 ClampX : 3;
unsigned __int32 ClampY : 3;
unsigned __int32 ClampZ : 3;
unsigned __int32 : 3;
unsigned __int32 Pitch : 9;
unsigned __int32 Tiled : 1;
unsigned __int32 DataFormat : 6;
unsigned __int32 Endian : 2;
unsigned __int32 RequestSize : 2;
unsigned __int32 Stacked : 1;
unsigned __int32 ClampPolicy : 1;
unsigned __int32 BaseAddress : 20;
union
{
GPUTEXTURESIZE_1D OneD;
GPUTEXTURESIZE_2D TwoD;
GPUTEXTURESIZE_3D ThreeD;
GPUTEXTURESIZE_STACK Stack;
} Size;
unsigned __int32 NumFormat : 1;
unsigned __int32 SwizzleX : 3;
unsigned __int32 SwizzleY : 3;
unsigned __int32 SwizzleZ : 3;
unsigned __int32 SwizzleW : 3;
__int32 ExpAdjust : 6;
unsigned __int32 MagFilter : 2;
unsigned __int32 MinFilter : 2;
unsigned __int32 MipFilter : 2;
unsigned __int32 AnisoFilter : 3;
unsigned __int32 : 3;
unsigned __int32 BorderSize : 1;
unsigned __int32 VolMagFilter : 1;
unsigned __int32 VolMinFilter : 1;
unsigned __int32 MinMipLevel : 4;
unsigned __int32 MaxMipLevel : 4;
unsigned __int32 MagAnisoWalk : 1;
unsigned __int32 MinAnisoWalk : 1;
__int32 LODBias : 10;
__int32 GradExpAdjustH : 5;
__int32 GradExpAdjustV : 5;
unsigned __int32 BorderColor : 2;
unsigned __int32 ForceBCWToMax : 1;
unsigned __int32 TriClamp : 2;
__int32 AnisoBias : 4;
unsigned __int32 Dimension : 2;
unsigned __int32 PackedMips : 1;
unsigned __int32 MipAddress : 20;
};
union GPUTEXTURE_FETCH_CONSTANT
{
$FD14676823C8BF1A2A32FD1720A565E9 __s0;
unsigned int dword[6];
};
struct D3DBaseTexture : D3DResource
{
unsigned int MipFlush;
GPUTEXTURE_FETCH_CONSTANT Format;
};
struct D3DTexture : D3DBaseTexture
{
};
struct D3DVolumeTexture : D3DBaseTexture
{
};
struct D3DCubeTexture : D3DBaseTexture
{
};
struct WaterWritable
{
float floatTime;
};
struct GfxImage;
struct water_t
{
WaterWritable writable;
float *H0X;
float *H0Y;
float *wTerm;
int M;
int N;
float Lx;
float Lz;
float gravity;
float windvel;
float winddir[2];
float amplitude;
float codeConstant[4];
GfxImage *image;
};
union MaterialTextureDefInfo
{
GfxImage *image;
water_t *water;
};
struct MaterialTextureDef
{
unsigned int nameHash;
char nameStart;
char nameEnd;
unsigned __int8 samplerState;
unsigned __int8 semantic;
MaterialTextureDefInfo u;
};
struct MaterialConstantDef
{
unsigned int nameHash;
char name[12];
float literal[4];
};
struct GfxStateBits
{
unsigned int loadBits[2];
};
struct Material
{
MaterialInfo info;
unsigned __int8 stateBitsEntry[26];
unsigned __int8 textureCount;
unsigned __int8 constantCount;
unsigned __int8 stateBitsCount;
unsigned __int8 stateFlags;
unsigned __int8 cameraRegion;
MaterialTechSet *techniqueSet;
MaterialTextureDef *textureTable;
MaterialConstantDef *constantTable;
GfxStateBits *stateBitsTable;
};
#endif // MATERIAL_H

View File

@ -0,0 +1,30 @@
#ifndef MATERIAL_PIXERHSHADER_H
#define MATERIAL_PIXERHSHADER_H
#include "d3dresource.h"
struct GfxPixelShaderLoadDef
{
unsigned __int8 *cachedPart;
unsigned __int8 *physicalPart;
unsigned __int16 cachedPartSize;
unsigned __int16 physicalPartSize;
};
struct D3DPixelShader : D3DResource
{
};
union Material_PixelShaderProgram
{
D3DPixelShader *ps;
GfxPixelShaderLoadDef loadDef;
};
struct MaterialPixelShader
{
const char *name;
Material_PixelShaderProgram prog;
};
#endif // MATERIAL_PIXERHSHADER_H

View File

@ -0,0 +1,109 @@
#ifndef MATERIALTECHSET_H
#define MATERIALTECHSET_H
#include "d3dresource.h"
#include "materialpixelshader.h"
#include "QString"
#include "qobject.h"
struct MaterialStreamRouting
{
quint8 source;
quint8 dest;
};
struct D3DVertexDeclaration : D3DResource
{
};
struct MaterialVertexStreamRouting
{
MaterialStreamRouting data[16];
D3DVertexDeclaration *decl[15];
};
struct MaterialVertexDeclaration
{
int streamCount;
bool hasOptionalSource;
MaterialVertexStreamRouting routing;
};
struct D3DVertexShader : D3DResource
{
};
struct GfxVertexShaderLoadDef
{
int *cachedPart;
int *physicalPart;
int cachedPartSize;
int physicalPartSize;
};
struct MaterialVertexShaderProgram
{
std::shared_ptr<D3DVertexShader> vertexShader;
GfxVertexShaderLoadDef loadDef;
};
struct MaterialVertexShader
{
QString name;
MaterialVertexShaderProgram prog;
};
struct MaterialArgumentCodeConst
{
int index;
int firstRow;
int rowCount;
};
struct MaterialArgumentDef
{
const float *literalConst;
MaterialArgumentCodeConst codeConst;
unsigned int codeSampler;
unsigned int nameHash;
};
struct MaterialShaderArgument
{
int type;
int dest;
MaterialArgumentDef u;
};
struct MaterialPass
{
std::shared_ptr<MaterialVertexDeclaration> vertexDecl;
QVector<std::shared_ptr<MaterialVertexShader>> vertexShaderArray;
std::shared_ptr<MaterialVertexShader> vertexShader;
std::shared_ptr<MaterialPixelShader> pixelShader;
int perPrimArgCount;
int perObjArgCount;
int stableArgCount;
int customSamplerFlags;
int precompiledIndex;
std::shared_ptr<MaterialShaderArgument> args;
};
struct MaterialTechnique
{
QString *name;
int flags;
int passCount;
QVector<std::shared_ptr<MaterialPass>> passArray;
};
struct MaterialTechSet
{
QString name;
int worldVertFormat;
std::shared_ptr<MaterialTechSet> remappedTechniqueSet;
QVector<std::shared_ptr<MaterialTechnique>> techniques;
};
#endif // MATERIALTECHSET_H

301
libs/assets/menudef.h Normal file
View File

@ -0,0 +1,301 @@
#ifndef MENUDEF_H
#define MENUDEF_H
#include "soundalias.h"
#include "material.h"
struct rectDef_s
{
float x;
float y;
float w;
float h;
int horzAlign;
int vertAlign;
};
struct windowDef_t
{
const char *name;
rectDef_s rect;
rectDef_s rectClient;
const char *group;
int style;
int border;
int ownerDraw;
int ownerDrawFlags;
float borderSize;
int staticFlags;
int dynamicFlags[4];
int nextTime;
float foreColor[4];
float backColor[4];
float borderColor[4];
float outlineColor[4];
Material *background;
};
struct ItemKeyHandler
{
int key;
const char *action;
ItemKeyHandler *next;
};
enum operationEnum : __int32
{
OP_NOOP = 0x0,
OP_RIGHTPAREN = 0x1,
OP_MULTIPLY = 0x2,
OP_DIVIDE = 0x3,
OP_MODULUS = 0x4,
OP_ADD = 0x5,
OP_SUBTRACT = 0x6,
OP_NOT = 0x7,
OP_LESSTHAN = 0x8,
OP_LESSTHANEQUALTO = 0x9,
OP_GREATERTHAN = 0xA,
OP_GREATERTHANEQUALTO = 0xB,
OP_EQUALS = 0xC,
OP_NOTEQUAL = 0xD,
OP_AND = 0xE,
OP_OR = 0xF,
OP_LEFTPAREN = 0x10,
OP_COMMA = 0x11,
OP_BITWISEAND = 0x12,
OP_BITWISEOR = 0x13,
OP_BITWISENOT = 0x14,
OP_BITSHIFTLEFT = 0x15,
OP_BITSHIFTRIGHT = 0x16,
OP_SIN = 0x17,
OP_FIRSTFUNCTIONCALL = 0x17,
OP_COS = 0x18,
OP_MIN = 0x19,
OP_MAX = 0x1A,
OP_MILLISECONDS = 0x1B,
OP_DVARINT = 0x1C,
OP_DVARBOOL = 0x1D,
OP_DVARFLOAT = 0x1E,
OP_DVARSTRING = 0x1F,
OP_STAT = 0x20,
OP_UIACTIVE = 0x21,
OP_FLASHBANGED = 0x22,
OP_SCOPED = 0x23,
OP_SCOREBOARDVISIBLE = 0x24,
OP_INKILLCAM = 0x25,
OP_PLAYERFIELD = 0x26,
OP_SELECTINGLOCATION = 0x27,
OP_TEAMFIELD = 0x28,
OP_OTHERTEAMFIELD = 0x29,
OP_MARINESFIELD = 0x2A,
OP_OPFORFIELD = 0x2B,
OP_MENUISOPEN = 0x2C,
OP_WRITINGDATA = 0x2D,
OP_INLOBBY = 0x2E,
OP_INPRIVATEPARTY = 0x2F,
OP_PRIVATEPARTYHOST = 0x30,
OP_PRIVATEPARTYHOSTINLOBBY = 0x31,
OP_ALONEINPARTY = 0x32,
OP_ADSJAVELIN = 0x33,
OP_WEAPLOCKBLINK = 0x34,
OP_WEAPATTACKTOP = 0x35,
OP_WEAPATTACKDIRECT = 0x36,
OP_SECONDSASTIME = 0x37,
OP_TABLELOOKUP = 0x38,
OP_LOCALIZESTRING = 0x39,
OP_LOCALVARINT = 0x3A,
OP_LOCALVARBOOL = 0x3B,
OP_LOCALVARFLOAT = 0x3C,
OP_LOCALVARSTRING = 0x3D,
OP_TIMELEFT = 0x3E,
OP_SECONDSASCOUNTDOWN = 0x3F,
OP_GAMEMSGWNDACTIVE = 0x40,
OP_TOINT = 0x41,
OP_TOSTRING = 0x42,
OP_TOFLOAT = 0x43,
OP_GAMETYPENAME = 0x44,
OP_GAMETYPE = 0x45,
OP_GAMETYPEDESCRIPTION = 0x46,
OP_SCORE = 0x47,
OP_FRIENDSONLINE = 0x48,
OP_FOLLOWING = 0x49,
OP_STATRANGEBITSSET = 0x4A,
OP_KEYBINDING = 0x4B,
OP_ACTIONSLOTUSABLE = 0x4C,
OP_HUDFADE = 0x4D,
OP_MAXPLAYERS = 0x4E,
OP_ACCEPTINGINVITE = 0x4F,
NUM_OPERATORS = 0x50,
};
enum expDataType : __int32
{
VAL_INT = 0x0,
VAL_FLOAT = 0x1,
VAL_STRING = 0x2,
};
union operandInternalDataUnion
{
int intVal;
float floatVal;
const char *string;
};
struct Operand
{
expDataType dataType;
operandInternalDataUnion internals;
};
union entryInternalData
{
operationEnum op;
Operand operand;
};
struct expressionEntry
{
int type;
entryInternalData data;
};
struct statement_s
{
int numEntries;
expressionEntry **entries;
};
struct columnInfo_s
{
int pos;
int width;
int maxChars;
int alignment;
};
struct listBoxDef_s
{
int startPos[4];
int endPos[4];
int drawPadding;
float elementWidth;
float elementHeight;
int elementStyle;
int numColumns;
columnInfo_s columnInfo[16];
const char *doubleClick;
int notselectable;
int noScrollBars;
int usePaging;
float selectBorder[4];
float disableColor[4];
Material *selectIcon;
};
struct editFieldDef_s
{
float minVal;
float maxVal;
float defVal;
float range;
int maxChars;
int maxCharsGotoNext;
int maxPaintChars;
int paintOffset;
};
struct multiDef_s
{
const char *dvarList[32];
const char *dvarStr[32];
float dvarValue[32];
int count;
int strDef;
};
union itemDefData_t
{
listBoxDef_s *listBox;
editFieldDef_s *editField;
multiDef_s *multi;
const char *enumDvarName;
void *data;
};
struct MenuDef;
struct itemDef_s
{
windowDef_t window;
rectDef_s textRect[4];
int type;
int dataType;
int alignment;
int fontEnum;
int textAlignMode;
float textalignx;
float textaligny;
float textscale;
int textStyle;
int gameMsgWindowIndex;
int gameMsgWindowMode;
const char *text;
int itemFlags;
MenuDef *parent;
const char *mouseEnterText;
const char *mouseExitText;
const char *mouseEnter;
const char *mouseExit;
const char *action;
const char *onAccept;
const char *onFocus;
const char *leaveFocus;
const char *dvar;
const char *dvarTest;
ItemKeyHandler *onKey;
const char *enableDvar;
int dvarFlags;
SoundAliasList *focusSound;
float special;
int cursorPos[4];
itemDefData_t typeData;
int imageTrack;
statement_s visibleExp;
statement_s textExp;
statement_s materialExp;
statement_s rectXExp;
statement_s rectYExp;
statement_s rectWExp;
statement_s rectHExp;
statement_s forecolorAExp;
};
struct MenuDef
{
windowDef_t window;
const char *font;
int fullScreen;
int itemCount;
int fontIndex;
int cursorItem[4];
int fadeCycle;
float fadeClamp;
float fadeAmount;
float fadeInAmount;
float blurRadius;
const char *onOpen;
const char *onClose;
const char *onESC;
ItemKeyHandler *onKey;
statement_s visibleExp;
const char *allowedBinding;
const char *soundName;
int imageTrack;
float focusColor[4];
float disableColor[4];
statement_s rectXExp;
statement_s rectYExp;
itemDef_s **items;
};
#endif // MENUDEF_H

13
libs/assets/menulist.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef MENULIST_H
#define MENULIST_H
#include "menudef.h"
struct MenuList
{
const char *name;
int menuCount;
MenuDef **menus;
};
#endif // MENULIST_H

264
libs/assets/model.h Normal file
View File

@ -0,0 +1,264 @@
#ifndef MODEL_H
#define MODEL_H
#include "material.h"
struct XSurfaceVertexInfo
{
__int16 vertCount[4];
unsigned __int16 *vertsBlend;
};
union GfxColor
{
unsigned int packed;
unsigned __int8 array[4];
};
union PackedTexCoords
{
unsigned int packed;
};
union PackedUnitVec
{
unsigned int packed;
};
struct GfxPackedVertex
{
float xyz[3];
float binormalSign;
GfxColor color;
PackedTexCoords texCoord;
PackedUnitVec normal;
PackedUnitVec tangent;
};
struct $E41E24A1CD47CDFA361AA9F99910948B
{
unsigned __int32 Type : 2;
unsigned __int32 BaseAddress : 30;
unsigned __int32 Endian : 2;
unsigned __int32 Size : 24;
unsigned __int32 AddressClamp : 1;
unsigned __int32 : 1;
unsigned __int32 RequestSize : 2;
unsigned __int32 ClampDisable : 2;
};
union GPUVERTEX_FETCH_CONSTANT
{
$E41E24A1CD47CDFA361AA9F99910948B __s0;
unsigned int dword[2];
};
struct D3DVertexBuffer : D3DResource
{
GPUVERTEX_FETCH_CONSTANT Format;
};
struct XSurfaceCollisionAabb
{
unsigned __int16 mins[3];
unsigned __int16 maxs[3];
};
struct XSurfaceCollisionNode
{
XSurfaceCollisionAabb aabb;
unsigned __int16 childBeginIndex;
unsigned __int16 childCount;
};
struct XSurfaceCollisionLeaf
{
unsigned __int16 triangleBeginIndex;
};
struct XSurfaceCollisionTree
{
float trans[3];
float scale[3];
unsigned int nodeCount;
XSurfaceCollisionNode *nodes;
unsigned int leafCount;
XSurfaceCollisionLeaf *leafs;
};
struct XRigidVertList
{
unsigned __int16 boneOffset;
unsigned __int16 vertCount;
unsigned __int16 triOffset;
unsigned __int16 triCount;
XSurfaceCollisionTree *collisionTree;
};
struct D3DIndexBuffer : D3DResource
{
unsigned int Address;
unsigned int Size;
};
struct XSurface
{
unsigned __int8 tileMode;
bool deformed;
unsigned __int16 vertCount;
unsigned __int16 triCount;
unsigned __int16 *triIndices;
XSurfaceVertexInfo vertInfo;
GfxPackedVertex *verts0;
D3DVertexBuffer vb0;
unsigned int vertListCount;
XRigidVertList *vertList;
D3DIndexBuffer indexBuffer;
int partBits[4];
};
struct DObjAnimMat
{
float quat[4];
float trans[3];
float transWeight;
};
struct XModelLodInfo
{
float dist;
unsigned __int16 numsurfs;
unsigned __int16 surfIndex;
int partBits[4];
};
struct XModelCollSurf_s
{
float mins[3];
float maxs[3];
int boneIdx;
int contents;
int surfFlags;
};
struct XBoneInfo
{
float bounds[2][3];
float offset[3];
float radiusSquared;
};
struct XModelHighMipBounds
{
float mins[3];
float maxs[3];
};
struct XModelStreamInfo
{
XModelHighMipBounds *highMipBounds;
};
struct PhysPreset
{
const char *name;
int type;
float mass;
float bounce;
float friction;
float bulletForceScale;
float explosiveForceScale;
const char *sndAliasPrefix;
float piecesSpreadFraction;
float piecesUpwardVelocity;
bool tempDefaultToCylinder;
};
struct cplane_s
{
float normal[3];
float dist;
unsigned __int8 type;
unsigned __int8 signbits;
unsigned __int8 pad[2];
};
struct cbrushside_t
{
cplane_s *plane;
unsigned int materialNum;
__int16 firstAdjacentSideOffset;
unsigned __int8 edgeCount;
};
struct BrushWrapper
{
float mins[3];
int contents;
float maxs[3];
unsigned int numsides;
cbrushside_t *sides;
__int16 axialMaterialNum[2][3];
unsigned __int8 *baseAdjacentSide;
__int16 firstAdjacentSideOffsets[2][3];
unsigned __int8 edgeCount[2][3];
int totalEdgeCount;
cplane_s *planes;
};
struct PhysGeomInfo
{
BrushWrapper *brush;
int type;
float orientation[3][3];
float offset[3];
float halfLengths[3];
};
struct PhysMass
{
float centerOfMass[3];
float momentsOfInertia[3];
float productsOfInertia[3];
};
struct PhysGeomList
{
unsigned int count;
PhysGeomInfo *geoms;
PhysMass mass;
};
struct Model
{
const char *name;
unsigned __int8 numBones;
unsigned __int8 numRootBones;
unsigned __int8 numsurfs;
unsigned __int8 lodRampType;
unsigned __int16 *boneNames;
unsigned __int8 *parentList;
__int16 *quats;
float *trans;
unsigned __int8 *partClassification;
DObjAnimMat *baseMat;
XSurface *surfs;
Material **materialHandles;
XModelLodInfo lodInfo[4];
XModelCollSurf_s *collSurfs;
int numCollSurfs;
int contents;
XBoneInfo *boneInfo;
float radius;
float mins[3];
float maxs[3];
__int16 numLods;
__int16 collLod;
XModelStreamInfo streamInfo;
int memUsage;
unsigned __int8 flags;
PhysPreset *physPreset;
PhysGeomList *physGeoms;
};
#endif // MODEL_H

20
libs/assets/rawfile.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef RAWFILE_H
#define RAWFILE_H
#include <QString>
struct p_RawFile
{
const char *name;
int length;
const char *buffer;
};
struct RawFile : p_RawFile
{
QString name;
QString path;
int length;
};
#endif // RAWFILE_H

103
libs/assets/soundalias.h Normal file
View File

@ -0,0 +1,103 @@
#ifndef SOUNDALIAS_H
#define SOUNDALIAS_H
#include "soundcurve.h"
#include "loadedsound.h"
struct StreamFileNameRaw
{
const char *dir;
const char *name;
};
struct StreamFileNamePacked
{
unsigned int offset;
unsigned int length;
};
union StreamFileInfo
{
StreamFileNameRaw raw;
StreamFileNamePacked packed;
};
struct StreamFileName
{
unsigned int fileIndex;
StreamFileInfo info;
};
struct StreamedSound
{
StreamFileName filename;
};
union SoundFileRef
{
LoadedSound *loadSnd;
StreamedSound streamSnd;
};
struct SoundFile
{
unsigned __int8 type;
unsigned __int8 exists;
SoundFileRef u;
};
struct XAUDIOCHANNELMAPENTRY
{
unsigned __int8 InputChannel;
unsigned __int8 OutputChannel;
float Volume;
};
struct XAUDIOCHANNELMAP
{
unsigned __int8 EntryCount;
XAUDIOCHANNELMAPENTRY *paEntries;
};
struct SpeakerMap
{
bool isDefault;
const char *name;
XAUDIOCHANNELMAP channelMaps[2][2];
};
struct snd_alias_t
{
const char *aliasName;
const char *subtitle;
const char *secondaryAliasName;
const char *chainAliasName;
SoundFile *soundFile;
int sequence;
float volMin;
float volMax;
float pitchMin;
float pitchMax;
float distMin;
float distMax;
int flags;
float slavePercentage;
float probability;
float lfePercentage;
float centerPercentage;
int startDelay;
SoundCurve *volumeFalloffCurve;
float envelopMin;
float envelopMax;
float envelopPercentage;
SpeakerMap *speakerMap;
};
struct SoundAliasList
{
const char *aliasName;
snd_alias_t *head;
int count;
};
#endif // SOUNDALIAS_H

11
libs/assets/soundcurve.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef SOUNDCURVE_H
#define SOUNDCURVE_H
struct SoundCurve
{
const char *filename;
int knotCount;
float knots[8][2];
};
#endif // SOUNDCURVE_H

41
libs/assets/sounddriver.h Normal file
View File

@ -0,0 +1,41 @@
#ifndef SoundDriver_H
#define SoundDriver_H
struct XAUDIOREVERBSETTINGS
{
unsigned int ReflectionsDelay;
unsigned __int8 ReverbDelay;
unsigned __int8 RearDelay;
unsigned __int8 PositionLeft;
unsigned __int8 PositionRight;
unsigned __int8 PositionMatrixLeft;
unsigned __int8 PositionMatrixRight;
unsigned __int8 EarlyDiffusion;
unsigned __int8 LateDiffusion;
unsigned __int8 LowEQGain;
unsigned __int8 LowEQCutoff;
unsigned __int8 HighEQGain;
unsigned __int8 HighEQCutoff;
float RoomFilterFreq;
float RoomFilterMain;
float RoomFilterHF;
float ReflectionsGain;
float ReverbGain;
float DecayTime;
float Density;
float RoomSize;
};
struct XaReverbSettings
{
int presetOverridden;
XAUDIOREVERBSETTINGS reverbSettings;
};
struct SoundDriver
{
XaReverbSettings *reverbSettings;
const char *name;
};
#endif // SoundDriver_H

12
libs/assets/stringtable.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef STRINGTABLESH_H
#define STRINGTABLESH_H
struct StringTable
{
const char *name;
int columnCount;
int rowCount;
const char **values;
};
#endif // STRINGTABLESH_H

531
libs/assets/weapondef.h Normal file
View File

@ -0,0 +1,531 @@
#ifndef WEAPONDEF_H
#define WEAPONDEF_H
#include "clipmap.h"
#include "soundalias.h"
#include "model.h"
enum weapType_t : __int32
{
WEAPTYPE_BULLET = 0x0,
WEAPTYPE_GRENADE = 0x1,
WEAPTYPE_PROJECTILE = 0x2,
WEAPTYPE_BINOCULARS = 0x3,
WEAPTYPE_NUM = 0x4,
};
enum weapClass_t : __int32
{
WEAPCLASS_RIFLE = 0x0,
WEAPCLASS_MG = 0x1,
WEAPCLASS_SMG = 0x2,
WEAPCLASS_SPREAD = 0x3,
WEAPCLASS_PISTOL = 0x4,
WEAPCLASS_GRENADE = 0x5,
WEAPCLASS_ROCKETLAUNCHER = 0x6,
WEAPCLASS_TURRET = 0x7,
WEAPCLASS_NON_PLAYER = 0x8,
WEAPCLASS_ITEM = 0x9,
WEAPCLASS_NUM = 0xA,
};
enum PenetrateType : __int32
{
PENETRATE_TYPE_NONE = 0x0,
PENETRATE_TYPE_SMALL = 0x1,
PENETRATE_TYPE_MEDIUM = 0x2,
PENETRATE_TYPE_LARGE = 0x3,
PENETRATE_TYPE_COUNT = 0x4,
};
enum ImpactType : __int32
{
IMPACT_TYPE_NONE = 0x0,
IMPACT_TYPE_BULLET_SMALL = 0x1,
IMPACT_TYPE_BULLET_LARGE = 0x2,
IMPACT_TYPE_BULLET_AP = 0x3,
IMPACT_TYPE_SHOTGUN = 0x4,
IMPACT_TYPE_GRENADE_BOUNCE = 0x5,
IMPACT_TYPE_GRENADE_EXPLODE = 0x6,
IMPACT_TYPE_ROCKET_EXPLODE = 0x7,
IMPACT_TYPE_PROJECTILE_DUD = 0x8,
IMPACT_TYPE_COUNT = 0x9,
};
enum weapInventoryType_t : __int32
{
WEAPINVENTORY_PRIMARY = 0x0,
WEAPINVENTORY_OFFHAND = 0x1,
WEAPINVENTORY_ITEM = 0x2,
WEAPINVENTORY_ALTMODE = 0x3,
WEAPINVENTORYCOUNT = 0x4,
};
enum weapFireType_t : __int32
{
WEAPON_FIRETYPE_FULLAUTO = 0x0,
WEAPON_FIRETYPE_SINGLESHOT = 0x1,
WEAPON_FIRETYPE_BURSTFIRE2 = 0x2,
WEAPON_FIRETYPE_BURSTFIRE3 = 0x3,
WEAPON_FIRETYPE_BURSTFIRE4 = 0x4,
WEAPON_FIRETYPECOUNT = 0x5,
};
enum OffhandClass : __int32
{
OFFHAND_CLASS_NONE = 0x0,
OFFHAND_CLASS_FRAG_GRENADE = 0x1,
OFFHAND_CLASS_SMOKE_GRENADE = 0x2,
OFFHAND_CLASS_FLASH_GRENADE = 0x3,
OFFHAND_CLASS_COUNT = 0x4,
};
enum weapStance_t : __int32
{
WEAPSTANCE_STAND = 0x0,
WEAPSTANCE_DUCK = 0x1,
WEAPSTANCE_PRONE = 0x2,
WEAPSTANCE_NUM = 0x3,
};
enum activeReticleType_t : __int32
{
VEH_ACTIVE_RETICLE_NONE = 0x0,
VEH_ACTIVE_RETICLE_PIP_ON_A_STICK = 0x1,
VEH_ACTIVE_RETICLE_BOUNCING_DIAMOND = 0x2,
VEH_ACTIVE_RETICLE_COUNT = 0x3,
};
enum weaponIconRatioType_t : __int32
{
WEAPON_ICON_RATIO_1TO1 = 0x0,
WEAPON_ICON_RATIO_2TO1 = 0x1,
WEAPON_ICON_RATIO_4TO1 = 0x2,
WEAPON_ICON_RATIO_COUNT = 0x3,
};
enum ammoCounterClipType_t : __int32
{
AMMO_COUNTER_CLIP_NONE = 0x0,
AMMO_COUNTER_CLIP_MAGAZINE = 0x1,
AMMO_COUNTER_CLIP_SHORTMAGAZINE = 0x2,
AMMO_COUNTER_CLIP_SHOTGUN = 0x3,
AMMO_COUNTER_CLIP_ROCKET = 0x4,
AMMO_COUNTER_CLIP_BELTFED = 0x5,
AMMO_COUNTER_CLIP_ALTWEAPON = 0x6,
AMMO_COUNTER_CLIP_COUNT = 0x7,
};
enum weapOverlayReticle_t : __int32
{
WEAPOVERLAYRETICLE_NONE = 0x0,
WEAPOVERLAYRETICLE_CROSSHAIR = 0x1,
WEAPOVERLAYRETICLE_NUM = 0x2,
};
enum WeapOverlayInteface_t : __int32
{
WEAPOVERLAYINTERFACE_NONE = 0x0,
WEAPOVERLAYINTERFACE_JAVELIN = 0x1,
WEAPOVERLAYINTERFACE_TURRETSCOPE = 0x2,
WEAPOVERLAYINTERFACECOUNT = 0x3,
};
enum weapProjExposion_t : __int32
{
WEAPPROJEXP_GRENADE = 0x0,
WEAPPROJEXP_ROCKET = 0x1,
WEAPPROJEXP_FLASHBANG = 0x2,
WEAPPROJEXP_NONE = 0x3,
WEAPPROJEXP_DUD = 0x4,
WEAPPROJEXP_SMOKE = 0x5,
WEAPPROJEXP_HEAVY = 0x6,
WEAPPROJEXP_NUM = 0x7,
};
enum WeapStickinessType : __int32
{
WEAPSTICKINESS_NONE = 0x0,
WEAPSTICKINESS_ALL = 0x1,
WEAPSTICKINESS_GROUND = 0x2,
WEAPSTICKINESS_GROUND_WITH_YAW = 0x3,
WEAPSTICKINESS_COUNT = 0x4,
};
enum guidedMissileType_t : __int32
{
MISSILE_GUIDANCE_NONE = 0x0,
MISSILE_GUIDANCE_SIDEWINDER = 0x1,
MISSILE_GUIDANCE_HELLFIRE = 0x2,
MISSILE_GUIDANCE_JAVELIN = 0x3,
MISSILE_GUIDANCE_COUNT = 0x4,
};
struct WeaponDef
{
const char *szInternalName;
const char *szDisplayName;
const char *szOverlayName;
Model *gunXModel[16];
Model *handXModel;
const char *szXAnims[33];
const char *szModeName;
unsigned __int16 hideTags[8];
unsigned __int16 notetrackSoundMapKeys[16];
unsigned __int16 notetrackSoundMapValues[16];
int playerAnimType;
weapType_t weapType;
weapClass_t weapClass;
PenetrateType penetrateType;
ImpactType impactType;
weapInventoryType_t inventoryType;
weapFireType_t fireType;
OffhandClass offhandClass;
weapStance_t stance;
const EffectDef *viewFlashEffect;
const EffectDef *worldFlashEffect;
SoundAliasList *pickupSound;
SoundAliasList *pickupSoundPlayer;
SoundAliasList *ammoPickupSound;
SoundAliasList *ammoPickupSoundPlayer;
SoundAliasList *projectileSound;
SoundAliasList *pullbackSound;
SoundAliasList *pullbackSoundPlayer;
SoundAliasList *fireSound;
SoundAliasList *fireSoundPlayer;
SoundAliasList *fireLoopSound;
SoundAliasList *fireLoopSoundPlayer;
SoundAliasList *fireStopSound;
SoundAliasList *fireStopSoundPlayer;
SoundAliasList *fireLastSound;
SoundAliasList *fireLastSoundPlayer;
SoundAliasList *emptyFireSound;
SoundAliasList *emptyFireSoundPlayer;
SoundAliasList *meleeSwipeSound;
SoundAliasList *meleeSwipeSoundPlayer;
SoundAliasList *meleeHitSound;
SoundAliasList *meleeMissSound;
SoundAliasList *rechamberSound;
SoundAliasList *rechamberSoundPlayer;
SoundAliasList *reloadSound;
SoundAliasList *reloadSoundPlayer;
SoundAliasList *reloadEmptySound;
SoundAliasList *reloadEmptySoundPlayer;
SoundAliasList *reloadStartSound;
SoundAliasList *reloadStartSoundPlayer;
SoundAliasList *reloadEndSound;
SoundAliasList *reloadEndSoundPlayer;
SoundAliasList *detonateSound;
SoundAliasList *detonateSoundPlayer;
SoundAliasList *nightVisionWearSound;
SoundAliasList *nightVisionWearSoundPlayer;
SoundAliasList *nightVisionRemoveSound;
SoundAliasList *nightVisionRemoveSoundPlayer;
SoundAliasList *altSwitchSound;
SoundAliasList *altSwitchSoundPlayer;
SoundAliasList *raiseSound;
SoundAliasList *raiseSoundPlayer;
SoundAliasList *firstRaiseSound;
SoundAliasList *firstRaiseSoundPlayer;
SoundAliasList *putawaySound;
SoundAliasList *putawaySoundPlayer;
SoundAliasList **bounceSound;
const EffectDef *viewShellEjectEffect;
const EffectDef *worldShellEjectEffect;
const EffectDef *viewLastShotEjectEffect;
const EffectDef *worldLastShotEjectEffect;
Material *reticleCenter;
Material *reticleSide;
int iReticleCenterSize;
int iReticleSideSize;
int iReticleMinOfs;
activeReticleType_t activeReticleType;
float vStandMove[3];
float vStandRot[3];
float vDuckedOfs[3];
float vDuckedMove[3];
float vDuckedRot[3];
float vProneOfs[3];
float vProneMove[3];
float vProneRot[3];
float fPosMoveRate;
float fPosProneMoveRate;
float fStandMoveMinSpeed;
float fDuckedMoveMinSpeed;
float fProneMoveMinSpeed;
float fPosRotRate;
float fPosProneRotRate;
float fStandRotMinSpeed;
float fDuckedRotMinSpeed;
float fProneRotMinSpeed;
Model *worldModel[16];
Model *worldClipModel;
Model *rocketModel;
Model *knifeModel;
Model *worldKnifeModel;
Material *hudIcon;
weaponIconRatioType_t hudIconRatio;
Material *ammoCounterIcon;
weaponIconRatioType_t ammoCounterIconRatio;
ammoCounterClipType_t ammoCounterClip;
int iStartAmmo;
const char *szAmmoName;
int iAmmoIndex;
const char *szClipName;
int iClipIndex;
int iMaxAmmo;
int iClipSize;
int shotCount;
const char *szSharedAmmoCapName;
int iSharedAmmoCapIndex;
int iSharedAmmoCap;
int damage;
int playerDamage;
int iMeleeDamage;
int iDamageType;
int iFireDelay;
int iMeleeDelay;
int meleeChargeDelay;
int iDetonateDelay;
int iFireTime;
int iRechamberTime;
int iRechamberBoltTime;
int iHoldFireTime;
int iDetonateTime;
int iMeleeTime;
int meleeChargeTime;
int iReloadTime;
int reloadShowRocketTime;
int iReloadEmptyTime;
int iReloadAddTime;
int iReloadStartTime;
int iReloadStartAddTime;
int iReloadEndTime;
int iDropTime;
int iRaiseTime;
int iAltDropTime;
int iAltRaiseTime;
int quickDropTime;
int quickRaiseTime;
int iFirstRaiseTime;
int iEmptyRaiseTime;
int iEmptyDropTime;
int sprintInTime;
int sprintLoopTime;
int sprintOutTime;
int nightVisionWearTime;
int nightVisionWearTimeFadeOutEnd;
int nightVisionWearTimePowerUp;
int nightVisionRemoveTime;
int nightVisionRemoveTimePowerDown;
int nightVisionRemoveTimeFadeInStart;
int fuseTime;
int aiFuseTime;
int requireLockonToFire;
int noAdsWhenMagEmpty;
int avoidDropCleanup;
float autoAimRange;
float aimAssistRange;
float aimAssistRangeAds;
float aimPadding;
float enemyCrosshairRange;
int crosshairColorChange;
float moveSpeedScale;
float adsMoveSpeedScale;
float sprintDurationScale;
float fAdsZoomFov;
float fAdsZoomInFrac;
float fAdsZoomOutFrac;
Material *overlayMaterial;
Material *overlayMaterialLowRes;
weapOverlayReticle_t overlayReticle;
WeapOverlayInteface_t overlayInterface;
float overlayWidth;
float overlayHeight;
float fAdsBobFactor;
float fAdsViewBobMult;
float fHipSpreadStandMin;
float fHipSpreadDuckedMin;
float fHipSpreadProneMin;
float hipSpreadStandMax;
float hipSpreadDuckedMax;
float hipSpreadProneMax;
float fHipSpreadDecayRate;
float fHipSpreadFireAdd;
float fHipSpreadTurnAdd;
float fHipSpreadMoveAdd;
float fHipSpreadDuckedDecay;
float fHipSpreadProneDecay;
float fHipReticleSidePos;
int iAdsTransInTime;
int iAdsTransOutTime;
float fAdsIdleAmount;
float fHipIdleAmount;
float adsIdleSpeed;
float hipIdleSpeed;
float fIdleCrouchFactor;
float fIdleProneFactor;
float fGunMaxPitch;
float fGunMaxYaw;
float swayMaxAngle;
float swayLerpSpeed;
float swayPitchScale;
float swayYawScale;
float swayHorizScale;
float swayVertScale;
float swayShellShockScale;
float adsSwayMaxAngle;
float adsSwayLerpSpeed;
float adsSwayPitchScale;
float adsSwayYawScale;
float adsSwayHorizScale;
float adsSwayVertScale;
int bRifleBullet;
int armorPiercing;
int bBoltAction;
int aimDownSight;
int bRechamberWhileAds;
float adsViewErrorMin;
float adsViewErrorMax;
int bCookOffHold;
int bClipOnly;
int adsFireOnly;
int cancelAutoHolsterWhenEmpty;
int suppressAmmoReserveDisplay;
int enhanced;
int laserSightDuringNightvision;
Material *killIcon;
weaponIconRatioType_t killIconRatio;
int flipKillIcon;
Material *dpadIcon;
weaponIconRatioType_t dpadIconRatio;
int bNoPartialReload;
int bSegmentedReload;
int iReloadAmmoAdd;
int iReloadStartAdd;
const char *szAltWeaponName;
unsigned int altWeaponIndex;
int iDropAmmoMin;
int iDropAmmoMax;
int blocksProne;
int silenced;
int iExplosionRadius;
int iExplosionRadiusMin;
int iExplosionInnerDamage;
int iExplosionOuterDamage;
float damageConeAngle;
int iProjectileSpeed;
int iProjectileSpeedUp;
int iProjectileSpeedForward;
int iProjectileActivateDist;
float projLifetime;
float timeToAccelerate;
float projectileCurvature;
Model *projectileModel;
weapProjExposion_t projExplosion;
const EffectDef *projExplosionEffect;
int projExplosionEffectForceNormalUp;
const EffectDef *projDudEffect;
SoundAliasList *projExplosionSound;
SoundAliasList *projDudSound;
int bProjImpactExplode;
WeapStickinessType stickiness;
int hasDetonator;
int timedDetonation;
int rotate;
int holdButtonToThrow;
int freezeMovementWhenFiring;
float lowAmmoWarningThreshold;
float parallelBounce[29];
float perpendicularBounce[29];
const EffectDef *projTrailEffect;
float vProjectileColor[3];
guidedMissileType_t guidedMissileType;
float maxSteeringAccel;
int projIgnitionDelay;
const EffectDef *projIgnitionEffect;
SoundAliasList *projIgnitionSound;
float fAdsAimPitch;
float fAdsCrosshairInFrac;
float fAdsCrosshairOutFrac;
int adsGunKickReducedKickBullets;
float adsGunKickReducedKickPercent;
float fAdsGunKickPitchMin;
float fAdsGunKickPitchMax;
float fAdsGunKickYawMin;
float fAdsGunKickYawMax;
float fAdsGunKickAccel;
float fAdsGunKickSpeedMax;
float fAdsGunKickSpeedDecay;
float fAdsGunKickStaticDecay;
float fAdsViewKickPitchMin;
float fAdsViewKickPitchMax;
float fAdsViewKickYawMin;
float fAdsViewKickYawMax;
float fAdsViewKickCenterSpeed;
float fAdsViewScatterMin;
float fAdsViewScatterMax;
float fAdsSpread;
int hipGunKickReducedKickBullets;
float hipGunKickReducedKickPercent;
float fHipGunKickPitchMin;
float fHipGunKickPitchMax;
float fHipGunKickYawMin;
float fHipGunKickYawMax;
float fHipGunKickAccel;
float fHipGunKickSpeedMax;
float fHipGunKickSpeedDecay;
float fHipGunKickStaticDecay;
float fHipViewKickPitchMin;
float fHipViewKickPitchMax;
float fHipViewKickYawMin;
float fHipViewKickYawMax;
float fHipViewKickCenterSpeed;
float fHipViewScatterMin;
float fHipViewScatterMax;
float fightDist;
float maxDist;
const char *accuracyGraphName[2];
float (*accuracyGraphKnots[2])[2];
float (*originalAccuracyGraphKnots[2])[2];
int accuracyGraphKnotCount[2];
int originalAccuracyGraphKnotCount[2];
int iPositionReloadTransTime;
float leftArc;
float rightArc;
float topArc;
float bottomArc;
float accuracy;
float aiSpread;
float playerSpread;
float minTurnSpeed[2];
float maxTurnSpeed[2];
float pitchConvergenceTime;
float yawConvergenceTime;
float suppressTime;
float maxRange;
float fAnimHorRotateInc;
float fPlayerPositionDist;
const char *szUseHintString;
const char *dropHintString;
int iUseHintStringIndex;
int dropHintStringIndex;
float horizViewJitter;
float vertViewJitter;
const char *szScript;
float fOOPosAnimLength[2];
int minDamage;
int minPlayerDamage;
float fMaxDamageRange;
float fMinDamageRange;
float destabilizationRateTime;
float destabilizationCurvatureMax;
int destabilizeDistance;
float locationDamageMultipliers[19];
const char *fireRumble;
const char *meleeImpactRumble;
float adsDofStart;
float adsDofEnd;
};
#endif // WEAPONDEF_H