diff --git a/reaction/ta_ui/ta_ui.plg b/reaction/ta_ui/ta_ui.plg index d026877b..5f5beaff 100644 --- a/reaction/ta_ui/ta_ui.plg +++ b/reaction/ta_ui/ta_ui.plg @@ -6,7 +6,7 @@ --------------------Configuration: ui - Win32 Release TA--------------------

Command Lines

-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"

Output Window

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...

Results

-uix86.dll - 0 error(s), 4 warning(s) +uix86.dll - 0 error(s), 0 warning(s) diff --git a/reaction/ta_ui/ui_local.h b/reaction/ta_ui/ui_local.h index 4e1d811c..c78b7a8f 100644 --- a/reaction/ta_ui/ui_local.h +++ b/reaction/ta_ui/ui_local.h @@ -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 ); diff --git a/reaction/ta_ui/ui_main.c b/reaction/ta_ui/ui_main.c index d89e6ba4..c7c34905 100644 --- a/reaction/ta_ui/ui_main.c +++ b/reaction/ta_ui/ui_main.c @@ -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= 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; iitemCount; 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) {