mirror of
https://github.com/ioquake/jedi-outcast.git
synced 2024-11-09 23:01:48 +00:00
allow the horrible hack of writing -1 to a pointer to work on amd64
This commit is contained in:
parent
2602d6e48d
commit
bb7b3911bb
1 changed files with 16 additions and 16 deletions
|
@ -3503,7 +3503,7 @@ qboolean ItemParse_cvarStrList( itemDef_t *item)
|
|||
PC_ParseWarning("end of file inside menu item\n");
|
||||
return qfalse;
|
||||
}
|
||||
if ((int)token > 0) //a normal StringAlloc ptr
|
||||
if ((intptr_t)token > 0) //a normal StringAlloc ptr
|
||||
{
|
||||
if (*token == '}')
|
||||
{
|
||||
|
@ -3576,7 +3576,7 @@ qboolean ItemParse_cvarFloatList( itemDef_t *item)
|
|||
PC_ParseWarning("end of file inside menu item\n");
|
||||
return qfalse;
|
||||
}
|
||||
if ((int)token > 0) //a normal StringAlloc ptr
|
||||
if ((intptr_t)token > 0) //a normal StringAlloc ptr
|
||||
{
|
||||
if (*token == '}')
|
||||
{
|
||||
|
@ -4727,7 +4727,7 @@ void Item_SetTextExtents(itemDef_t *item, int *width, int *height, const char *t
|
|||
|
||||
// keeps us from computing the widths and heights more than once
|
||||
if (*width == 0 || (item->type == ITEM_TYPE_OWNERDRAW && item->textalignment == ITEM_ALIGN_CENTER)
|
||||
|| ((int)item->text<0 && item->asset != sp_language->modificationCount ) //string package language changed
|
||||
|| ((intptr_t)item->text<0 && item->asset != sp_language->modificationCount ) //string package language changed
|
||||
)
|
||||
{
|
||||
int originalWidth;
|
||||
|
@ -4762,7 +4762,7 @@ void Item_SetTextExtents(itemDef_t *item, int *width, int *height, const char *t
|
|||
}
|
||||
|
||||
ToWindowCoords(&item->textRect.x, &item->textRect.y, &item->window);
|
||||
if ((int)item->text<0 )//string package
|
||||
if ((intptr_t)item->text<0 )//string package
|
||||
{//mark language
|
||||
item->asset = sp_language->modificationCount;
|
||||
}
|
||||
|
@ -4851,9 +4851,9 @@ void Item_Text_Wrapped_Paint(itemDef_t *item)
|
|||
else
|
||||
{
|
||||
textPtr = item->text;
|
||||
if ((int)textPtr < 0) //string package ID
|
||||
if ((intptr_t)textPtr < 0) //string package ID
|
||||
{
|
||||
textPtr = SP_GetStringText(-(int)textPtr);
|
||||
textPtr = SP_GetStringText(-(intptr_t)textPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4921,9 +4921,9 @@ void Item_Text_Paint(itemDef_t *item)
|
|||
else
|
||||
{
|
||||
textPtr = item->text;
|
||||
if ((int)textPtr < 0)
|
||||
if ((intptr_t)textPtr < 0)
|
||||
{
|
||||
textPtr = SP_GetStringText(-(int)textPtr);
|
||||
textPtr = SP_GetStringText(-(intptr_t)textPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4940,9 +4940,9 @@ void Item_Text_Paint(itemDef_t *item)
|
|||
|
||||
if (item->text2) // Is there a second line of text?
|
||||
{
|
||||
if ((int)item->text2 < 0)
|
||||
if ((intptr_t)item->text2 < 0)
|
||||
{
|
||||
textPtr = SP_GetStringText(-(int)item->text2);
|
||||
textPtr = SP_GetStringText(-(intptr_t)item->text2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5615,9 +5615,9 @@ void Item_Multi_Paint(itemDef_t *item)
|
|||
}
|
||||
|
||||
text = Item_Multi_Setting(item);
|
||||
if ((int)text < 0) //it's a striped ID
|
||||
if ((intptr_t)text < 0) //it's a striped ID
|
||||
{
|
||||
text = SP_GetStringText(-(int)text);
|
||||
text = SP_GetStringText(-(intptr_t)text);
|
||||
}
|
||||
assert (text);
|
||||
|
||||
|
@ -5973,9 +5973,9 @@ void Item_Paint(itemDef_t *item)
|
|||
else
|
||||
{ // Draw the desctext
|
||||
const char *textPtr;
|
||||
if ((int)item->descText < 0)
|
||||
if ((intptr_t)item->descText < 0)
|
||||
{
|
||||
textPtr = SP_GetStringText(-(int)item->descText);
|
||||
textPtr = SP_GetStringText(-(intptr_t)item->descText);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6330,9 +6330,9 @@ void Item_Text_AutoWrapped_Paint(itemDef_t *item)
|
|||
else
|
||||
{
|
||||
textPtr = item->text;
|
||||
if ((int)textPtr < 0) //string package ID
|
||||
if ((intptr_t)textPtr < 0) //string package ID
|
||||
{
|
||||
textPtr = SP_GetStringText(-(int)textPtr);
|
||||
textPtr = SP_GetStringText(-(intptr_t)textPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue