- edited description
vrect structure
Does anyone know why the hell there are two different definitions of struct vrect_s?
In client/vid.h which the client side have access to, we have this:
typedef struct vrect_s
{
int x,y,width,height;
} vrect_t;
However in ref_soft/r_localh which the refresh drivers use, we have this:
typedef struct vrect_s
{
int x,y,width,height;
struct vrect_s *pnext;
} vrect_t;
... which has an extra pnext pointer member. (I can not find a place which uses that pnext member, is it just me?)
Comments (10)
-
reporter -
reporter - edited description
-
Let me look at the original unfudged source it may have been something stupid i did. but i dont think so.
-
The original source is really that silly. It may be a leftover from Quake 1, which used it as part of the VGA_UpdateLinearScreen.
Frank
-
Also, none of the GAS or MASM code references it either. I suppose we can try removing and see what happens.
-
reporter We cannot remove the pnext from there because it will change most of the rd_??? offsets in the oldrefdef_t structure (see qasm.inc and qasm.h), so we either add it to the client side or we be careful what to include and how we pass what data and live with it. I vote for keeping it as it is.
-
reporter - changed status to resolved
Closing this. No point in pursuing it.
-
This reminds me:
in snd_loc.h Knightmare added the qboolean music to the sfxcache_t struct
in the ASM there is this...
// sfxcache_t structure // !!! if this is changed, it much be changed in sound.h too !!! #define sfxc_length 0 #define sfxc_loopstart 4 #define sfxc_speed 8 #define sfxc_width 12 #define sfxc_stereo 16 #define sfxc_data 20
So we have to do something like #define sfxc_music 24 to add such things to it or let it go because it's at the end and is not used? I am slightly confused by it since I haven't worked with this kind of code before. From what I understand those defines for the structs are the number offsets and the + them is the size of it i.e. 4 is used for int, byte, etc.
Frank
-
It's also more interesting to me that sfxc_data is the only thing used, the rest must just be there for clarity. and obviously the ASM sound code works fine.
-
reporter Just pushed 9be372e for that.
- Log in to comment