This repository was archived by the owner on Aug 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathEffectTemplates.h
93 lines (76 loc) · 2.46 KB
/
EffectTemplates.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#pragma once
#include "memtrack.h"
#include "texgen2.h"
#include "GUIInterface.h"
#include "IntroEditor.h"
#define EFFECT_BYTE 0
#define EFFECT_INT 1
#define EFFECT_FLOAT 2
#define EFFECT_RTXT 3
#define EFFECT_VARFUNCTION 4
#define EFFECT_BOOL 5
#define EFFECT_MATSEL 6
#define EFFECT_BLENDSEL 7
#define EFFECT_SCENESEL 8
#define EFFECT_ANIMSEL 9
#define EFFECT_CAMSEL 10
#define EFFECT_CNSTFUNCTION 11
#define EFFECT_VARTEXT 12
#define EFFECT_CONSTTEXT 13
struct EVENT;
typedef void (WINAPI *EFFECTFUNCTIONCALLBACK) (EVENT*);
struct EFFECTPARAMETERTYPE
{
int Type;
int iMin,iMax,iDefault;
float fMin,fMax,fDefault;
char *Text,*ToolTip;
int Color;
GUICALLBACK Function;
};
class EFFECTTEMPLATEDESCRIPTOR
{
void AddItem();
public:
int ItemNum;
int ItemCapacity;
EFFECTPARAMETERTYPE *ItemList;
EFFECTTEMPLATEDESCRIPTOR() {ItemNum=0; ItemCapacity=0; ItemList=NULL;}
~EFFECTTEMPLATEDESCRIPTOR() {delete ItemList;}
void AddByteBar(unsigned char Min, unsigned char Max, unsigned char Default, int Color, char *Text, char *ToolTip); // byte
void AddIntBar(int Min, int Max, int Default, int Color, char *Text, char *ToolTip); // int
void AddFloatBar(float Min, float Max, float Default, int Color, char *Text, char *ToolTip); // float
void AddRenderTextureSelector(); //byte
void AddBooleanButton(int t1, int t2, bool Default, char *Text, char *ToolTip); // byte
void AddVariableFunction(int t1, int t2, char *Text, char * ToolTip, GUICALLBACK Function); // none
void AddVariableText(int Pos, char *Text);
void AddConstantText(int Pos, char *Text);
void AddMaterialSelector(); //void*
void AddBlendModeSelector(); //GLuint*2
void AddSceneSelector(); //void*
void AddAnimSelector(); //void*
void AddCameraSelector(); //void*
void AddConstantFunction(int t1, int t2, char *Text, char * ToolTip, GUICALLBACK Function); // none
};
struct DEFAULTEVENTDATA
{
float TimePos;
int x1,y1,x2,y2;
bool OnScreenInLastFrame;
bool SecondPass;
int ActualFrame;
};
typedef void (WINAPI *EFFECTCALLBACK) (DEFAULTEVENTDATA*, void*);
struct EFFECT
{
EFFECTTEMPLATEDESCRIPTOR *TemplateDescriptor;
EFFECTCALLBACK EffectProc;
float r,g,b;
int DataSize;
int Type;
ITEM *ListItem;
};
extern ITEMLIST *EffectList;
extern cINTERFACE *EventParameterInterface;
void RegisterEffects();
void AdjustGUIToEvent(EVENT *Event);