Add rayman2 source files
This commit is contained in:
10
Rayman_X/cpa/tempgrp/TID/Src/IAD.def
Normal file
10
Rayman_X/cpa/tempgrp/TID/Src/IAD.def
Normal file
@@ -0,0 +1,10 @@
|
||||
LIBRARY
|
||||
|
||||
EXPORTS
|
||||
fn_p_szGetCPAVersion
|
||||
fn_p_stGetDLLIdentity
|
||||
fn_p_oGetDLL
|
||||
fn_vInitDll
|
||||
|
||||
SECTIONS
|
||||
.data READ WRITE
|
997
Rayman_X/cpa/tempgrp/TID/Src/IADClBck.cpp
Normal file
997
Rayman_X/cpa/tempgrp/TID/Src/IADClBck.cpp
Normal file
@@ -0,0 +1,997 @@
|
||||
// CallBacks (called to compute the string displayed in Editor Tree)
|
||||
//
|
||||
// YB
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
|
||||
#include "IADClBck.hpp"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADGlob.hpp"
|
||||
#include "IADVwMn.hpp"
|
||||
|
||||
#include "x:/cpa/tempgrp/tia/inc/ai_intf.hpp"
|
||||
#include "x:/cpa/main/inc/_EditId.h"
|
||||
|
||||
#include "OAc.h"
|
||||
|
||||
#define TID_C_szUnknownEntryName "<< Unknown >>"
|
||||
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
// Type
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_EngineLoop(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Engine Loop";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_ReflexOrAI(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
if ( M_GetSetParam_ulValue(_p_tdstGetSetParam) == 1 )
|
||||
csReturnedString = "AI";
|
||||
else if ( M_GetSetParam_ulValue(_p_tdstGetSetParam) == 0 )
|
||||
csReturnedString = "Reflex";
|
||||
else
|
||||
csReturnedString = "<< Unknown (not Ai, nor Reflex) >>";
|
||||
|
||||
return csReturnedString;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_CurrentComport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Current Behaviour";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Field(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Field";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Constant(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Constant";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_DsgVarId(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Designer Var ID";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_DsgVar(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Designer Var";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Button(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Button";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_EnvRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Environment";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_SectorRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Sector";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_SurfaceRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Surface";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_PersoRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Actor";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_ActionRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "State";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Real(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Constant Real";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Vector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Vector";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_ConstantVector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Constant Vector";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Way(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Way";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_WayPoint(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Way Point";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Module(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Module";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_ChannelNumber(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Channel Number";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Mask(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
|
||||
return "Mask";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_String(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "String";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_LipsSynchroRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Lips Synchro";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_SoundEventRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Sound Event";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_FamilyRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Family";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_BeginMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Begin Macro";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_EndMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "End Macro";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Comport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Change Behaviour";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_KeyWord(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "KeyWord";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Condition(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Condition";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Function(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Function";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Operator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Operator";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_Procedure(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Procedure";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_MetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Meta Action";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_BeginMetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Begin Meta Action";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_TextRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Texture";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_FontRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Font";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetTypeCallBack_ParticleGenerator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "Particle";
|
||||
}
|
||||
|
||||
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
// Name
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_EngineLoop(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_ReflexOrAI(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_CurrentComport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Field(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindFieldEditorNameFromId((enum tdeFieldId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Constant(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_DsgVarId(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_DsgVar(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
if ( g_pclInterface->m_clDocument.m_pub_fn_p_stGetSelectedActor() != NULL )
|
||||
{
|
||||
//Gets IA DLL
|
||||
CPA_DLLBase *p_clDll = g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName);
|
||||
if ( p_clDll != NULL )
|
||||
{
|
||||
tdstActorsIACom tdstCom;
|
||||
tdstCom.pvThis = (void *)g_pclInterface->m_clDocument.m_pub_fn_p_stGetSelectedActor()->pclActor;
|
||||
tdstCom.lData = _lID;
|
||||
|
||||
p_clDll->OnQueryAction(g_pclInterface, C_uiAI_GetDsgVarName, (long)(&tdstCom));
|
||||
|
||||
csReturnedString = tdstCom.csData;
|
||||
}
|
||||
else
|
||||
csReturnedString = "Unknown";
|
||||
}
|
||||
else
|
||||
csReturnedString = "Unknown";
|
||||
|
||||
return csReturnedString;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Button(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
csReturnedString.Format("'%s'", IPT_fn_szGetEntryActionName((IPT_tdxHandleToEntryElement)_lID));
|
||||
|
||||
return csReturnedString;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_EnvRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_SectorRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_SurfaceRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_PersoRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_ActionRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Real(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Vector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_ConstantVector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Way(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_WayPoint(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Module(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_ChannelNumber(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Mask(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_String(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_LipsSynchroRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_SoundEventRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_FamilyRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_BeginMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_EndMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Comport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_KeyWord(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindKeyWordEditorNameFromId((enum tdeKeyWordId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Condition(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindConditionEditorNameFromId((enum tdeCondId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Function(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindFunctionEditorNameFromId((enum tdeFuncId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Operator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindOperatorEditorNameFromId((enum tdeOperatorId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_Procedure(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindProcedureEditorNameFromId((enum tdeProcedureId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_MetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindMetaActionEditorNameFromId((enum tdeMetaActionId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_BeginMetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return szFindMetaActionEditorNameFromId((enum tdeMetaActionId_)_lID);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_TextRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_FontRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetNameCallBack_ParticleGenerator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
// Value
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_EngineLoop(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_ReflexOrAI(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_CurrentComport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Field(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Constant(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_DsgVarId(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
csReturnedString.Format("%ld", M_GetSetParam_lDsgVarIdValue(_p_tdstGetSetParam));
|
||||
|
||||
return csReturnedString;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_DsgVar(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Button(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_EnvRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_SectorRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_SurfaceRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_PersoRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_ActionRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Real(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Vector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_ConstantVector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Way(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_WayPoint(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Module(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
// return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_ChannelNumber(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
// return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Mask(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_String(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_LipsSynchroRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_SoundEventRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_FamilyRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_BeginMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_EndMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Comport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_KeyWord(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Condition(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Function(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Operator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_Procedure(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_MetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_BeginMetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_TextRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_FontRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetValueCallBack_ParticleGenerator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
//#######################################################################################################
|
||||
// Return value
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_EngineLoop(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_ReflexOrAI(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_CurrentComport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Field(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Constant(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_DsgVarId(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_DsgVar(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Button(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_EnvRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_SectorRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_SurfaceRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_PersoRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_ActionRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Real(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Vector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_ConstantVector(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Way(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_WayPoint(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Module(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_ChannelNumber(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Mask(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_String(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_LipsSynchroRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_SoundEventRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_FamilyRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_BeginMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_EndMacro(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Comport(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_KeyWord(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Condition(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return (M_GetSetParam_lValue(_p_tdstGetSetParam) == 0) ? "False" : "True";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Function(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Operator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_Procedure(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_MetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return IAD_fn_csComputeValueFromGetSetParam(_p_tdstGetSetParam);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_BeginMetaAction(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_TextRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_FontRef(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
CString IAD_fn_vGetReturnValueCallBack_ParticleGenerator(long _lID, tdstGetSetParam *_p_tdstGetSetParam)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
347
Rayman_X/cpa/tempgrp/TID/Src/IADDgFnd.cpp
Normal file
347
Rayman_X/cpa/tempgrp/TID/Src/IADDgFnd.cpp
Normal file
@@ -0,0 +1,347 @@
|
||||
// IADDgFnd.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
|
||||
#include "IADDgFnd.hpp"
|
||||
|
||||
#include "IADLnkMt.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Dialog_FindInTree dialog
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_Dialog_FindInTree, CDialog)
|
||||
//{{AFX_MSG_MAP(IAD_Dialog_FindInTree)
|
||||
ON_CBN_SELCHANGE(IDC_COMBO_FIELD_TYPE, OnSelchangeComboFieldType)
|
||||
ON_BN_CLICKED(IDC_RADIO_DEEP_SEARCH, OnRadioDeepSearch)
|
||||
ON_BN_CLICKED(IDC_RADIO_SIMPLE_SEARCH, OnRadioSimpleSearch)
|
||||
ON_BN_CLICKED(IDC_CHECK_SEARCH_IN_LEVELS, OnCheckSearchInLevels)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_Dialog_FindInTree::IAD_Dialog_FindInTree(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(IAD_Dialog_FindInTree::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_Dialog_FindInTree)
|
||||
m_bOnlyLevels = FALSE;
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
if ( g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch )
|
||||
{
|
||||
m_iSearchType = 0;
|
||||
|
||||
m_bSimpleSearchCaseSensitive = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch_CaseSensitive;
|
||||
m_bSimpleSearchExact = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch_Exact;
|
||||
m_csSimpleSearchString = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csSimpleSearchString;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iSearchType = 1;
|
||||
|
||||
m_bName_CaseSensitive = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bName_CaseSensitive;
|
||||
m_bName_Exact = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bName_Exact;
|
||||
m_bValue_CaseSensitive = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bValue_CaseSensitive;
|
||||
m_bValue_Exact = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bValue_Exact;
|
||||
m_bRetValue_CaseSensitive = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bRetValue_CaseSensitive;
|
||||
m_bRetValue_Exact = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bRetValue_Exact;
|
||||
|
||||
m_csName = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csName;
|
||||
m_csValue = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csValue;
|
||||
m_csRetValue = g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csRetValue;
|
||||
}
|
||||
|
||||
//Depths
|
||||
m_bOnlyLevels = !g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bAllLevels;
|
||||
if ( g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lBeginningLevel > (-1) )
|
||||
m_csBeginningLevel.Format("%ld", g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lBeginningLevel);
|
||||
if ( g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lEndLevel > (-1) )
|
||||
m_csEndLevel.Format("%ld", g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lEndLevel);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(IAD_Dialog_FindInTree)
|
||||
DDX_Check(pDX, IDC_CHECK_CASE_NAME, m_bName_CaseSensitive);
|
||||
DDX_Check(pDX, IDC_CHECK_EXACT_NAME, m_bName_Exact);
|
||||
DDX_Check(pDX, IDC_CHECK_CASE_VALUE, m_bValue_CaseSensitive);
|
||||
DDX_Check(pDX, IDC_CHECK_CASE_R_VALUE, m_bRetValue_CaseSensitive);
|
||||
DDX_Check(pDX, IDC_CHECK_EXACT_VALUE, m_bValue_Exact);
|
||||
DDX_Check(pDX, IDC_CHECK_EXACT_R_VALUE, m_bRetValue_Exact);
|
||||
DDX_Text(pDX, IDC_EDIT_NAME, m_csName);
|
||||
DDX_Text(pDX, IDC_EDIT_RETURNING_VALUE, m_csRetValue);
|
||||
DDX_Text(pDX, IDC_EDIT_VALUE, m_csValue);
|
||||
DDX_Radio(pDX, IDC_RADIO_SIMPLE_SEARCH, m_iSearchType);
|
||||
DDX_Check(pDX, IDC_CHECK_CASE_SIMPLE_SEARCH, m_bSimpleSearchCaseSensitive);
|
||||
DDX_Check(pDX, IDC_CHECK_EXACT_SIMPLE_SEARCH, m_bSimpleSearchExact);
|
||||
DDX_Text(pDX, IDC_EDIT_SIMPLE_SEARCH, m_csSimpleSearchString);
|
||||
DDX_Text(pDX, IDC_EDIT_BEGINNING_LEVEL, m_csBeginningLevel);
|
||||
DDX_Text(pDX, IDC_EDIT_END_LEVEL, m_csEndLevel);
|
||||
DDX_Check(pDX, IDC_CHECK_SEARCH_IN_LEVELS, m_bOnlyLevels);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Dialog_FindInTree message handlers
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_Dialog_FindInTree::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//Fills Combo
|
||||
m_pri_fn_vFillCombo();
|
||||
|
||||
//To initialize default state of controls
|
||||
if ( m_iSearchType == 0 )
|
||||
OnRadioSimpleSearch();
|
||||
else
|
||||
OnRadioDeepSearch();
|
||||
|
||||
BOOL bMustCheck = ( (g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lBeginningLevel > (-1))
|
||||
&& (g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lEndLevel > (-1))
|
||||
);
|
||||
((CButton *)GetDlgItem(IDC_CHECK_SEARCH_IN_LEVELS))->SetCheck(bMustCheck);
|
||||
OnCheckSearchInLevels();
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::OnOK()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch = ( m_iSearchType == 0 );
|
||||
|
||||
if ( g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch )
|
||||
{
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csSimpleSearchString = m_csSimpleSearchString;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch_CaseSensitive = m_bSimpleSearchCaseSensitive;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bSimpleSearch_Exact = m_bSimpleSearchExact;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->eNodeType = AIDebug_E_SecTyp_NbOfSectionType; //== Invalid value
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
CComboBox *pclCombo = (CComboBox *)GetDlgItem(IDC_COMBO_FIELD_TYPE);
|
||||
if ( pclCombo != NULL )
|
||||
{
|
||||
short wIndex = pclCombo->GetCurSel();
|
||||
if ( wIndex != CB_ERR )
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->eNodeType = (enum AIDebug_tdeSectionType_)pclCombo->GetItemData(wIndex);
|
||||
}
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bName_CaseSensitive = m_bName_CaseSensitive;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bName_Exact = m_bName_Exact;
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bValue_CaseSensitive = m_bValue_CaseSensitive;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bValue_Exact = m_bValue_Exact;
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bRetValue_CaseSensitive = m_bRetValue_CaseSensitive;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bRetValue_Exact = m_bRetValue_Exact;
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csName = m_csName;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csRetValue = m_csRetValue;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->csValue = m_csValue;
|
||||
}
|
||||
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->bAllLevels = !m_bOnlyLevels;
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lBeginningLevel = atol(m_csBeginningLevel);
|
||||
g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->lEndLevel = atol(m_csEndLevel);
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::OnSelchangeComboFieldType()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
CComboBox *pclCombo = (CComboBox *)GetDlgItem(IDC_COMBO_FIELD_TYPE);
|
||||
if ( pclCombo != NULL )
|
||||
{
|
||||
short wIndex = pclCombo->GetCurSel();
|
||||
|
||||
if ( wIndex != CB_ERR )
|
||||
{
|
||||
//Gets enum values
|
||||
AIDebug_tdeSectionType tdeEnumValue = (AIDebug_tdeSectionType)pclCombo->GetItemData(wIndex);
|
||||
|
||||
}
|
||||
}
|
||||
#endif // CG PB DEBUGGER }
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
//***************************************************************************
|
||||
//***************************************************************************
|
||||
|
||||
///////////////////////
|
||||
// Private Functions //
|
||||
///////////////////////
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::m_pri_fn_vFillCombo()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
CComboBox *pclCombo = (CComboBox *)GetDlgItem(IDC_COMBO_FIELD_TYPE);
|
||||
if ( pclCombo != NULL )
|
||||
{
|
||||
short wIndexToSelect = 0;
|
||||
|
||||
short wIndex = pclCombo->AddString("Engine Loop");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_EngineLoop);
|
||||
wIndex = pclCombo->AddString("Reflex Or AI");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_ReflexOrAI);
|
||||
wIndex = pclCombo->AddString("Current Comport");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_CurrentComport);
|
||||
wIndex = pclCombo->AddString("Field");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Field);
|
||||
wIndex = pclCombo->AddString("Constant");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Constant);
|
||||
wIndex = pclCombo->AddString("Designer Var Id");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_DsgVarId);
|
||||
wIndex = pclCombo->AddString("Designer Var");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_DsgVar);
|
||||
wIndex = pclCombo->AddString("Button");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Button);
|
||||
wIndex = pclCombo->AddString("Environment Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_EnvRef);
|
||||
wIndex = pclCombo->AddString("Sector Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_SectorRef);
|
||||
wIndex = pclCombo->AddString("Surface Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_SurfaceRef);
|
||||
wIndex = pclCombo->AddString("Perso Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_PersoRef);
|
||||
wIndex = pclCombo->AddString("Action Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_ActionRef);
|
||||
wIndex = pclCombo->AddString("Real Constant");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Real);
|
||||
wIndex = pclCombo->AddString("Vector");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Vector);
|
||||
wIndex = pclCombo->AddString("Constant Vector");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_ConstantVector);
|
||||
wIndex = pclCombo->AddString("Way");
|
||||
// pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Way);
|
||||
// wIndex = pclCombo->AddString("WayPoint");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_WayPoint);
|
||||
wIndex = pclCombo->AddString("Module");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Module);
|
||||
// wIndex = pclCombo->AddString("Channel Number");
|
||||
// pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_ChannelNumber);
|
||||
wIndex = pclCombo->AddString("Mask");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Mask);
|
||||
wIndex = pclCombo->AddString("String");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_String);
|
||||
wIndex = pclCombo->AddString("Lips Synchro");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_LipsSynchroRef);
|
||||
wIndex = pclCombo->AddString("Sound Event Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_SoundEventRef);
|
||||
wIndex = pclCombo->AddString("Family Ref");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_FamilyRef);
|
||||
wIndex = pclCombo->AddString("Begin of Macro");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_BeginMacro);
|
||||
wIndex = pclCombo->AddString("End of Macro");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_EndMacro);
|
||||
wIndex = pclCombo->AddString("Comport");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Comport);
|
||||
wIndex = pclCombo->AddString("KeyWord");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_KeyWord);
|
||||
wIndex = pclCombo->AddString("Condition");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Condition);
|
||||
wIndex = pclCombo->AddString("Function");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Function);
|
||||
wIndex = pclCombo->AddString("Operator");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Operator);
|
||||
wIndex = pclCombo->AddString("Procedure");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_Procedure);
|
||||
wIndex = pclCombo->AddString("Meta Action");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_MetaAction);
|
||||
wIndex = pclCombo->AddString("Begin Meta Action");
|
||||
pclCombo->SetItemData(wIndex, AIDebug_E_SecTyp_BeginMetaAction);
|
||||
|
||||
for (wIndex = 0; wIndex < pclCombo->GetCount(); wIndex ++)
|
||||
{
|
||||
if ( pclCombo->GetItemData(wIndex) == (DWORD)g_pclInterface->m_fn_pclGetDocument()->m_pub_p_tdstGetFindInfo()->eNodeType )
|
||||
wIndexToSelect = wIndex;
|
||||
}
|
||||
|
||||
pclCombo->SetCurSel(wIndexToSelect);
|
||||
}
|
||||
#endif // CG PB DEBUGGER }
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::OnRadioDeepSearch()
|
||||
{
|
||||
m_pri_fn_vEnableSimpleSearchControls(FALSE);
|
||||
m_pri_fn_vEnableDeepSearchControls(TRUE);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::OnRadioSimpleSearch()
|
||||
{
|
||||
m_pri_fn_vEnableSimpleSearchControls(TRUE);
|
||||
m_pri_fn_vEnableDeepSearchControls(FALSE);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::OnCheckSearchInLevels()
|
||||
{
|
||||
BOOL bChecked = ((CButton *)GetDlgItem(IDC_CHECK_SEARCH_IN_LEVELS))->GetCheck();
|
||||
|
||||
GetDlgItem(IDC_EDIT_BEGINNING_LEVEL)->EnableWindow(bChecked);
|
||||
GetDlgItem(IDC_EDIT_END_LEVEL)->EnableWindow(bChecked);
|
||||
GetDlgItem(IDC_STATIC_AND_TEXT)->EnableWindow(bChecked);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::m_pri_fn_vEnableSimpleSearchControls(BOOL _bEnable)
|
||||
{
|
||||
GetDlgItem(IDC_STATIC_RECT_SIMPLE_SERACH)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_EDIT_SIMPLE_SEARCH)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_EXACT_SIMPLE_SEARCH)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_CASE_SIMPLE_SEARCH)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_STATIC_SIMPLE_SEARCH_TEXT)->EnableWindow(_bEnable);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_FindInTree::m_pri_fn_vEnableDeepSearchControls(BOOL _bEnable)
|
||||
{
|
||||
GetDlgItem(IDC_STATIC_DEEP_SEARCH_RECT)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_STATIC_DEEP_SEARCH_TEXT)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_COMBO_FIELD_TYPE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_EDIT_NAME)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_EDIT_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_EDIT_RETURNING_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_EXACT_NAME)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_CASE_NAME)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_EXACT_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_CASE_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_EXACT_R_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_CHECK_CASE_R_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_STATIC_RECT_NAME)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_STATIC_RECT_VALUE)->EnableWindow(_bEnable);
|
||||
GetDlgItem(IDC_STATIC_RECT_RET_VALUE)->EnableWindow(_bEnable);
|
||||
}
|
105
Rayman_X/cpa/tempgrp/TID/Src/IADDgIf.cpp
Normal file
105
Rayman_X/cpa/tempgrp/TID/Src/IADDgIf.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
// CPAMDgIf.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "IADDgIf.hpp"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#define C_INFO_DIALOG_TIMER 70 //An Id for the timer
|
||||
#define C_TEMPO_TIMER 100 //(ms)
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_InformationDialog dialog
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_InformationDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(IAD_InformationDialog)
|
||||
ON_WM_TIMER()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
IAD_InformationDialog::IAD_InformationDialog(CWnd* pParent, CString csMessage)
|
||||
: CDialog(IAD_InformationDialog::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_InformationDialog)
|
||||
m_csMessage = csMessage;
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
m_hOldInstance = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle(g_stIADDLLIdentity.hModule);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
IAD_InformationDialog::~IAD_InformationDialog()
|
||||
{
|
||||
AfxSetResourceHandle(m_hOldInstance);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_InformationDialog::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(IAD_InformationDialog)
|
||||
DDX_Text(pDX, IDC_STATIC_TEXT, m_csMessage);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_InformationDialog message handlers
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_InformationDialog::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//Init. timer
|
||||
SetTimer(C_INFO_DIALOG_TIMER, C_TEMPO_TIMER, NULL);
|
||||
|
||||
//Loads Bitmaps
|
||||
m_a_cbBitmaps[0].LoadBitmap(IDB_BITMAP_INFO1);
|
||||
m_a_cbBitmaps[1].LoadBitmap(IDB_BITMAP_INFO2);
|
||||
m_a_cbBitmaps[2].LoadBitmap(IDB_BITMAP_INFO3);
|
||||
m_a_cbBitmaps[3].LoadBitmap(IDB_BITMAP_INFO4);
|
||||
m_a_cbBitmaps[4].LoadBitmap(IDB_BITMAP_INFO5);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_InformationDialog::OnOK()
|
||||
{
|
||||
KillTimer(C_INFO_DIALOG_TIMER);
|
||||
|
||||
EndDialog(IDOK);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_InformationDialog::OnTimer(UINT nIDEvent)
|
||||
{
|
||||
static BOOL s_bFirstPass = TRUE;
|
||||
static char s_cCurrentBitmapIndex = -1; //To begin with first bitmap
|
||||
static char s_cIndexIncrement = 1;
|
||||
|
||||
s_cCurrentBitmapIndex += s_cIndexIncrement;
|
||||
if ( ! s_bFirstPass )
|
||||
{
|
||||
if ( s_cCurrentBitmapIndex % (C_NUMBER_OF_BITMAPS-1) == 0 )
|
||||
s_cIndexIncrement = -s_cIndexIncrement;
|
||||
}
|
||||
else
|
||||
s_bFirstPass = FALSE;
|
||||
|
||||
((CStatic *)GetDlgItem(IDC_STATIC_IMAGE))->SetBitmap(HBITMAP(m_a_cbBitmaps[s_cCurrentBitmapIndex]));
|
||||
|
||||
CDialog::OnTimer(nIDEvent);
|
||||
}
|
148
Rayman_X/cpa/tempgrp/TID/Src/IADDgQu.cpp
Normal file
148
Rayman_X/cpa/tempgrp/TID/Src/IADDgQu.cpp
Normal file
@@ -0,0 +1,148 @@
|
||||
// CPAMDgQu.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "IADDgQu.hpp"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#define C_QUESTION_DIALOG_TIMER 69 //An Id for the timer
|
||||
#define C_TEMPO_TIMER 60 //(ms)
|
||||
#define C_NUMBER_OF_FRAMES 15
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_QuestionDialog dialog
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_QuestionDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(IAD_QuestionDialog)
|
||||
ON_BN_CLICKED(IDNO, OnNo)
|
||||
ON_BN_CLICKED(IDYES, OnYes)
|
||||
ON_WM_TIMER()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
IAD_QuestionDialog::IAD_QuestionDialog(CWnd* pParent, CString csMessage)
|
||||
: CDialog(IAD_QuestionDialog::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_QuestionDialog)
|
||||
m_csMessage = csMessage;
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
m_hOldInstance = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle(g_stIADDLLIdentity.hModule);
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
IAD_QuestionDialog::~IAD_QuestionDialog()
|
||||
{
|
||||
AfxSetResourceHandle(m_hOldInstance);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_QuestionDialog::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(IAD_QuestionDialog)
|
||||
DDX_Text(pDX, IDC_STATIC_QUESTION, m_csMessage);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_QuestionDialog message handlers
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_QuestionDialog::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//Init. timer
|
||||
SetTimer(C_QUESTION_DIALOG_TIMER, C_TEMPO_TIMER, NULL);
|
||||
|
||||
//Loads Bitmaps
|
||||
m_cbBitmap.LoadBitmap(IDB_BITMAP_QUESTION);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_QuestionDialog::OnNo()
|
||||
{
|
||||
KillTimer(C_QUESTION_DIALOG_TIMER);
|
||||
|
||||
EndDialog(IDNO);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_QuestionDialog::OnYes()
|
||||
{
|
||||
KillTimer(C_QUESTION_DIALOG_TIMER);
|
||||
|
||||
EndDialog(IDYES);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_QuestionDialog::OnTimer(UINT nIDEvent)
|
||||
{
|
||||
/* static BOOL s_bFirstPass = TRUE;
|
||||
static char s_cCurrentBitmapIndex = -1; //To begin with first bitmap
|
||||
static char s_cIndexIncrement = 1;
|
||||
|
||||
s_cCurrentBitmapIndex += s_cIndexIncrement;
|
||||
if ( ! s_bFirstPass )
|
||||
{
|
||||
if ( s_cCurrentBitmapIndex % (C_NUMBER_OF_FRAMES-1) == 0 )
|
||||
s_cIndexIncrement = -s_cIndexIncrement;
|
||||
}
|
||||
else
|
||||
s_bFirstPass = FALSE;
|
||||
|
||||
((CStatic *)GetDlgItem(IDC_STATIC_IMAGE))->SetBitmap(HBITMAP(m_a_cbBitmaps[s_cCurrentBitmapIndex]));
|
||||
*/
|
||||
static BOOL s_bFirstPass = TRUE;
|
||||
static CRect crRect;
|
||||
static char s_cCurrentIndex = -1;
|
||||
static char s_cIndexIncrement = 1;
|
||||
|
||||
s_cCurrentIndex += s_cIndexIncrement;
|
||||
|
||||
if ( s_bFirstPass )
|
||||
{
|
||||
crRect.top = 0;
|
||||
crRect.bottom = 56;
|
||||
crRect.left = 0;
|
||||
crRect.right = 56;
|
||||
|
||||
s_bFirstPass = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( s_cCurrentIndex % (C_NUMBER_OF_FRAMES-1) == 0 )
|
||||
s_cIndexIncrement = -s_cIndexIncrement;
|
||||
}
|
||||
|
||||
//Computes Rect
|
||||
crRect.left = (56 * s_cCurrentIndex)/ C_NUMBER_OF_FRAMES;
|
||||
crRect.right = 56 - (56 * s_cCurrentIndex)/ C_NUMBER_OF_FRAMES;
|
||||
|
||||
CClientDC dc(GetDlgItem(IDC_EDIT_BIDON));
|
||||
CDC memDC;
|
||||
memDC.CreateCompatibleDC(&dc);
|
||||
memDC.SelectObject(m_cbBitmap);
|
||||
|
||||
dc.StretchBlt( crRect.left,
|
||||
crRect.top,
|
||||
crRect.Width(),
|
||||
crRect.Height(), &memDC, 0, 0, 56, 56, SRCCOPY);
|
||||
|
||||
CDialog::OnTimer(nIDEvent);
|
||||
}
|
82
Rayman_X/cpa/tempgrp/TID/Src/IADDgSN.cpp
Normal file
82
Rayman_X/cpa/tempgrp/TID/Src/IADDgSN.cpp
Normal file
@@ -0,0 +1,82 @@
|
||||
// IADDgSN.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADDgSN.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Dialog_SetNumber dialog
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_Dialog_SetNumber, CDialog)
|
||||
//{{AFX_MSG_MAP(IAD_Dialog_SetNumber)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_Dialog_SetNumber::IAD_Dialog_SetNumber(CPoint _cpTopLeft,
|
||||
long _lOldValue,
|
||||
CWnd* pParent /*=NULL*/)
|
||||
: CDialog(IAD_Dialog_SetNumber::IDD, pParent)
|
||||
{
|
||||
m_hOldInstance = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle(g_stIADDLLIdentity.hModule);
|
||||
|
||||
//{{AFX_DATA_INIT(IAD_Dialog_SetNumber)
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
m_lNewValue = _lOldValue;
|
||||
m_pri_cpTopLeft = _cpTopLeft;
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
IAD_Dialog_SetNumber::~IAD_Dialog_SetNumber()
|
||||
{
|
||||
AfxSetResourceHandle(m_hOldInstance);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Dialog_SetNumber::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
|
||||
//{{AFX_DATA_MAP(IAD_Dialog_SetNumber)
|
||||
DDX_Text(pDX, IDC_EDIT_NUMBER, m_lNewValue);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Dialog_SetNumber message handlers
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_Dialog_SetNumber::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//Moves window
|
||||
CRect crWindowRect;
|
||||
GetWindowRect(crWindowRect);
|
||||
CRect crWindowDestRect;
|
||||
crWindowDestRect.top = m_pri_cpTopLeft.y;
|
||||
crWindowDestRect.bottom = crWindowDestRect.top + crWindowRect.Height();
|
||||
crWindowDestRect.left = m_pri_cpTopLeft.x;
|
||||
crWindowDestRect.right = crWindowDestRect.left + crWindowRect.Width();
|
||||
|
||||
MoveWindow(crWindowDestRect);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
long IAD_Dialog_SetNumber::m_pub_fn_lGetNumber()
|
||||
{
|
||||
return m_lNewValue;
|
||||
}
|
129
Rayman_X/cpa/tempgrp/TID/Src/IADDgSp.cpp
Normal file
129
Rayman_X/cpa/tempgrp/TID/Src/IADDgSp.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
// CPAMDgSp.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "IADDgSp.hpp"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//Colors for the fields' static
|
||||
//extern COLORREF g_colref_FieldInstanceTextColor;
|
||||
//extern COLORREF g_colref_FieldInstanceBackgroundColor;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_EditorSetupDialog dialog
|
||||
BEGIN_MESSAGE_MAP(IAD_EditorSetupDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(IAD_EditorSetupDialog)
|
||||
ON_WM_PAINT()
|
||||
ON_WM_LBUTTONUP()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_MESSAGE(WM_HELP, OnMyHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_EditorSetupDialog::IAD_EditorSetupDialog(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(IAD_EditorSetupDialog::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_EditorSetupDialog)
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_EditorSetupDialog::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(IAD_EditorSetupDialog)
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_EditorSetupDialog message handlers
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_EditorSetupDialog::OnOK()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_EditorSetupDialog::OnLButtonUp(UINT nFlags, CPoint point)
|
||||
{
|
||||
/* CWnd *pclWnd;
|
||||
CRect crClientRect;
|
||||
|
||||
pclWnd = GetDlgItem(IDC_RECT_TEXT_FIELD_INST);
|
||||
pclWnd->GetWindowRect(crClientRect);
|
||||
ScreenToClient(crClientRect);
|
||||
if ( crClientRect.PtInRect(point) )
|
||||
if ( m_fn_bEditColor(g_colref_FieldInstanceTextColor) )
|
||||
InvalidateRect(NULL);
|
||||
|
||||
pclWnd = GetDlgItem(IDC_RECT_BG_FIELD_INST);
|
||||
pclWnd->GetWindowRect(crClientRect);
|
||||
ScreenToClient(crClientRect);
|
||||
if ( crClientRect.PtInRect(point) )
|
||||
if ( m_fn_bEditColor(g_colref_FieldInstanceBackgroundColor) )
|
||||
InvalidateRect(NULL);
|
||||
*/
|
||||
CDialog::OnLButtonUp(nFlags, point);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_EditorSetupDialog::m_fn_bEditColor(COLORREF &r_Color)
|
||||
{
|
||||
CColorDialog dial(r_Color, CC_FULLOPEN, this);
|
||||
|
||||
if ( dial.DoModal() == IDOK )
|
||||
{
|
||||
r_Color = dial.GetColor();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_EditorSetupDialog::OnPaint()
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
/* CRect crClientRect;
|
||||
CWnd *pclWnd;
|
||||
|
||||
pclWnd = GetDlgItem(IDC_RECT_TEXT_FIELD_INST);
|
||||
pclWnd->GetClientRect(crClientRect);
|
||||
crClientRect.InflateRect(-2,-2);
|
||||
CClientDC dc3(pclWnd);
|
||||
dc3.FillSolidRect(crClientRect, g_colref_FieldInstanceTextColor);
|
||||
|
||||
pclWnd = GetDlgItem(IDC_RECT_BG_FIELD_INST);
|
||||
pclWnd->GetClientRect(crClientRect);
|
||||
crClientRect.InflateRect(-2,-2);
|
||||
CClientDC dc4(pclWnd);
|
||||
dc4.FillSolidRect(crClientRect, g_colref_FieldInstanceBackgroundColor);
|
||||
*/
|
||||
// Do not call CDialog::OnPaint() for painting messages
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
long IAD_EditorSetupDialog::OnMyHelp(UINT, long lParam)
|
||||
{
|
||||
LPHELPINFO lphi = (LPHELPINFO)lParam;
|
||||
|
||||
::WinHelp( m_hWnd,
|
||||
"c:\\acp\\dllbibli\\object\\actors\\help\\actors.hlp",
|
||||
HELP_CONTEXTPOPUP,
|
||||
lphi->dwContextId);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
121
Rayman_X/cpa/tempgrp/TID/Src/IADDgStp.cpp
Normal file
121
Rayman_X/cpa/tempgrp/TID/Src/IADDgStp.cpp
Normal file
@@ -0,0 +1,121 @@
|
||||
// IADDgStp.hpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADDgStp.hpp"
|
||||
|
||||
#include "IADWCBt.hpp"
|
||||
#include "IADLnkMt.hpp"
|
||||
|
||||
#define IAD_C_BUTTON_SPACING 3
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TID_Dialog_Setup dialog
|
||||
|
||||
BEGIN_MESSAGE_MAP(TID_Dialog_Setup, CDialog)
|
||||
//{{AFX_MSG_MAP(TID_Dialog_Setup)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
TID_Dialog_Setup::TID_Dialog_Setup(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(TID_Dialog_Setup::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(TID_Dialog_Setup)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
void TID_Dialog_Setup::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(TID_Dialog_Setup)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TID_Dialog_Setup message handlers
|
||||
|
||||
#define IAD_M_ADD_BUTTON(Name, String) \
|
||||
pclButton = new IAD_Color_Button(&g_a_colrefTypeColor[AIDebug_E_SecTyp_##Name], String, (long)AIDebug_E_SecTyp_##Name); \
|
||||
csReturnedSize = pclButton->m_pub_fn_csCreate(this, crCurrentRect); \
|
||||
crCurrentRect.OffsetRect(0, csReturnedSize.cy + IAD_C_BUTTON_SPACING); \
|
||||
lMaxX = max(lMaxX, crCurrentRect.left + csReturnedSize.cx); \
|
||||
if ( crCurrentRect.bottom > crStaticRect.bottom - IAD_C_BUTTON_SPACING ) \
|
||||
{ \
|
||||
crCurrentRect.top = crStaticRect.top + IAD_C_BUTTON_SPACING; \
|
||||
crCurrentRect.bottom = crCurrentRect.top + csReturnedSize.cy; \
|
||||
crCurrentRect.left = lMaxX + IAD_C_BUTTON_SPACING; \
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
BOOL TID_Dialog_Setup::OnInitDialog()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
CSize csReturnedSize;
|
||||
IAD_Color_Button *pclButton;
|
||||
long lMaxX = 0;
|
||||
CRect crStaticRect;
|
||||
GetDlgItem(IDC_STATIC_COLORS_USED)->GetWindowRect(crStaticRect);
|
||||
ScreenToClient(crStaticRect);
|
||||
crStaticRect.InflateRect(-10, -15);
|
||||
CRect crCurrentRect(crStaticRect.left + IAD_C_BUTTON_SPACING,
|
||||
crStaticRect.top + IAD_C_BUTTON_SPACING,
|
||||
10,10); //Bidon
|
||||
|
||||
//Constructs buttons
|
||||
IAD_M_ADD_BUTTON(EngineLoop, "Engine Loop")
|
||||
IAD_M_ADD_BUTTON(ReflexOrAI, "Reflex Or AI")
|
||||
IAD_M_ADD_BUTTON(CurrentComport, "Current Comport")
|
||||
IAD_M_ADD_BUTTON(Field, "Field")
|
||||
IAD_M_ADD_BUTTON(Constant, "Constant")
|
||||
IAD_M_ADD_BUTTON(DsgVarId, "Dsg Var Id")
|
||||
IAD_M_ADD_BUTTON(DsgVar, "Dsg Var")
|
||||
IAD_M_ADD_BUTTON(Button, "Button")
|
||||
IAD_M_ADD_BUTTON(EnvRef, "Environement ")
|
||||
IAD_M_ADD_BUTTON(SectorRef, "Sector")
|
||||
IAD_M_ADD_BUTTON(SurfaceRef, "Surface")
|
||||
IAD_M_ADD_BUTTON(PersoRef, "Actor")
|
||||
IAD_M_ADD_BUTTON(ActionRef, "State")
|
||||
IAD_M_ADD_BUTTON(Real, "Real")
|
||||
IAD_M_ADD_BUTTON(Vector, "Vector")
|
||||
IAD_M_ADD_BUTTON(ConstantVector, "Constant Vector")
|
||||
// IAD_M_ADD_BUTTON(Way, "Way")
|
||||
IAD_M_ADD_BUTTON(WayPoint, "WayPoint")
|
||||
IAD_M_ADD_BUTTON(Module, "Module")
|
||||
// IAD_M_ADD_BUTTON(ChannelNumber, "Channel Number")
|
||||
IAD_M_ADD_BUTTON(Mask, "Mask")
|
||||
IAD_M_ADD_BUTTON(String, "String")
|
||||
IAD_M_ADD_BUTTON(LipsSynchroRef, "Lips Synchro")
|
||||
IAD_M_ADD_BUTTON(SoundEventRef, "Sound Event")
|
||||
IAD_M_ADD_BUTTON(FamilyRef, "Family")
|
||||
IAD_M_ADD_BUTTON(BeginMacro, "Begin Macro")
|
||||
IAD_M_ADD_BUTTON(EndMacro, "End Macro")
|
||||
IAD_M_ADD_BUTTON(Comport, "Comport")
|
||||
IAD_M_ADD_BUTTON(KeyWord, "KeyWord")
|
||||
IAD_M_ADD_BUTTON(Condition, "Condition")
|
||||
IAD_M_ADD_BUTTON(Function, "Function")
|
||||
IAD_M_ADD_BUTTON(Operator, "Operator")
|
||||
IAD_M_ADD_BUTTON(Procedure, "Procedure")
|
||||
IAD_M_ADD_BUTTON(MetaAction, "MetaAction")
|
||||
IAD_M_ADD_BUTTON(BeginMetaAction, "Begin MetaAction")
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
402
Rayman_X/cpa/tempgrp/TID/Src/IADDoc.cpp
Normal file
402
Rayman_X/cpa/tempgrp/TID/Src/IADDoc.cpp
Normal file
@@ -0,0 +1,402 @@
|
||||
// Implementation for the class CMyDocument
|
||||
/////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
|
||||
#include "SCR.h"
|
||||
|
||||
#include "IADDoc.hpp"
|
||||
|
||||
#include "IADVwMn.hpp"
|
||||
#include "IADVwRst.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADDgStp.hpp"
|
||||
#include "IADLnkMt.hpp"
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
|
||||
//External Modules
|
||||
#include "OAC.h"
|
||||
#include "ErO.h"
|
||||
//End of External Modules
|
||||
|
||||
long g_lCurrentId = 2000;
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//****************************************************************************
|
||||
IAD_MyDocument::IAD_MyDocument()
|
||||
{
|
||||
// AfxEnableMemoryTracking(TRUE);
|
||||
|
||||
//Initializes editor's state
|
||||
|
||||
m_pclControlView = NULL;
|
||||
m_pclResultView = NULL;
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
m_pclVariableView = NULL;
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
m_pri_lCurrentIndexInFoundItemsList = -1;
|
||||
|
||||
m_pri_p_stSelectedActor = NULL;
|
||||
|
||||
m_pri_tdstFindInfo.bAllLevels = TRUE;
|
||||
m_pri_tdstFindInfo.lBeginningLevel = 0;
|
||||
m_pri_tdstFindInfo.lEndLevel = 10;
|
||||
|
||||
m_pri_bDebuggerIsOn = TRUE;
|
||||
|
||||
m_pub_bIsDeletingTree = FALSE;
|
||||
|
||||
//Editor's Setup var. Init.
|
||||
//...
|
||||
|
||||
IAD_g_fn_vInitGetStringCallBacks();
|
||||
|
||||
//Init. the INI file name
|
||||
m_csIniFileName = M_GetMainApp()->m_csEditorDataPath + "Tools\\IA_Debug\\IA_Debug.ini";
|
||||
|
||||
//Reads INI file
|
||||
m_fn_bReadIniFile();
|
||||
|
||||
//PROVISOIRE...
|
||||
m_csHelpFileNameAndPath = M_GetMainApp()->m_csEditorDataPath + "Tools\\IA_Debug\\IADebug.hlp >Normale";
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
IAD_MyDocument::~IAD_MyDocument()
|
||||
{
|
||||
// m_fn_bWriteIniFile();
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************
|
||||
HTREEITEM IAD_MyDocument::m_pub_fn_hFindInTree(IAD_EditorTreeNode *_pclRoot,
|
||||
TID_tdstFindInfo *_p_tdstFindInfo)
|
||||
{
|
||||
//Inits recursive search
|
||||
m_pri_lCurrentIndexInFoundItemsList = 0;
|
||||
m_pri_clListOfFoundNodes.RemoveAll();
|
||||
m_pri_fn_vFindInOneLevelOfTree(_pclRoot, _p_tdstFindInfo);
|
||||
|
||||
if ( m_pri_clListOfFoundNodes.GetCount() > 0 )
|
||||
{
|
||||
HTREEITEM hFirstItem = m_pri_clListOfFoundNodes.GetHead()->m_pub_fn_hGetTreeItem();
|
||||
|
||||
m_pclResultView->m_fn_vEnableFindPrevButton(FALSE);
|
||||
m_pclResultView->m_fn_vEnableFindNextButton( m_pri_clListOfFoundNodes.GetCount() > 1 );
|
||||
|
||||
CString csStatusText;
|
||||
csStatusText.Format("Finder has selected occurence %ld on %ld", m_pri_lCurrentIndexInFoundItemsList + 1,
|
||||
m_pri_clListOfFoundNodes.GetCount());
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText(csStatusText);
|
||||
|
||||
return hFirstItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText("No occurence found in Tree");
|
||||
|
||||
m_pclResultView->m_fn_vEnableFindNextButton(FALSE);
|
||||
m_pclResultView->m_fn_vEnableFindPrevButton(FALSE);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
HTREEITEM IAD_MyDocument::m_pub_fn_hFindNextInTree()
|
||||
{
|
||||
m_pri_lCurrentIndexInFoundItemsList ++;
|
||||
|
||||
POSITION pos = m_pri_clListOfFoundNodes.FindIndex(m_pri_lCurrentIndexInFoundItemsList);
|
||||
HTREEITEM hNextItem = m_pri_clListOfFoundNodes.GetAt(pos)->m_pub_fn_hGetTreeItem();
|
||||
|
||||
m_pclResultView->m_fn_vEnableFindNextButton( m_pri_lCurrentIndexInFoundItemsList < (m_pri_clListOfFoundNodes.GetCount() - 1) );
|
||||
m_pclResultView->m_fn_vEnableFindPrevButton(TRUE);
|
||||
|
||||
CString csStatusText;
|
||||
csStatusText.Format("Finder has selected occurence %ld on %ld", m_pri_lCurrentIndexInFoundItemsList + 1,
|
||||
m_pri_clListOfFoundNodes.GetCount());
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText(csStatusText);
|
||||
|
||||
return hNextItem;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
HTREEITEM IAD_MyDocument::m_pub_fn_hFindPreviousInTree()
|
||||
{
|
||||
m_pri_lCurrentIndexInFoundItemsList --;
|
||||
|
||||
POSITION pos = m_pri_clListOfFoundNodes.FindIndex(m_pri_lCurrentIndexInFoundItemsList);
|
||||
|
||||
HTREEITEM hNextItem = m_pri_clListOfFoundNodes.GetPrev(pos)->m_pub_fn_hGetTreeItem();
|
||||
|
||||
m_pclResultView->m_fn_vEnableFindNextButton(TRUE);
|
||||
m_pclResultView->m_fn_vEnableFindPrevButton( m_pri_lCurrentIndexInFoundItemsList > 0 );
|
||||
|
||||
CString csStatusText;
|
||||
csStatusText.Format("Finder has selected occurence %ld on %ld", m_pri_lCurrentIndexInFoundItemsList + 1,
|
||||
m_pri_clListOfFoundNodes.GetCount());
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText(csStatusText);
|
||||
|
||||
return hNextItem;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
TID_tdstFindInfo *IAD_MyDocument::m_pub_p_tdstGetFindInfo()
|
||||
{
|
||||
return &m_pri_tdstFindInfo;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
struct IAD_stInternalActorDescription *IAD_MyDocument::m_pub_fn_p_stGetSelectedActor()
|
||||
{
|
||||
return m_pri_p_stSelectedActor;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vSetSelectedActor(struct IAD_stInternalActorDescription *_p_stNewSelectedActor)
|
||||
{
|
||||
m_pri_p_stSelectedActor = _p_stNewSelectedActor;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vFreeEditorTraceForActor(struct IAD_stInternalActorDescription *_p_stActorToFree)
|
||||
{
|
||||
if ( _p_stActorToFree != NULL )
|
||||
{
|
||||
if ( _p_stActorToFree->pclRoot != NULL )
|
||||
{
|
||||
//Frees all nodes
|
||||
m_pri_fn_vFreeNodes(_p_stActorToFree->pclRoot);
|
||||
|
||||
_p_stActorToFree->pclRoot = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vFreeEditorTraceForEditedActor()
|
||||
{
|
||||
m_pub_fn_vFreeEditorTraceForActor(m_pri_p_stSelectedActor);
|
||||
|
||||
m_pri_p_stSelectedActor = NULL;
|
||||
|
||||
//Resets 'Find' list
|
||||
m_pri_clListOfFoundNodes.RemoveAll();
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText("Nothing has been searched");
|
||||
|
||||
//Resets Tree Control
|
||||
m_pclResultView->m_pub_fn_vDeleteAllInTreeControl();
|
||||
m_pclResultView->m_pub_fn_vSetStatusText("Ready !");
|
||||
m_pclResultView->m_pub_fn_vSetEditedActorName("<< Nothing edited >>");
|
||||
|
||||
m_pclControlView->m_pub_fn_vUnselectAllItems();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vReInitEditorTraceForActors()
|
||||
{
|
||||
IAD_td_stInternalActorDescription *p_stCurrentActorDesc;
|
||||
POSITION pos = m_pclControlView->m_pri_clListOfActors.GetHeadPosition();
|
||||
while ( pos != NULL )
|
||||
{
|
||||
p_stCurrentActorDesc = m_pclControlView->m_pri_clListOfActors.GetNext(pos);
|
||||
|
||||
if ( p_stCurrentActorDesc->bTraceIsEnabled )
|
||||
{
|
||||
m_pub_fn_vFreeEditorTraceForActor(p_stCurrentActorDesc);
|
||||
|
||||
if ( M_GetMainApp()->m_bAutoReinitTheMap )
|
||||
{
|
||||
//Calls motor re-init
|
||||
AI_tdstMind *p_stMind = M_pstGetMindOfBrain( ((tdstEngineObject *)p_stCurrentActorDesc->pclActor->GetStruct())->h_Brain );
|
||||
ERROR_ASSERT( p_stMind != NULL );
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
AIDebug_fn_vReinitTrace(p_stMind);
|
||||
#endif // CG PB DEBUGGER }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Resets display in Editor
|
||||
m_pri_p_stSelectedActor = NULL;
|
||||
|
||||
//Resets 'Find' list
|
||||
m_pri_clListOfFoundNodes.RemoveAll();
|
||||
m_pclResultView->m_pub_fn_vSetFindStatusText("Nothing has been searched");
|
||||
|
||||
//Resets Tree Control
|
||||
m_pclResultView->m_pub_fn_vDeleteAllInTreeControl();
|
||||
m_pclResultView->m_pub_fn_vSetStatusText("Ready !");
|
||||
m_pclResultView->m_pub_fn_vSetEditedActorName("<< Nothing edited >>");
|
||||
|
||||
m_pclControlView->m_pub_fn_vUnselectAllItems();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
BOOL IAD_MyDocument::m_pub_fn_bIsDebuggerOn()
|
||||
{
|
||||
return m_pri_bDebuggerIsOn;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vSetDebuggerOn(BOOL _bDebuggerOn /*= TRUE*/)
|
||||
{
|
||||
m_pri_bDebuggerIsOn = _bDebuggerOn;
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
// Private functions //
|
||||
///////////////////////
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pri_fn_vFindInOneLevelOfTree(IAD_EditorTreeNode *_pclParentNode,
|
||||
TID_tdstFindInfo *_p_tdstFindInfo)
|
||||
{
|
||||
IAD_EditorTreeNode *pclCurrentChildNode;
|
||||
BOOL bMustGoOn = TRUE;
|
||||
BOOL bMustAdd = TRUE;
|
||||
POSITION pos = _pclParentNode->m_pub_fn_ptdGetListOfChildNodes()->GetHeadPosition();
|
||||
while ( (pos != NULL) && (bMustGoOn) )
|
||||
{
|
||||
pclCurrentChildNode = _pclParentNode->m_pub_fn_ptdGetListOfChildNodes()->GetNext(pos);
|
||||
|
||||
if ( !_p_tdstFindInfo->bAllLevels )
|
||||
{
|
||||
bMustGoOn = ( pclCurrentChildNode->m_pub_fn_wGetDepth() <= _p_tdstFindInfo->lEndLevel );
|
||||
bMustAdd = ( pclCurrentChildNode->m_pub_fn_wGetDepth() >= _p_tdstFindInfo->lBeginningLevel );
|
||||
}
|
||||
|
||||
if ( bMustGoOn )
|
||||
{
|
||||
//Analyses current Node
|
||||
if ( bMustAdd )
|
||||
{
|
||||
if ( m_pri_fn_bNodeRespectsFindCriteria(pclCurrentChildNode, _p_tdstFindInfo) )
|
||||
m_pri_clListOfFoundNodes.AddTail(pclCurrentChildNode);
|
||||
}
|
||||
|
||||
//Looks in childs
|
||||
m_pri_fn_vFindInOneLevelOfTree(pclCurrentChildNode, _p_tdstFindInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
BOOL IAD_MyDocument::m_pri_fn_bNodeRespectsFindCriteria(IAD_EditorTreeNode *_pclNode,
|
||||
TID_tdstFindInfo *_p_tdstFindInfo)
|
||||
{
|
||||
BOOL bCriteriaRespected;
|
||||
|
||||
if ( _p_tdstFindInfo->bSimpleSearch )
|
||||
{
|
||||
bCriteriaRespected = m_pri_fn_bCompareStringsWithCriteria(_pclNode->m_pub_fn_csGetCompleteString(),
|
||||
_p_tdstFindInfo->csSimpleSearchString,
|
||||
_p_tdstFindInfo->bSimpleSearch_CaseSensitive,
|
||||
_p_tdstFindInfo->bSimpleSearch_Exact);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Analyses type
|
||||
bCriteriaRespected = ( _pclNode->m_pub_fn_tdeGetNodeType() == _p_tdstFindInfo->eNodeType );
|
||||
|
||||
if ( bCriteriaRespected )
|
||||
{
|
||||
if ( !_p_tdstFindInfo->csName.IsEmpty() )
|
||||
bCriteriaRespected = m_pri_fn_bCompareStringsWithCriteria(_pclNode->m_pub_fn_csGetNodeName(),
|
||||
_p_tdstFindInfo->csName,
|
||||
_p_tdstFindInfo->bName_CaseSensitive,
|
||||
_p_tdstFindInfo->bName_Exact);
|
||||
}
|
||||
|
||||
if ( bCriteriaRespected )
|
||||
{
|
||||
if ( !_p_tdstFindInfo->csValue.IsEmpty() )
|
||||
bCriteriaRespected = m_pri_fn_bCompareStringsWithCriteria(_pclNode->m_pub_fn_csGetNodeValue(),
|
||||
_p_tdstFindInfo->csValue,
|
||||
_p_tdstFindInfo->bValue_CaseSensitive,
|
||||
_p_tdstFindInfo->bValue_Exact);
|
||||
}
|
||||
|
||||
if ( bCriteriaRespected )
|
||||
{
|
||||
if ( !_p_tdstFindInfo->csRetValue.IsEmpty() )
|
||||
bCriteriaRespected = m_pri_fn_bCompareStringsWithCriteria(_pclNode->m_pub_fn_csGetNodeReturnValue(),
|
||||
_p_tdstFindInfo->csRetValue,
|
||||
_p_tdstFindInfo->bRetValue_CaseSensitive,
|
||||
_p_tdstFindInfo->bRetValue_Exact);
|
||||
}
|
||||
}
|
||||
|
||||
return bCriteriaRespected;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
BOOL IAD_MyDocument::m_pri_fn_bCompareStringsWithCriteria(CString _csString1,
|
||||
CString _csString2,
|
||||
BOOL _bMatchCase,
|
||||
BOOL _bExact)
|
||||
{
|
||||
BOOL bStringsRespectCriteria = FALSE;
|
||||
|
||||
CString csTempStr1 = _csString1;
|
||||
CString csTempStr2 = _csString2;
|
||||
|
||||
if ( !_bMatchCase )
|
||||
{
|
||||
csTempStr1.MakeLower();
|
||||
csTempStr2.MakeLower();
|
||||
}
|
||||
|
||||
if ( _bExact )
|
||||
bStringsRespectCriteria = ( csTempStr1.Compare(csTempStr2) == 0 );
|
||||
else
|
||||
bStringsRespectCriteria = ( csTempStr1.Find(csTempStr2) != -1 );
|
||||
|
||||
return bStringsRespectCriteria;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pub_fn_vDisplaySetup()
|
||||
{
|
||||
TID_Dialog_Setup SetupDial(AfxGetMainWnd());
|
||||
|
||||
SetupDial.DoModal();
|
||||
|
||||
//Saves INI file
|
||||
m_fn_bWriteIniFile();
|
||||
|
||||
//Refreshes Tree
|
||||
m_pclResultView->m_pub_fn_vRefreshTree();
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void IAD_MyDocument::m_pri_fn_vFreeNodes(IAD_EditorTreeNode *_pclParentNode)
|
||||
{
|
||||
IAD_EditorTreeNode *pclCurrentChildNode;
|
||||
POSITION pos = _pclParentNode->m_pub_fn_ptdGetListOfChildNodes()->GetHeadPosition();
|
||||
while ( pos != NULL )
|
||||
{
|
||||
pclCurrentChildNode = _pclParentNode->m_pub_fn_ptdGetListOfChildNodes()->GetNext(pos);
|
||||
|
||||
//Deletes childs of current child
|
||||
m_pri_fn_vFreeNodes(pclCurrentChildNode);
|
||||
|
||||
//Deletes current childs
|
||||
delete pclCurrentChildNode;
|
||||
}
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
struct AI_tdstMind_ *IAD_MyDocument::m_pub_fn_p_stGetMindOfActor(IAD_td_stInternalActorDescription *_p_stInternalActor)
|
||||
{
|
||||
return M_pstGetMindOfBrain( ((tdstEngineObject *)_p_stInternalActor->pclActor->GetStruct())->h_Brain );
|
||||
}
|
362
Rayman_X/cpa/tempgrp/TID/Src/IADEdtTr.cpp
Normal file
362
Rayman_X/cpa/tempgrp/TID/Src/IADEdtTr.cpp
Normal file
@@ -0,0 +1,362 @@
|
||||
// Classes for the Editor tree
|
||||
//
|
||||
// YB
|
||||
//////////////////////////////////////////////
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
|
||||
#include "IADEdttr.hpp"
|
||||
|
||||
#include "IADEdtTr.hpp"
|
||||
#include "IADLnkMt.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADVwRst.hpp"
|
||||
#include "IAD_Res.h"
|
||||
#include "x:/cpa/tempgrp/tia/inc/ai_intf.hpp"
|
||||
#include "x:/cpa/main/inc/_EditId.h"
|
||||
|
||||
//External Modules
|
||||
#include "OAc.h"
|
||||
//End of External Modules
|
||||
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
//*********************************************************************
|
||||
//Constructor
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
IAD_EditorTreeNode::IAD_EditorTreeNode(enum AIDebug_tdeSectionType_ _tdeNodeType,
|
||||
tdstNodeInterpret *_p_stNode,
|
||||
CPA_Actor *_pclParentActor,
|
||||
IAD_EditorTreeNode *_pclParentNode,
|
||||
short _wDepth,
|
||||
CString _csNodeType,
|
||||
CString _csNodeName /*= ""*/,
|
||||
CString _csValue /*= ""*/,
|
||||
CString _csReturnValue /*= ""*/,
|
||||
CString _csNodeAdditionnalInfo /*= ""*/,
|
||||
BOOL bSubtreeBuilded /*= TRUE*/,
|
||||
unsigned short uwSubtreeTraceIndex /*= -1*/)
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
{
|
||||
m_pro_tdeNodeType = _tdeNodeType;
|
||||
m_p_stMotorNode = _p_stNode;
|
||||
m_pri_pclParentActor = _pclParentActor;
|
||||
|
||||
m_pro_pclParentNode = _pclParentNode;
|
||||
m_pro_wDepth = _wDepth;
|
||||
m_pro_csNodeType = _csNodeType;
|
||||
m_pro_csNodeName = _csNodeName;
|
||||
m_pro_csReturnValue = _csReturnValue;
|
||||
m_pro_csValue = _csValue;
|
||||
|
||||
m_pro_csNodeAdditionnalInfo = _csNodeAdditionnalInfo;
|
||||
|
||||
m_pro_csCompleteString = m_pri_fn_csComputeTotalName();
|
||||
|
||||
m_pro_hTreeItem = NULL;
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
m_bSubtreeBuilded = bSubtreeBuilded;
|
||||
m_uwSubtreeTraceIndex = uwSubtreeTraceIndex;
|
||||
|
||||
m_lNumberOfVariableValues = 0;
|
||||
m_a_tdstArrayOfVariableValues = NULL;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
//Empty Constructor for Root
|
||||
IAD_EditorTreeNode::IAD_EditorTreeNode()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
m_pro_tdeNodeType = (enum AIDebug_tdeSectionType_)AI_DEBUGGER_CONSTANT_FOR_TREE_ROOT_ID;
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
m_pro_pclParentNode = NULL;
|
||||
m_pro_wDepth = IAD_NODE_DEPTH_UNKNOWN;
|
||||
m_pro_csNodeType = "** Root **";
|
||||
m_pro_csNodeAdditionnalInfo = "";
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
m_bSubtreeBuilded = TRUE;
|
||||
m_uwSubtreeTraceIndex = -1;
|
||||
|
||||
m_lNumberOfVariableValues = 0;
|
||||
m_a_tdstArrayOfVariableValues = NULL;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
//Destructor
|
||||
IAD_EditorTreeNode::~IAD_EditorTreeNode()
|
||||
{
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
if (m_a_tdstArrayOfVariableValues != NULL)
|
||||
free (m_a_tdstArrayOfVariableValues);
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
// Public Functions //
|
||||
//////////////////////
|
||||
|
||||
//Get/Set functions
|
||||
////////////////////
|
||||
|
||||
//*********************************************************************
|
||||
IAD_tdListOfNodes *IAD_EditorTreeNode::m_pub_fn_ptdGetListOfChildNodes()
|
||||
{
|
||||
return &m_pro_clListOfChildNodes;
|
||||
}
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//*********************************************************************
|
||||
void IAD_EditorTreeNode::m_fn_vSetListOfChildNodes (IAD_tdListOfNodes *pclListOfChildNodes)
|
||||
{
|
||||
// cleaning
|
||||
IAD_EditorTreeNode *pclWasteNode;
|
||||
POSITION pos = m_pro_clListOfChildNodes . GetHeadPosition ();
|
||||
while (pos != NULL)
|
||||
{
|
||||
pclWasteNode = m_pro_clListOfChildNodes . GetNext (pos);
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
if (! pclListOfChildNodes -> Find (pclWasteNode))
|
||||
delete pclWasteNode;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
m_pro_clListOfChildNodes . RemoveAll ();
|
||||
|
||||
// add the new ones
|
||||
pos = pclListOfChildNodes -> GetHeadPosition ();
|
||||
while (pos != NULL)
|
||||
{
|
||||
m_pro_clListOfChildNodes . AddTail (pclListOfChildNodes -> GetNext (pos));
|
||||
}
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
//*********************************************************************
|
||||
IAD_EditorTreeNode *IAD_EditorTreeNode::m_pub_fn_pclGetParentNode()
|
||||
{
|
||||
return m_pro_pclParentNode;
|
||||
}
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//*********************************************************************
|
||||
IAD_EditorTreeNode *IAD_EditorTreeNode::m_fn_pclGetBehaviourParentNode()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
IAD_EditorTreeNode *pclBehaviourNode = this;
|
||||
|
||||
while (pclBehaviourNode && pclBehaviourNode -> m_pub_fn_tdeGetNodeType () != AIDebug_E_SecTyp_ReflexOrAI)
|
||||
{
|
||||
pclBehaviourNode = pclBehaviourNode -> m_pub_fn_pclGetParentNode ();
|
||||
}
|
||||
|
||||
return pclBehaviourNode;
|
||||
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
void IAD_EditorTreeNode::m_fn_vAddExecutedNodes (void)
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
// for me
|
||||
if (m_pro_tdeNodeType != AIDebug_E_SecTyp_ReflexOrAI)
|
||||
{
|
||||
m_pri_pclParentActor -> m_fn_vSetOneExecutedNode (m_p_stMotorNode);
|
||||
}
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
|
||||
// and for all the childs
|
||||
IAD_EditorTreeNode *pclChildNode;
|
||||
|
||||
POSITION pos = m_pro_clListOfChildNodes . GetHeadPosition ();
|
||||
while (pos != NULL)
|
||||
{
|
||||
pclChildNode = m_pro_clListOfChildNodes . GetNext (pos);
|
||||
pclChildNode -> m_fn_vAddExecutedNodes ();
|
||||
}
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
//*********************************************************************
|
||||
IAD_EditorTreeNode *IAD_EditorTreeNode::m_fn_pclGetEngineLoopParentNode()
|
||||
{
|
||||
IAD_EditorTreeNode *pclBehaviourNode = this;
|
||||
|
||||
while (pclBehaviourNode && pclBehaviourNode -> m_pub_fn_tdeGetNodeType () != AIDebug_E_SecTyp_EngineLoop)
|
||||
{
|
||||
pclBehaviourNode = pclBehaviourNode -> m_pub_fn_pclGetParentNode ();
|
||||
}
|
||||
|
||||
ASSERT (pclBehaviourNode);
|
||||
return pclBehaviourNode;
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
//*********************************************************************
|
||||
tdstNodeInterpret *IAD_EditorTreeNode::m_pub_fn_p_stGetMotorNode()
|
||||
{
|
||||
return m_p_stMotorNode;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CPA_Actor *IAD_EditorTreeNode::m_pub_fn_pclGetParentActor()
|
||||
{
|
||||
return m_pri_pclParentActor;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
short IAD_EditorTreeNode::m_pub_fn_wGetDepth()
|
||||
{
|
||||
return m_pro_wDepth;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
HTREEITEM IAD_EditorTreeNode::m_pub_fn_hGetTreeItem()
|
||||
{
|
||||
return m_pro_hTreeItem;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
void IAD_EditorTreeNode::m_pub_fn_vSetTreeItem(HTREEITEM _hTreeItem)
|
||||
{
|
||||
m_pro_hTreeItem = _hTreeItem;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
enum AIDebug_tdeSectionType_ IAD_EditorTreeNode::m_pub_fn_tdeGetNodeType()
|
||||
{
|
||||
return m_pro_tdeNodeType;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetNodeType()
|
||||
{
|
||||
return m_pro_csNodeType;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetNodeName()
|
||||
{
|
||||
return m_pro_csNodeName;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetNodeValue()
|
||||
{
|
||||
return m_pro_csValue;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetNodeReturnValue()
|
||||
{
|
||||
return m_pro_csReturnValue;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetNodeAdditionnalInfo()
|
||||
{
|
||||
return m_pro_csNodeAdditionnalInfo;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
void IAD_EditorTreeNode::m_pub_fn_vSetNodeAdditionnalInfo(CString _csNewNodeInfo)
|
||||
{
|
||||
m_pro_csNodeAdditionnalInfo = _csNewNodeInfo;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pub_fn_csGetCompleteString()
|
||||
{
|
||||
return m_pro_csCompleteString;
|
||||
}
|
||||
|
||||
|
||||
//Tree construction
|
||||
////////////////////
|
||||
|
||||
//*********************************************************************
|
||||
IAD_EditorTreeNode *IAD_EditorTreeNode::m_pub_fn_pclAddChildNode(enum AIDebug_tdeSectionType_ _tdeNodeType,
|
||||
tdstNodeInterpret *_p_stNode,
|
||||
CPA_Actor *_pclParentActor,
|
||||
CString _csNewElementType,
|
||||
CString _csNewElementName,
|
||||
CString _csNewElementValue,
|
||||
CString _csNewElemenReturnValue,
|
||||
CString _csNodeAdditionnalInfo)
|
||||
{
|
||||
IAD_EditorTreeNode *pclNewNode = new IAD_EditorTreeNode(_tdeNodeType,
|
||||
_p_stNode,
|
||||
_pclParentActor,
|
||||
this,
|
||||
m_pub_fn_wGetDepth() + 1,
|
||||
_csNewElementType,
|
||||
_csNewElementName,
|
||||
_csNewElementValue,
|
||||
_csNewElemenReturnValue,
|
||||
_csNodeAdditionnalInfo);
|
||||
//Adds to internal list
|
||||
m_pro_clListOfChildNodes.AddTail(pclNewNode);
|
||||
|
||||
return pclNewNode;
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
// Description: this function add a new variable value to a given node
|
||||
// Note: it uses dinamic reallocation of the array of values
|
||||
//*********************************************************************
|
||||
#define BLOCK_INCREMENT 20
|
||||
void IAD_EditorTreeNode :: m_fn_vAddVariableValue (tdstGetSetParam *p_tdstValue)
|
||||
{
|
||||
// realloc
|
||||
if (m_lNumberOfVariableValues % BLOCK_INCREMENT == 0)
|
||||
m_a_tdstArrayOfVariableValues = (tdstGetSetParam *) realloc (m_a_tdstArrayOfVariableValues, (m_lNumberOfVariableValues + BLOCK_INCREMENT) * sizeof (tdstGetSetParam));
|
||||
|
||||
if (m_a_tdstArrayOfVariableValues)
|
||||
m_a_tdstArrayOfVariableValues [m_lNumberOfVariableValues ++] = * p_tdstValue;
|
||||
}
|
||||
#undef BLOCK_INCREMENT
|
||||
|
||||
//*********************************************************************
|
||||
tdstGetSetParam * IAD_EditorTreeNode :: m_fn_p_tdstGetVariableValue (long lIndex)
|
||||
{
|
||||
if (lIndex >= 0 && lIndex < m_lNumberOfVariableValues)
|
||||
return & m_a_tdstArrayOfVariableValues [lIndex];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
////////////////////////
|
||||
// Private Functions //
|
||||
////////////////////////
|
||||
|
||||
//*********************************************************************
|
||||
CString IAD_EditorTreeNode::m_pri_fn_csComputeTotalName()
|
||||
{
|
||||
CString csTotalName = m_pro_csNodeType;
|
||||
|
||||
if ( !m_pro_csNodeName.IsEmpty() )
|
||||
csTotalName += CString(" ") + m_pro_csNodeName;
|
||||
if ( !m_pro_csValue.IsEmpty() )
|
||||
csTotalName += CString(" = ") + m_pro_csValue;
|
||||
if ( !m_pro_csReturnValue.IsEmpty() )
|
||||
csTotalName += CString(" [ returns ") + m_pro_csReturnValue + " ]";
|
||||
|
||||
return csTotalName;
|
||||
}
|
||||
|
135
Rayman_X/cpa/tempgrp/TID/Src/IADFmMn.cpp
Normal file
135
Rayman_X/cpa/tempgrp/TID/Src/IADFmMn.cpp
Normal file
@@ -0,0 +1,135 @@
|
||||
// MainFrm.cpp : implementation of the IAD_MainFrame class
|
||||
////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "IADFmMn.hpp"
|
||||
|
||||
#include "IADVwMn.hpp"
|
||||
#include "IADVwRst.hpp"
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
#include "IADVrVw.hpp"
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
#include "IADCnst.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
//HCURSOR g_hcursor_CloseHand;
|
||||
//HCURSOR g_hcursor_UpDownHand;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_MainFrame
|
||||
BEGIN_MESSAGE_MAP(IAD_MainFrame, CSplitFrame)
|
||||
//{{AFX_MSG_MAP(IAD_MainFrame)
|
||||
ON_WM_HELPINFO()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_MainFrame construction/destruction
|
||||
|
||||
//*******************************************************************************
|
||||
IAD_MainFrame::IAD_MainFrame()
|
||||
{
|
||||
//Loads a special curosr
|
||||
// g_hcursor_UpDownHand = AfxGetApp()->LoadCursor(IDC_CURSOR_UPDOWN_HAND);
|
||||
// g_hcursor_CloseHand = AfxGetApp()->LoadCursor(IDC_CURSOR_CLOSED_HAND);
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
IAD_MainFrame::~IAD_MainFrame()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL IAD_MainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
|
||||
{
|
||||
if ( !(CreateSplitter(C_cVerticalSplitter, 3)) )
|
||||
return FALSE;
|
||||
|
||||
HINSTANCE hOldInstance = AfxGetResourceHandle();
|
||||
AfxSetResourceHandle(g_stIADDLLIdentity.hModule);
|
||||
|
||||
//Creates MS view
|
||||
if ( !CreateView(1,
|
||||
RUNTIME_CLASS(IAD_ResultView),
|
||||
"Results",
|
||||
350)
|
||||
)
|
||||
return FALSE;
|
||||
|
||||
//Creates Control view
|
||||
if ( !CreateView(0,
|
||||
RUNTIME_CLASS(IAD_ControlView),
|
||||
"Actors Selection",
|
||||
190)
|
||||
)
|
||||
return FALSE;
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//Creates Variable view
|
||||
if ( !CreateView(2,
|
||||
RUNTIME_CLASS(IAD_VariableView),
|
||||
"View Variables",
|
||||
50)
|
||||
)
|
||||
return FALSE;
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
//Manually calls OnInitialUpdate for all views !!!!!
|
||||
IAD_ResultView *pclMSView = (IAD_ResultView *)m_fn_p_oGetPane(1);
|
||||
pclMSView->OnInitialUpdate();
|
||||
|
||||
IAD_ControlView *pclControlView = (IAD_ControlView *)m_fn_p_oGetPane(0);
|
||||
pclControlView->OnInitialUpdate();
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
IAD_VariableView *pclVariableView = (IAD_VariableView *)m_fn_p_oGetPane(2);
|
||||
pclVariableView->OnInitialUpdate();
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
AfxSetResourceHandle(hOldInstance);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL IAD_MainFrame::OnHelpInfo(HELPINFO* pHelpInfo)
|
||||
{
|
||||
::WinHelp(m_hWnd,
|
||||
LPCTSTR(g_pclInterface->m_clDocument.m_csHelpFileNameAndPath),
|
||||
HELP_FINDER,
|
||||
0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
//*******************************************************************************
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_MainFrame diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void IAD_MainFrame::AssertValid() const
|
||||
{
|
||||
CFrameWnd::AssertValid();
|
||||
}
|
||||
|
||||
void IAD_MainFrame::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFrameWnd::Dump(dc);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_MainFrame message handlers
|
||||
|
||||
|
125
Rayman_X/cpa/tempgrp/TID/Src/IADGlob.cpp
Normal file
125
Rayman_X/cpa/tempgrp/TID/Src/IADGlob.cpp
Normal file
@@ -0,0 +1,125 @@
|
||||
// IA Debugger : Global Functions
|
||||
//
|
||||
// YB
|
||||
//
|
||||
//////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADGlob.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
// For "IncAI.h" !!
|
||||
#include "ACP_Base.h"
|
||||
#include "IncAI.h"
|
||||
// End For "IncAI.h" !!
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
|
||||
#define TID_C_szUnknownEntryName "<< Unknown >>"
|
||||
|
||||
//*****************************************************************************************
|
||||
CString IAD_fn_csComputeValueFromGetSetParam(struct tdstGetSetParam_ *_p_tdstGetSetParam)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
switch ( M_GetSetParam_Type(_p_tdstGetSetParam) )
|
||||
{
|
||||
case E_vt_Boolean:
|
||||
csReturnedString.Format("%s", (M_GetSetParam_cValue(_p_tdstGetSetParam) == 0) ? "False" : "True");
|
||||
break;
|
||||
case E_vt__128To127:
|
||||
csReturnedString.Format("%i", M_GetSetParam_cValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_0To255:
|
||||
csReturnedString.Format("%i", M_GetSetParam_ucValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt__32768To32767:
|
||||
csReturnedString.Format("%i", M_GetSetParam_wValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_0To65535:
|
||||
csReturnedString.Format("%i", M_GetSetParam_uwValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_Integer:
|
||||
csReturnedString.Format("%ld", M_GetSetParam_lValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_PositiveInteger:
|
||||
csReturnedString.Format("%u", M_GetSetParam_ulValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_Float:
|
||||
csReturnedString.Format("%f", M_GetSetParam_xValue(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_String:
|
||||
csReturnedString.Format("%s", M_GetSetParam_szString(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_Vector:
|
||||
csReturnedString.Format("%f ; %f ; %f", M_GetSetParam_stVertexValue(_p_tdstGetSetParam).xX,
|
||||
M_GetSetParam_stVertexValue(_p_tdstGetSetParam).xY,
|
||||
M_GetSetParam_stVertexValue(_p_tdstGetSetParam).xZ);
|
||||
break;
|
||||
case E_vt_Family:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)NULL, C_szFamilyTypeName);
|
||||
break;
|
||||
case E_vt_Comport:
|
||||
csReturnedString = M_GetNameComport(M_GetSetParam_pComport(_p_tdstGetSetParam));
|
||||
break;
|
||||
case E_vt_Perso:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_p_stEngineObjValue(_p_tdstGetSetParam), C_szActorInstanceTypeName);
|
||||
break;
|
||||
case E_vt_WayPoint:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_WayPointValue(_p_tdstGetSetParam), C_szWayPointTypeName);
|
||||
break;
|
||||
//case E_vt_Way:
|
||||
// csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_WayValue(_p_tdstGetSetParam), C_szWayTypeName);
|
||||
// break;
|
||||
case E_vt_Action:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_ActionValue(_p_tdstGetSetParam), C_szStateTypeName);
|
||||
break;
|
||||
// Shaitan Clean Env {
|
||||
/*
|
||||
case E_vt_Surface:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_SurfaceValue(_p_tdstGetSetParam), C_szSurfaceTypeName);
|
||||
break;
|
||||
*/
|
||||
//End Shaitan Clean Env }
|
||||
case E_vt_LipsSynchro:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_hLipsSynchro(_p_tdstGetSetParam), C_szLipSynchroTypeName);
|
||||
break;
|
||||
case E_vt_ObjectTable:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_hObjectTable(_p_tdstGetSetParam), C_szObjectTableTypeNAme);
|
||||
break;
|
||||
case E_vt_SuperObject:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_SectorValue(_p_tdstGetSetParam), /*C_szObjectTableTypeNAme*/"");
|
||||
break;
|
||||
// Shaitan Clean Env {
|
||||
/*
|
||||
case E_vt_Environment:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_EnvironmentValue(_p_tdstGetSetParam), C_szEnvironmentTypeName);
|
||||
break;
|
||||
*/
|
||||
//End Shaitan Clean Env }
|
||||
case E_vt_SoundEvent:
|
||||
csReturnedString = IAD_fn_csSearchNameFromMotorPointer((void *)M_GetSetParam_SoundEvent(_p_tdstGetSetParam), C_szSoundEventTypeName);
|
||||
break;
|
||||
|
||||
default:
|
||||
csReturnedString = "Unknown";
|
||||
break;
|
||||
};
|
||||
|
||||
return csReturnedString;
|
||||
}
|
||||
|
||||
//*****************************************************************************************
|
||||
CString IAD_fn_csSearchNameFromMotorPointer(void *_pvMotorData,
|
||||
CString _csEditorObjectType)
|
||||
{
|
||||
CString csReturnedString;
|
||||
|
||||
CPA_BaseObject *p_clBO = g_pclInterface->GetMainWorld()->fn_p_oFindObjectWithEngine(_pvMotorData, _csEditorObjectType);
|
||||
|
||||
csReturnedString = TID_C_szUnknownEntryName;
|
||||
if ( p_clBO != NULL )
|
||||
csReturnedString = p_clBO->GetName();
|
||||
|
||||
return csReturnedString;
|
||||
}
|
76
Rayman_X/cpa/tempgrp/TID/Src/IADIni.cpp
Normal file
76
Rayman_X/cpa/tempgrp/TID/Src/IADIni.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADDoc.hpp"
|
||||
#include "IADDgIf.hpp"
|
||||
#include "IADLnkMt.hpp"
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
// Ini file implementation //
|
||||
/////////////////////////////////////
|
||||
|
||||
#define IAD_C_szInitSection_General "General"
|
||||
#define IAD_C_szInitEntry_Colors "Colors"
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_MyDocument::m_fn_bReadIniFile()
|
||||
{
|
||||
CFile file;
|
||||
if ( !file.Open(m_csIniFileName, CFile::modeRead) )
|
||||
{
|
||||
CString csMessage = "The Ini file ""IA_Debug.ini"" is not present in ";
|
||||
csMessage += m_csIniFileName.Left(m_csIniFileName.ReverseFind('\\'));
|
||||
csMessage += "\nParameters are default ones, but they will be saved when you exit this application.";
|
||||
IAD_InformationDialog dial(NULL, csMessage);
|
||||
dial.DoModal();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
file.Close();
|
||||
|
||||
BOOL bReturn = TRUE;
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
//Reads colors
|
||||
if ( bReturn )
|
||||
bReturn = GetPrivateProfileStruct(IAD_C_szInitSection_General,
|
||||
IAD_C_szInitEntry_Colors,
|
||||
(void *)(&g_a_colrefTypeColor),
|
||||
sizeof(g_a_colrefTypeColor),
|
||||
LPCTSTR(m_csIniFileName));
|
||||
|
||||
#else
|
||||
bReturn = FALSE;
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_MyDocument::m_fn_bWriteIniFile()
|
||||
{
|
||||
BOOL bReturn = TRUE;
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
//Writes colors Array
|
||||
if ( bReturn )
|
||||
bReturn = WritePrivateProfileStruct(IAD_C_szInitSection_General,
|
||||
IAD_C_szInitEntry_Colors,
|
||||
(void *)(&g_a_colrefTypeColor),
|
||||
sizeof(g_a_colrefTypeColor),
|
||||
LPCTSTR(m_csIniFileName));
|
||||
|
||||
#else
|
||||
bReturn = FALSE;
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
return bReturn;
|
||||
}
|
||||
|
124
Rayman_X/cpa/tempgrp/TID/Src/IADLnkMt.cpp
Normal file
124
Rayman_X/cpa/tempgrp/TID/Src/IADLnkMt.cpp
Normal file
@@ -0,0 +1,124 @@
|
||||
// Link between trace element type and string to represent it in editor Tree
|
||||
//
|
||||
// YB
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADLnkMt.hpp"
|
||||
|
||||
#include "IADClBck.hpp"
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
//Global arrays
|
||||
td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetTypeCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
|
||||
td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetNameCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
|
||||
td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetValueCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
|
||||
td_p_fn_vComputeStringCallBack g_a_p_fnArrayOfGetReturnValueCallBacks[AIDebug_E_SecTyp_NbOfSectionType];
|
||||
COLORREF g_a_colrefTypeColor[AIDebug_E_SecTyp_NbOfSectionType];
|
||||
|
||||
#define TID_M_SetCallBackForEntryType(EntryName) \
|
||||
g_a_p_fnArrayOfGetTypeCallBacks[AIDebug_E_SecTyp_##EntryName] = IAD_fn_vGetTypeCallBack_##EntryName; \
|
||||
g_a_p_fnArrayOfGetNameCallBacks[AIDebug_E_SecTyp_##EntryName] = IAD_fn_vGetNameCallBack_##EntryName; \
|
||||
g_a_p_fnArrayOfGetValueCallBacks[AIDebug_E_SecTyp_##EntryName] = IAD_fn_vGetValueCallBack_##EntryName; \
|
||||
g_a_p_fnArrayOfGetReturnValueCallBacks[AIDebug_E_SecTyp_##EntryName] = IAD_fn_vGetReturnValueCallBack_##EntryName;
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
//******************************************************************************
|
||||
void IAD_g_fn_vInitGetStringCallBacks()
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
//First Init for Arrays
|
||||
for (long lI = 0; lI < AIDebug_E_SecTyp_NbOfSectionType; lI ++ )
|
||||
{
|
||||
g_a_p_fnArrayOfGetTypeCallBacks[lI] = NULL;
|
||||
g_a_p_fnArrayOfGetValueCallBacks[lI] = NULL;
|
||||
g_a_p_fnArrayOfGetReturnValueCallBacks[lI] = NULL;
|
||||
}
|
||||
|
||||
//True inits
|
||||
TID_M_SetCallBackForEntryType(EngineLoop)
|
||||
TID_M_SetCallBackForEntryType(ReflexOrAI)
|
||||
TID_M_SetCallBackForEntryType(CurrentComport)
|
||||
TID_M_SetCallBackForEntryType(Field)
|
||||
TID_M_SetCallBackForEntryType(Constant)
|
||||
TID_M_SetCallBackForEntryType(DsgVarId)
|
||||
TID_M_SetCallBackForEntryType(DsgVar)
|
||||
TID_M_SetCallBackForEntryType(Button)
|
||||
TID_M_SetCallBackForEntryType(EnvRef)
|
||||
TID_M_SetCallBackForEntryType(SectorRef)
|
||||
TID_M_SetCallBackForEntryType(SurfaceRef)
|
||||
TID_M_SetCallBackForEntryType(PersoRef)
|
||||
TID_M_SetCallBackForEntryType(ActionRef)
|
||||
TID_M_SetCallBackForEntryType(Real)
|
||||
TID_M_SetCallBackForEntryType(Vector)
|
||||
TID_M_SetCallBackForEntryType(ConstantVector)
|
||||
// TID_M_SetCallBackForEntryType(Way)
|
||||
TID_M_SetCallBackForEntryType(WayPoint)
|
||||
TID_M_SetCallBackForEntryType(Module)
|
||||
// TID_M_SetCallBackForEntryType(ChannelNumber)
|
||||
TID_M_SetCallBackForEntryType(Mask)
|
||||
TID_M_SetCallBackForEntryType(String)
|
||||
TID_M_SetCallBackForEntryType(LipsSynchroRef)
|
||||
TID_M_SetCallBackForEntryType(SoundEventRef)
|
||||
TID_M_SetCallBackForEntryType(FamilyRef)
|
||||
TID_M_SetCallBackForEntryType(BeginMacro)
|
||||
TID_M_SetCallBackForEntryType(EndMacro)
|
||||
TID_M_SetCallBackForEntryType(Comport)
|
||||
TID_M_SetCallBackForEntryType(KeyWord)
|
||||
TID_M_SetCallBackForEntryType(Condition)
|
||||
TID_M_SetCallBackForEntryType(Function)
|
||||
TID_M_SetCallBackForEntryType(Operator)
|
||||
TID_M_SetCallBackForEntryType(Procedure)
|
||||
TID_M_SetCallBackForEntryType(MetaAction)
|
||||
TID_M_SetCallBackForEntryType(BeginMetaAction)
|
||||
// TID_M_SetCallBackForEntryType(TextRef)
|
||||
// TID_M_SetCallBackForEntryType(FontRef)
|
||||
// TID_M_SetCallBackForEntryType(ParticleGenerator)
|
||||
|
||||
//Colors
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_EngineLoop] = RGB(150,150,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_ReflexOrAI] = RGB(175,150,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_CurrentComport] = RGB(200,150,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Field] = RGB(225,150,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Constant] = RGB(250,150,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_DsgVarId] = RGB(150,175,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_DsgVar] = RGB(150,200,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Button] = RGB(150,225,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_EnvRef] = RGB(150,250,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_SectorRef] = RGB(150,150,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_SurfaceRef] = RGB(150,150,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_PersoRef] = RGB(150,150,225);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_ActionRef] = RGB(150,150,250);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Real] = RGB(175,150,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Vector] = RGB(175,150,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_ConstantVector] = RGB(175,150,225);
|
||||
// g_a_colrefTypeColor[AIDebug_E_SecTyp_Way] = RGB(175,150,225);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_WayPoint] = RGB(175,175,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Module] = RGB(175,200,150);
|
||||
// g_a_colrefTypeColor[AIDebug_E_SecTyp_ChannelNumber] = RGB(175,225,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Mask] = RGB(175,250,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_String] = RGB(200,150,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_LipsSynchroRef] = RGB(200,175,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_SoundEventRef] = RGB(200,200,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_FamilyRef] = RGB(200,225,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_BeginMacro] = RGB(200,250,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_EndMacro] = RGB(200,200,150);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Comport] = RGB(200,200,175);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_KeyWord] = RGB(200,200,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Condition] = RGB(200,200,225);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Function] = RGB(200,200,250);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Operator] = RGB(150,200,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_Procedure] = RGB(175,200,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_MetaAction] = RGB(100,175,200);
|
||||
g_a_colrefTypeColor[AIDebug_E_SecTyp_BeginMetaAction] = RGB(100,200,200);
|
||||
// g_a_colrefTypeColor[AIDebug_E_SecTyp_TextRef] = RGB(100,150,150);
|
||||
// g_a_colrefTypeColor[AIDebug_E_SecTyp_FontRef] = RGB(150,100,150);
|
||||
// g_a_colrefTypeColor[AIDebug_E_SecTyp_ParticleGenerator] = RGB(150,150,100);
|
||||
// g_a_colrefTypeColor[] = RGB();
|
||||
|
||||
#endif // CG PB DEBUGGER
|
||||
}
|
156
Rayman_X/cpa/tempgrp/TID/Src/IADLstCt.cpp
Normal file
156
Rayman_X/cpa/tempgrp/TID/Src/IADLstCt.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
// IADLstCt.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "IADLstCt.hpp"
|
||||
|
||||
#include "IADVwMn.hpp"
|
||||
#include "IADDgSN.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
//External modules
|
||||
#include "AI.h"
|
||||
#include "OAc.h"
|
||||
//End External modules
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ListControl
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_ListControl, CListCtrl)
|
||||
//{{AFX_MSG_MAP(IAD_ListControl)
|
||||
ON_WM_LBUTTONUP()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_ListControl::IAD_ListControl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
IAD_ListControl::~IAD_ListControl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ListControl message handlers
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_ListControl::OnLButtonUp(UINT nFlags, CPoint point)
|
||||
{
|
||||
//Looks where user clicked
|
||||
CRect crWindowRect;
|
||||
GetWindowRect(crWindowRect);
|
||||
ScreenToClient(&crWindowRect);
|
||||
|
||||
CPoint cpLocalPoint = point;
|
||||
|
||||
short wFirstCol = GetColumnWidth(0);
|
||||
short wSecondCol = GetColumnWidth(1);
|
||||
short wLastCol = GetColumnWidth(4);
|
||||
|
||||
//If 'Size' column was clicked
|
||||
if ( (cpLocalPoint.x > (crWindowRect.right - wLastCol))
|
||||
&& (cpLocalPoint.x < crWindowRect.right)
|
||||
)
|
||||
{
|
||||
//Gets the corresponding Actor
|
||||
IAD_td_stInternalActorDescription *p_stSelectedInternalActor = NULL;
|
||||
BOOL bMustStop = FALSE;
|
||||
long lI;
|
||||
CRect crItemRect;
|
||||
for (lI = 0; (lI < GetItemCount()) && (!bMustStop); lI ++)
|
||||
{
|
||||
GetItemRect(lI, &crItemRect, LVIR_BOUNDS);
|
||||
|
||||
if ( (cpLocalPoint.y > crItemRect.top)
|
||||
&& (cpLocalPoint.y < crItemRect.bottom)
|
||||
)
|
||||
{
|
||||
p_stSelectedInternalActor = (IAD_td_stInternalActorDescription *)GetItemData(lI);
|
||||
bMustStop = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( p_stSelectedInternalActor != NULL )
|
||||
{
|
||||
//Displays an Edit to get new value
|
||||
CPoint cpTopLeft;
|
||||
cpTopLeft.x = crItemRect.right;
|
||||
cpTopLeft.y = crItemRect.top;
|
||||
ClientToScreen(&cpTopLeft);
|
||||
cpTopLeft.x -= wLastCol;
|
||||
IAD_Dialog_SetNumber SNDial(cpTopLeft,
|
||||
p_stSelectedInternalActor->lNumberOfEntries,
|
||||
this);
|
||||
|
||||
if ( SNDial.DoModal() == IDOK )
|
||||
{
|
||||
p_stSelectedInternalActor->lNumberOfEntries = SNDial.m_pub_fn_lGetNumber();
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
//Sets motor part
|
||||
AIDebug_fn_vResizeTrace(g_pclInterface->m_clDocument.m_pub_fn_p_stGetMindOfActor(p_stSelectedInternalActor), (short)p_stSelectedInternalActor->lNumberOfEntries);
|
||||
#endif // { CG PB DEBUGGER
|
||||
|
||||
CString csText;
|
||||
csText.Format("%ld", p_stSelectedInternalActor->lNumberOfEntries);
|
||||
SetItemText(--lI, 4, csText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//If 'On' column was clicked
|
||||
if ( (cpLocalPoint.x > (crWindowRect.left + wFirstCol))
|
||||
&& (cpLocalPoint.x < (crWindowRect.left + wFirstCol + wSecondCol))
|
||||
)
|
||||
{
|
||||
//Gets the corresponding Actor
|
||||
IAD_td_stInternalActorDescription *p_stSelectedInternalActor = NULL;
|
||||
BOOL bMustStop = FALSE;
|
||||
long lI;
|
||||
CRect crItemRect;
|
||||
for (lI = 0; (lI < GetItemCount()) && (!bMustStop); lI ++)
|
||||
{
|
||||
GetItemRect(lI, &crItemRect, LVIR_LABEL);
|
||||
|
||||
if ( (cpLocalPoint.y > crItemRect.top)
|
||||
&& (cpLocalPoint.y < crItemRect.bottom)
|
||||
)
|
||||
{
|
||||
p_stSelectedInternalActor = (IAD_td_stInternalActorDescription *)GetItemData(lI);
|
||||
bMustStop = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( p_stSelectedInternalActor != NULL )
|
||||
{
|
||||
p_stSelectedInternalActor->bTraceIsEnabled = !p_stSelectedInternalActor->bTraceIsEnabled;
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//for the debug info
|
||||
p_stSelectedInternalActor -> pclActor -> m_fn_vMustBuildDebugInfo (p_stSelectedInternalActor->bTraceIsEnabled);
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
//Sets motor part
|
||||
AIDebug_fn_vSetEnable(g_pclInterface->m_clDocument.m_pub_fn_p_stGetMindOfActor(p_stSelectedInternalActor), p_stSelectedInternalActor->bTraceIsEnabled);
|
||||
#endif // CG PB DEBUGGER
|
||||
|
||||
SetItemText(--lI, 1, p_stSelectedInternalActor->bTraceIsEnabled ? "X" : "");
|
||||
}
|
||||
}
|
||||
|
||||
CListCtrl::OnLButtonUp(nFlags, point);
|
||||
}
|
487
Rayman_X/cpa/tempgrp/TID/Src/IADTrCtl.cpp
Normal file
487
Rayman_X/cpa/tempgrp/TID/Src/IADTrCtl.cpp
Normal file
@@ -0,0 +1,487 @@
|
||||
// IADTrCtl.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
|
||||
#include "IADTrCtl.hpp"
|
||||
|
||||
#include "IADEdtTr.hpp"
|
||||
#include "IADLnkMt.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADVwRst.hpp"
|
||||
#include "IAD_Res.h"
|
||||
#include "x:/cpa/tempgrp/tia/inc/ai_intf.hpp"
|
||||
#include "x:/cpa/main/inc/_EditId.h"
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
#include "iadvrvw.hpp"
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
//External Modules
|
||||
#include "OAc.h"
|
||||
//End of External Modules
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#define IAD_C_PLUS_MINUS_BITMAP_SIZE 9
|
||||
|
||||
#define IAD_C_STATIC_TEXT_COLOR RGB(255,255,255)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeControl
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_TreeControl, CTreeCtrl)
|
||||
//{{AFX_MSG_MAP(IAD_TreeControl)
|
||||
ON_WM_PAINT()
|
||||
ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSelchanged)
|
||||
ON_WM_CTLCOLOR_REFLECT()
|
||||
ON_NOTIFY_REFLECT(TVN_KEYDOWN, OnKeydown)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_TreeControl::IAD_TreeControl()
|
||||
{
|
||||
m_pri_clBrush.CreateSolidBrush(RGB(50,50,50));
|
||||
m_pri_clPen.CreatePen(PS_SOLID, 1, RGB(230,230,230));
|
||||
//m_pri_clPen.CreatePen(PS_DOT, 1, RGB(230,230,230));
|
||||
m_pri_cbBitmapPlus.LoadBitmap(IDB_BITMAP_PLUS);
|
||||
m_pri_cbBitmapMinus.LoadBitmap(IDB_BITMAP_MINUS);
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
m_bViewReflex = TRUE;
|
||||
m_bViewAI = TRUE;
|
||||
|
||||
m_pclSelectedBehaviourNode = NULL;
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
IAD_TreeControl::~IAD_TreeControl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeControl message handlers
|
||||
|
||||
//***************************************************************************
|
||||
BOOL IAD_TreeControl::m_pub_fn_bCreate(CWnd *_pclParentWnd)
|
||||
{
|
||||
BOOL bReturn = CTreeCtrl::Create( WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_DISABLEDRAGDROP,
|
||||
CRect(0,0,0,0),
|
||||
_pclParentWnd,
|
||||
10069);
|
||||
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::m_pub_fn_vSelectAndShowItem(HTREEITEM _hTreeItem)
|
||||
{
|
||||
if ( _hTreeItem != NULL )
|
||||
{
|
||||
//Closes all
|
||||
m_pri_fn_vCollapseAllButNotThis(_hTreeItem);
|
||||
|
||||
//Shows
|
||||
EnsureVisible(_hTreeItem);
|
||||
|
||||
//Selects
|
||||
SelectItem(_hTreeItem);
|
||||
}
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::m_pri_fn_vCollapseAllButNotThis(HTREEITEM _hTreeItemToKeepExpanded)
|
||||
{
|
||||
//Gets first parent of given Item
|
||||
HTREEITEM hFirsParent = GetParentItem(_hTreeItemToKeepExpanded);
|
||||
HTREEITEM hParentOfParent = GetParentItem(hFirsParent);
|
||||
while ( hParentOfParent != NULL )
|
||||
{
|
||||
hFirsParent = hParentOfParent;
|
||||
hParentOfParent = GetParentItem(hFirsParent);
|
||||
}
|
||||
|
||||
HTREEITEM hCurrenItem = GetNextItem(NULL, TVGN_ROOT);
|
||||
|
||||
while ( hCurrenItem != NULL )
|
||||
{
|
||||
if ( hCurrenItem != hFirsParent )
|
||||
Expand(hCurrenItem, TVE_COLLAPSE);
|
||||
|
||||
hCurrenItem = GetNextItem(hCurrenItem, TVGN_NEXT);
|
||||
}
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::OnPaint()
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
dc.SetTextColor(RGB(255,0,0));
|
||||
dc.SetBkMode(TRANSPARENT);
|
||||
dc.SelectObject(GetFont());
|
||||
|
||||
CDC memDC;
|
||||
memDC.CreateCompatibleDC(&dc);
|
||||
|
||||
//Gets current visible Rectangle for the View
|
||||
CRect crVisibleRect;
|
||||
GetClientRect(crVisibleRect);
|
||||
|
||||
//Re-draws visible Items lines
|
||||
HTREEITEM hCurrentTreeItem = GetFirstVisibleItem();
|
||||
CRect crCurrentRect;
|
||||
IAD_EditorTreeNode *pclCurrentNode;
|
||||
BOOL bItemIsSelected;
|
||||
BOOL bItemIsDevelopped;
|
||||
short wX, wY;
|
||||
BOOL bMustGoOn = TRUE;
|
||||
|
||||
while ( (hCurrentTreeItem != NULL) && (bMustGoOn) )
|
||||
{
|
||||
bItemIsSelected = ( (GetItemState(hCurrentTreeItem, TVIF_STATE) & TVIS_SELECTED) != 0 );
|
||||
|
||||
//Gets Data
|
||||
pclCurrentNode = (IAD_EditorTreeNode *)GetItemData(hCurrentTreeItem);
|
||||
|
||||
//Gets rectangle
|
||||
GetItemRect(hCurrentTreeItem, &crCurrentRect, TRUE);
|
||||
|
||||
//If item is really visible
|
||||
if ( (crCurrentRect.top >= crVisibleRect.top) && (crCurrentRect.top <= crVisibleRect.bottom) )
|
||||
{
|
||||
HTREEITEM hParentItem = GetParentItem(hCurrentTreeItem);
|
||||
if ( hParentItem != NULL )
|
||||
{
|
||||
//Displays horizontal lines
|
||||
CRect crParentItemRect;
|
||||
GetItemRect(hParentItem, &crParentItemRect, TRUE);
|
||||
|
||||
dc.SelectObject(&m_pri_clPen);
|
||||
|
||||
wY = crCurrentRect.top + crCurrentRect.Height() / 2;
|
||||
dc.MoveTo(crCurrentRect.left - 1,
|
||||
wY);
|
||||
dc.LineTo(crParentItemRect.left + 3,
|
||||
wY);
|
||||
|
||||
//Displays vertical line
|
||||
wX = crParentItemRect.left + 3;
|
||||
dc.MoveTo(wX,
|
||||
crCurrentRect.top + crCurrentRect.Height() / 2);
|
||||
dc.LineTo(wX,
|
||||
(short)crParentItemRect.bottom - 2);
|
||||
}
|
||||
|
||||
// if ( bMustGoOn )
|
||||
// {
|
||||
//If Item is selected
|
||||
if ( bItemIsSelected )
|
||||
dc.FillSolidRect(&crCurrentRect, RGB(0,0,255));
|
||||
|
||||
//Sets item's text
|
||||
m_pri_fn_vDisplayText(pclCurrentNode, &dc, crCurrentRect);
|
||||
// }
|
||||
}
|
||||
else
|
||||
bMustGoOn = FALSE;
|
||||
|
||||
hCurrentTreeItem = GetNextVisibleItem(hCurrentTreeItem);
|
||||
}
|
||||
|
||||
//Re-draws visible Items
|
||||
hCurrentTreeItem = GetFirstVisibleItem();
|
||||
bMustGoOn = TRUE;
|
||||
|
||||
while ( (hCurrentTreeItem != NULL) && (bMustGoOn) )
|
||||
{
|
||||
bItemIsDevelopped = ( (GetItemState(hCurrentTreeItem, TVIF_STATE) & TVIS_EXPANDED) != 0 );
|
||||
|
||||
//Gets Data
|
||||
pclCurrentNode = (IAD_EditorTreeNode *)GetItemData(hCurrentTreeItem);
|
||||
|
||||
//Gets rectangle
|
||||
GetItemRect(hCurrentTreeItem, &crCurrentRect, TRUE);
|
||||
|
||||
//If item is really visible
|
||||
if ( (crCurrentRect.top >= crVisibleRect.top) && (crCurrentRect.top <= crVisibleRect.bottom) )
|
||||
{
|
||||
//Set's item's button
|
||||
//If Item has at least one child
|
||||
if ( GetChildItem(hCurrentTreeItem) != NULL )
|
||||
{
|
||||
//Draws a bitmap to represent '+' or '-' buttons
|
||||
if ( bItemIsDevelopped )
|
||||
memDC.SelectObject(&m_pri_cbBitmapMinus);
|
||||
else
|
||||
memDC.SelectObject(&m_pri_cbBitmapPlus);
|
||||
|
||||
wX = crCurrentRect.left - GetIndent() + 3 - IAD_C_PLUS_MINUS_BITMAP_SIZE/2;
|
||||
wY = crCurrentRect.top + (crCurrentRect.Height() - IAD_C_PLUS_MINUS_BITMAP_SIZE) / 2;
|
||||
|
||||
dc.BitBlt(wX,
|
||||
wY,
|
||||
IAD_C_PLUS_MINUS_BITMAP_SIZE, //Width
|
||||
IAD_C_PLUS_MINUS_BITMAP_SIZE, //Height
|
||||
&memDC,
|
||||
0,
|
||||
0,
|
||||
SRCCOPY);
|
||||
}
|
||||
}
|
||||
else
|
||||
bMustGoOn = FALSE;
|
||||
|
||||
hCurrentTreeItem = GetNextVisibleItem(hCurrentTreeItem);
|
||||
}
|
||||
|
||||
// Do not call CTreeCtrl::OnPaint() for painting messages
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::m_pri_fn_vDisplayText(IAD_EditorTreeNode *_pclNode,
|
||||
CDC *_pclDC,
|
||||
CRect crRect)
|
||||
{
|
||||
//Name
|
||||
// _pclDC->SetTextColor(RGB(255,0,0));
|
||||
long lCurrentXPos = crRect.left + 1;
|
||||
|
||||
CString csName = _pclNode->m_pub_fn_csGetNodeType();
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
// do not dispaly type if shouldn't be both displayed
|
||||
if (!((csName == "R:" && m_bViewReflex == TRUE && m_bViewAI == FALSE) ||
|
||||
(csName == "I:" && m_bViewAI == TRUE && m_bViewReflex == FALSE)))
|
||||
{
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
_pclDC->SetTextColor( g_a_colrefTypeColor[_pclNode->m_pub_fn_tdeGetNodeType()] );
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, csName);
|
||||
csName += " ";
|
||||
lCurrentXPos += _pclDC->GetTextExtent(csName).cx;
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
if ( !_pclNode->m_pub_fn_csGetNodeName().IsEmpty() )
|
||||
{
|
||||
_pclDC->SetTextColor(RGB(230,255,30));
|
||||
csName = _pclNode->m_pub_fn_csGetNodeName();
|
||||
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, csName);
|
||||
csName += " ";
|
||||
lCurrentXPos += _pclDC->GetTextExtent(csName).cx;
|
||||
}
|
||||
|
||||
if ( !_pclNode->m_pub_fn_csGetNodeValue().IsEmpty() )
|
||||
{
|
||||
_pclDC->SetTextColor(IAD_C_STATIC_TEXT_COLOR);
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, "= ");
|
||||
lCurrentXPos += _pclDC->GetTextExtent("= ").cx;
|
||||
|
||||
|
||||
_pclDC->SetTextColor(RGB(80,250,155));
|
||||
csName = _pclNode->m_pub_fn_csGetNodeValue();
|
||||
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, csName);
|
||||
csName += " ";
|
||||
lCurrentXPos += _pclDC->GetTextExtent(csName).cx;
|
||||
}
|
||||
|
||||
if ( !_pclNode->m_pub_fn_csGetNodeReturnValue().IsEmpty() )
|
||||
{
|
||||
_pclDC->SetTextColor(IAD_C_STATIC_TEXT_COLOR);
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, "[ returns ");
|
||||
lCurrentXPos += _pclDC->GetTextExtent("[ returns ").cx;
|
||||
|
||||
_pclDC->SetTextColor(RGB(0,250,215));
|
||||
csName = _pclNode->m_pub_fn_csGetNodeReturnValue();
|
||||
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, csName);
|
||||
csName += " ";
|
||||
lCurrentXPos += _pclDC->GetTextExtent(csName).cx;
|
||||
|
||||
_pclDC->SetTextColor(IAD_C_STATIC_TEXT_COLOR);
|
||||
_pclDC->TextOut(lCurrentXPos, crRect.top + 1, "]");
|
||||
}
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
if ( !g_pclInterface->m_clDocument.m_pub_bIsDeletingTree )
|
||||
{
|
||||
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
|
||||
|
||||
//Re-draws unselected and newly selected Items
|
||||
CRect crRectToInvalidate;
|
||||
GetItemRect(pNMTreeView->itemOld.hItem, &crRectToInvalidate, TRUE);
|
||||
InvalidateRect(crRectToInvalidate);
|
||||
GetItemRect(pNMTreeView->itemNew.hItem, &crRectToInvalidate, TRUE);
|
||||
InvalidateRect(crRectToInvalidate);
|
||||
|
||||
if ( ( GetItemState(pNMTreeView->itemNew.hItem, TVIF_STATE) & LVIS_SELECTED) != 0 )
|
||||
{
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
//Gets corresponding Editor Node
|
||||
IAD_EditorTreeNode *pclSelectedNode = (IAD_EditorTreeNode *)GetItemData(pNMTreeView->itemNew.hItem);
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
if (pclSelectedNode -> m_pub_fn_tdeGetNodeType () == AIDebug_E_SecTyp_EngineLoop &&
|
||||
! pclSelectedNode -> m_bSubtreeBuilded)
|
||||
{
|
||||
// build subtree
|
||||
// get the brain
|
||||
AI_tdstMind *p_stMind = M_pstGetMindOfBrain (((tdstEngineObject *) pclSelectedNode -> m_pub_fn_pclGetParentActor () -> GetStruct ()) -> h_Brain);
|
||||
// get the trace
|
||||
AIDebug_tdstTrace *p_stTrace = AI_M_p_stGetTrace (p_stMind);
|
||||
|
||||
if (pclSelectedNode -> m_uwSubtreeTraceIndex >=0)
|
||||
{
|
||||
// use the the Engine Trace from the proper place
|
||||
AIDebug_M_uwGetExplIndex (p_stTrace) = pclSelectedNode -> m_uwSubtreeTraceIndex;
|
||||
|
||||
// preparations done, so go for the subtree
|
||||
((IAD_ResultView *) GetParent ()) -> m_fn_vBuildSubtree (pclSelectedNode);//, pNMTreeView->itemNew.hItem);
|
||||
|
||||
pclSelectedNode -> m_bSubtreeBuilded = TRUE;
|
||||
pclSelectedNode -> m_uwSubtreeTraceIndex = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
if ( g_pclInterface->m_clDocument.m_pclResultView->m_bMustSynchronize )
|
||||
{
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
// send info to the IA editor
|
||||
|
||||
if (pclSelectedNode)
|
||||
{
|
||||
IAD_EditorTreeNode *pclBehaviourSelectedNode = pclSelectedNode -> m_fn_pclGetBehaviourParentNode ();
|
||||
|
||||
if (pclBehaviourSelectedNode)
|
||||
{
|
||||
if (!(pclBehaviourSelectedNode == m_pclSelectedBehaviourNode &&
|
||||
pclBehaviourSelectedNode -> m_pub_fn_pclGetParentActor () == m_pclSelectedBehaviourNode -> m_pub_fn_pclGetParentActor ()))
|
||||
{
|
||||
CString csBehaviourName;
|
||||
|
||||
// clear the old executed nodes
|
||||
if (m_pclSelectedBehaviourNode)
|
||||
{
|
||||
csBehaviourName = m_pclSelectedBehaviourNode -> m_pub_fn_csGetNodeName ();
|
||||
m_pclSelectedBehaviourNode -> m_pub_fn_pclGetParentActor() -> m_fn_vClearExecutedNodes (csBehaviourName);
|
||||
}
|
||||
|
||||
// add the new ones
|
||||
pclBehaviourSelectedNode -> m_fn_vAddExecutedNodes ();
|
||||
|
||||
// remind the current selected behaviour
|
||||
m_pclSelectedBehaviourNode = pclBehaviourSelectedNode;
|
||||
}
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
|
||||
// show the proper IA behaviour
|
||||
if (pclSelectedNode -> m_pub_fn_tdeGetNodeType () == AIDebug_E_SecTyp_ReflexOrAI)
|
||||
{
|
||||
// behaviour node
|
||||
pclSelectedNode -> m_pub_fn_pclGetParentActor() -> m_fn_vShowBehaviour (pclSelectedNode -> m_pub_fn_csGetNodeName ());
|
||||
}
|
||||
else
|
||||
{
|
||||
// regular node
|
||||
pclSelectedNode -> m_pub_fn_pclGetParentActor() -> m_fn_vShowBehaviour (pclSelectedNode -> m_pub_fn_p_stGetMotorNode());
|
||||
}
|
||||
#endif // CG PB DEBUGGER }
|
||||
|
||||
}
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
/*
|
||||
//Gets IA DLL
|
||||
CPA_DLLBase *p_clDll = g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName);
|
||||
if ( p_clDll != NULL )
|
||||
{
|
||||
tdstActorsIACom tdstCom;
|
||||
tdstCom.pvThis = (void *)pclSelectedNode->m_pub_fn_pclGetParentActor();
|
||||
tdstCom.pvData = (void *)pclSelectedNode->m_pub_fn_p_stGetMotorNode();
|
||||
|
||||
p_clDll->OnQueryAction(g_pclInterface, C_uiAI_ShowBehaviour, (long)(&tdstCom));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
// Update the variable view
|
||||
IAD_EditorTreeNode *pclEngineLoop = pclSelectedNode -> m_fn_pclGetEngineLoopParentNode ();
|
||||
|
||||
g_pclInterface -> m_clDocument . m_pclVariableView -> m_fn_vUpdateVariables (pclEngineLoop);
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
}
|
||||
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
HBRUSH IAD_TreeControl::CtlColor(CDC* pDC, UINT nCtlColor)
|
||||
{
|
||||
// TODO: Change any attributes of the DC here
|
||||
|
||||
// TODO: Return a non-NULL brush if the parent's handler should not be called
|
||||
return HBRUSH(m_pri_clBrush);
|
||||
//return NULL;
|
||||
}
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::m_fn_vSetViewAI (BOOL bViewAI)
|
||||
{
|
||||
m_bViewAI = bViewAI;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeControl::m_fn_vSetViewReflex (BOOL bViewReflex)
|
||||
{
|
||||
m_bViewReflex = bViewReflex;
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
void IAD_TreeControl::OnKeydown(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
TV_KEYDOWN* pTVKeyDown = (TV_KEYDOWN*)pNMHDR;
|
||||
|
||||
switch (pTVKeyDown -> wVKey)
|
||||
{
|
||||
case VK_F10:
|
||||
((IAD_ResultView *) GetParent ()) -> OnButtonNextLine ();
|
||||
|
||||
// and regain the focus, yet is lost afterwards...
|
||||
//m_pri_pclTreeControl -> SetFocus ();
|
||||
|
||||
*pResult = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
*pResult = 0;
|
||||
}
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
61
Rayman_X/cpa/tempgrp/TID/Src/IADTrVw.cpp
Normal file
61
Rayman_X/cpa/tempgrp/TID/Src/IADTrVw.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
// IADTrVw.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADTrVw.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeView
|
||||
|
||||
IMPLEMENT_DYNCREATE(IAD_TreeView, CTreeView)
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_TreeView, CTreeView)
|
||||
//{{AFX_MSG_MAP(IAD_TreeView)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_TreeView::IAD_TreeView()
|
||||
{
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
IAD_TreeView::~IAD_TreeView()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeView drawing
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_TreeView::OnDraw(CDC* pDC)
|
||||
{
|
||||
CDocument* pDoc = GetDocument();
|
||||
// TODO: add draw code here
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void IAD_TreeView::AssertValid() const
|
||||
{
|
||||
CTreeView::AssertValid();
|
||||
}
|
||||
|
||||
void IAD_TreeView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CTreeView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_TreeView message handlers
|
455
Rayman_X/cpa/tempgrp/TID/Src/IADVwMn.cpp
Normal file
455
Rayman_X/cpa/tempgrp/TID/Src/IADVwMn.cpp
Normal file
@@ -0,0 +1,455 @@
|
||||
// Implementation of the IAD_ControlView class
|
||||
///////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
#define HieFriend
|
||||
#define D_ZdxStuff_StructureDefine
|
||||
|
||||
#include "IADVwMn.hpp"
|
||||
|
||||
#include "IADFmMn.hpp"
|
||||
#include "IADVwRst.hpp"
|
||||
#include "IADDoc.hpp"
|
||||
#include "IADCnst.hpp"
|
||||
#include "IADDgStp.hpp"
|
||||
#include "IADDgQu.hpp"
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADLstCt.hpp"
|
||||
#include "IADMacro.hpp"
|
||||
|
||||
#include "help_def.h" //For Context help
|
||||
|
||||
//External modules
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
#include "TFA.h"
|
||||
#include "OAc.h"
|
||||
//End External modules
|
||||
|
||||
#define IAD_C_NUMBER_OF_COLUMNS_IN_LIST_OF_ACTORS 5
|
||||
|
||||
#define IAD_C_WIDTH_PERCENT_COLUMNS_0 25
|
||||
#define IAD_C_WIDTH_PERCENT_COLUMNS_1 10
|
||||
#define IAD_C_WIDTH_PERCENT_COLUMNS_2 25
|
||||
#define IAD_C_WIDTH_PERCENT_COLUMNS_3 25
|
||||
#define IAD_C_WIDTH_PERCENT_COLUMNS_4 15
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ControlView
|
||||
|
||||
IMPLEMENT_DYNCREATE(IAD_ControlView, CFormView)
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_ControlView, CFormView)
|
||||
//{{AFX_MSG_MAP(IAD_ControlView)
|
||||
ON_WM_HELPINFO()
|
||||
ON_BN_CLICKED(IDC_CHECK_IA_DEBUGGER_ON, OnCheckIaDebuggerOn)
|
||||
ON_WM_SIZE()
|
||||
ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_ACTORS, OnSelchangedListActors)
|
||||
ON_BN_CLICKED(IDC_VIEW_ALL, OnViewAll)
|
||||
//}}AFX_MSG_MAP
|
||||
|
||||
ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify )
|
||||
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ControlView construction/destruction
|
||||
|
||||
//***************************************************************************
|
||||
IAD_ControlView::IAD_ControlView()
|
||||
: CFormView( IAD_ControlView::IDD )
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_ControlView)
|
||||
//}}AFX_DATA_INIT
|
||||
|
||||
// m_pri_pclListControl = NULL;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
IAD_ControlView::~IAD_ControlView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_ControlView::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
|
||||
//{{AFX_DATA_MAP(IAD_ControlView)
|
||||
DDX_Control(pDX, IDC_LIST_ACTORS, m_clListControl);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ControlView message handlers
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_ControlView::OnInitialUpdate()
|
||||
{
|
||||
CFormView::OnInitialUpdate();
|
||||
|
||||
EnableToolTips(TRUE);
|
||||
|
||||
m_pub_fn_pclGetDocument()->m_pclControlView = this;
|
||||
|
||||
//Prepares List Control
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_ACTORS);
|
||||
if ( pclListCtrl != NULL )
|
||||
{
|
||||
pclListCtrl->InsertColumn(0, "Actor");
|
||||
pclListCtrl->InsertColumn(1, "On");
|
||||
pclListCtrl->InsertColumn(2, "Model");
|
||||
pclListCtrl->InsertColumn(3, "Family");
|
||||
pclListCtrl->InsertColumn(4, "Max Size");
|
||||
}
|
||||
|
||||
((CButton *)GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON))->SetCheck(TRUE);
|
||||
OnCheckIaDebuggerOn();
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
m_bViewAll = TRUE;
|
||||
((CButton *)GetDlgItem(IDC_VIEW_ALL))->SetCheck(TRUE);
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
//Gets the (only existing) document
|
||||
IAD_MyDocument* IAD_ControlView::m_pub_fn_pclGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_fn_pclGetDocument();
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
//*******************************************************************************
|
||||
//Displays the list of Actors
|
||||
void IAD_ControlView::m_fn_vDisplayActorsList()
|
||||
{
|
||||
//Fills list control
|
||||
// m_clListControl.SetTextColor(RGB(175, 150, 255));
|
||||
// m_clListControl.SetTextBkColor(RGB(64, 64, 64));
|
||||
|
||||
IAD_td_stInternalActorDescription *p_stCurrentInternalActor;
|
||||
m_clListControl.DeleteAllItems();
|
||||
|
||||
POSITION pos = m_pri_clListOfActors.GetHeadPosition();
|
||||
while ( pos != NULL )
|
||||
{
|
||||
p_stCurrentInternalActor = m_pri_clListOfActors.GetNext(pos);
|
||||
|
||||
if (! m_bViewAll && ! p_stCurrentInternalActor -> bTraceIsEnabled)
|
||||
continue;
|
||||
|
||||
short wIndex = m_clListControl.GetItemCount() ;
|
||||
LV_ITEM lvItem;
|
||||
|
||||
lvItem.mask = LVIF_TEXT | LVIF_STATE;
|
||||
lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
||||
lvItem.state = 0;
|
||||
lvItem.iItem = wIndex;
|
||||
|
||||
lvItem. iSubItem = 0;
|
||||
lvItem. pszText = (char *)LPCTSTR(p_stCurrentInternalActor->pclActor->GetName());
|
||||
m_clListControl.InsertItem(&lvItem);
|
||||
|
||||
lvItem. iSubItem = 1;
|
||||
lvItem. pszText = p_stCurrentInternalActor->bTraceIsEnabled ? "X" : "";
|
||||
m_clListControl.SetItem(&lvItem);
|
||||
|
||||
lvItem. iSubItem = 2;
|
||||
lvItem. pszText = (char *)LPCTSTR(p_stCurrentInternalActor->pclActor->m_fn_pclGetModel()->GetName());
|
||||
m_clListControl.SetItem(&lvItem);
|
||||
|
||||
lvItem. iSubItem = 3;
|
||||
lvItem. pszText = (char *)LPCTSTR(p_stCurrentInternalActor->pclActor->m_pub_fn_pclGetFamily()->GetName());
|
||||
m_clListControl.SetItem(&lvItem);
|
||||
|
||||
lvItem. iSubItem = 4;
|
||||
CString csText;
|
||||
csText.Format("%ld", p_stCurrentInternalActor->lNumberOfEntries);
|
||||
lvItem. pszText = (char *)LPCTSTR(csText);
|
||||
m_clListControl.SetItem(&lvItem);
|
||||
|
||||
m_clListControl.SetItemData(wIndex, (DWORD)p_stCurrentInternalActor);
|
||||
}
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
|
||||
//*******************************************************************************
|
||||
//Constructs the list of Actors
|
||||
void IAD_ControlView::m_pub_fn_vBuildActorsList()
|
||||
{
|
||||
//Gets the global Actors List
|
||||
CPA_BaseObjectList *pclActorsList = g_pclInterface->GetMainWorld()->fn_p_oGetOriginalObjectList(C_szActorInstanceTypeName);
|
||||
|
||||
//Fills internal list
|
||||
Position ActorPos = pclActorsList->GetHeadPosition();
|
||||
while ( ActorPos != 0 )
|
||||
{
|
||||
CPA_Actor *pclCurrentActor = (CPA_Actor *)pclActorsList->GetNext(ActorPos);
|
||||
|
||||
//If actor is not an Always Model
|
||||
if ( !pclCurrentActor->m_fn_bIsAnAlways() )
|
||||
{
|
||||
//If Actor has an IA
|
||||
if ( ((tdstEngineObject *)pclCurrentActor->GetStruct())->h_Brain != NULL )
|
||||
{
|
||||
if ( !m_pri_fn_bActorIsInList(pclCurrentActor) )
|
||||
{
|
||||
IAD_td_stInternalActorDescription *p_stNewInternalActor;
|
||||
p_stNewInternalActor = new IAD_td_stInternalActorDescription;
|
||||
|
||||
p_stNewInternalActor->pclActor = pclCurrentActor;
|
||||
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
p_stNewInternalActor->bTraceIsEnabled = AIDebug_fn_bGetEnable(M_pstGetMindOfBrain( ((tdstEngineObject *)pclCurrentActor->GetStruct())->h_Brain ));
|
||||
p_stNewInternalActor->lNumberOfEntries = AIDebug_fn_uwGetSizeOfTrace(M_pstGetMindOfBrain( ((tdstEngineObject *)pclCurrentActor->GetStruct())->h_Brain ));
|
||||
#else
|
||||
p_stNewInternalActor->bTraceIsEnabled = FALSE;
|
||||
p_stNewInternalActor->lNumberOfEntries = 0;
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
p_stNewInternalActor->pclRoot = NULL;
|
||||
|
||||
m_pri_clListOfActors.AddTail(p_stNewInternalActor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_fn_vDisplayActorsList ();
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
void IAD_ControlView::m_pub_fn_vUnselectAllItems()
|
||||
{
|
||||
//
|
||||
long c_lI;
|
||||
for (c_lI = 0; c_lI < m_clListControl.GetItemCount(); c_lI ++)
|
||||
{
|
||||
UINT nState = m_clListControl.GetItemState(c_lI, LVIF_STATE);
|
||||
if ( (nState & LVIS_SELECTED) != 0 )
|
||||
nState = nState - LVIS_SELECTED;
|
||||
m_clListControl.SetItemState(c_lI, nState, LVIF_STATE);
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL IAD_ControlView::OnHelpInfo(HELPINFO* pHelpInfo)
|
||||
{
|
||||
::WinHelp(m_hWnd,
|
||||
LPCTSTR(m_pub_fn_pclGetDocument()->m_csHelpFileNameAndPath),
|
||||
HELP_CONTEXT,
|
||||
IDH_GENERAL);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
//D<>finition des textes pour les Tool Tips
|
||||
BOOL IAD_ControlView::OnToolTipNotify(UINT id, NMHDR * pNMHDR, LRESULT * pResult )
|
||||
{
|
||||
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
|
||||
UINT nID = pNMHDR->idFrom;
|
||||
nID = ::GetDlgCtrlID((HWND)nID);
|
||||
|
||||
BOOL bReturn = FALSE;
|
||||
|
||||
/* switch ( nID )
|
||||
{
|
||||
default:
|
||||
strcpy(pTTT->szText,"");
|
||||
break;
|
||||
};
|
||||
*/
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
void IAD_ControlView::OnViewAll()
|
||||
{
|
||||
m_bViewAll = ! m_bViewAll;
|
||||
((CButton *) GetDlgItem (IDC_VIEW_ALL))->SetCheck(m_bViewAll);
|
||||
|
||||
m_fn_vDisplayActorsList();
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
|
||||
//*******************************************************************************
|
||||
void IAD_ControlView::OnCheckIaDebuggerOn()
|
||||
{
|
||||
m_pub_fn_pclGetDocument()->m_pub_fn_vSetDebuggerOn( ((CButton *)GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON))->GetCheck() );
|
||||
|
||||
if ( m_pub_fn_pclGetDocument()->m_pub_fn_bIsDebuggerOn() )
|
||||
GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON)->SetWindowText("Debugger On");
|
||||
else
|
||||
GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON)->SetWindowText("Debugger Off");
|
||||
|
||||
//Enables/Disables all Actors
|
||||
if ( m_pub_fn_pclGetDocument()->m_pub_fn_bIsDebuggerOn() )
|
||||
{
|
||||
IAD_td_stInternalActorDescription *p_tdstInternalActor;
|
||||
IAD_M_ForEachInList((&m_pri_clListOfActors), pos)
|
||||
{
|
||||
p_tdstInternalActor = m_pri_clListOfActors.GetNext(pos);
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
AIDebug_fn_vSetEnable(m_pub_fn_pclGetDocument()->m_pub_fn_p_stGetMindOfActor(p_tdstInternalActor), p_tdstInternalActor->bTraceIsEnabled);
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
}
|
||||
}
|
||||
// CG PB DEBUGGER 23/06/98 {
|
||||
#ifdef ACTIVE_AIDEBUG
|
||||
else
|
||||
{
|
||||
IAD_M_ForEachInList((&m_pri_clListOfActors), pos)
|
||||
AIDebug_fn_vSetEnable(m_pub_fn_pclGetDocument()->m_pub_fn_p_stGetMindOfActor(m_pri_clListOfActors.GetNext(pos)), FALSE);
|
||||
}
|
||||
#endif
|
||||
// CG PB DEBUGGER
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
void IAD_ControlView::OnSelchangedListActors(NMHDR* pNMHDR, LRESULT* pResult)
|
||||
{
|
||||
NM_LISTVIEW *pNMListView = (NM_LISTVIEW *)pNMHDR;
|
||||
|
||||
if ( (pNMListView->uNewState & LVIS_SELECTED) != 0 )
|
||||
{
|
||||
switch ( pNMListView->iSubItem )
|
||||
{
|
||||
//Column "Name" has been clicked
|
||||
case 0:
|
||||
{
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_ACTORS);
|
||||
IAD_td_stInternalActorDescription *p_stSelectedInternalActor;
|
||||
p_stSelectedInternalActor = (IAD_td_stInternalActorDescription *)pclListCtrl->GetItemData(pNMListView->iItem);
|
||||
|
||||
if ( p_stSelectedInternalActor->bTraceIsEnabled )
|
||||
m_pub_fn_pclGetDocument()->m_pclResultView->m_pub_fn_vDisplayTraceForActor(p_stSelectedInternalActor);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//Column "On" has been clicked --> DONE ELSEWHERE
|
||||
case 1:
|
||||
break;
|
||||
|
||||
//Column "Size" has been clicked --> DONE ELSEWHERE
|
||||
case 4:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*pResult = 0;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
void IAD_ControlView::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
//Moves Button
|
||||
CButton *pclButton = (CButton *)GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON);
|
||||
CRect crButtonDestRect;
|
||||
|
||||
if ( pclButton != NULL )
|
||||
{
|
||||
CRect crButtonRect;
|
||||
GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON)->GetWindowRect(crButtonRect);
|
||||
|
||||
crButtonDestRect.top = 2;
|
||||
crButtonDestRect.bottom = crButtonDestRect.top + crButtonRect.Height();
|
||||
crButtonDestRect.right = cx - 2;
|
||||
crButtonDestRect.left = crButtonDestRect.right - crButtonRect.Width();
|
||||
|
||||
GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON)->MoveWindow(crButtonDestRect);
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
// Moves View All button
|
||||
pclButton = (CButton *)GetDlgItem(IDC_VIEW_ALL);
|
||||
|
||||
if ( pclButton != NULL )
|
||||
{
|
||||
CRect crButtonRect;
|
||||
GetDlgItem(IDC_VIEW_ALL)->GetWindowRect(crButtonRect);
|
||||
|
||||
crButtonDestRect.top = 2;
|
||||
crButtonDestRect.bottom = crButtonDestRect.top + crButtonRect.Height();
|
||||
crButtonDestRect.right = crButtonDestRect.left - 2;
|
||||
crButtonDestRect.left = crButtonDestRect.right - crButtonRect.Width();
|
||||
|
||||
GetDlgItem(IDC_CHECK_IA_DEBUGGER_ON)->MoveWindow(crButtonDestRect);
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
|
||||
|
||||
//Re-sizes ListCtrl
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_ACTORS);
|
||||
|
||||
if ( pclListCtrl != NULL )
|
||||
{
|
||||
CRect crCtrlRect;
|
||||
pclListCtrl->GetWindowRect(crCtrlRect);
|
||||
|
||||
crCtrlRect.top = crButtonDestRect.bottom + 2;
|
||||
crCtrlRect.bottom = cy - 2;
|
||||
crCtrlRect.left = 2;
|
||||
crCtrlRect.right = cx - 2;
|
||||
|
||||
pclListCtrl->MoveWindow(crCtrlRect);
|
||||
|
||||
//Re_sizes Columns
|
||||
short wColumnWidth = (crCtrlRect.Width() * IAD_C_WIDTH_PERCENT_COLUMNS_0) / 100 - 2;
|
||||
pclListCtrl->SetColumnWidth(0, wColumnWidth);
|
||||
wColumnWidth = (crCtrlRect.Width() * IAD_C_WIDTH_PERCENT_COLUMNS_1) / 100 - 2;
|
||||
pclListCtrl->SetColumnWidth(1, wColumnWidth);
|
||||
wColumnWidth = (crCtrlRect.Width() * IAD_C_WIDTH_PERCENT_COLUMNS_2) / 100 - 2;
|
||||
pclListCtrl->SetColumnWidth(2, wColumnWidth);
|
||||
wColumnWidth = (crCtrlRect.Width() * IAD_C_WIDTH_PERCENT_COLUMNS_3) / 100 - 2;
|
||||
pclListCtrl->SetColumnWidth(3, wColumnWidth);
|
||||
wColumnWidth = (crCtrlRect.Width() * IAD_C_WIDTH_PERCENT_COLUMNS_4) / 100 - 2;
|
||||
pclListCtrl->SetColumnWidth(4, wColumnWidth);
|
||||
}
|
||||
|
||||
CFormView::OnSize(nType, cx, cy);
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
// Private functions //
|
||||
///////////////////////
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL IAD_ControlView::m_pri_fn_bActorIsInList(CPA_Actor *_pclSearchedActor)
|
||||
{
|
||||
BOOL bActorFound = FALSE;
|
||||
POSITION pos = m_pri_clListOfActors.GetHeadPosition();
|
||||
while ( (pos != NULL) && (!bActorFound) )
|
||||
bActorFound = ( m_pri_clListOfActors.GetNext(pos)->pclActor == _pclSearchedActor );
|
||||
|
||||
return bActorFound;
|
||||
}
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
//*******************************************************************************
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ControlView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void IAD_ControlView::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void IAD_ControlView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
1366
Rayman_X/cpa/tempgrp/TID/Src/IADVwRst.cpp
Normal file
1366
Rayman_X/cpa/tempgrp/TID/Src/IADVwRst.cpp
Normal file
File diff suppressed because it is too large
Load Diff
214
Rayman_X/cpa/tempgrp/TID/Src/IADWCBt.cpp
Normal file
214
Rayman_X/cpa/tempgrp/TID/Src/IADWCBt.cpp
Normal file
@@ -0,0 +1,214 @@
|
||||
// IADWCBt.cpp : implementation file
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "IADWCBt.hpp"
|
||||
|
||||
#include "IAD_Res.h"
|
||||
|
||||
#define IAD_C_BUTTON_FIRST_ID 13000
|
||||
#define IAD_C_BUTTON_SPACE_AROUND_TEXT 10
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Color_Button
|
||||
IMPLEMENT_DYNAMIC(IAD_Color_Button, CButton)
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_Color_Button, CButton)
|
||||
//{{AFX_MSG_MAP(IAD_Color_Button)
|
||||
ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)
|
||||
ON_WM_LBUTTONDOWN()
|
||||
ON_WM_LBUTTONUP()
|
||||
ON_WM_MOUSEMOVE()
|
||||
ON_WM_PAINT()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
IAD_Color_Button::IAD_Color_Button(COLORREF *_pclColRef,
|
||||
CString _csText,
|
||||
long _lButtonNumber)
|
||||
{
|
||||
m_pri_pclColRef = _pclColRef;
|
||||
m_pri_csText = _csText;
|
||||
m_pri_lButtonNumber = _lButtonNumber;
|
||||
|
||||
m_pri_bIsDragging = FALSE;
|
||||
|
||||
m_pri_hcDragCursor = AfxGetApp()->LoadCursor(IDC_CURSOR_DRAG_COLOR);
|
||||
m_pri_hcDragInvalidCursor = AfxGetApp()->LoadCursor(IDC_CURSOR_DRAG_INVALID_COLOR);
|
||||
|
||||
//Computes color for Text
|
||||
BYTE ucRed = GetRValue(*m_pri_pclColRef);
|
||||
BYTE ucGreen = GetGValue(*m_pri_pclColRef);
|
||||
BYTE ucBlue = GetBValue(*m_pri_pclColRef);
|
||||
ucRed = (ucRed + 128) % 255;
|
||||
ucGreen = (ucGreen + 128) % 255;
|
||||
ucBlue = (ucBlue + 128) % 255;
|
||||
m_pri_clColRefForText = RGB(ucRed, ucGreen, ucBlue);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
IAD_Color_Button::~IAD_Color_Button()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_Color_Button message handlers
|
||||
|
||||
//***************************************************************************
|
||||
CSize IAD_Color_Button::m_pub_fn_csCreate(CWnd *_pclParentWnd,
|
||||
CRect _crCreationRect)
|
||||
{
|
||||
BOOL bReturn = CButton::Create( "",
|
||||
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON /*| BS_OWNERDRAW*/,
|
||||
_crCreationRect,
|
||||
_pclParentWnd,
|
||||
IAD_C_BUTTON_FIRST_ID + m_pri_lButtonNumber);
|
||||
|
||||
if ( bReturn )
|
||||
{
|
||||
CRect crDestRect = _crCreationRect;
|
||||
CClientDC dc(this);
|
||||
m_pri_pclFont = _pclParentWnd->GetFont();
|
||||
dc.SelectObject(m_pri_pclFont);
|
||||
CSize csTextSize = dc.GetTextExtent(m_pri_csText);
|
||||
crDestRect.right = crDestRect.left + csTextSize.cx + IAD_C_BUTTON_SPACE_AROUND_TEXT;
|
||||
crDestRect.bottom = crDestRect.top + csTextSize.cy + IAD_C_BUTTON_SPACE_AROUND_TEXT;
|
||||
|
||||
MoveWindow(crDestRect);
|
||||
|
||||
return CSize(crDestRect.Width(), crDestRect.Height());
|
||||
}
|
||||
|
||||
return CSize(0,0);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::OnPaint()
|
||||
{
|
||||
CButton::OnPaint();
|
||||
|
||||
CClientDC dc(this); // device context for painting
|
||||
//CPaintDC dc(this); // device context for painting
|
||||
|
||||
CClientDC cdc(this);
|
||||
CRect crClientRect;
|
||||
GetClientRect(crClientRect);
|
||||
crClientRect.InflateRect(-4, -4);
|
||||
cdc.FillSolidRect(crClientRect, *m_pri_pclColRef);
|
||||
|
||||
cdc.SetTextColor(m_pri_clColRefForText);
|
||||
cdc.SetBkMode(TRANSPARENT);
|
||||
cdc.SelectObject(m_pri_pclFont);
|
||||
|
||||
cdc.DrawText(m_pri_csText, crClientRect, DT_CENTER);
|
||||
|
||||
// Do not call CButton::OnPaint() for painting messages
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::OnClicked()
|
||||
{
|
||||
CColorDialog ColorDial(*m_pri_pclColRef, CC_ANYCOLOR | CC_FULLOPEN | CC_RGBINIT /*| CC_SHOWHELP*/, this);
|
||||
|
||||
if ( ColorDial.DoModal() == IDOK )
|
||||
*m_pri_pclColRef = ColorDial.GetColor();
|
||||
|
||||
InvalidateRect(NULL);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::OnLButtonDown(UINT nFlags, CPoint point)
|
||||
{
|
||||
|
||||
m_pri_bIsDragging = TRUE;
|
||||
SetCapture();
|
||||
m_pri_hcPreviousCursor = ::SetCursor(m_pri_hcDragCursor);
|
||||
|
||||
CButton::OnLButtonDown(nFlags, point);
|
||||
InvalidateRect(NULL);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::OnMouseMove(UINT nFlags, CPoint point)
|
||||
{
|
||||
|
||||
if ( m_pri_bIsDragging )
|
||||
{
|
||||
CPoint cpRightPoint = point ;
|
||||
ClientToScreen(&cpRightPoint);
|
||||
CWnd *pclTargettedWindow = WindowFromPoint(cpRightPoint);
|
||||
|
||||
if ( pclTargettedWindow != NULL )
|
||||
{
|
||||
if ( pclTargettedWindow->IsKindOf( RUNTIME_CLASS(IAD_Color_Button)) )
|
||||
::SetCursor(m_pri_hcDragCursor);
|
||||
else
|
||||
::SetCursor(m_pri_hcDragInvalidCursor);
|
||||
}
|
||||
else
|
||||
::SetCursor(m_pri_hcDragInvalidCursor);
|
||||
}
|
||||
|
||||
CButton::OnMouseMove(nFlags, point);
|
||||
if ( m_pri_bIsDragging )
|
||||
InvalidateRect(NULL);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::OnLButtonUp(UINT nFlags, CPoint point)
|
||||
{
|
||||
if ( m_pri_bIsDragging )
|
||||
{
|
||||
//Gets window under cursor
|
||||
CPoint cpRightPoint = point ;
|
||||
ClientToScreen(&cpRightPoint);
|
||||
CWnd *pclTargettedWindow = WindowFromPoint(cpRightPoint);
|
||||
|
||||
if ( pclTargettedWindow != NULL )
|
||||
if ( pclTargettedWindow->IsKindOf( RUNTIME_CLASS(IAD_Color_Button)) )
|
||||
{
|
||||
IAD_Color_Button *pclTargettedButton = (IAD_Color_Button *)pclTargettedWindow;
|
||||
|
||||
pclTargettedButton->m_pub_fn_vSetColor(m_pub_fn_colrefGetColor());
|
||||
pclTargettedButton->InvalidateRect(NULL);
|
||||
}
|
||||
|
||||
::SetCursor(m_pri_hcPreviousCursor);
|
||||
m_pri_hcPreviousCursor = NULL;
|
||||
m_pri_bIsDragging = FALSE;
|
||||
|
||||
ReleaseCapture();
|
||||
}
|
||||
|
||||
CButton::OnLButtonUp(nFlags, point);
|
||||
InvalidateRect(NULL);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::m_pub_fn_vSetColor(COLORREF _Colref)
|
||||
{
|
||||
*m_pri_pclColRef = _Colref;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
COLORREF IAD_Color_Button::m_pub_fn_colrefGetColor()
|
||||
{
|
||||
return *m_pri_pclColRef;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void IAD_Color_Button::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
|
||||
{
|
||||
// TODO: Add your code to draw the specified item
|
||||
|
||||
}
|
||||
|
6
Rayman_X/cpa/tempgrp/TID/Src/StdAfx.cpp
Normal file
6
Rayman_X/cpa/tempgrp/TID/Src/StdAfx.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// EdCarac.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
125
Rayman_X/cpa/tempgrp/TID/Src/_DLLcom.cpp
Normal file
125
Rayman_X/cpa/tempgrp/TID/Src/_DLLcom.cpp
Normal file
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "afxdllx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "IncMEC.h"
|
||||
#define D_State_Define
|
||||
#include "IncGAM.h"
|
||||
#undef D_State_Define
|
||||
#include "GLI.h"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
#include "IADStrg.hpp"
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Global vars
|
||||
static CList<CPA_DLLBase*,CPA_DLLBase*> g_oListOfInstances; //private internal
|
||||
|
||||
static char *gs_p_szCPAVersion = C_szCPAVersion;
|
||||
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
|
||||
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
static IAD_Interface *gs_p_oIADInterface = NULL;
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in all DLL :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//========================================================================
|
||||
// Get current CPA version
|
||||
//========================================================================
|
||||
extern "C" char __declspec(dllexport) *fn_p_szGetCPAVersion(void)
|
||||
{
|
||||
return gs_p_szCPAVersion;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get type of this DLL
|
||||
//========================================================================
|
||||
extern "C" tdstDLLIdentity __declspec(dllexport) *fn_p_stGetDLLIdentity(void)
|
||||
{
|
||||
g_stIADDLLIdentity.eType = TOOL_DLL;
|
||||
g_stIADDLLIdentity.csName = "IA_Debugger";
|
||||
g_stIADDLLIdentity.hModule = NULL;
|
||||
g_stIADDLLIdentity.p_oListOfInstances = &g_oListOfInstances;
|
||||
|
||||
return &g_stIADDLLIdentity;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL int function
|
||||
//========================================================================
|
||||
extern "C" void __declspec(dllexport) fn_vInitDll(void)
|
||||
{
|
||||
new CDynLinkLibrary(extensionDLL);
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL entry point
|
||||
//========================================================================
|
||||
extern "C" int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
if (!AfxInitExtensionModule(extensionDLL, hInstance))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// Get the DLL
|
||||
//========================================================================
|
||||
extern "C" CPA_DLLBase __declspec(dllexport) *fn_p_oGetDLL(long lKey)
|
||||
{
|
||||
#ifdef DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
if (gs_p_oMYTOOLInterface == NULL)
|
||||
{
|
||||
gs_p_oIADInterface = new IAD_Interface();
|
||||
ASSERT(gs_p_oIADInterface != NULL);
|
||||
// YB //
|
||||
g_pclInterface = gs_p_oIADInterface;
|
||||
// End YB //
|
||||
}
|
||||
return gs_p_oIADInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
// YB //
|
||||
g_pclInterface = new IAD_Interface();
|
||||
return g_pclInterface;
|
||||
// End YB //
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //DLL_ONLY_ONE_INSTANCE
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in this type of DLL only :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#undef DLL_ONLY_ONE_INSTANCE
|
380
Rayman_X/cpa/tempgrp/TID/Src/_IADItrf.cpp
Normal file
380
Rayman_X/cpa/tempgrp/TID/Src/_IADItrf.cpp
Normal file
@@ -0,0 +1,380 @@
|
||||
//#################################################################################
|
||||
//
|
||||
// BASE CLASS OF YOUR DLL interface
|
||||
//
|
||||
//#################################################################################
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "IncMEC.h"
|
||||
#define D_State_Define
|
||||
#include "IncGAM.h"
|
||||
#undef D_State_Define
|
||||
#include "GLI.h"
|
||||
#include "SCR.h"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#include "IADVwMn.hpp"
|
||||
#include "IADStrg.hpp"
|
||||
#include "IAD_Res.h"
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
#include "IADvwrst.hpp"
|
||||
#include "IADVrVw.hpp"
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
#include "IADglob.hpp"
|
||||
|
||||
#include "debugcom.h"
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
//External Modules
|
||||
#include "ErO.h"
|
||||
//End of External Modules
|
||||
|
||||
// infos
|
||||
static CString g_csTIDName = "IA_Debugger";
|
||||
static CString g_csTIDAuthor = "Y. Babitch";
|
||||
static CString g_csTIDVersion = "V 2.0.1 18/03/98";
|
||||
static CString g_csTIDFrenchHelpFile = "";
|
||||
static CString g_csTIDEnglishHelpFile = "";
|
||||
|
||||
BOOL g_bTipFirstTime = TRUE;
|
||||
|
||||
IAD_Interface *g_pclInterface;
|
||||
|
||||
#define C_IAD_uiOpenID 51
|
||||
#define C_IAD_uiCloseID 52
|
||||
|
||||
#define C_IAD_PopupID_Exit_Editor 61
|
||||
|
||||
#define C_IAD_PopupID_Setup 71
|
||||
|
||||
// the DLL global definition
|
||||
tdstDLLIdentity g_stIADDLLIdentity;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CONSTRUCTOR.
|
||||
// You must put here all your DLL interface definitions.
|
||||
//--------------------------------------------------------------------------------
|
||||
IAD_Interface::IAD_Interface(void)
|
||||
{
|
||||
// ************************** private internal
|
||||
m_p_stDLLIdentity = &g_stIADDLLIdentity;
|
||||
|
||||
// Does your DLL can output in main game view ?
|
||||
m_stBaseDLLDefinition.bCanOutputIn3DView = FALSE;
|
||||
|
||||
// Does your DLL can be refresh by engine ?
|
||||
m_stBaseDLLDefinition.bCanBeRefreshedByEngine = FALSE;
|
||||
|
||||
// Specific Init.
|
||||
m_pclIADMainFrame = NULL;
|
||||
|
||||
m_csEditorVersion = "1.1.0 [" + CString(__DATE__) + "]";
|
||||
|
||||
SetEditorInfo(g_csTIDName, g_csTIDAuthor, g_csTIDVersion, g_csTIDFrenchHelpFile, g_csTIDEnglishHelpFile);
|
||||
|
||||
//For errors
|
||||
ERROR_g_fn_vAddAModuleDescriptor( g_c_csIADebuggerModuleNameForErrors,
|
||||
m_csEditorVersion,
|
||||
"Yves BABITCH",
|
||||
"01 48 18 53 74 (Montreuil)",
|
||||
"ybabitch@ubisoft.fr",
|
||||
"Daniel PALIX",
|
||||
"04 50 51 26 63 (Annecy)",
|
||||
"dpalix@ubisoft.fr",
|
||||
"David REIZER",
|
||||
"01 48 18 53 74 (Montreuil)",
|
||||
"dreizer@ubisoft.fr"
|
||||
);
|
||||
|
||||
SetCurrent(FALSE);
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vJustAfterRegistered(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vConstruct()
|
||||
{
|
||||
//Windows constructions
|
||||
|
||||
//Creates the main frame
|
||||
if ( m_pclIADMainFrame == NULL )
|
||||
{
|
||||
m_pclIADMainFrame = new IAD_MainFrame;
|
||||
|
||||
m_pclIADMainFrame->CreateBase("",
|
||||
1,
|
||||
2,
|
||||
GetInterface()->GetMainWorld() );
|
||||
|
||||
m_pclIADMainFrame->mfn_vEnableCaption(FALSE);
|
||||
|
||||
m_pclIADMainFrame->m_iInitWidth = 400;
|
||||
m_pclIADMainFrame->m_bKeepPos = TRUE;
|
||||
|
||||
m_pclIADMainFrame->m_stWinRight.cLinkSame = FRM_C_MoveLeft;
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vLevelChanges()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
tdePermission IAD_Interface::fn_eAcceptNewEditor(CPA_EditorBase *pNewEditor)
|
||||
{
|
||||
return C_Allow;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL IAD_Interface::fn_bCanActivateEditor(CPA_List<CPA_BaseObject> *pParams)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vOnActivateEditor(CPA_List<CPA_BaseObject> *pParams,
|
||||
BOOL bBackActivated)
|
||||
{
|
||||
m_fn_vShowEditor();
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL IAD_Interface::fn_bCanCloseEditor(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vOnCloseEditor(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vBeforeEngine(void)
|
||||
{
|
||||
//Re-inits the Trace of Actors
|
||||
m_clDocument.m_pub_fn_vReInitEditorTraceForActors();
|
||||
|
||||
m_fn_vHideEditor();
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vBeforeEditor(void)
|
||||
{
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
{
|
||||
m_fn_vShowEditor();
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
// hack for bug-fixing
|
||||
m_clDocument.m_pclControlView -> m_fn_vDisplayActorsList();
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-08-
|
||||
// do we really need this here?
|
||||
// do it before the engine if you like...
|
||||
// as you do.
|
||||
//m_clDocument.m_pub_fn_vFreeEditorTraceForEditedActor();
|
||||
// END ROMTEAM Cristi Petrescu 98-08-
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::fn_vHasLostFocus(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL IAD_Interface::fn_bHasGainedFocus(void)
|
||||
{
|
||||
m_clDocument.m_pclControlView->m_pub_fn_vBuildActorsList();
|
||||
m_clDocument.m_pub_fn_vFreeEditorTraceForEditedActor();
|
||||
|
||||
// display Tip of the Day
|
||||
GetInterface()->fn_vDisplayTipOfDay("AI Debugger", "TID", g_bTipFirstTime);
|
||||
g_bTipFirstTime = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL IAD_Interface::fn_bDefineSubMenu(EDT_SubMenu *_p_oEDTSubMenu)
|
||||
{
|
||||
if ( _p_oEDTSubMenu->GetSubMenuType() == C_SubMenuTool )
|
||||
{
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
_p_oEDTSubMenu->AddAnEntry(this, "IA Debugger", C_IAD_uiCloseID, TRUE);
|
||||
else
|
||||
_p_oEDTSubMenu->AddAnEntry(this, "IA Debugger", C_IAD_uiOpenID, FALSE);
|
||||
}
|
||||
else if ( _p_oEDTSubMenu->GetSubMenuType() == C_SubMenuPreference )
|
||||
{
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
_p_oEDTSubMenu->AddAnEntry(this, "Internal Setup (IA Debugger)", C_IAD_PopupID_Setup, FALSE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::_OnSubMenuCommand(EDT_SubMenu *_p_oEDTSubMenu,
|
||||
UINT uiMsgID)
|
||||
{
|
||||
switch (uiMsgID)
|
||||
{
|
||||
case C_IAD_uiOpenID:
|
||||
if ( !fn_bIsCurrentEditor() )
|
||||
GetMainWorld()->fn_bActivateEditor(this, NULL);
|
||||
break;
|
||||
|
||||
case C_IAD_uiCloseID:
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
GetMainWorld()->fn_bCloseEditor(this);
|
||||
break;
|
||||
|
||||
case C_IAD_PopupID_Setup:
|
||||
m_clDocument.m_pub_fn_vDisplaySetup();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
//**************************************************************************************
|
||||
// Popup
|
||||
//**************************************************************************************
|
||||
BOOL IAD_Interface::fn_bDefinePopupMenu(EDT_PopUpMenu *pPopup,
|
||||
CPA_List<CPA_SuperObject> *pSelection,
|
||||
BOOL bIsAlone)
|
||||
{
|
||||
BOOL bReturn = FALSE;
|
||||
|
||||
if ( !bIsAlone )
|
||||
{
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
{
|
||||
pPopup->AddAnEntry(this, "Exit IA Debugger", C_IAD_PopupID_Exit_Editor);
|
||||
|
||||
bReturn = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void IAD_Interface::_OnPopUpMenuCommand(UINT m_IDCmdMsg)
|
||||
{
|
||||
switch (m_IDCmdMsg)
|
||||
{
|
||||
case C_IAD_PopupID_Exit_Editor:
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
GetMainWorld()->fn_bCloseEditor(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
//**************************************************************************************
|
||||
//**************************************************************************************
|
||||
// Specific members
|
||||
|
||||
//***********************************************************************
|
||||
void IAD_Interface::m_fn_vShowEditor()
|
||||
{
|
||||
g_oFrameGest.mfn_vSetRefresh(FALSE);
|
||||
|
||||
if ( m_pclIADMainFrame != NULL )
|
||||
g_oFrameGest.mfn_vActivateWindow(m_pclIADMainFrame);
|
||||
|
||||
g_oFrameGest.mfn_vSetRefresh(TRUE);
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
void IAD_Interface::m_fn_vHideEditor()
|
||||
{
|
||||
g_oFrameGest.mfn_vSetRefresh(FALSE);
|
||||
|
||||
if ( m_pclIADMainFrame != NULL )
|
||||
g_oFrameGest.mfn_vDisactivateWindow(m_pclIADMainFrame);
|
||||
|
||||
g_oFrameGest.mfn_vSetRefresh(TRUE);
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
IAD_MyDocument *IAD_Interface::m_fn_pclGetDocument()
|
||||
{
|
||||
ASSERT ( AfxIsValidAddress(&m_clDocument, sizeof(IAD_MyDocument)) );
|
||||
|
||||
return &m_clDocument;
|
||||
}
|
||||
|
||||
//BEGIN ROMTEAM Cristi Petrescu 98-05-
|
||||
//**************************************************************************************
|
||||
//**************************************************************************************
|
||||
//**************************************************************************************
|
||||
// Comunication
|
||||
|
||||
//**************************************************************************************
|
||||
long IAD_Interface::OnQueryAction(CPA_EditorBase *p_oSender,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
long lResult=0;
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
static CString csResult;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
switch(wParam)
|
||||
{
|
||||
case C_uiAI_ViewVariable:
|
||||
{
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
tdstDebugAICom *p_tdstDebugAICom = (tdstDebugAICom *) lParam;
|
||||
|
||||
m_clDocument . m_pclVariableView -> m_fn_vAddVariable (p_tdstDebugAICom -> csName, p_tdstDebugAICom -> csValue);
|
||||
|
||||
lResult = 1;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
break;
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
case C_uiAI_GetVariableValue:
|
||||
{
|
||||
// get the current node
|
||||
IAD_MyDocument *pclDocument = m_fn_pclGetDocument ();
|
||||
ASSERT (pclDocument);
|
||||
IAD_ResultView *pclResultView = pclDocument -> m_pclResultView;
|
||||
ASSERT (pclResultView);
|
||||
IAD_EditorTreeNode *pclCurrentNode = pclResultView -> m_fn_pclGetSelectedEditorNode ();
|
||||
if (pclCurrentNode)
|
||||
{
|
||||
IAD_EditorTreeNode *pclEngineLoopNode = pclCurrentNode -> m_fn_pclGetEngineLoopParentNode ();
|
||||
tdstGetSetParam *p_stVariableValue = pclEngineLoopNode -> m_fn_p_tdstGetVariableValue (lParam);
|
||||
|
||||
if (p_stVariableValue)
|
||||
{
|
||||
csResult = IAD_fn_csComputeValueFromGetSetParam (p_stVariableValue);
|
||||
lResult = (long) & csResult;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
}
|
||||
|
||||
return lResult;
|
||||
}
|
||||
//END ROMTEAM Cristi Petrescu 98-05-
|
68
Rayman_X/cpa/tempgrp/TID/Src/iadlstvr.cpp
Normal file
68
Rayman_X/cpa/tempgrp/TID/Src/iadlstvr.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
// iadlstvr.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "IADLstVr.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ListVariable
|
||||
|
||||
IAD_ListVariable::IAD_ListVariable()
|
||||
{
|
||||
}
|
||||
|
||||
IAD_ListVariable::~IAD_ListVariable()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_ListVariable, CListCtrl)
|
||||
//{{AFX_MSG_MAP(IAD_ListVariable)
|
||||
ON_WM_KEYDOWN()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_ListVariable message handlers
|
||||
|
||||
void IAD_ListVariable::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
|
||||
{
|
||||
if (nChar == VK_DELETE)
|
||||
{
|
||||
// should delete the current line
|
||||
int iItem = m_fn_iGetSelectedItem ();
|
||||
|
||||
if (iItem != -1)
|
||||
DeleteItem (iItem);
|
||||
}
|
||||
|
||||
CListCtrl::OnKeyDown(nChar, nRepCnt, nFlags);
|
||||
}
|
||||
|
||||
int IAD_ListVariable::m_fn_iGetSelectedItem (void)
|
||||
{
|
||||
int iCount = GetItemCount ();
|
||||
int iItem;
|
||||
|
||||
for (iItem = 0; iItem < iCount; iItem ++)
|
||||
{
|
||||
LVITEM lvItem;
|
||||
lvItem . mask = LVIF_STATE;
|
||||
lvItem . stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
||||
lvItem . iItem = iItem;
|
||||
lvItem . iSubItem = 0;
|
||||
if (GetItem (& lvItem))
|
||||
{
|
||||
if (lvItem . state & LVIS_FOCUSED)
|
||||
return iItem;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
199
Rayman_X/cpa/tempgrp/TID/Src/iadvrvw.cpp
Normal file
199
Rayman_X/cpa/tempgrp/TID/Src/iadvrvw.cpp
Normal file
@@ -0,0 +1,199 @@
|
||||
// iadvrvw.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#define HieFriend
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
#include "iadedttr.hpp"
|
||||
#include "IADglob.hpp"
|
||||
|
||||
#include "x:/cpa/tempgrp/tia/inc/ai_intf.hpp"
|
||||
#include "x:/cpa/main/inc/_EditId.h"
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
|
||||
#include "IADVrVw.hpp"
|
||||
|
||||
#include "_IADItrf.hpp"
|
||||
|
||||
#include "help_def.h" //for Context Help
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_VariableView
|
||||
|
||||
IMPLEMENT_DYNCREATE(IAD_VariableView, CFormView)
|
||||
|
||||
IAD_VariableView::IAD_VariableView()
|
||||
: CFormView(IAD_VariableView::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(IAD_VariableView)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
IAD_VariableView::~IAD_VariableView()
|
||||
{
|
||||
}
|
||||
|
||||
void IAD_VariableView::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(IAD_VariableView)
|
||||
DDX_Control(pDX, IDC_LIST_VARIABLES, m_clListVariable);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(IAD_VariableView, CFormView)
|
||||
//{{AFX_MSG_MAP(IAD_VariableView)
|
||||
ON_WM_HELPINFO()
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_VariableView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void IAD_VariableView::AssertValid() const
|
||||
{
|
||||
CFormView::AssertValid();
|
||||
}
|
||||
|
||||
void IAD_VariableView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// IAD_VariableView message handlers
|
||||
|
||||
void IAD_VariableView::OnInitialUpdate ()
|
||||
{
|
||||
CFormView::OnInitialUpdate ();
|
||||
|
||||
g_pclInterface -> m_fn_pclGetDocument () -> m_pclVariableView = this;
|
||||
|
||||
//Prepares List Control
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_VARIABLES);
|
||||
if ( pclListCtrl != NULL )
|
||||
{
|
||||
pclListCtrl->InsertColumn(0, "Name");
|
||||
pclListCtrl->InsertColumn(1, "Value");
|
||||
}
|
||||
}
|
||||
|
||||
BOOL IAD_VariableView::OnHelpInfo(HELPINFO* pHelpInfo)
|
||||
{
|
||||
::WinHelp(m_hWnd,
|
||||
LPCTSTR(g_pclInterface -> m_fn_pclGetDocument () -> m_csHelpFileNameAndPath),
|
||||
HELP_CONTEXT,
|
||||
IDH_GENERAL);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void IAD_VariableView::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CFormView::OnSize(nType, cx, cy);
|
||||
|
||||
//Re-sizes ListCtrl
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_VARIABLES);
|
||||
|
||||
if ( pclListCtrl != NULL )
|
||||
{
|
||||
CRect crCtrlRect;
|
||||
pclListCtrl->GetWindowRect(crCtrlRect);
|
||||
|
||||
crCtrlRect.top = 2;
|
||||
crCtrlRect.bottom = cy - 2;
|
||||
crCtrlRect.left = 2;
|
||||
crCtrlRect.right = cx - 2;
|
||||
|
||||
pclListCtrl->MoveWindow(crCtrlRect);
|
||||
|
||||
//Re_sizes Columns
|
||||
short wColumnWidth = crCtrlRect.Width() / 2 - 2;
|
||||
pclListCtrl->SetColumnWidth(0, wColumnWidth);
|
||||
wColumnWidth = crCtrlRect.Width() / 2 - 2;
|
||||
pclListCtrl->SetColumnWidth(1, wColumnWidth);
|
||||
}
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
void IAD_VariableView::m_fn_vAddVariable (CString csName, CString csValue)
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
{
|
||||
CListCtrl *pclListCtrl = (CListCtrl *)GetDlgItem(IDC_LIST_VARIABLES);
|
||||
|
||||
//csName . MakeLower ();
|
||||
LV_ITEM lvItem;
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
lvItem.mask = LVIF_TEXT | LVIF_STATE;
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
||||
lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
||||
lvItem.state = 0;
|
||||
|
||||
// check if there is already inserted
|
||||
LV_FINDINFO lvFindInfo;
|
||||
int lItem;
|
||||
lvFindInfo . flags = LVFI_STRING;
|
||||
lvFindInfo . psz = (char *) LPCTSTR (csName);
|
||||
lItem = pclListCtrl -> FindItem (& lvFindInfo);
|
||||
if (lItem == -1)
|
||||
{
|
||||
// add it to the list
|
||||
lvItem.iItem = pclListCtrl -> GetItemCount ();
|
||||
lvItem. iSubItem = 0;
|
||||
lvItem. pszText = (char *) LPCTSTR (csName);
|
||||
pclListCtrl -> InsertItem (& lvItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we will update the value
|
||||
lvItem . iItem = lItem;
|
||||
}
|
||||
|
||||
pclListCtrl ->SetItemText (lvItem . iItem, 1, (char *) LPCTSTR (csValue));
|
||||
}
|
||||
|
||||
// BEGIN ROMTEAM Cristi Petrescu 98-06-
|
||||
void IAD_VariableView::m_fn_vUpdateVariables (IAD_EditorTreeNode *pclEngineLoop)
|
||||
{
|
||||
if (! pclEngineLoop)
|
||||
return;
|
||||
|
||||
CListCtrl *pclListCtrl = (CListCtrl *) GetDlgItem (IDC_LIST_VARIABLES);
|
||||
long i;
|
||||
long n = pclListCtrl -> GetItemCount ();
|
||||
CString csVariableName;
|
||||
long lVariableIndex;
|
||||
CString csValue;
|
||||
tdstGetSetParam *p_stValue;
|
||||
for (i = 0; i < n; i ++)
|
||||
{
|
||||
csVariableName = pclListCtrl -> GetItemText (i, 0);
|
||||
|
||||
CPA_DLLBase *p_clDll = g_pclInterface->GetMainWorld()->GetToolDLLWithName(C_szDLLAIEditorName);
|
||||
if ( p_clDll == NULL )
|
||||
continue;
|
||||
lVariableIndex = p_clDll -> OnQueryAction (g_pclInterface, C_uiAI_GetVariableIndex, (long) & csVariableName);
|
||||
if (lVariableIndex < 0)
|
||||
continue;
|
||||
p_stValue = pclEngineLoop -> m_fn_p_tdstGetVariableValue (lVariableIndex);
|
||||
if (! p_stValue)
|
||||
continue;
|
||||
|
||||
csValue = IAD_fn_csComputeValueFromGetSetParam (p_stValue);
|
||||
|
||||
pclListCtrl -> SetItemText (i, 1, (char *) LPCTSTR (csValue));
|
||||
}
|
||||
}
|
||||
// END ROMTEAM Cristi Petrescu 98-06-
|
Reference in New Issue
Block a user