-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
88 lines (73 loc) · 1.81 KB
/
Main.cpp
File metadata and controls
88 lines (73 loc) · 1.81 KB
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
// ============================================================================
//
// This file contains the actions, conditions and expressions your object uses
//
// ============================================================================
#include "common.h"
// ============================================================================
//
// CONDITIONS
//
// ============================================================================
CONDITION(
/* ID */ 0,
/* Name */ "%o: %0 == %1",
/* Flags */ EVFLAGS_ALWAYS|EVFLAGS_NOTABLE,
/* Params */ (2,PARAM_NUMBER,"First number",PARAM_NUMBER,"Second number")
) {
int p1=Param(TYPE_INT);
int p2=Param(TYPE_INT);
return p1==p2;
}
CONDITION(
/* ID */ 1,
/* Name */ "%o : On trigger",
/* Flags */ 0,
/* Params */ (0)
) {
return true;
}
// ============================================================================
//
// ACTIONS
//
// ============================================================================
ACTION(
/* ID */ 0,
/* Name */ "Trigger condition",
/* Flags */ 0,
/* Params */ (0)
) {
rdPtr->rRd->GenerateEvent(1);
}
ACTION(
/* ID */ 1,
/* Name */ "Dummy action",
/* Flags */ 0,
/* Params */ (0)
) {
}
// ============================================================================
//
// EXPRESSIONS
//
// ============================================================================
EXPRESSION(
/* ID */ 0,
/* Name */ "Sum(",
/* Flags */ 0,
/* Params */ (2,EXPPARAM_NUMBER,"First number",EXPPARAM_NUMBER,"Second number")
) {
int p1=ExParam(TYPE_INT);
int p2=ExParam(TYPE_INT);
return p1+p2;
}
EXPRESSION(
/* ID */ 1,
/* Name */ "StringReturn$(",
/* Flags */ EXPFLAG_STRING,
/* Params */ (1,EXPPARAM_STRING,"String to return")
) {
char * p1=(char *)ExParam(TYPE_STRING);
ReturnString(p1);
}