Sonic Colors Leftover Objects in Sonic Lost World
Unused Objects
DashRing
The large ring object which provides the player a burst of speed found commonly in Sonic games is an object that doesn't exist in Sonic Lost World.
MsgDashRingImpulse
This is the message type that would have been used by the DashRing object and is a leftover from Sonic Colors.
namespace app
{
namespace xgame
{
class MsgDashRingImpulse : fnd::Message
{
public:
enum class EType
{
};
MsgDashRingImpulse(const csl::math::Vector3& origin, const csl::math::Vector3& destination,
float outOfControl, float travelTime, EType type) : fnd::Message(0x6004),
origin_(origin), destination_(destination), outOfControl_(outOfControl),
travelTime_(travelTime), type_(type)
{
handled = false;
}
private:
csl::math::Vector3 origin_;
csl::math::Vector3 destination_;
float outOfControl_;
float travelTime_;
EType type_;
public:
bool handled;
};
} // namespace xgame
} // namespace app
DummySpring
The Eggman spring object found commonly in Sonic games is an unused object in Sonic Lost World carried over from Sonic Colors.
namespace app
{
namespace spring
{
enum class SpringType : signed char
{
Normal,
Dummy
};
} // namespace spring
class CObjSpring : CSetObjectListener
{
public:
static CObjSpring* CreateDummy()
{
auto springType = csl::ut::Enum<spring::SpringType::Dummy, signed char>(1);
return new CObjSpring(springType);
}
};
static void* ObjDummySpring_Constructor()
{
CObjSpring::CreateDummy();
}
} // namespace app
However during the object's setup the model entry is overwritten by a normal spring.
namespace app
{
class CObjSpringInfo : CObjInfo
{
public:
static const char* modelNames = { "cmn_obj_spring", "cmn_obj_spring" };
static const char* animationNames = { "cmn_obj_spring", "cmn_obj_spring" };
protected:
void Initialize(GameDocument& document) override
{
auto packfile= ObjUtil::GetPackFile("CommonObject.pac");
for (size_t i = 0; i < 2; i++)
{
models_[i] = ObjUtil::GetModelResource(modelNames[i], packfile);
}
for (size_t i = 0; i < 2; i++)
{
animations_[i] = ObjUtil::GetAnimationResource(modelNames[i], packfile);
}
for (size_t i = 0; i < 2; i++)
{
hh::ut::Packfile skeletonPackFile(packfile);
skeletons_[i] = ObjUtil::GetSkeletonResource(modelNames[i], skeletonPackFile);
}
}
private:
csl::ut::FixedArray<hh::gfx::res::ResModel, 2> models_;
csl::ut::FixedArray<hh::gfx::res::ResAnimSkeleton, 2> animations_;
csl::ut::FixedArray<hh::gfx::res::ResSkeleton, 2> skeletons_;
};
} // namespace app
The second entry in both modelNames and animationNames is using cmn_obj_spring, which is the normal spring model asset located in sonic2013_0.cpk\CommonObject.pac
This object has identical parameter configuration to the normal Spring object.
JumpBoard
The dash board object found commonly in Sonic games is an unused object in Sonic Lost World carried over from Sonic Colors. The model that it uses has been swapped for the Sonic Generations model. The underlying code still references the particle and sound files from Sonic Colors.
namespace app
{
class CObjJumpBoard : CSetObjectListener
{
public:
static const char* particleNames[] = { "jumppanel_ya_30s", "jumppanel_ya_30m", "jumppanel_ya_30l" };
private:
bool ProcMsgHitEventCollision(xgame::MsgHitEventCollision& message)
{
csl::math::Vector3 position;
xgame::MsgGetPosition getPositionMsg(&position);
SendMessageImm(message.sender, getPositionMsg);
if (field3B0 + field3A0.dot(position) >= -0.000001)
{
return true;
}
auto& normalShot = launcher->getShotInfo("normal");
auto& boostShot = launcher->getShotInfo("boost");
xgame::MsgJumpBoardImpulse impulseMsg(normalShot.origin, normalShot.destination,
boostShot.destination, normalShot.travelTime, xgame::MsgJumpBoardImpulse::EType::Normal);
SendMessageImm(message.sender, impulseMsg);
if(impulseMsg.handled)
{
auto* effect = GetGOC<game::GOCEffect>();
game::EffectCreateInfo effectInfo;
effectInfo.name = particleNames[size_type];
effectInfo.rotation = csl::math::Quaternion(M_PI);
effectInfo.field30 = true;
effect->CreateEffectEx(effectInfo);
GetGOC<game::GOCSound>()->Play3D("objsn_jumpboard", 0.0f);
}
return true;
}
int sizeType = 0;
csl::math::Vector3 field3A0;
float field3B0;
game::GOCLauncher* launcher = nullptr;
};
} // namespace app
The jumppanel_ya_30s, jumppanel_ya_30m and jumppanel_ya_30l particle files can be located within sonic2010_0.cpk\common_object.arc\ob_common.breff inside of Sonic Colors' files.
The objsn_jumpboard sound file can be located within sonic2010_0.cpk\sound\se_object_common.csb inside of Sonic Colors' files.
The object can be configured with the following parameters:
namespace app
{
static const char* enumDescriptions[] = { "Sサイズ", "Mサイズ", "Lサイズ" };
void paramMap_ObjJumpBoard(SetEd::CResClass resource)
{
AddParamFloat(resource, "ImpulseSpeedOnNormal", "プレイヤーに与える速度(通常時)",
0, 350.0f, 0.0f, 100000.0f, 10.0f);
AddParamFloat(resource, "ImpulseSpeedOnBoost", "プレイヤーに与える速度(ブースト時)",
4, 500.0f, 0.0f, 100000.0f, 10.0f);
AddParamFloat(resource, "OutOfControl", "制御不可時間(秒)",
8, 0.25f, 0.0f, 100000.0f, 0.01f);
AddParamEnum(resource, "SizeType", "大きさ", 12, enumDescriptions, 3, 0);
}
} // namespace app
This is identical to the parameters the object can be configured with in Sonic Colors.
MsgJumpBoardImpulse
This is the message type used by the unused JumpBoard object and is a leftover from Sonic Colors.
namespace app
{
namespace xgame
{
class MsgJumpBoardImpulse : fnd::Message
{
public:
enum class EType
{
Normal,
Boost
};
MsgJumpBoardImpulse(const csl::math::Vector3& origin, const csl::math::Vector3& destination,
const csl::math::Vector3 boostDestination, float outOfControl, EType type) : fnd::Message(0x6003),
origin_(origin), destination_(destination), boostDestination_(boostDestination),
outOfControl_(outOfControl), type_(type)
{
handled = false;
}
private:
csl::math::Vector3 origin_;
csl::math::Vector3 destination_;
csl::math::Vector3 boostDestination_;
float outOfControl_;
EType type_;
public:
bool handled;
};
} // namespace xgame
} // namespace app
IronBox
The iron box object found commonly in Sonic games is an unused object in Sonic Lost World carried over from Sonic Colors. The model that it uses has been swapped for the Sonic Generations model.
The object can be configured with the following parameters:
namespace app
{
void paramMap_ObjIronBox(SetEd::CResClass resource)
{
AddParamUint32(resource, "BoxNumX", "箱の数(X軸)", 0, 1, 1, 100, 1);
AddParamUint32(resource, "BoxNumY", "箱の数(Y軸)", 4, 1, 1, 100, 1);
AddParamUint32(resource, "BoxNumZ", "箱の数(Z軸)", 8, 1, 1, 100, 1);
}
} // namespace app
WoodBox
The wooden box object found commonly in Sonic games is an unused object in Sonic Lost World carried over from Sonic Colors. The model that it uses has been swapped for the Sonic Generations model, however there are no models included for when the object is broken by the player. This is because in Sonic Colors the breaking uses particles to display broken pieces and the underlying code still references the particle file from that game.
namespace app
{
class CObjWoodBox : CSetObjectListener
{
private:
bool ProcMsgDamage(xgame::MsgDamage& message)
{
csl::math::Vector3 position = GetGOC<fnd::GOCTransform>()->frame.transform.GetTranslation();
message.SetReply(position, true);
GetGOC<game::GOCEffect>()->CreateEffect("woodbox_ya");
GetGOC<game::GOCSound>()->Play3D("obj_woodboxbrk", 0.0f);
SetStatusRetire();
Kill();
return true;
}
};
} // namespace app
The woodbox_ya particle file can be located within sonic2010_0.cpk\common_object.arc\ob_common.breff inside of Sonic Colors' files.
This object has no parameters to configure.
Used Objects
GoalRing
The goal ring object found commonly in Sonic games is an object in Sonic Lost World's multiplayer mode carried over from Sonic Colors. The underlying code still references the particle file from Sonic Colors.
namespace app
{
class CObjGoalRing : CSetObjectListener
{
private:
void PlayEffect()
{
auto* visualModel = GetGOC<fnd::GOCVisualModel>();
auto* effect = GetGOC<game::GOCEffect>();
effectInfo.name = "goalring_ya";
effectInfo.visual = visualModel;
effectInfo.field30 = false;
effect->CreateEffectLoopEx(effectInfo);
}
};
} // namesapce app
The goalring_ya particle file can be located within sonic2010_0.cpk\common_object.arc\ob_common.breff inside of Sonic Colors' files.
The object can be configured with the following parameters:
namespace app
{
void app::paramMap_ObjGoalRing(SetEd::CResClass resource)
{
AddParamBool(resource, "IsMessageON", "メッセージで起動", 0, false);
AddParamTarget(resource, "GoalRingBattleInfo", "対戦用情報Obj(GoalRingBattleInfo)", 4);
}
} // namesapce app