Files
firestorm/Gameleap/code/mw4/Libraries/Adept/Renderer_Tool.cpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

71 lines
2.1 KiB
C++

#include "AdeptHeaders.hpp"
#include "ComponentHeaders.hpp"
#include "AttributeWatcher.hpp"
#include "EntityClassData.hpp"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Component::ClassData*
Renderer::CreateFactoryRequest(
const char* component_type,
Component::FactoryRequestParameters *parameters,
Entity::ClassData *class_data
)
{
Check_Pointer(component_type);
Check_Object(parameters);
MemoryStream *component_stream = parameters->m_stream;
Check_Object(component_stream);
Channel::FactoryRequestParameters *channel_parameters =
Cast_Pointer(Channel::FactoryRequestParameters*,parameters);
if (!_stricmp(component_type, "AttributeWatcherOfInt"))
{
*component_stream << static_cast<int>(AttributeWatcherOfIntClassID);
return
AttributeWatcherOf<int, IntClassID>::CreateFactoryRequest(
channel_parameters,
class_data
);
}
else if (!_stricmp(component_type, "MatcherOfInt"))
{
*component_stream << static_cast<int>(MatcherOfIntClassID);
return MatcherOf<int>::CreateFactoryRequest(channel_parameters);
}
else
{
PAUSE((
"%s: {[%s]Type=%s}: Bad Component type!",
parameters->m_page->GetNotationFile()->GetFileName(),
parameters->m_page->GetName(),
component_type
));
return NULL;
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
int
Renderer::CommandEncoder(const char* command_name)
{
if (!_stricmp(command_name, "TranslationChanged"))
return TranslationChangedCommandID;
else if (!_stricmp(command_name, "RotationChanged"))
return RotationChangedCommandID;
else if (!_stricmp(command_name, "ScaleChanged"))
return ScaleChangedCommandID;
else if (!_stricmp(command_name, "ZScaleChanged"))
return ZScaleChangedCommandID;
else if (!_stricmp(command_name, "StartEffect"))
return StartEffectCommandID;
else if (!_stricmp(command_name, "StopEffect"))
return StopEffectCommandID;
else if (!_stricmp(command_name, "KillEffect"))
return KillEffectCommandID;
return -1;
}