quake

Why are these function names in parenthesis? [duplicate]

不问归期 提交于 2021-02-08 12:01:02
问题 This question already has answers here : How do function pointers in C work? (11 answers) C function pointer syntax (4 answers) Closed 3 years ago . I've been meaning to ask this question for a while now. What's going on with these functions? Why are the names in parenthesis? void (*think)(gentity_t *self); void (*reached)(gentity_t *self); // movers call this when hitting endpoint void (*blocked)(gentity_t *self, gentity_t *other); void (*touch)(gentity_t *self, gentity_t *other, trace_t

What could be the purpose of a header file with raw data?

ε祈祈猫儿з 提交于 2019-12-12 15:14:56
问题 Decided to check out some code other than my own, Quake I was the choice. The first file I click on is filled with nothing but raw data and the only comments are the GPL. I am guessing it is an array containing normal vectors? Regardless of what its purpose was, what confuses me is what it is doing in a header file anorms.h. I am wondering what could be the purpose of doing this? The other source, actual code, feels fairly complicated to me. As a novice programmer I probably just need to

Notation I can't understand in Quake source code (C)

本秂侑毒 提交于 2019-12-04 20:42:34
问题 I was taking a look at the Quake 1 GPL Code and I came across various similar header files, the purpose or use of which I don't seem to understand. They look like tables of some sorts and are structured like this {1, 0}, {1, -1}, {1, -2}, {1, -3}, {1, -4}, {1, -5},[...] Without anything before or after them. I understand they define something but I've never come across this kind of notation in C. You can read one of the header files I'm referring to here. My question is: what are those..

Notation I can't understand in Quake source code (C)

感情迁移 提交于 2019-12-03 12:57:37
I was taking a look at the Quake 1 GPL Code and I came across various similar header files, the purpose or use of which I don't seem to understand. They look like tables of some sorts and are structured like this {1, 0}, {1, -1}, {1, -2}, {1, -3}, {1, -4}, {1, -5},[...] Without anything before or after them. I understand they define something but I've never come across this kind of notation in C. You can read one of the header files I'm referring to here . My question is: what are those...things? The ASM is actually giving me less problems than that stuff. frast These are probably multi-use