74 lines
2.1 KiB
C
74 lines
2.1 KiB
C
/*=========================================================================
|
|
* Caps.c : Capabilities.
|
|
* This is a part of the Game project.
|
|
*
|
|
* Version 1.0
|
|
* Creation date 29/01/98
|
|
* Author Fred "Bart" Compagnon
|
|
* Revision date
|
|
*
|
|
* That file needs to be compatible for all platforms.
|
|
*
|
|
* (c) Ubi Studios 1998
|
|
*=======================================================================*/
|
|
|
|
#include "ToolsCPA.h"
|
|
#include "Macros.h"
|
|
|
|
#include "Actions/AllActs.h"
|
|
|
|
#include "Structur/Objects.h"
|
|
|
|
#include "Caps.h"
|
|
#include "InitEng.h"
|
|
#include "GameEng.h"
|
|
#include "ObjInit.h"
|
|
|
|
/**************************************************************************/
|
|
void fn_vSetCapabilities(struct tdstEngineObject_ *_p_stObject, unsigned long _ubf32Capabilities)
|
|
{
|
|
fn_vStandardGameSetCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
}
|
|
|
|
unsigned long fn_ulGetCapabilities(struct tdstEngineObject_ *_p_stObject)
|
|
{
|
|
return (fn_ulStandardGameGetCapabilities(_p_stObject->h_StandardGame));
|
|
}
|
|
|
|
void fn_vAddCapabilities(struct tdstEngineObject_ *_p_stObject, unsigned long _ubf32Capabilities)
|
|
{
|
|
fn_vStandardGameAddCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
}
|
|
|
|
void fn_vSubCapabilities(struct tdstEngineObject_ *_p_stObject, unsigned long _ubf32Capabilities)
|
|
{
|
|
fn_vStandardGameSubCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
}
|
|
|
|
void fn_vChangeCapabilities(struct tdstEngineObject_ *_p_stObject, unsigned long _ubf32Capabilities, long lValue)
|
|
{
|
|
switch (lValue)
|
|
{
|
|
case 0: /*add*/
|
|
case 2:
|
|
fn_vStandardGameAddCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
break;
|
|
case 1: /* set*/
|
|
case 3:
|
|
fn_vStandardGameSetCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
break;
|
|
case 4: /* sub*/
|
|
fn_vStandardGameSubCapabilities(_p_stObject->h_StandardGame, _ubf32Capabilities);
|
|
break;
|
|
case 5: /* erase*/
|
|
fn_vStandardGameSetCapabilities(_p_stObject->h_StandardGame, (unsigned long)0);
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
|
|
|