no message

This commit is contained in:
Andrei Drexler 2002-03-14 21:52:09 +00:00
parent a806ca6b36
commit 20da944d06
5 changed files with 170 additions and 123 deletions

View File

@ -6,7 +6,7 @@
--------------------Configuration: ui - Win32 Release TA--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP9A.tmp" with contents
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7DA.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\RSP9A.tmp" with conten
"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\RSP9A.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP9B.tmp" with contents
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7DA.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7DB.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,7 +35,7 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP9B.tmp" with conten
.\Release_TA\ui_syscalls.obj
.\Release_TA\ui_util.obj
]
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP9B.tmp"
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7DB.tmp"
<h3>Output Window</h3>
Compiling...
bg_misc.c

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.6 2002/03/14 21:52:08 makro
// no message
//
// Revision 1.5 2002/03/10 22:10:10 makro
// no message
//
@ -437,6 +440,44 @@ qboolean UI_ConsoleCommand( int realTime ) {
}
return qtrue;
}
/*
if ( Q_stricmp (cmd, "ifCvars") == 0) {
if (trap_Argc() >= 4) {
char cvar[MAX_CVAR_VALUE_STRING], cvarValue[MAX_CVAR_VALUE_STRING];
char *val = "";
char command[256];
char script[1024];
qboolean doScript = qfalse;
int i;
Q_strncpyz(cvar, UI_Argv(1), sizeof(cvar));
Q_strncpyz(cvarValue, UI_Argv(2), sizeof(cvarValue));
memset(script, 0, sizeof(script));
for (i=3; i<trap_Argc(); i++) {
Q_strncpyz(command, UI_Argv(i), sizeof(command));
Q_strcat(script, sizeof(script), command);
if (trap_Argc()-i > 1) {
Q_strcat(script, sizeof(script), " ");
}
}
val = UI_Cvar_VariableString(cvar);
if (Q_stricmp(val, cvarValue) == 0) {
doScript = qtrue;
Com_Printf(va("^3%s = %s^7\n", val, cvarValue));
}
if (doScript) {
trap_Cmd_ExecuteText(EXEC_APPEND, va("%s\n", script));
}
} else {
Com_Printf(va("Usage: %s <cvarName> <cvarValue> <script>\n", cmd));
}
return qtrue;
}
*/
if ( Q_stricmp (cmd, "error") == 0 ) {
if ( trap_Cvar_VariableValue("developer") == 1 ) {

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.7 2002/03/14 21:52:08 makro
// no message
//
// Revision 1.6 2002/03/10 22:10:10 makro
// no message
//
@ -271,104 +274,6 @@ void _UI_DrawTopBottom(float x, float y, float w, float h, float size) {
trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
}
//Makro - use different animations for the player model depending on ui_RQ3_modelCommand
animNumber_t UI_RQ3_GetAnimForLegs()
{
/* if ( Q_stricmp (ui_RQ3_model_command.string, "jump") == 0 )
return LEGS_JUMP;
else
if ( Q_stricmp (ui_RQ3_model_command.string, "crouch") == 0 )
return LEGS_IDLECR;
else
if ( Q_stricmp (ui_RQ3_model_command.string, "crouch_fwd") == 0 )
return LEGS_WALKCR;
else
if ( Q_stricmp (ui_RQ3_model_command.string, "crouch_bk") == 0 )
return LEGS_BACKCR;
else
return LEGS_IDLE;
*/
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 2:
return LEGS_BACK;
case 3:
return LEGS_RUN;
case 4:
return LEGS_WALK;
case 5:
return LEGS_JUMP;
case 6:
return LEGS_IDLECR;
case 7:
return LEGS_WALKCR;
default:
return LEGS_IDLE;
}
}
//Makro - use different animations for the player model depending on ui_RQ3_modelCommand
animNumber_t UI_RQ3_GetAnimForTorso()
{
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 101:
return TORSO_RAISE;
case 102:
return TORSO_RAISE;
case 103:
return TORSO_RAISE;
case 104:
return TORSO_RAISE;
case 105:
return TORSO_RAISE;
case 106:
return TORSO_RAISE;
case 107:
return TORSO_RAISE;
case 108:
return TORSO_RAISE;
case 109:
return TORSO_RAISE;
default:
return TORSO_GESTURE;
}
}
//Makro - use different weapons for the player model depending on ui_RQ3_model_command
weapon_t UI_RQ3_GetWeaponForPlayer()
{
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 102:
return WP_M3;
case 103:
return WP_MP5;
case 104:
return WP_HANDCANNON;
case 105:
return WP_SSG3000;
case 106:
return WP_M4;
case 107:
return WP_AKIMBO;
case 108:
return WP_KNIFE;
case 109:
return WP_GRENADE;
default:
return WP_PISTOL;
}
}
/*
================
UI_DrawRect
@ -1398,6 +1303,99 @@ static void UI_DrawMapCinematic(rectDef_t *rect, float scale, vec4_t color, qboo
static qboolean updateModel = qtrue;
static qboolean q3Model = qfalse;
static animNumber_t RQ3_UI_legsAnim = LEGS_IDLE;
static animNumber_t RQ3_UI_torsoAnim = TORSO_STAND;
static weapon_t RQ3_UI_weapon = WP_PISTOL;
//Makro - use different animations for the player model depending on ui_RQ3_modelCommand
animNumber_t UI_RQ3_GetAnimForLegs()
{
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 1:
return LEGS_IDLE;
break;
case 2:
return LEGS_BACK;
break;
case 3:
return LEGS_RUN;
break;
case 4:
return LEGS_WALK;
break;
case 5:
return LEGS_JUMP;
break;
case 6:
return LEGS_IDLECR;
break;
case 7:
return LEGS_WALKCR;
break;
default:
return RQ3_UI_legsAnim;
break;
}
}
//Makro - use different animations for the player model depending on ui_RQ3_modelCommand
animNumber_t UI_RQ3_GetAnimForTorso()
{
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 8:
return TORSO_GESTURE;
break;
default:
return RQ3_UI_torsoAnim;
break;
}
}
//Makro - use different weapons for the player model depending on ui_RQ3_model_command
weapon_t UI_RQ3_GetWeaponForPlayer()
{
int cmd = (int) trap_Cvar_VariableValue("ui_RQ3_modelCommand");
switch (cmd) {
case 101:
return WP_PISTOL;
break;
case 102:
return WP_M3;
break;
case 103:
return WP_MP5;
break;
case 104:
return WP_HANDCANNON;
break;
case 105:
return WP_SSG3000;
break;
case 106:
return WP_M4;
break;
case 107:
return WP_AKIMBO;
break;
case 108:
return WP_KNIFE;
break;
case 109:
return WP_GRENADE;
break;
default:
return RQ3_UI_weapon;
break;
}
}
static void UI_DrawPlayerModel(rectDef_t *rect) {
static playerInfo_t info;
@ -1427,27 +1425,26 @@ static void UI_DrawPlayerModel(rectDef_t *rect) {
}
//updateModel = updateModel || (trap_Cvar_VariableValue("ui_RQ3_modelCommand") != 0);
if (updateModel) {
memset( &info, 0, sizeof(playerInfo_t) );
viewangles[YAW] = 180 + 40;
viewangles[PITCH] = 0;
viewangles[ROLL] = 0;
VectorClear( moveangles );
UI_PlayerInfo_SetModel( &info, model, head, team);
//Blaze: Changed WP_MACHINEGUN to WP_PISTOL
//Makro: Changed from WP_PISTOL to custom function
UI_PlayerInfo_SetInfo( &info, UI_RQ3_GetAnimForLegs(), UI_RQ3_GetAnimForTorso(), viewangles, vec3_origin, UI_RQ3_GetWeaponForPlayer(), qfalse );
if (updateModel || (trap_Cvar_VariableValue("ui_RQ3_modelCommand") != 0)) {
if (updateModel) {
memset( &info, 0, sizeof(playerInfo_t) );
}
viewangles[YAW] = 180 + 40;
viewangles[PITCH] = 0;
viewangles[ROLL] = 0;
VectorClear( moveangles );
if (updateModel) {
UI_PlayerInfo_SetModel( &info, model, head, team);
}
//Blaze: Changed WP_MACHINEGUN to WP_PISTOL
//Makro: Changed from WP_PISTOL to custom function
RQ3_UI_legsAnim = UI_RQ3_GetAnimForLegs();
RQ3_UI_torsoAnim = UI_RQ3_GetAnimForTorso();
RQ3_UI_weapon = UI_RQ3_GetWeaponForPlayer();
UI_PlayerInfo_SetInfo( &info, RQ3_UI_legsAnim, RQ3_UI_torsoAnim, viewangles, vec3_origin, RQ3_UI_weapon, qfalse );
// UI_RegisterClientModelname( &info, model, head, team);
updateModel = qfalse;
}
if (trap_Cvar_VariableValue("ui_RQ3_modelCommand") != 0) {
//memset( &info, 0, sizeof(playerInfo_t) );
viewangles[YAW] = 180 + 40;
viewangles[PITCH] = 0;
viewangles[ROLL] = 0;
UI_PlayerInfo_SetInfo( &info, UI_RQ3_GetAnimForLegs(), UI_RQ3_GetAnimForTorso(), viewangles, vec3_origin, UI_RQ3_GetWeaponForPlayer(), qfalse );
trap_Cvar_SetValue( "ui_RQ3_modelCommand", 0);
updateModel = qfalse;
trap_Cvar_SetValue( "ui_RQ3_modelCommand", 0);
}
UI_DrawPlayer( rect->x, rect->y, rect->w, rect->h, &info, uiInfo.uiDC.realTime / 2);
@ -1643,6 +1640,7 @@ static void UI_DrawOpponent(rectDef_t *rect) {
VectorClear( moveangles );
UI_PlayerInfo_SetModel( &info2, model, headmodel, "");
//Makro - changed to custom function
//FIXME - copy code from player model drawing function
UI_PlayerInfo_SetInfo( &info2, UI_RQ3_GetAnimForLegs(), UI_RQ3_GetAnimForTorso(), viewangles, vec3_origin, UI_RQ3_GetWeaponForPlayer(), qfalse );
UI_RegisterClientModelname( &info2, model, headmodel, team);
updateOpponentModel = qfalse;

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.9 2002/03/14 21:52:08 makro
// no message
//
// Revision 1.8 2002/03/10 22:10:10 makro
// no message
//
@ -2618,7 +2621,7 @@ qboolean Item_HandleKey(itemDef_t *item, int key, qboolean down) {
return Item_OwnerDraw_HandleKey(item, key);
break;
case ITEM_TYPE_BIND:
return Item_Bind_HandleKey(item, key, down);
return Item_Bind_HandleKey(item, key, down);
break;
case ITEM_TYPE_SLIDER:
return Item_Slider_HandleKey(item, key, down);

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.9 2002/03/14 21:52:08 makro
// no message
//
// Revision 1.8 2002/03/10 22:10:10 makro
// no message
//
@ -139,6 +142,8 @@ typedef struct {
//Makro - adding support for shortcut keys
//const char *shortcutKey;
int shortcutKey;
//Makro - drop-shadow effect
int shadowStyle;
const char *group; // if it belongs to a group
const char *cinematicName; // cinematic name
int cinematic; // cinematic handle