FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/examples/tutorial/tutorial04_gen.inc at master · ilyabelow/daScript · GitHub
ilyabelow
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
examples
/
tutorial
/
tutorial04_gen.inc
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (35 loc) · 1.22 KB
Breadcrumbs
daScript
/
examples
/
tutorial
/
tutorial04_gen.inc
Copy path
File metadata and controls
36 lines (35 loc) · 1.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
class
TutorialBaseClass
{
protected:
enum
{
__fn_update =
0
,
__fn_get_position =
1
,
};
protected:
static
int
_das_class_method_offset[
2
];
public:
TutorialBaseClass
(
const
StructInfo * info ) {
if
( _das_class_method_offset[
0
]==
0
) {
_das_class_method_offset[__fn_update] =
adapt_field_offset
(
"
update
"
,info);
_das_class_method_offset[__fn_get_position] =
adapt_field_offset
(
"
get_position
"
,info);
}
}
static
__forceinline Func
get_update
(
void
* self ) {
return
getDasClassMethod
(self,_das_class_method_offset[__fn_update]);
}
static
__forceinline
void
invoke_update
( Context * __context__, Func __funcCall__,
void
* self,
float
dt ) {
das_invoke_function<
void
>::invoke
<
void
*,
float
>
(__context__,
nullptr
,__funcCall__,
self,dt);
}
static
__forceinline Func
get_get_position
(
void
* self ) {
return
getDasClassMethod
(self,_das_class_method_offset[__fn_get_position]);
}
static
__forceinline float3
invoke_get_position
( Context * __context__, Func __funcCall__,
void
* self ) {
return
das_invoke_function<float3>::invoke
<
void
*>
(__context__,
nullptr
,__funcCall__,
self);
}
};
int
TutorialBaseClass::_das_class_method_offset[
2
];
Back
|
FazBrowse Home
|
New Git URL