/****************************************************************************/
/*  FILE: HND_OldFunctions.h                                                */
/*  機能: HND-SDKに過去に使われていた関数の定義(互換性を保つため)           */
/*                                                                          */
/*  2004/04/13 Created.                                                     */
/*  Copyright (C)SEGA 2004/Creative Center. Graphics Tool Section.          */
/****************************************************************************/
#ifndef __HND_OLDFUNCTIONS_H
#define __HND_OLDFUNCTIONS_H

/****************************************************************************/
#include <memory.h> 

typedef HNS_HANDLE HNS_HDL_SCENE;
typedef HNS_HANDLE HNS_HDL_OBJECT;
typedef HNS_HANDLE HNS_HDL_NODE;
typedef HNS_HANDLE HNS_HDL_MODEL;
typedef HNS_HANDLE HNS_HDL_MESH;
typedef HNS_HANDLE HNS_HDL_POLYGON;
typedef HNS_HANDLE HNS_HDL_POLYVTX;
typedef HNS_HANDLE HNS_HDL_UVLAYER;
typedef HNS_HANDLE HNS_HDL_UV;
//typedef HNS_HANDLE HNS_HDL_UVW;
typedef HNS_HANDLE HNS_HDL_VERTEX;
typedef HNS_HANDLE HNS_HDL_ENVWEIGHT;
typedef HNS_HANDLE HNS_HDL_MATERIAL;
typedef HNS_HANDLE HNS_HDL_TEXTURE;
typedef HNS_HANDLE HNS_HDL_BOUNDINGAREA;
typedef HNS_HANDLE HNS_HDL_INSTMDL;
typedef HNS_HANDLE HNS_HDL_BONE;
typedef HNS_HANDLE HNS_HDL_CAMERA;
typedef HNS_HANDLE HNS_HDL_LIGHT;
typedef HNS_HANDLE HNS_HDL_PICTURE;
typedef HNS_HANDLE HNS_HDL_MOTION;
typedef HNS_HANDLE HNS_HDL_MODELMOT;
typedef HNS_HANDLE HNS_HDL_SHAPEKEY;
typedef HNS_HANDLE HNS_HDL_MOP;
typedef HNS_HANDLE HNS_HDL_MTRANIM;
typedef HNS_HANDLE HNS_HDL_TEXANIM;
typedef HNS_HANDLE HNS_HDL_CAMERAMOT;
typedef HNS_HANDLE HNS_HDL_LIGHTMOT;
typedef HNS_HANDLE HNS_HDL_FLOATKEY;
typedef HNS_HANDLE HNS_HDL_TFLOATKEY;
typedef HNS_HANDLE HNS_HDL_UIDKEY;
typedef HNS_HANDLE HNS_HDL_TUIDKEY;
typedef HNS_HANDLE HNS_HDL_QUATERNIONKEY;
typedef HNS_HANDLE HNS_HDL_IDKEY;
typedef HNS_HANDLE HNS_HDL_ITEMIDKEY;
typedef HNS_HANDLE HNS_HDL_IDXF2D;
typedef HNS_HANDLE HNS_HDL_IDXF3D;
typedef HNS_HANDLE HNS_HDL_IDXF4D;
typedef HNS_HANDLE HNS_HDL_IDXFCOLOR;

typedef HNS_HANDLE HNS_HDL_SICHAINRT;
typedef HNS_HANDLE HNS_HDL_SICHAIN;
typedef HNS_HANDLE HNS_HDL_SIBONE;
typedef HNS_HANDLE HNS_HDL_SIEFF;

typedef HNS_HANDLE HNS_HDL_USERDATA;



HNDDLL_API HND_ERROR HNDCALL hnGetValueTypeX3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HnmID *Typeid0, HnmID *Typeid1, HnmID *Typeid2);

/* Sint32 * 1 */
HNDDLL_API	HND_ERROR HNDCALL hnSetSint32(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetUint32(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Uint32 Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetFloat (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float  Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetBool  (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Bool   Value);

HNDDLL_API	Sint32 HNDCALL hnGetSint32(HNS_HANDLE *Handle, Sint32 Num, HnmID Id);
HNDDLL_API	Uint32 HNDCALL hnGetUint32(HNS_HANDLE *Handle, Sint32 Num, HnmID Id);

HNDDLL_API	HND_ERROR HNDCALL hnGetUint32X(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Uint32 *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetUint32X(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Uint32 *Value);
HNDDLL_API	HND_ERROR HNDCALL hnGetSint32X(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetSint32X(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 *Value);

HNDDLL_API	HND_ERROR HNDCALL hnGetValueSint32X3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 *Value0, Sint32 *Value1, Sint32 *Value2);
//HNDDLL_APIHND_ERROR HNDCALL hnSetValueSint32X3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32  Value0, Sint32  Value1, Sint32  Value2);
HNDDLL_API	HND_ERROR HNDCALL hnGetValueSint32X4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 *Value0, Sint32 *Value1, Sint32 *Value2, Sint32 *Value3);
//HNDDLL_APIHND_ERROR HNDCALL hnSetValueSint32X4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Sint32 *Value);

HNDDLL_API	HND_ERROR HNDCALL hnGetValueFloatX2(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float *Value0, Float *Value1);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueFloatX2(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float  Value0, Float  Value1);
HNDDLL_API	HND_ERROR HNDCALL hnGetValueFloatX3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float *Value0, Float *Value1, Float *Value2);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueFloatX3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float  Value0, Float  Value1, Float  Value2);
HNDDLL_API	HND_ERROR HNDCALL hnGetValueFloatX4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float *Value0, Float *Value1, Float *Value2, Float *Value3);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueFloatX4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float  Value0, Float  Value1, Float  Value2, Float  Value3);
HNDDLL_API	HND_ERROR HNDCALL hnGetFloatX      (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetFloatX      (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, Float *Value);

HNDDLL_API	HND_ERROR HNDCALL hnGetValueDataHandle  (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueDataHandle  (HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);
HNDDLL_API	HND_ERROR HNDCALL hnGetValueDataHandleX3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueDataHandleX3(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);
HNDDLL_API	HND_ERROR HNDCALL hnGetValueDataHandleX4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);
HNDDLL_API	HND_ERROR HNDCALL hnSetValueDataHandleX4(HNS_HANDLE *Handle, Sint32 Num, HnmID Id, HNS_HANDLE *Value);

HNDDLL_API	HND_ERROR HNDCALL hnDeleteModule(HNS_HANDLE *Handle);
HNDDLL_API	Bool HNDCALL hnIsNullHandle(HNS_HANDLE *Handle);

#define hnCopyHandle(_src, _dst)				memcpy(_dst, _src, sizeof(HNS_HANDLE))
#define hnAddValueDataHandle(_Handle, _Value)	hnAddHandle(_Handle, _Value)


/* Char */
HNDDLL_API HND_ERROR HNDCALL hnGetString2 (HNS_HANDLE *Handle, Sint32 Num, HnmID id, char   *Value, Sint32 Size );
HNDDLL_API HND_ERROR HNDCALL hnGetString  (HNS_HANDLE *Handle, Sint32 Num, HnmID id, char   *Value);
HNDDLL_API HND_ERROR HNDCALL hnSetString  (HNS_HANDLE *handle, Sint32 Num, HnmID id, char   *Value);
HNDDLL_API HND_ERROR HNDCALL hnGetNbString(HNS_HANDLE *Handle, Sint32 Num, HnmID id, Sint32 *Size );

#define hnFindNode(_Handle, _SearchName, _hResult) hnFindObject(_Handle, _SearchName, _hResult)


#endif /* __HND_OLDFUNCTIONS_H */