This sentinel is probably not needed, as per the comment, but I'm not familiar
enough yet to confirm. However, the value given (2000 << 24) would evaluate to
-805306368 due to the integer overflow.
The comment would indicate that the value is supposed to be large and positive
as the sorting is done in ascending ->u order. In any case the code still works
like this, but at least the sentinal value makes more sense.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Use normal function call notation in d_edge.c and capitalise it to match common
calling convention. Move the declaration next to D_DrawSpans{8,16} since those
are the two options it can point to.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Make R_Alias_clip_z and R_Alias_Clip static functions, but the others need to
be extern for the case where ASM is used.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Logic here is not renderer dependent, just picking the right frame at
the right time for the given entity. Pass in both the sprite pointer
and the current time.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The build warnings on mac were annoying me. Check that the library
dir actually exists before we add it to the linker's command line.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Also fixes an incorrect use of sizeof which was previously papered
over by the padded size of the struct.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
The differences between the software and GL renderers for sprite models boils
down to a) how much memory is allocated on the end of the mspriteframe_t struct
and b) how it processes the raw pixel data. Abstract these parts away so the
common parts can be shared.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Same as the software renderer's version, remove dependence on the global
loadname variable in the file. Note this also changes the use of
loadmodel->name to loadname; doesn't really make much difference - just the
name given the the hunk allocation for the GL texture.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Update comment in the Makefile - one aspect fixed... now to tackle the
duplication between model.c and gl_model.c...
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Moving stuff that qwsv doesn't care about out into separate compilation
units so I can look at sharing the main BSP loading code.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
Moving stuff that qwsv doesn't care about out into separate compilation
units so I can look at sharing the main BSP loading code.
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>