mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-18 07:21:31 +00:00
[qfcc] Add bool and matrix types to ruamoko
They're not properly implemented, but they do at least parse, so they can be used in declarations (just not expressions yet).
This commit is contained in:
parent
64334759f4
commit
cd7abf5320
1 changed files with 12 additions and 0 deletions
|
@ -2752,6 +2752,17 @@ static keyword_t rua_keywords[] = {
|
|||
#define VEC_TYPE(type_name, base_type) \
|
||||
{ #type_name, QC_TYPE_SPEC, .spec = { .type = &type_##type_name } },
|
||||
#include "tools/qfcc/include/vec_types.h"
|
||||
|
||||
{"bvec2", QC_TYPE_SPEC, .spec = {.type = &type_bvec2}},
|
||||
{"bvec3", QC_TYPE_SPEC, .spec = {.type = &type_bvec3}},
|
||||
{"bvec4", QC_TYPE_SPEC, .spec = {.type = &type_bvec4}},
|
||||
|
||||
#define MAT_TYPE(type_name, base_type, cols, align_as) \
|
||||
{ #type_name, QC_TYPE_SPEC, .spec = { . type = &type_##type_name } },
|
||||
#include "tools/qfcc/include/mat_types.h"
|
||||
{ "mat2", QC_TYPE_SPEC, .spec = { . type = &type_mat2x2 } },
|
||||
{ "mat3", QC_TYPE_SPEC, .spec = { . type = &type_mat3x3 } },
|
||||
{ "mat4", QC_TYPE_SPEC, .spec = { . type = &type_mat4x4 } },
|
||||
};
|
||||
|
||||
// These keywords are all part of the Ruamoko (Objective-QC) language.
|
||||
|
@ -2821,6 +2832,7 @@ static keyword_t qf_keywords[] = {
|
|||
{"quaternion", QC_TYPE_SPEC, .spec = { .type = &type_quaternion } },
|
||||
{"double", QC_TYPE_SPEC, .spec = { .type = &type_double } },
|
||||
{"int", QC_TYPE_SPEC, .spec = { .type = &type_int } },
|
||||
{"bool", QC_TYPE_SPEC, .spec = { .type = &type_bool } },
|
||||
{"unsigned", QC_TYPE_SPEC, .spec = { .is_unsigned = true } },
|
||||
{"signed", QC_TYPE_SPEC, .spec = { .is_signed = true } },
|
||||
{"long", QC_TYPE_SPEC, .spec = { .is_long = true } },
|
||||
|
|
Loading…
Reference in a new issue