Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
2 changed files with 27 additions and 27 deletions
Showing only changes of commit 4ca6f62d9b - Show all commits

View file

@ -386,7 +386,7 @@ auto Mass::writeJointSliders() -> bool {
return true;
}
auto Mass::frameStyles() -> Containers::StaticArrayView<4, Int> {
auto Mass::frameStyles() -> Containers::ArrayView<Int> {
return _frame.styles;
}
@ -409,12 +409,12 @@ void Mass::getFrameStyles() {
return;
}
if(frame_styles->items.size() != 4) {
if(frame_styles->items.size() != _frame.styles.size()) {
_state = State::Invalid;
return;
}
for(UnsignedInt i = 0; i < 4; i++) {
for(UnsignedInt i = 0; i < frame_styles->items.size(); i++) {
_frame.styles[i] = frame_styles->at<IntProperty>(i)->value;
}
}
@ -506,7 +506,7 @@ auto Mass::writeEyeFlareColour() -> bool {
return _mass->saveToFile();
}
auto Mass::frameCustomStyles() -> Containers::StaticArrayView<16, CustomStyle> {
auto Mass::frameCustomStyles() -> Containers::ArrayView<CustomStyle> {
return _frame.customStyles;
}
@ -523,7 +523,7 @@ void Mass::getFrameCustomStyles() {
return;
}
if(frame_styles->items.size() != 16) {
if(frame_styles->items.size() != _frame.customStyles.size()) {
_state = State::Invalid;
return;
}
@ -551,7 +551,7 @@ auto Mass::writeFrameCustomStyle(UnsignedLong index) -> bool {
return setCustomStyle(_frame.customStyles[index], index, frame_styles);
}
auto Mass::armourParts() -> Containers::StaticArrayView<38, ArmourPart> {
auto Mass::armourParts() -> Containers::ArrayView<ArmourPart> {
return _armour.parts;
}
@ -761,7 +761,7 @@ auto Mass::writeArmourPart(UnsignedLong index) -> bool {
return _mass->saveToFile();
}
auto Mass::armourCustomStyles() -> Containers::StaticArrayView<16, CustomStyle> {
auto Mass::armourCustomStyles() -> Containers::ArrayView<CustomStyle> {
return _armour.customStyles;
}
@ -778,7 +778,7 @@ void Mass::getArmourCustomStyles() {
return;
}
if(armour_styles->items.size() != 16) {
if(armour_styles->items.size() != _armour.customStyles.size()) {
_state = State::Invalid;
return;
}
@ -806,7 +806,7 @@ auto Mass::writeArmourCustomStyle(UnsignedLong index) -> bool {
return setCustomStyle(_armour.customStyles[index], index, armour_styles);
}
auto Mass::meleeWeapons() -> Containers::StaticArrayView<8, Weapon> {
auto Mass::meleeWeapons() -> Containers::ArrayView<Weapon> {
return _weapons.melee;
}
@ -814,7 +814,7 @@ void Mass::getMeleeWeapons() {
getWeaponType("WeaponCC_22_0BBEC58C4A0EA1DB9E037B9339EE26A7", _weapons.melee);
}
auto Mass::shields() -> Containers::StaticArrayView<1, Weapon> {
auto Mass::shields() -> Containers::ArrayView<Weapon> {
return _weapons.shields;
}
@ -822,7 +822,7 @@ void Mass::getShields() {
getWeaponType("Shield_53_839BFD7945481BAEA3E43A9C5CA8E92E", _weapons.shields);
}
auto Mass::bulletShooters() -> Containers::StaticArrayView<4, Weapon> {
auto Mass::bulletShooters() -> Containers::ArrayView<Weapon> {
return _weapons.bulletShooters;
}
@ -830,7 +830,7 @@ void Mass::getBulletShooters() {
getWeaponType("WeaponBS_35_6EF6E0104FD7A138DF47F88CB57A83ED", _weapons.bulletShooters);
}
auto Mass::energyShooters() -> Containers::StaticArrayView<4, Weapon> {
auto Mass::energyShooters() -> Containers::ArrayView<Weapon> {
return _weapons.energyShooters;
}
@ -838,7 +838,7 @@ void Mass::getEnergyShooters() {
getWeaponType("WeaponES_37_1A295D544528623880A0B1AC2C7DEE99", _weapons.energyShooters);
}
auto Mass::bulletLaunchers() -> Containers::StaticArrayView<4, Weapon> {
auto Mass::bulletLaunchers() -> Containers::ArrayView<Weapon> {
return _weapons.bulletLaunchers;
}
@ -846,7 +846,7 @@ void Mass::getBulletLaunchers() {
getWeaponType("WeaponBL_36_5FD7C41E4613A75B44AB0E90B362846E", _weapons.bulletLaunchers);
}
auto Mass::energyLaunchers() -> Containers::StaticArrayView<4, Weapon> {
auto Mass::energyLaunchers() -> Containers::ArrayView<Weapon> {
return _weapons.energyLaunchers;
}
@ -854,7 +854,7 @@ void Mass::getEnergyLaunchers() {
getWeaponType("WeaponEL_38_9D23F3884ACA15902C9E6CA6E4995995", _weapons.energyLaunchers);
}
auto Mass::globalStyles() -> Containers::StaticArrayView<16, CustomStyle> {
auto Mass::globalStyles() -> Containers::ArrayView<CustomStyle> {
return _globalStyles;
}
@ -871,7 +871,7 @@ void Mass::getGlobalStyles() {
return;
}
if(global_styles->items.size() != 16) {
if(global_styles->items.size() != _globalStyles.size()) {
_state = State::Invalid;
return;
}

View file

@ -148,7 +148,7 @@ class Mass {
void getJointSliders();
auto writeJointSliders() -> bool;
auto frameStyles() -> Containers::StaticArrayView<4, Int>;
auto frameStyles() -> Containers::ArrayView<Int>;
void getFrameStyles();
auto writeFrameStyles() -> bool;
@ -156,43 +156,43 @@ class Mass {
void getEyeFlareColour();
auto writeEyeFlareColour() -> bool;
auto frameCustomStyles() -> Containers::StaticArrayView<16, CustomStyle>;
auto frameCustomStyles() -> Containers::ArrayView<CustomStyle>;
void getFrameCustomStyles();
auto writeFrameCustomStyle(UnsignedLong index) -> bool;
auto armourParts() -> Containers::StaticArrayView<38, ArmourPart>;
auto armourParts() -> Containers::ArrayView<ArmourPart>;
void getArmourParts();
auto writeArmourPart(UnsignedLong index) -> bool;
auto armourCustomStyles() -> Containers::StaticArrayView<16, CustomStyle>;
auto armourCustomStyles() -> Containers::ArrayView<CustomStyle>;
void getArmourCustomStyles();
auto writeArmourCustomStyle(UnsignedLong index) -> bool;
auto meleeWeapons() -> Containers::StaticArrayView<8, Weapon>;
auto meleeWeapons() -> Containers::ArrayView<Weapon>;
void getMeleeWeapons();
auto writeMeleeWeapons() -> bool;
auto shields() -> Containers::StaticArrayView<1, Weapon>;
auto shields() -> Containers::ArrayView<Weapon>;
void getShields();
auto writeShields() -> bool;
auto bulletShooters() -> Containers::StaticArrayView<4, Weapon>;
auto bulletShooters() -> Containers::ArrayView<Weapon>;
void getBulletShooters();
auto writeBulletShooters() -> bool;
auto energyShooters() -> Containers::StaticArrayView<4, Weapon>;
auto energyShooters() -> Containers::ArrayView<Weapon>;
void getEnergyShooters();
auto writeEnergyShooters() -> bool;
auto bulletLaunchers() -> Containers::StaticArrayView<4, Weapon>;
auto bulletLaunchers() -> Containers::ArrayView<Weapon>;
void getBulletLaunchers();
auto writeBulletLaunchers() -> bool;
auto energyLaunchers() -> Containers::StaticArrayView<4, Weapon>;
auto energyLaunchers() -> Containers::ArrayView<Weapon>;
void getEnergyLaunchers();
auto writeEnergyLaunchers() -> bool;
auto globalStyles() -> Containers::StaticArrayView<16, CustomStyle>;
auto globalStyles() -> Containers::ArrayView<CustomStyle>;
void getGlobalStyles();
auto writeGlobalStyle(UnsignedLong index) -> bool;