mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-24 03:22:42 +00:00
Working vector-field test
This commit is contained in:
parent
8b168077c7
commit
b20136e5f4
2 changed files with 11 additions and 0 deletions
|
@ -70,6 +70,9 @@ do { \
|
|||
#define ENTFIELD(a, b) \
|
||||
(ast_expression*)ast_entfield_new(ctx, (ast_expression*)(a), (ast_expression*)(b))
|
||||
|
||||
#define VECMEM(vec, mem) \
|
||||
(ast_expression*)ast_member_new(ctx, (ast_expression*)(vec), (mem))
|
||||
|
||||
#define CALL(what) \
|
||||
do { \
|
||||
ast_call *call = ast_call_new(ctx, (ast_expression*)what); \
|
||||
|
|
|
@ -131,6 +131,14 @@ FUNCTION(main, TYPE_VOID);
|
|||
CALLPARAM(sNL)
|
||||
ENDCALL();
|
||||
);
|
||||
CALL(ftos)
|
||||
CALLPARAM(ENTFIELD(pawn, VECMEM(memv, 2)))
|
||||
ENDCALLWITH(output,
|
||||
CALL(print)
|
||||
CALLPARAM(output)
|
||||
CALLPARAM(sNL)
|
||||
ENDCALL();
|
||||
);
|
||||
|
||||
ENDFUNCTION(main);
|
||||
|
||||
|
|
Loading…
Reference in a new issue