Add rayman2 source files
This commit is contained in:
137
Rayman_X/cpa/tempgrp/TPG/Inc/PGen_Res.h
Normal file
137
Rayman_X/cpa/tempgrp/TPG/Inc/PGen_Res.h
Normal file
@@ -0,0 +1,137 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by TPartGen.rc
|
||||
//
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_PARTGEN_DIALOG_CONTROL 130
|
||||
#define IDC_CURSOR_EYES 148
|
||||
#define IDC_CURSOR_UPDOWN_HAND 150
|
||||
#define IDC_CURSOR_CLOSED_HAND 151
|
||||
#define IDC_CURSOR_DEVELOP 152
|
||||
#define IDD_PARTGEN_DIALOG_SETUP 162
|
||||
#define IDB_BITMAP_QUESTION 168
|
||||
#define IDD_PARTGEN_DIALOG_NEW_CARD 170
|
||||
#define IDI_ICON_BUTTON_CREATE 171
|
||||
#define IDI_ICON_BUTTON_DELETE 172
|
||||
#define IDI_ICON_BUTTON_RENAME 173
|
||||
#define IDD_DIALOG_TPG_VIEW 175
|
||||
#define IDI_ICON1 176
|
||||
#define IDD_DIALOG_NEWGENRATORNAME 177
|
||||
#define IDB_BITMAP_INFO1 178
|
||||
#define IDD_DIALOG_SYSTEM_NEW 178
|
||||
#define IDB_BITMAP_INFO2 179
|
||||
#define IDD_DIALOG_WARNING 179
|
||||
#define IDB_BITMAP_INFO3 180
|
||||
#define IDB_BITMAP_INFO4 181
|
||||
#define IDI_TPG_DLGBAR_ICON 181
|
||||
#define IDB_BITMAP_INFO5 182
|
||||
#define IDD_PARTGEN_DIALOG_MS_VIEW 311
|
||||
#define IDC_RECT_TEXT_FIELD_INST 1062
|
||||
#define IDC_RECT_BG_FIELD_INST 1063
|
||||
#define IDC_CHECK_KEEP_PREVIOUS_EDITION 1083
|
||||
#define IDC_STATIC_QUESTION 1091
|
||||
#define IDD_PARTGEN_DIALOG_QUESTION 1091
|
||||
#define IDD_PARTGEN_DIALOG_INFO 1092
|
||||
#define IDC_STATIC_IMAGE 1097
|
||||
#define IDC_STATIC_TEXT 1100
|
||||
#define IDC_EDIT_BIDON 1102
|
||||
#define IDC_BUTTON_CREATE 1105
|
||||
#define IDC_BUTTON_RENAME 1106
|
||||
#define IDC_EDIT_NAME 1106
|
||||
#define IDC_BUTTON_DELETE 1107
|
||||
#define IDC_BUTTON_DELETEENV 1108
|
||||
#define IDC_STATIC_CARD_NUMBER 1109
|
||||
#define IDC_BUTTON_RENAMEENV 1109
|
||||
#define IDC_LIST_CARD_TYPES 1110
|
||||
#define IDC_BUTTON_DELETESYSTEM 1110
|
||||
#define IDC_TEXT_CARD_NAME 1111
|
||||
#define IDC_BUTTON_RENAMESYSTEM 1111
|
||||
#define IDC_BUTTON_RENAMEPRTSRC 1112
|
||||
#define IDC_BUTTON_NEW 1113
|
||||
#define IDC_BUTTON_NEWPRTSRC 1114
|
||||
#define IDC_BUTTON_DELETEPRTSRC 1115
|
||||
#define IDC_COMBO_SYSTEM 1116
|
||||
#define IDC_COMBO_ENV 1117
|
||||
#define IDC_BUTTON_NEWENV 1119
|
||||
#define IDC_CHECK_LINK 1120
|
||||
#define IDC_BUTTON_NEWSYSTEM 1121
|
||||
#define IDC_EDIT_NEWGENERATORNAME 1123
|
||||
#define IDC_COMBO_GENMODE 1127
|
||||
#define IDC_STATIC_GENERATORNAME 1128
|
||||
#define IDC_STATIC_PRTSRCNAME 1129
|
||||
#define IDC_CHECK_ENVMASKWATER 1130
|
||||
#define IDC_CHECK_ENVMASKAIR 1131
|
||||
#define IDC_COMBO_NBMODE 1132
|
||||
#define IDC_EDIT_NBPARTICLES 1135
|
||||
#define IDC_SPIN_NBPARTICLES 1137
|
||||
#define IDC_COMBO_GEOMODE 1138
|
||||
#define IDC_STATIC_GENPROBA 1143
|
||||
#define IDC_EDIT_GENPROBA 1144
|
||||
#define IDC_EDIT_SRC_NOGENERATION 1146
|
||||
#define IDC_SPIN_SRC_NOGENERATION 1147
|
||||
#define IDC_EDIT_SRC_GENERATION 1148
|
||||
#define IDC_SPIN_SRC_GENERATION 1149
|
||||
#define IDC_STATIC_SRC_NOGENERATION 1153
|
||||
#define IDC_STATIC_SRC_GENERATION 1154
|
||||
#define IDC_STATIC_SRC_NBMIN 1156
|
||||
#define IDC_EDIT_SRC_NBMIN 1157
|
||||
#define IDC_SPIN_SRC_NBMIN 1158
|
||||
#define IDC_STATIC_SRC_NBMAX 1159
|
||||
#define IDC_EDIT_SRC_NBMAX 1160
|
||||
#define IDC_SPIN_SRC_NBMAX 1161
|
||||
#define IDC_EDIT_SRC_PT1X 1162
|
||||
#define IDC_EDIT_SRC_PT2X 1163
|
||||
#define IDC_EDIT_SRC_PT3X 1164
|
||||
#define IDC_EDIT_SRC_PT1Y 1165
|
||||
#define IDC_EDIT_SRC_PT1Z 1166
|
||||
#define IDC_EDIT_SRC_PT2Y 1167
|
||||
#define IDC_COMBO_LINKMODE 1168
|
||||
#define IDC_EDIT_SRC_PT2Z 1169
|
||||
#define IDC_EDIT_SRC_SPEED 1170
|
||||
#define IDC_EDIT_SRC_SPEEDRANGE 1171
|
||||
#define IDC_STATIC_SYSNAME 1172
|
||||
#define IDC_STATIC_ENVNAME 1173
|
||||
#define IDC_EDIT_SRC_PT3Y 1174
|
||||
#define IDC_COMBO_ENV_ENVTYPE 1175
|
||||
#define IDC_EDIT_ENV_MINX 1176
|
||||
#define IDC_EDIT_ENV_MINY 1177
|
||||
#define IDC_EDIT_ENV_MINZ 1178
|
||||
#define IDC_EDIT_ENV_MAXX 1179
|
||||
#define IDC_EDIT_ENV_MAXY 1180
|
||||
#define IDC_EDIT_ENV_MAXZ 1181
|
||||
#define IDC_EDIT_ENV_CENTERX 1182
|
||||
#define IDC_EDIT_ENV_CENTERY 1183
|
||||
#define IDC_EDIT_ENV_CENTERZ 1184
|
||||
#define IDC_EDIT_ENV_RADIUS 1185
|
||||
#define IDC_EDIT_ENV_ACCELERX 1186
|
||||
#define IDC_EDIT_ENV_ACCELERY 1187
|
||||
#define IDC_EDIT_ENV_ACCELERZ 1188
|
||||
#define IDC_EDIT_ENV_RANGE 1189
|
||||
#define IDC_EDIT_SRC_PT3Z 1190
|
||||
#define IDC_STATIC_ENV_MIN 1191
|
||||
#define IDC_STATIC_ENV_MAX 1192
|
||||
#define IDC_STATIC_ENV_CENTER 1193
|
||||
#define IDC_STATIC_ENV_RADIUS 1194
|
||||
#define IDC_STATIC_NBPARTICLES 1197
|
||||
#define IDC_STATIC_SRC_PT2 1198
|
||||
#define IDC_STATIC_SRC_PT3 1199
|
||||
#define IDC_COMBO_SYS_OBJECTS 1200
|
||||
#define IDC_COMBO_SYS_OBJECTSTYPE 1201
|
||||
#define IDC_EDIT_SYSTEMNEWNAME 1202
|
||||
#define IDC_EDIT_SYSDIALOGNBPARTICLES 1203
|
||||
#define IDC_SPIN_SYS 1205
|
||||
#define IDC_STATIC_WARNING 1207
|
||||
#define IDC_STATIC_SYS_NBPARTICLES 1208
|
||||
#define p 1212
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 182
|
||||
#define _APS_NEXT_COMMAND_VALUE 32785
|
||||
#define _APS_NEXT_CONTROL_VALUE 1213
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
5
Rayman_X/cpa/tempgrp/TPG/Inc/PGen_Res.hm
Normal file
5
Rayman_X/cpa/tempgrp/TPG/Inc/PGen_Res.hm
Normal file
@@ -0,0 +1,5 @@
|
||||
// Microsoft Developer Studio generated Help ID include file.
|
||||
// Used by EdMeca.rc
|
||||
//
|
||||
#define HIDC_CHECK_KEEP_PREVIOUS_EDITION \
|
||||
0x80a2043b // IDD_MECA_DIALOG_SETUP
|
18
Rayman_X/cpa/tempgrp/TPG/Inc/StdAfx.h
Normal file
18
Rayman_X/cpa/tempgrp/TPG/Inc/StdAfx.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
#ifndef __STDAAFX_H__
|
||||
#define __STDAAFX_H__
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
#endif //__STDAAFX_H__
|
||||
|
81
Rayman_X/cpa/tempgrp/TPG/Inc/TPGMainF.hpp
Normal file
81
Rayman_X/cpa/tempgrp/TPG/Inc/TPGMainF.hpp
Normal file
@@ -0,0 +1,81 @@
|
||||
// MainFrm.h : interface of the CPA_PartGen_MainFrame class
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _TPG_MAINFRM_H_
|
||||
#define _TPG_MAINFRM_H_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "MEC.h"
|
||||
#define D_State_Define
|
||||
#include "IncGAM.h"
|
||||
#undef D_State_Define
|
||||
#include "GLI.h"
|
||||
|
||||
#define C_ROW_INDEX_CONTROL 0
|
||||
#define C_ROW_INDEX_INFO 1
|
||||
#define C_ROW_INDEX_MINI_STRUC 2
|
||||
//-----------------IR-------------------------
|
||||
#ifdef D_ED_IR_ACTIVE
|
||||
#define C_ROW_INDEX_DES_VAR 3
|
||||
#endif //D_ED_IR_ACTIVE
|
||||
//--------------------------------------------
|
||||
|
||||
class CPA_PartGen_MainFrame : public CSplitFrame
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_MainFrame();
|
||||
|
||||
protected: // create from serialization only
|
||||
// DECLARE_DYNCREATE(CFrameWnd)
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
// CPA_Editor_SplitterWnd m_clSplitter;
|
||||
|
||||
private:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPA_PartGen_MainFrame)
|
||||
// public:
|
||||
// virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
||||
protected:
|
||||
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
//Attributes
|
||||
public:
|
||||
|
||||
protected: // control bar embedded members
|
||||
|
||||
// Generated message map functions
|
||||
protected:
|
||||
//{{AFX_MSG(CPA_PartGen_MainFrame)
|
||||
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
|
||||
//}}AFX_MSG
|
||||
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
virtual ~CPA_PartGen_MainFrame();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif //_TPG_MAINFRM_H_
|
||||
|
138
Rayman_X/cpa/tempgrp/TPG/Inc/TPGMyDoc.hpp
Normal file
138
Rayman_X/cpa/tempgrp/TPG/Inc/TPGMyDoc.hpp
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : TPGMyDoc.hpp
|
||||
Author : David Reizer
|
||||
Description : Document class for Particle Generator editor Tool DLL
|
||||
=======================================================================================
|
||||
Modification -> Author : Vincent Lhullier
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#ifndef _TPGMYDOC_HPP_
|
||||
#define _TPGMYDOC_HPP_
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#include <afxtempl.h>
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "IncITF.h"
|
||||
#include "CTL.h"
|
||||
|
||||
#include "TPG_OGen.hpp"
|
||||
#include "TPG_OEnv.hpp"
|
||||
#include "TPG_OSys.hpp"
|
||||
#include "TPG_OSrc.hpp"
|
||||
#include "TPG_Spri.hpp"
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
class TPG_View;
|
||||
class TPG_Sprite;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
class CPA_PartGen_MyDocument
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_MyDocument();
|
||||
~CPA_PartGen_MyDocument();
|
||||
|
||||
/*
|
||||
* Attributes
|
||||
*/
|
||||
public:
|
||||
|
||||
//Editor's setup variables
|
||||
//------------------------
|
||||
CString m_csIniFileName;
|
||||
//CString m_pub_csDataPath;
|
||||
|
||||
//Editor's Help variables
|
||||
//------------------------
|
||||
CString m_csHelpFileNameAndPath;
|
||||
|
||||
//Editor's preferences
|
||||
//------------------------
|
||||
long m_ulListViewHeight;
|
||||
long m_ulControlViewHeight;
|
||||
long m_ulEditorWidth;
|
||||
|
||||
CPA_DialogList *m_pub_p_clDialogList;
|
||||
CPA_PartGen_Generator *m_pub_p_clCurrentGenerator;
|
||||
CPA_PartGen_System *m_pub_p_clCurrentSystem;
|
||||
CPA_PartGen_Source *m_pub_p_clCurrentSource;
|
||||
CPA_PartGen_Environment *m_pub_p_clCurrentEnv;
|
||||
CList<TPG_Sprite*,TPG_Sprite*> m_pub_clListOfSprites;
|
||||
|
||||
CTL_Editor_ControlList m_pub_clGeneratorControlList;
|
||||
CTL_Editor_ControlList m_pub_clSourceControlList;
|
||||
CTL_Editor_ControlList m_pub_clSystemControlList;
|
||||
CTL_Editor_ControlList m_pub_clEnvControlList;
|
||||
|
||||
private:
|
||||
CTL_Editor_EnumDescriptorList m_pri_clEnumDescriptorList;
|
||||
CTL_Editor_MaskList m_pri_clMaskDescriptorList;
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
public:
|
||||
// Update functions
|
||||
void m_pub_fn_vUpdateGenerator ( CPA_PartGen_Generator* );
|
||||
void m_pub_fn_vUpdateSource ( CPA_PartGen_Source* );
|
||||
void m_pub_fn_vUpdateSystem ( CPA_PartGen_System* );
|
||||
void m_pub_fn_vUpdateEnv ( CPA_PartGen_Environment* );
|
||||
|
||||
void m_pub_fn_vDisplayCurrentGenerator();
|
||||
|
||||
// Delete functions
|
||||
void m_pub_fn_vDeleteGenerator();
|
||||
void m_pub_fn_vDeleteSource();
|
||||
void m_pub_fn_vDeleteSystem();
|
||||
void m_pub_fn_vDeleteEnv();
|
||||
|
||||
/* searched for engine element */
|
||||
void m_pub_fn_vSearchForLoadedGenerators();
|
||||
void m_pub_fn_vSearchForLoadedSources();
|
||||
void m_pub_fn_vSearchForLoadedSystems();
|
||||
void m_pub_fn_vSearchForLoadedEnvironments();
|
||||
void m_pub_fn_vSearchForUnLoadedGeneratorsAndSources();
|
||||
void m_pub_fn_vSearchForUnLoadedSystems();
|
||||
void m_pub_fn_vSearchForUnLoadedEnvironments();
|
||||
|
||||
void m_pub_fn_vFillListOfSprites();
|
||||
|
||||
TPG_View* m_pub_fn_p_clGetView();
|
||||
|
||||
void m_pub_fn_vFillControlLists();
|
||||
|
||||
void m_pub_fn_vBuildAllEnumDescriptors();
|
||||
void m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
|
||||
CTL_Editor_EnumDescriptor * m_pub_fn_p_clGetEnumDescriptorByName( CString );
|
||||
CTL_Editor_MaskDescriptor * m_pub_fn_p_clGetMaskDescriptorByName( CString );
|
||||
|
||||
private:
|
||||
void m_pri_fn_vUpdateSource( CPA_PartGen_Source* );
|
||||
void m_pri_fn_vUpdateSystem( CPA_PartGen_System* );
|
||||
void m_pri_fn_vUpdateEnv( CPA_PartGen_Environment* );
|
||||
|
||||
void m_pri_fn_vFillGeneratorControlList();
|
||||
void m_pri_fn_vFillSourceControlList();
|
||||
void m_pri_fn_vFillSystemControlList();
|
||||
void m_pri_fn_vFillEnvControlList();
|
||||
void m_pri_fn_vCreateControl( CTL_Editor_ControlList* );
|
||||
|
||||
void m_pri_fn_vFillEnumDescriptorWithList( CTL_Editor_EnumDescriptor *, CList<TPG_Sprite*,TPG_Sprite*>* );
|
||||
|
||||
void m_pri_fn_vFillEnumDescriptorWithBaseObjectList( CTL_Editor_EnumDescriptor*, CPA_BaseObjectList* );
|
||||
void m_pri_fn_vFillEnumDescriptorWithLinkTable( CTL_Editor_EnumDescriptor*, SCR_tdst_Link_Table* );
|
||||
|
||||
void m_pri_fn_vBuildConstantEnumDescriptors();
|
||||
void m_pri_fn_vBuildChangingEnumDescriptors();
|
||||
void m_pri_fn_vBuildConstantMasks();
|
||||
};
|
||||
|
||||
|
||||
#endif //_TPGMYDOC_HPP_
|
110
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_ClBk.hpp
Normal file
110
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_ClBk.hpp
Normal file
@@ -0,0 +1,110 @@
|
||||
#ifndef _TPG_CLBK_HPP_
|
||||
#define _TPG_CLBK_HPP_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "CTL.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Can Be Displayed CallBacks
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//*** Source Generation Mode *********************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceProbability( CTL_Editor_Control* );
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbFrames( CTL_Editor_Control* );
|
||||
|
||||
//*** Source Nb Particles To Generate Mode *******
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbParticles( CTL_Editor_Control* );
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbParticlesMinMax( CTL_Editor_Control* );
|
||||
|
||||
//*** Source Geometry Mode ************************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceGeometryQuad( CTL_Editor_Control* );
|
||||
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceConstantLifeTime( CTL_Editor_Control *_p_clControl );
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceProbabilistLifeTime( CTL_Editor_Control *_p_clControl );
|
||||
|
||||
//*** System GameMaterials *************************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSystemGameMaterials( CTL_Editor_Control * );
|
||||
//*** System Sprites *******************************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSystemSprites( CTL_Editor_Control * );
|
||||
|
||||
//*** Environement Min Max Points *****
|
||||
BOOL g_fn_bCallBackCanBeDisplayedEnvBox( CTL_Editor_Control * );
|
||||
|
||||
//*** Environement Sphere center *********
|
||||
BOOL g_fn_bCallBackCanBeDisplayedEnvSphere( CTL_Editor_Control * );
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Data Changed Special CallBacks
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
//*** Source display generator when combo has changed
|
||||
void g_fn_vCallBackDataChangedSpecialDisplayGenerator( CTL_Editor_Data*, CTL_eUpdateReason , long );
|
||||
|
||||
void g_fn_vCallBackDataChangedSpecialDisplayAll( CTL_Editor_Data*, CTL_eUpdateReason , long );
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// Data Changed CallBacks
|
||||
///////////////////////////////////////
|
||||
|
||||
//*** Generator notify save when data has changed
|
||||
void g_fn_vCallBackDataChangedGenerator( CTL_Editor_Data*, CTL_eUpdateReason , long );
|
||||
|
||||
void fn_vCBPrtSrcDataChanged( CTL_Editor_Data* , CTL_eUpdateReason, long );
|
||||
|
||||
//*** System notify save when data has changed
|
||||
void g_fn_vCallBackDataChangedSystem( CTL_Editor_Data*, CTL_eUpdateReason , long );
|
||||
|
||||
//*** Environment notify save when data has changed
|
||||
void g_fn_vCallBackDataChangedEnv( CTL_Editor_Data*, CTL_eUpdateReason , long );
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Read-Write Modification Functions
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
//*** Generator source change
|
||||
void g_fn_vModificationWriteGeneratorSource( CTL_Editor_Data* );
|
||||
|
||||
//*** Generator save system engine from system editor
|
||||
void g_fn_vModificationWriteGeneratorSystem( CTL_Editor_Data* );
|
||||
|
||||
//*** Generator save environment engine from environment editor
|
||||
void g_fn_vModificationWriteGeneratorEnvironment( CTL_Editor_Data* );
|
||||
|
||||
//*** Generator linked generator change
|
||||
void g_fn_vModificationWriteGeneratorLinkedGenerator( CTL_Editor_Data* );
|
||||
|
||||
|
||||
//*** Source modification nb frames generation to nb frames total
|
||||
void g_fn_vModificationReadSourceNbFramesGeneration( CTL_Editor_Data* );
|
||||
void g_fn_vModificationWriteSourceNbFramesGeneration( CTL_Editor_Data* );
|
||||
|
||||
//*** System create ppoint or segment with gamematerial
|
||||
void g_fn_vModificationReadSystemGameMaterials( CTL_Editor_Data* );
|
||||
void g_fn_vModificationWriteSystemObjects( CTL_Editor_Data* );
|
||||
|
||||
//*** Environment save min max point in env or generator linked
|
||||
void g_fn_vModificationWriteEnvBox( CTL_Editor_Data * );
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// Must be Read-Written CallBacks
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
//*** System is GameMaterial data taken into account *
|
||||
BOOL g_fn_bCallBackMustBeReadWrittenSystemGameMaterial( CTL_Editor_Data* );
|
||||
|
||||
//*** System is Sprite data taken into account *
|
||||
BOOL g_fn_bCallBackMustBeReadWrittenSystemSprite( CTL_Editor_Data* );
|
||||
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
int g_fnCanISelectThisItemCallBack (CTL_Editor_Data * p_clData, CTL_Editor_EnumElement *pNewElement);
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
|
||||
|
||||
#endif
|
91
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OEnv.hpp
Normal file
91
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OEnv.hpp
Normal file
@@ -0,0 +1,91 @@
|
||||
#ifndef _TPG_OENV_HPP_
|
||||
#define _TPG_OENV_HPP_
|
||||
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "PRT.h"
|
||||
#include "CTL.h"
|
||||
|
||||
class CPA_PartGen_MyDocument;
|
||||
class CPA_PartGen_Generator;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Environement Class
|
||||
|
||||
class CPA_PartGen_Environment : public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_Environment(CString, PRT_tdstParticlesEnvironment *_p_stEnv = NULL, BOOL _bIsLoaded = TRUE );
|
||||
~CPA_PartGen_Environment();
|
||||
|
||||
//virtual functions
|
||||
virtual long GetDataType(void);
|
||||
virtual void *GetData(void);
|
||||
virtual CString fn_csComputeReferencedSectionName(const CString _csNewName);
|
||||
|
||||
static void m_s_fn_vCallBackSaveEnv( SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction );
|
||||
|
||||
BOOL m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
PRT_tdstParticlesEnvironment * m_pub_fn_p_stGetEnv() {return m_pri_p_stEnv;}
|
||||
void m_pub_fn_vSetEnv( PRT_tdstParticlesEnvironment* );
|
||||
|
||||
void m_pub_fn_vSetEnvType( short );
|
||||
short m_pub_fn_wGetEnvType();
|
||||
|
||||
void m_pub_fn_vSetBoxMin( double, double, double );
|
||||
double m_pub_fn_dGetBoxMinX();
|
||||
double m_pub_fn_dGetBoxMinY();
|
||||
double m_pub_fn_dGetBoxMinZ();
|
||||
void m_pub_fn_vSetBoxMax( double, double, double );
|
||||
double m_pub_fn_dGetBoxMaxX();
|
||||
double m_pub_fn_dGetBoxMaxY();
|
||||
double m_pub_fn_dGetBoxMaxZ();
|
||||
void m_pub_fn_vSetSphereCenter( double, double, double );
|
||||
double m_pub_fn_dGetSphereCenterX();
|
||||
double m_pub_fn_dGetSphereCenterY();
|
||||
double m_pub_fn_dGetSphereCenterZ();
|
||||
//void m_pub_fn_vSetSphereRadius( double );
|
||||
double m_pub_fn_dGetSphereRadius();
|
||||
|
||||
void m_pub_fn_vSetAcceleration( double, double, double );
|
||||
double m_pub_fn_dGetAccelerX();
|
||||
double m_pub_fn_dGetAccelerY();
|
||||
double m_pub_fn_dGetAccelerZ();
|
||||
void m_pub_fn_vSetRange( double );
|
||||
double m_pub_fn_dGetRange();
|
||||
|
||||
void m_pub_fn_vSetGenerator( CPA_PartGen_Generator* );
|
||||
|
||||
CPA_PartGen_MyDocument * m_pub_fn_p_clGetDocument();
|
||||
|
||||
public:
|
||||
CTL_Editor_DataList m_pub_clDataList;
|
||||
|
||||
private:
|
||||
PRT_tdstParticlesEnvironment *m_pri_p_stEnv;
|
||||
MTH3D_tdstVector m_pri_stMinPoint;
|
||||
MTH3D_tdstVector m_pri_stMaxPoint;
|
||||
MTH3D_tdstVector m_pri_stSphereCenter;
|
||||
|
||||
CPA_PartGen_Generator *m_pri_p_clGenerator;
|
||||
|
||||
private:
|
||||
void m_pri_fn_vSetInternalPoints();
|
||||
|
||||
void m_pri_fn_vSaveEnv( SCR_tdst_File_Description* );
|
||||
void m_pri_fn_vFillDataList();
|
||||
|
||||
friend void g_fn_vModificationWriteEnvBox( CTL_Editor_Data* );
|
||||
friend void g_fn_vModificationWriteEnvSphere( CTL_Editor_Data* );
|
||||
};
|
||||
|
||||
#endif //_TPG_OENV_HPP_
|
109
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OGen.hpp
Normal file
109
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OGen.hpp
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : TPG_OGen.hpp
|
||||
Author : David Reizer
|
||||
Description : implementation of class for ParticleGenerator editor object
|
||||
=======================================================================================
|
||||
Modification -> Author : Vincent Lhullier
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#ifndef _TPG_OGEN_HPP_
|
||||
#define _TPG_OGEN_HPP_
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "PRT.h"
|
||||
#include "CTL.h"
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
class CPA_PartGen_MyDocument;
|
||||
class CPA_PartGen_Source;
|
||||
class CPA_PartGen_System;
|
||||
class CPA_PartGen_Environment;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// Particles Generator CLass
|
||||
|
||||
/*
|
||||
=======================================================================================
|
||||
Editor Particles Generator CLass
|
||||
=======================================================================================
|
||||
*/
|
||||
class CPA_PartGen_Generator : public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_Generator(CString, tdxHandleToParticleGenerator _hGenerator = NULL, BOOL _bIsLoaded = TRUE);
|
||||
~CPA_PartGen_Generator();
|
||||
|
||||
//virtual functions
|
||||
virtual long GetDataType(void);
|
||||
virtual void *GetData(void);
|
||||
virtual CString fn_csComputeReferencedSectionName(const CString _csNewName);
|
||||
virtual void fn_vNotifySave(void);
|
||||
virtual void fn_vNotifyUnSave(void);
|
||||
|
||||
|
||||
static void m_s_fn_vCallBackSaveGenerator
|
||||
(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction
|
||||
);
|
||||
|
||||
BOOL m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
// link to private Generator Motor Object
|
||||
tdxHandleToParticleGenerator m_pub_fn_hGetGenerator() {return m_pri_hGenerator;}
|
||||
void m_pub_fn_vSetGenerator( tdxHandleToParticleGenerator _hGenerator);
|
||||
|
||||
// links to Source, System and Environment Editor Objects
|
||||
CPA_PartGen_Source *m_pub_fn_p_clGetSource();
|
||||
CPA_PartGen_System *m_pub_fn_p_clGetSystem();
|
||||
CPA_PartGen_Environment *m_pub_fn_p_clGetEnv();
|
||||
CPA_PartGen_Generator *m_pub_fn_p_oGetLinkedPrtGen();
|
||||
|
||||
// source, system and environment controls
|
||||
void m_pub_fn_vSetSource( CPA_PartGen_Source* );
|
||||
void m_pub_fn_vSetSystem( CPA_PartGen_System* );
|
||||
void m_pub_fn_vSetEnv ( CPA_PartGen_Environment* );
|
||||
|
||||
// Link to environment
|
||||
void m_pub_fn_vSetLinkToEnv( BOOL );
|
||||
BOOL m_pub_fn_bGetLinkToEnv();
|
||||
|
||||
// Environment Mask
|
||||
void m_pub_fn_vSetEnvActiveWater( BOOL );
|
||||
void m_pub_fn_vSetEnvActiveAir( BOOL );
|
||||
long m_pub_fn_lGetEnvironmentMask();
|
||||
|
||||
void m_pub_fn_vUpdateGeneratorEnumDescriptors();
|
||||
void m_pub_fn_vSetGenInEnv();
|
||||
|
||||
CPA_PartGen_MyDocument * m_pub_fn_p_clGetDocument();
|
||||
|
||||
private:
|
||||
void m_pri_fn_vSaveGenerator( SCR_tdst_File_Description* );
|
||||
|
||||
void m_pri_fn_vFillDataList();
|
||||
void m_pri_fn_vFillGeneratorDataList();
|
||||
|
||||
public:
|
||||
CTL_Editor_DataList m_pub_clGeneratorDataList;
|
||||
|
||||
private:
|
||||
tdxHandleToParticleGenerator m_pri_hGenerator;
|
||||
|
||||
friend class CPA_PartGen_Environment;
|
||||
friend void g_fn_vModificationWriteEnvBox( CTL_Editor_Data* );
|
||||
friend void g_fn_vModificationWriteEnvSphere( CTL_Editor_Data* );
|
||||
};
|
||||
|
||||
|
||||
#endif //_TPG_OGEN_HPP_
|
132
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OSrc.hpp
Normal file
132
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OSrc.hpp
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : TPG_OSrc.hpp
|
||||
|
||||
Author : vincent lhullier Date :20/03/98
|
||||
|
||||
Description : definition of ParticleSource editor object
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#ifndef _TPG_OSRC_HPP_
|
||||
#define _TPG_OSRC_HPP_
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "PRT.h"
|
||||
#include "CTL.h"
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
class CPA_PartGen_MyDocument;
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
/*
|
||||
=======================================================================================
|
||||
Constants
|
||||
=======================================================================================
|
||||
*/
|
||||
#define TPG_C_tdxDefaultParticlesNumber 100
|
||||
|
||||
/*
|
||||
=======================================================================================
|
||||
CPA_PartGen_Source class
|
||||
=======================================================================================
|
||||
*/
|
||||
class CPA_PartGen_Source : public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_Source( CString );
|
||||
CPA_PartGen_Source( CString, PRT_tdstParticlesSource *_p_stPrtSrc = NULL, BOOL _bIsLoaded = TRUE );
|
||||
~CPA_PartGen_Source();
|
||||
|
||||
//virtual functions
|
||||
virtual long GetDataType(void);
|
||||
virtual void *GetData(void);
|
||||
virtual CString fn_csComputeReferencedSectionName(const CString _csNewName);
|
||||
|
||||
static void m_s_fn_vCallBackSaveSource( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData, SCR_tde_Ntfy_Action _eAction );
|
||||
|
||||
BOOL m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
PRT_tdstParticlesSource * m_pub_fn_p_stGetSource() {return m_pri_p_stPrtSrc;}
|
||||
void m_pub_fn_vSetSource( PRT_tdstParticlesSource* _p_stPrtSrc );
|
||||
|
||||
|
||||
//CString m_pub_fn_csGetObjectName();
|
||||
|
||||
|
||||
void m_pub_fn_vSetGenerationMode( short _wIndex );
|
||||
long m_pub_fn_lGetGenerationMode();
|
||||
double m_pub_fn_dGetGenerationProba();
|
||||
long m_pub_fn_lGetNbNoGeneration();
|
||||
long m_pub_fn_lGetNbGeneration();
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Nb Particles to Generate Mode and parameters
|
||||
void m_pub_fn_vSetNbGenerateMode( short _wIndex );
|
||||
long m_pub_fn_lGetNbGenerateMode();
|
||||
long m_pub_fn_lGetNbToGenerate();
|
||||
long m_pub_fn_lGetNbMax();
|
||||
long m_pub_fn_lGetNbMin();
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Geometry Mode and parameters
|
||||
void m_pub_fn_vSetGeometryMode( short _wIndex );
|
||||
long m_pub_fn_lGetGeometryMode();
|
||||
double m_pub_fn_dGetSrcPt1X();
|
||||
double m_pub_fn_dGetSrcPt1Y();
|
||||
double m_pub_fn_dGetSrcPt1Z();
|
||||
double m_pub_fn_dGetSrcPt2X();
|
||||
double m_pub_fn_dGetSrcPt2Y();
|
||||
double m_pub_fn_dGetSrcPt2Z();
|
||||
double m_pub_fn_dGetSrcPt3X();
|
||||
double m_pub_fn_dGetSrcPt3Y();
|
||||
double m_pub_fn_dGetSrcPt3Z();
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Link Mode
|
||||
void m_pub_fn_vSetLinkMode( short _wIndex );
|
||||
long m_pub_fn_lGetLinkMode();
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Speed and speed Range
|
||||
void m_pub_fn_vSetSpeed( double _dSpeed );
|
||||
double m_pub_fn_dGetSpeed();
|
||||
void m_pub_fn_vSetSpeedRange( double _dSpeedRange );
|
||||
double m_pub_fn_dGetSpeedRange();
|
||||
|
||||
|
||||
CPA_PartGen_MyDocument *m_pub_fn_p_clGetDocument();
|
||||
|
||||
CTL_Editor_DataList m_pub_clDataList;
|
||||
|
||||
/*
|
||||
* private data members
|
||||
*/
|
||||
private:
|
||||
PRT_tdstParticlesSource *m_pri_p_stPrtSrc;
|
||||
|
||||
//GMT_tdxHandleToGameMaterial m_pri_hGameMaterial;
|
||||
//ACP_tdxHandleOfSprite m_pri_hSprite;
|
||||
|
||||
/*
|
||||
* private methods
|
||||
*/
|
||||
private:
|
||||
void m_pri_fn_vFillDataList();
|
||||
void m_pri_fn_vSaveSource( SCR_tdst_File_Description* );
|
||||
//void m_pri_fn_vSetInternalParticle();
|
||||
};
|
||||
|
||||
#endif //_TPG_OSRC_HPP_
|
78
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OSys.hpp
Normal file
78
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_OSys.hpp
Normal file
@@ -0,0 +1,78 @@
|
||||
#ifndef _TPG_OSYS_HPP_
|
||||
#define _TPG_OSYS_HPP_
|
||||
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "PRT.h"
|
||||
#include "CTL.h"
|
||||
|
||||
|
||||
class CPA_PartGen_MyDocument;
|
||||
////////////////////////////////////////////////
|
||||
// System Class
|
||||
|
||||
#define TPG_C_tdxDefaultParticlesNumber 100
|
||||
|
||||
class CPA_PartGen_System : public CPA_SaveObject
|
||||
{
|
||||
public:
|
||||
CPA_PartGen_System(CString, long _lNbParticles );
|
||||
CPA_PartGen_System(CString, PRT_tdstParticlesSystem *_p_stSystem = NULL, BOOL _bIsLoaded = TRUE );
|
||||
~CPA_PartGen_System();
|
||||
|
||||
//virtual functions
|
||||
virtual long GetDataType(void);
|
||||
virtual void *GetData(void);
|
||||
virtual CString fn_csComputeReferencedSectionName(const CString _csNewName);
|
||||
|
||||
static void m_s_fn_vCallBackSaveSystem
|
||||
(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction
|
||||
);
|
||||
|
||||
BOOL m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
PRT_tdstParticlesSystem * m_pub_fn_p_stGetSystem() {return m_pri_p_stSystem;}
|
||||
void m_pub_fn_vSetSystem( PRT_tdstParticlesSystem* );
|
||||
|
||||
GMT_tdxHandleToGameMaterial m_pub_fn_hGetPriGameMaterial() {return m_pri_hGameMaterial;}
|
||||
ACP_tdxHandleOfSprite m_pub_fn_hGetPriSprite() {return m_pri_hSprite;}
|
||||
|
||||
long m_pub_fn_lGetParticlesType();
|
||||
void m_pub_fn_vSetObjectPoint( GMT_tdxHandleToGameMaterial );
|
||||
GMT_tdxHandleToGameMaterial m_pub_fn_hGetPointGameMaterial();
|
||||
void m_pub_fn_vSetObjectSegment( GMT_tdxHandleToGameMaterial );
|
||||
GMT_tdxHandleToGameMaterial m_pub_fn_hGetSegmentGameMaterial();
|
||||
void m_pub_fn_vSetObjectSprite( ACP_tdxHandleOfSprite );
|
||||
ACP_tdxHandleOfSprite m_pub_fn_hGetSprite();
|
||||
|
||||
CString m_pub_fn_csGetObjectName();
|
||||
|
||||
long m_pub_fn_lGetNbParticles();
|
||||
|
||||
CPA_PartGen_MyDocument * m_pub_fn_p_clGetDocument();
|
||||
|
||||
public:
|
||||
CTL_Editor_DataList m_pub_clDataList;
|
||||
|
||||
private:
|
||||
PRT_tdstParticlesSystem *m_pri_p_stSystem;
|
||||
|
||||
GMT_tdxHandleToGameMaterial m_pri_hGameMaterial;
|
||||
ACP_tdxHandleOfSprite m_pri_hSprite;
|
||||
|
||||
private:
|
||||
void m_pri_fn_vFillDataList();
|
||||
void m_pri_fn_vSaveSystem( SCR_tdst_File_Description* );
|
||||
void m_pri_fn_vSetInternalParticle();
|
||||
};
|
||||
|
||||
#endif //_TPG_OSYS_HPP_
|
35
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_Spri.hpp
Normal file
35
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_Spri.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
///////////////////////////////////////////////////
|
||||
//
|
||||
// Object to get Sprites
|
||||
//
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
#ifndef _TPG_SPRI_HPP_
|
||||
#define _TPG_SPRI_HPP_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "ACP_Base.h"
|
||||
|
||||
class TPG_Sprite
|
||||
{
|
||||
public:
|
||||
TPG_Sprite( CString, ACP_tdxHandleOfSprite _hSprite = NULL );
|
||||
~TPG_Sprite();
|
||||
|
||||
CString m_pub_fn_csGetName() { return m_pri_csName; }
|
||||
BOOL m_pub_fn_bIsNotLoaded() { return (m_pri_hSprite == NULL); }
|
||||
ACP_tdxHandleOfSprite m_pub_fn_hGetSprite();
|
||||
|
||||
void m_pub_fn_vLoadSprite();
|
||||
|
||||
private:
|
||||
CString m_pri_csName;
|
||||
ACP_tdxHandleOfSprite m_pri_hSprite;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //_TPG_SPRI_HPP_
|
100
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_Strg.hpp
Normal file
100
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_Strg.hpp
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : TPG_Strg.hpp
|
||||
Author : David Reizer
|
||||
Description : String constants
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#ifndef _TPG_STRINGS_
|
||||
#define _TPG_STRINGS_
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#include "x:\cpa\Main\inc\_EditId.h"
|
||||
#include "PRT.h"
|
||||
#include "incGAM.h"
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
/*
|
||||
* effect main directory
|
||||
*/
|
||||
#define C_szEffectPath "gamedata\\World\\Effects"
|
||||
|
||||
/*
|
||||
* effects script files
|
||||
*/
|
||||
#define C_szGeneratorAndSourceFileName "Generators.prt"
|
||||
#define C_szSystemFileName "Systems.prt"
|
||||
#define C_szEnvironmentFileName "Environments.prt"
|
||||
#define C_szSpritesFileName "Sprites.prt"
|
||||
|
||||
//Used for Errors
|
||||
const CString g_c_csPartGenModuleNameForErrors = "Particles Generator Editor";
|
||||
|
||||
//DLL Name
|
||||
const CString g_c_csDLLPartGenName = C_szDLLPartGenName;
|
||||
|
||||
//Objects Names
|
||||
const CString g_C_csPartGenGeneratorName = C_szPartGenGeneratorName;
|
||||
const CString g_C_csPartGenSourceName = C_szPartGenSourceName;
|
||||
const CString g_C_csPartGenSystemName = C_szPartGenSystemName;
|
||||
const CString g_C_csPartGenEnvName = C_szPartGenEnvName;
|
||||
|
||||
const CString g_C_csGeneratorNoSystem = "No System";
|
||||
const CString g_C_csGeneratorNoEnv = "No Environment";
|
||||
|
||||
//Generation Mode Names
|
||||
#define C_uwNbOfGenerationMode 4
|
||||
const CString g_C_a_csSourceGenerationModeName[C_uwNbOfGenerationMode] =
|
||||
{"No Generation", "Continous", "Probabilist", "Crenel"};
|
||||
const CString g_C_a_csScrGenerationModeName[C_uwNbOfGenerationMode] =
|
||||
{C_szNoGeneration, C_szContinuousGeneration, C_szProbabilistGeneration, C_szCrenelGeneration};
|
||||
|
||||
//Nb particles to generate mode
|
||||
#define C_uwNbOfNbGenerateMode 2
|
||||
const CString g_C_a_csSourceNbGenerateModeName[C_uwNbOfNbGenerateMode] =
|
||||
{"Constant", "Probabilist"};
|
||||
const CString g_C_a_csScrNbGenerateModeName[C_uwNbOfNbGenerateMode] =
|
||||
{C_szConstantNb, C_szProbabilistNb};
|
||||
|
||||
//Geometry mode
|
||||
#define C_uwNbOfGeometryMode 2
|
||||
const CString g_C_a_csSourceGeometryModeName[C_uwNbOfGeometryMode] =
|
||||
{C_szPoint, C_szQuad};
|
||||
|
||||
//Link mode
|
||||
#define C_uwNbOfLinkMode 3
|
||||
const CString g_C_a_csSourceLinkModeName[C_uwNbOfLinkMode] =
|
||||
{"Rotation", "Translation", "Rotation et Translation"};
|
||||
const CString g_C_a_csScrLinkModeName[C_uwNbOfLinkMode] =
|
||||
{C_szRotationLink, C_szTranslationLink, C_szRotationAndTranslationLink};
|
||||
|
||||
|
||||
//Environment Type
|
||||
#define C_uwNbOfEnvType 2
|
||||
const CString g_C_a_csEnvironmentTypeName[C_uwNbOfEnvType] =
|
||||
{"Box", "Sphere"};
|
||||
|
||||
// System Objects Type
|
||||
#define C_uwNbOfObjType 7
|
||||
const CString g_C_a_csSystemObjTypeName[C_uwNbOfObjType] =
|
||||
{"Null", "Bubble", "Point", "Segment", "Sprite", "Triangle", "Rectangle"};
|
||||
|
||||
#define M_MAKECHAR(a) ((char *)LPCSTR(a))
|
||||
|
||||
|
||||
#define TPG_READONLY TRUE
|
||||
#define TPG_READWRITE FALSE
|
||||
|
||||
#define TPG_SIGNED TRUE
|
||||
#define TPG_UNSIGNED FALSE
|
||||
|
||||
#define TPG_CANCHANGE TRUE
|
||||
#define TPG_NOCHANGE FALSE
|
||||
|
||||
#endif //_TPG_STRINGS_
|
||||
|
196
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_View.hpp
Normal file
196
Rayman_X/cpa/tempgrp/TPG/Inc/TPG_View.hpp
Normal file
@@ -0,0 +1,196 @@
|
||||
#if !defined(AFX_TPG_VIEW_HPP__E5484AF5_492D_11D1_9A42_006097BAFA4F__INCLUDED_)
|
||||
#define AFX_TPG_VIEW_HPP__E5484AF5_492D_11D1_9A42_006097BAFA4F__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// TPG_View.hpp : header file
|
||||
//
|
||||
#include "PGen_Res.h"
|
||||
|
||||
#include "SCR.h"
|
||||
#include "CTL.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TPG_View form view
|
||||
|
||||
#ifndef __AFXEXT_H__
|
||||
#include <afxext.h>
|
||||
#endif
|
||||
|
||||
#include <afxtempl.h>
|
||||
|
||||
class CPA_PartGen_MyDocument;
|
||||
class CPA_PartGen_Generator;
|
||||
class CPA_PartGen_System;
|
||||
class CPA_PartGen_Source;
|
||||
class CPA_PartGen_Environment;
|
||||
class TPG_Sprite;
|
||||
|
||||
|
||||
class TPG_View : public CTL_Editor_BaseFormView
|
||||
{
|
||||
protected:
|
||||
TPG_View(); // protected constructor used by dynamic creation
|
||||
DECLARE_DYNCREATE(TPG_View)
|
||||
|
||||
// Form Data
|
||||
public:
|
||||
//{{AFX_DATA(TPG_View)
|
||||
enum { IDD = IDD_DIALOG_TPG_VIEW };
|
||||
//}}AFX_DATA
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
|
||||
// Operations
|
||||
public:
|
||||
CPA_PartGen_MyDocument * m_pub_fn_p_clGetDocument(void);
|
||||
|
||||
void m_pub_fn_vDisplayGeneratorInZone( CPA_PartGen_Generator*, CPoint*, CPoint* );
|
||||
void m_pub_fn_vDisplaySourceInZone( CPA_PartGen_Source*, CPoint *, CPoint * );
|
||||
void m_pub_fn_vDisplaySystemInZone( CPA_PartGen_System*, CPoint*, CPoint* );
|
||||
void m_pub_fn_vDisplayEnvInZone( CPA_PartGen_Environment*, CPoint*, CPoint* );
|
||||
|
||||
private:
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(TPG_View)
|
||||
public:
|
||||
virtual void OnInitialUpdate();
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
virtual ~TPG_View();
|
||||
#ifdef _DEBUG
|
||||
virtual void AssertValid() const;
|
||||
virtual void Dump(CDumpContext& dc) const;
|
||||
#endif
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(TPG_View)
|
||||
afx_msg void OnButtonDelete();
|
||||
afx_msg void OnButtonNew();
|
||||
afx_msg void OnButtonDeleteenv();
|
||||
afx_msg void OnButtonDeletesystem();
|
||||
afx_msg void OnButtonNewenv();
|
||||
afx_msg void OnButtonNewsystem();
|
||||
afx_msg void OnButtonRenameenv();
|
||||
afx_msg void OnButtonRenamesystem();
|
||||
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_GeneratorNewName dialog
|
||||
|
||||
class CPA_Dialog_GeneratorNewName : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CPA_Dialog_GeneratorNewName(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CPA_Dialog_GeneratorNewName)
|
||||
enum { IDD = IDD_DIALOG_NEWGENRATORNAME };
|
||||
CString m_csNewGeneratorName;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPA_Dialog_GeneratorNewName)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CPA_Dialog_GeneratorNewName)
|
||||
afx_msg void OnDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_SystemNewName dialog
|
||||
|
||||
class CPA_Dialog_SystemNewName : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CPA_Dialog_SystemNewName(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CPA_Dialog_SystemNewName)
|
||||
enum { IDD = IDD_DIALOG_SYSTEM_NEW };
|
||||
CString m_csNewSystemName;
|
||||
long m_lNbParticles;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPA_Dialog_SystemNewName)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CPA_Dialog_SystemNewName)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnDestroy();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_Warning dialog
|
||||
|
||||
class CPA_Dialog_Warning : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CPA_Dialog_Warning(CWnd* pParent = NULL, CString _csText = ""); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CPA_Dialog_Warning)
|
||||
enum { IDD = IDD_DIALOG_WARNING };
|
||||
CString m_csWarningText;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPA_Dialog_Warning)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CPA_Dialog_Warning)
|
||||
afx_msg void OnDestroy();
|
||||
virtual BOOL OnInitDialog();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_TPG_VIEW_HPP__E5484AF5_492D_11D1_9A42_006097BAFA4F__INCLUDED_)
|
246
Rayman_X/cpa/tempgrp/TPG/Inc/TPartGen.rc
Normal file
246
Rayman_X/cpa/tempgrp/TPG/Inc/TPartGen.rc
Normal file
@@ -0,0 +1,246 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "PGen_Res.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// French (France) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"PGen_Res.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 12, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""TPartGen.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
|
||||
"#endif\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "Application ""Editeur de Generateur de Particules""\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "PartGen\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> 1996\0"
|
||||
VALUE "OriginalFilename", "TPGDFEvd.dll\0"
|
||||
VALUE "ProductName", "Editeur de Generateur de Particules\0"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG_TPG_VIEW DIALOG DISCARDABLE 0, 0, 284, 474
|
||||
STYLE DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CTEXT "<No Generator>",IDC_STATIC_GENERATORNAME,10,10,195,10,
|
||||
SS_CENTERIMAGE | SS_SUNKEN | NOT WS_VISIBLE
|
||||
PUSHBUTTON "New",IDC_BUTTON_NEW,10,20,32,10,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Copy",IDC_BUTTON_RENAME,42,20,32,10,NOT WS_VISIBLE |
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "Delete",IDC_BUTTON_DELETE,74,20,32,10,NOT WS_VISIBLE |
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "New",IDC_BUTTON_NEWENV,10,393,32,10,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Delete",IDC_BUTTON_DELETEENV,75,393,32,10,NOT
|
||||
WS_VISIBLE | WS_DISABLED
|
||||
PUSHBUTTON "Copy",IDC_BUTTON_RENAMEENV,42,393,33,10,NOT WS_VISIBLE |
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "New",IDC_BUTTON_NEWSYSTEM,10,332,32,10,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Delete",IDC_BUTTON_DELETESYSTEM,75,332,32,10,NOT
|
||||
WS_VISIBLE | WS_DISABLED
|
||||
PUSHBUTTON "Copy",IDC_BUTTON_RENAMESYSTEM,42,332,33,10,NOT
|
||||
WS_VISIBLE | WS_DISABLED
|
||||
CTEXT "<No System>",IDC_STATIC_SYSNAME,10,323,195,10,
|
||||
SS_CENTERIMAGE | SS_SUNKEN | NOT WS_VISIBLE
|
||||
CTEXT "<No Environment>",IDC_STATIC_ENVNAME,10,384,195,10,
|
||||
SS_CENTERIMAGE | SS_SUNKEN | NOT WS_VISIBLE
|
||||
CTEXT "<No Source>",IDC_STATIC_PRTSRCNAME,14,99,195,10,
|
||||
SS_CENTERIMAGE | SS_SUNKEN | NOT WS_VISIBLE
|
||||
PUSHBUTTON "New",IDC_BUTTON_NEWPRTSRC,14,110,32,10,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Copy",IDC_BUTTON_RENAMEPRTSRC,46,110,32,10,NOT
|
||||
WS_VISIBLE | WS_DISABLED
|
||||
PUSHBUTTON "Delete",IDC_BUTTON_DELETEPRTSRC,78,110,32,10,NOT
|
||||
WS_VISIBLE | WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_DIALOG_NEWGENRATORNAME DIALOG DISCARDABLE 0, 0, 219, 46
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "New Name"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_NEWGENERATORNAME,7,14,140,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,162,7,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,162,24,50,14
|
||||
END
|
||||
|
||||
IDD_DIALOG_SYSTEM_NEW DIALOG DISCARDABLE 0, 0, 214, 55
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "New System"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_SYSTEMNEWNAME,7,14,140,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_SYSDIALOGNBPARTICLES,60,35,30,15,ES_AUTOHSCROLL
|
||||
CONTROL "Spin1",IDC_SPIN_SYS,"msctls_updown32",UDS_SETBUDDYINT |
|
||||
UDS_AUTOBUDDY | UDS_ARROWKEYS,90,35,11,15
|
||||
DEFPUSHBUTTON "OK",IDOK,157,7,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,157,24,50,14
|
||||
CTEXT "Nb Particles",IDC_STATIC,5,35,50,15,SS_CENTERIMAGE
|
||||
END
|
||||
|
||||
IDD_DIALOG_WARNING DIALOG DISCARDABLE 0, 0, 261, 77
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Paticles Generator Warning"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "YES",IDOK,70,56,50,14
|
||||
PUSHBUTTON "NO",IDCANCEL,135,56,50,14
|
||||
CTEXT "",IDC_STATIC_WARNING,14,7,230,45,SS_SUNKEN
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DIALOG_NEWGENRATORNAME, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 212
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 39
|
||||
END
|
||||
|
||||
IDD_DIALOG_SYSTEM_NEW, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 207
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_DIALOG_WARNING, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 254
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 70
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_TPG_DLGBAR_ICON ICON DISCARDABLE "tpg_dlgb.ico"
|
||||
#endif // French (France) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 12, 1
|
||||
#pragma code_page(1252)
|
||||
#endif
|
||||
#include "TPartGen.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "l.fra\afxres.rc" // Standard components
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
13
Rayman_X/cpa/tempgrp/TPG/Inc/TpartGen.rc2
Normal file
13
Rayman_X/cpa/tempgrp/TPG/Inc/TpartGen.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// EDCARAC.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
308
Rayman_X/cpa/tempgrp/TPG/Inc/_Minterf.hpp
Normal file
308
Rayman_X/cpa/tempgrp/TPG/Inc/_Minterf.hpp
Normal file
@@ -0,0 +1,308 @@
|
||||
//**************************************
|
||||
// This is the base class of your DLL interface
|
||||
// All methods of CPA_ToolDLLBase are
|
||||
// present in that class.
|
||||
//**************************************
|
||||
#ifndef __PARTGEN_INTERF_HPP__
|
||||
#define __PARTGEN_INTERF_HPP__
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
//#include "DNM.h"
|
||||
/*
|
||||
#define D_State_Define
|
||||
#include "IncGAM.h"
|
||||
#undef D_State_Define
|
||||
#include "GLI.h"
|
||||
*/
|
||||
|
||||
// Specific Includes //
|
||||
#include "TPGMyDoc.hpp"
|
||||
#include "TPG_View.hpp"
|
||||
#include "TPGMainF.hpp"
|
||||
|
||||
|
||||
// if you want only one instance of your DLL
|
||||
// activate the next line
|
||||
//#define DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Tool DLL interface class
|
||||
//----------------------------------------------------------
|
||||
class CPA_PartGen_Interface : public CPA_ToolDLLBase
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
CPA_PartGen_Interface(void);
|
||||
// ~CPA_PartGen_Interface(void);
|
||||
|
||||
/*===========================================================================
|
||||
Virtual Functions
|
||||
=========================================================================*/
|
||||
public:
|
||||
|
||||
// To pre translate all messages
|
||||
// virtual BOOL fn_bPreTranslateMessage(MSG * /*p_stMsg*/) { return FALSE; };
|
||||
// Called just after editor has been inserted in list of all editors
|
||||
virtual void fn_vJustAfterRegistered(void);
|
||||
// Called just before windows main loop processing
|
||||
virtual void fn_vConstruct(void);
|
||||
// Called to refresh datas of DLL if "fn_vCanBeRefresh" returns TRUE
|
||||
// virtual void fn_vRefreshDatas(void);
|
||||
// Called when level has changed
|
||||
virtual void fn_vLevelHasChanged (void);
|
||||
// virtual void fn_vLevelChanges(void);
|
||||
|
||||
virtual BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
|
||||
|
||||
// virtual void fn_vAfterSaveAll(void); *** DR ***
|
||||
virtual BOOL fn_bAcceptToSave();
|
||||
|
||||
/*===========================================================================
|
||||
Current Editor
|
||||
=========================================================================*/
|
||||
|
||||
virtual tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewEditor);
|
||||
|
||||
virtual BOOL fn_bCanActivateEditor(CPA_List<CPA_BaseObject> *pParams);
|
||||
virtual void fn_vOnActivateEditor(CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated=FALSE);
|
||||
|
||||
virtual BOOL fn_bCanCloseEditor(void);
|
||||
virtual void fn_vOnCloseEditor(void);
|
||||
|
||||
public:
|
||||
/*===========================================================================
|
||||
Messages from Evt_Editor
|
||||
=========================================================================*/
|
||||
|
||||
// for changes
|
||||
// virtual void fn_vOnChangeDevice (void) { }
|
||||
|
||||
// Editor Modifs
|
||||
// virtual void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// virtual void fn_vOnModifParent (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus) { }
|
||||
// virtual void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus) { }
|
||||
// virtual void fn_vOnModifName(CPA_SuperObject *pEdObj, CString csInitalName, CString csFinalName, tdeTypeModif eType, tdeStatus eStatus);
|
||||
// virtual void fn_vOnSelect(CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
|
||||
|
||||
// virtual void fn_vOnModifInsert(CPA_SuperObject *pEdObj, CPA_SuperObject *pParent,
|
||||
// tdstPosition *p_stPosition, tdeTypeModif eType, tdeStatus eStatus) { }
|
||||
|
||||
// Moves
|
||||
// virtual void fn_vOnModifMove(CPA_List<EDT_SavePos> *pListObjects, CPA_List<EDT_SaveGlobalPos> *pListConcerned, tdeTypeModif eType, tdeStatus eStatus) { }
|
||||
// virtual void fn_vOnBeginMove(CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }
|
||||
// virtual void fn_vOnMoving(CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }
|
||||
|
||||
// Models
|
||||
// virtual void fn_vOnAddModelToList(CPA_ObjectDLLBase *pOwnerDLL, CString csListName, CString csModelName, tdeTypeModif eType) { }
|
||||
|
||||
// permission
|
||||
// virtual BOOL fn_bAcceptModifDelete(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
// virtual BOOL fn_bAcceptModifParent(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
|
||||
// virtual BOOL fn_bAcceptModifCopy(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
|
||||
// virtual BOOL fn_bAcceptModifTranslate(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
|
||||
// virtual BOOL fn_bAcceptModifRotate(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
|
||||
// virtual BOOL fn_bAcceptModifInsert(CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeStatus eStatus) { return TRUE; }
|
||||
// virtual BOOL fn_bAcceptModifScale(CPA_SuperObject *pEdObj, tdeStatus eStatus) { return TRUE; }
|
||||
// virtual BOOL fn_bAcceptModifName(CPA_SuperObject *pEdObj, tdeStatus eStatus);
|
||||
// virtual BOOL fn_bAcceptMultiSelect(void) { return TRUE; }
|
||||
|
||||
// to precise selection
|
||||
// virtual tdeTypeAnswer fn_bAcceptSelect(CPA_SuperObject *pEdObj, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking, tdeStatus eStatus);
|
||||
|
||||
/*===========================================================================
|
||||
Dialog List
|
||||
=========================================================================*/
|
||||
|
||||
// virtual BOOL fn_bSetCustomTest (CPA_DialogList *pDialog) { return FALSE; }
|
||||
// virtual BOOL fn_bCustomTestFunction (CString csCurrentType, CString csTestName, CPA_SaveObject *pEdObj) { return TRUE; }
|
||||
|
||||
/*===========================================================================
|
||||
General Purpose
|
||||
=========================================================================*/
|
||||
|
||||
// long OnQueryAction (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
|
||||
// virtual long OnQueryInfos (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
|
||||
// virtual long OnQueryOpen (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
|
||||
// virtual long OnQueryClose (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
|
||||
|
||||
/*===========================================================================
|
||||
Coherence
|
||||
=========================================================================*/
|
||||
|
||||
// virtual BOOL fn_bOnInvalidateLink (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject, BOOL bDestroyed) { return FALSE; }
|
||||
// virtual void fn_vOnRestoreLink (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject) { }
|
||||
|
||||
/*===========================================================================
|
||||
Messages
|
||||
=========================================================================*/
|
||||
// focus
|
||||
virtual void fn_vHasLostFocus (void);
|
||||
virtual BOOL fn_bHasGainedFocus (void);
|
||||
// engine - editor
|
||||
virtual void fn_vBeforeEngine (void);
|
||||
virtual void fn_vBeforeEditor (void);
|
||||
// engine
|
||||
// virtual BOOL fn_bAcceptToRunEngine(void) { return TRUE; };
|
||||
// virtual BOOL fn_bAcceptToRunTimerEngine (void) { return TRUE; };
|
||||
// end appli
|
||||
// virtual void fn_vJustBeforeClosing (void) { };
|
||||
// virtual BOOL fn_bAcceptToExit (void) { return TRUE; };
|
||||
// keys
|
||||
// virtual BOOL _OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) { return FALSE; };
|
||||
// virtual BOOL _OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) { return FALSE; };
|
||||
// mouse
|
||||
// virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect) { return FALSE; };
|
||||
// virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
|
||||
// virtual BOOL _OnRButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
|
||||
// virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
|
||||
// virtual BOOL _OnRButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
|
||||
// virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos *p_stPos) { return FALSE; };
|
||||
// virtual BOOL _OnRButtonUp (UINT nFlags, tdstMousePos *p_stPos) { return FALSE; };
|
||||
// command
|
||||
// virtual BOOL _OnCommand (UINT IDCmdMsg) { return FALSE; };
|
||||
// virtual BOOL _OnUpdateCommandUI (UINT uiID, CCmdUI *pCmdUI) { return FALSE; };
|
||||
// dragdrop
|
||||
// virtual BOOL _OnDragDropEnd (WPARAM wParam, LPARAM lParam) { return FALSE; };
|
||||
// virtual BOOL _OnDragDropMove (WPARAM wParam, LPARAM lParam) { return FALSE; };
|
||||
// virtual BOOL _OnDragDropLooseFocus (WPARAM wParam, LPARAM lParam) { return FALSE; };
|
||||
// virtual BOOL _OnDragDropGainFocus (WPARAM wParam, LPARAM lParam) { return FALSE; };
|
||||
// add objects to draw
|
||||
// virtual void fn_vAddObjectsToDraw (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2) { };
|
||||
// virtual void fn_vAddObjectsToDraw2 (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2) { };
|
||||
|
||||
/*===========================================================================
|
||||
Reinit
|
||||
=========================================================================*/
|
||||
|
||||
// virtual void fn_vOnChangeRoot (void) { };
|
||||
// virtual void fn_vOnChangeWorld (void) { };
|
||||
|
||||
/*===========================================================================
|
||||
for Dialog List
|
||||
=========================================================================*/
|
||||
|
||||
virtual CPA_BaseObject *GetDialogSelection(CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
|
||||
virtual void GetListsForDialog (CPA_DialogList *pDialog);
|
||||
|
||||
// virtual BOOL fn_bOnSelChangeHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pSelectedObject) { return FALSE; };
|
||||
// virtual BOOL fn_bOnDblClkHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pSelectedObject) { return FALSE; };
|
||||
virtual BOOL fn_bOnSelChangeListObjects(CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
|
||||
// virtual BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csTypeName, CPA_SaveObject *pSelectedObject) { return FALSE; };
|
||||
// virtual BOOL fn_bCanDragItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrag) { return FALSE; };
|
||||
// virtual BOOL fn_bCanDropItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrop, CPA_SuperObject *pTarget) { return FALSE; };
|
||||
// virtual BOOL fn_bOnDragDropInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObject, CPA_SuperObject *pTarget) { return FALSE; };
|
||||
// virtual BOOL fn_bOnSelChangeComboList(CPA_DialogList *pDialog, CString csTypeName);
|
||||
// virtual BOOL fn_bOnButtonTest(CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw);
|
||||
|
||||
virtual void fn_vInitDefaultParameters(CPA_DialogList *pDialog);
|
||||
|
||||
// virtual void fn_vSetANewTest(CPA_DialogList *pDialog, CString csCurrentList);
|
||||
// virtual BOOL fn_bTestFunction(CString csCurrentType, CString csTestName, CPA_BaseObject *pEdObj);
|
||||
|
||||
/*===========================================================================
|
||||
Dialog Bar - Mircea Dunka 31 Aug. 1998
|
||||
=========================================================================*/
|
||||
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
|
||||
|
||||
/*===========================================================================
|
||||
SubMenus and PopupMenu
|
||||
=========================================================================*/
|
||||
|
||||
virtual BOOL fn_bDefineSubMenu(EDT_SubMenu *_p_oEDTSubMenu);
|
||||
virtual void _OnSubMenuCommand(EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
|
||||
|
||||
// virtual BOOL fn_bDefinePopupMenu(EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
|
||||
// virtual void _OnPopUpMenuCommand(UINT m_IDCmdMsg);
|
||||
|
||||
// Hierarchy
|
||||
// virtual CPA_SuperObject *GetNewEditorInstance(HIE_tdxHandleToSuperObject pEngineInstance);
|
||||
// virtual void fn_vUpdateEditorInstance(CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
|
||||
// virtual BOOL fn_bCanHandleThisType(long lEngineType);
|
||||
|
||||
// Models & Instances
|
||||
// virtual void fn_vInitListByType(CPA_World *pWorld);
|
||||
// virtual void fn_vInitListsOfModels(void);
|
||||
// virtual void fn_vSaveListModels(CString csListName, CPA_List<EDT_Model> *pListModels);
|
||||
// virtual CString fn_csLoadListModels(void);
|
||||
// virtual EDT_Model *GetNewModel(CString csListName);
|
||||
// virtual BOOL fn_bCanLoadNewModel(CString csListName);
|
||||
// virtual BOOL fn_bCanDeleteModel(CString csListName) { return FALSE; };
|
||||
// virtual BOOL fn_bCanSaveListModels(CString csListName);
|
||||
// virtual BOOL fn_bCanLoadListModels(void);
|
||||
// virtual void fn_vOnLoadNewModel(CString csListName, EDT_Model *pNewModel);
|
||||
|
||||
// virtual CPA_SuperObject *GetNewInstance(CString csTypeName, CString csModelName, CPA_SuperObject *pParent);
|
||||
// virtual tdeTypeSO GetTypeInstance(CString csTypeName, CString csModelName);
|
||||
// virtual CPA_SuperObject * GetParentForInsertion (CString csTypeName, CString csModelName, tdstPosition *p_stPosition) { return NULL; }
|
||||
// virtual BOOL fn_bChooseInsertPosition(CPA_SuperObject *pNewInstance, CPA_SuperObject *pParent, tdstPosition *p_stPosition);
|
||||
|
||||
// objects
|
||||
// virtual CPA_Object * GetNewObject (CString csObjectFile, CString csObjectName, FILE *p_fFile, CPA_MainWorld *p_oMainWorld) { return NULL; }
|
||||
// virtual CPA_Object *Duplicate(CPA_Object *pObject, CPA_SuperObject *pNewSuperObject);
|
||||
|
||||
// virtual CPA_SuperObject *GetCopyOfProtectedChild (CPA_SuperObject *pInitialChild, CPA_SuperObject *pNewOwner);
|
||||
|
||||
// permissions for EvtEditor
|
||||
// virtual BOOL fn_bAcceptAsParent(CPA_Object *pChild, CPA_Object *pParent);
|
||||
// virtual BOOL fn_bAcceptAsChild(CPA_Object *pParent, CPA_Object *pChild);
|
||||
|
||||
// when insertion is canceled
|
||||
// virtual void fn_vOnCancelInsertion(CPA_SuperObject *pInstance);
|
||||
|
||||
////////
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------
|
||||
//(DR) Editor's specific members
|
||||
|
||||
//Attributes
|
||||
public:
|
||||
//The (one and only) document
|
||||
CPA_PartGen_MyDocument m_clDocument;
|
||||
|
||||
//The main frame
|
||||
CPA_PartGen_MainFrame *m_pclPartGenMainFrame;
|
||||
|
||||
//The View
|
||||
TPG_View *m_pub_p_clView;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
CString m_csEditorVersion;
|
||||
|
||||
//CPA_PartGen_Card *m_pri_pclSelectedCard;
|
||||
|
||||
//Fucntions
|
||||
public:
|
||||
CPA_PartGen_MyDocument *m_pub_fn_p_clGetDocument();
|
||||
CPA_PartGen_Source *m_pub_fn_p_clFindSourceWithEngine( PRT_tdstParticlesSource* );
|
||||
CPA_PartGen_System *m_pub_fn_p_clFindSystemWithEngine( PRT_tdstParticlesSystem* );
|
||||
CPA_PartGen_Environment *m_pub_fn_p_clFindEnvWithEngine( PRT_tdstParticlesEnvironment* );
|
||||
CPA_PartGen_Generator *m_pub_fn_p_clFindPrtGenWithEngine( tdxHandleToParticleGenerator );
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
void m_fn_vShowEditor();
|
||||
void m_fn_vHideEditor();
|
||||
|
||||
//(YB) End of Editor's specific members
|
||||
//--------------------------------------------------------------------------
|
||||
};
|
||||
|
||||
// DR //
|
||||
extern CPA_PartGen_Interface *g_pclInterface;
|
||||
// End DR //
|
||||
|
||||
extern tdstDLLIdentity g_stPartGenDLLIdentity;
|
||||
|
||||
#endif // __PARTGEN_INTERF_HPP__
|
1
Rayman_X/cpa/tempgrp/TPG/Inc/help_def.h
Normal file
1
Rayman_X/cpa/tempgrp/TPG/Inc/help_def.h
Normal file
@@ -0,0 +1 @@
|
||||
#define IDH_GENERAL 10000
|
10
Rayman_X/cpa/tempgrp/TPG/Src/ParticuleGen.def
Normal file
10
Rayman_X/cpa/tempgrp/TPG/Src/ParticuleGen.def
Normal file
@@ -0,0 +1,10 @@
|
||||
LIBRARY
|
||||
|
||||
EXPORTS
|
||||
fn_p_szGetCPAVersion
|
||||
fn_p_stGetDLLIdentity
|
||||
fn_p_oGetDLL
|
||||
fn_vInitDll
|
||||
|
||||
SECTIONS
|
||||
.data READ WRITE
|
6
Rayman_X/cpa/tempgrp/TPG/Src/StdAfx.cpp
Normal file
6
Rayman_X/cpa/tempgrp/TPG/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"
|
||||
|
124
Rayman_X/cpa/tempgrp/TPG/Src/TPGMainF.cpp
Normal file
124
Rayman_X/cpa/tempgrp/TPG/Src/TPGMainF.cpp
Normal file
@@ -0,0 +1,124 @@
|
||||
// MainFrm.cpp : implementation of the CPA_PartGen_MainFrame class
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#include "PGen_Res.h"
|
||||
|
||||
#include "TPGMainF.hpp"
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_View.hpp"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
HCURSOR g_hcursor_CloseHand;
|
||||
HCURSOR g_hcursor_UpDownHand;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_PartGen_MainFrame
|
||||
BEGIN_MESSAGE_MAP(CPA_PartGen_MainFrame, CSplitFrame)
|
||||
//{{AFX_MSG_MAP(CPA_PartGen_MainFrame)
|
||||
ON_WM_HELPINFO()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_PartGen_MainFrame construction/destruction
|
||||
|
||||
//*******************************************************************************
|
||||
CPA_PartGen_MainFrame::CPA_PartGen_MainFrame()
|
||||
{
|
||||
//Loads a special cursor
|
||||
g_hcursor_UpDownHand = AfxGetApp()->LoadCursor(IDC_CURSOR_UPDOWN_HAND);
|
||||
g_hcursor_CloseHand = AfxGetApp()->LoadCursor(IDC_CURSOR_CLOSED_HAND);
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
CPA_PartGen_MainFrame::~CPA_PartGen_MainFrame()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL CPA_PartGen_MainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
|
||||
{
|
||||
if ( !(CreateSplitter(C_cVerticalSplitter, 2)) )
|
||||
return FALSE;
|
||||
|
||||
HINSTANCE hOldInstance = AfxGetResourceHandle();
|
||||
|
||||
//Creates Dialog List View
|
||||
CPA_DialogList *pclDialogList = new CPA_DialogList;
|
||||
g_pclInterface->m_clDocument.m_pub_p_clDialogList = pclDialogList;
|
||||
pclDialogList->fn_vInitDialog(g_pclInterface, this);
|
||||
SetPaneView(0, pclDialogList, "Particles Generator", g_pclInterface->m_clDocument.m_ulListViewHeight);
|
||||
|
||||
//*** register DialogList for Tut
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
TUT_M_vRegisterDialogList( pclDialogList, "TPG_ListOfGeneratorsSystemsOrEnvironments",
|
||||
"TPG_NoTree",
|
||||
"TPG_SelectGeneratorsSystemsOrEnvironmentsList",
|
||||
"TPG_NoTest" );
|
||||
|
||||
|
||||
AfxSetResourceHandle(g_stPartGenDLLIdentity.hModule);
|
||||
|
||||
//Creates Control view
|
||||
if ( !CreateView(1,
|
||||
RUNTIME_CLASS(TPG_View),
|
||||
"View",
|
||||
450)
|
||||
)
|
||||
return FALSE;
|
||||
|
||||
TPG_View *p_clView = (TPG_View *)m_fn_p_oGetPane(1);
|
||||
|
||||
p_clView->OnInitialUpdate();
|
||||
g_pclInterface->m_clDocument.m_pub_fn_vFillControlLists();
|
||||
g_pclInterface->m_clDocument.m_pub_fn_vBuildAllEnumDescriptors();
|
||||
AfxSetResourceHandle(hOldInstance);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//*******************************************************************************
|
||||
BOOL CPA_PartGen_MainFrame::OnHelpInfo(HELPINFO* pHelpInfo)
|
||||
{
|
||||
::WinHelp(m_hWnd,
|
||||
LPCTSTR(g_pclInterface->m_clDocument.m_csHelpFileNameAndPath),
|
||||
HELP_FINDER,
|
||||
0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
//*******************************************************************************
|
||||
//*******************************************************************************
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_PartGen_MainFrame diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CPA_PartGen_MainFrame::AssertValid() const
|
||||
{
|
||||
CFrameWnd::AssertValid();
|
||||
}
|
||||
|
||||
void CPA_PartGen_MainFrame::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CFrameWnd::Dump(dc);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
|
1223
Rayman_X/cpa/tempgrp/TPG/Src/TPGMyDoc.cpp
Normal file
1223
Rayman_X/cpa/tempgrp/TPG/Src/TPGMyDoc.cpp
Normal file
File diff suppressed because it is too large
Load Diff
963
Rayman_X/cpa/tempgrp/TPG/Src/TPG_ClBk.cpp
Normal file
963
Rayman_X/cpa/tempgrp/TPG/Src/TPG_ClBk.cpp
Normal file
@@ -0,0 +1,963 @@
|
||||
////////////////////////////////////////////
|
||||
//
|
||||
// All CallBacks used by TPG
|
||||
//
|
||||
////////////////////////////////////////////
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#define D_MSPrtSrc_StructureDefine
|
||||
|
||||
#include "ErO.h"
|
||||
#include "MTH.h"
|
||||
|
||||
#include "TPG_ClBk.hpp"
|
||||
#include "_Minterf.hpp"
|
||||
#include "Tpg_Strg.hpp"
|
||||
#include "TPG_Spri.hpp"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/*
|
||||
=======================================================================================
|
||||
General function
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
----------------------------------------------------------------------------------------
|
||||
Description : Get a PrtSrc owner data in Editor data
|
||||
Returns (PRT_tdstParticlesSource )
|
||||
----------------------------------------------------------------------------------------
|
||||
*/
|
||||
PRT_tdstParticlesSource *fn_CB_p_stGetOwnerPrtSrc( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get ParticlesSource Owner data",
|
||||
"fn_CB_p_stGetOwnerPrtSrc",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Ownerdata (PrtSrc) is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "PrtSrc" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
return (PRT_tdstParticlesSource *) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
----------------------------------------------------------------------------------------
|
||||
Description : Check data passed to some call back
|
||||
Returns (PRT_tdstParticlesSource )
|
||||
----------------------------------------------------------------------------------------
|
||||
*/
|
||||
void fn_CB_vCheckData( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Function to check data",
|
||||
"fn_CB_p_oCheckData",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL"
|
||||
);
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
----------------------------------------------------------------------------------------
|
||||
Description : get and check current enum value of an enum data
|
||||
----------------------------------------------------------------------------------------
|
||||
*/
|
||||
CTL_Editor_EnumElement *fn_CB_p_oGetCurrentEnumElement( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CTL_Editor_EnumElement *p_clEnumElement;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Function to retrieve current enum value",
|
||||
"fn_CB_p_oGetCurrentEnumElement",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Enum current value is NULL"
|
||||
);
|
||||
p_clEnumElement = ((CTL_Editor_EnumData*)_p_clData)->m_pclCurrentValue;
|
||||
ERROR_ASSERT( p_clEnumElement != NULL );
|
||||
|
||||
return p_clEnumElement;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Can Be Displayed CallBacks
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//*** Probability for source generation mode *****
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceProbability( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucGenerationMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is source generation probability displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceProbability",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get generation mode is NULL"
|
||||
);
|
||||
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "GenerationMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucGenerationMode = (unsigned char*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
return (*p_ucGenerationMode == PRT_C_ucProbabilistGeneration);
|
||||
}
|
||||
|
||||
//*** Nb Frames For source generation mode ****
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbFrames( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucGenerationMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is source nb frames generation displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceNbFrames",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get generation mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "GenerationMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucGenerationMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucGenerationMode == PRT_C_ucCrenelGeneration);
|
||||
}
|
||||
|
||||
//*** Nb Particles For source nb particles to generate mode
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbParticles( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucNbParticlesMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is source nb particles constant displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceNbParticles",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get nb particles to generate mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "NbParticlesMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucNbParticlesMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucNbParticlesMode == PRT_C_ucConstantNb);
|
||||
}
|
||||
|
||||
//*** Nb Particles Min/Max For source nb particles to generate mode
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceNbParticlesMinMax( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucNbParticlesMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is source nb particles min/max displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceNbParticles",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get nb particles to generate mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "NbParticlesMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucNbParticlesMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucNbParticlesMode == PRT_C_ucProbabilistNb);
|
||||
}
|
||||
|
||||
|
||||
//*** Quad geometry for source ********************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceGeometryQuad( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucNbParticlesMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is points 1 and 2 displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceGeometryQuad",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get geometry mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "GeometryMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucNbParticlesMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucNbParticlesMode == PRT_C_ucQuad);
|
||||
}
|
||||
|
||||
//*** Constant Life time ********************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceConstantLifeTime( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Is constant life time displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceConstantLifeTime",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get geometry mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "LifeMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucMode == PRT_C_ucConstantLifeTime);
|
||||
}
|
||||
|
||||
|
||||
//*** Probabilist Life time ********************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSourceProbabilistLifeTime( CTL_Editor_Control *_p_clControl )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
unsigned char *p_ucMode;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Are min/max life time displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSourceProbabilistLifeTime",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get geometry mode is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "LifeMode" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
p_ucMode = (unsigned char*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
return (*p_ucMode == PRT_C_ucProbabilistLifeTime);
|
||||
}
|
||||
|
||||
|
||||
//*** GameMaterials for system *********************
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSystemGameMaterials( CTL_Editor_Control * _p_clControl)
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Is GameMaterials displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( (*p_xType == PRT_C_xPointParticles) || (*p_xType == PRT_C_xSegmentParticles) );
|
||||
}
|
||||
|
||||
|
||||
//*** Sprites for system
|
||||
BOOL g_fn_bCallBackCanBeDisplayedSystemSprites( CTL_Editor_Control * _p_clControl)
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Is sprites displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedSystemSprites",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( *p_xType == PRT_C_xSpriteParticles );
|
||||
}
|
||||
|
||||
|
||||
//*** Min Max points for environment box with generator not linked
|
||||
BOOL g_fn_bCallBackCanBeDisplayedEnvBox( CTL_Editor_Control * _p_clControl)
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Are min and max points for box displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get environment type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "EnvType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
unsigned long *p_ulType = (unsigned long*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( *p_ulType == PRT_C_ulAlignedBoxEnv );
|
||||
}
|
||||
|
||||
|
||||
//*** Sphere center for environment box with generator not linked
|
||||
BOOL g_fn_bCallBackCanBeDisplayedEnvSphere( CTL_Editor_Control * _p_clControl)
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Is center for sphere displayed ?",
|
||||
"g_fn_bCallBackCanBeDisplayedEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get environment type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clControl->m_fn_pclGetEditedData()->m_pub_fn_pclGetOwnerDataWithName( "EnvType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
unsigned long *p_ulType = (unsigned long*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( *p_ulType == PRT_C_ulSphereEnv );
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
// Data Changed CallBacks
|
||||
////////////////////////////////////////
|
||||
|
||||
//*** data changed for generator ******
|
||||
void g_fn_vCallBackDataChangedGenerator( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
CPA_PartGen_Generator *p_clGenerator;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify generator data has changed",
|
||||
"g_fn_vCallBackDataChangedGenerator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited generator is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedGenerator" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify generator data has changed",
|
||||
"g_fn_vCallBackDataChangedGenerator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited generator is NULL"
|
||||
);
|
||||
p_clGenerator = (CPA_PartGen_Generator*) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
ERROR_ASSERT( p_clGenerator != NULL );
|
||||
|
||||
p_clGenerator->fn_vNotifySave();
|
||||
}
|
||||
|
||||
//*** data changed for Particle source ******
|
||||
void fn_vCBPrtSrcDataChanged( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
CTL_OwnerData *p_clOwnerData;
|
||||
CPA_PartGen_Source *p_oPrtSrc;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify Particle source data has changed",
|
||||
"fn_vCBPrtSrcDataChanged",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited source is NULL"
|
||||
);
|
||||
p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedSource" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify Particle source data has changed",
|
||||
"fn_vCBPrtSrcDataChanged",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited particle source is NULL"
|
||||
);
|
||||
p_oPrtSrc = (CPA_PartGen_Source *) p_clOwnerData->m_pub_fn_pvGetDataPtr();
|
||||
ERROR_ASSERT( p_oPrtSrc != NULL );
|
||||
|
||||
p_oPrtSrc->fn_vNotifySave();
|
||||
}
|
||||
|
||||
//*** data changed for Particle system ******
|
||||
void g_fn_vCallBackDataChangedSystem( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify system data has changed",
|
||||
"g_fn_vCallBackDataChangedSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited system is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedSystem" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify system data has changed",
|
||||
"g_fn_vCallBackDataChangedSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited system is NULL");
|
||||
CPA_PartGen_System *p_clSystem = (CPA_PartGen_System*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clSystem != NULL );
|
||||
p_clSystem->fn_vNotifySave();
|
||||
}
|
||||
|
||||
|
||||
//*** data changed for Particle environment ******
|
||||
void g_fn_vCallBackDataChangedEnv( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify environment data has changed",
|
||||
"g_fn_vCallBackDataChangedEnv",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited environment is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedEnv" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"CallBack to notify environment data has changed",
|
||||
"g_fn_vCallBackDataChangedEnv",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited environment is NULL");
|
||||
CPA_PartGen_Environment *p_clEnv = (CPA_PartGen_Environment*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
p_clEnv->fn_vNotifySave();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Data Changed Special CallBacks
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
//*** Display generator for combo changed ***********
|
||||
void g_fn_vCallBackDataChangedSpecialDisplayGenerator( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
if( _eReason == CTL_UPDATE_REASON__DATA_MODIFIED_BY_USER )
|
||||
g_pclInterface->m_pub_fn_p_clGetDocument()->m_pub_fn_vDisplayCurrentGenerator();
|
||||
}
|
||||
|
||||
|
||||
void g_fn_vCallBackDataChangedSpecialDisplayAll( CTL_Editor_Data *_p_clData, CTL_eUpdateReason _eReason, long _lUserReason )
|
||||
{
|
||||
if( _eReason == CTL_UPDATE_REASON__DATA_MODIFIED_BY_USER )
|
||||
g_pclInterface->m_pub_fn_p_clGetDocument()->m_pub_fn_vUpdateGenerator(g_pclInterface->m_pub_fn_p_clGetDocument()->m_pub_p_clCurrentGenerator );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// Read/Write Modification CallBacks
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
///// Check if source is loaded before it is used by generator /////////////
|
||||
void g_fn_vModificationWriteGeneratorSource( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CTL_Editor_EnumElement *p_clEnumElement;
|
||||
CPA_PartGen_Source *p_oPrtSrc;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
fn_CB_vCheckData( _p_clData );
|
||||
p_clEnumElement = fn_CB_p_oGetCurrentEnumElement(_p_clData);
|
||||
|
||||
if( p_clEnumElement->m_pub_fn_lGetValue() == (long)0 )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify system associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorSystem",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
"Set a NULL System"
|
||||
);
|
||||
p_oPrtSrc = (CPA_PartGen_Source *)p_clEnumElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
ERROR_ASSERT( p_oPrtSrc != NULL );
|
||||
|
||||
if( p_oPrtSrc != NULL )
|
||||
{
|
||||
p_oPrtSrc->m_pub_fn_vLoadIfUnloaded();
|
||||
p_clEnumElement->m_pub_fn_vSetValue( ((long) p_oPrtSrc->GetData()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///// Check system is loaded before it is used by generator /////////////
|
||||
void g_fn_vModificationWriteGeneratorSystem( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify system associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify system associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Enum current value is NULL");
|
||||
CTL_Editor_EnumElement *p_clEnumElement = ((CTL_Editor_EnumData*)_p_clData)->m_pclCurrentValue;
|
||||
ERROR_ASSERT( p_clEnumElement != NULL );
|
||||
|
||||
if( p_clEnumElement->m_pub_fn_lGetValue() == (long)0 )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify system associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorSystem",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
"Set a NULL System");
|
||||
CPA_PartGen_System *p_clSystem = (CPA_PartGen_System*)p_clEnumElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
ERROR_ASSERT( p_clSystem != NULL );
|
||||
|
||||
if( p_clSystem != NULL )
|
||||
{
|
||||
p_clSystem->m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
p_clEnumElement->m_pub_fn_vSetValue( ((long)p_clSystem->GetData()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///// Check environment is loaded before it is used by generator /////////////
|
||||
void g_fn_vModificationWriteGeneratorEnvironment( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify environment associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorEnvironment",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify environment associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorEnvironment",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Enum current value is NULL");
|
||||
CTL_Editor_EnumElement *p_clEnumElement = ((CTL_Editor_EnumData*)_p_clData)->m_pclCurrentValue;
|
||||
ERROR_ASSERT( p_clEnumElement != NULL );
|
||||
|
||||
if( p_clEnumElement->m_pub_fn_lGetValue() == (long)0 )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to modify environment associated to generator",
|
||||
"g_fn_vModificationWriteGeneratorEnvironment",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
"Set a NULL environment");
|
||||
CPA_PartGen_Environment *p_clEnv = (CPA_PartGen_Environment*)p_clEnumElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
if( p_clEnv != NULL )
|
||||
{
|
||||
p_clEnv->m_pub_fn_vLoadIfUnloaded();
|
||||
|
||||
p_clEnumElement->m_pub_fn_vSetValue( (long)(p_clEnv->GetData()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///// Check environment is loaded before it is used by generator /////////////
|
||||
void g_fn_vModificationWriteGeneratorLinkedGenerator( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CTL_Editor_EnumElement *p_clEnumElement;
|
||||
CPA_PartGen_Generator *p_oLinkedGen;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
fn_CB_vCheckData( _p_clData );
|
||||
p_clEnumElement = fn_CB_p_oGetCurrentEnumElement(_p_clData);
|
||||
|
||||
if( p_clEnumElement->m_pub_fn_lGetValue() == (long)0 )
|
||||
{
|
||||
p_oLinkedGen = (CPA_PartGen_Generator *) p_clEnumElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
|
||||
if( p_oLinkedGen != NULL )
|
||||
{
|
||||
//p_oLinkedGen->m_pub_fn_vLoadIfUnloaded();
|
||||
g_pclInterface->fn_bLoadBaseObject( p_oLinkedGen );
|
||||
p_clEnumElement->m_pub_fn_vSetValue( (long)(p_oLinkedGen->GetData()) );
|
||||
|
||||
/*
|
||||
* todo : check for loop
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
///// Read Nb frames generation using Nb frames total ///////////////////////////
|
||||
void g_fn_vModificationReadSourceNbFramesGeneration( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
PRT_tdstParticlesSource *p_stPrtSrc;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
fn_CB_vCheckData( _p_clData );
|
||||
p_stPrtSrc = fn_CB_p_stGetOwnerPrtSrc( _p_clData );
|
||||
((CTL_Editor_IntegerData *) _p_clData)->m_lCurrentValue -= (long) p_stPrtSrc->xNbFramesNoGeneration;
|
||||
}
|
||||
|
||||
|
||||
///// write nb frames total using nb frames generation ///////////////////////////
|
||||
void g_fn_vModificationWriteSourceNbFramesGeneration( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
PRT_tdstParticlesSource *p_stPrtSrc;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
fn_CB_vCheckData( _p_clData );
|
||||
p_stPrtSrc = fn_CB_p_stGetOwnerPrtSrc( _p_clData );
|
||||
((CTL_Editor_IntegerData *) _p_clData)->m_lCurrentValue += (long) p_stPrtSrc->xNbFramesNoGeneration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//*** Get GameMaterial used by system with point or segment
|
||||
void g_fn_vModificationReadSystemGameMaterials( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get GameMaterial from Point or Segment",
|
||||
"g_fn_vModificationReadSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get GameMaterial from Point or Segment",
|
||||
"g_fn_vModificationReadSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"EnumElement is NULL");
|
||||
CTL_Editor_EnumElement *p_clEnumElement = ((CTL_Editor_EnumData*)_p_clData)->m_pclCurrentValue;
|
||||
ERROR_ASSERT( p_clEnumElement != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get GameMaterial from Point or Segment",
|
||||
"g_fn_vModificationReadSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get GameMaterial from Point or Segment",
|
||||
"g_fn_vModificationReadSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited system is NULL");
|
||||
p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedSystem" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to get GameMaterial from Point or Segment",
|
||||
"g_fn_vModificationReadSystemGameMaterials",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited system is NULL");
|
||||
CPA_PartGen_System *p_clSystem = (CPA_PartGen_System*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clSystem != NULL );
|
||||
|
||||
if( *p_xType == PRT_C_xPointParticles )
|
||||
p_clEnumElement->m_pub_fn_vSetValue( (long)p_clSystem->m_pub_fn_hGetPointGameMaterial() );
|
||||
|
||||
if( *p_xType == PRT_C_xSegmentParticles )
|
||||
p_clEnumElement->m_pub_fn_vSetValue( (long)p_clSystem->m_pub_fn_hGetSegmentGameMaterial() );
|
||||
}
|
||||
|
||||
|
||||
///// Create Point, Segment or Sprite for system //////////////////////
|
||||
void g_fn_vModificationWriteSystemObjects( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"EnumElement is NULL");
|
||||
CTL_Editor_EnumElement *p_clEnumElement = ((CTL_Editor_EnumData*)_p_clData)->m_pclCurrentValue;
|
||||
ERROR_ASSERT( p_clEnumElement != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited system is NULL");
|
||||
p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedSystem" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited system is NULL");
|
||||
CPA_PartGen_System *p_clSystem = (CPA_PartGen_System*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clSystem != NULL );
|
||||
|
||||
if( *p_xType == PRT_C_xPointParticles )
|
||||
p_clSystem->m_pub_fn_vSetObjectPoint( (GMT_tdxHandleToGameMaterial)p_clEnumElement->m_pub_fn_lGetValue() );
|
||||
|
||||
if( *p_xType == PRT_C_xSegmentParticles )
|
||||
p_clSystem->m_pub_fn_vSetObjectSegment( (GMT_tdxHandleToGameMaterial)p_clEnumElement->m_pub_fn_lGetValue() );
|
||||
|
||||
if( *p_xType == PRT_C_xSpriteParticles )
|
||||
{
|
||||
if( p_clEnumElement->m_pub_fn_lGetValue() == 0 )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Function to create Point, Segment or Sprite",
|
||||
"g_fn_vModificationWriteSystemObjects",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
"Set a NULL Sprite !");
|
||||
TPG_Sprite *p_clSprite = (TPG_Sprite*)p_clEnumElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
ERROR_ASSERT( p_clSprite != NULL );
|
||||
if( p_clSprite != NULL )
|
||||
{
|
||||
p_clSprite->m_pub_fn_vLoadSprite();
|
||||
p_clEnumElement->m_pub_fn_vSetValue( (long)p_clSprite->m_pub_fn_hGetSprite() );
|
||||
}
|
||||
}
|
||||
|
||||
p_clSystem->m_pub_fn_vSetObjectSprite( (ACP_tdxHandleOfSprite)p_clEnumElement->m_pub_fn_lGetValue() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///// Save min max point in environment or in generator linked //
|
||||
void g_fn_vModificationWriteEnvBox( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data min max points for environment",
|
||||
"g_fn_vModificationWriteEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data min max points for environment",
|
||||
"g_fn_vModificationWriteEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited environment is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedEnv" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data min max points for environment",
|
||||
"g_fn_vModificationWriteEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited environment is NULL");
|
||||
CPA_PartGen_Environment *p_clEnv = (CPA_PartGen_Environment*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data min max points for environment",
|
||||
"g_fn_vModificationWriteEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited engine environment is NULL");
|
||||
ERROR_ASSERT( p_clEnv->m_pri_p_stEnv != NULL );
|
||||
|
||||
if( p_clEnv->m_pri_p_clGenerator == NULL )
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stMinPoint)), (&(p_clEnv->m_pri_stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stMaxPoint)), (&(p_clEnv->m_pri_stMaxPoint)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( p_clEnv->m_pri_p_clGenerator->m_pub_fn_bGetLinkToEnv() )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data min max points for environment",
|
||||
"g_fn_vModificationWriteEnvBox",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Engine generator using edited environment is NULL");
|
||||
ERROR_ASSERT( p_clEnv->m_pri_p_clGenerator->m_pri_hGenerator != NULL );
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_clGenerator->m_pri_hGenerator->stMinPoint)), (&(p_clEnv->m_pri_stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_clGenerator->m_pri_hGenerator->stMaxPoint)), (&(p_clEnv->m_pri_stMaxPoint)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stMinPoint)), (&(p_clEnv->m_pri_stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stMaxPoint)), (&(p_clEnv->m_pri_stMaxPoint)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///// Save sphere center in environment or in generator linked ////
|
||||
void g_fn_vModificationWriteEnvSphere( CTL_Editor_Data *_p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data center of sphere for environment",
|
||||
"g_fn_vModificationWriteEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Data is NULL");
|
||||
ERROR_ASSERT( _p_clData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data center of sphere for environment",
|
||||
"g_fn_vModificationWriteEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get edited environment is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedEnv" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data center of sphere for environment",
|
||||
"g_fn_vModificationWriteEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited environment is NULL");
|
||||
CPA_PartGen_Environment *p_clEnv = (CPA_PartGen_Environment*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data center of sphere for environment",
|
||||
"g_fn_vModificationWriteEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited engine environment is NULL");
|
||||
ERROR_ASSERT( p_clEnv->m_pri_p_stEnv != NULL );
|
||||
|
||||
if( p_clEnv->m_pri_p_clGenerator == NULL )
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stSphereCenter)), (&(p_clEnv->m_pri_stSphereCenter)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( p_clEnv->m_pri_p_clGenerator->m_pub_fn_bGetLinkToEnv() )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Update engine data center of sphere for environment",
|
||||
"g_fn_vModificationWriteEnvSphere",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Engine generator using edited environment is NULL");
|
||||
ERROR_ASSERT( p_clEnv->m_pri_p_clGenerator->m_pri_hGenerator != NULL );
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_clGenerator->m_pri_hGenerator->stMinPoint)), (&(p_clEnv->m_pri_stSphereCenter)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&(p_clEnv->m_pri_p_stEnv->stSphereCenter)), (&(p_clEnv->m_pri_stSphereCenter)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Must be read_written CallBacks
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//*** Is GameMaterial data of system is taken into account ************************
|
||||
BOOL g_fn_bCallBackMustBeReadWrittenSystemGameMaterial( CTL_Editor_Data * _p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Is GameMaterial data taken into account ?",
|
||||
"g_fn_bCallBackMustBeReadWrittenSystemGameMaterial",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( (*p_xType == PRT_C_xPointParticles) || (*p_xType == PRT_C_xSegmentParticles) );
|
||||
}
|
||||
|
||||
|
||||
//*** Is Sprite data of system is taken into account
|
||||
BOOL g_fn_bCallBackMustBeReadWrittenSystemSprite( CTL_Editor_Data * _p_clData )
|
||||
{
|
||||
ERROR_PREPARE_M(g_c_csPartGenModuleNameForErrors,
|
||||
"Is sprite data taken into account ?",
|
||||
"g_fn_bCallBackMustBeReadWrittenSystemSprite",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"OwnerData to get objects type is NULL");
|
||||
CTL_OwnerData *p_clOwnerData = _p_clData->m_pub_fn_pclGetOwnerDataWithName( "ObjectsType" );
|
||||
ERROR_ASSERT( p_clOwnerData != NULL );
|
||||
|
||||
ACP_tdxIndex *p_xType = (ACP_tdxIndex*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
|
||||
return( *p_xType == PRT_C_xSpriteParticles );
|
||||
}
|
||||
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Method : g_fnCanISelectThisItemCallBack
|
||||
// Date : 98-03
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Description : this function is called from a combobox when a selection is changed
|
||||
// if the selected item is valid approve the selection
|
||||
// Author : Stegaru Cristian - CPA2
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Modification :
|
||||
// Date :
|
||||
// By :
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
int g_fnCanISelectThisItemCallBack (CTL_Editor_Data * p_clData, CTL_Editor_EnumElement *pNewElement)
|
||||
{
|
||||
ASSERT (pNewElement);
|
||||
CString csSelectedString = pNewElement->m_pub_fn_csGetElementName();
|
||||
if ("No Element" == csSelectedString)
|
||||
return 1;
|
||||
|
||||
ASSERT (p_clData);
|
||||
CString csDataName = p_clData->m_pub_fn_csGetDataName ();
|
||||
if ("Environment" != csDataName)
|
||||
return 1;
|
||||
|
||||
//get the current generator
|
||||
CTL_OwnerData *p_clOwnerData = p_clData->m_pub_fn_pclGetOwnerDataWithName( "EditedGenerator" );
|
||||
ASSERT( p_clOwnerData != NULL );
|
||||
CPA_PartGen_Generator *p_clGenerator = (CPA_PartGen_Generator*)( p_clOwnerData->m_pub_fn_pvGetDataPtr() );
|
||||
ASSERT (p_clGenerator);
|
||||
|
||||
ASSERT (g_pclInterface->m_clDocument.m_pub_p_clCurrentGenerator == p_clGenerator);
|
||||
CString csCurrentGeneratorName = p_clGenerator->GetName ();
|
||||
|
||||
CPA_PartGen_Environment *pSelectedEnv = (CPA_PartGen_Environment*)pNewElement->m_pub_fn_pvGetAdditionnalPointer();
|
||||
ASSERT (pSelectedEnv);
|
||||
PRT_tdstParticlesEnvironment *pSelectedEngEnv = pSelectedEnv->m_pub_fn_p_stGetEnv();
|
||||
|
||||
//check every generator to see if the environment is already used
|
||||
CPA_BaseObjectList * p_clList = g_pclInterface->GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenGeneratorName);
|
||||
CPA_PartGen_Generator *p_Generator = NULL;
|
||||
Position pos = p_clList->GetHeadPosition();
|
||||
while (pos != NULL)
|
||||
{
|
||||
p_Generator = (CPA_PartGen_Generator *)p_clList->GetNext (pos);
|
||||
ASSERT (p_Generator);
|
||||
if (p_Generator->GetName() == csCurrentGeneratorName) //don't count the current generator
|
||||
continue;
|
||||
|
||||
tdxHandleToParticleGenerator pEngGenerator = p_Generator->m_pub_fn_hGetGenerator();
|
||||
if (NULL == pEngGenerator)
|
||||
continue;
|
||||
|
||||
PRT_tdstParticlesEnvironment *pEngEnv = pEngGenerator->p_stPrtEnv;
|
||||
if (NULL == pEngEnv)
|
||||
continue;
|
||||
|
||||
if (pSelectedEngEnv == pEngEnv)
|
||||
{
|
||||
AfxMessageBox ("This environment is already used.\nPlease, select another one.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
517
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OEnv.cpp
Normal file
517
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OEnv.cpp
Normal file
@@ -0,0 +1,517 @@
|
||||
///////////////////////////////////////////////////
|
||||
//
|
||||
// Particles Generator Environment
|
||||
//
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#define D_MSPrtSrc_StructureDefine
|
||||
|
||||
#include "TPG_OEnv.hpp"
|
||||
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_Strg.hpp"
|
||||
#include "TPG_ClBk.hpp"
|
||||
|
||||
#include "PRT.h"
|
||||
#include "GAM.h"
|
||||
#include "MTH.h"
|
||||
#include "ErO.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// Constructor and Destructor
|
||||
////////////////////////////////////////////////
|
||||
CPA_PartGen_Environment::CPA_PartGen_Environment(CString _csName, PRT_tdstParticlesEnvironment *_p_stEnv, BOOL _bIsLoaded )
|
||||
: CPA_SaveObject( g_pclInterface, g_C_csPartGenEnvName, E_ss_Responsible )
|
||||
{
|
||||
// Initialization for CPA_SaveObject
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveEnv );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
|
||||
m_pri_p_clGenerator = NULL;
|
||||
|
||||
if( _bIsLoaded )
|
||||
{
|
||||
if ( _p_stEnv == NULL ) //created when new button is pressed : engine object is created
|
||||
{
|
||||
SetExistingSection( FALSE );
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating a new environment",
|
||||
"CPA_PartGen_Environment::CPA_PartGen_Environment",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"the engine object is not allocated"
|
||||
);
|
||||
PRT_fn_vCreateParticlesEnvironment( &_p_stEnv );
|
||||
ERROR_ASSERT( _p_stEnv != NULL );
|
||||
fn_vUpdateData( (void*)_p_stEnv );
|
||||
m_pri_p_stEnv = _p_stEnv;
|
||||
|
||||
m_pub_fn_vSetEnvType(PRT_C_ulSphereEnv);
|
||||
m_pub_fn_vSetBoxMin( 0.0, 0.0, 0.0 );
|
||||
m_pub_fn_vSetBoxMax( 1.0, 1.0, 1.0 );
|
||||
m_pub_fn_vSetSphereCenter( 0.0, 0.0, 0.0 );
|
||||
}
|
||||
else //created using linktable : engine object is loaded and used
|
||||
{
|
||||
SetExistingSection( TRUE );
|
||||
fn_vUpdateData( (void*)_p_stEnv );
|
||||
m_pri_p_stEnv = _p_stEnv;
|
||||
}
|
||||
m_pri_fn_vSetInternalPoints();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
else //created : engine object is not loaded now
|
||||
{
|
||||
fn_vUpdateData( NULL );
|
||||
m_pri_p_stEnv = NULL;
|
||||
SetExistingSection( TRUE );
|
||||
}
|
||||
|
||||
SetAvailable( _bIsLoaded );
|
||||
}
|
||||
|
||||
CPA_PartGen_Environment::~CPA_PartGen_Environment()
|
||||
{
|
||||
fn_vNotifyUnSave();
|
||||
}
|
||||
|
||||
//*********************************************
|
||||
// Updates the pointer on engine object
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetEnv( PRT_tdstParticlesEnvironment *_p_stEnv )
|
||||
{
|
||||
fn_vUpdateData( (void*)_p_stEnv );
|
||||
m_pri_p_stEnv = _p_stEnv;
|
||||
SetAvailable( TRUE );
|
||||
|
||||
m_pri_fn_vSetInternalPoints();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetGenerator( CPA_PartGen_Generator *_p_clGen )
|
||||
{
|
||||
m_pri_p_clGenerator = _p_clGen;
|
||||
m_pri_fn_vSetInternalPoints();
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
// virtual functions
|
||||
/////////////////////////////////////////
|
||||
long CPA_PartGen_Environment::GetDataType( void )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
void* CPA_PartGen_Environment::GetData( void )
|
||||
{
|
||||
return (void*)m_pri_p_stEnv;
|
||||
}
|
||||
|
||||
CString CPA_PartGen_Environment::fn_csComputeReferencedSectionName(const CString _csNewName)
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
char szSectionName[ SCR_CV_ui_Cfg_MaxLenName ];
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
sprintf( szSectionName, "%s^%s:%s", C_szEnvironmentFileName, C_SectionPrtEnvDescription, (char *) LPCTSTR( _csNewName ) );
|
||||
return( szSectionName );
|
||||
}
|
||||
|
||||
|
||||
//****************************************************
|
||||
// load the engine object if necessary
|
||||
BOOL CPA_PartGen_Environment::m_pub_fn_vLoadIfUnloaded()
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
SCR_tdst_Cxt_Values *p_stValues;
|
||||
PRT_tdstParticlesEnvironment *p_stEnv;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
if ( fn_bIsAvailable() )
|
||||
return FALSE;
|
||||
|
||||
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(GetReferencedSectionName()), SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
p_stEnv = (PRT_tdstParticlesEnvironment*)p_stValues->a_ulValues[0];
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Loading an unloaded environment",
|
||||
"CPA_PartGen_Environment::m_pub_fn_vLoadIfUnloaded",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"the loaded engine object is null"
|
||||
);
|
||||
ERROR_ASSERT( p_stEnv != NULL );
|
||||
|
||||
fn_vUpdateData( (void*) p_stEnv );
|
||||
m_pri_p_stEnv = p_stEnv;
|
||||
SetAvailable(TRUE);
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Environment Type
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetEnvType( short _wIndex )
|
||||
{
|
||||
PRT_M_vSetTypeParticlesEnvironment( m_pri_p_stEnv, (unsigned long)_wIndex );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
short CPA_PartGen_Environment::m_pub_fn_wGetEnvType()
|
||||
{
|
||||
return (short)m_pri_p_stEnv->ulEnvType;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Min Max for Box type
|
||||
void CPA_PartGen_Environment::m_pri_fn_vSetInternalPoints()
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Initialize internal data min max points and center for environment",
|
||||
"CPA_PartGen_Environment::m_pri_fn_vSetInternalPoints",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Edited engine environment is NULL"
|
||||
);
|
||||
ERROR_ASSERT( m_pri_p_stEnv != NULL );
|
||||
|
||||
if( m_pri_p_clGenerator == NULL )
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMinPoint), (&(m_pri_p_stEnv->stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMaxPoint), (&(m_pri_p_stEnv->stMaxPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stSphereCenter), (&(m_pri_p_stEnv->stSphereCenter)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_pri_p_clGenerator->m_pub_fn_bGetLinkToEnv() )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Initialize internal data min max points and center for environment",
|
||||
"CPA_PartGen_Environment::m_pri_fn_vSetInternalPoints",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Engine generator using the edited environment is NULL"
|
||||
);
|
||||
ERROR_ASSERT( m_pri_p_clGenerator->m_pri_hGenerator != NULL );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMinPoint), (&(m_pri_p_clGenerator->m_pri_hGenerator->stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMaxPoint), (&(m_pri_p_clGenerator->m_pri_hGenerator->stMaxPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stSphereCenter), (&(m_pri_p_clGenerator->m_pri_hGenerator->stMinPoint)) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMinPoint), (&(m_pri_p_stEnv->stMinPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stMaxPoint), (&(m_pri_p_stEnv->stMaxPoint)) );
|
||||
MTH3D_M_vCopyVector( (&m_pri_stSphereCenter), (&(m_pri_p_stEnv->stSphereCenter)) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetBoxMin( double _dMinX, double _dMinY, double _dMinZ )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
MTH3D_tdstVector stBoxMin;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
MTH3D_M_vSetVectorElements( &stBoxMin, MTH_M_xDoubleToReal(_dMinX), MTH_M_xDoubleToReal(_dMinY), MTH_M_xDoubleToReal(_dMinZ) );
|
||||
MTH3D_M_vCopyVector ( &((m_pri_p_stEnv)->stMinPoint), ( &stBoxMin ) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMinX()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &m_pri_stMinPoint ) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMinY()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &m_pri_stMinPoint ) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMinZ()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &m_pri_stMinPoint ) );
|
||||
}
|
||||
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetBoxMax( double _dMaxX, double _dMaxY, double _dMaxZ )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
MTH3D_tdstVector stBoxMax;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
MTH3D_M_vSetVectorElements( &stBoxMax, MTH_M_xDoubleToReal(_dMaxX), MTH_M_xDoubleToReal(_dMaxY), MTH_M_xDoubleToReal(_dMaxZ) );
|
||||
MTH3D_M_vCopyVector ( &((m_pri_p_stEnv)->stMaxPoint), ( &stBoxMax ) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMaxX()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &m_pri_stMaxPoint ) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMaxY()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &m_pri_stMaxPoint ) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetBoxMaxZ()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &m_pri_stMaxPoint ) );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Center and Radius for Sphere type
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetSphereCenter( double _dCenterX, double _dCenterY, double _dCenterZ )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
MTH3D_tdstVector stSphereCenter;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
MTH3D_M_vSetVectorElements( &stSphereCenter, MTH_M_xDoubleToReal(_dCenterX), MTH_M_xDoubleToReal(_dCenterY), MTH_M_xDoubleToReal(_dCenterZ) );
|
||||
MTH3D_M_vCopyVector ( &((m_pri_p_stEnv)->stSphereCenter), ( &stSphereCenter ) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetSphereCenterX()
|
||||
{
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
// return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &m_pri_stSphereCenter ) );
|
||||
return MTH_M_xRealToDouble (MTH3D_M_xGetXofVector (&m_pri_p_stEnv->stSphereCenter));
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetSphereCenterY()
|
||||
{
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
// return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &m_pri_stSphereCenter ) );
|
||||
return MTH_M_xRealToDouble (MTH3D_M_xGetYofVector (&m_pri_p_stEnv->stSphereCenter));
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetSphereCenterZ()
|
||||
{
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
// return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &m_pri_stSphereCenter ) );
|
||||
return MTH_M_xRealToDouble (MTH3D_M_xGetZofVector (&m_pri_p_stEnv->stSphereCenter));
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetSphereRadius()
|
||||
{
|
||||
return MTH_M_xRealToDouble( m_pri_p_stEnv->xRadius );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Acceleration and Range
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetAcceleration( double _dAccelerX, double _dAccelerY, double _dAccelerZ )
|
||||
{
|
||||
MTH3D_tdstVector stAcceleration;
|
||||
MTH3D_M_vSetVectorElements( &stAcceleration, MTH_M_xDoubleToReal(_dAccelerX), MTH_M_xDoubleToReal(_dAccelerY), MTH_M_xDoubleToReal(_dAccelerZ) );
|
||||
PRT_M_vSetAccelerationParticlesEnvironment( m_pri_p_stEnv, ( &stAcceleration ) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetAccelerX()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &((m_pri_p_stEnv)->stAcceleration )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetAccelerY()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &((m_pri_p_stEnv)->stAcceleration )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetAccelerZ()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &((m_pri_p_stEnv)->stAcceleration) ) );
|
||||
}
|
||||
|
||||
void CPA_PartGen_Environment::m_pub_fn_vSetRange( double _dRange )
|
||||
{
|
||||
PRT_M_vSetAccelerationRangeParticlesEnvironment( m_pri_p_stEnv, MTH_M_xDoubleToReal(_dRange) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Environment::m_pub_fn_dGetRange()
|
||||
{
|
||||
return MTH_M_xRealToDouble( m_pri_p_stEnv->xAccelerationRange );
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// CallBack and function for save
|
||||
void CPA_PartGen_Environment::m_s_fn_vCallBackSaveEnv
|
||||
(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction
|
||||
)
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CPA_PartGen_Environment *p_clEnv;
|
||||
char szSectionName[ SCR_CV_ui_Cfg_MaxLenName ];
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving an environment",
|
||||
"CPA_PartGen_Environment::m_s_fn_vCallBackSaveEnv",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"trying to save a NULL environment"
|
||||
);
|
||||
p_clEnv = (CPA_PartGen_Environment*)_p_vData;
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
|
||||
switch( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_AddOrModifySection:
|
||||
case SCR_EA_Ntfy_AddOrRebuildSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
case SCR_EA_Ntfy_ModifySection:
|
||||
{
|
||||
sprintf( szSectionName, "%s:%s", C_SectionPrtEnvDescription, (char *) LPCTSTR(p_clEnv->GetName()) );
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, szSectionName, SCR_CC_C_Cfg_EOL );
|
||||
p_clEnv->m_pri_fn_vSaveEnv( _p_stFile );
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL );
|
||||
p_clEnv->fn_vSectionSaved();
|
||||
}
|
||||
break;
|
||||
|
||||
case SCR_EA_Ntfy_DeleteIfExists:
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_clEnv->fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Environment::m_pri_fn_vSaveEnv( SCR_tdst_File_Description *_p_stFile )
|
||||
{
|
||||
short wIndex = m_pub_fn_wGetEnvType();
|
||||
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtEnvType, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(g_C_a_csEnvironmentTypeName[wIndex]) );
|
||||
switch( wIndex )
|
||||
{
|
||||
case ((short)PRT_C_ulAlignedBoxEnv):
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtEnvMinMaxPoint, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP
|
||||
(
|
||||
_p_stFile, SCR_EF_SvL0_Scanf, 7, "%.3f,%.3f,%.3f,%.3f,%.3f,%.3f",
|
||||
m_pub_fn_dGetBoxMinX(), m_pub_fn_dGetBoxMinY(), m_pub_fn_dGetBoxMinZ(),
|
||||
m_pub_fn_dGetBoxMaxX(), m_pub_fn_dGetBoxMaxY(), m_pub_fn_dGetBoxMaxZ()
|
||||
);
|
||||
break;
|
||||
case ((short)PRT_C_ulSphereEnv):
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtEnvSphere, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP
|
||||
(
|
||||
_p_stFile, SCR_EF_SvL0_Scanf, 5, "%.3f,%.3f,%.3f,%.3f",
|
||||
m_pub_fn_dGetSphereCenterX(), m_pub_fn_dGetSphereCenterY(), m_pub_fn_dGetSphereCenterZ(),
|
||||
m_pub_fn_dGetSphereRadius()
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtEnvAcceleration, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP
|
||||
(
|
||||
_p_stFile, SCR_EF_SvL0_Scanf, 5, "%.3f,%.3f,%.3f,%.3f",
|
||||
m_pub_fn_dGetAccelerX(), m_pub_fn_dGetAccelerY(), m_pub_fn_dGetAccelerZ(),
|
||||
m_pub_fn_dGetRange()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Environment::m_pri_fn_vFillDataList()
|
||||
{
|
||||
CTL_Editor_Data *p_clData = NULL;
|
||||
CTL_Editor_EnumDescriptor *p_clEnumDescriptor = NULL;
|
||||
|
||||
//**** Environment type *********************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Env_Type" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Environment Type" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stEnv->ulEnvType) );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
|
||||
//*** Box Min env *******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Min" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_stMinPoint) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stEnv->ulEnvType), "EnvType" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteEnvBox );
|
||||
|
||||
//*** Box Max env *******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Max" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_stMaxPoint) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stEnv->ulEnvType), "EnvType" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteEnvBox );
|
||||
|
||||
//*** Sphere Center *****************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Center" );
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
// p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_stSphereCenter) );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stEnv->stSphereCenter) );
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stEnv->ulEnvType), "EnvType" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteEnvSphere );
|
||||
|
||||
//*** Sphere radius ******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Radius" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stEnv->xRadius) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stEnv->ulEnvType), "EnvType" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
|
||||
//*** Acceleration ******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Acceleration" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stEnv->stAcceleration) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
|
||||
//*** Acceleration range *******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Range" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stEnv->xAccelerationRange) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedEnv" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedEnv );
|
||||
}
|
||||
|
||||
CPA_PartGen_MyDocument * CPA_PartGen_Environment::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_pub_fn_p_clGetDocument();
|
||||
}
|
||||
|
542
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OGen.cpp
Normal file
542
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OGen.cpp
Normal file
@@ -0,0 +1,542 @@
|
||||
////////////////////////////////////////////////////
|
||||
//
|
||||
// Particles Generator and Source
|
||||
//
|
||||
////////////////////////////////////////////////////
|
||||
#include "StdAfx.h"
|
||||
|
||||
#define D_MSPrtSrc_StructureDefine
|
||||
|
||||
#include "TPG_OGen.hpp"
|
||||
#include "TPG_OEnv.hpp"
|
||||
#include "TPG_OSys.hpp"
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_Strg.hpp"
|
||||
#include "TPG_ClBk.hpp"
|
||||
|
||||
|
||||
#include "PRT.h"
|
||||
#include "MTH.h"
|
||||
#include "CTL.h"
|
||||
#include "ErO.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////
|
||||
// Constructor and destructor
|
||||
////////////////////////////////////////////
|
||||
CPA_PartGen_Generator:: CPA_PartGen_Generator(CString _csName, tdxHandleToParticleGenerator _hGenerator, BOOL _bIsLoaded)
|
||||
: CPA_SaveObject( g_pclInterface, g_C_csPartGenGeneratorName, E_ss_Responsible )
|
||||
{
|
||||
//*** initialization for CPA_SaveObject
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveGenerator );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
|
||||
//*** Section to save the associated source ***
|
||||
/*
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating a new generator",
|
||||
"CPA_PartGen_Generator::CPA_PartGen_Generator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"the new section for the source associated is not allocated"
|
||||
);
|
||||
|
||||
m_pri_p_clSourceSection = new CPA_SectionObject
|
||||
(
|
||||
m_pri_fn_csGetSourceReferencedSectionName(),
|
||||
C_szEffectPath,
|
||||
m_s_fn_vCallBackSaveSource,
|
||||
this
|
||||
);
|
||||
|
||||
ERROR_ASSERT( m_pri_p_clSourceSection != NULL );
|
||||
*/
|
||||
|
||||
if ( !_bIsLoaded ) //object find in a script file but not loaded in link table
|
||||
{
|
||||
fn_vUpdateData(NULL);
|
||||
m_pri_hGenerator = NULL;
|
||||
//m_pri_p_stSource = NULL;
|
||||
|
||||
SetExistingSection( TRUE );
|
||||
//m_pri_p_clSourceSection->SetExistingSection( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _hGenerator == NULL )
|
||||
{
|
||||
SetExistingSection( FALSE );
|
||||
//m_pri_p_clSourceSection->SetExistingSection( FALSE );
|
||||
|
||||
// for a new generator, initializes all the values
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating a new generator",
|
||||
"CPA_PartGen_Generator::CPA_PartGen_Generator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"the engine object generator is not allocated"
|
||||
);
|
||||
|
||||
_hGenerator= fn_hParticleGeneratorAllocation();
|
||||
ERROR_ASSERT( _hGenerator != NULL );
|
||||
fn_vUpdateData( (void*)_hGenerator );
|
||||
m_pri_hGenerator = _hGenerator;
|
||||
m_pub_fn_vSetEnvActiveWater( TRUE );
|
||||
m_pub_fn_vSetEnvActiveAir( TRUE );
|
||||
m_pub_fn_vSetLinkToEnv( FALSE );
|
||||
|
||||
/*
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating a new generator",
|
||||
"CPA_PartGen_Generator::CPA_PartGen_Generator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"the engine object source is not allocated"
|
||||
);
|
||||
PRT_fn_vCreateParticlesSource( &m_pri_p_stSource );
|
||||
ERROR_ASSERT( m_pri_p_stSource != NULL );
|
||||
fn_vPrtGenSetSrc( m_pri_hGenerator, m_pri_p_stSource );
|
||||
|
||||
m_pub_fn_vSetGenerationMode( (short)PRT_C_ucNoGeneration );
|
||||
m_pub_fn_vSetNbGenerateMode( (short)PRT_C_ucConstantNb );
|
||||
m_pub_fn_vSetGeometryMode( (short)PRT_C_ucPoint);
|
||||
m_pub_fn_vSetLinkMode( (short)PRT_C_ucRotationLink);
|
||||
m_pub_fn_vSetSpeed( (double)0 );
|
||||
m_pub_fn_vSetSpeedRange( (double)0 );
|
||||
*/
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetExistingSection( TRUE );
|
||||
//m_pri_p_clSourceSection->SetExistingSection( TRUE );
|
||||
|
||||
fn_vUpdateData( (void*)_hGenerator );
|
||||
m_pri_hGenerator = _hGenerator;
|
||||
//m_pri_p_stSource = fn_p_stPrtGenGetSrc(m_pri_hGenerator);
|
||||
|
||||
CPA_PartGen_Environment *p_clEnv = m_pub_fn_p_clGetEnv();
|
||||
p_clEnv->m_pub_fn_vSetGenerator( this );
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
}
|
||||
SetAvailable( _bIsLoaded );
|
||||
}
|
||||
|
||||
CPA_PartGen_Generator::~CPA_PartGen_Generator()
|
||||
{
|
||||
fn_vNotifyUnSave();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// Virtual functions
|
||||
long CPA_PartGen_Generator::GetDataType( void )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
void* CPA_PartGen_Generator::GetData( void )
|
||||
{
|
||||
return (void*) m_pri_hGenerator;
|
||||
}
|
||||
|
||||
CString CPA_PartGen_Generator::fn_csComputeReferencedSectionName(const CString _csNewName)
|
||||
{
|
||||
CString csReturnedName = "Generators.prt^";
|
||||
csReturnedName += C_SectionParticleGenerator;
|
||||
csReturnedName += ":";
|
||||
return( csReturnedName + _csNewName );
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::fn_vNotifySave( void )
|
||||
{
|
||||
CPA_SaveObject::fn_vNotifySave();
|
||||
//m_pri_p_clSourceSection->fn_vWriteSection();
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::fn_vNotifyUnSave( void )
|
||||
{
|
||||
CPA_SaveObject::fn_vNotifyUnSave();
|
||||
//m_pri_p_clSourceSection->fn_vDeleteSection();
|
||||
}
|
||||
|
||||
//**************************************************
|
||||
// Load if necessary
|
||||
BOOL CPA_PartGen_Generator::m_pub_fn_vLoadIfUnloaded()
|
||||
{
|
||||
if ( !fn_bIsAvailable() )
|
||||
{
|
||||
CString csSectionName = GetReferencedSectionName();
|
||||
|
||||
SCR_tdst_Cxt_Values *p_stValues;
|
||||
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(csSectionName), SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
tdxHandleToParticleGenerator hGenerator = (tdxHandleToParticleGenerator)p_stValues->a_ulValues[0];
|
||||
fn_vUpdateData( (void*)hGenerator );
|
||||
m_pri_hGenerator = hGenerator;
|
||||
//m_pri_p_stSource = fn_p_stPrtGenGetSrc(m_pri_hGenerator);
|
||||
SetAvailable(TRUE);
|
||||
m_pri_fn_vFillDataList();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
----------------------------------------------------------------------------------------
|
||||
Description : set engine data
|
||||
_hGenerator -> engine generator
|
||||
----------------------------------------------------------------------------------------
|
||||
*/
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetGenerator( tdxHandleToParticleGenerator _hGenerator)
|
||||
{
|
||||
fn_vUpdateData( (void*) _hGenerator );
|
||||
m_pri_hGenerator = _hGenerator;
|
||||
SetAvailable( TRUE );
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// returns a pointer on the associated ParticleSource
|
||||
CPA_PartGen_Source* CPA_PartGen_Generator::m_pub_fn_p_clGetSource()
|
||||
{
|
||||
PRT_tdstParticlesSource *p_stPrtSrc;
|
||||
|
||||
if( m_pri_hGenerator == NULL )
|
||||
return NULL;
|
||||
|
||||
if( (p_stPrtSrc = fn_p_stPrtGenGetSrc( m_pri_hGenerator )) == NULL )
|
||||
return NULL;
|
||||
|
||||
return g_pclInterface->m_pub_fn_p_clFindSourceWithEngine( p_stPrtSrc );
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************
|
||||
// returns a pointer on the system associated
|
||||
CPA_PartGen_System* CPA_PartGen_Generator::m_pub_fn_p_clGetSystem()
|
||||
{
|
||||
PRT_tdstParticlesSystem *p_stSystem;
|
||||
|
||||
if( m_pri_hGenerator == NULL )
|
||||
return NULL;
|
||||
|
||||
p_stSystem = fn_p_stPrtGenGetPrtSys( m_pri_hGenerator );
|
||||
if( p_stSystem == NULL )
|
||||
return NULL;
|
||||
|
||||
return g_pclInterface->m_pub_fn_p_clFindSystemWithEngine( p_stSystem );
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// returns a pointer on the environment associated
|
||||
CPA_PartGen_Environment* CPA_PartGen_Generator::m_pub_fn_p_clGetEnv()
|
||||
{
|
||||
PRT_tdstParticlesEnvironment *p_stEnv;
|
||||
|
||||
if( m_pri_hGenerator == NULL )
|
||||
return NULL;
|
||||
|
||||
p_stEnv = fn_p_stPrtGenGetPrtEnv( m_pri_hGenerator );
|
||||
if( p_stEnv == NULL )
|
||||
return NULL;
|
||||
|
||||
return g_pclInterface->m_pub_fn_p_clFindEnvWithEngine( p_stEnv );
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// returns a pointer on the linked generator associated
|
||||
CPA_PartGen_Generator *CPA_PartGen_Generator::m_pub_fn_p_oGetLinkedPrtGen()
|
||||
{
|
||||
tdxHandleToParticleGenerator hPrtGen;
|
||||
|
||||
if( m_pri_hGenerator == NULL )
|
||||
return NULL;
|
||||
|
||||
hPrtGen = fn_hPrtGenGetLinkedGen( m_pri_hGenerator );
|
||||
if( hPrtGen == NULL )
|
||||
return NULL;
|
||||
|
||||
return g_pclInterface->m_pub_fn_p_clFindPrtGenWithEngine( hPrtGen );
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Associated source, System and Environment
|
||||
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetSource( CPA_PartGen_Source* _p_oPrtSrc )
|
||||
{
|
||||
if( _p_oPrtSrc != NULL )
|
||||
fn_vPrtGenSetSrc( m_pri_hGenerator, _p_oPrtSrc->m_pub_fn_p_stGetSource() );
|
||||
else
|
||||
fn_vPrtGenSetSrc( m_pri_hGenerator, NULL );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetSystem( CPA_PartGen_System* _p_clSystem )
|
||||
{
|
||||
if( _p_clSystem != NULL )
|
||||
fn_vPrtGenSetPrtSys( m_pri_hGenerator, _p_clSystem->m_pub_fn_p_stGetSystem() );
|
||||
else
|
||||
fn_vPrtGenSetPrtSys( m_pri_hGenerator, NULL );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetEnv( CPA_PartGen_Environment* _p_clEnv )
|
||||
{
|
||||
if( _p_clEnv != NULL )
|
||||
{
|
||||
fn_vPrtGenSetPrtEnv( m_pri_hGenerator, _p_clEnv->m_pub_fn_p_stGetEnv() );
|
||||
m_pub_fn_vSetGenInEnv();
|
||||
}
|
||||
else
|
||||
fn_vPrtGenSetPrtEnv( m_pri_hGenerator, NULL );
|
||||
|
||||
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetGenInEnv()
|
||||
{
|
||||
CPA_PartGen_Environment *p_clEnv = m_pub_fn_p_clGetEnv();
|
||||
p_clEnv->m_pub_fn_vSetGenerator( this );
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Link to environment
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetLinkToEnv( BOOL _bFlag )
|
||||
{
|
||||
fn_vPrtGenSetLinkValue( m_pri_hGenerator, (unsigned char)_bFlag );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
BOOL CPA_PartGen_Generator::m_pub_fn_bGetLinkToEnv()
|
||||
{
|
||||
return (BOOL)fn_ucPrtGenGetLinkValue( m_pri_hGenerator );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Environment Mask
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetEnvActiveWater( BOOL _bFlag )
|
||||
{
|
||||
long lMask = fn_lPrtGenGetEnvironmentMask( m_pri_hGenerator );
|
||||
lMask = ( _bFlag ? (lMask | C_lEnvironmentWater) : (lMask & (C_lAllEnvironments - C_lEnvironmentWater)) );
|
||||
fn_vPrtGenSetEnvironmentMask( m_pri_hGenerator, lMask );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::m_pub_fn_vSetEnvActiveAir( BOOL _bFlag )
|
||||
{
|
||||
long lMask = fn_lPrtGenGetEnvironmentMask( m_pri_hGenerator );
|
||||
lMask = ( _bFlag ? (lMask | C_lEnvironmentAir) : (lMask & (C_lAllEnvironments - C_lEnvironmentAir)) );
|
||||
fn_vPrtGenSetEnvironmentMask( m_pri_hGenerator, lMask );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
|
||||
long CPA_PartGen_Generator::m_pub_fn_lGetEnvironmentMask()
|
||||
{
|
||||
return fn_lPrtGenGetEnvironmentMask( m_pri_hGenerator );
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// CallBack and function for save
|
||||
void CPA_PartGen_Generator::m_s_fn_vCallBackSaveGenerator
|
||||
(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction
|
||||
)
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving a generator",
|
||||
"CPA_PartGen_Generator::m_s_fn_vCallBackSaveGenerator",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"trying to save a NULL generator"
|
||||
);
|
||||
|
||||
CPA_PartGen_Generator *p_clGen = (CPA_PartGen_Generator*)_p_vData;
|
||||
ERROR_ASSERT( p_clGen != NULL );
|
||||
CString csHeaderName = C_SectionParticleGenerator;
|
||||
|
||||
switch( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_AddOrModifySection:
|
||||
case SCR_EA_Ntfy_AddOrRebuildSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
case SCR_EA_Ntfy_ModifySection:
|
||||
|
||||
csHeaderName += ":";
|
||||
csHeaderName += p_clGen->GetName();
|
||||
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, M_MAKECHAR(csHeaderName), SCR_CC_C_Cfg_EOL );
|
||||
p_clGen->m_pri_fn_vSaveGenerator( _p_stFile );
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL );
|
||||
|
||||
p_clGen->fn_vSectionSaved();
|
||||
break;
|
||||
|
||||
case SCR_EA_Ntfy_DeleteIfExists:
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_clGen->fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CPA_PartGen_Generator::m_pri_fn_vSaveGenerator( SCR_tdst_File_Description *_p_stFile )
|
||||
{
|
||||
// associated source
|
||||
CPA_PartGen_Source *p_oPrtSrc = m_pub_fn_p_clGetSource();
|
||||
if( p_oPrtSrc != NULL )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLoadParticleSource, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR( p_oPrtSrc->GetReferencedSectionName() ) );
|
||||
}
|
||||
|
||||
// associated system
|
||||
CPA_PartGen_System *p_clSys = m_pub_fn_p_clGetSystem();
|
||||
if( p_clSys != NULL )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLoadParticleSystem, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR( p_clSys->GetReferencedSectionName() ) );
|
||||
}
|
||||
|
||||
// associated environment
|
||||
CPA_PartGen_Environment *p_clEnv = m_pub_fn_p_clGetEnv();
|
||||
if( p_clEnv != NULL )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLoadParticleEnvironment, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR( p_clEnv->GetReferencedSectionName() ) );
|
||||
}
|
||||
|
||||
// linked to environment
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLinkedToEnvironment, SCR_CC_C_Cfg_NoChar );
|
||||
if( m_pub_fn_bGetLinkToEnv() )
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, C_szLinkedToEnvironment );
|
||||
else
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, C_szNotLinkedToEnvironment );
|
||||
|
||||
// environment mask
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenEnvironmentMask, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%d", m_pub_fn_lGetEnvironmentMask() );
|
||||
|
||||
// linked generator data
|
||||
CPA_PartGen_Generator *p_oPrtGen = m_pub_fn_p_oGetLinkedPrtGen();
|
||||
if (p_oPrtGen != NULL)
|
||||
{
|
||||
// linked generator mask
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLinkedPrtGenMask, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%d", fn_lPrtGenGetEnvironmentMask( m_pri_hGenerator ) );
|
||||
|
||||
// linked generator reference
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtGenLinkedPrtGen, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR( p_oPrtGen->GetReferencedSectionName() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void CPA_PartGen_Generator::m_pri_fn_vFillDataList()
|
||||
{
|
||||
m_pri_fn_vFillGeneratorDataList();
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Generator::m_pri_fn_vFillGeneratorDataList()
|
||||
{
|
||||
CTL_Editor_Data *p_clData = NULL;
|
||||
CTL_Editor_EnumDescriptor *p_clEnumDescriptor = NULL;
|
||||
CTL_Editor_MaskDescriptor *p_clMaskDescriptor = NULL;
|
||||
|
||||
//*** Associated Source **************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Generator_Source" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Source" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->p_stPrtSrc) );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteGeneratorSource );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayAll );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** Associated System **************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Generator_System" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "System" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->p_stPrtSys) );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteGeneratorSystem );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayAll );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** Associated environment *********************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Generator_Env" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Environment" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->p_stPrtEnv) );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteGeneratorEnvironment );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayAll );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** Environment Mask ************************
|
||||
p_clMaskDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetMaskDescriptorByName( "Generator_Mask_Env" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddMaskedData( p_clMaskDescriptor, "Environment Mask" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->lEnvironmentMask) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** Link To Environment ************************
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddBooleanData( "Link To Environment" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->ucLinkedToEnvironment) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** Linked generator mask ************************
|
||||
p_clMaskDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetMaskDescriptorByName( "Generator_Mask_LinkedGen" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddMaskedData( p_clMaskDescriptor, "Linked Generator Mask" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->ulLinkedPrtGenMask) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
|
||||
//*** linked generator **************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Generator_LinkedGenerator" );
|
||||
p_clData = m_pub_clGeneratorDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Linked Generator" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_hGenerator->p_stLinkedPrtGen) );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteGeneratorLinkedGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedGenerator" );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayAll );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedGenerator );
|
||||
}
|
||||
|
||||
CPA_PartGen_MyDocument * CPA_PartGen_Generator::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_pub_fn_p_clGetDocument();
|
||||
}
|
805
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OSrc.cpp
Normal file
805
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OSrc.cpp
Normal file
@@ -0,0 +1,805 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : TPG_OSrc.cpp
|
||||
|
||||
Author : vincent lhullier Date :20/03/98
|
||||
|
||||
Description : implementation of editor ParticleSource object class
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "TPG_OSys.hpp"
|
||||
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_Strg.hpp"
|
||||
#include "TPG_ClBk.hpp"
|
||||
|
||||
#include "PRT.h"
|
||||
#include "GAM.h"
|
||||
#include "MTH.h"
|
||||
#include "ErO.h"
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// Constructor and Destructor
|
||||
//////////////////////////////////////
|
||||
CPA_PartGen_Source::CPA_PartGen_Source(CString _csName ) : CPA_SaveObject( g_pclInterface, g_C_csPartGenSourceName, E_ss_Responsible )
|
||||
{
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveSource );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
SetExistingSection( FALSE );
|
||||
|
||||
PRT_fn_vCreateParticlesSource( &m_pri_p_stPrtSrc );
|
||||
fn_vUpdateData( (void*) m_pri_p_stPrtSrc );
|
||||
|
||||
//m_pri_hGameMaterial = NULL;
|
||||
//m_pri_hSprite = NULL;
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
CPA_PartGen_Source::CPA_PartGen_Source(CString _csName, PRT_tdstParticlesSource* _p_stPrtSrc, BOOL _bIsLoaded ) : CPA_SaveObject( g_pclInterface, g_C_csPartGenSourceName, E_ss_Responsible )
|
||||
{
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveSource );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
SetExistingSection( TRUE );
|
||||
|
||||
SetAvailable( _bIsLoaded );
|
||||
|
||||
fn_vUpdateData( (void*) _p_stPrtSrc );
|
||||
m_pri_p_stPrtSrc = _p_stPrtSrc;
|
||||
|
||||
//m_pri_hGameMaterial = NULL;
|
||||
//m_pri_hSprite = NULL;
|
||||
|
||||
if( _bIsLoaded )
|
||||
{
|
||||
//m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
}
|
||||
|
||||
CPA_PartGen_Source::~CPA_PartGen_Source()
|
||||
{
|
||||
fn_vNotifyUnSave();
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetSource( PRT_tdstParticlesSource *_p_stPrtSrc )
|
||||
{
|
||||
fn_vUpdateData( (void*)_p_stPrtSrc );
|
||||
m_pri_p_stPrtSrc = _p_stPrtSrc;
|
||||
SetAvailable( TRUE );
|
||||
|
||||
//m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Virtual functions
|
||||
long CPA_PartGen_Source::GetDataType( void )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
void* CPA_PartGen_Source::GetData( void )
|
||||
{
|
||||
return (void*) m_pri_p_stPrtSrc;
|
||||
}
|
||||
|
||||
CString CPA_PartGen_Source::fn_csComputeReferencedSectionName(const CString _csNewName)
|
||||
{
|
||||
CString csResult = "generators.prt^";
|
||||
csResult += C_SectionParticleSource;
|
||||
csResult += ":";
|
||||
return( csResult + _csNewName );
|
||||
}
|
||||
|
||||
|
||||
//*************************************************
|
||||
// Load if necessary
|
||||
BOOL CPA_PartGen_Source::m_pub_fn_vLoadIfUnloaded()
|
||||
{
|
||||
if ( !fn_bIsAvailable() )
|
||||
{
|
||||
SCR_tdst_Cxt_Values *p_stValues;
|
||||
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(GetReferencedSectionName()), SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
m_pri_p_stPrtSrc = (PRT_tdstParticlesSource *) p_stValues->a_ulValues[0];
|
||||
fn_vUpdateData( (void*) m_pri_p_stPrtSrc );
|
||||
SetAvailable(TRUE);
|
||||
|
||||
//m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
///////////////////////////
|
||||
// Source via Generator
|
||||
///////////////////////////
|
||||
/*
|
||||
CString CPA_PartGen_Source::m_pri_fn_csGetSourceReferencedSectionName()
|
||||
{
|
||||
CString csResult = "Generators.prt^";
|
||||
csResult += C_SectionParticleSource;
|
||||
csResult += ":";
|
||||
csResult += GetName();
|
||||
return (csResult + "Source");
|
||||
}
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Generation Mode and parameters
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetGenerationMode( short _wIndex )
|
||||
{
|
||||
PRT_M_vSetGenerationModeParticlesSource( m_pri_p_stPrtSrc, (unsigned char)_wIndex );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetGenerationMode()
|
||||
{
|
||||
return (long) m_pri_p_stPrtSrc->ucGenerationMode;
|
||||
}
|
||||
|
||||
/*
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetGenerationProba( double _dValue )
|
||||
{
|
||||
PRT_M_vSetGenerationProbabilityParticlesSource( m_pri_p_stPrtSrc, MTH_M_xDoubleToReal(_dValue) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
*/
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetGenerationProba()
|
||||
{
|
||||
return MTH_M_xRealToDouble( m_pri_p_stPrtSrc->xGenerationProbability );
|
||||
}
|
||||
|
||||
/*
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetNbNoGeneration( long _lValue )
|
||||
{
|
||||
ACP_tdxIndex xNbGeneration = m_pri_p_stPrtSrc->xNbFramesTotal - m_pri_p_stPrtSrc->xNbFramesNoGeneration;
|
||||
PRT_M_vSetNbFramesCrenelParticlesSource( m_pri_p_stPrtSrc, (ACP_tdxIndex)_lValue, xNbGeneration );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
*/
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbNoGeneration()
|
||||
{
|
||||
return (long) m_pri_p_stPrtSrc->xNbFramesNoGeneration;
|
||||
}
|
||||
|
||||
/*
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetNbGeneration( long _lValue )
|
||||
{
|
||||
ACP_tdxIndex xNbNoGeneration = m_pri_p_stPrtSrc->xNbFramesNoGeneration;
|
||||
PRT_M_vSetNbFramesCrenelParticlesSource( m_pri_p_stPrtSrc, xNbNoGeneration, (ACP_tdxIndex)_lValue );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
*/
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbGeneration()
|
||||
{
|
||||
return (long)(m_pri_p_stPrtSrc->xNbFramesTotal - m_pri_p_stPrtSrc->xNbFramesNoGeneration);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// Nb Particles to Generate Mode and parameters
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetNbGenerateMode( short _wIndex )
|
||||
{
|
||||
PRT_M_vSetNbParticlesToGenerateModeParticlesSource( m_pri_p_stPrtSrc, (unsigned char)_wIndex );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbGenerateMode()
|
||||
{
|
||||
return (long) m_pri_p_stPrtSrc->ucNbParticlesToGenerateMode;
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetNbToGenerate( long _lValue )
|
||||
{
|
||||
PRT_M_vSetNbParticlesToGenerateParticlesSource( m_pri_p_stPrtSrc, (ACP_tdxIndex)_lValue );
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbToGenerate()
|
||||
{
|
||||
return (long)(m_pri_p_stPrtSrc->xNbParticlesToGenerate);
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetNbMax( long _lValue )
|
||||
{
|
||||
ACP_tdxIndex xMin = m_pri_p_stPrtSrc->xNbMin;
|
||||
PRT_M_vSetNbMinMaxParticlesSource( m_pri_p_stPrtSrc, xMin, (ACP_tdxIndex)_lValue );
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbMax()
|
||||
{
|
||||
return (long)(m_pri_p_stPrtSrc->xNbMax);
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetNbMin( long _lValue )
|
||||
{
|
||||
ACP_tdxIndex xMax = m_pri_p_stPrtSrc->xNbMax;
|
||||
PRT_M_vSetNbMinMaxParticlesSource( m_pri_p_stPrtSrc, (ACP_tdxIndex)_lValue, xMax );
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetNbMin()
|
||||
{
|
||||
return (long)(m_pri_p_stPrtSrc->xNbMin);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Geometry Mode and parameters
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetGeometryMode( short _wIndex )
|
||||
{
|
||||
PRT_M_vSetGeometryModeParticlesSource( m_pri_p_stPrtSrc, (unsigned char)_wIndex );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetGeometryMode()
|
||||
{
|
||||
return (long)m_pri_p_stPrtSrc->ucGeometryMode;
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetSrcPt1( double _dX, double _dY, double _dZ )
|
||||
{
|
||||
MTH3D_tdstVector stVector;
|
||||
MTH3D_M_vSetVectorElements( &stVector, MTH_M_xDoubleToReal(_dX), MTH_M_xDoubleToReal(_dY), MTH_M_xDoubleToReal(_dZ) );
|
||||
PRT_fn_vSetQuadParticlesSource
|
||||
(
|
||||
m_pri_p_stPrtSrc,
|
||||
&stVector,
|
||||
&(m_pri_p_stPrtSrc->stVertex2),
|
||||
&(m_pri_p_stPrtSrc->stVertex3)
|
||||
);
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt1X()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &((m_pri_p_stPrtSrc)->stVertex1 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt1Y()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &((m_pri_p_stPrtSrc)->stVertex1 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt1Z()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &((m_pri_p_stPrtSrc)->stVertex1 )) );
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetSrcPt2( double _dX, double _dY, double _dZ )
|
||||
{
|
||||
MTH3D_tdstVector stVector;
|
||||
MTH3D_M_vSetVectorElements( &stVector, MTH_M_xDoubleToReal(_dX), MTH_M_xDoubleToReal(_dY), MTH_M_xDoubleToReal(_dZ) );
|
||||
PRT_fn_vSetQuadParticlesSource
|
||||
(
|
||||
m_pri_p_stPrtSrc,
|
||||
&(m_pri_p_stPrtSrc->stVertex1),
|
||||
&stVector,
|
||||
&(m_pri_p_stPrtSrc->stVertex3)
|
||||
);
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt2X()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &((m_pri_p_stPrtSrc)->stVertex2 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt2Y()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &((m_pri_p_stPrtSrc)->stVertex2 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt2Z()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &((m_pri_p_stPrtSrc)->stVertex2 )) );
|
||||
}
|
||||
|
||||
/*void CPA_PartGen_Source::m_pub_fn_vSetSrcPt3( double _dX, double _dY, double _dZ )
|
||||
{
|
||||
MTH3D_tdstVector stVector;
|
||||
MTH3D_M_vSetVectorElements( &stVector, MTH_M_xDoubleToReal(_dX), MTH_M_xDoubleToReal(_dY), MTH_M_xDoubleToReal(_dZ) );
|
||||
PRT_fn_vSetQuadParticlesSource
|
||||
(
|
||||
m_pri_p_stPrtSrc,
|
||||
&(m_pri_p_stPrtSrc->stVertex1),
|
||||
&(m_pri_p_stPrtSrc->stVertex2),
|
||||
&stVector
|
||||
);
|
||||
fn_vNotifySave();
|
||||
}*/
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt3X()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetXofVector( &((m_pri_p_stPrtSrc)->stVertex3 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt3Y()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetYofVector( &((m_pri_p_stPrtSrc)->stVertex3 )) );
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSrcPt3Z()
|
||||
{
|
||||
return MTH_M_xRealToDouble( MTH3D_M_xGetZofVector( &((m_pri_p_stPrtSrc)->stVertex3 )) );
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Link Mode
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetLinkMode( short _wIndex )
|
||||
{
|
||||
PRT_M_vSetLinkModeParticlesSource( m_pri_p_stPrtSrc, (unsigned char)_wIndex );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetLinkMode()
|
||||
{
|
||||
return (long)m_pri_p_stPrtSrc->ucLinkMode;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Speed and Range
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetSpeed( double _dSpeed )
|
||||
{
|
||||
PRT_M_vSetSpeedParticlesSource( m_pri_p_stPrtSrc, MTH_M_xDoubleToReal(_dSpeed) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSpeed()
|
||||
{
|
||||
return MTH_M_xRealToDouble( m_pri_p_stPrtSrc->xSpeed );
|
||||
}
|
||||
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetSpeedRange( double _dSpeedRange )
|
||||
{
|
||||
PRT_M_vSetSpeedRangeParticlesSource( m_pri_p_stPrtSrc, MTH_M_xDoubleToReal(_dSpeedRange) );
|
||||
fn_vNotifySave();
|
||||
}
|
||||
|
||||
double CPA_PartGen_Source::m_pub_fn_dGetSpeedRange()
|
||||
{
|
||||
return MTH_M_xRealToDouble( m_pri_p_stPrtSrc->xSpeedRange );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Point, Segment and Sprite
|
||||
/*
|
||||
long CPA_PartGen_Source::m_pub_fn_lGetParticlesType()
|
||||
{
|
||||
return (long)m_pri_p_stSystem->xParticlesType;
|
||||
}
|
||||
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetObjectPoint( GMT_tdxHandleToGameMaterial _hGameMaterial )
|
||||
{
|
||||
PRT_fn_vCreatePointParticles( m_pri_p_stSystem, _hGameMaterial );
|
||||
}
|
||||
|
||||
GMT_tdxHandleToGameMaterial CPA_PartGen_Source::m_pub_fn_hGetPointGameMaterial()
|
||||
{
|
||||
return GEO_xGetGameMaterialOfElementPoints(m_pri_p_stSystem->hParticlesSystemObject,0);
|
||||
}
|
||||
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetObjectSegment( GMT_tdxHandleToGameMaterial _hGameMaterial )
|
||||
{
|
||||
PRT_fn_vCreateSegmentParticles( m_pri_p_stSystem, _hGameMaterial );
|
||||
//fn_vNotifySave();
|
||||
}
|
||||
|
||||
GMT_tdxHandleToGameMaterial CPA_PartGen_Source::m_pub_fn_hGetSegmentGameMaterial()
|
||||
{
|
||||
GMT_tdxHandleToGameMaterial hGameMaterial;
|
||||
GEO_xGetGameMaterialOfElementLines(m_pri_p_stSystem->hParticlesSystemObject,0, 0, &hGameMaterial);
|
||||
return hGameMaterial;
|
||||
}
|
||||
|
||||
void CPA_PartGen_Source::m_pub_fn_vSetObjectSprite( ACP_tdxHandleOfSprite _hSprite )
|
||||
{
|
||||
PRT_fn_vCreateSpriteParticles( m_pri_p_stSystem, _hSprite );
|
||||
//fn_vNotifySave();
|
||||
}
|
||||
|
||||
ACP_tdxHandleOfSprite CPA_PartGen_Source::m_pub_fn_hGetSprite()
|
||||
{
|
||||
ACP_tdxHandleOfSprite hSprite;
|
||||
GEO_vGetHandleOfIndexedSprite(m_pri_p_stSystem->hParticlesSystemObject, 0, 0, &hSprite );
|
||||
return hSprite;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
void CPA_PartGen_Source::m_pri_fn_vSetInternalParticle()
|
||||
{
|
||||
ACP_tdxIndex xType = m_pri_p_stSystem->xParticlesType;
|
||||
switch( xType )
|
||||
{
|
||||
case PRT_C_xPointParticles:
|
||||
m_pri_hGameMaterial = GEO_xGetGameMaterialOfElementPoints(m_pri_p_stSystem->hParticlesSystemObject,0);
|
||||
break;
|
||||
|
||||
case PRT_C_xSegmentParticles:
|
||||
GEO_xGetGameMaterialOfElementLines(m_pri_p_stSystem->hParticlesSystemObject,0, 0, &m_pri_hGameMaterial);
|
||||
break;
|
||||
|
||||
case PRT_C_xSpriteParticles:
|
||||
GEO_vGetHandleOfIndexedSprite(m_pri_p_stSystem->hParticlesSystemObject, 0, 0, &m_pri_hSprite );
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//****************************************************
|
||||
// Gets name of the associated object using link table
|
||||
/*CString CPA_PartGen_Source::m_pub_fn_csGetObjectName()
|
||||
{
|
||||
CString csObjectName = "";
|
||||
SCR_tdst_Link_Table *p_stLinkTable = NULL;
|
||||
SCR_tdst_Link_Value *p_stValue = NULL;
|
||||
unsigned long ulValue = 0;
|
||||
|
||||
long lIndex = m_pub_fn_lGetParticlesType();
|
||||
switch( lIndex )
|
||||
{
|
||||
case PRT_C_xPointParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetPointGameMaterial();
|
||||
break;
|
||||
|
||||
case PRT_C_xSegmentParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSegmentGameMaterial();
|
||||
break;
|
||||
|
||||
case PRT_C_xSpriteParticles:
|
||||
p_stLinkTable = GLI_p_stGetLinkTableOfSprite();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSprite();
|
||||
break;
|
||||
}
|
||||
|
||||
//*** finds the entry *****
|
||||
if( p_stLinkTable != NULL )
|
||||
p_stValue = SCR_fnp_st_Link_SearchValue( p_stLinkTable, ulValue );
|
||||
|
||||
//*** gets the name of the entry ******************************************************
|
||||
if( p_stValue != NULL && SCR_M_e_Link_GetState(p_stValue) == SCR_ELS_Link_Initialized )
|
||||
{
|
||||
csObjectName = SCR_M_p_sz_Link_GetKey(p_stValue);
|
||||
|
||||
char a_256cFileName[256];
|
||||
char a_256cActionName[256];
|
||||
char a_256cName[256];
|
||||
SCR_fn_v_RdL0_SplitSectionName((char *)LPCTSTR(csObjectName), a_256cFileName, a_256cActionName, a_256cName);
|
||||
|
||||
csObjectName = a_256cName;
|
||||
}
|
||||
|
||||
return csObjectName;
|
||||
}
|
||||
*/
|
||||
/////////////////////////////////////////////////
|
||||
// Nb particles
|
||||
/*long CPA_PartGen_Source::m_pub_fn_lGetNbParticles()
|
||||
{
|
||||
return (long)m_pri_p_stSystem->xNbParticles;
|
||||
}
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// CallBack and Function for save
|
||||
void CPA_PartGen_Source::m_s_fn_vCallBackSaveSource( SCR_tdst_File_Description *_p_stFile, char *_p_szSectionName, void *_p_vData, SCR_tde_Ntfy_Action _eAction )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving a generator",
|
||||
"CPA_PartGen_Source::m_s_fn_vCallBackSaveSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"trying to save a NULL system"
|
||||
);
|
||||
|
||||
CPA_PartGen_Source *p_oPrtSrc = (CPA_PartGen_Source*) _p_vData;
|
||||
CString csHeaderName = C_SectionParticleSource;
|
||||
|
||||
switch( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_AddOrModifySection:
|
||||
case SCR_EA_Ntfy_AddOrRebuildSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
case SCR_EA_Ntfy_ModifySection:
|
||||
|
||||
csHeaderName += ":";
|
||||
csHeaderName += p_oPrtSrc->GetName();
|
||||
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, M_MAKECHAR(csHeaderName), SCR_CC_C_Cfg_EOL );
|
||||
p_oPrtSrc->m_pri_fn_vSaveSource( _p_stFile );
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL );
|
||||
|
||||
p_oPrtSrc->fn_vSectionSaved();
|
||||
break;
|
||||
|
||||
case SCR_EA_Ntfy_DeleteIfExists:
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_oPrtSrc->fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CPA_PartGen_Source::m_pri_fn_vSaveSource( SCR_tdst_File_Description *_p_stFile )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
long lIndex;
|
||||
CTL_Editor_EnumElement *p_clEnumElement;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
// generation mode and its optional parameters
|
||||
lIndex = m_pub_fn_lGetGenerationMode();
|
||||
p_clEnumElement = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_GenerationMode" )->m_fn_pclGetElementFromEnumIndex( lIndex );
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcGenerationMode, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(p_clEnumElement->m_pub_fn_csGetAdditionalString()) );
|
||||
switch( lIndex )
|
||||
{
|
||||
case PRT_C_ucProbabilistGeneration:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcGenerationProbability, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%.3f", m_pub_fn_dGetGenerationProba() );
|
||||
break;
|
||||
case PRT_C_ucCrenelGeneration:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcCrenelGeneration, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 3, "%d,%d", m_pub_fn_lGetNbNoGeneration(), m_pub_fn_lGetNbGeneration() );
|
||||
break;
|
||||
}
|
||||
|
||||
// nb particles to generate mode
|
||||
lIndex = m_pub_fn_lGetNbGenerateMode();
|
||||
p_clEnumElement = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_NbParticlesMode" )->m_fn_pclGetElementFromEnumIndex( lIndex );
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcNbParticlesToGenerateMode, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(p_clEnumElement->m_pub_fn_csGetAdditionalString()) );
|
||||
switch( lIndex )
|
||||
{
|
||||
case PRT_C_ucConstantNb:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcNbParticlesToGenerate, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%d", m_pub_fn_lGetNbToGenerate() );
|
||||
break;
|
||||
case PRT_C_ucProbabilistNb:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcNbMinMax, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 3, "%d,%d", m_pub_fn_lGetNbMin(), m_pub_fn_lGetNbMax() );
|
||||
break;
|
||||
}
|
||||
|
||||
// generation source geometry mode
|
||||
lIndex = m_pub_fn_lGetGeometryMode();
|
||||
p_clEnumElement = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_GeometryMode" )->m_fn_pclGetElementFromEnumIndex( lIndex );
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcGeometryMode, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(p_clEnumElement->m_pub_fn_csGetAdditionalString()) );
|
||||
switch( lIndex )
|
||||
{
|
||||
case PRT_C_ucQuad:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcQuad, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP
|
||||
(
|
||||
_p_stFile, SCR_EF_SvL0_Scanf, 10, "%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f,%.3f",
|
||||
m_pub_fn_dGetSrcPt1X(), m_pub_fn_dGetSrcPt1Y(), m_pub_fn_dGetSrcPt1Z(),
|
||||
m_pub_fn_dGetSrcPt2X(), m_pub_fn_dGetSrcPt2Y(), m_pub_fn_dGetSrcPt2Z(),
|
||||
m_pub_fn_dGetSrcPt3X(), m_pub_fn_dGetSrcPt3Y(), m_pub_fn_dGetSrcPt3Z()
|
||||
);
|
||||
break;
|
||||
case PRT_C_ucPoint:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcPoint, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP
|
||||
(
|
||||
_p_stFile, SCR_EF_SvL0_Scanf, 4, "%.3f,%.3f,%.3f",
|
||||
m_pub_fn_dGetSrcPt1X(), m_pub_fn_dGetSrcPt1Y(), m_pub_fn_dGetSrcPt1Z()
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
// link mode
|
||||
lIndex = m_pub_fn_lGetLinkMode();
|
||||
p_clEnumElement = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_LinkMode" )->m_fn_pclGetElementFromEnumIndex( lIndex );
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcLinkMode, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(p_clEnumElement->m_pub_fn_csGetAdditionalString()) );
|
||||
|
||||
// speed and speed range
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcSpeedAndRange, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 3, "%.3f,%.3f", m_pub_fn_dGetSpeed(), m_pub_fn_dGetSpeedRange() );
|
||||
|
||||
// life mode
|
||||
lIndex = (long) m_pri_p_stPrtSrc->ucLifeMode;
|
||||
switch (m_pri_p_stPrtSrc->ucLifeMode)
|
||||
{
|
||||
case PRT_C_ucNoLifeTime:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcNoLifeTime, SCR_CC_C_Cfg_EOL );
|
||||
break;
|
||||
case PRT_C_ucConstantLifeTime:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcConstantLifeTime, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%.3f", m_pri_p_stPrtSrc->xMinTime );
|
||||
break;
|
||||
case PRT_C_ucProbabilistLifeTime:
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, C_EntryPrtSrcProbabilistLifeTime, SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 3, "%.3f, %.3f", m_pri_p_stPrtSrc->xMinTime, m_pri_p_stPrtSrc->xMaxTime );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_Source::m_pri_fn_vFillDataList()
|
||||
{
|
||||
CTL_Editor_Data *p_clData = NULL;
|
||||
CTL_Editor_EnumDescriptor *p_clEnumDescriptor = NULL;
|
||||
|
||||
//*** Generation Mode ***********************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_GenerationMode" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Generation Mode" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*) &m_pri_p_stPrtSrc->ucGenerationMode );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Probability *****************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Probability" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xGenerationProbability) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucGenerationMode), "GenerationMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Nb Frames No generation ********************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Frames No Generation" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xNbFramesNoGeneration) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) m_pri_p_stPrtSrc, "PrtSrc" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) &(m_pri_p_stPrtSrc->ucGenerationMode), "GenerationMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Nb Frames generation *****************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Frames Generation" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xNbFramesTotal) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) &m_pri_p_stPrtSrc->ucGenerationMode, "GenerationMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) &m_pri_p_stPrtSrc->xNbFramesNoGeneration, "NbFramesNoGeneration" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) m_pri_p_stPrtSrc, "PrtSrc" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*) this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenRead( g_fn_vModificationReadSourceNbFramesGeneration );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteSourceNbFramesGeneration );
|
||||
|
||||
//*** Nb particles to generate mode ********************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_NbParticlesMode" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Nb Particles to Generate Mode" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->ucNbParticlesToGenerateMode) );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Constant ********************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Particles" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xNbParticlesToGenerate) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucNbParticlesToGenerateMode), "NbParticlesMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
//****** Probabilist *****************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Particles min" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xNbMin) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucNbParticlesToGenerateMode), "NbParticlesMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Particles max" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xNbMax) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucNbParticlesToGenerateMode), "NbParticlesMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//*** Geometry mode ************************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_GeometryMode" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Geometry Mode" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->ucGeometryMode) );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Point **********************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Point 1" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->stVertex1) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//****** Quad ***********************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Point 2" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->stVertex2) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucGeometryMode), "GeometryMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddVectorData( sizeof(MTH_tdxReal), "Point 3" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->stVertex3) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stPrtSrc->ucGeometryMode), "GeometryMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//*** Link Mode *********************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_LinkMode" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Link Mode" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->ucLinkMode) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//*** Speed and Range ****************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Speed" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xSpeed) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Speed Range" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->xSpeedRange) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//*** Life Mode
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "Source_LifeMode" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Life Mode" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stPrtSrc->ucLifeMode) );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
|
||||
//*** data for constant life time
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "LifeTime" );
|
||||
p_clData->m_fn_vSetMotorDataPtr ( (void*) &m_pri_p_stPrtSrc->xMinTime );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) &m_pri_p_stPrtSrc->ucLifeMode, "LifeMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
//*** data for probabilist life time
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Min Life Time" );
|
||||
p_clData->m_fn_vSetMotorDataPtr ( (void*) &m_pri_p_stPrtSrc->xMinTime );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) &m_pri_p_stPrtSrc->ucLifeMode, "LifeMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddDecimalData( sizeof(MTH_tdxReal), "Max Life Time" );
|
||||
p_clData->m_fn_vSetMotorDataPtr ( (void*) &m_pri_p_stPrtSrc->xMaxTime );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) &m_pri_p_stPrtSrc->ucLifeMode, "LifeMode" );
|
||||
p_clData->m_pub_fn_pclAddOwnerData ( (void*) this, "EditedSource" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( fn_vCBPrtSrcDataChanged );
|
||||
}
|
||||
|
||||
|
||||
CPA_PartGen_MyDocument * CPA_PartGen_Source::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_pub_fn_p_clGetDocument();
|
||||
}
|
397
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OSys.cpp
Normal file
397
Rayman_X/cpa/tempgrp/TPG/Src/TPG_OSys.cpp
Normal file
@@ -0,0 +1,397 @@
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "TPG_OSys.hpp"
|
||||
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_Strg.hpp"
|
||||
#include "TPG_ClBk.hpp"
|
||||
|
||||
#include "PRT.h"
|
||||
#include "GAM.h"
|
||||
#include "MTH.h"
|
||||
#include "ErO.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// Constructor and Destructor
|
||||
//////////////////////////////////////
|
||||
CPA_PartGen_System::CPA_PartGen_System(CString _csName, long _lNbParticles ) : CPA_SaveObject( g_pclInterface, g_C_csPartGenSystemName, E_ss_Responsible )
|
||||
{
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveSystem );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
SetExistingSection( FALSE );
|
||||
|
||||
PRT_tdstParticlesSystem* p_stSystem;
|
||||
PRT_fn_vCreateParticlesSystem( &p_stSystem, (ACP_tdxIndex)_lNbParticles );
|
||||
PRT_fn_vInitParticlesSystem( p_stSystem );
|
||||
fn_vUpdateData( (void*)p_stSystem );
|
||||
m_pri_p_stSystem = p_stSystem;
|
||||
|
||||
m_pri_hGameMaterial = NULL;
|
||||
m_pri_hSprite = NULL;
|
||||
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
CPA_PartGen_System::CPA_PartGen_System(CString _csName, PRT_tdstParticlesSystem* _p_stSystem, BOOL _bIsLoaded )
|
||||
: CPA_SaveObject( g_pclInterface, g_C_csPartGenSystemName, E_ss_Responsible )
|
||||
{
|
||||
SetSectionData( this );
|
||||
SetCallBackSave( m_s_fn_vCallBackSaveSystem );
|
||||
SetDataPath( C_szEffectPath );
|
||||
|
||||
if ( fn_eRename(_csName) != E_mc_None )
|
||||
SetDefaultValidName();
|
||||
|
||||
fn_vUpdateSectionName();
|
||||
SetExistingSection( TRUE );
|
||||
|
||||
SetAvailable( _bIsLoaded );
|
||||
|
||||
fn_vUpdateData( (void*)_p_stSystem );
|
||||
m_pri_p_stSystem = _p_stSystem;
|
||||
|
||||
m_pri_hGameMaterial = NULL;
|
||||
m_pri_hSprite = NULL;
|
||||
|
||||
if( _bIsLoaded )
|
||||
{
|
||||
m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
}
|
||||
|
||||
CPA_PartGen_System::~CPA_PartGen_System()
|
||||
{
|
||||
fn_vNotifyUnSave();
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_System::m_pub_fn_vSetSystem( PRT_tdstParticlesSystem *_p_stSystem )
|
||||
{
|
||||
fn_vUpdateData( (void*)_p_stSystem );
|
||||
m_pri_p_stSystem = _p_stSystem;
|
||||
SetAvailable( TRUE );
|
||||
|
||||
m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Virtual functions
|
||||
long CPA_PartGen_System::GetDataType( void )
|
||||
{
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
void* CPA_PartGen_System::GetData( void )
|
||||
{
|
||||
return (void*)m_pri_p_stSystem;
|
||||
}
|
||||
|
||||
CString CPA_PartGen_System::fn_csComputeReferencedSectionName(const CString _csNewName)
|
||||
{
|
||||
CString csResult = "Systems.prt^";
|
||||
csResult += C_SectionPrtSysDescription;
|
||||
csResult += ":";
|
||||
return( csResult + _csNewName );
|
||||
}
|
||||
|
||||
|
||||
//*************************************************
|
||||
// Load if necessary
|
||||
BOOL CPA_PartGen_System::m_pub_fn_vLoadIfUnloaded()
|
||||
{
|
||||
if ( !fn_bIsAvailable() )
|
||||
{
|
||||
CString csSectionName = GetReferencedSectionName();
|
||||
|
||||
SCR_tdst_Cxt_Values *p_stValues;
|
||||
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(csSectionName), SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
PRT_tdstParticlesSystem *p_stSys = (PRT_tdstParticlesSystem*)p_stValues->a_ulValues[0];
|
||||
fn_vUpdateData( (void*)p_stSys );
|
||||
m_pri_p_stSystem = p_stSys;
|
||||
SetAvailable(TRUE);
|
||||
|
||||
m_pri_fn_vSetInternalParticle();
|
||||
m_pri_fn_vFillDataList();
|
||||
return TRUE;
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Point, Segment and Sprite
|
||||
long CPA_PartGen_System::m_pub_fn_lGetParticlesType()
|
||||
{
|
||||
return (long)m_pri_p_stSystem->xParticlesType;
|
||||
}
|
||||
|
||||
void CPA_PartGen_System::m_pub_fn_vSetObjectPoint( GMT_tdxHandleToGameMaterial _hGameMaterial )
|
||||
{
|
||||
PRT_fn_vCreatePointParticles( m_pri_p_stSystem, _hGameMaterial );
|
||||
}
|
||||
|
||||
GMT_tdxHandleToGameMaterial CPA_PartGen_System::m_pub_fn_hGetPointGameMaterial()
|
||||
{
|
||||
return GEO_xGetGameMaterialOfElementPoints(m_pri_p_stSystem->hParticlesSystemObject,0);
|
||||
}
|
||||
|
||||
void CPA_PartGen_System::m_pub_fn_vSetObjectSegment( GMT_tdxHandleToGameMaterial _hGameMaterial )
|
||||
{
|
||||
PRT_fn_vCreateSegmentParticles( m_pri_p_stSystem, _hGameMaterial );
|
||||
}
|
||||
|
||||
GMT_tdxHandleToGameMaterial CPA_PartGen_System::m_pub_fn_hGetSegmentGameMaterial()
|
||||
{
|
||||
GMT_tdxHandleToGameMaterial hGameMaterial;
|
||||
GEO_xGetGameMaterialOfElementLines(m_pri_p_stSystem->hParticlesSystemObject,0, 0, &hGameMaterial);
|
||||
return hGameMaterial;
|
||||
}
|
||||
|
||||
void CPA_PartGen_System::m_pub_fn_vSetObjectSprite( ACP_tdxHandleOfSprite _hSprite )
|
||||
{
|
||||
PRT_fn_vCreateSpriteParticles( m_pri_p_stSystem, _hSprite );
|
||||
}
|
||||
|
||||
ACP_tdxHandleOfSprite CPA_PartGen_System::m_pub_fn_hGetSprite()
|
||||
{
|
||||
ACP_tdxHandleOfSprite hSprite;
|
||||
GEO_vGetHandleOfIndexedSprite(m_pri_p_stSystem->hParticlesSystemObject, 0, 0, &hSprite );
|
||||
return hSprite;
|
||||
}
|
||||
|
||||
void CPA_PartGen_System::m_pri_fn_vSetInternalParticle()
|
||||
{
|
||||
ACP_tdxIndex xType = m_pri_p_stSystem->xParticlesType;
|
||||
switch( xType )
|
||||
{
|
||||
case PRT_C_xPointParticles:
|
||||
m_pri_hGameMaterial = GEO_xGetGameMaterialOfElementPoints(m_pri_p_stSystem->hParticlesSystemObject,0);
|
||||
break;
|
||||
|
||||
case PRT_C_xSegmentParticles:
|
||||
GEO_xGetGameMaterialOfElementLines(m_pri_p_stSystem->hParticlesSystemObject,0, 0, &m_pri_hGameMaterial);
|
||||
break;
|
||||
|
||||
case PRT_C_xSpriteParticles:
|
||||
GEO_vGetHandleOfIndexedSprite(m_pri_p_stSystem->hParticlesSystemObject, 0, 0, &m_pri_hSprite );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//****************************************************
|
||||
// Gets name of the associated object using link table
|
||||
CString CPA_PartGen_System::m_pub_fn_csGetObjectName()
|
||||
{
|
||||
CString csObjectName = "";
|
||||
SCR_tdst_Link_Table *p_stLinkTable = NULL;
|
||||
SCR_tdst_Link_Value *p_stValue = NULL;
|
||||
unsigned long ulValue = 0;
|
||||
|
||||
long lIndex = m_pub_fn_lGetParticlesType();
|
||||
switch( lIndex )
|
||||
{
|
||||
case PRT_C_xPointParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetPointGameMaterial();
|
||||
break;
|
||||
|
||||
case PRT_C_xSegmentParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSegmentGameMaterial();
|
||||
break;
|
||||
|
||||
case PRT_C_xSpriteParticles:
|
||||
p_stLinkTable = GLI_p_stGetLinkTableOfSprite();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSprite();
|
||||
break;
|
||||
}
|
||||
|
||||
//*** finds the entry *****
|
||||
if( p_stLinkTable != NULL )
|
||||
p_stValue = SCR_fnp_st_Link_SearchValue( p_stLinkTable, ulValue );
|
||||
|
||||
//*** gets the name of the entry ******************************************************
|
||||
if( p_stValue != NULL && SCR_M_e_Link_GetState(p_stValue) == SCR_ELS_Link_Initialized )
|
||||
{
|
||||
csObjectName = SCR_M_p_sz_Link_GetKey(p_stValue);
|
||||
|
||||
char a_256cFileName[256];
|
||||
char a_256cActionName[256];
|
||||
char a_256cName[256];
|
||||
SCR_fn_v_RdL0_SplitSectionName((char *)LPCTSTR(csObjectName), a_256cFileName, a_256cActionName, a_256cName);
|
||||
|
||||
csObjectName = a_256cName;
|
||||
}
|
||||
return csObjectName;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// Nb particles
|
||||
long CPA_PartGen_System::m_pub_fn_lGetNbParticles()
|
||||
{
|
||||
return (long)m_pri_p_stSystem->xNbParticles;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// CallBack and Function for save
|
||||
void CPA_PartGen_System::m_s_fn_vCallBackSaveSystem
|
||||
(
|
||||
SCR_tdst_File_Description *_p_stFile,
|
||||
char *_p_szSectionName,
|
||||
void *_p_vData,
|
||||
SCR_tde_Ntfy_Action _eAction
|
||||
)
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving a generator",
|
||||
"CPA_PartGen_System::m_s_fn_vCallBackSaveSystem",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"trying to save a NULL system"
|
||||
);
|
||||
CPA_PartGen_System *p_clSys = (CPA_PartGen_System*)_p_vData;
|
||||
CString csHeaderName = C_SectionPrtSysDescription;
|
||||
|
||||
switch( _eAction )
|
||||
{
|
||||
case SCR_EA_Ntfy_AddSection:
|
||||
case SCR_EA_Ntfy_AddOrModifySection:
|
||||
case SCR_EA_Ntfy_AddOrRebuildSection:
|
||||
case SCR_EA_Ntfy_RebuildSection:
|
||||
case SCR_EA_Ntfy_ModifySection:
|
||||
|
||||
csHeaderName += ":";
|
||||
csHeaderName += p_clSys->GetName();
|
||||
|
||||
SCR_M_SvL0_SaveBeginSection( _p_stFile, M_MAKECHAR(csHeaderName), SCR_CC_C_Cfg_NoChar );
|
||||
SCR_fn_v_SvL0_SaveParameters_MP( _p_stFile, SCR_EF_SvL0_Scanf, 2, "%d", p_clSys->m_pub_fn_lGetNbParticles() );
|
||||
|
||||
p_clSys->m_pri_fn_vSaveSystem( _p_stFile );
|
||||
|
||||
SCR_M_SvL0_SaveEndSection( _p_stFile, SCR_CC_C_Cfg_EOL );
|
||||
|
||||
p_clSys->fn_vSectionSaved();
|
||||
break;
|
||||
|
||||
case SCR_EA_Ntfy_DeleteIfExists:
|
||||
case SCR_EA_Ntfy_DeleteSection:
|
||||
p_clSys->fn_vSectionDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CPA_PartGen_System::m_pri_fn_vSaveSystem( SCR_tdst_File_Description *_p_stFile )
|
||||
{
|
||||
SCR_tdst_Link_Value *p_stLinkValue = NULL;
|
||||
unsigned long ulValue = 0;
|
||||
SCR_tdst_Link_Table *p_stLinkTable = NULL;
|
||||
CString csEntryName = "";
|
||||
long lIndex = m_pub_fn_lGetParticlesType();
|
||||
switch( lIndex )
|
||||
{
|
||||
//*** Point particles *****
|
||||
case PRT_C_xPointParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetPointGameMaterial();
|
||||
csEntryName = C_EntryPrtSysCreatePoint;
|
||||
break;
|
||||
|
||||
//*** Segment particles *****
|
||||
case PRT_C_xSegmentParticles:
|
||||
p_stLinkTable = GMT_fn_p_stGetLinkTable();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSegmentGameMaterial();
|
||||
csEntryName = C_EntryPrtSysCreateSegment;
|
||||
break;
|
||||
|
||||
//*** Sprite particles *****
|
||||
case PRT_C_xSpriteParticles:
|
||||
p_stLinkTable = GLI_p_stGetLinkTableOfSprite();
|
||||
ulValue = (unsigned long)m_pub_fn_hGetSprite();
|
||||
csEntryName = C_EntryPrtSysCreateSprite;
|
||||
break;
|
||||
}
|
||||
|
||||
if( p_stLinkTable != NULL )
|
||||
{
|
||||
p_stLinkValue = SCR_fnp_st_Link_SearchValue( p_stLinkTable, ulValue );
|
||||
if ( p_stLinkValue != NULL )
|
||||
{
|
||||
SCR_M_SvL0_SaveEntry( _p_stFile, M_MAKECHAR(csEntryName), SCR_CC_C_Cfg_NoChar );
|
||||
|
||||
CString csKey = SCR_M_p_sz_Link_GetKey(p_stLinkValue);
|
||||
long lOffset = SCR_M_ul_Link_GetAdditionalLong(p_stLinkValue, 1);
|
||||
if ( lOffset > 0 )
|
||||
csKey = csKey.Right(csKey.GetLength() - lOffset);
|
||||
|
||||
SCR_fn_v_SvL0_SaveParameters_MP(_p_stFile, SCR_EF_SvL0_Scanf, 1, M_MAKECHAR(csKey));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CPA_PartGen_System::m_pri_fn_vFillDataList()
|
||||
{
|
||||
CTL_Editor_Data *p_clData = NULL;
|
||||
CTL_Editor_EnumDescriptor *p_clEnumDescriptor = NULL;
|
||||
|
||||
//*** Nb Particles *******************************
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddIntegerData( sizeof(ACP_tdxIndex), TPG_UNSIGNED, "Nb Particles" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stSystem->xNbParticles) );
|
||||
|
||||
//*** Objects Type **************************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "System_ObjectsType" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Particles Type" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&(m_pri_p_stSystem->xParticlesType) );
|
||||
p_clData->m_pub_fn_vSetDataChangedSpecialCallBackFunction( g_fn_vCallBackDataChangedSpecialDisplayGenerator );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSystem" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedSystem );
|
||||
|
||||
//*** Objects Game Material *****************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "System_ObjectsGameMaterials" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Game Material" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&m_pri_hGameMaterial );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stSystem->xParticlesType), "ObjectsType" );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteSystemObjects );
|
||||
//p_clData->m_pub_fn_vSetModificationFunctionWhenRead( g_fn_vModificationReadSystemGameMaterials );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSystem" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedSystem );
|
||||
p_clData->m_pub_fn_vSetDataMustBeRead_CallBack( g_fn_bCallBackMustBeReadWrittenSystemGameMaterial );
|
||||
p_clData->m_pub_fn_vSetDataMustBeWritten_CallBack( g_fn_bCallBackMustBeReadWrittenSystemGameMaterial );
|
||||
|
||||
//*** Objects Sprites ***********************
|
||||
p_clEnumDescriptor = m_pub_fn_p_clGetDocument()->m_pub_fn_p_clGetEnumDescriptorByName( "System_Sprites" );
|
||||
p_clData = m_pub_clDataList.m_fn_pclAddEnumData( p_clEnumDescriptor, "Sprites" );
|
||||
p_clData->m_fn_vSetMotorDataPtr( (void*)&m_pri_hSprite );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)&(m_pri_p_stSystem->xParticlesType), "ObjectsType" );
|
||||
p_clData->m_pub_fn_vSetModificationFunctionWhenWrite( g_fn_vModificationWriteSystemObjects );
|
||||
p_clData->m_pub_fn_pclAddOwnerData( (void*)this, "EditedSystem" );
|
||||
p_clData->m_pub_fn_vSetDataChangedCallBackFunction( g_fn_vCallBackDataChangedSystem );
|
||||
p_clData->m_pub_fn_vSetDataMustBeRead_CallBack( g_fn_bCallBackMustBeReadWrittenSystemSprite );
|
||||
p_clData->m_pub_fn_vSetDataMustBeWritten_CallBack( g_fn_bCallBackMustBeReadWrittenSystemSprite );
|
||||
}
|
||||
|
||||
|
||||
CPA_PartGen_MyDocument * CPA_PartGen_System::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_pub_fn_p_clGetDocument();
|
||||
}
|
40
Rayman_X/cpa/tempgrp/TPG/Src/TPG_Spri.cpp
Normal file
40
Rayman_X/cpa/tempgrp/TPG/Src/TPG_Spri.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "TPG_Spri.hpp"
|
||||
|
||||
#include "SCR.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
//***********************************************************************
|
||||
TPG_Sprite::TPG_Sprite( CString _csName, ACP_tdxHandleOfSprite _hSprite )
|
||||
{
|
||||
m_pri_csName = _csName;
|
||||
m_pri_hSprite = _hSprite;
|
||||
}
|
||||
|
||||
TPG_Sprite::~TPG_Sprite()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ACP_tdxHandleOfSprite TPG_Sprite::m_pub_fn_hGetSprite()
|
||||
{
|
||||
return m_pri_hSprite;
|
||||
}
|
||||
|
||||
|
||||
void TPG_Sprite::m_pub_fn_vLoadSprite()
|
||||
{
|
||||
CString csSectionName = "Sprites.prt^Sprite:" + m_pri_csName;
|
||||
|
||||
SCR_tdst_Cxt_Values *p_stValues;
|
||||
p_stValues = SCR_fnp_st_RdL0_AnalyseSection((char *)LPCTSTR(csSectionName), SCR_CDF_uw_Anl_Normal);
|
||||
|
||||
m_pri_hSprite = (ACP_tdxHandleOfSprite)SCR_M_ul_RdL0_ExtractLongValue( p_stValues, 0 );
|
||||
}
|
691
Rayman_X/cpa/tempgrp/TPG/Src/TPG_View.cpp
Normal file
691
Rayman_X/cpa/tempgrp/TPG/Src/TPG_View.cpp
Normal file
@@ -0,0 +1,691 @@
|
||||
// TPG_View.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
#include "TUT.h"
|
||||
|
||||
#include "TPG_View.hpp"
|
||||
|
||||
#include "TPGMyDoc.hpp"
|
||||
#include "TPG_OGen.hpp"
|
||||
#include "TPG_OEnv.hpp"
|
||||
#include "TPG_OSys.hpp"
|
||||
#include "_Minterf.hpp"
|
||||
#include "TPG_Strg.hpp"
|
||||
|
||||
#include "ErO.h"
|
||||
#include "SCR.h"
|
||||
#include "WAW.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TPG_View
|
||||
|
||||
IMPLEMENT_DYNCREATE(TPG_View, CTL_Editor_BaseFormView)
|
||||
|
||||
TPG_View::TPG_View() : CTL_Editor_BaseFormView(TPG_View::IDD)
|
||||
{
|
||||
//{{AFX_DATA_INIT(TPG_View)
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
TPG_View::~TPG_View()
|
||||
{
|
||||
}
|
||||
|
||||
void TPG_View::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CTL_Editor_BaseFormView::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(TPG_View)
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(TPG_View, CTL_Editor_BaseFormView)
|
||||
//{{AFX_MSG_MAP(TPG_View)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DELETE, OnButtonDelete)
|
||||
ON_BN_CLICKED(IDC_BUTTON_NEW, OnButtonNew)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DELETEENV, OnButtonDeleteenv)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DELETESYSTEM, OnButtonDeletesystem)
|
||||
ON_BN_CLICKED(IDC_BUTTON_NEWENV, OnButtonNewenv)
|
||||
ON_BN_CLICKED(IDC_BUTTON_NEWSYSTEM, OnButtonNewsystem)
|
||||
ON_BN_CLICKED(IDC_BUTTON_RENAMEENV, OnButtonRenameenv)
|
||||
ON_BN_CLICKED(IDC_BUTTON_RENAMESYSTEM, OnButtonRenamesystem)
|
||||
ON_WM_LBUTTONDBLCLK()
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TPG_View diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void TPG_View::AssertValid() const
|
||||
{
|
||||
CTL_Editor_BaseFormView::AssertValid();
|
||||
}
|
||||
|
||||
void TPG_View::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CTL_Editor_BaseFormView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Functions to get the document associated to the View
|
||||
|
||||
CPA_PartGen_MyDocument* TPG_View::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return g_pclInterface->m_pub_fn_p_clGetDocument();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TPG_View message handlers
|
||||
|
||||
|
||||
//////////////////////////////
|
||||
// Generator control
|
||||
|
||||
// Creation Control
|
||||
void TPG_View::OnButtonNew()
|
||||
{
|
||||
CPA_Dialog_GeneratorNewName Dialog( this );
|
||||
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating a new generator",
|
||||
"TPG_View::OnButtonNew",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"new generator is not allocated"
|
||||
);
|
||||
|
||||
CPA_PartGen_Generator *p_clGenerator = new CPA_PartGen_Generator( Dialog.m_csNewGeneratorName );
|
||||
ERROR_ASSERT( p_clGenerator != NULL );
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
}
|
||||
}
|
||||
|
||||
void TPG_View::OnButtonDelete()
|
||||
{
|
||||
CString csText = "You are going to delete the generator '";
|
||||
csText += m_pub_fn_p_clGetDocument()->m_pub_p_clCurrentGenerator->GetName();
|
||||
csText += "'\nDo you want to continue ?";
|
||||
CPA_Dialog_Warning Dialog( this, csText );
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vDeleteGenerator();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////:
|
||||
// Environment controls
|
||||
|
||||
void TPG_View::OnButtonNewenv()
|
||||
{
|
||||
CPA_Dialog_GeneratorNewName Dialog( this );
|
||||
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
CPA_PartGen_Environment *p_clEnv = new CPA_PartGen_Environment( Dialog.m_csNewGeneratorName);
|
||||
ERROR_ASSERT( p_clEnv != NULL );
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
|
||||
/*CComboBox *p_clCombo = (CComboBox*)GetDlgItem( IDC_COMBO_ENV );
|
||||
short wIndex = p_clCombo->AddString( p_clEnv->GetName() );
|
||||
p_clCombo->SetItemDataPtr( wIndex, (void*)p_clEnv );*/
|
||||
}
|
||||
}
|
||||
|
||||
void TPG_View::OnButtonDeleteenv()
|
||||
{
|
||||
CString csText = "You are going to delete the environment '";
|
||||
csText += m_pub_fn_p_clGetDocument()->m_pub_p_clCurrentEnv->GetName();
|
||||
csText += "'\nDo you want to continue ?";
|
||||
CPA_Dialog_Warning Dialog( this, csText );
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vDeleteEnv();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void Parcours( WAW_DataList &List )
|
||||
{
|
||||
POSITION pos = List.GetHeadPosition();
|
||||
while( pos != NULL )
|
||||
{
|
||||
WAW_Data * pclData = List.GetNext( pos );
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void TPG_View::OnButtonRenameenv()
|
||||
{
|
||||
//*** Test de WAW
|
||||
/*
|
||||
WAW_DataList List( "TPG Test" );
|
||||
List.m_pub_fn_vGetVisible();
|
||||
Parcours( List );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
// System Controls
|
||||
|
||||
void TPG_View::OnButtonNewsystem()
|
||||
{
|
||||
CPA_Dialog_SystemNewName Dialog( this );
|
||||
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
CPA_PartGen_System *p_clSystem = new CPA_PartGen_System( Dialog.m_csNewSystemName, Dialog.m_lNbParticles);
|
||||
ERROR_ASSERT( p_clSystem != NULL );
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
|
||||
/*CComboBox *p_clCombo = (CComboBox*)GetDlgItem( IDC_COMBO_SYSTEM );
|
||||
short wIndex = p_clCombo->AddString( p_clSystem->GetName() );
|
||||
p_clCombo->SetItemDataPtr( wIndex, (void*)p_clSystem );*/
|
||||
}
|
||||
}
|
||||
|
||||
void TPG_View::OnButtonDeletesystem()
|
||||
{
|
||||
CString csText = "You are going to delete the system '";
|
||||
csText += m_pub_fn_p_clGetDocument()->m_pub_p_clCurrentSystem->GetName();
|
||||
csText += "'\nDo you want to continue ?";
|
||||
CPA_Dialog_Warning Dialog( this, csText );
|
||||
if ( Dialog.DoModal() == IDOK )
|
||||
{
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vDeleteSystem();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->fn_vUpdateSelection(E_lrm_ReinitList);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void TPG_g_fn_TestForWAW( WAW_tdeMessage _eMessage, void * _pvData )
|
||||
{
|
||||
int i = 0;
|
||||
switch( _eMessage )
|
||||
{
|
||||
case WAW_eDeletedNode :
|
||||
i = i;
|
||||
break;
|
||||
|
||||
case WAW_eUpdateData :
|
||||
i = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void TPG_View::OnButtonRenamesystem()
|
||||
{
|
||||
//*** Test de WAW
|
||||
/*
|
||||
WAW_hUserInfo hInfo = WAW_fn_hUserRegister( "TPG Test", TPG_g_fn_TestForWAW );
|
||||
WAW_Data * pclData = NULL;
|
||||
pclData = WAW_fn_pclAddNode( hInfo, NULL, "System" );
|
||||
pclData = WAW_fn_pclAddData( hInfo, pclData, "Bidon", "1.500" );
|
||||
WAW_fn_pclAddData( hInfo, pclData, "Truc", "0", TPG_g_fn_TestForWAW );
|
||||
WAW_fn_pclAddData( hInfo, pclData, "Machin", "Hello" );
|
||||
WAW_fn_pclAddData( hInfo, NULL, "Truc", "0" );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// Fuctions to show and update editors
|
||||
///////////////////////////////////////
|
||||
void TPG_View::OnInitialUpdate()
|
||||
{
|
||||
CTL_Editor_BaseFormView::OnInitialUpdate();
|
||||
|
||||
g_pclInterface->m_pub_p_clView = this;
|
||||
|
||||
//*** register controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
TUT_M_vRegisterControl(m_hWnd, "TPG_MainWindow",TUT_e_Window);
|
||||
|
||||
|
||||
//****** register buttons
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_NEW, "TPG_CreateNewGenerator",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_RENAME, "TPG_CopyEditedGenerator",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_DELETE, "TPG_DeleteEditedGenerator",TUT_e_Button);
|
||||
|
||||
//ANNECY VL PRT 20/03/98{
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_NEWPRTSRC, "TPG_CreateNewSource",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_RENAMEPRTSRC, "TPG_CopyEditedSource",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_DELETEPRTSRC, "TPG_DeleteEditedSourec",TUT_e_Button);
|
||||
//ENDANNECY VL}
|
||||
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_NEWSYSTEM, "TPG_CreateNewSystem",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_RENAMESYSTEM, "TPG_CopyEditedSystem",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_DELETESYSTEM, "TPG_DeleteEditedSystem",TUT_e_Button);
|
||||
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_NEWENV, "TPG_CreateNewEnvironment",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_RENAMEENV, "TPG_CopyEditedEnvironment",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_BUTTON_DELETEENV, "TPG_DeleteEditedEnvironment",TUT_e_Button);
|
||||
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vDisplayCurrentGenerator();
|
||||
}
|
||||
|
||||
|
||||
void TPG_View::m_pub_fn_vDisplayGeneratorInZone( CPA_PartGen_Generator *_p_clGenerator, CPoint *_p_clTopLeft, CPoint * _p_clTopRight )
|
||||
{
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CWnd *p_clWnd = NULL;
|
||||
CRect *p_clRect = new CRect( *_p_clTopLeft, *_p_clTopRight );
|
||||
int iButtonWidth = (int) (p_clRect->Width() / 3);
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
p_clRect->InflateRect( 0, 10 );
|
||||
p_clRect->OffsetRect( 0, 10 );
|
||||
|
||||
p_clWnd = GetDlgItem( IDC_STATIC_GENERATORNAME );
|
||||
p_clWnd->SetWindowText( (_p_clGenerator != NULL) ? _p_clGenerator->GetName() : "<No Generator>" );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->DeflateRect( iButtonWidth, 0 );
|
||||
|
||||
p_clRect->OffsetRect( -iButtonWidth, 25 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_NEW );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_RENAME );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( FALSE );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_DELETE );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( _p_clGenerator != NULL );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
_p_clTopLeft->y+=50;
|
||||
_p_clTopRight->y+=50;
|
||||
|
||||
delete p_clRect;
|
||||
}
|
||||
|
||||
void TPG_View::m_pub_fn_vDisplaySourceInZone( CPA_PartGen_Source *_p_oPrtSrc, CPoint *_p_clTopLeft, CPoint * _p_clTopRight )
|
||||
{
|
||||
CWnd * p_clWnd = NULL;
|
||||
CRect * p_clRect = new CRect( *_p_clTopLeft, *_p_clTopRight );
|
||||
int iButtonWidth = (int)(p_clRect->Width() / 3);
|
||||
|
||||
p_clRect->InflateRect( 0, 10 );
|
||||
p_clRect->OffsetRect( 0, 10 );
|
||||
|
||||
p_clWnd = GetDlgItem( IDC_STATIC_PRTSRCNAME );
|
||||
p_clWnd->SetWindowText( ( _p_oPrtSrc != NULL ) ? _p_oPrtSrc->GetName() : "<No Source>" );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->DeflateRect( iButtonWidth, 0 );
|
||||
|
||||
p_clRect->OffsetRect( -iButtonWidth, 25 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_NEWPRTSRC );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_RENAMEPRTSRC );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( FALSE );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_DELETEPRTSRC );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( _p_oPrtSrc != NULL );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
_p_clTopLeft->y+=50;
|
||||
_p_clTopRight->y+=50;
|
||||
|
||||
delete p_clRect;
|
||||
}
|
||||
|
||||
|
||||
void TPG_View::m_pub_fn_vDisplaySystemInZone( CPA_PartGen_System *_p_clSystem, CPoint *_p_clTopLeft, CPoint * _p_clTopRight )
|
||||
{
|
||||
CWnd * p_clWnd = NULL;
|
||||
CRect * p_clRect = new CRect( *_p_clTopLeft, *_p_clTopRight );
|
||||
int iButtonWidth = (int)(p_clRect->Width() / 3);
|
||||
|
||||
p_clRect->InflateRect( 0, 10 );
|
||||
p_clRect->OffsetRect( 0, 10 );
|
||||
|
||||
p_clWnd = GetDlgItem( IDC_STATIC_SYSNAME );
|
||||
p_clWnd->SetWindowText( ( _p_clSystem != NULL ) ? _p_clSystem->GetName() : "<No System>" );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->DeflateRect( iButtonWidth, 0 );
|
||||
|
||||
p_clRect->OffsetRect( -iButtonWidth, 25 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_NEWSYSTEM );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_RENAMESYSTEM );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( FALSE );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_DELETESYSTEM );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( _p_clSystem != NULL );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
|
||||
_p_clTopLeft->y+=50;
|
||||
_p_clTopRight->y+=50;
|
||||
|
||||
delete p_clRect;
|
||||
}
|
||||
|
||||
|
||||
void TPG_View::m_pub_fn_vDisplayEnvInZone( CPA_PartGen_Environment *_p_clEnv, CPoint *_p_clTopLeft, CPoint * _p_clTopRight )
|
||||
{
|
||||
CWnd * p_clWnd = NULL;
|
||||
CRect * p_clRect = new CRect( *_p_clTopLeft, *_p_clTopRight );
|
||||
int iButtonWidth = (int)(p_clRect->Width() / 3);
|
||||
|
||||
p_clRect->InflateRect( 0, 10 );
|
||||
p_clRect->OffsetRect( 0, 10 );
|
||||
|
||||
p_clWnd = GetDlgItem( IDC_STATIC_ENVNAME );
|
||||
p_clWnd->SetWindowText( ( _p_clEnv != NULL ) ? _p_clEnv->GetName() : "<No Environment>" );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->DeflateRect( iButtonWidth, 0 );
|
||||
|
||||
p_clRect->OffsetRect( -iButtonWidth, 25 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_NEWENV );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_RENAMEENV );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( FALSE );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
p_clRect->OffsetRect( iButtonWidth, 0 );
|
||||
p_clWnd = GetDlgItem( IDC_BUTTON_DELETEENV );
|
||||
p_clWnd->MoveWindow( p_clRect );
|
||||
p_clWnd->EnableWindow( _p_clEnv != NULL );
|
||||
p_clWnd->ShowWindow( TRUE );
|
||||
|
||||
|
||||
_p_clTopLeft->y+=50;
|
||||
_p_clTopRight->y+=50;
|
||||
|
||||
delete p_clRect;
|
||||
}
|
||||
|
||||
|
||||
void TPG_View::OnLButtonDblClk(UINT nFlags, CPoint point)
|
||||
{
|
||||
CRect clClientRect;
|
||||
|
||||
GetDlgItem( IDC_STATIC_GENERATORNAME )->GetWindowRect( &clClientRect );
|
||||
ScreenToClient( &clClientRect );
|
||||
if( clClientRect.PtInRect( point ) )
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->SetCurrentType( g_C_csPartGenGeneratorName );
|
||||
|
||||
GetDlgItem( IDC_STATIC_SYSNAME )->GetWindowRect( &clClientRect );
|
||||
ScreenToClient( &clClientRect );
|
||||
if( clClientRect.PtInRect( point ) )
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->SetCurrentType( g_C_csPartGenSystemName );
|
||||
|
||||
GetDlgItem( IDC_STATIC_ENVNAME )->GetWindowRect( &clClientRect );
|
||||
ScreenToClient( &clClientRect );
|
||||
if( clClientRect.PtInRect( point ) )
|
||||
m_pub_fn_p_clGetDocument()->m_pub_p_clDialogList->SetCurrentType( g_C_csPartGenEnvName );
|
||||
|
||||
CTL_Editor_BaseFormView::OnLButtonDblClk(nFlags, point);
|
||||
}
|
||||
|
||||
|
||||
void TPG_View::OnSize(UINT nType, int cx, int cy)
|
||||
{
|
||||
CTL_Editor_BaseFormView::OnSize(nType, cx, cy);
|
||||
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vDisplayCurrentGenerator();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_GeneratorNewName dialog
|
||||
|
||||
|
||||
CPA_Dialog_GeneratorNewName::CPA_Dialog_GeneratorNewName(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CPA_Dialog_GeneratorNewName::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CPA_Dialog_GeneratorNewName)
|
||||
m_csNewGeneratorName = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CPA_Dialog_GeneratorNewName::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CPA_Dialog_GeneratorNewName)
|
||||
DDX_Text(pDX, IDC_EDIT_NEWGENERATORNAME, m_csNewGeneratorName);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPA_Dialog_GeneratorNewName, CDialog)
|
||||
//{{AFX_MSG_MAP(CPA_Dialog_GeneratorNewName)
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
BOOL CPA_Dialog_GeneratorNewName::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//*** register controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
//****** register window
|
||||
TUT_M_vRegisterControl(m_hWnd, "TPG_DialogNewGeneratorOrEnvironmentNameWindow",TUT_e_Window);
|
||||
|
||||
//****** register controls
|
||||
TUT_M_vRegisterControlID(IDC_EDIT_NEWGENERATORNAME, "TPG_GetNewGeneratorOrEnvironmentName",TUT_e_TextEdit);
|
||||
TUT_M_vRegisterControlID(IDOK, "TPG_AcceptNewGeneratorOrEnvironmentName",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDCANCEL, "TPG_CancelNewGeneratorOrEnvironmentName",TUT_e_Button);
|
||||
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
|
||||
void CPA_Dialog_GeneratorNewName::OnDestroy()
|
||||
{
|
||||
CDialog::OnDestroy();
|
||||
|
||||
//*** unregister controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
TUT_M_vUnregisterControl(m_hWnd);
|
||||
|
||||
TUT_M_vUnregisterControlID(IDC_EDIT_NEWGENERATORNAME);
|
||||
TUT_M_vUnregisterControlID(IDOK);
|
||||
TUT_M_vUnregisterControlID(IDCANCEL);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_GeneratorNewName message handlers
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_SystemNewName dialog
|
||||
|
||||
|
||||
CPA_Dialog_SystemNewName::CPA_Dialog_SystemNewName(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CPA_Dialog_SystemNewName::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CPA_Dialog_SystemNewName)
|
||||
m_csNewSystemName = _T("");
|
||||
m_lNbParticles = 100;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CPA_Dialog_SystemNewName::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CPA_Dialog_SystemNewName)
|
||||
DDX_Text(pDX, IDC_EDIT_SYSTEMNEWNAME, m_csNewSystemName);
|
||||
DDX_Text(pDX, IDC_EDIT_SYSDIALOGNBPARTICLES, m_lNbParticles);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPA_Dialog_SystemNewName, CDialog)
|
||||
//{{AFX_MSG_MAP(CPA_Dialog_SystemNewName)
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_SystemNewName message handlers
|
||||
|
||||
BOOL CPA_Dialog_SystemNewName::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//*** register controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
//****** register window
|
||||
TUT_M_vRegisterControl(m_hWnd, "TPG_DialogNewSystemNameWindow",TUT_e_Window);
|
||||
|
||||
//****** register controls
|
||||
TUT_M_vRegisterControlID(IDC_EDIT_SYSTEMNEWNAME, "TPG_GetNewSystemName",TUT_e_TextEdit);
|
||||
TUT_M_vRegisterControlID(IDOK, "TPG_AcceptNewSystemName",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDCANCEL, "TPG_CancelNewSystemName",TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDC_EDIT_SYSDIALOGNBPARTICLES, "TPG_GetNewSystemNbParticles",TUT_e_TextEdit);
|
||||
TUT_M_vRegisterControlID(IDC_SPIN_SYS, "TPG_SpinForNewSystemNbParticles", TUT_e_Spin);
|
||||
|
||||
|
||||
((CSpinButtonCtrl*)GetDlgItem( IDC_SPIN_SYS ))->SetRange( 0, 500);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
void CPA_Dialog_SystemNewName::OnDestroy()
|
||||
{
|
||||
CDialog::OnDestroy();
|
||||
|
||||
//*** unregister controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
TUT_M_vUnregisterControl(m_hWnd);
|
||||
|
||||
TUT_M_vUnregisterControlID(IDC_EDIT_SYSTEMNEWNAME);
|
||||
TUT_M_vUnregisterControlID(IDOK);
|
||||
TUT_M_vUnregisterControlID(IDCANCEL);
|
||||
TUT_M_vUnregisterControlID(IDC_EDIT_SYSDIALOGNBPARTICLES);
|
||||
TUT_M_vUnregisterControlID(IDC_SPIN_SYS);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_Warning dialog
|
||||
|
||||
|
||||
CPA_Dialog_Warning::CPA_Dialog_Warning(CWnd* pParent, CString _csText /*=NULL*/)
|
||||
: CDialog(CPA_Dialog_Warning::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CPA_Dialog_Warning)
|
||||
m_csWarningText = _csText;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CPA_Dialog_Warning::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CPA_Dialog_Warning)
|
||||
DDX_Text(pDX, IDC_STATIC_WARNING, m_csWarningText);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BOOL CPA_Dialog_Warning::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
//*** register controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
//****** register window
|
||||
TUT_M_vRegisterControl(m_hWnd, "TPG_WarningWhenObjectIsDeletedWindow",TUT_e_Window);
|
||||
|
||||
TUT_M_vRegisterControlID(IDOK, "TPG_AcceptObjectIsDeleted", TUT_e_Button);
|
||||
TUT_M_vRegisterControlID(IDCANCEL, "TPG_CancelObjectIsDeleted", TUT_e_Button);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
|
||||
void CPA_Dialog_Warning::OnDestroy()
|
||||
{
|
||||
CDialog::OnDestroy();
|
||||
|
||||
//*** unregister controls for TUT
|
||||
TUT_M_vGetTutDll();
|
||||
|
||||
TUT_M_vUnregisterControl(m_hWnd);
|
||||
|
||||
TUT_M_vUnregisterControlID(IDOK);
|
||||
TUT_M_vUnregisterControlID(IDCANCEL);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPA_Dialog_Warning, CDialog)
|
||||
//{{AFX_MSG_MAP(CPA_Dialog_Warning)
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPA_Dialog_Warning message handlers
|
127
Rayman_X/cpa/tempgrp/TPG/Src/_DLLcom.cpp
Normal file
127
Rayman_X/cpa/tempgrp/TPG/Src/_DLLcom.cpp
Normal file
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// Common functions for Object DLL capabilities
|
||||
// C. Beaudet
|
||||
//
|
||||
// Modified by David Reizer
|
||||
//
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "afxdllx.h"
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "MEC.h"
|
||||
#define D_State_Define
|
||||
#include "IncGAM.h"
|
||||
#undef D_State_Define
|
||||
#include "GLI.h"
|
||||
#include "_Minterf.hpp"
|
||||
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// 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 CPA_PartGen_Interface *gs_p_oPartGenInterface = 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_stPartGenDLLIdentity.eType = TOOL_DLL;
|
||||
g_stPartGenDLLIdentity.csName = C_szDLLPartGenName;
|
||||
g_stPartGenDLLIdentity.hModule = NULL;
|
||||
g_stPartGenDLLIdentity.p_oListOfInstances = &g_oListOfInstances;
|
||||
|
||||
return &g_stPartGenDLLIdentity;
|
||||
}
|
||||
|
||||
//========================================================================
|
||||
// DLL init 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_oPartGenInterface = new CPA_PartGen_Interface();
|
||||
ERROR_ASSERT(gs_p_oPartGenInterface != NULL);
|
||||
//*** DR ***//
|
||||
g_pclInterface = gs_p_oPartGenInterface;
|
||||
//*** End DR ***//
|
||||
}
|
||||
return gs_p_oPartGenInterface;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else //DLL_ONLY_ONE_INSTANCE
|
||||
|
||||
switch(lKey)
|
||||
{
|
||||
case 0: // the game world
|
||||
//*** DR ***//
|
||||
g_pclInterface = new CPA_PartGen_Interface();
|
||||
return g_pclInterface;
|
||||
//*** End DR ***//
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif //DLL_ONLY_ONE_INSTANCE
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// functions that are present in this type of DLL only :
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
#undef DLL_ONLY_ONE_INSTANCE
|
511
Rayman_X/cpa/tempgrp/TPG/Src/_Minterf.cpp
Normal file
511
Rayman_X/cpa/tempgrp/TPG/Src/_Minterf.cpp
Normal file
@@ -0,0 +1,511 @@
|
||||
/*
|
||||
=======================================================================================
|
||||
Name : _Minterf.cpp
|
||||
Author : David Reizer
|
||||
Description : main functions for Particle Generato editor interface
|
||||
=======================================================================================
|
||||
Modification -> Author : Tahiti Bob Date :20/03/98
|
||||
Description : adding some functionnalities
|
||||
=======================================================================================
|
||||
*/
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "ACP_Base.h"
|
||||
#include "ITF.h"
|
||||
#include "x:\cpa\main\inc\_EditID.h"
|
||||
|
||||
#include "_Minterf.hpp"
|
||||
#include "PGen_Res.h"
|
||||
#include "TPG_Strg.hpp"
|
||||
|
||||
#include "ErO.h"
|
||||
|
||||
// infos
|
||||
static CString g_csTPGName = C_szDLLPartGenName;
|
||||
static CString g_csTPGAuthor = "D. Reizer";
|
||||
static CString g_csTPGVersion = "V 2.0.2 18/03/98";
|
||||
static CString g_csTPGFrenchHelpFile = "";
|
||||
static CString g_csTPGEnglishHelpFile = "";
|
||||
|
||||
BOOL g_bTipFirstTime = TRUE;
|
||||
|
||||
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
CPA_PartGen_Interface *g_pclInterface;
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
#define PartGen_C_MenuID_OpenID 31
|
||||
#define PartGen_C_MenuID_CloseID 32
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
// the DLL global definition
|
||||
tdstDLLIdentity g_stPartGenDLLIdentity;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CONSTRUCTOR.
|
||||
// You must put here all your DLL interface definitions.
|
||||
//--------------------------------------------------------------------------------
|
||||
CPA_PartGen_Interface::CPA_PartGen_Interface(void)
|
||||
{
|
||||
// ************************** private internal
|
||||
m_p_stDLLIdentity = &g_stPartGenDLLIdentity;
|
||||
m_stBaseDLLDefinition.bCanOutputIn3DView = FALSE;
|
||||
m_stBaseDLLDefinition.bCanBeRefreshedByEngine = FALSE;
|
||||
|
||||
// Specific Init.
|
||||
m_pclPartGenMainFrame = NULL;
|
||||
|
||||
m_csEditorVersion = "2.0.0 [" + CString(__DATE__) + "]";
|
||||
|
||||
SetEditorInfo(g_csTPGName, g_csTPGAuthor, g_csTPGVersion, g_csTPGFrenchHelpFile, g_csTPGEnglishHelpFile);
|
||||
|
||||
SetCurrent(FALSE);
|
||||
|
||||
//For errors
|
||||
ERROR_g_fn_vAddAModuleDescriptor
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
m_csEditorVersion,
|
||||
"David REIZER",
|
||||
"01 48 18 53 74 (Montreuil)",
|
||||
"dreizer@ubisoft.fr",
|
||||
"Daniel PALIX",
|
||||
"04 50 51 26 63 (Annecy)",
|
||||
"dpalix@ubisoft.fr",
|
||||
"Vincent Lhullier (Annecy)",
|
||||
"04 50 52 90 84",
|
||||
"vlhullier@ubisoft.fr"
|
||||
);
|
||||
|
||||
m_pub_p_clView = NULL;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vJustAfterRegistered(void)
|
||||
{
|
||||
CString a_csTypes[] =
|
||||
{
|
||||
g_C_csPartGenGeneratorName,
|
||||
g_C_csPartGenSourceName,
|
||||
g_C_csPartGenSystemName,
|
||||
g_C_csPartGenEnvName
|
||||
};
|
||||
fn_vRegisterObjectsType(a_csTypes, 4);
|
||||
}
|
||||
|
||||
//*****************************************
|
||||
void CPA_PartGen_Interface::fn_vConstruct()
|
||||
{
|
||||
#ifndef __INACTIVE_INTERFACE__
|
||||
/*
|
||||
* Creates the main frame
|
||||
*/
|
||||
if ( m_pclPartGenMainFrame == NULL )
|
||||
{
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Creating the Main Frame",
|
||||
"CPA_PartGen_Interface::fn_vConstruct",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"New main frame is not allocated"
|
||||
);
|
||||
m_pclPartGenMainFrame = new CPA_PartGen_MainFrame;
|
||||
ERROR_ASSERT( m_pclPartGenMainFrame != NULL );
|
||||
|
||||
m_pclPartGenMainFrame->CreateBase( "",1,2,GetInterface()->GetMainWorld() );
|
||||
m_pclPartGenMainFrame->mfn_vEnableCaption(FALSE);
|
||||
m_pclPartGenMainFrame->m_iInitWidth = 350;
|
||||
m_pclPartGenMainFrame->m_bKeepPos = TRUE;
|
||||
m_pclPartGenMainFrame->m_stWinRight.cLinkSame = FRM_C_MoveLeft;
|
||||
}
|
||||
|
||||
m_clDocument.m_pub_p_clDialogList->fn_vInitAllLists();
|
||||
m_clDocument.m_pub_p_clDialogList->fn_vReinitDialog();
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//***********************************************
|
||||
void CPA_PartGen_Interface::fn_vLevelHasChanged()
|
||||
{
|
||||
/*
|
||||
* get all loaded engine structure
|
||||
*/
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedSystems();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedEnvironments();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedGenerators();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedSources();
|
||||
|
||||
/*
|
||||
* get all unloaded engine structure
|
||||
*/
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForUnLoadedGeneratorsAndSources();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForUnLoadedSystems();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForUnLoadedEnvironments();
|
||||
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vFillListOfSprites();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bLoadBaseObject( CPA_BaseObject *p_oObject )
|
||||
{
|
||||
BOOL bValue;
|
||||
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Loading an object",
|
||||
"CPA_PartGen_Interface::fn_bLoadBaseObject",
|
||||
E_ERROR_GRAVITY_FATAL,
|
||||
"Trying to load a NULL object"
|
||||
);
|
||||
ERROR_ASSERT( p_oObject != NULL );
|
||||
|
||||
/*
|
||||
* Particle generator
|
||||
*/
|
||||
if( p_oObject->fn_bIsOfType(g_C_csPartGenGeneratorName) )
|
||||
{
|
||||
bValue = ( (CPA_PartGen_Generator*)p_oObject )->m_pub_fn_vLoadIfUnloaded();
|
||||
if( bValue )
|
||||
{
|
||||
//Updates system and environment possibly loaded with the generator
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedGenerators();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedSources();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedSystems();
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vSearchForLoadedEnvironments();
|
||||
( (CPA_PartGen_Generator*)p_oObject )->m_pub_fn_vSetGenInEnv();
|
||||
}
|
||||
m_clDocument.m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
m_clDocument.m_pub_fn_vUpdateGenerator( (CPA_PartGen_Generator*) p_oObject );
|
||||
return bValue;
|
||||
}
|
||||
/*
|
||||
* Particle source
|
||||
*/
|
||||
else if( p_oObject->fn_bIsOfType(g_C_csPartGenSourceName) )
|
||||
{
|
||||
bValue = ( (CPA_PartGen_Source *) p_oObject )->m_pub_fn_vLoadIfUnloaded();
|
||||
m_clDocument.m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
m_clDocument.m_pub_fn_vUpdateSource( (CPA_PartGen_Source *) p_oObject );
|
||||
return bValue;
|
||||
}
|
||||
/*
|
||||
* Particle system
|
||||
*/
|
||||
else if( p_oObject->fn_bIsOfType(g_C_csPartGenSystemName) )
|
||||
{
|
||||
bValue = ( (CPA_PartGen_System*)p_oObject )->m_pub_fn_vLoadIfUnloaded();
|
||||
m_clDocument.m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
m_clDocument.m_pub_fn_vUpdateSystem( (CPA_PartGen_System*) p_oObject );
|
||||
return bValue;
|
||||
}
|
||||
/*
|
||||
* particle environment
|
||||
*/
|
||||
else if( p_oObject->fn_bIsOfType(g_C_csPartGenEnvName) )
|
||||
{
|
||||
bValue = ( (CPA_PartGen_Environment*)p_oObject )->m_pub_fn_vLoadIfUnloaded();
|
||||
m_clDocument.m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
m_clDocument.m_pub_fn_vUpdateEnv( (CPA_PartGen_Environment*) p_oObject );
|
||||
return bValue;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//**********************************************************************************
|
||||
tdePermission CPA_PartGen_Interface::fn_eAcceptNewEditor(CPA_EditorBase *pNewEditor)
|
||||
{
|
||||
return C_Allow;
|
||||
}
|
||||
|
||||
//**********************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bCanActivateEditor(CPA_List<CPA_BaseObject> *pParams)
|
||||
{
|
||||
#ifdef __INACTIVE_INTERFACE__
|
||||
return FALSE;
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vOnActivateEditor(CPA_List<CPA_BaseObject> *pParams,BOOL bBackActivated)
|
||||
{
|
||||
m_fn_vShowEditor();
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bCanCloseEditor(void)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vOnCloseEditor(void)
|
||||
{
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vBeforeEngine(void)
|
||||
{
|
||||
m_fn_vHideEditor();
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vBeforeEditor(void)
|
||||
{
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
m_fn_vShowEditor();
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vHasLostFocus(void)
|
||||
{
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bHasGainedFocus(void)
|
||||
{
|
||||
m_pub_fn_p_clGetDocument()->m_pub_fn_vUpdateChangingEnumDescriptors();
|
||||
|
||||
// display Tip of the Day
|
||||
GetInterface()->fn_vDisplayTipOfDay("Particle Generators", "TPG", g_bTipFirstTime);
|
||||
g_bTipFirstTime = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
//Begin Mircea Dunka 31 Aug 1998 - DialogBar interface
|
||||
void CPA_PartGen_Interface::fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn)
|
||||
{
|
||||
if(wCategory == C_DlgBarCategoryEditor)
|
||||
{
|
||||
_pDlgBarBtn->hIcon = ::LoadIcon((HINSTANCE)(GetDLLIdentity()->hModule), MAKEINTRESOURCE(IDI_TPG_DLGBAR_ICON));
|
||||
CString oCst;
|
||||
oCst = C_szDLLPartGenName;
|
||||
if( (M_GetMainApp()) && (M_GetMainApp()->mp_oAppKeyboard) )
|
||||
{
|
||||
oCst += " (";
|
||||
oCst += M_GetMainApp()->mp_oAppKeyboard->mfn_oConvertIniStringToKeyString((const CString*)&CString("Activate Particle Editor"));
|
||||
oCst += ")";
|
||||
}
|
||||
strcpy(_pDlgBarBtn->szToolTip, (char*)(LPCTSTR)oCst);
|
||||
_pDlgBarBtn->uID = (UINT)this;
|
||||
}
|
||||
}
|
||||
//end Mircea Dunka 31 Aug 1998
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bDefineSubMenu(EDT_SubMenu *_p_oEDTSubMenu)
|
||||
{
|
||||
if ( _p_oEDTSubMenu->GetSubMenuType() == C_SubMenuEditor )
|
||||
{
|
||||
CString csMenuDescString;
|
||||
CString csMenuAccelString = M_GetMainApp()->mp_oAppKeyboard->mfn_oConvertIniStringToKeyString((const CString*)&CString("Activate Particle Editor"));
|
||||
csMenuDescString.Format("%s\t%s", C_szDLLPartGenName, csMenuAccelString);
|
||||
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
_p_oEDTSubMenu->AddAnEntry(this, M_MAKECHAR(csMenuDescString), PartGen_C_MenuID_CloseID, TRUE);
|
||||
else
|
||||
_p_oEDTSubMenu->AddAnEntry(this, M_MAKECHAR(csMenuDescString), PartGen_C_MenuID_OpenID, FALSE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::_OnSubMenuCommand( EDT_SubMenu *_p_oEDTSubMenu, UINT uiMsgID)
|
||||
{
|
||||
switch (uiMsgID)
|
||||
{
|
||||
case PartGen_C_MenuID_OpenID:
|
||||
if ( !fn_bIsCurrentEditor() )
|
||||
GetMainWorld()->fn_bActivateEditor(this, NULL);
|
||||
break;
|
||||
|
||||
case PartGen_C_MenuID_CloseID:
|
||||
if ( fn_bIsCurrentEditor() )
|
||||
GetMainWorld()->fn_bCloseEditor(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bAcceptToSave()
|
||||
{
|
||||
BOOL bReturn = TRUE;
|
||||
|
||||
CPA_BaseObjectList * p_clList = GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenGeneratorName);
|
||||
Position pos = p_clList->GetHeadPosition();
|
||||
|
||||
while( (pos != NULL) && bReturn )
|
||||
{
|
||||
CPA_PartGen_Generator * p_clGen = (CPA_PartGen_Generator*)p_clList->GetNext( pos );
|
||||
if( p_clGen->fn_bIsAvailable() )
|
||||
{
|
||||
CString csMessage = "The generator " + p_clGen->GetName() + " does not have an associated system or environment : operation aborted";
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving a Generator",
|
||||
"CPA_PartGen_Interface::fn_bAcceptToSave",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
csMessage
|
||||
);
|
||||
bReturn = ( (p_clGen->m_pub_fn_p_clGetSystem() != NULL) && (p_clGen->m_pub_fn_p_clGetEnv() != NULL) );
|
||||
ERROR_ASSERT( bReturn );
|
||||
}
|
||||
}
|
||||
|
||||
p_clList = GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenSystemName);
|
||||
pos = p_clList->GetHeadPosition();
|
||||
while( (pos != NULL) && bReturn )
|
||||
{
|
||||
CPA_PartGen_System * p_clSys = (CPA_PartGen_System*)p_clList->GetNext( pos );
|
||||
if( p_clSys->fn_bIsAvailable() )
|
||||
{
|
||||
CString csMessage = "System " + p_clSys->GetName() + " needs parameters : operation aborted";
|
||||
ERROR_PREPARE_M
|
||||
(
|
||||
g_c_csPartGenModuleNameForErrors,
|
||||
"Saving a System",
|
||||
"CPA_PartGen_Interface::fn_bAcceptToSave",
|
||||
E_ERROR_GRAVITY_WARNING,
|
||||
csMessage
|
||||
);
|
||||
bReturn = ( (p_clSys->m_pub_fn_p_stGetSystem() != NULL) && ((p_clSys->m_pub_fn_hGetPriGameMaterial() != NULL ) || (p_clSys->m_pub_fn_hGetPriSprite() != NULL)) );
|
||||
ERROR_ASSERT( bReturn );
|
||||
}
|
||||
}
|
||||
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
|
||||
//************************
|
||||
// for dialog list
|
||||
//************************
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::GetListsForDialog(CPA_DialogList *pDialog)
|
||||
{
|
||||
pDialog->fn_vAddANewList( C_szPartGenGeneratorName, GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenGeneratorName) );
|
||||
pDialog->fn_vAddANewList( C_szPartGenSourceName, GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenSourceName) );
|
||||
pDialog->fn_vAddANewList( C_szPartGenSystemName, GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenSystemName) );
|
||||
pDialog->fn_vAddANewList( C_szPartGenEnvName, GetMainWorld()->fn_p_oGetOriginalObjectList(C_szPartGenEnvName) );
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
void CPA_PartGen_Interface::fn_vInitDefaultParameters(CPA_DialogList *pDialog)
|
||||
{
|
||||
pDialog->SetDefaultButtonState(FALSE);
|
||||
pDialog->SetDefaultTestName("<< No Filter >>");
|
||||
pDialog->SetDefaultTypeName(C_szPartGenGeneratorName);
|
||||
}
|
||||
|
||||
|
||||
//****************************************************
|
||||
BOOL CPA_PartGen_Interface::fn_bOnSelChangeListObjects(CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect)
|
||||
{
|
||||
if ( (! bUnselect) && pSelectedObject->fn_bIsAvailable() )
|
||||
{
|
||||
if ( csTypeName == g_C_csPartGenGeneratorName )
|
||||
{
|
||||
m_clDocument.m_pub_fn_vUpdateGenerator( (CPA_PartGen_Generator*)pSelectedObject );
|
||||
}
|
||||
else if ( csTypeName == g_C_csPartGenSourceName )
|
||||
{
|
||||
m_clDocument.m_pub_fn_vUpdateSource( (CPA_PartGen_Source *) pSelectedObject );
|
||||
}
|
||||
else if ( csTypeName == g_C_csPartGenSystemName )
|
||||
{
|
||||
m_clDocument.m_pub_fn_vUpdateSystem( (CPA_PartGen_System*)pSelectedObject );
|
||||
}
|
||||
else if ( csTypeName == g_C_csPartGenEnvName )
|
||||
{
|
||||
m_clDocument.m_pub_fn_vUpdateEnv( (CPA_PartGen_Environment*)pSelectedObject );
|
||||
}
|
||||
}
|
||||
//ROMTEAM Bugs Correction (Cristian Stegaru 24/03/98)
|
||||
//return TRUE;
|
||||
return FALSE;
|
||||
//ENDROMTEAM Bugs Correction (Cristian Stegaru)
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
CPA_BaseObject* CPA_PartGen_Interface::GetDialogSelection(CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode)
|
||||
{
|
||||
if ( csTypeName == g_C_csPartGenGeneratorName )
|
||||
return m_clDocument.m_pub_p_clCurrentGenerator;
|
||||
if ( csTypeName == g_C_csPartGenSourceName )
|
||||
return m_clDocument.m_pub_p_clCurrentSource;
|
||||
if ( csTypeName == g_C_csPartGenSystemName )
|
||||
return m_clDocument.m_pub_p_clCurrentSystem;
|
||||
if ( csTypeName == g_C_csPartGenEnvName )
|
||||
return m_clDocument.m_pub_p_clCurrentEnv;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
// Specific members
|
||||
//***********************************************************************
|
||||
void CPA_PartGen_Interface::m_fn_vShowEditor()
|
||||
{
|
||||
g_oFrameGest.mfn_vSetRefresh(FALSE);
|
||||
|
||||
if ( m_pclPartGenMainFrame != NULL )
|
||||
g_oFrameGest.mfn_vActivateWindow(m_pclPartGenMainFrame);
|
||||
|
||||
g_oFrameGest.mfn_vSetRefresh(TRUE);
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
void CPA_PartGen_Interface::m_fn_vHideEditor()
|
||||
{
|
||||
g_oFrameGest.mfn_vSetRefresh(FALSE);
|
||||
|
||||
if ( m_pclPartGenMainFrame != NULL )
|
||||
g_oFrameGest.mfn_vDisactivateWindow(m_pclPartGenMainFrame);
|
||||
|
||||
g_oFrameGest.mfn_vSetRefresh(TRUE);
|
||||
}
|
||||
|
||||
|
||||
//***********************************************************************
|
||||
CPA_PartGen_MyDocument *CPA_PartGen_Interface::m_pub_fn_p_clGetDocument()
|
||||
{
|
||||
return &m_clDocument;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
CPA_PartGen_Source *CPA_PartGen_Interface::m_pub_fn_p_clFindSourceWithEngine( PRT_tdstParticlesSource* _p_stPrtSrc )
|
||||
{
|
||||
return (CPA_PartGen_Source*)( GetMainWorld()->fn_p_oFindObjectWithEngine((void*)_p_stPrtSrc, C_szPartGenSourceName) );
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
CPA_PartGen_System * CPA_PartGen_Interface::m_pub_fn_p_clFindSystemWithEngine( PRT_tdstParticlesSystem* _p_stSystem )
|
||||
{
|
||||
return (CPA_PartGen_System*)( GetMainWorld()->fn_p_oFindObjectWithEngine((void*)_p_stSystem, C_szPartGenSystemName) );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************************
|
||||
CPA_PartGen_Environment * CPA_PartGen_Interface::m_pub_fn_p_clFindEnvWithEngine( PRT_tdstParticlesEnvironment* _p_stEnv )
|
||||
{
|
||||
return (CPA_PartGen_Environment*)( GetMainWorld()->fn_p_oFindObjectWithEngine((void*)_p_stEnv, C_szPartGenEnvName) );
|
||||
}
|
||||
|
||||
//**************************************************************************************
|
||||
CPA_PartGen_Generator *CPA_PartGen_Interface::m_pub_fn_p_clFindPrtGenWithEngine( tdxHandleToParticleGenerator hPrtGen )
|
||||
{
|
||||
return (CPA_PartGen_Generator*)( GetMainWorld()->fn_p_oFindObjectWithEngine((void*)hPrtGen, C_szPartGenGeneratorName) );
|
||||
}
|
||||
|
BIN
Rayman_X/cpa/tempgrp/TPG/Tmp/TpgDFEvd/TPartGen.res
Normal file
BIN
Rayman_X/cpa/tempgrp/TPG/Tmp/TpgDFEvd/TPartGen.res
Normal file
Binary file not shown.
303
Rayman_X/cpa/tempgrp/TPG/make/Tpg.dsp
Normal file
303
Rayman_X/cpa/tempgrp/TPG/make/Tpg.dsp
Normal file
@@ -0,0 +1,303 @@
|
||||
# Microsoft Developer Studio Project File - Name="Tpg" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=Tpg - Win32 Debug with Editors
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Tpg.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Tpg.mak" CFG="Tpg - Win32 Debug with Editors"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Tpg - Win32 Debug Glide with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "Tpg - Win32 Debug with Editors" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""$/cpa/tempgrp/TPG/make", MEFAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Tpg - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Tpg___W1"
|
||||
# PROP BASE Intermediate_Dir "Tpg___W1"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\Main\Edt_Data\Tools"
|
||||
# PROP Intermediate_Dir "..\Tmp\TpgDFEvd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /Gi /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "X:\CPA\Public" /I "..\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /D "VISUAL" /Fr /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /i "../res" /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo /o"Tmp\TpgP5Evd\Tpg.bsc"
|
||||
# ADD BSC32 /nologo /o"..\Tmp\TpgDFEvd\Tpg.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TpgDFEvd.dll" /pdbtype:sept
|
||||
# SUBTRACT BASE LINK32 /pdb:none
|
||||
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"X:\CPA\EXE\Main\EDT_Data\Tools\TpgDFEvd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "Tpg - Win32 Debug with Editors"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Tpg___W2"
|
||||
# PROP BASE Intermediate_Dir "Tpg___W2"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "x:\CPA\EXE\GAM\Edt_Data\Tools"
|
||||
# PROP Intermediate_Dir "..\Tmp\TpgP5Evd"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /Gi /GX /Zi /Od /I "X:\CPA\Public" /I "..\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /FR /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "X:\CPA\Public" /I "..\inc" /D "CPA_WANTS_IMPORT" /D "ACTIVE_EDITOR" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "CPA_VISUAL" /D "CPA_DEBUG" /D "_WINDLL" /D "_AFXDLL" /D "VISUAL" /YX /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo /o"Tmp\TpgP5Evd\Tpg.bsc"
|
||||
# ADD BSC32 /nologo /o"..\Tmp\TpgP5Evd\Tpg.bsc"
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TpgP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT BASE LINK32 /verbose /pdb:none
|
||||
# ADD LINK32 X:\CPA\Exe\GAM\GAMP5Evd.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"X:\CPA\EXE\GAM\EDT_Data\Tools\TpgP5Evd.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /verbose /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Tpg - Win32 Debug Glide with Editors"
|
||||
# Name "Tpg - Win32 Debug with Editors"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "*.c *.cpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\_DLLcom.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\_Minterf.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\GAM\Actions\MSPrtSrc.c
|
||||
|
||||
!IF "$(CFG)" == "Tpg - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Tpg - Win32 Debug with Editors"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\ParticuleGen.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\StdAfx.cpp
|
||||
# ADD BASE CPP /Yc"stdafx.h"
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_ClBk.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_OEnv.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_OGen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_OSrc.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_OSys.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_Spri.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPG_View.cpp
|
||||
# ADD CPP /I "D:\cpa\TempGrp\Tpg\Inc"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPGMainF.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\TPGMyDoc.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "*.h *.hpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\GAM\STRUCTUR\3DOSLkTb.h
|
||||
|
||||
!IF "$(CFG)" == "Tpg - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Tpg - Win32 Debug with Editors"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\_Minterf.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\help_def.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Public\GAM\Actions\MSPrtSrc.h
|
||||
|
||||
!IF "$(CFG)" == "Tpg - Win32 Debug Glide with Editors"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "Tpg - Win32 Debug with Editors"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\PGen_Res.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\PGen_Res.hm
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_ClBk.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_OEnv.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_OGen.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_OSrc.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_OSys.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_Spri.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_Strg.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPG_View.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPGMainF.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPGMyDoc.hpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter "*.res *.ico *.rc *.bmp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\icon1.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\TPartGen.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Inc\tpg_dlgb.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Libs Debug"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\EDT_DATA\Ctl___vd.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\EDT_DATA\ErO___vd.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\MaiDFEvd.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Exe\Main\EDT_DATA\WAW___vd.lib
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\structures.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
526
Rayman_X/cpa/tempgrp/TPG/make/Tpg.vcproj
Normal file
526
Rayman_X/cpa/tempgrp/TPG/make/Tpg.vcproj
Normal file
@@ -0,0 +1,526 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Tpg"
|
||||
ProjectGUID="{A286EF1C-A522-47E9-901C-B546ED3DBE4D}"
|
||||
SccProjectName=""$/cpa/tempgrp/TPG/make", MEFAAAAA"
|
||||
SccLocalPath="."
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\GAM\Edt_Data\Tools"
|
||||
IntermediateDirectory=".\..\Tmp\TpgP5Evd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG;VISUAL"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\..\Tmp\TpgP5Evd/Tpg.pch"
|
||||
AssemblerListingLocation=".\..\Tmp\TpgP5Evd/"
|
||||
ObjectFile=".\..\Tmp\TpgP5Evd/"
|
||||
ProgramDataBaseFileName=".\..\Tmp\TpgP5Evd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="X:\CPA\Exe\GAM\GAMP5Evd.lib"
|
||||
OutputFile="X:\CPA\EXE\GAM\EDT_Data\Tools\TpgP5Evd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile="..\Src\ParticuleGen.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\GAM\Edt_Data\Tools/TpgP5Evd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\GAM\Edt_Data\Tools/TpgP5Evd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\GAM\Edt_Data\Tools/Tpg.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
OutputDirectory="x:\CPA\EXE\Main\Edt_Data\Tools"
|
||||
IntermediateDirectory=".\..\Tmp\TpgDFEvd"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="X:\CPA\Public,..\inc,..\res"
|
||||
PreprocessorDefinitions="CPA_WANTS_IMPORT;ACTIVE_EDITOR;WIN32;_DEBUG;_WINDOWS;CPA_VISUAL;CPA_DEBUG;VISUAL"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\..\Tmp\TpgDFEvd/Tpg.pch"
|
||||
AssemblerListingLocation=".\..\Tmp\TpgDFEvd/"
|
||||
ObjectFile=".\..\Tmp\TpgDFEvd/"
|
||||
ProgramDataBaseFileName=".\..\Tmp\TpgDFEvd/"
|
||||
BrowseInformation="1"
|
||||
BrowseInformationFile=".\..\Tmp\TpgDFEvd/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ctl___vd.lib ero___vd.lib maidfevd.lib waw___vd.lib"
|
||||
OutputFile="X:\CPA\EXE\Main\EDT_Data\Tools\TpgDFEvd.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data\objects;X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
ModuleDefinitionFile="..\Src\ParticuleGen.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="x:\CPA\EXE\Main\Edt_Data\Tools/TpgDFEvd.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="x:\CPA\EXE\Main\Edt_Data\Tools/TpgDFEvd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName="x:\CPA\EXE\Main\Edt_Data\Tools/Tpg.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"
|
||||
AdditionalIncludeDirectories="../res"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="*.c *.cpp">
|
||||
<File
|
||||
RelativePath="..\Src\_DLLcom.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\_Minterf.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\GAM\Actions\MSPrtSrc.c">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\ParticuleGen.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="1"
|
||||
PrecompiledHeaderThrough="stdafx.h"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
UsePrecompiledHeader="1"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_ClBk.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_OEnv.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_OGen.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_OSrc.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_OSys.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_Spri.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPG_View.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\cpa\TempGrp\Tpg\Inc"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="D:\cpa\TempGrp\Tpg\Inc"
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPGMainF.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Src\TPGMyDoc.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="*.h *.hpp">
|
||||
<File
|
||||
RelativePath="..\..\..\Public\GAM\STRUCTUR\3DOSLkTb.h">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\_Minterf.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\help_def.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\Public\GAM\Actions\MSPrtSrc.h">
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\PGen_Res.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\PGen_Res.hm">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_ClBk.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_OEnv.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_OGen.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_OSrc.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_OSys.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_Spri.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_Strg.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPG_View.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPGMainF.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPGMyDoc.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resources"
|
||||
Filter="*.res *.ico *.rc *.bmp">
|
||||
<File
|
||||
RelativePath="..\Inc\icon1.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\TPartGen.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TPG\Inc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug Glide with Editors|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="\cpa\tempgrp\TPG\Inc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\Inc\tpg_dlgb.ico">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\..\..\structures.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
5
Rayman_X/cpa/tempgrp/TPG/make/mssccprj.scc
Normal file
5
Rayman_X/cpa/tempgrp/TPG/make/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a source code control file
|
||||
|
||||
[Tpg.vcproj]
|
||||
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
|
||||
SCC_Project_Name = Perforce Project
|
BIN
Rayman_X/cpa/tempgrp/TPG/res/tpg_dlgb.ico
Normal file
BIN
Rayman_X/cpa/tempgrp/TPG/res/tpg_dlgb.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
Reference in New Issue
Block a user