diff options
Diffstat (limited to 'tools/statepropbuilder/apps/spbuilder/code/sp/interface')
4 files changed, 188 insertions, 0 deletions
diff --git a/tools/statepropbuilder/apps/spbuilder/code/sp/interface/base.hpp b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/base.hpp new file mode 100644 index 0000000..dd8fe32 --- /dev/null +++ b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/base.hpp @@ -0,0 +1,25 @@ +/* + * fv/interface/base.hpp + */ + + +#ifndef SP_INTERFACE_BASE_HPP +#define SP_INTERFACE_BASE_HPP + + +#define WIN32_LEAN_AND_MEAN +#define WIN32_EXTRA_LEAN +#include <windows.h> + + +#ifdef SMARTPROP_ENGINE +# define SP_IMPORT __declspec(dllexport) +#else +# define SP_IMPORT __declspec(dllimport) +#endif + + +#define SP_CALLCONV __cdecl + + +#endif // SP_INTERFACE_BASE_HPP diff --git a/tools/statepropbuilder/apps/spbuilder/code/sp/interface/context.hpp b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/context.hpp new file mode 100644 index 0000000..72da9a0 --- /dev/null +++ b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/context.hpp @@ -0,0 +1,50 @@ +/* + * sp/interface/context.hpp + */ + + +#ifndef SP_INTERFACE_CONTEXT_HPP +#define SP_INTERFACE_CONTEXT_HPP + +#include <sp/interface/base.hpp> + + +extern "C" +{ + + SP_IMPORT int SP_CALLCONV SPContextOpen(HWND hwnd); + SP_IMPORT int SP_CALLCONV SPContextClose(); + + SP_IMPORT int SP_CALLCONV SPContextViewResize(int w, int h); + + SP_IMPORT int SP_CALLCONV SPContextIsPDDIStatsEnabled(); + SP_IMPORT int SP_CALLCONV SPContextSetIsPDDIStatsEnabled(int statsEnabled); + + SP_IMPORT int SP_CALLCONV SPContextAdvance(); + SP_IMPORT int SP_CALLCONV SPContextDisplay(); + + SP_IMPORT int SP_CALLCONV SPContextMouseDown(int button, int shift, int x, int y); + SP_IMPORT int SP_CALLCONV SPContextMouseMove(int button, int shift, int x, int y); + SP_IMPORT int SP_CALLCONV SPContextMouseUp(int button, int shift, int x, int y); + SP_IMPORT int SP_CALLCONV SPContextMouseWheel(int scroll); + + SP_IMPORT float SP_CALLCONV SPSimulationGetFPS(); + SP_IMPORT float SP_CALLCONV SPSimulationGetRate(); + SP_IMPORT int SP_CALLCONV SPSimulationSetRate(float rate); + + SP_IMPORT unsigned int SP_CALLCONV SPGetMemoryUsage(); + + SP_IMPORT int SP_CALLCONV SPContextGetCameraLock(); + SP_IMPORT int SP_CALLCONV SPContextSetCameraLock(int cameraLock); + + SP_IMPORT int SP_CALLCONV SPInventoryClear(); + SP_IMPORT int SP_CALLCONV SPInventoryGetEntityCount(); + SP_IMPORT int SP_CALLCONV SPInventoryGetEntityName(int index, char* name, int nameLen, char* type, int typeLen); + + SP_IMPORT int SP_CALLCONV SPSetBackgroundColour( int r , int g , int b ); + + +} // extern "C" + + +#endif // SP_INTERFACE_CONTEXT_HPP diff --git a/tools/statepropbuilder/apps/spbuilder/code/sp/interface/platform.hpp b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/platform.hpp new file mode 100644 index 0000000..8a2ba13 --- /dev/null +++ b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/platform.hpp @@ -0,0 +1,24 @@ +/* + * fv/interface/platform.hpp + */ + + +#ifndef SP_INTERFACE_PLATFORM_HPP +#define SP_INTERFACE_PLATFORM_HPP + + +#include <sp/interface/base.hpp> + + +extern "C" +{ + + +SP_IMPORT int SP_CALLCONV SPPlatformOpen(HWND hwnd); +SP_IMPORT int SP_CALLCONV SPPlatformClose(); + + +} // extern "C" + + +#endif // SP_INTERFACE_PLATFORM_HPP diff --git a/tools/statepropbuilder/apps/spbuilder/code/sp/interface/workspace.hpp b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/workspace.hpp new file mode 100644 index 0000000..210ac8a --- /dev/null +++ b/tools/statepropbuilder/apps/spbuilder/code/sp/interface/workspace.hpp @@ -0,0 +1,89 @@ +/* + * fv/interface/platform.hpp + */ + +#ifndef SP_INTERFACE_WORKSPACE_HPP +#define SP_INTERFACE_WORKSPACE_HPP + +#include <sp/interface/base.hpp> +#include <sp/engine/statepropdatatypes.hpp> + +extern "C" +{ + //Load Background ============================================================= + SP_IMPORT int SP_CALLCONV SPLoadBackground( const char* filename ); + + //Load ======================================================================== + SP_IMPORT int SP_CALLCONV SPLoad( const char* filename ); + + //Export ====================================================================== + SP_IMPORT int SP_CALLCONV SPExportStatePropData( const char* filename ); + + //Draw collision ============================================================== + SP_IMPORT int SP_CALLCONV SPShowCollision( int show ); + + //Prop name =================================================================== + SP_IMPORT const char* SP_CALLCONV SPGetPropName(); + + //Advance ===================================================================== + SP_IMPORT int SP_CALLCONV SPPause( bool b ); + SP_IMPORT int SP_CALLCONV SPAdvanceOneFrame(); + SP_IMPORT int SP_CALLCONV SPBackOneFrame(); + + // State Data ================================================================= + SP_IMPORT unsigned int SP_CALLCONV SPGetNumberOfStates(); + SP_IMPORT int SP_CALLCONV SPInsertState( unsigned int state ); + SP_IMPORT int SP_CALLCONV SPDeleteState( unsigned int state ); + + SP_IMPORT int SP_CALLCONV SPGetCurrentState(); + SP_IMPORT int SP_CALLCONV SPNextState(); + SP_IMPORT int SP_CALLCONV SPPrevState(); + SP_IMPORT int SP_CALLCONV SPSetState( unsigned int state ); + + //Transition Data ============================================================= + SP_IMPORT bool SP_CALLCONV SPGetTransitionData( int state , TransitionData* transitionData ); + SP_IMPORT int SP_CALLCONV SPSetAutoTransition( int state, bool b ); + SP_IMPORT int SP_CALLCONV SPSetAutoTransitionOnFrame( int state, float onFrame ); + SP_IMPORT int SP_CALLCONV SPSetAutoTransitionToState( int state, int toState ); + + //Visibility Data ============================================================= + SP_IMPORT bool SP_CALLCONV SPGetVisibilityData( int state , int index , VisibilityData* visibilityData ); + SP_IMPORT int SP_CALLCONV SPSetVisible( int state , int index , bool b ); + SP_IMPORT int SP_CALLCONV SPSetAllVisibilities( int state , bool b ); + SP_IMPORT int SP_CALLCONV SPShowAll(int state); + SP_IMPORT int SP_CALLCONV SPHideAll(int state); + + SP_IMPORT int SP_CALLCONV SPGetNumDrawables(); + SP_IMPORT const char* SP_CALLCONV SPGetDrawableName( int index ); + + //Frame Controller Data ======================================================= + SP_IMPORT bool SPGetFrameControllerData( int state, int fc , FrameControllerData* fcData ); + SP_IMPORT int SP_CALLCONV SPSetCyclic( int state ,int fc, bool isCyclic ); + SP_IMPORT int SP_CALLCONV SPSetRelativeSpeed( int state ,int fc, float speed ); + SP_IMPORT int SP_CALLCONV SPSetFrameRange( int state ,int fc, float min, float max ); + SP_IMPORT int SP_CALLCONV SPSetHoldFrame( int state , int fc , bool holdFrame ); + SP_IMPORT int SP_CALLCONV SPSetNumberOfCycles( int state , int fc , unsigned int numberOfCycles ); + + SP_IMPORT int SP_CALLCONV SPGetNumFrameControllers(); + SP_IMPORT float SP_CALLCONV SPGetBaseFrameControllerFrame(); + SP_IMPORT float SP_CALLCONV SPGetFrameControllerFrame( int index ); + SP_IMPORT const char* SP_CALLCONV SPGetFrameControllerName( int index ); + + //Event Data ================================================================== + SP_IMPORT unsigned int SP_CALLCONV SPGetNumberOfEvents( int state ); + SP_IMPORT bool SP_CALLCONV SPGetEventData( int state , int eventindex , EventData *eventData); + SP_IMPORT int SP_CALLCONV SPAddEvent( const char* event , int eventEnum , int toState , int fromState ); + SP_IMPORT int SP_CALLCONV SPEditEvent( int state, int EventIndex, char* eventName, int eventEnum , int toState ); + SP_IMPORT int SP_CALLCONV SPDeleteEvent( int fromState , int index ); + + //Callback Data =============================================================== + SP_IMPORT unsigned int SP_CALLCONV SPGetNumberOfCallbacks( int state ); + SP_IMPORT bool SP_CALLCONV SPGetCallbackData( int state , int index , CallbackData* callbackData ); + SP_IMPORT int SP_CALLCONV SPAddCallback( int state , const char* event , int eventEnum , float frame ); + SP_IMPORT int SP_CALLCONV SPEditCallback( int state, int CBIndex, char* eventname, int eventEnum , float frame ); + SP_IMPORT int SP_CALLCONV SPDeleteCallback( int state , int index ); +} + + +#endif // SP_INTERFACE_WORKSPACE_HPP + |