mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[gamecode] use INT64_C instead of l-suffix
Once again, I had forgotten that long is not always 64-bits.
This commit is contained in:
parent
80c5e2c3f6
commit
c3317f8e5e
1 changed files with 33 additions and 32 deletions
|
@ -2588,41 +2588,42 @@ pr_swizzle_d (pr_lvec4_t vec, pr_ushort_t swiz)
|
|||
&&swizzle_xwww, &&swizzle_ywww, &&swizzle_zwww, &&swizzle_wwww,
|
||||
};
|
||||
#undef swizzle
|
||||
#define L(x) UINT64_C(x)
|
||||
static const pr_lvec4_t neg[16] = {
|
||||
{ 0l, 0l, 0l, 0l },
|
||||
{ 1l<<63, 0l, 0l, 0l },
|
||||
{ 0l, 1l<<63, 0l, 0l },
|
||||
{ 1l<<63, 1l<<63, 0l, 0l },
|
||||
{ 0l, 0l, 1l<<63, 0l },
|
||||
{ 1l<<63, 0l, 1l<<63, 0l },
|
||||
{ 0l, 1l<<63, 1l<<63, 0l },
|
||||
{ 1l<<63, 1l<<63, 1l<<63, 0l },
|
||||
{ 0l, 0l, 0l, 1l<<63 },
|
||||
{ 1l<<63, 0l, 0l, 1l<<63 },
|
||||
{ 0l, 1l<<63, 0l, 1l<<63 },
|
||||
{ 1l<<63, 1l<<63, 0l, 1l<<63 },
|
||||
{ 0l, 0l, 1l<<63, 1l<<63 },
|
||||
{ 1l<<63, 0l, 1l<<63, 1l<<63 },
|
||||
{ 0l, 1l<<63, 1l<<63, 1l<<63 },
|
||||
{ 1l<<63, 1l<<63, 1l<<63, 1l<<63 },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(1)<<63, INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(1)<<63, INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(1)<<63, INT64_C(0) },
|
||||
{ INT64_C(1)<<63, INT64_C(0), INT64_C(1)<<63, INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(0) },
|
||||
{ INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(0), INT64_C(1)<<63 },
|
||||
{ INT64_C(1)<<63, INT64_C(0), INT64_C(0), INT64_C(1)<<63 },
|
||||
{ INT64_C(0), INT64_C(1)<<63, INT64_C(0), INT64_C(1)<<63 },
|
||||
{ INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(0), INT64_C(1)<<63 },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(1)<<63, INT64_C(1)<<63 },
|
||||
{ INT64_C(1)<<63, INT64_C(0), INT64_C(1)<<63, INT64_C(1)<<63 },
|
||||
{ INT64_C(0), INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(1)<<63 },
|
||||
{ INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(1)<<63, INT64_C(1)<<63 },
|
||||
};
|
||||
static const pr_lvec4_t zero[16] = {
|
||||
{ ~0l, ~0l, ~0l, ~0l },
|
||||
{ 0l, ~0l, ~0l, ~0l },
|
||||
{ ~0l, 0l, ~0l, ~0l },
|
||||
{ 0l, 0l, ~0l, ~0l },
|
||||
{ ~0l, ~0l, 0l, ~0l },
|
||||
{ 0l, ~0l, 0l, ~0l },
|
||||
{ ~0l, 0l, 0l, ~0l },
|
||||
{ 0l, 0l, 0l, ~0l },
|
||||
{ ~0l, ~0l, ~0l, 0l },
|
||||
{ 0l, ~0l, ~0l, 0l },
|
||||
{ ~0l, 0l, ~0l, 0l },
|
||||
{ 0l, 0l, ~0l, 0l },
|
||||
{ ~0l, ~0l, 0l, 0l },
|
||||
{ 0l, ~0l, 0l, 0l },
|
||||
{ ~0l, 0l, 0l, 0l },
|
||||
{ 0l, 0l, 0l, 0l },
|
||||
{ ~INT64_C(0), ~INT64_C(0), ~INT64_C(0), ~INT64_C(0) },
|
||||
{ INT64_C(0), ~INT64_C(0), ~INT64_C(0), ~INT64_C(0) },
|
||||
{ ~INT64_C(0), INT64_C(0), ~INT64_C(0), ~INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), ~INT64_C(0), ~INT64_C(0) },
|
||||
{ ~INT64_C(0), ~INT64_C(0), INT64_C(0), ~INT64_C(0) },
|
||||
{ INT64_C(0), ~INT64_C(0), INT64_C(0), ~INT64_C(0) },
|
||||
{ ~INT64_C(0), INT64_C(0), INT64_C(0), ~INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(0), ~INT64_C(0) },
|
||||
{ ~INT64_C(0), ~INT64_C(0), ~INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), ~INT64_C(0), ~INT64_C(0), INT64_C(0) },
|
||||
{ ~INT64_C(0), INT64_C(0), ~INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), ~INT64_C(0), INT64_C(0) },
|
||||
{ ~INT64_C(0), ~INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), ~INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
{ ~INT64_C(0), INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
{ INT64_C(0), INT64_C(0), INT64_C(0), INT64_C(0) },
|
||||
};
|
||||
|
||||
do_swizzle:
|
||||
|
|
Loading…
Reference in a new issue