reman3/Rayman_X/cpa/tempgrp/OAC/Src/EdActors/EDAC2Mot.cpp

61 lines
2.3 KiB
C++

#include "StdAfx.h"
#include "EDAC2Mot.hpp"
#include "EDACStrg.hpp"
#include "EdtList.hpp"
#include "TAc.h"
//-------------------------------------- Called by Motor --------------------------------------
//***********************************************************************
//========================================================================
// Used in Motor, to save Zone Lists
//========================================================================
//***********************************************************************
// ALX
BOOL EDACTORS_fn_b_GetZoneListSectionName(/*ZDX_tdxHandleToZdxList*/void *hHandleToMotorList,
BOOL bListOfZone,
CString &r_csReturnedName)
{
if (bListOfZone) // List of zones
{
CPA_SaveObject * pEdtList = (CPA_SaveObject *) M_GetMainApp () -> m_p_oMainWorld ->
fn_p_oFindObjectWithEngine (hHandleToMotorList , C_szEdtListTypeName);
if (! pEdtList) return FALSE;
r_csReturnedName = pEdtList -> GetReferencedSectionName ();
return TRUE;
}
else // List of activations
{
CPA_SaveObject * pZaList = (CPA_SaveObject *) M_GetMainApp () -> m_p_oMainWorld ->
fn_p_oFindObjectWithEngine (hHandleToMotorList , C_szZAListTypeName);
if (! pZaList) return FALSE;
r_csReturnedName = pZaList -> GetReferencedSectionName ();
return TRUE;
}
}
// End ALX
//***********************************************************************
//========================================================================
// Used in Motor, to save Way Lists
//========================================================================
//***********************************************************************
BOOL EDACTORS_fn_b_GetWayListSectionName(struct WAYLST_tdstFatherListOfWay_ *hHandleToMotorList,
CString &r_csReturnedName)
{
CPA_SaveObject * pEdtList = (CPA_SaveObject *) M_GetMainApp () -> m_p_oMainWorld ->
fn_p_oFindObjectWithEngine (hHandleToMotorList , C_szEdtListTypeName);
if (! pEdtList) return FALSE;
r_csReturnedName = pEdtList -> GetReferencedSectionName ();
return TRUE;
}