mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
Cool stuff :p
This commit is contained in:
parent
caf4fe1182
commit
51acdb155a
4 changed files with 86 additions and 18 deletions
|
@ -6,7 +6,7 @@
|
|||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CD.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15F9.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
||||
|
@ -20,8 +20,8 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CD.tmp" with conte
|
|||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CD.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CE.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15F9.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15FA.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"uix86.dll" /implib:"Release_TA/uix86.lib"
|
||||
.\Release_TA\bg_misc.obj
|
||||
|
@ -35,15 +35,11 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CE.tmp" with conte
|
|||
.\Release_TA\ui_syscalls.obj
|
||||
.\Release_TA\ui_util.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP4CE.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP15FA.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
bg_misc.c
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(873) : warning C4033: 'BG_FindItemForHoldable' must return a value
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1465) : warning C4101: 'p' : unreferenced local variable
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(1464) : warning C4101: 'angles' : unreferenced local variable
|
||||
q_math.c
|
||||
C:\Games\Quake3\rq3source\reaction\game\bg_misc.c(884) : warning C4715: 'BG_FindItemForHoldable' : not all control paths return a value
|
||||
q_shared.c
|
||||
ui_atoms.c
|
||||
ui_gameinfo.c
|
||||
|
@ -58,7 +54,7 @@ Linking...
|
|||
|
||||
|
||||
<h3>Results</h3>
|
||||
uix86.dll - 0 error(s), 4 warning(s)
|
||||
uix86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.8 2002/04/20 15:06:28 makro
|
||||
// Cool stuff :p
|
||||
//
|
||||
// Revision 1.7 2002/04/06 21:40:59 makro
|
||||
// Delayed in-game bot adds. Fixed a small bug in the key
|
||||
// handling code for bot names.
|
||||
|
@ -1086,6 +1089,8 @@ char *UI_GetBotInfoByName( const char *name );
|
|||
int UI_GetNumBots( void );
|
||||
void UI_LoadBots( void );
|
||||
char *UI_GetBotNameByNumber( int num );
|
||||
//Makro - added
|
||||
int UI_SelectedQ3Head( qboolean doUpdate );
|
||||
|
||||
void UI_GetBestScore( int level, int *score, int *skill );
|
||||
void UI_SetBestScore( int level, int score );
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.17 2002/04/20 15:06:28 makro
|
||||
// Cool stuff :p
|
||||
//
|
||||
// Revision 1.16 2002/04/14 21:50:55 makro
|
||||
// Stuff
|
||||
//
|
||||
|
@ -183,6 +186,7 @@ static void UI_ParseGameInfo(const char *teamFile);
|
|||
static void UI_ParseTeamInfo(const char *teamFile);
|
||||
static const char *UI_SelectedMap(int index, int *actual);
|
||||
static const char *UI_SelectedHead(int index, int *actual);
|
||||
|
||||
static int UI_GetIndexFromSelection(int actual);
|
||||
|
||||
int ProcessNewUI( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 );
|
||||
|
@ -4571,6 +4575,23 @@ static const char *UI_SelectedHead(int index, int *actual) {
|
|||
return "";
|
||||
}
|
||||
|
||||
//Makro - added
|
||||
int UI_SelectedQ3Head( qboolean doUpdate ) {
|
||||
//return uiInfo.q3SelectedHead;
|
||||
int i;
|
||||
char currentSkin[64];
|
||||
trap_Cvar_VariableStringBuffer("model", currentSkin, sizeof(currentSkin));
|
||||
|
||||
updateModel |= doUpdate;
|
||||
|
||||
for (i=0; i<uiInfo.q3HeadCount; i++) {
|
||||
if (!strcmp(currentSkin, uiInfo.q3HeadNames[i])) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int UI_GetIndexFromSelection(int actual) {
|
||||
int i, c;
|
||||
c = 0;
|
||||
|
@ -4747,8 +4768,10 @@ static void UI_FeederSelection(float feederID, int index) {
|
|||
if (index >= 0 && index < uiInfo.q3HeadCount) {
|
||||
trap_Cvar_Set( "model", uiInfo.q3HeadNames[index]);
|
||||
trap_Cvar_Set( "headmodel", uiInfo.q3HeadNames[index]);
|
||||
updateModel = qtrue;
|
||||
}
|
||||
//Makro - this should be saved here
|
||||
uiInfo.q3SelectedHead = index;
|
||||
updateModel = qtrue;
|
||||
}
|
||||
} else if (feederID == FEEDER_MAPS || feederID == FEEDER_ALLMAPS) {
|
||||
int actual, map;
|
||||
map = (feederID == FEEDER_ALLMAPS) ? ui_currentNetMap.integer : ui_currentMap.integer;
|
||||
|
@ -5064,6 +5087,7 @@ joingametypes {
|
|||
// two tokens per line, character name and sex
|
||||
// Makro - name and sex for gametypes ? Har har har
|
||||
// They probably mean "name" and "value", heh
|
||||
// I guess copy/paste isn't a coder's best friend after all
|
||||
if (join) {
|
||||
if (!String_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gameType) || !Int_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gtEnum)) {
|
||||
return qfalse;
|
||||
|
@ -5286,7 +5310,7 @@ static void UI_BuildQ3Model_List( void )
|
|||
int numfiles;
|
||||
char dirlist[2048];
|
||||
char filelist[2048];
|
||||
char skinname[64];
|
||||
char skinname[64], currentSkin[64];
|
||||
char scratch[256];
|
||||
char* dirptr;
|
||||
char* fileptr;
|
||||
|
@ -5296,10 +5320,13 @@ static void UI_BuildQ3Model_List( void )
|
|||
int filelen;
|
||||
|
||||
uiInfo.q3HeadCount = 0;
|
||||
//Makro - save current model
|
||||
trap_Cvar_VariableStringBuffer("model", currentSkin, sizeof(currentSkin));
|
||||
|
||||
// iterate directory of all player models
|
||||
numdirs = trap_FS_GetFileList("models/players", "/", dirlist, 2048 );
|
||||
dirptr = dirlist;
|
||||
|
||||
for (i=0; i<numdirs && uiInfo.q3HeadCount < MAX_PLAYERMODELS; i++,dirptr+=dirlen+1)
|
||||
{
|
||||
dirlen = strlen(dirptr);
|
||||
|
@ -5340,6 +5367,10 @@ static void UI_BuildQ3Model_List( void )
|
|||
}
|
||||
if (!dirty) {
|
||||
Com_sprintf( uiInfo.q3HeadNames[uiInfo.q3HeadCount], sizeof(uiInfo.q3HeadNames[uiInfo.q3HeadCount]), scratch);
|
||||
//Makro - see if this model is the selected one
|
||||
if (!strcmp(currentSkin, scratch)) {
|
||||
uiInfo.q3SelectedHead = uiInfo.q3HeadCount;
|
||||
}
|
||||
uiInfo.q3HeadIcons[uiInfo.q3HeadCount++] = trap_R_RegisterShaderNoMip(va("models/players/%s/%s",dirptr,skinname));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.14 2002/04/20 15:06:28 makro
|
||||
// Cool stuff :p
|
||||
//
|
||||
// Revision 1.13 2002/04/14 21:50:55 makro
|
||||
// Stuff
|
||||
//
|
||||
|
@ -48,6 +51,9 @@
|
|||
|
||||
#include "ui_shared.h"
|
||||
|
||||
//Makro - to avoid a warning
|
||||
int UI_SelectedQ3Head( qboolean doUpdate );
|
||||
|
||||
#define SCROLL_TIME_START 500
|
||||
#define SCROLL_TIME_ADJUST 150
|
||||
#define SCROLL_TIME_ADJUSTOFFSET 40
|
||||
|
@ -925,7 +931,6 @@ void Menu_UpdatePosition(menuDef_t *menu) {
|
|||
}
|
||||
|
||||
void Menu_PostParse(menuDef_t *menu) {
|
||||
|
||||
if (menu == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -2916,6 +2921,7 @@ static void Display_CloseCinematics() {
|
|||
}
|
||||
|
||||
void Menus_Activate(menuDef_t *menu) {
|
||||
int i;
|
||||
|
||||
//Makro - better to check for this kind of stuff
|
||||
if (!menu) {
|
||||
|
@ -2943,6 +2949,31 @@ void Menus_Activate(menuDef_t *menu) {
|
|||
|
||||
}
|
||||
|
||||
//Makro - select the right player model icon
|
||||
for (i=0; i<menu->itemCount; i++) {
|
||||
if (menu->items[i]->type == ITEM_TYPE_LISTBOX && menu->items[i]->special == FEEDER_Q3HEADS) {
|
||||
//Makro - select the right player model icon
|
||||
listBoxDef_t *listPtr;
|
||||
int size = 2, start = 0, pos = UI_SelectedQ3Head(qtrue);
|
||||
|
||||
listPtr = (listBoxDef_t*)menu->items[i]->typeData;
|
||||
if (listPtr->elementWidth) {
|
||||
size = (int) (menu->items[i]->window.rect.w / listPtr->elementWidth);
|
||||
if (size < 2)
|
||||
break;
|
||||
start = listPtr->startPos;
|
||||
if ( start + size < pos)
|
||||
start = ((int) (pos / size)) * size;
|
||||
if (start + size > DC->feederCount(FEEDER_Q3HEADS))
|
||||
start = DC->feederCount(FEEDER_Q3HEADS) - size;
|
||||
listPtr->startPos = start;
|
||||
listPtr->endPos = start + size;
|
||||
}
|
||||
listPtr->cursorPos = pos;
|
||||
menu->items[i]->cursorPos = pos;
|
||||
}
|
||||
}
|
||||
|
||||
Display_CloseCinematics();
|
||||
|
||||
}
|
||||
|
@ -3145,8 +3176,8 @@ void Menu_HandleKey(menuDef_t *menu, int key, qboolean down) {
|
|||
case K_ESCAPE:
|
||||
if (!g_waitingForKey && menu->onESC) {
|
||||
itemDef_t it;
|
||||
it.parent = menu;
|
||||
Item_RunScript(&it, menu->onESC);
|
||||
it.parent = menu;
|
||||
Item_RunScript(&it, menu->onESC);
|
||||
}
|
||||
break;
|
||||
case K_TAB:
|
||||
|
@ -3922,15 +3953,20 @@ void UI_ClearBind( const char *cvar ) {
|
|||
|
||||
id = BindingIDFromName(cvar);
|
||||
if (id != -1) {
|
||||
g_bindings[id].bind1 = -1;
|
||||
g_bindings[id].bind2 = -1;
|
||||
if (g_bindings[id].bind1 != -1) {
|
||||
DC->setBinding( g_bindings[id].bind1, "" );
|
||||
g_bindings[id].bind1 = -1;
|
||||
}
|
||||
if (g_bindings[id].bind2 != -1) {
|
||||
DC->setBinding( g_bindings[id].bind2, "" );
|
||||
g_bindings[id].bind2 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
Controls_SetConfig(qtrue);
|
||||
g_waitingForKey = qfalse;
|
||||
g_bindItem = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
||||
|
|
Loading…
Reference in a new issue