
//CS definitions of some classes differ from those used by the game
//*Really* don't want to clutter up the game definitions with CS-specific stuff so redefining here
#include "obse\GameTypes.h"

namespace Editor {

	//24
	class TESForm
	{
	public:
		TESForm();
		~TESForm();

		virtual void Unk01(void);
		//...

		struct Unk {
			void	* unk00;
			void	* unk04;
		};

		//void		** vtbl;		//00
		UInt8		typeID;			//04
		UInt8		pad04[3];		//05 .. 07
		UInt32		unk08;			//08 - flags?
		UInt32		refID;			//0C
		String		editorID;		//10 .. 17
		UInt32		unk18;			//18
		Unk			unk1C;			//1C .. 23
	};


	//054
	class Script : public TESForm		//aka Script
	{
	public:
		EditorScript();
		~EditorScript();

		struct RefVarData {
			String				editorID;
			EditorTESForm		* form;
			UInt32				unk0C;	// only seen zero (not varIdx?)
		};

		struct RefVarEntry {
			RefVarData		* data;
			RefVarEntry		* next;
		};

		struct VarInfo
		{
			UInt32			idx;		// 00
			UInt32			pad04;		// 04
			double			data;		// 08
			UInt8			type;		// 10
			UInt8			pad11[3];	// 11
			UInt32			unk14;		// 14
			String			name;		// 18
		};

		struct VarInfoEntry
		{
			VarInfo			* data;
			VarInfoEntry	* next;
		};

		struct ScriptInfo
		{
			UInt32	unk0;		// 00 
			UInt32	numRefs;	// 04 
			UInt32	dataLength;	// 08 
			UInt32	varCount;	// 0C 
			UInt32	type;		// 10 
		};

		ScriptInfo		info;		//24 .. 37
		char			* text;		//38
		void			* data;		//3C
		RefVarEntry		refVars;	//40 .. 47
		VarInfoEntry	vars;		//48 .. 4F
		UInt8			unk50;		//50
		UInt8			pad51[3];	//51 .. 53
	};

}





