From e84d04174b6b96e9aa55d5c9a00c8cc0b300b1af Mon Sep 17 00:00:00 2001 From: archive Date: Tue, 7 Nov 2000 00:00:00 +0000 Subject: [PATCH] as released 2000-11-07 --- Network/delta.lst | 6 +- cl_dll/GameStudioModelRenderer.cpp | 113 ++ cl_dll/GameStudioModelRenderer.h | 19 + cl_dll/GameStudioModelRenderer_Sample.cpp | 985 ++++++++++++ cl_dll/GameStudioModelRenderer_Sample.h | 48 + cl_dll/StudioModelRenderer.cpp | 1649 +++++++++++++++++++++ cl_dll/StudioModelRenderer.h | 182 +++ cl_dll/cl_dll.dsp | 24 + cl_dll/cl_dll.dsw | 6 +- cl_dll/cl_dll.mak | 1245 ---------------- cl_dll/entity.cpp | 11 + cl_dll/ev_hldm.cpp | 27 +- cl_dll/hl/hl_weapons.cpp | 187 +++ cl_dll/input.cpp | 4 +- cl_dll/message.cpp | 56 +- cl_dll/studio_util.cpp | 244 +++ cl_dll/studio_util.h | 33 + cl_dll/vgui_TeamFortressViewport.cpp | 14 +- cl_dll/view.cpp | 16 + common/beamdef.h | 2 +- common/cl_entity.h | 2 +- common/com_model.h | 344 +++++ common/con_nprint.h | 2 +- common/const.h | 2 +- common/cvardef.h | 2 +- common/demo_api.h | 2 +- common/dlight.h | 2 +- common/entity_state.h | 2 +- common/entity_types.h | 2 +- common/event_api.h | 2 +- common/event_args.h | 2 +- common/in_buttons.h | 2 +- common/mathlib.h | 7 +- common/netadr.h | 2 +- common/particledef.h | 4 +- common/pmtrace.h | 2 +- common/qfont.h | 2 +- common/r_studioint.h | 108 ++ common/ref_params.h | 2 +- common/studio_event.h | 2 +- common/usercmd.h | 2 +- common/weaponinfo.h | 2 +- dedicated/Makefile | 110 +- dedicated/sys_ded.cpp | 4 +- dlls/client.cpp | 10 + dlls/enginecallback.h | 4 +- dlls/gauss.cpp | 11 +- dlls/mp.dsp | 31 +- dlls/mp.dsw | 37 - dlls/player.cpp | 18 + dlls/player.h | 12 + engine/custom.h | 3 + engine/edict.h | 2 + engine/eiface.h | 26 +- engine/studio.h | 10 +- pm_shared/pm_defs.h | 25 +- pm_shared/pm_shared.c | 100 +- utils/bspinfo/bspinfo.mak | 253 ---- utils/makels/makels.mak | 212 --- utils/mkmovie/mkmovie.mak | 196 --- utils/qbsp2/qbsp2.mak | 466 ------ utils/qbsp2/writebsp.mak | 179 --- utils/qcsg/csg.h | 6 +- utils/qcsg/map.c | 94 +- utils/qcsg/qcsg.c | 3 +- utils/qcsg/qcsg.mak | 605 -------- utils/qcsg/textures.c | 97 +- utils/qlumpy/qlumpy.mak | 412 ----- utils/qrad/qrad.mak | 576 ------- utils/smdlexp/smdlexp.mak | 325 ---- utils/sprgen/sprgen.mak | 335 ----- utils/studiomdl/studiomdl.mak | 442 ------ utils/visx2/vis.mak | 493 ------ 73 files changed, 4461 insertions(+), 6006 deletions(-) create mode 100644 cl_dll/GameStudioModelRenderer.cpp create mode 100644 cl_dll/GameStudioModelRenderer.h create mode 100644 cl_dll/GameStudioModelRenderer_Sample.cpp create mode 100644 cl_dll/GameStudioModelRenderer_Sample.h create mode 100644 cl_dll/StudioModelRenderer.cpp create mode 100644 cl_dll/StudioModelRenderer.h delete mode 100644 cl_dll/cl_dll.mak create mode 100644 cl_dll/studio_util.cpp create mode 100644 cl_dll/studio_util.h create mode 100644 common/com_model.h create mode 100644 common/r_studioint.h delete mode 100644 dlls/mp.dsw delete mode 100644 utils/bspinfo/bspinfo.mak delete mode 100644 utils/makels/makels.mak delete mode 100644 utils/mkmovie/mkmovie.mak delete mode 100644 utils/qbsp2/qbsp2.mak delete mode 100644 utils/qbsp2/writebsp.mak delete mode 100644 utils/qcsg/qcsg.mak delete mode 100644 utils/qlumpy/qlumpy.mak delete mode 100644 utils/qrad/qrad.mak delete mode 100644 utils/smdlexp/smdlexp.mak delete mode 100644 utils/sprgen/sprgen.mak delete mode 100644 utils/studiomdl/studiomdl.mak delete mode 100644 utils/visx2/vis.mak diff --git a/Network/delta.lst b/Network/delta.lst index 4d45ad7..b89b1c6 100644 --- a/Network/delta.lst +++ b/Network/delta.lst @@ -99,7 +99,11 @@ entity_state_t gamedll Entity_Encode DEFINE_DELTA( aiment, DT_INTEGER, 11, 1.0 ), DEFINE_DELTA( basevelocity[0], DT_SIGNED | DT_FLOAT, 16, 8.0 ), DEFINE_DELTA( basevelocity[1], DT_SIGNED | DT_FLOAT, 16, 8.0 ), - DEFINE_DELTA( basevelocity[2], DT_SIGNED | DT_FLOAT, 16, 8.0 ) + DEFINE_DELTA( basevelocity[2], DT_SIGNED | DT_FLOAT, 16, 8.0 ), + + // Playerclass signifies it's a decalable glass item when referring to an object + + DEFINE_DELTA( playerclass, DT_INTEGER, 1, 1.0 ) } entity_state_player_t gamedll Player_Encode diff --git a/cl_dll/GameStudioModelRenderer.cpp b/cl_dll/GameStudioModelRenderer.cpp new file mode 100644 index 0000000..8a21ee6 --- /dev/null +++ b/cl_dll/GameStudioModelRenderer.cpp @@ -0,0 +1,113 @@ +#include +#include "hud.h" +#include "cl_util.h" +#include "const.h" +#include "com_model.h" +#include "studio.h" +#include "entity_state.h" +#include "cl_entity.h" +#include "dlight.h" +#include "triangleapi.h" + +#include +#include +#include +#include + +#include "studio_util.h" +#include "r_studioint.h" + +#include "StudioModelRenderer.h" +#include "GameStudioModelRenderer.h" + +// +// Override the StudioModelRender virtual member functions here to implement custom bone +// setup, blending, etc. +// + +// Global engine <-> studio model rendering code interface +extern engine_studio_api_t IEngineStudio; + +// The renderer object, created on the stack. +CGameStudioModelRenderer g_StudioRenderer; + +/* +==================== +CGameStudioModelRenderer + +==================== +*/ +CGameStudioModelRenderer::CGameStudioModelRenderer( void ) +{ +} + +//////////////////////////////////// +// Hooks to class implementation +//////////////////////////////////// + +/* +==================== +R_StudioDrawPlayer + +==================== +*/ +int R_StudioDrawPlayer( int flags, entity_state_t *pplayer ) +{ + return g_StudioRenderer.StudioDrawPlayer( flags, pplayer ); +} + +/* +==================== +R_StudioDrawModel + +==================== +*/ +int R_StudioDrawModel( int flags ) +{ + return g_StudioRenderer.StudioDrawModel( flags ); +} + +/* +==================== +R_StudioInit + +==================== +*/ +void R_StudioInit( void ) +{ + g_StudioRenderer.Init(); +} + +// The simple drawing interface we'll pass back to the engine +r_studio_interface_t studio = +{ + STUDIO_INTERFACE_VERSION, + R_StudioDrawModel, + R_StudioDrawPlayer, +}; + +/* +==================== +HUD_GetStudioModelInterface + +Export this function for the engine to use the studio renderer class to render objects. +==================== +*/ +#define DLLEXPORT __declspec( dllexport ) +extern "C" int DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio ) +{ + if ( version != STUDIO_INTERFACE_VERSION ) + return 0; + + // Point the engine to our callbacks + *ppinterface = &studio; + + // Copy in engine helper functions + memcpy( &IEngineStudio, pstudio, sizeof( IEngineStudio ) ); + + // Initialize local variables, etc. + R_StudioInit(); + + // Success + return 1; +} diff --git a/cl_dll/GameStudioModelRenderer.h b/cl_dll/GameStudioModelRenderer.h new file mode 100644 index 0000000..92c596e --- /dev/null +++ b/cl_dll/GameStudioModelRenderer.h @@ -0,0 +1,19 @@ +#if !defined( GAMESTUDIOMODELRENDERER_H ) +#define GAMESTUDIOMODELRENDERER_H +#if defined( _WIN32 ) +#pragma once +#endif + +/* +==================== +CGameStudioModelRenderer + +==================== +*/ +class CGameStudioModelRenderer : public CStudioModelRenderer +{ +public: + CGameStudioModelRenderer( void ); +}; + +#endif // GAMESTUDIOMODELRENDERER_H \ No newline at end of file diff --git a/cl_dll/GameStudioModelRenderer_Sample.cpp b/cl_dll/GameStudioModelRenderer_Sample.cpp new file mode 100644 index 0000000..d9592b0 --- /dev/null +++ b/cl_dll/GameStudioModelRenderer_Sample.cpp @@ -0,0 +1,985 @@ +#include +#include "hud.h" +#include "cl_util.h" +#include "const.h" +#include "com_model.h" +#include "studio.h" +#include "entity_state.h" +#include "cl_entity.h" +#include "dlight.h" +#include "triangleapi.h" + +#include +#include +#include +#include + +#include "studio_util.h" +#include "r_studioint.h" + +#include "StudioModelRenderer.h" +#include "GameStudioModelRenderer.h" + +// Predicted values saved off in hl_weapons.cpp +void Game_GetSequence( int *seq, int *gaitseq ); +void Game_GetOrientation( float *o, float *a ); + +float g_flStartScaleTime; +int iPrevRenderState; +int iRenderStateChanged; + +// Global engine <-> studio model rendering code interface +extern engine_studio_api_t IEngineStudio; + +typedef struct +{ + vec3_t origin; + vec3_t angles; + + vec3_t realangles; + + float animtime; + float frame; + int sequence; + int gaitsequence; + float framerate; + + int m_fSequenceLoops; + int m_fSequenceFinished; + + byte controller[ 4 ]; + byte blending[ 2 ]; + + latchedvars_t lv; +} client_anim_state_t; + +static client_anim_state_t g_state; +static client_anim_state_t g_clientstate; + +// The renderer object, created on the stack. +CGameStudioModelRenderer g_StudioRenderer; +/* +==================== +CGameStudioModelRenderer + +==================== +*/ +CGameStudioModelRenderer::CGameStudioModelRenderer( void ) +{ + // If you want to predict animations locally, set this to TRUE + // NOTE: The animation code is somewhat broken, but gives you a sense for how + // to do client side animation of the predicted player in a third person game. + m_bLocal = false; +} + +/* +==================== +StudioSetupBones + +==================== +*/ +void CGameStudioModelRenderer::StudioSetupBones ( void ) +{ + int i; + double f; + + mstudiobone_t *pbones; + mstudioseqdesc_t *pseqdesc; + mstudioanim_t *panim; + + static float pos[MAXSTUDIOBONES][3]; + static vec4_t q[MAXSTUDIOBONES]; + float bonematrix[3][4]; + + static float pos2[MAXSTUDIOBONES][3]; + static vec4_t q2[MAXSTUDIOBONES]; + static float pos3[MAXSTUDIOBONES][3]; + static vec4_t q3[MAXSTUDIOBONES]; + static float pos4[MAXSTUDIOBONES][3]; + static vec4_t q4[MAXSTUDIOBONES]; + + // Use default bone setup for nonplayers + if ( !m_pCurrentEntity->player ) + { + CStudioModelRenderer::StudioSetupBones(); + return; + } + + // Bound sequence number. + if ( m_pCurrentEntity->curstate.sequence >= m_pStudioHeader->numseq ) + { + m_pCurrentEntity->curstate.sequence = 0; + } + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence; + + if ( m_pPlayerInfo && m_pPlayerInfo->gaitsequence != 0 ) + { + f = m_pPlayerInfo->gaitframe; + } + else + { + f = StudioEstimateFrame( pseqdesc ); + } + + // This game knows how to do three way blending + if ( pseqdesc->numblends == 3 ) + { + float s; + + // Get left anim + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + + // Blending is 0-127 == Left to Middle, 128 to 255 == Middle to right + if ( m_pCurrentEntity->curstate.blending[0] <= 127 ) + { + StudioCalcRotations( pos, q, pseqdesc, panim, f ); + + // Scale 0-127 blending up to 0-255 + s = m_pCurrentEntity->curstate.blending[0]; + s = ( s * 2.0 ); + } + else + { + + // Skip ahead to middle + panim += m_pStudioHeader->numbones; + + StudioCalcRotations( pos, q, pseqdesc, panim, f ); + + // Scale 127-255 blending up to 0-255 + s = m_pCurrentEntity->curstate.blending[0]; + s = 2.0 * ( s - 127.0 ); + } + + // Normalize interpolant + s /= 255.0; + + // Go to middle or right + panim += m_pStudioHeader->numbones; + + StudioCalcRotations( pos2, q2, pseqdesc, panim, f ); + + // Spherically interpolate the bones + StudioSlerpBones( q, pos, q2, pos2, s ); + } + else + { + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + StudioCalcRotations( pos, q, pseqdesc, panim, f ); + } + + // Are we in the process of transitioning from one sequence to another. + if ( m_fDoInterp && + m_pCurrentEntity->latched.sequencetime && + ( m_pCurrentEntity->latched.sequencetime + 0.2 > m_clTime ) && + ( m_pCurrentEntity->latched.prevsequence < m_pStudioHeader->numseq )) + { + // blend from last sequence + static float pos1b[MAXSTUDIOBONES][3]; + static vec4_t q1b[MAXSTUDIOBONES]; + float s; + + // Blending value into last sequence + unsigned char prevseqblending = m_pCurrentEntity->latched.prevseqblending[ 0 ]; + + // Point at previous sequenece + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->latched.prevsequence; + + // Know how to do three way blends + if ( pseqdesc->numblends == 3 ) + { + float s; + + // Get left animation + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + + if ( prevseqblending <= 127 ) + { + // Set up bones based on final frame of previous sequence + StudioCalcRotations( pos1b, q1b, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + s = prevseqblending; + s = ( s * 2.0 ); + } + else + { + // Skip to middle blend + panim += m_pStudioHeader->numbones; + + StudioCalcRotations( pos1b, q1b, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + s = prevseqblending; + s = 2.0 * ( s - 127.0 ); + } + + // Normalize + s /= 255.0; + + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos2, q2, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + // Interpolate bones + StudioSlerpBones( q1b, pos1b, q2, pos2, s ); + } + else + { + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + // clip prevframe + StudioCalcRotations( pos1b, q1b, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + } + + // Now blend last frame of previous sequence with current sequence. + s = 1.0 - (m_clTime - m_pCurrentEntity->latched.sequencetime) / 0.2; + StudioSlerpBones( q, pos, q1b, pos1b, s ); + } + else + { + m_pCurrentEntity->latched.prevframe = f; + } + + // Now convert quaternions and bone positions into matrices + pbones = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex); + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + QuaternionMatrix( q[i], bonematrix ); + + bonematrix[0][3] = pos[i][0]; + bonematrix[1][3] = pos[i][1]; + bonematrix[2][3] = pos[i][2]; + + if (pbones[i].parent == -1) + { + if ( IEngineStudio.IsHardware() ) + { + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + else + { + ConcatTransforms ((*m_paliastransform), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + + // Apply client-side effects to the transformation matrix + StudioFxTransform( m_pCurrentEntity, (*m_pbonetransform)[i] ); + } + else + { + ConcatTransforms ((*m_pbonetransform)[pbones[i].parent], bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_plighttransform)[pbones[i].parent], bonematrix, (*m_plighttransform)[i]); + } + } +} + +/* +==================== +StudioEstimateGait + +==================== +*/ +void CGameStudioModelRenderer::StudioEstimateGait( entity_state_t *pplayer ) +{ + float dt; + vec3_t est_velocity; + + dt = (m_clTime - m_clOldTime); + dt = max( 0.0, dt ); + dt = min( 1.0, dt ); + + if (dt == 0 || m_pPlayerInfo->renderframe == m_nFrameCount) + { + m_flGaitMovement = 0; + return; + } + + // VectorAdd( pplayer->velocity, pplayer->prediction_error, est_velocity ); + if ( m_fGaitEstimation ) + { + VectorSubtract( m_pCurrentEntity->origin, m_pPlayerInfo->prevgaitorigin, est_velocity ); + VectorCopy( m_pCurrentEntity->origin, m_pPlayerInfo->prevgaitorigin ); + m_flGaitMovement = Length( est_velocity ); + if (dt <= 0 || m_flGaitMovement / dt < 5) + { + m_flGaitMovement = 0; + est_velocity[0] = 0; + est_velocity[1] = 0; + } + } + else + { + VectorCopy( pplayer->velocity, est_velocity ); + m_flGaitMovement = Length( est_velocity ) * dt; + } + + if (est_velocity[1] == 0 && est_velocity[0] == 0) + { + float flYawDiff = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; + flYawDiff = flYawDiff - (int)(flYawDiff / 360) * 360; + if (flYawDiff > 180) + flYawDiff -= 360; + if (flYawDiff < -180) + flYawDiff += 360; + + if (dt < 0.25) + flYawDiff *= dt * 4; + else + flYawDiff *= dt; + + m_pPlayerInfo->gaityaw += flYawDiff; + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - (int)(m_pPlayerInfo->gaityaw / 360) * 360; + + m_flGaitMovement = 0; + } + else + { + m_pPlayerInfo->gaityaw = (atan2(est_velocity[1], est_velocity[0]) * 180 / M_PI); + if (m_pPlayerInfo->gaityaw > 180) + m_pPlayerInfo->gaityaw = 180; + if (m_pPlayerInfo->gaityaw < -180) + m_pPlayerInfo->gaityaw = -180; + } + +} + +/* +==================== +StudioProcessGait + +==================== +*/ +void CGameStudioModelRenderer::StudioProcessGait( entity_state_t *pplayer ) +{ + mstudioseqdesc_t *pseqdesc; + float dt; + float flYaw; // view direction relative to movement + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence; + + m_pCurrentEntity->angles[PITCH] = 0; + m_pCurrentEntity->latched.prevangles[PITCH] = m_pCurrentEntity->angles[PITCH]; + + dt = (m_clTime - m_clOldTime); + dt = max( 0.0, dt ); + dt = min( 1.0, dt ); + + StudioEstimateGait( pplayer ); + + // calc side to side turning + flYaw = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; + + flYaw = fmod( flYaw, 360.0 ); + + if (flYaw < -180) + { + flYaw = flYaw + 360; + } + else if (flYaw > 180) + { + flYaw = flYaw - 360; + } + + float maxyaw = 120.0; + + if (flYaw > maxyaw) + { + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - 180; + m_flGaitMovement = -m_flGaitMovement; + flYaw = flYaw - 180; + } + else if (flYaw < -maxyaw) + { + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw + 180; + m_flGaitMovement = -m_flGaitMovement; + flYaw = flYaw + 180; + } + + float blend_yaw = ( flYaw / 90.0 ) * 128.0 + 127.0; + blend_yaw = min( 255.0, blend_yaw ); + blend_yaw = max( 0.0, blend_yaw ); + + blend_yaw = 255.0 - blend_yaw; + + m_pCurrentEntity->curstate.blending[0] = (int)(blend_yaw); + m_pCurrentEntity->latched.prevblending[0] = m_pCurrentEntity->curstate.blending[0]; + m_pCurrentEntity->latched.prevseqblending[0] = m_pCurrentEntity->curstate.blending[0]; + + m_pCurrentEntity->angles[YAW] = m_pPlayerInfo->gaityaw; + if (m_pCurrentEntity->angles[YAW] < -0) + { + m_pCurrentEntity->angles[YAW] += 360; + } + m_pCurrentEntity->latched.prevangles[YAW] = m_pCurrentEntity->angles[YAW]; + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + pplayer->gaitsequence; + + // Calc gait frame + if (pseqdesc->linearmovement[0] > 0) + { + m_pPlayerInfo->gaitframe += (m_flGaitMovement / pseqdesc->linearmovement[0]) * pseqdesc->numframes; + } + else + { + m_pPlayerInfo->gaitframe += pseqdesc->fps * dt * m_pCurrentEntity->curstate.framerate; + } + + // Do modulo + m_pPlayerInfo->gaitframe = m_pPlayerInfo->gaitframe - (int)(m_pPlayerInfo->gaitframe / pseqdesc->numframes) * pseqdesc->numframes; + if (m_pPlayerInfo->gaitframe < 0) + { + m_pPlayerInfo->gaitframe += pseqdesc->numframes; + } +} + +/* +============================== +SavePlayerState + +For local player, in third person, we need to store real render data and then + setup for with fake/client side animation data +============================== +*/ +void CGameStudioModelRenderer::SavePlayerState( entity_state_t *pplayer ) +{ + client_anim_state_t *st; + cl_entity_t *ent = IEngineStudio.GetCurrentEntity(); + assert( ent ); + if ( !ent ) + return; + + st = &g_state; + + st->angles = ent->curstate.angles; + st->origin = ent->curstate.origin; + + st->realangles = ent->angles; + + st->sequence = ent->curstate.sequence; + st->gaitsequence = pplayer->gaitsequence; + st->animtime = ent->curstate.animtime; + st->frame = ent->curstate.frame; + st->framerate = ent->curstate.framerate; + memcpy( st->blending, ent->curstate.blending, 2 ); + memcpy( st->controller, ent->curstate.controller, 4 ); + + st->lv = ent->latched; +} + +void GetSequenceInfo( void *pmodel, client_anim_state_t *pev, float *pflFrameRate, float *pflGroundSpeed ) +{ + studiohdr_t *pstudiohdr; + + pstudiohdr = (studiohdr_t *)pmodel; + if (! pstudiohdr) + return; + + mstudioseqdesc_t *pseqdesc; + + if (pev->sequence >= pstudiohdr->numseq) + { + *pflFrameRate = 0.0; + *pflGroundSpeed = 0.0; + return; + } + + pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + (int)pev->sequence; + + if (pseqdesc->numframes > 1) + { + *pflFrameRate = 256 * pseqdesc->fps / (pseqdesc->numframes - 1); + *pflGroundSpeed = sqrt( pseqdesc->linearmovement[0]*pseqdesc->linearmovement[0]+ pseqdesc->linearmovement[1]*pseqdesc->linearmovement[1]+ pseqdesc->linearmovement[2]*pseqdesc->linearmovement[2] ); + *pflGroundSpeed = *pflGroundSpeed * pseqdesc->fps / (pseqdesc->numframes - 1); + } + else + { + *pflFrameRate = 256.0; + *pflGroundSpeed = 0.0; + } +} + +int GetSequenceFlags( void *pmodel, client_anim_state_t *pev ) +{ + studiohdr_t *pstudiohdr; + + pstudiohdr = (studiohdr_t *)pmodel; + if ( !pstudiohdr || pev->sequence >= pstudiohdr->numseq ) + return 0; + + mstudioseqdesc_t *pseqdesc; + pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + (int)pev->sequence; + + return pseqdesc->flags; +} + +float StudioFrameAdvance ( client_anim_state_t *st, float framerate, float flInterval ) +{ + if (flInterval == 0.0) + { + flInterval = (gEngfuncs.GetClientTime() - st->animtime); + if (flInterval <= 0.001) + { + st->animtime = gEngfuncs.GetClientTime(); + return 0.0; + } + } + if (!st->animtime) + flInterval = 0.0; + + st->frame += flInterval * framerate * st->framerate; + st->animtime = gEngfuncs.GetClientTime(); + + if (st->frame < 0.0 || st->frame >= 256.0) + { + if ( st->m_fSequenceLoops ) + st->frame -= (int)(st->frame / 256.0) * 256.0; + else + st->frame = (st->frame < 0.0) ? 0 : 255; + st->m_fSequenceFinished = TRUE; // just in case it wasn't caught in GetEvents + } + + return flInterval; +} + +/* +============================== +SetupClientAnimation + +Called to set up local player's animation values +============================== +*/ +void CGameStudioModelRenderer::SetupClientAnimation( entity_state_t *pplayer ) +{ + static double oldtime; + double curtime, dt; + + client_anim_state_t *st; + float fr, gs; + + cl_entity_t *ent = IEngineStudio.GetCurrentEntity(); + assert( ent ); + if ( !ent ) + return; + + curtime = gEngfuncs.GetClientTime(); + dt = curtime - oldtime; + dt = min( 1.0, max( 0.0, dt ) ); + + oldtime = curtime; + st = &g_clientstate; + + st->framerate = 1.0; + + int oldseq = st->sequence; + Game_GetSequence( &st->sequence, &st->gaitsequence ); //CVAR_GET_FLOAT( "sequence" ); + Game_GetOrientation( (float *)&st->origin, (float *)&st->angles ); + st->realangles = st->angles; + + if ( st->sequence != oldseq ) + { + st->frame = 0.0; + st->lv.prevsequence = oldseq; + st->lv.sequencetime = st->animtime; + + memcpy( st->lv.prevseqblending, st->blending, 2 ); + memcpy( st->lv.prevcontroller, st->controller, 4 ); + } + + void *pmodel = (studiohdr_t *)IEngineStudio.Mod_Extradata( ent->model ); + + GetSequenceInfo( pmodel, st, &fr, &gs ); + st->m_fSequenceLoops = ((GetSequenceFlags( pmodel, st ) & STUDIO_LOOPING) != 0); + StudioFrameAdvance( st, fr, dt ); + +// gEngfuncs.Con_Printf( "gs %i frame %f\n", st->gaitsequence, st->frame ); + + ent->angles = st->realangles; + ent->curstate.angles = st->angles; + ent->curstate.origin = st->origin; + + ent->curstate.sequence = st->sequence; + pplayer->gaitsequence = st->gaitsequence; + ent->curstate.animtime = st->animtime; + ent->curstate.frame = st->frame; + ent->curstate.framerate = st->framerate; + memcpy( ent->curstate.blending, st->blending, 2 ); + memcpy( ent->curstate.controller, st->controller, 4 ); + + ent->latched = st->lv; +} + +/* +============================== +RestorePlayerState + +Called to restore original player state information +============================== +*/ +void CGameStudioModelRenderer::RestorePlayerState( entity_state_t *pplayer ) +{ + client_anim_state_t *st; + cl_entity_t *ent = IEngineStudio.GetCurrentEntity(); + assert( ent ); + if ( !ent ) + return; + + st = &g_clientstate; + + st->angles = ent->curstate.angles; + st->origin = ent->curstate.origin; + st->realangles = ent->angles; + + st->sequence = ent->curstate.sequence; + st->gaitsequence = pplayer->gaitsequence; + st->animtime = ent->curstate.animtime; + st->frame = ent->curstate.frame; + st->framerate = ent->curstate.framerate; + memcpy( st->blending, ent->curstate.blending, 2 ); + memcpy( st->controller, ent->curstate.controller, 4 ); + + st->lv = ent->latched; + + st = &g_state; + + ent->curstate.angles = st->angles; + ent->curstate.origin = st->origin; + ent->angles = st->realangles; + + ent->curstate.sequence = st->sequence; + pplayer->gaitsequence = st->gaitsequence; + ent->curstate.animtime = st->animtime; + ent->curstate.frame = st->frame; + ent->curstate.framerate = st->framerate; + memcpy( ent->curstate.blending, st->blending, 2 ); + memcpy( ent->curstate.controller, st->controller, 4 ); + + ent->latched = st->lv; +} + +/* +============================== +StudioDrawPlayer + +============================== +*/ +int CGameStudioModelRenderer::StudioDrawPlayer( int flags, entity_state_t *pplayer ) +{ + int iret = 0; + + bool isLocalPlayer = false; + + // Set up for client? + if ( m_bLocal && IEngineStudio.GetCurrentEntity() == gEngfuncs.GetLocalPlayer() ) + { + isLocalPlayer = true; + } + + if ( isLocalPlayer ) + { + // Store original data + SavePlayerState( pplayer ); + + // Copy in client side animation data + SetupClientAnimation( pplayer ); + } + + // Call real draw function + iret = _StudioDrawPlayer( flags, pplayer ); + + // Restore for client? + if ( isLocalPlayer ) + { + // Restore the original data for the player + RestorePlayerState( pplayer ); + } + + return iret; +} + +/* +==================== +_StudioDrawPlayer + +==================== +*/ +int CGameStudioModelRenderer::_StudioDrawPlayer( int flags, entity_state_t *pplayer ) +{ + alight_t lighting; + vec3_t dir; + + m_pCurrentEntity = IEngineStudio.GetCurrentEntity(); + IEngineStudio.GetTimes( &m_nFrameCount, &m_clTime, &m_clOldTime ); + IEngineStudio.GetViewInfo( m_vRenderOrigin, m_vUp, m_vRight, m_vNormal ); + IEngineStudio.GetAliasScale( &m_fSoftwareXScale, &m_fSoftwareYScale ); + + m_nPlayerIndex = pplayer->number - 1; + + if (m_nPlayerIndex < 0 || m_nPlayerIndex >= gEngfuncs.GetMaxClients()) + return 0; + + m_pRenderModel = IEngineStudio.SetupPlayerModel( m_nPlayerIndex ); + if (m_pRenderModel == NULL) + return 0; + + m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (m_pRenderModel); + IEngineStudio.StudioSetHeader( m_pStudioHeader ); + IEngineStudio.SetRenderModel( m_pRenderModel ); + + if (pplayer->gaitsequence) + { + vec3_t orig_angles; + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + + VectorCopy( m_pCurrentEntity->angles, orig_angles ); + + StudioProcessGait( pplayer ); + + m_pPlayerInfo->gaitsequence = pplayer->gaitsequence; + m_pPlayerInfo = NULL; + + StudioSetUpTransform( 0 ); + VectorCopy( orig_angles, m_pCurrentEntity->angles ); + } + else + { + m_pCurrentEntity->curstate.controller[0] = 127; + m_pCurrentEntity->curstate.controller[1] = 127; + m_pCurrentEntity->curstate.controller[2] = 127; + m_pCurrentEntity->curstate.controller[3] = 127; + m_pCurrentEntity->latched.prevcontroller[0] = m_pCurrentEntity->curstate.controller[0]; + m_pCurrentEntity->latched.prevcontroller[1] = m_pCurrentEntity->curstate.controller[1]; + m_pCurrentEntity->latched.prevcontroller[2] = m_pCurrentEntity->curstate.controller[2]; + m_pCurrentEntity->latched.prevcontroller[3] = m_pCurrentEntity->curstate.controller[3]; + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + m_pPlayerInfo->gaitsequence = 0; + + StudioSetUpTransform( 0 ); + } + + if (flags & STUDIO_RENDER) + { + // see if the bounding box lets us trivially reject, also sets + if (!IEngineStudio.StudioCheckBBox ()) + return 0; + + (*m_pModelsDrawn)++; + (*m_pStudioModelCount)++; // render data cache cookie + + if (m_pStudioHeader->numbodyparts == 0) + return 1; + } + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + StudioSetupBones( ); + StudioSaveBones( ); + m_pPlayerInfo->renderframe = m_nFrameCount; + + m_pPlayerInfo = NULL; + + if (flags & STUDIO_EVENTS) + { + StudioCalcAttachments( ); + IEngineStudio.StudioClientEvents( ); + // copy attachments into global entity array + if ( m_pCurrentEntity->index > 0 ) + { + cl_entity_t *ent = gEngfuncs.GetEntityByIndex( m_pCurrentEntity->index ); + + memcpy( ent->attachment, m_pCurrentEntity->attachment, sizeof( vec3_t ) * 4 ); + } + } + + if (flags & STUDIO_RENDER) + { + /* + if (m_pCvarHiModels->value && m_pRenderModel != m_pCurrentEntity->model ) + { + // show highest resolution multiplayer model + m_pCurrentEntity->curstate.body = 255; + } + + if (!(m_pCvarDeveloper->value == 0 && gEngfuncs.GetMaxClients() == 1 ) && ( m_pRenderModel == m_pCurrentEntity->model ) ) + { + m_pCurrentEntity->curstate.body = 1; // force helmet + } + */ + + lighting.plightvec = dir; + IEngineStudio.StudioDynamicLight(m_pCurrentEntity, &lighting ); + + IEngineStudio.StudioEntityLight( &lighting ); + + // model and frame independant + IEngineStudio.StudioSetupLighting (&lighting); + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + + // get remap colors + m_nTopColor = m_pPlayerInfo->topcolor; + if (m_nTopColor < 0) + m_nTopColor = 0; + if (m_nTopColor > 360) + m_nTopColor = 360; + m_nBottomColor = m_pPlayerInfo->bottomcolor; + if (m_nBottomColor < 0) + m_nBottomColor = 0; + if (m_nBottomColor > 360) + m_nBottomColor = 360; + + IEngineStudio.StudioSetRemapColors( m_nTopColor, m_nBottomColor ); + + StudioRenderModel( ); + m_pPlayerInfo = NULL; + + if (pplayer->weaponmodel) + { + cl_entity_t saveent = *m_pCurrentEntity; + + model_t *pweaponmodel = IEngineStudio.GetModelByIndex( pplayer->weaponmodel ); + + m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (pweaponmodel); + IEngineStudio.StudioSetHeader( m_pStudioHeader ); + + StudioMergeBones( pweaponmodel); + + IEngineStudio.StudioSetupLighting (&lighting); + + StudioRenderModel( ); + + StudioCalcAttachments( ); + + *m_pCurrentEntity = saveent; + } + } + + return 1; +} + +/* +==================== +Studio_FxTransform + +==================== +*/ +void CGameStudioModelRenderer::StudioFxTransform( cl_entity_t *ent, float transform[3][4] ) +{ + switch( ent->curstate.renderfx ) + { + case kRenderFxDistort: + case kRenderFxHologram: + if ( gEngfuncs.pfnRandomLong(0,49) == 0 ) + { + int axis = gEngfuncs.pfnRandomLong(0,1); + if ( axis == 1 ) // Choose between x & z + axis = 2; + VectorScale( transform[axis], gEngfuncs.pfnRandomFloat(1,1.484), transform[axis] ); + } + else if ( gEngfuncs.pfnRandomLong(0,49) == 0 ) + { + float offset; + int axis = gEngfuncs.pfnRandomLong(0,1); + if ( axis == 1 ) // Choose between x & z + axis = 2; + offset = gEngfuncs.pfnRandomFloat(-10,10); + transform[gEngfuncs.pfnRandomLong(0,2)][3] += offset; + } + break; + case kRenderFxExplode: + { + if ( iRenderStateChanged ) + { + g_flStartScaleTime = m_clTime; + iRenderStateChanged = FALSE; + } + + // Make the Model continue to shrink + float flTimeDelta = m_clTime - g_flStartScaleTime; + if ( flTimeDelta > 0 ) + { + float flScale = 0.001; + // Goes almost all away + if ( flTimeDelta <= 2.0 ) + flScale = 1.0 - (flTimeDelta / 2.0); + + for (int i = 0; i < 3; i++) + { + for (int j = 0; j < 3; j++) + transform[i][j] *= flScale; + } + } + } + break; + } +} + +//////////////////////////////////// +// Hooks to class implementation +//////////////////////////////////// + +/* +==================== +R_StudioDrawPlayer + +==================== +*/ +int R_StudioDrawPlayer( int flags, entity_state_t *pplayer ) +{ + return g_StudioRenderer.StudioDrawPlayer( flags, pplayer ); +} + +/* +==================== +R_StudioDrawModel + +==================== +*/ +int R_StudioDrawModel( int flags ) +{ + return g_StudioRenderer.StudioDrawModel( flags ); +} + +/* +==================== +R_StudioInit + +==================== +*/ +void R_StudioInit( void ) +{ + g_StudioRenderer.Init(); +} + +// The simple drawing interface we'll pass back to the engine +r_studio_interface_t studio = +{ + STUDIO_INTERFACE_VERSION, + R_StudioDrawModel, + R_StudioDrawPlayer, +}; + +/* +==================== +HUD_GetStudioModelInterface + +Export this function for the engine to use the studio renderer class to render objects. +==================== +*/ +#define DLLEXPORT __declspec( dllexport ) +extern "C" int DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio ) +{ + if ( version != STUDIO_INTERFACE_VERSION ) + return 0; + + // Point the engine to our callbacks + *ppinterface = &studio; + + // Copy in engine helper functions + memcpy( &IEngineStudio, pstudio, sizeof( IEngineStudio ) ); + + // Initialize local variables, etc. + R_StudioInit(); + + // Success + return 1; +} diff --git a/cl_dll/GameStudioModelRenderer_Sample.h b/cl_dll/GameStudioModelRenderer_Sample.h new file mode 100644 index 0000000..3fe5ea5 --- /dev/null +++ b/cl_dll/GameStudioModelRenderer_Sample.h @@ -0,0 +1,48 @@ +#if !defined( GAMESTUDIOMODELRENDERER_H ) +#define GAMESTUDIOMODELRENDERER_H +#if defined( _WIN32 ) +#pragma once +#endif + +/* +==================== +CGameStudioModelRenderer + +==================== +*/ +class CGameStudioModelRenderer : public CStudioModelRenderer +{ +public: + CGameStudioModelRenderer( void ); + + // Set up model bone positions + virtual void StudioSetupBones ( void ); + + // Estimate gait frame for player + virtual void StudioEstimateGait ( entity_state_t *pplayer ); + + // Process movement of player + virtual void StudioProcessGait ( entity_state_t *pplayer ); + + // Player drawing code + virtual int StudioDrawPlayer( int flags, entity_state_t *pplayer ); + virtual int _StudioDrawPlayer( int flags, entity_state_t *pplayer ); + + // Apply special effects to transform matrix + virtual void StudioFxTransform( cl_entity_t *ent, float transform[3][4] ); + +private: + // For local player, in third person, we need to store real render data and then + // setup for with fake/client side animation data + void SavePlayerState( entity_state_t *pplayer ); + // Called to set up local player's animation values + void SetupClientAnimation( entity_state_t *pplayer ); + // Called to restore original player state information + void RestorePlayerState( entity_state_t *pplayer ); + +private: + // Private data + bool m_bLocal; +}; + +#endif // GAMESTUDIOMODELRENDERER_H \ No newline at end of file diff --git a/cl_dll/StudioModelRenderer.cpp b/cl_dll/StudioModelRenderer.cpp new file mode 100644 index 0000000..7c8e62a --- /dev/null +++ b/cl_dll/StudioModelRenderer.cpp @@ -0,0 +1,1649 @@ +// studio_model.cpp +// routines for setting up to draw 3DStudio models + +#include "hud.h" +#include "cl_util.h" +#include "const.h" +#include "com_model.h" +#include "studio.h" +#include "entity_state.h" +#include "cl_entity.h" +#include "dlight.h" +#include "triangleapi.h" + +#include +#include +#include +#include + +#include "studio_util.h" +#include "r_studioint.h" + +#include "StudioModelRenderer.h" +#include "GameStudioModelRenderer.h" + +// Global engine <-> studio model rendering code interface +engine_studio_api_t IEngineStudio; + +///////////////////// +// Implementation of CStudioModelRenderer.h + +/* +==================== +Init + +==================== +*/ +void CStudioModelRenderer::Init( void ) +{ + // Set up some variables shared with engine + m_pCvarHiModels = IEngineStudio.GetCvar( "cl_himodels" ); + m_pCvarDeveloper = IEngineStudio.GetCvar( "developer" ); + m_pCvarDrawEntities = IEngineStudio.GetCvar( "r_drawentities" ); + + m_pChromeSprite = IEngineStudio.GetChromeSprite(); + + IEngineStudio.GetModelCounters( &m_pStudioModelCount, &m_pModelsDrawn ); + + // Get pointers to engine data structures + m_pbonetransform = (float (*)[MAXSTUDIOBONES][3][4])IEngineStudio.StudioGetBoneTransform(); + m_plighttransform = (float (*)[MAXSTUDIOBONES][3][4])IEngineStudio.StudioGetLightTransform(); + m_paliastransform = (float (*)[3][4])IEngineStudio.StudioGetAliasTransform(); + m_protationmatrix = (float (*)[3][4])IEngineStudio.StudioGetRotationMatrix(); +} + +/* +==================== +CStudioModelRenderer + +==================== +*/ +CStudioModelRenderer::CStudioModelRenderer( void ) +{ + m_fDoInterp = 1; + m_fGaitEstimation = 1; + m_pCurrentEntity = NULL; + m_pCvarHiModels = NULL; + m_pCvarDeveloper = NULL; + m_pCvarDrawEntities = NULL; + m_pChromeSprite = NULL; + m_pStudioModelCount = NULL; + m_pModelsDrawn = NULL; + m_protationmatrix = NULL; + m_paliastransform = NULL; + m_pbonetransform = NULL; + m_plighttransform = NULL; + m_pStudioHeader = NULL; + m_pBodyPart = NULL; + m_pSubModel = NULL; + m_pPlayerInfo = NULL; + m_pRenderModel = NULL; +} + +/* +==================== +~CStudioModelRenderer + +==================== +*/ +CStudioModelRenderer::~CStudioModelRenderer( void ) +{ +} + +/* +==================== +StudioCalcBoneAdj + +==================== +*/ +void CStudioModelRenderer::StudioCalcBoneAdj( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen ) +{ + int i, j; + float value; + mstudiobonecontroller_t *pbonecontroller; + + pbonecontroller = (mstudiobonecontroller_t *)((byte *)m_pStudioHeader + m_pStudioHeader->bonecontrollerindex); + + for (j = 0; j < m_pStudioHeader->numbonecontrollers; j++) + { + i = pbonecontroller[j].index; + if (i <= 3) + { + // check for 360% wrapping + if (pbonecontroller[j].type & STUDIO_RLOOP) + { + if (abs(pcontroller1[i] - pcontroller2[i]) > 128) + { + int a, b; + a = (pcontroller1[j] + 128) % 256; + b = (pcontroller2[j] + 128) % 256; + value = ((a * dadt) + (b * (1 - dadt)) - 128) * (360.0/256.0) + pbonecontroller[j].start; + } + else + { + value = ((pcontroller1[i] * dadt + (pcontroller2[i]) * (1.0 - dadt))) * (360.0/256.0) + pbonecontroller[j].start; + } + } + else + { + value = (pcontroller1[i] * dadt + pcontroller2[i] * (1.0 - dadt)) / 255.0; + if (value < 0) value = 0; + if (value > 1.0) value = 1.0; + value = (1.0 - value) * pbonecontroller[j].start + value * pbonecontroller[j].end; + } + // Con_DPrintf( "%d %d %f : %f\n", m_pCurrentEntity->curstate.controller[j], m_pCurrentEntity->latched.prevcontroller[j], value, dadt ); + } + else + { + value = mouthopen / 64.0; + if (value > 1.0) value = 1.0; + value = (1.0 - value) * pbonecontroller[j].start + value * pbonecontroller[j].end; + // Con_DPrintf("%d %f\n", mouthopen, value ); + } + switch(pbonecontroller[j].type & STUDIO_TYPES) + { + case STUDIO_XR: + case STUDIO_YR: + case STUDIO_ZR: + adj[j] = value * (M_PI / 180.0); + break; + case STUDIO_X: + case STUDIO_Y: + case STUDIO_Z: + adj[j] = value; + break; + } + } +} + + +/* +==================== +StudioCalcBoneQuaterion + +==================== +*/ +void CStudioModelRenderer::StudioCalcBoneQuaterion( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q ) +{ + int j, k; + vec4_t q1, q2; + vec3_t angle1, angle2; + mstudioanimvalue_t *panimvalue; + + for (j = 0; j < 3; j++) + { + if (panim->offset[j+3] == 0) + { + angle2[j] = angle1[j] = pbone->value[j+3]; // default; + } + else + { + panimvalue = (mstudioanimvalue_t *)((byte *)panim + panim->offset[j+3]); + k = frame; + // DEBUG + if (panimvalue->num.total < panimvalue->num.valid) + k = 0; + while (panimvalue->num.total <= k) + { + k -= panimvalue->num.total; + panimvalue += panimvalue->num.valid + 1; + // DEBUG + if (panimvalue->num.total < panimvalue->num.valid) + k = 0; + } + // Bah, missing blend! + if (panimvalue->num.valid > k) + { + angle1[j] = panimvalue[k+1].value; + + if (panimvalue->num.valid > k + 1) + { + angle2[j] = panimvalue[k+2].value; + } + else + { + if (panimvalue->num.total > k + 1) + angle2[j] = angle1[j]; + else + angle2[j] = panimvalue[panimvalue->num.valid+2].value; + } + } + else + { + angle1[j] = panimvalue[panimvalue->num.valid].value; + if (panimvalue->num.total > k + 1) + { + angle2[j] = angle1[j]; + } + else + { + angle2[j] = panimvalue[panimvalue->num.valid + 2].value; + } + } + angle1[j] = pbone->value[j+3] + angle1[j] * pbone->scale[j+3]; + angle2[j] = pbone->value[j+3] + angle2[j] * pbone->scale[j+3]; + } + + if (pbone->bonecontroller[j+3] != -1) + { + angle1[j] += adj[pbone->bonecontroller[j+3]]; + angle2[j] += adj[pbone->bonecontroller[j+3]]; + } + } + + if (!VectorCompare( angle1, angle2 )) + { + AngleQuaternion( angle1, q1 ); + AngleQuaternion( angle2, q2 ); + QuaternionSlerp( q1, q2, s, q ); + } + else + { + AngleQuaternion( angle1, q ); + } +} + +/* +==================== +StudioCalcBonePosition + +==================== +*/ +void CStudioModelRenderer::StudioCalcBonePosition( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos ) +{ + int j, k; + mstudioanimvalue_t *panimvalue; + + for (j = 0; j < 3; j++) + { + pos[j] = pbone->value[j]; // default; + if (panim->offset[j] != 0) + { + panimvalue = (mstudioanimvalue_t *)((byte *)panim + panim->offset[j]); + /* + if (i == 0 && j == 0) + Con_DPrintf("%d %d:%d %f\n", frame, panimvalue->num.valid, panimvalue->num.total, s ); + */ + + k = frame; + // DEBUG + if (panimvalue->num.total < panimvalue->num.valid) + k = 0; + // find span of values that includes the frame we want + while (panimvalue->num.total <= k) + { + k -= panimvalue->num.total; + panimvalue += panimvalue->num.valid + 1; + // DEBUG + if (panimvalue->num.total < panimvalue->num.valid) + k = 0; + } + // if we're inside the span + if (panimvalue->num.valid > k) + { + // and there's more data in the span + if (panimvalue->num.valid > k + 1) + { + pos[j] += (panimvalue[k+1].value * (1.0 - s) + s * panimvalue[k+2].value) * pbone->scale[j]; + } + else + { + pos[j] += panimvalue[k+1].value * pbone->scale[j]; + } + } + else + { + // are we at the end of the repeating values section and there's another section with data? + if (panimvalue->num.total <= k + 1) + { + pos[j] += (panimvalue[panimvalue->num.valid].value * (1.0 - s) + s * panimvalue[panimvalue->num.valid + 2].value) * pbone->scale[j]; + } + else + { + pos[j] += panimvalue[panimvalue->num.valid].value * pbone->scale[j]; + } + } + } + if ( pbone->bonecontroller[j] != -1 && adj ) + { + pos[j] += adj[pbone->bonecontroller[j]]; + } + } +} + +/* +==================== +StudioSlerpBones + +==================== +*/ +void CStudioModelRenderer::StudioSlerpBones( vec4_t q1[], float pos1[][3], vec4_t q2[], float pos2[][3], float s ) +{ + int i; + vec4_t q3; + float s1; + + if (s < 0) s = 0; + else if (s > 1.0) s = 1.0; + + s1 = 1.0 - s; + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + QuaternionSlerp( q1[i], q2[i], s, q3 ); + q1[i][0] = q3[0]; + q1[i][1] = q3[1]; + q1[i][2] = q3[2]; + q1[i][3] = q3[3]; + pos1[i][0] = pos1[i][0] * s1 + pos2[i][0] * s; + pos1[i][1] = pos1[i][1] * s1 + pos2[i][1] * s; + pos1[i][2] = pos1[i][2] * s1 + pos2[i][2] * s; + } +} + +/* +==================== +StudioGetAnim + +==================== +*/ +mstudioanim_t *CStudioModelRenderer::StudioGetAnim( model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc ) +{ + mstudioseqgroup_t *pseqgroup; + cache_user_t *paSequences; + + pseqgroup = (mstudioseqgroup_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqgroupindex) + pseqdesc->seqgroup; + + if (pseqdesc->seqgroup == 0) + { + return (mstudioanim_t *)((byte *)m_pStudioHeader + pseqgroup->data + pseqdesc->animindex); + } + + paSequences = (cache_user_t *)m_pSubModel->submodels; + + if (paSequences == NULL) + { + paSequences = (cache_user_t *)IEngineStudio.Mem_Calloc( 16, sizeof( cache_user_t ) ); // UNDONE: leak! + m_pSubModel->submodels = (dmodel_t *)paSequences; + } + + if (!IEngineStudio.Cache_Check( (struct cache_user_s *)&(paSequences[pseqdesc->seqgroup]))) + { + gEngfuncs.Con_DPrintf("loading %s\n", pseqgroup->name ); + IEngineStudio.LoadCacheFile( pseqgroup->name, (struct cache_user_s *)&paSequences[pseqdesc->seqgroup] ); + } + return (mstudioanim_t *)((byte *)paSequences[pseqdesc->seqgroup].data + pseqdesc->animindex); +} + +/* +==================== +StudioPlayerBlend + +==================== +*/ +void CStudioModelRenderer::StudioPlayerBlend( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch ) +{ + // calc up/down pointing + *pBlend = (*pPitch * 3); + if (*pBlend < pseqdesc->blendstart[0]) + { + *pPitch -= pseqdesc->blendstart[0] / 3.0; + *pBlend = 0; + } + else if (*pBlend > pseqdesc->blendend[0]) + { + *pPitch -= pseqdesc->blendend[0] / 3.0; + *pBlend = 255; + } + else + { + if (pseqdesc->blendend[0] - pseqdesc->blendstart[0] < 0.1) // catch qc error + *pBlend = 127; + else + *pBlend = 255 * (*pBlend - pseqdesc->blendstart[0]) / (pseqdesc->blendend[0] - pseqdesc->blendstart[0]); + *pPitch = 0; + } +} + +/* +==================== +StudioSetUpTransform + +==================== +*/ +void CStudioModelRenderer::StudioSetUpTransform (int trivial_accept) +{ + int i; + vec3_t angles; + vec3_t modelpos; + +// tweek model origin + //for (i = 0; i < 3; i++) + // modelpos[i] = m_pCurrentEntity->origin[i]; + + VectorCopy( m_pCurrentEntity->origin, modelpos ); + +// TODO: should really be stored with the entity instead of being reconstructed +// TODO: should use a look-up table +// TODO: could cache lazily, stored in the entity + angles[ROLL] = m_pCurrentEntity->curstate.angles[ROLL]; + angles[PITCH] = m_pCurrentEntity->curstate.angles[PITCH]; + angles[YAW] = m_pCurrentEntity->curstate.angles[YAW]; + + //Con_DPrintf("Angles %4.2f prev %4.2f for %i\n", angles[PITCH], m_pCurrentEntity->index); + //Con_DPrintf("movetype %d %d\n", m_pCurrentEntity->movetype, m_pCurrentEntity->aiment ); + if (m_pCurrentEntity->curstate.movetype == MOVETYPE_STEP) + { + float f = 0; + float d; + + // don't do it if the goalstarttime hasn't updated in a while. + + // NOTE: Because we need to interpolate multiplayer characters, the interpolation time limit + // was increased to 1.0 s., which is 2x the max lag we are accounting for. + + if ( ( m_clTime < m_pCurrentEntity->curstate.animtime + 1.0f ) && + ( m_pCurrentEntity->curstate.animtime != m_pCurrentEntity->latched.prevanimtime ) ) + { + f = (m_clTime - m_pCurrentEntity->curstate.animtime) / (m_pCurrentEntity->curstate.animtime - m_pCurrentEntity->latched.prevanimtime); + //Con_DPrintf("%4.2f %.2f %.2f\n", f, m_pCurrentEntity->curstate.animtime, m_clTime); + } + + if (m_fDoInterp) + { + // ugly hack to interpolate angle, position. current is reached 0.1 seconds after being set + f = f - 1.0; + } + else + { + f = 0; + } + + for (i = 0; i < 3; i++) + { + modelpos[i] += (m_pCurrentEntity->origin[i] - m_pCurrentEntity->latched.prevorigin[i]) * f; + } + + // NOTE: Because multiplayer lag can be relatively large, we don't want to cap + // f at 1.5 anymore. + //if (f > -1.0 && f < 1.5) {} + +// Con_DPrintf("%.0f %.0f\n",m_pCurrentEntity->msg_angles[0][YAW], m_pCurrentEntity->msg_angles[1][YAW] ); + for (i = 0; i < 3; i++) + { + float ang1, ang2; + + ang1 = m_pCurrentEntity->angles[i]; + ang2 = m_pCurrentEntity->latched.prevangles[i]; + + d = ang1 - ang2; + if (d > 180) + { + d -= 360; + } + else if (d < -180) + { + d += 360; + } + + angles[i] += d * f; + } + //Con_DPrintf("%.3f \n", f ); + } + else if ( m_pCurrentEntity->curstate.movetype != MOVETYPE_NONE ) + { + VectorCopy( m_pCurrentEntity->angles, angles ); + } + + //Con_DPrintf("%.0f %0.f %0.f\n", modelpos[0], modelpos[1], modelpos[2] ); + //Con_DPrintf("%.0f %0.f %0.f\n", angles[0], angles[1], angles[2] ); + + angles[PITCH] = -angles[PITCH]; + AngleMatrix (angles, (*m_protationmatrix)); + + if ( !IEngineStudio.IsHardware() ) + { + static float viewmatrix[3][4]; + + VectorCopy (m_vRight, viewmatrix[0]); + VectorCopy (m_vUp, viewmatrix[1]); + VectorInverse (viewmatrix[1]); + VectorCopy (m_vNormal, viewmatrix[2]); + + (*m_protationmatrix)[0][3] = modelpos[0] - m_vRenderOrigin[0]; + (*m_protationmatrix)[1][3] = modelpos[1] - m_vRenderOrigin[1]; + (*m_protationmatrix)[2][3] = modelpos[2] - m_vRenderOrigin[2]; + + ConcatTransforms (viewmatrix, (*m_protationmatrix), (*m_paliastransform)); + + // do the scaling up of x and y to screen coordinates as part of the transform + // for the unclipped case (it would mess up clipping in the clipped case). + // Also scale down z, so 1/z is scaled 31 bits for free, and scale down x and y + // correspondingly so the projected x and y come out right + // FIXME: make this work for clipped case too? + if (trivial_accept) + { + for (i=0 ; i<4 ; i++) + { + (*m_paliastransform)[0][i] *= m_fSoftwareXScale * + (1.0 / (ZISCALE * 0x10000)); + (*m_paliastransform)[1][i] *= m_fSoftwareYScale * + (1.0 / (ZISCALE * 0x10000)); + (*m_paliastransform)[2][i] *= 1.0 / (ZISCALE * 0x10000); + + } + } + } + + (*m_protationmatrix)[0][3] = modelpos[0]; + (*m_protationmatrix)[1][3] = modelpos[1]; + (*m_protationmatrix)[2][3] = modelpos[2]; +} + + +/* +==================== +StudioEstimateInterpolant + +==================== +*/ +float CStudioModelRenderer::StudioEstimateInterpolant( void ) +{ + float dadt = 1.0; + + if ( m_fDoInterp && ( m_pCurrentEntity->curstate.animtime >= m_pCurrentEntity->latched.prevanimtime + 0.01 ) ) + { + dadt = (m_clTime - m_pCurrentEntity->curstate.animtime) / 0.1; + if (dadt > 2.0) + { + dadt = 2.0; + } + } + return dadt; +} + +/* +==================== +StudioCalcRotations + +==================== +*/ +void CStudioModelRenderer::StudioCalcRotations ( float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f ) +{ + int i; + int frame; + mstudiobone_t *pbone; + + float s; + float adj[MAXSTUDIOCONTROLLERS]; + float dadt; + + if (f > pseqdesc->numframes - 1) + { + f = 0; // bah, fix this bug with changing sequences too fast + } + // BUG ( somewhere else ) but this code should validate this data. + // This could cause a crash if the frame # is negative, so we'll go ahead + // and clamp it here + else if ( f < -0.01 ) + { + f = -0.01; + } + + frame = (int)f; + + // Con_DPrintf("%d %.4f %.4f %.4f %.4f %d\n", m_pCurrentEntity->curstate.sequence, m_clTime, m_pCurrentEntity->animtime, m_pCurrentEntity->frame, f, frame ); + + // Con_DPrintf( "%f %f %f\n", m_pCurrentEntity->angles[ROLL], m_pCurrentEntity->angles[PITCH], m_pCurrentEntity->angles[YAW] ); + + // Con_DPrintf("frame %d %d\n", frame1, frame2 ); + + + dadt = StudioEstimateInterpolant( ); + s = (f - frame); + + // add in programtic controllers + pbone = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex); + + StudioCalcBoneAdj( dadt, adj, m_pCurrentEntity->curstate.controller, m_pCurrentEntity->latched.prevcontroller, m_pCurrentEntity->mouth.mouthopen ); + + for (i = 0; i < m_pStudioHeader->numbones; i++, pbone++, panim++) + { + StudioCalcBoneQuaterion( frame, s, pbone, panim, adj, q[i] ); + + StudioCalcBonePosition( frame, s, pbone, panim, adj, pos[i] ); + // if (0 && i == 0) + // Con_DPrintf("%d %d %d %d\n", m_pCurrentEntity->curstate.sequence, frame, j, k ); + } + + if (pseqdesc->motiontype & STUDIO_X) + { + pos[pseqdesc->motionbone][0] = 0.0; + } + if (pseqdesc->motiontype & STUDIO_Y) + { + pos[pseqdesc->motionbone][1] = 0.0; + } + if (pseqdesc->motiontype & STUDIO_Z) + { + pos[pseqdesc->motionbone][2] = 0.0; + } + + s = 0 * ((1.0 - (f - (int)(f))) / (pseqdesc->numframes)) * m_pCurrentEntity->curstate.framerate; + + if (pseqdesc->motiontype & STUDIO_LX) + { + pos[pseqdesc->motionbone][0] += s * pseqdesc->linearmovement[0]; + } + if (pseqdesc->motiontype & STUDIO_LY) + { + pos[pseqdesc->motionbone][1] += s * pseqdesc->linearmovement[1]; + } + if (pseqdesc->motiontype & STUDIO_LZ) + { + pos[pseqdesc->motionbone][2] += s * pseqdesc->linearmovement[2]; + } +} + +/* +==================== +Studio_FxTransform + +==================== +*/ +void CStudioModelRenderer::StudioFxTransform( cl_entity_t *ent, float transform[3][4] ) +{ + switch( ent->curstate.renderfx ) + { + case kRenderFxDistort: + case kRenderFxHologram: + if ( gEngfuncs.pfnRandomLong(0,49) == 0 ) + { + int axis = gEngfuncs.pfnRandomLong(0,1); + if ( axis == 1 ) // Choose between x & z + axis = 2; + VectorScale( transform[axis], gEngfuncs.pfnRandomFloat(1,1.484), transform[axis] ); + } + else if ( gEngfuncs.pfnRandomLong(0,49) == 0 ) + { + float offset; + int axis = gEngfuncs.pfnRandomLong(0,1); + if ( axis == 1 ) // Choose between x & z + axis = 2; + offset = gEngfuncs.pfnRandomFloat(-10,10); + transform[gEngfuncs.pfnRandomLong(0,2)][3] += offset; + } + break; + case kRenderFxExplode: + { + float scale; + + scale = 1.0 + ( m_clTime - ent->curstate.animtime) * 10.0; + if ( scale > 2 ) // Don't blow up more than 200% + scale = 2; + transform[0][1] *= scale; + transform[1][1] *= scale; + transform[2][1] *= scale; + } + break; + + } +} + +/* +==================== +StudioEstimateFrame + +==================== +*/ +float CStudioModelRenderer::StudioEstimateFrame( mstudioseqdesc_t *pseqdesc ) +{ + double dfdt, f; + + if ( m_fDoInterp ) + { + if ( m_clTime < m_pCurrentEntity->curstate.animtime ) + { + dfdt = 0; + } + else + { + dfdt = (m_clTime - m_pCurrentEntity->curstate.animtime) * m_pCurrentEntity->curstate.framerate * pseqdesc->fps; + + } + } + else + { + dfdt = 0; + } + + if (pseqdesc->numframes <= 1) + { + f = 0; + } + else + { + f = (m_pCurrentEntity->curstate.frame * (pseqdesc->numframes - 1)) / 256.0; + } + + f += dfdt; + + if (pseqdesc->flags & STUDIO_LOOPING) + { + if (pseqdesc->numframes > 1) + { + f -= (int)(f / (pseqdesc->numframes - 1)) * (pseqdesc->numframes - 1); + } + if (f < 0) + { + f += (pseqdesc->numframes - 1); + } + } + else + { + if (f >= pseqdesc->numframes - 1.001) + { + f = pseqdesc->numframes - 1.001; + } + if (f < 0.0) + { + f = 0.0; + } + } + return f; +} + +/* +==================== +StudioSetupBones + +==================== +*/ +void CStudioModelRenderer::StudioSetupBones ( void ) +{ + int i; + double f; + + mstudiobone_t *pbones; + mstudioseqdesc_t *pseqdesc; + mstudioanim_t *panim; + + static float pos[MAXSTUDIOBONES][3]; + static vec4_t q[MAXSTUDIOBONES]; + float bonematrix[3][4]; + + static float pos2[MAXSTUDIOBONES][3]; + static vec4_t q2[MAXSTUDIOBONES]; + static float pos3[MAXSTUDIOBONES][3]; + static vec4_t q3[MAXSTUDIOBONES]; + static float pos4[MAXSTUDIOBONES][3]; + static vec4_t q4[MAXSTUDIOBONES]; + + if (m_pCurrentEntity->curstate.sequence >= m_pStudioHeader->numseq) + { + m_pCurrentEntity->curstate.sequence = 0; + } + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence; + + f = StudioEstimateFrame( pseqdesc ); + + if (m_pCurrentEntity->latched.prevframe > f) + { + //Con_DPrintf("%f %f\n", m_pCurrentEntity->prevframe, f ); + } + + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + StudioCalcRotations( pos, q, pseqdesc, panim, f ); + + if (pseqdesc->numblends > 1) + { + float s; + float dadt; + + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos2, q2, pseqdesc, panim, f ); + + dadt = StudioEstimateInterpolant(); + s = (m_pCurrentEntity->curstate.blending[0] * dadt + m_pCurrentEntity->latched.prevblending[0] * (1.0 - dadt)) / 255.0; + + StudioSlerpBones( q, pos, q2, pos2, s ); + + if (pseqdesc->numblends == 4) + { + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos3, q3, pseqdesc, panim, f ); + + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos4, q4, pseqdesc, panim, f ); + + s = (m_pCurrentEntity->curstate.blending[0] * dadt + m_pCurrentEntity->latched.prevblending[0] * (1.0 - dadt)) / 255.0; + StudioSlerpBones( q3, pos3, q4, pos4, s ); + + s = (m_pCurrentEntity->curstate.blending[1] * dadt + m_pCurrentEntity->latched.prevblending[1] * (1.0 - dadt)) / 255.0; + StudioSlerpBones( q, pos, q3, pos3, s ); + } + } + + if (m_fDoInterp && + m_pCurrentEntity->latched.sequencetime && + ( m_pCurrentEntity->latched.sequencetime + 0.2 > m_clTime ) && + ( m_pCurrentEntity->latched.prevsequence < m_pStudioHeader->numseq )) + { + // blend from last sequence + static float pos1b[MAXSTUDIOBONES][3]; + static vec4_t q1b[MAXSTUDIOBONES]; + float s; + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->latched.prevsequence; + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + // clip prevframe + StudioCalcRotations( pos1b, q1b, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + if (pseqdesc->numblends > 1) + { + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos2, q2, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + s = (m_pCurrentEntity->latched.prevseqblending[0]) / 255.0; + StudioSlerpBones( q1b, pos1b, q2, pos2, s ); + + if (pseqdesc->numblends == 4) + { + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos3, q3, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + panim += m_pStudioHeader->numbones; + StudioCalcRotations( pos4, q4, pseqdesc, panim, m_pCurrentEntity->latched.prevframe ); + + s = (m_pCurrentEntity->latched.prevseqblending[0]) / 255.0; + StudioSlerpBones( q3, pos3, q4, pos4, s ); + + s = (m_pCurrentEntity->latched.prevseqblending[1]) / 255.0; + StudioSlerpBones( q1b, pos1b, q3, pos3, s ); + } + } + + s = 1.0 - (m_clTime - m_pCurrentEntity->latched.sequencetime) / 0.2; + StudioSlerpBones( q, pos, q1b, pos1b, s ); + } + else + { + //Con_DPrintf("prevframe = %4.2f\n", f); + m_pCurrentEntity->latched.prevframe = f; + } + + pbones = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex); + + // calc gait animation + if (m_pPlayerInfo && m_pPlayerInfo->gaitsequence != 0) + { + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pPlayerInfo->gaitsequence; + + panim = StudioGetAnim( m_pRenderModel, pseqdesc ); + StudioCalcRotations( pos2, q2, pseqdesc, panim, m_pPlayerInfo->gaitframe ); + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + if (strcmp( pbones[i].name, "Bip01 Spine") == 0) + break; + memcpy( pos[i], pos2[i], sizeof( pos[i] )); + memcpy( q[i], q2[i], sizeof( q[i] )); + } + } + + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + QuaternionMatrix( q[i], bonematrix ); + + bonematrix[0][3] = pos[i][0]; + bonematrix[1][3] = pos[i][1]; + bonematrix[2][3] = pos[i][2]; + + if (pbones[i].parent == -1) + { + if ( IEngineStudio.IsHardware() ) + { + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + else + { + ConcatTransforms ((*m_paliastransform), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + + // Apply client-side effects to the transformation matrix + StudioFxTransform( m_pCurrentEntity, (*m_pbonetransform)[i] ); + } + else + { + ConcatTransforms ((*m_pbonetransform)[pbones[i].parent], bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_plighttransform)[pbones[i].parent], bonematrix, (*m_plighttransform)[i]); + } + } +} + + +/* +==================== +StudioSaveBones + +==================== +*/ +void CStudioModelRenderer::StudioSaveBones( void ) +{ + int i; + + mstudiobone_t *pbones; + pbones = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex); + + m_nCachedBones = m_pStudioHeader->numbones; + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + strcpy( m_nCachedBoneNames[i], pbones[i].name ); + MatrixCopy( (*m_pbonetransform)[i], m_rgCachedBoneTransform[i] ); + MatrixCopy( (*m_plighttransform)[i], m_rgCachedLightTransform[i] ); + } +} + + +/* +==================== +StudioMergeBones + +==================== +*/ +void CStudioModelRenderer::StudioMergeBones ( model_t *m_pSubModel ) +{ + int i, j; + double f; + int do_hunt = true; + + mstudiobone_t *pbones; + mstudioseqdesc_t *pseqdesc; + mstudioanim_t *panim; + + static float pos[MAXSTUDIOBONES][3]; + float bonematrix[3][4]; + static vec4_t q[MAXSTUDIOBONES]; + + if (m_pCurrentEntity->curstate.sequence >= m_pStudioHeader->numseq) + { + m_pCurrentEntity->curstate.sequence = 0; + } + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence; + + f = StudioEstimateFrame( pseqdesc ); + + if (m_pCurrentEntity->latched.prevframe > f) + { + //Con_DPrintf("%f %f\n", m_pCurrentEntity->prevframe, f ); + } + + panim = StudioGetAnim( m_pSubModel, pseqdesc ); + StudioCalcRotations( pos, q, pseqdesc, panim, f ); + + pbones = (mstudiobone_t *)((byte *)m_pStudioHeader + m_pStudioHeader->boneindex); + + + for (i = 0; i < m_pStudioHeader->numbones; i++) + { + for (j = 0; j < m_nCachedBones; j++) + { + if (stricmp(pbones[i].name, m_nCachedBoneNames[j]) == 0) + { + MatrixCopy( m_rgCachedBoneTransform[j], (*m_pbonetransform)[i] ); + MatrixCopy( m_rgCachedLightTransform[j], (*m_plighttransform)[i] ); + break; + } + } + if (j >= m_nCachedBones) + { + QuaternionMatrix( q[i], bonematrix ); + + bonematrix[0][3] = pos[i][0]; + bonematrix[1][3] = pos[i][1]; + bonematrix[2][3] = pos[i][2]; + + if (pbones[i].parent == -1) + { + if ( IEngineStudio.IsHardware() ) + { + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + else + { + ConcatTransforms ((*m_paliastransform), bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_protationmatrix), bonematrix, (*m_plighttransform)[i]); + } + + // Apply client-side effects to the transformation matrix + StudioFxTransform( m_pCurrentEntity, (*m_pbonetransform)[i] ); + } + else + { + ConcatTransforms ((*m_pbonetransform)[pbones[i].parent], bonematrix, (*m_pbonetransform)[i]); + ConcatTransforms ((*m_plighttransform)[pbones[i].parent], bonematrix, (*m_plighttransform)[i]); + } + } + } +} + +/* +==================== +StudioDrawModel + +==================== +*/ +int CStudioModelRenderer::StudioDrawModel( int flags ) +{ + alight_t lighting; + vec3_t dir; + + m_pCurrentEntity = IEngineStudio.GetCurrentEntity(); + IEngineStudio.GetTimes( &m_nFrameCount, &m_clTime, &m_clOldTime ); + IEngineStudio.GetViewInfo( m_vRenderOrigin, m_vUp, m_vRight, m_vNormal ); + IEngineStudio.GetAliasScale( &m_fSoftwareXScale, &m_fSoftwareYScale ); + + if (m_pCurrentEntity->curstate.renderfx == kRenderFxDeadPlayer) + { + entity_state_t deadplayer; + + int result; + int save_interp; + + if (m_pCurrentEntity->curstate.renderamt <= 0 || m_pCurrentEntity->curstate.renderamt > gEngfuncs.GetMaxClients() ) + return 0; + + // get copy of player + deadplayer = *(IEngineStudio.GetPlayerState( m_pCurrentEntity->curstate.renderamt - 1 )); //cl.frames[cl.parsecount & CL_UPDATE_MASK].playerstate[m_pCurrentEntity->curstate.renderamt-1]; + + // clear weapon, movement state + deadplayer.number = m_pCurrentEntity->curstate.renderamt; + deadplayer.weaponmodel = 0; + deadplayer.gaitsequence = 0; + + deadplayer.movetype = MOVETYPE_NONE; + VectorCopy( m_pCurrentEntity->curstate.angles, deadplayer.angles ); + VectorCopy( m_pCurrentEntity->curstate.origin, deadplayer.origin ); + + save_interp = m_fDoInterp; + m_fDoInterp = 0; + + // draw as though it were a player + result = StudioDrawPlayer( flags, &deadplayer ); + + m_fDoInterp = save_interp; + return result; + } + + m_pRenderModel = m_pCurrentEntity->model; + m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (m_pRenderModel); + IEngineStudio.StudioSetHeader( m_pStudioHeader ); + IEngineStudio.SetRenderModel( m_pRenderModel ); + + StudioSetUpTransform( 0 ); + + if (flags & STUDIO_RENDER) + { + // see if the bounding box lets us trivially reject, also sets + if (!IEngineStudio.StudioCheckBBox ()) + return 0; + + (*m_pModelsDrawn)++; + (*m_pStudioModelCount)++; // render data cache cookie + + if (m_pStudioHeader->numbodyparts == 0) + return 1; + } + + if (m_pCurrentEntity->curstate.movetype == MOVETYPE_FOLLOW) + { + StudioMergeBones( m_pRenderModel ); + } + else + { + StudioSetupBones( ); + } + StudioSaveBones( ); + + if (flags & STUDIO_EVENTS) + { + StudioCalcAttachments( ); + IEngineStudio.StudioClientEvents( ); + // copy attachments into global entity array + if ( m_pCurrentEntity->index > 0 ) + { + cl_entity_t *ent = gEngfuncs.GetEntityByIndex( m_pCurrentEntity->index ); + + memcpy( ent->attachment, m_pCurrentEntity->attachment, sizeof( vec3_t ) * 4 ); + } + } + + if (flags & STUDIO_RENDER) + { + lighting.plightvec = dir; + IEngineStudio.StudioDynamicLight(m_pCurrentEntity, &lighting ); + + IEngineStudio.StudioEntityLight( &lighting ); + + // model and frame independant + IEngineStudio.StudioSetupLighting (&lighting); + + // get remap colors + m_nTopColor = m_pCurrentEntity->curstate.colormap & 0xFF; + m_nBottomColor = (m_pCurrentEntity->curstate.colormap & 0xFF00) >> 8; + + IEngineStudio.StudioSetRemapColors( m_nTopColor, m_nBottomColor ); + + StudioRenderModel( ); + } + + return 1; +} + +/* +==================== +StudioEstimateGait + +==================== +*/ +void CStudioModelRenderer::StudioEstimateGait( entity_state_t *pplayer ) +{ + float dt; + vec3_t est_velocity; + + dt = (m_clTime - m_clOldTime); + if (dt < 0) + dt = 0; + else if (dt > 1.0) + dt = 1; + + if (dt == 0 || m_pPlayerInfo->renderframe == m_nFrameCount) + { + m_flGaitMovement = 0; + return; + } + + // VectorAdd( pplayer->velocity, pplayer->prediction_error, est_velocity ); + if ( m_fGaitEstimation ) + { + VectorSubtract( m_pCurrentEntity->origin, m_pPlayerInfo->prevgaitorigin, est_velocity ); + VectorCopy( m_pCurrentEntity->origin, m_pPlayerInfo->prevgaitorigin ); + m_flGaitMovement = Length( est_velocity ); + if (dt <= 0 || m_flGaitMovement / dt < 5) + { + m_flGaitMovement = 0; + est_velocity[0] = 0; + est_velocity[1] = 0; + } + } + else + { + VectorCopy( pplayer->velocity, est_velocity ); + m_flGaitMovement = Length( est_velocity ) * dt; + } + + if (est_velocity[1] == 0 && est_velocity[0] == 0) + { + float flYawDiff = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; + flYawDiff = flYawDiff - (int)(flYawDiff / 360) * 360; + if (flYawDiff > 180) + flYawDiff -= 360; + if (flYawDiff < -180) + flYawDiff += 360; + + if (dt < 0.25) + flYawDiff *= dt * 4; + else + flYawDiff *= dt; + + m_pPlayerInfo->gaityaw += flYawDiff; + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - (int)(m_pPlayerInfo->gaityaw / 360) * 360; + + m_flGaitMovement = 0; + } + else + { + m_pPlayerInfo->gaityaw = (atan2(est_velocity[1], est_velocity[0]) * 180 / M_PI); + if (m_pPlayerInfo->gaityaw > 180) + m_pPlayerInfo->gaityaw = 180; + if (m_pPlayerInfo->gaityaw < -180) + m_pPlayerInfo->gaityaw = -180; + } + +} + +/* +==================== +StudioProcessGait + +==================== +*/ +void CStudioModelRenderer::StudioProcessGait( entity_state_t *pplayer ) +{ + mstudioseqdesc_t *pseqdesc; + float dt; + int iBlend; + float flYaw; // view direction relative to movement + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + m_pCurrentEntity->curstate.sequence; + + StudioPlayerBlend( pseqdesc, &iBlend, &m_pCurrentEntity->angles[PITCH] ); + + m_pCurrentEntity->latched.prevangles[PITCH] = m_pCurrentEntity->angles[PITCH]; + m_pCurrentEntity->curstate.blending[0] = iBlend; + m_pCurrentEntity->latched.prevblending[0] = m_pCurrentEntity->curstate.blending[0]; + m_pCurrentEntity->latched.prevseqblending[0] = m_pCurrentEntity->curstate.blending[0]; + + // Con_DPrintf("%f %d\n", m_pCurrentEntity->angles[PITCH], m_pCurrentEntity->blending[0] ); + + dt = (m_clTime - m_clOldTime); + if (dt < 0) + dt = 0; + else if (dt > 1.0) + dt = 1; + + StudioEstimateGait( pplayer ); + + // Con_DPrintf("%f %f\n", m_pCurrentEntity->angles[YAW], m_pPlayerInfo->gaityaw ); + + // calc side to side turning + flYaw = m_pCurrentEntity->angles[YAW] - m_pPlayerInfo->gaityaw; + flYaw = flYaw - (int)(flYaw / 360) * 360; + if (flYaw < -180) + flYaw = flYaw + 360; + if (flYaw > 180) + flYaw = flYaw - 360; + + if (flYaw > 120) + { + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw - 180; + m_flGaitMovement = -m_flGaitMovement; + flYaw = flYaw - 180; + } + else if (flYaw < -120) + { + m_pPlayerInfo->gaityaw = m_pPlayerInfo->gaityaw + 180; + m_flGaitMovement = -m_flGaitMovement; + flYaw = flYaw + 180; + } + + // adjust torso + m_pCurrentEntity->curstate.controller[0] = ((flYaw / 4.0) + 30) / (60.0 / 255.0); + m_pCurrentEntity->curstate.controller[1] = ((flYaw / 4.0) + 30) / (60.0 / 255.0); + m_pCurrentEntity->curstate.controller[2] = ((flYaw / 4.0) + 30) / (60.0 / 255.0); + m_pCurrentEntity->curstate.controller[3] = ((flYaw / 4.0) + 30) / (60.0 / 255.0); + m_pCurrentEntity->latched.prevcontroller[0] = m_pCurrentEntity->curstate.controller[0]; + m_pCurrentEntity->latched.prevcontroller[1] = m_pCurrentEntity->curstate.controller[1]; + m_pCurrentEntity->latched.prevcontroller[2] = m_pCurrentEntity->curstate.controller[2]; + m_pCurrentEntity->latched.prevcontroller[3] = m_pCurrentEntity->curstate.controller[3]; + + m_pCurrentEntity->angles[YAW] = m_pPlayerInfo->gaityaw; + if (m_pCurrentEntity->angles[YAW] < -0) + m_pCurrentEntity->angles[YAW] += 360; + m_pCurrentEntity->latched.prevangles[YAW] = m_pCurrentEntity->angles[YAW]; + + pseqdesc = (mstudioseqdesc_t *)((byte *)m_pStudioHeader + m_pStudioHeader->seqindex) + pplayer->gaitsequence; + + // calc gait frame + if (pseqdesc->linearmovement[0] > 0) + { + m_pPlayerInfo->gaitframe += (m_flGaitMovement / pseqdesc->linearmovement[0]) * pseqdesc->numframes; + } + else + { + m_pPlayerInfo->gaitframe += pseqdesc->fps * dt; + } + + // do modulo + m_pPlayerInfo->gaitframe = m_pPlayerInfo->gaitframe - (int)(m_pPlayerInfo->gaitframe / pseqdesc->numframes) * pseqdesc->numframes; + if (m_pPlayerInfo->gaitframe < 0) + m_pPlayerInfo->gaitframe += pseqdesc->numframes; +} + +/* +==================== +StudioDrawPlayer + +==================== +*/ +int CStudioModelRenderer::StudioDrawPlayer( int flags, entity_state_t *pplayer ) +{ + alight_t lighting; + vec3_t dir; + + m_pCurrentEntity = IEngineStudio.GetCurrentEntity(); + IEngineStudio.GetTimes( &m_nFrameCount, &m_clTime, &m_clOldTime ); + IEngineStudio.GetViewInfo( m_vRenderOrigin, m_vUp, m_vRight, m_vNormal ); + IEngineStudio.GetAliasScale( &m_fSoftwareXScale, &m_fSoftwareYScale ); + + // Con_DPrintf("DrawPlayer %d\n", m_pCurrentEntity->blending[0] ); + + // Con_DPrintf("DrawPlayer %d %d (%d)\n", m_nFrameCount, pplayer->player_index, m_pCurrentEntity->curstate.sequence ); + + // Con_DPrintf("Player %.2f %.2f %.2f\n", pplayer->velocity[0], pplayer->velocity[1], pplayer->velocity[2] ); + + m_nPlayerIndex = pplayer->number - 1; + + if (m_nPlayerIndex < 0 || m_nPlayerIndex >= gEngfuncs.GetMaxClients()) + return 0; + + m_pRenderModel = IEngineStudio.SetupPlayerModel( m_nPlayerIndex ); + if (m_pRenderModel == NULL) + return 0; + + m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (m_pRenderModel); + IEngineStudio.StudioSetHeader( m_pStudioHeader ); + IEngineStudio.SetRenderModel( m_pRenderModel ); + + if (pplayer->gaitsequence) + { + vec3_t orig_angles; + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + + VectorCopy( m_pCurrentEntity->angles, orig_angles ); + + StudioProcessGait( pplayer ); + + m_pPlayerInfo->gaitsequence = pplayer->gaitsequence; + m_pPlayerInfo = NULL; + + StudioSetUpTransform( 0 ); + VectorCopy( orig_angles, m_pCurrentEntity->angles ); + } + else + { + m_pCurrentEntity->curstate.controller[0] = 127; + m_pCurrentEntity->curstate.controller[1] = 127; + m_pCurrentEntity->curstate.controller[2] = 127; + m_pCurrentEntity->curstate.controller[3] = 127; + m_pCurrentEntity->latched.prevcontroller[0] = m_pCurrentEntity->curstate.controller[0]; + m_pCurrentEntity->latched.prevcontroller[1] = m_pCurrentEntity->curstate.controller[1]; + m_pCurrentEntity->latched.prevcontroller[2] = m_pCurrentEntity->curstate.controller[2]; + m_pCurrentEntity->latched.prevcontroller[3] = m_pCurrentEntity->curstate.controller[3]; + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + m_pPlayerInfo->gaitsequence = 0; + + StudioSetUpTransform( 0 ); + } + + if (flags & STUDIO_RENDER) + { + // see if the bounding box lets us trivially reject, also sets + if (!IEngineStudio.StudioCheckBBox ()) + return 0; + + (*m_pModelsDrawn)++; + (*m_pStudioModelCount)++; // render data cache cookie + + if (m_pStudioHeader->numbodyparts == 0) + return 1; + } + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + StudioSetupBones( ); + StudioSaveBones( ); + m_pPlayerInfo->renderframe = m_nFrameCount; + + m_pPlayerInfo = NULL; + + if (flags & STUDIO_EVENTS) + { + StudioCalcAttachments( ); + IEngineStudio.StudioClientEvents( ); + // copy attachments into global entity array + if ( m_pCurrentEntity->index > 0 ) + { + cl_entity_t *ent = gEngfuncs.GetEntityByIndex( m_pCurrentEntity->index ); + + memcpy( ent->attachment, m_pCurrentEntity->attachment, sizeof( vec3_t ) * 4 ); + } + } + + if (flags & STUDIO_RENDER) + { + if (m_pCvarHiModels->value && m_pRenderModel != m_pCurrentEntity->model ) + { + // show highest resolution multiplayer model + m_pCurrentEntity->curstate.body = 255; + } + + if (!(m_pCvarDeveloper->value == 0 && gEngfuncs.GetMaxClients() == 1 ) && ( m_pRenderModel == m_pCurrentEntity->model ) ) + { + m_pCurrentEntity->curstate.body = 1; // force helmet + } + + lighting.plightvec = dir; + IEngineStudio.StudioDynamicLight(m_pCurrentEntity, &lighting ); + + IEngineStudio.StudioEntityLight( &lighting ); + + // model and frame independant + IEngineStudio.StudioSetupLighting (&lighting); + + m_pPlayerInfo = IEngineStudio.PlayerInfo( m_nPlayerIndex ); + + // get remap colors + m_nTopColor = m_pPlayerInfo->topcolor; + if (m_nTopColor < 0) + m_nTopColor = 0; + if (m_nTopColor > 360) + m_nTopColor = 360; + m_nBottomColor = m_pPlayerInfo->bottomcolor; + if (m_nBottomColor < 0) + m_nBottomColor = 0; + if (m_nBottomColor > 360) + m_nBottomColor = 360; + + IEngineStudio.StudioSetRemapColors( m_nTopColor, m_nBottomColor ); + + StudioRenderModel( ); + m_pPlayerInfo = NULL; + + if (pplayer->weaponmodel) + { + cl_entity_t saveent = *m_pCurrentEntity; + + model_t *pweaponmodel = IEngineStudio.GetModelByIndex( pplayer->weaponmodel ); + + m_pStudioHeader = (studiohdr_t *)IEngineStudio.Mod_Extradata (pweaponmodel); + IEngineStudio.StudioSetHeader( m_pStudioHeader ); + + StudioMergeBones( pweaponmodel); + + IEngineStudio.StudioSetupLighting (&lighting); + + StudioRenderModel( ); + + StudioCalcAttachments( ); + + *m_pCurrentEntity = saveent; + } + } + + return 1; +} + +/* +==================== +StudioCalcAttachments + +==================== +*/ +void CStudioModelRenderer::StudioCalcAttachments( void ) +{ + int i; + mstudioattachment_t *pattachment; + + if ( m_pStudioHeader->numattachments > 4 ) + { + gEngfuncs.Con_DPrintf( "Too many attachments on %s\n", m_pCurrentEntity->model->name ); + exit( -1 ); + } + + // calculate attachment points + pattachment = (mstudioattachment_t *)((byte *)m_pStudioHeader + m_pStudioHeader->attachmentindex); + for (i = 0; i < m_pStudioHeader->numattachments; i++) + { + VectorTransform( pattachment[i].org, (*m_plighttransform)[pattachment[i].bone], m_pCurrentEntity->attachment[i] ); + } +} + +/* +==================== +StudioRenderModel + +==================== +*/ +void CStudioModelRenderer::StudioRenderModel( void ) +{ + IEngineStudio.SetChromeOrigin(); + IEngineStudio.SetForceFaceFlags( 0 ); + + if ( m_pCurrentEntity->curstate.renderfx == kRenderFxGlowShell ) + { + m_pCurrentEntity->curstate.renderfx = kRenderFxNone; + StudioRenderFinal( ); + + if ( !IEngineStudio.IsHardware() ) + { + gEngfuncs.pTriAPI->RenderMode( kRenderTransAdd ); + } + + IEngineStudio.SetForceFaceFlags( STUDIO_NF_CHROME ); + + gEngfuncs.pTriAPI->SpriteTexture( m_pChromeSprite, 0 ); + m_pCurrentEntity->curstate.renderfx = kRenderFxGlowShell; + + StudioRenderFinal( ); + if ( !IEngineStudio.IsHardware() ) + { + gEngfuncs.pTriAPI->RenderMode( kRenderNormal ); + } + } + else + { + StudioRenderFinal( ); + } +} + +/* +==================== +StudioRenderFinal_Software + +==================== +*/ +void CStudioModelRenderer::StudioRenderFinal_Software( void ) +{ + int i; + + // Note, rendermode set here has effect in SW + IEngineStudio.SetupRenderer( 0 ); + + if (m_pCvarDrawEntities->value == 2) + { + IEngineStudio.StudioDrawBones( ); + } + else if (m_pCvarDrawEntities->value == 3) + { + IEngineStudio.StudioDrawHulls( ); + } + else + { + for (i=0 ; i < m_pStudioHeader->numbodyparts ; i++) + { + IEngineStudio.StudioSetupModel( i, (void **)&m_pBodyPart, (void **)&m_pSubModel ); + IEngineStudio.StudioDrawPoints( ); + } + } + + if (m_pCvarDrawEntities->value == 4) + { + gEngfuncs.pTriAPI->RenderMode( kRenderTransAdd ); + IEngineStudio.StudioDrawHulls( ); + gEngfuncs.pTriAPI->RenderMode( kRenderNormal ); + } + + if (m_pCvarDrawEntities->value == 5) + { + IEngineStudio.StudioDrawAbsBBox( ); + } + + IEngineStudio.RestoreRenderer(); +} + +/* +==================== +StudioRenderFinal_Hardware + +==================== +*/ +void CStudioModelRenderer::StudioRenderFinal_Hardware( void ) +{ + int i; + int rendermode; + + rendermode = IEngineStudio.GetForceFaceFlags() ? kRenderTransAdd : m_pCurrentEntity->curstate.rendermode; + IEngineStudio.SetupRenderer( rendermode ); + + if (m_pCvarDrawEntities->value == 2) + { + IEngineStudio.StudioDrawBones(); + } + else if (m_pCvarDrawEntities->value == 3) + { + IEngineStudio.StudioDrawHulls(); + } + else + { + for (i=0 ; i < m_pStudioHeader->numbodyparts ; i++) + { + IEngineStudio.StudioSetupModel( i, (void **)&m_pBodyPart, (void **)&m_pSubModel ); + + if (m_fDoInterp) + { + // interpolation messes up bounding boxes. + m_pCurrentEntity->trivial_accept = 0; + } + + IEngineStudio.GL_SetRenderMode( rendermode ); + IEngineStudio.StudioDrawPoints(); + IEngineStudio.GL_StudioDrawShadow(); + } + } + + if ( m_pCvarDrawEntities->value == 4 ) + { + gEngfuncs.pTriAPI->RenderMode( kRenderTransAdd ); + IEngineStudio.StudioDrawHulls( ); + gEngfuncs.pTriAPI->RenderMode( kRenderNormal ); + } + + IEngineStudio.RestoreRenderer(); +} + +/* +==================== +StudioRenderFinal + +==================== +*/ +void CStudioModelRenderer::StudioRenderFinal(void) +{ + if ( IEngineStudio.IsHardware() ) + { + StudioRenderFinal_Hardware(); + } + else + { + StudioRenderFinal_Software(); + } +} + diff --git a/cl_dll/StudioModelRenderer.h b/cl_dll/StudioModelRenderer.h new file mode 100644 index 0000000..0220d44 --- /dev/null +++ b/cl_dll/StudioModelRenderer.h @@ -0,0 +1,182 @@ +#if !defined ( STUDIOMODELRENDERER_H ) +#define STUDIOMODELRENDERER_H +#if defined( _WIN32 ) +#pragma once +#endif + +/* +==================== +CStudioModelRenderer + +==================== +*/ +class CStudioModelRenderer +{ +public: + // Construction/Destruction + CStudioModelRenderer( void ); + virtual ~CStudioModelRenderer( void ); + + // Initialization + virtual void Init( void ); + +public: + // Public Interfaces + virtual int StudioDrawModel ( int flags ); + virtual int StudioDrawPlayer ( int flags, struct entity_state_s *pplayer ); + +public: + // Local interfaces + // + + // Look up animation data for sequence + virtual mstudioanim_t *StudioGetAnim ( model_t *m_pSubModel, mstudioseqdesc_t *pseqdesc ); + + // Interpolate model position and angles and set up matrices + virtual void StudioSetUpTransform (int trivial_accept); + + // Set up model bone positions + virtual void StudioSetupBones ( void ); + + // Find final attachment points + virtual void StudioCalcAttachments ( void ); + + // Save bone matrices and names + virtual void StudioSaveBones( void ); + + // Merge cached bones with current bones for model + virtual void StudioMergeBones ( model_t *m_pSubModel ); + + // Determine interpolation fraction + virtual float StudioEstimateInterpolant( void ); + + // Determine current frame for rendering + virtual float StudioEstimateFrame ( mstudioseqdesc_t *pseqdesc ); + + // Apply special effects to transform matrix + virtual void StudioFxTransform( cl_entity_t *ent, float transform[3][4] ); + + // Spherical interpolation of bones + virtual void StudioSlerpBones ( vec4_t q1[], float pos1[][3], vec4_t q2[], float pos2[][3], float s ); + + // Compute bone adjustments ( bone controllers ) + virtual void StudioCalcBoneAdj ( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen ); + + // Get bone quaternions + virtual void StudioCalcBoneQuaterion ( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *q ); + + // Get bone positions + virtual void StudioCalcBonePosition ( int frame, float s, mstudiobone_t *pbone, mstudioanim_t *panim, float *adj, float *pos ); + + // Compute rotations + virtual void StudioCalcRotations ( float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f ); + + // Send bones and verts to renderer + virtual void StudioRenderModel ( void ); + + // Finalize rendering + virtual void StudioRenderFinal (void); + + // GL&D3D vs. Software renderer finishing functions + virtual void StudioRenderFinal_Software ( void ); + virtual void StudioRenderFinal_Hardware ( void ); + + // Player specific data + // Determine pitch and blending amounts for players + virtual void StudioPlayerBlend ( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch ); + + // Estimate gait frame for player + virtual void StudioEstimateGait ( entity_state_t *pplayer ); + + // Process movement of player + virtual void StudioProcessGait ( entity_state_t *pplayer ); + +public: + + // Client clock + double m_clTime; + // Old Client clock + double m_clOldTime; + + // Do interpolation? + int m_fDoInterp; + // Do gait estimation? + int m_fGaitEstimation; + + // Current render frame # + int m_nFrameCount; + + // Cvars that studio model code needs to reference + // + // Use high quality models? + cvar_t *m_pCvarHiModels; + // Developer debug output desired? + cvar_t *m_pCvarDeveloper; + // Draw entities bone hit boxes, etc? + cvar_t *m_pCvarDrawEntities; + + // The entity which we are currently rendering. + cl_entity_t *m_pCurrentEntity; + + // The model for the entity being rendered + model_t *m_pRenderModel; + + // Player info for current player, if drawing a player + player_info_t *m_pPlayerInfo; + + // The index of the player being drawn + int m_nPlayerIndex; + + // The player's gait movement + float m_flGaitMovement; + + // Pointer to header block for studio model data + studiohdr_t *m_pStudioHeader; + + // Pointers to current body part and submodel + mstudiobodyparts_t *m_pBodyPart; + mstudiomodel_t *m_pSubModel; + + // Palette substition for top and bottom of model + int m_nTopColor; + int m_nBottomColor; + + // + // Sprite model used for drawing studio model chrome + model_t *m_pChromeSprite; + + // Caching + // Number of bones in bone cache + int m_nCachedBones; + // Names of cached bones + char m_nCachedBoneNames[ MAXSTUDIOBONES ][ 32 ]; + // Cached bone & light transformation matrices + float m_rgCachedBoneTransform [ MAXSTUDIOBONES ][ 3 ][ 4 ]; + float m_rgCachedLightTransform[ MAXSTUDIOBONES ][ 3 ][ 4 ]; + + // Software renderer scale factors + float m_fSoftwareXScale, m_fSoftwareYScale; + + // Current view vectors and render origin + float m_vUp[ 3 ]; + float m_vRight[ 3 ]; + float m_vNormal[ 3 ]; + + float m_vRenderOrigin[ 3 ]; + + // Model render counters ( from engine ) + int *m_pStudioModelCount; + int *m_pModelsDrawn; + + // Matrices + // Model to world transformation + float (*m_protationmatrix)[ 3 ][ 4 ]; + // Model to view transformation + float (*m_paliastransform)[ 3 ][ 4 ]; + + // Concatenated bone and light transforms + float (*m_pbonetransform) [ MAXSTUDIOBONES ][ 3 ][ 4 ]; + float (*m_plighttransform)[ MAXSTUDIOBONES ][ 3 ][ 4 ]; +}; + +#endif // STUDIOMODELRENDERER_H \ No newline at end of file diff --git a/cl_dll/cl_dll.dsp b/cl_dll/cl_dll.dsp index 0c84ef6..a77d0dc 100644 --- a/cl_dll/cl_dll.dsp +++ b/cl_dll/cl_dll.dsp @@ -186,6 +186,10 @@ SOURCE=.\flashlight.cpp # End Source File # Begin Source File +SOURCE=.\GameStudioModelRenderer.cpp +# End Source File +# Begin Source File + SOURCE=.\geiger.cpp # End Source File # Begin Source File @@ -266,6 +270,14 @@ SOURCE=.\statusbar.cpp # End Source File # Begin Source File +SOURCE=.\studio_util.cpp +# End Source File +# Begin Source File + +SOURCE=.\StudioModelRenderer.cpp +# End Source File +# Begin Source File + SOURCE=.\text_message.cpp # End Source File # Begin Source File @@ -366,6 +378,10 @@ SOURCE=.\eventscripts.h # End Source File # Begin Source File +SOURCE=.\GameStudioModelRenderer.h +# End Source File +# Begin Source File + SOURCE=.\health.h # End Source File # Begin Source File @@ -418,6 +434,14 @@ SOURCE=..\pm_shared\pm_shared.h # End Source File # Begin Source File +SOURCE=.\studio_util.h +# End Source File +# Begin Source File + +SOURCE=.\StudioModelRenderer.h +# End Source File +# Begin Source File + SOURCE=.\util.h # End Source File # Begin Source File diff --git a/cl_dll/cl_dll.dsw b/cl_dll/cl_dll.dsw index 2a9dcfb..d7d3ee1 100644 --- a/cl_dll/cl_dll.dsw +++ b/cl_dll/cl_dll.dsw @@ -8,7 +8,7 @@ Project: "cl_dll"=.\cl_dll.dsp - Package Owner=<4> Package=<5> {{{ begin source code control - "$/HLStandardSDK/SourceCode/cl_dll", NUWHAAAA + "$/GoldSrc/cl_dll", HGEBAAAA . end source code control }}} @@ -23,6 +23,10 @@ Global: Package=<5> {{{ + begin source code control + "$/Sdk/Standard/cl_dll", UBZBAAAA + . + end source code control }}} Package=<3> diff --git a/cl_dll/cl_dll.mak b/cl_dll/cl_dll.mak deleted file mode 100644 index 491e06d..0000000 --- a/cl_dll/cl_dll.mak +++ /dev/null @@ -1,1245 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -!IF "$(CFG)" == "" -CFG=cl_dll - Win32 Debug -!MESSAGE No configuration specified. Defaulting to cl_dll - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "cl_dll - Win32 Release" && "$(CFG)" != "cl_dll - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "cl_dll.mak" CFG="cl_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cl_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "cl_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "cl_dll - Win32 Debug" -MTL=mktyplib.exe -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\client.dll" "..\..\valve\cl_dlls\client.dll" - -CLEAN : - -@erase "$(INTDIR)\ammo.obj" - -@erase "$(INTDIR)\ammo_secondary.obj" - -@erase "$(INTDIR)\ammohistory.obj" - -@erase "$(INTDIR)\battery.obj" - -@erase "$(INTDIR)\cdll_int.obj" - -@erase "$(INTDIR)\death.obj" - -@erase "$(INTDIR)\flashlight.obj" - -@erase "$(INTDIR)\geiger.obj" - -@erase "$(INTDIR)\health.obj" - -@erase "$(INTDIR)\hud.obj" - -@erase "$(INTDIR)\hud_msg.obj" - -@erase "$(INTDIR)\hud_redraw.obj" - -@erase "$(INTDIR)\hud_update.obj" - -@erase "$(INTDIR)\menu.obj" - -@erase "$(INTDIR)\message.obj" - -@erase "$(INTDIR)\MOTD.obj" - -@erase "$(INTDIR)\parsemsg.obj" - -@erase "$(INTDIR)\saytext.obj" - -@erase "$(INTDIR)\scoreboard.obj" - -@erase "$(INTDIR)\status_icons.obj" - -@erase "$(INTDIR)\statusbar.obj" - -@erase "$(INTDIR)\text_message.obj" - -@erase "$(INTDIR)\train.obj" - -@erase "$(INTDIR)\util.obj" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\client.dll" - -@erase "$(OUTDIR)\client.exp" - -@erase "$(OUTDIR)\client.lib" - -@erase "$(OUTDIR)\client.map" - -@erase "..\..\valve\cl_dlls\client.dll" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -CPP_PROJ=/nologo /MT /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\ - /Fp"$(INTDIR)/cl_dll.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/cl_dll.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/client.dll" -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib /nologo /subsystem:windows /dll\ - /incremental:no /pdb:"$(OUTDIR)/client.pdb" /map:"$(INTDIR)/client.map"\ - /machine:I386 /out:"$(OUTDIR)/client.dll" /implib:"$(OUTDIR)/client.lib" -LINK32_OBJS= \ - "$(INTDIR)\ammo.obj" \ - "$(INTDIR)\ammo_secondary.obj" \ - "$(INTDIR)\ammohistory.obj" \ - "$(INTDIR)\battery.obj" \ - "$(INTDIR)\cdll_int.obj" \ - "$(INTDIR)\death.obj" \ - "$(INTDIR)\flashlight.obj" \ - "$(INTDIR)\geiger.obj" \ - "$(INTDIR)\health.obj" \ - "$(INTDIR)\hud.obj" \ - "$(INTDIR)\hud_msg.obj" \ - "$(INTDIR)\hud_redraw.obj" \ - "$(INTDIR)\hud_update.obj" \ - "$(INTDIR)\menu.obj" \ - "$(INTDIR)\message.obj" \ - "$(INTDIR)\MOTD.obj" \ - "$(INTDIR)\parsemsg.obj" \ - "$(INTDIR)\saytext.obj" \ - "$(INTDIR)\scoreboard.obj" \ - "$(INTDIR)\status_icons.obj" \ - "$(INTDIR)\statusbar.obj" \ - "$(INTDIR)\text_message.obj" \ - "$(INTDIR)\train.obj" \ - "$(INTDIR)\util.obj" - -"$(OUTDIR)\client.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -# Begin Custom Build - Copying to \quiver\valve\cl_dlls -TargetDir=.\Release -InputPath=.\Release\client.dll -SOURCE=$(InputPath) - -"\quiver\valve\cl_dlls\client.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(TargetDir)\client.dll \quiver\valve\cl_dlls - -# End Custom Build - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\client.dll" "$(OUTDIR)\cl_dll.bsc"\ - "..\..\valve\cl_dlls\client.dll" - -CLEAN : - -@erase "$(INTDIR)\ammo.obj" - -@erase "$(INTDIR)\ammo.sbr" - -@erase "$(INTDIR)\ammo_secondary.obj" - -@erase "$(INTDIR)\ammo_secondary.sbr" - -@erase "$(INTDIR)\ammohistory.obj" - -@erase "$(INTDIR)\ammohistory.sbr" - -@erase "$(INTDIR)\battery.obj" - -@erase "$(INTDIR)\battery.sbr" - -@erase "$(INTDIR)\cdll_int.obj" - -@erase "$(INTDIR)\cdll_int.sbr" - -@erase "$(INTDIR)\death.obj" - -@erase "$(INTDIR)\death.sbr" - -@erase "$(INTDIR)\flashlight.obj" - -@erase "$(INTDIR)\flashlight.sbr" - -@erase "$(INTDIR)\geiger.obj" - -@erase "$(INTDIR)\geiger.sbr" - -@erase "$(INTDIR)\health.obj" - -@erase "$(INTDIR)\health.sbr" - -@erase "$(INTDIR)\hud.obj" - -@erase "$(INTDIR)\hud.sbr" - -@erase "$(INTDIR)\hud_msg.obj" - -@erase "$(INTDIR)\hud_msg.sbr" - -@erase "$(INTDIR)\hud_redraw.obj" - -@erase "$(INTDIR)\hud_redraw.sbr" - -@erase "$(INTDIR)\hud_update.obj" - -@erase "$(INTDIR)\hud_update.sbr" - -@erase "$(INTDIR)\menu.obj" - -@erase "$(INTDIR)\menu.sbr" - -@erase "$(INTDIR)\message.obj" - -@erase "$(INTDIR)\message.sbr" - -@erase "$(INTDIR)\MOTD.obj" - -@erase "$(INTDIR)\MOTD.sbr" - -@erase "$(INTDIR)\parsemsg.obj" - -@erase "$(INTDIR)\parsemsg.sbr" - -@erase "$(INTDIR)\saytext.obj" - -@erase "$(INTDIR)\saytext.sbr" - -@erase "$(INTDIR)\scoreboard.obj" - -@erase "$(INTDIR)\scoreboard.sbr" - -@erase "$(INTDIR)\status_icons.obj" - -@erase "$(INTDIR)\status_icons.sbr" - -@erase "$(INTDIR)\statusbar.obj" - -@erase "$(INTDIR)\statusbar.sbr" - -@erase "$(INTDIR)\text_message.obj" - -@erase "$(INTDIR)\text_message.sbr" - -@erase "$(INTDIR)\train.obj" - -@erase "$(INTDIR)\train.sbr" - -@erase "$(INTDIR)\util.obj" - -@erase "$(INTDIR)\util.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\cl_dll.bsc" - -@erase "$(OUTDIR)\client.dll" - -@erase "$(OUTDIR)\client.exp" - -@erase "$(OUTDIR)\client.ilk" - -@erase "$(OUTDIR)\client.lib" - -@erase "$(OUTDIR)\client.pdb" - -@erase "..\..\valve\cl_dlls\client.dll" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /c -CPP_PROJ=/nologo /G5 /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\ - "_WINDOWS" /D "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/cl_dll.pch" /YX\ - /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/cl_dll.bsc" -BSC32_SBRS= \ - "$(INTDIR)\ammo.sbr" \ - "$(INTDIR)\ammo_secondary.sbr" \ - "$(INTDIR)\ammohistory.sbr" \ - "$(INTDIR)\battery.sbr" \ - "$(INTDIR)\cdll_int.sbr" \ - "$(INTDIR)\death.sbr" \ - "$(INTDIR)\flashlight.sbr" \ - "$(INTDIR)\geiger.sbr" \ - "$(INTDIR)\health.sbr" \ - "$(INTDIR)\hud.sbr" \ - "$(INTDIR)\hud_msg.sbr" \ - "$(INTDIR)\hud_redraw.sbr" \ - "$(INTDIR)\hud_update.sbr" \ - "$(INTDIR)\menu.sbr" \ - "$(INTDIR)\message.sbr" \ - "$(INTDIR)\MOTD.sbr" \ - "$(INTDIR)\parsemsg.sbr" \ - "$(INTDIR)\saytext.sbr" \ - "$(INTDIR)\scoreboard.sbr" \ - "$(INTDIR)\status_icons.sbr" \ - "$(INTDIR)\statusbar.sbr" \ - "$(INTDIR)\text_message.sbr" \ - "$(INTDIR)\train.sbr" \ - "$(INTDIR)\util.sbr" - -"$(OUTDIR)\cl_dll.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/client.dll" -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes\ - /pdb:"$(OUTDIR)/client.pdb" /debug /machine:I386 /out:"$(OUTDIR)/client.dll"\ - /implib:"$(OUTDIR)/client.lib" -LINK32_OBJS= \ - "$(INTDIR)\ammo.obj" \ - "$(INTDIR)\ammo_secondary.obj" \ - "$(INTDIR)\ammohistory.obj" \ - "$(INTDIR)\battery.obj" \ - "$(INTDIR)\cdll_int.obj" \ - "$(INTDIR)\death.obj" \ - "$(INTDIR)\flashlight.obj" \ - "$(INTDIR)\geiger.obj" \ - "$(INTDIR)\health.obj" \ - "$(INTDIR)\hud.obj" \ - "$(INTDIR)\hud_msg.obj" \ - "$(INTDIR)\hud_redraw.obj" \ - "$(INTDIR)\hud_update.obj" \ - "$(INTDIR)\menu.obj" \ - "$(INTDIR)\message.obj" \ - "$(INTDIR)\MOTD.obj" \ - "$(INTDIR)\parsemsg.obj" \ - "$(INTDIR)\saytext.obj" \ - "$(INTDIR)\scoreboard.obj" \ - "$(INTDIR)\status_icons.obj" \ - "$(INTDIR)\statusbar.obj" \ - "$(INTDIR)\text_message.obj" \ - "$(INTDIR)\train.obj" \ - "$(INTDIR)\util.obj" - -"$(OUTDIR)\client.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -# Begin Custom Build - Copying to \quiver\valve\cl_dlls -TargetDir=.\Debug -InputPath=.\Debug\client.dll -SOURCE=$(InputPath) - -"\quiver\valve\cl_dlls\client.dll" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - copy $(TargetDir)\client.dll \quiver\valve\cl_dlls - -# End Custom Build - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "cl_dll - Win32 Release" -# Name "cl_dll - Win32 Debug" - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\cl_dll.h - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\cdll_int.cpp - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -DEP_CPP_CDLL_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\cdll_int.obj" : $(SOURCE) $(DEP_CPP_CDLL_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -DEP_CPP_CDLL_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\cdll_int.obj" : $(SOURCE) $(DEP_CPP_CDLL_) "$(INTDIR)" - -"$(INTDIR)\cdll_int.sbr" : $(SOURCE) $(DEP_CPP_CDLL_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hud_redraw.cpp - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -DEP_CPP_HUD_R=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_redraw.obj" : $(SOURCE) $(DEP_CPP_HUD_R) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -DEP_CPP_HUD_R=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_redraw.obj" : $(SOURCE) $(DEP_CPP_HUD_R) "$(INTDIR)" - -"$(INTDIR)\hud_redraw.sbr" : $(SOURCE) $(DEP_CPP_HUD_R) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hud.cpp -DEP_CPP_HUD_C=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\hud.obj" : $(SOURCE) $(DEP_CPP_HUD_C) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\hud.obj" : $(SOURCE) $(DEP_CPP_HUD_C) "$(INTDIR)" - -"$(INTDIR)\hud.sbr" : $(SOURCE) $(DEP_CPP_HUD_C) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\parsemsg.cpp - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\parsemsg.obj" : $(SOURCE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\parsemsg.obj" : $(SOURCE) "$(INTDIR)" - -"$(INTDIR)\parsemsg.sbr" : $(SOURCE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hud_msg.cpp - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -DEP_CPP_HUD_M=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_msg.obj" : $(SOURCE) $(DEP_CPP_HUD_M) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -DEP_CPP_HUD_M=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_msg.obj" : $(SOURCE) $(DEP_CPP_HUD_M) "$(INTDIR)" - -"$(INTDIR)\hud_msg.sbr" : $(SOURCE) $(DEP_CPP_HUD_M) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hud_update.cpp - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -DEP_CPP_HUD_U=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_update.obj" : $(SOURCE) $(DEP_CPP_HUD_U) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -DEP_CPP_HUD_U=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -"$(INTDIR)\hud_update.obj" : $(SOURCE) $(DEP_CPP_HUD_U) "$(INTDIR)" - -"$(INTDIR)\hud_update.sbr" : $(SOURCE) $(DEP_CPP_HUD_U) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\util.h - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\parsemsg.h - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\hud.h - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ammo.cpp -DEP_CPP_AMMO_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\ammohistory.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\ammo.obj" : $(SOURCE) $(DEP_CPP_AMMO_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\ammo.obj" : $(SOURCE) $(DEP_CPP_AMMO_) "$(INTDIR)" - -"$(INTDIR)\ammo.sbr" : $(SOURCE) $(DEP_CPP_AMMO_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\geiger.cpp -DEP_CPP_GEIGE=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\geiger.obj" : $(SOURCE) $(DEP_CPP_GEIGE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\geiger.obj" : $(SOURCE) $(DEP_CPP_GEIGE) "$(INTDIR)" - -"$(INTDIR)\geiger.sbr" : $(SOURCE) $(DEP_CPP_GEIGE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\health.cpp -DEP_CPP_HEALT=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\health.obj" : $(SOURCE) $(DEP_CPP_HEALT) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\health.obj" : $(SOURCE) $(DEP_CPP_HEALT) "$(INTDIR)" - -"$(INTDIR)\health.sbr" : $(SOURCE) $(DEP_CPP_HEALT) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\battery.cpp -DEP_CPP_BATTE=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\battery.obj" : $(SOURCE) $(DEP_CPP_BATTE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\battery.obj" : $(SOURCE) $(DEP_CPP_BATTE) "$(INTDIR)" - -"$(INTDIR)\battery.sbr" : $(SOURCE) $(DEP_CPP_BATTE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\util.cpp -DEP_CPP_UTIL_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\util.obj" : $(SOURCE) $(DEP_CPP_UTIL_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\util.obj" : $(SOURCE) $(DEP_CPP_UTIL_) "$(INTDIR)" - -"$(INTDIR)\util.sbr" : $(SOURCE) $(DEP_CPP_UTIL_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\util_vector.h - -!IF "$(CFG)" == "cl_dll - Win32 Release" - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\train.cpp -DEP_CPP_TRAIN=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\train.obj" : $(SOURCE) $(DEP_CPP_TRAIN) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\train.obj" : $(SOURCE) $(DEP_CPP_TRAIN) "$(INTDIR)" - -"$(INTDIR)\train.sbr" : $(SOURCE) $(DEP_CPP_TRAIN) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\flashlight.cpp -DEP_CPP_FLASH=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\flashlight.obj" : $(SOURCE) $(DEP_CPP_FLASH) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\flashlight.obj" : $(SOURCE) $(DEP_CPP_FLASH) "$(INTDIR)" - -"$(INTDIR)\flashlight.sbr" : $(SOURCE) $(DEP_CPP_FLASH) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\message.cpp -DEP_CPP_MESSA=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\message.obj" : $(SOURCE) $(DEP_CPP_MESSA) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\message.obj" : $(SOURCE) $(DEP_CPP_MESSA) "$(INTDIR)" - -"$(INTDIR)\message.sbr" : $(SOURCE) $(DEP_CPP_MESSA) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\scoreboard.cpp -DEP_CPP_SCORE=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\scoreboard.obj" : $(SOURCE) $(DEP_CPP_SCORE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\scoreboard.obj" : $(SOURCE) $(DEP_CPP_SCORE) "$(INTDIR)" - -"$(INTDIR)\scoreboard.sbr" : $(SOURCE) $(DEP_CPP_SCORE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\MOTD.cpp -DEP_CPP_MOTD_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\MOTD.obj" : $(SOURCE) $(DEP_CPP_MOTD_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\MOTD.obj" : $(SOURCE) $(DEP_CPP_MOTD_) "$(INTDIR)" - -"$(INTDIR)\MOTD.sbr" : $(SOURCE) $(DEP_CPP_MOTD_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ammohistory.cpp -DEP_CPP_AMMOH=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\ammohistory.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\ammohistory.obj" : $(SOURCE) $(DEP_CPP_AMMOH) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\ammohistory.obj" : $(SOURCE) $(DEP_CPP_AMMOH) "$(INTDIR)" - -"$(INTDIR)\ammohistory.sbr" : $(SOURCE) $(DEP_CPP_AMMOH) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\saytext.cpp -DEP_CPP_SAYTE=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\saytext.obj" : $(SOURCE) $(DEP_CPP_SAYTE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\saytext.obj" : $(SOURCE) $(DEP_CPP_SAYTE) "$(INTDIR)" - -"$(INTDIR)\saytext.sbr" : $(SOURCE) $(DEP_CPP_SAYTE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\death.cpp -DEP_CPP_DEATH=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\death.obj" : $(SOURCE) $(DEP_CPP_DEATH) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\death.obj" : $(SOURCE) $(DEP_CPP_DEATH) "$(INTDIR)" - -"$(INTDIR)\death.sbr" : $(SOURCE) $(DEP_CPP_DEATH) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\menu.cpp -DEP_CPP_MENU_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\menu.obj" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\menu.obj" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)" - -"$(INTDIR)\menu.sbr" : $(SOURCE) $(DEP_CPP_MENU_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\ammo_secondary.cpp -DEP_CPP_AMMO_S=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\ammo_secondary.obj" : $(SOURCE) $(DEP_CPP_AMMO_S) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\ammo_secondary.obj" : $(SOURCE) $(DEP_CPP_AMMO_S) "$(INTDIR)" - -"$(INTDIR)\ammo_secondary.sbr" : $(SOURCE) $(DEP_CPP_AMMO_S) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\statusbar.cpp -DEP_CPP_STATU=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\statusbar.obj" : $(SOURCE) $(DEP_CPP_STATU) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\statusbar.obj" : $(SOURCE) $(DEP_CPP_STATU) "$(INTDIR)" - -"$(INTDIR)\statusbar.sbr" : $(SOURCE) $(DEP_CPP_STATU) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\text_message.cpp -DEP_CPP_TEXT_=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\text_message.obj" : $(SOURCE) $(DEP_CPP_TEXT_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\text_message.obj" : $(SOURCE) $(DEP_CPP_TEXT_) "$(INTDIR)" - -"$(INTDIR)\text_message.sbr" : $(SOURCE) $(DEP_CPP_TEXT_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\status_icons.cpp -DEP_CPP_STATUS=\ - "..\dlls\cdll_dll.h"\ - "..\engine\cdll_int.h"\ - ".\ammo.h"\ - ".\cl_dll.h"\ - ".\health.h"\ - ".\hud.h"\ - ".\parsemsg.h"\ - ".\util.h"\ - ".\util_vector.h"\ - - -!IF "$(CFG)" == "cl_dll - Win32 Release" - - -"$(INTDIR)\status_icons.obj" : $(SOURCE) $(DEP_CPP_STATUS) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "cl_dll - Win32 Debug" - - -"$(INTDIR)\status_icons.obj" : $(SOURCE) $(DEP_CPP_STATUS) "$(INTDIR)" - -"$(INTDIR)\status_icons.sbr" : $(SOURCE) $(DEP_CPP_STATUS) "$(INTDIR)" - - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/cl_dll/entity.cpp b/cl_dll/entity.cpp index a247897..6af73f6 100644 --- a/cl_dll/entity.cpp +++ b/cl_dll/entity.cpp @@ -18,6 +18,8 @@ void Game_AddObjects( void ); extern vec3_t v_origin; +int g_iAlive = 1; + extern "C" { int DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname ); @@ -68,6 +70,9 @@ void DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const stru // Spectator state->iuser1 = client->iuser1; state->iuser2 = client->iuser2; + + // Fire prevention + state->iuser4 = client->iuser4; } /* @@ -163,10 +168,16 @@ void DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct pcd->deadflag = ppcd->deadflag; + // Spectating or not dead == get control over view angles. + g_iAlive = ( ppcd->iuser1 || ( pcd->deadflag == DEAD_NO ) ) ? 1 : 0; + // Spectator pcd->iuser1 = ppcd->iuser1; pcd->iuser2 = ppcd->iuser2; + // Fire prevention + pcd->iuser4 = ppcd->iuser4; + memcpy( wd, pwd, 32 * sizeof( weapon_data_t ) ); } diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index ac3002a..7be5045 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -788,7 +788,24 @@ void EV_SpinGauss( event_args_t *args ) gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "ambience/pulsemachine.wav", 1.0, ATTN_NORM, iSoundState, pitch ); } -// FIXME, pass m_fPrimaryFire in as parameter!!! +/* +============================== +EV_StopPreviousGauss + +============================== +*/ +void EV_StopPreviousGauss( int idx ) +{ + // Make sure we don't have a gauss spin event in the queue for this guy + gEngfuncs.pEventAPI->EV_KillEvents( idx, "events/gaussspin.sc" ); + gEngfuncs.pEventAPI->EV_StopSound( idx, CHAN_WEAPON, "ambience/pulsemachine.wav" ); + + if ( EV_IsLocal( idx ) ) + { + gEngfuncs.pEventAPI->EV_WeaponAnimation( GAUSS_FIRE2, 2 ); + } +} + void EV_FireGauss( event_args_t *args ) { int idx; @@ -818,6 +835,12 @@ void EV_FireGauss( event_args_t *args ) VectorCopy( args->angles, angles ); VectorCopy( args->velocity, velocity ); + if ( args->bparam2 ) + { + EV_StopPreviousGauss( idx ); + return; + } + // Make sure we don't have a gauss spin event in the queue for this guy gEngfuncs.pEventAPI->EV_KillEvents( idx, "events/gaussspin.sc" ); @@ -837,8 +860,6 @@ void EV_FireGauss( event_args_t *args ) gEngfuncs.pEventAPI->EV_WeaponAnimation( GAUSS_FIRE2, 2 ); } - gEngfuncs.pEventAPI->EV_StopSound( idx, CHAN_WEAPON, "ambience/pulsemachine.wav" ); - gEngfuncs.pEventAPI->EV_PlaySound( idx, origin, CHAN_WEAPON, "weapons/gauss2.wav", 0.5 + flDamage * (1.0 / 400.0), ATTN_NORM, 0, 85 + gEngfuncs.pfnRandomLong( 0, 0x1f ) ); while (flDamage > 10 && nMaxHits > 0) diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index 06ce808..242f8f0 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -96,6 +96,133 @@ void HUD_PrepEntity( CBaseEntity *pEntity, CBasePlayer *pWeaponOwner ) } } +/* +// FIXME: In order to predict animations client side, you'll need to work with the following code. +// It's not quite working, but it should be of use if you want +//----------------------------------------------------------------------------- +// Purpose: +// Input : *pmodel - +// *label - +// Output : int +//----------------------------------------------------------------------------- +int LookupSequence( void *pmodel, const char *label ) +{ + studiohdr_t *pstudiohdr; + + pstudiohdr = (studiohdr_t *)pmodel; + if (! pstudiohdr) + return 0; + + mstudioseqdesc_t *pseqdesc; + + pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex); + + for (int i = 0; i < pstudiohdr->numseq; i++) + { + if (stricmp( pseqdesc[i].label, label ) == 0) + return i; + } + + return -1; +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *label - +// Output : int CBaseAnimating :: LookupSequence +//----------------------------------------------------------------------------- +int CBaseAnimating :: LookupSequence ( const char *label ) +{ + cl_entity_t *current; + + current = gEngfuncs.GetLocalPlayer(); + if ( !current || !current->model ) + return 0; + + return ::LookupSequence( (studiohdr_t *)IEngineStudio.Mod_Extradata( current->model ), label ); +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *pmodel - +// *pev - +// *pflFrameRate - +// *pflGroundSpeed - +//----------------------------------------------------------------------------- +void GetSequenceInfo( void *pmodel, entvars_t *pev, float *pflFrameRate, float *pflGroundSpeed ) +{ + studiohdr_t *pstudiohdr; + + pstudiohdr = (studiohdr_t *)pmodel; + if (! pstudiohdr) + return; + + mstudioseqdesc_t *pseqdesc; + + if (pev->sequence >= pstudiohdr->numseq) + { + *pflFrameRate = 0.0; + *pflGroundSpeed = 0.0; + return; + } + + pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + (int)pev->sequence; + + if (pseqdesc->numframes > 1) + { + *pflFrameRate = 256 * pseqdesc->fps / (pseqdesc->numframes - 1); + *pflGroundSpeed = sqrt( pseqdesc->linearmovement[0]*pseqdesc->linearmovement[0]+ pseqdesc->linearmovement[1]*pseqdesc->linearmovement[1]+ pseqdesc->linearmovement[2]*pseqdesc->linearmovement[2] ); + *pflGroundSpeed = *pflGroundSpeed * pseqdesc->fps / (pseqdesc->numframes - 1); + } + else + { + *pflFrameRate = 256.0; + *pflGroundSpeed = 0.0; + } +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *pmodel - +// *pev - +// Output : int +//----------------------------------------------------------------------------- +int GetSequenceFlags( void *pmodel, entvars_t *pev ) +{ + studiohdr_t *pstudiohdr; + + pstudiohdr = (studiohdr_t *)pmodel; + if ( !pstudiohdr || pev->sequence >= pstudiohdr->numseq ) + return 0; + + mstudioseqdesc_t *pseqdesc; + pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + (int)pev->sequence; + + return pseqdesc->flags; +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : +//----------------------------------------------------------------------------- +void CBaseAnimating :: ResetSequenceInfo ( ) +{ + cl_entity_t *current; + + current = gEngfuncs.GetLocalPlayer(); + if ( !current || !current->model ) + return; + + void *pmodel = (studiohdr_t *)IEngineStudio.Mod_Extradata( current->model ); + + GetSequenceInfo( pmodel, pev, &m_flFrameRate, &m_flGroundSpeed ); + m_fSequenceLoops = ((GetSequenceFlags() & STUDIO_LOOPING) != 0); + pev->animtime = gpGlobals->time; + pev->framerate = 1.0; + m_fSequenceFinished = FALSE; + m_flLastEventCheck = gpGlobals->time; +} +*/ /* ===================== CBaseEntity :: Killed @@ -788,6 +915,59 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm g_finalstate = NULL; } +// For storing predicted sequence and gaitsequence and origin/angles data +static int g_rseq = 0, g_gaitseq = 0; +static vec3_t g_clorg, g_clang; + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *seq - +// *gaitseq - +//----------------------------------------------------------------------------- +void Game_GetSequence( int *seq, int *gaitseq ) +{ + *seq = g_rseq; + *gaitseq = g_gaitseq; +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : seq - +// gaitseq - +//----------------------------------------------------------------------------- +void Game_SetSequence( int seq, int gaitseq ) +{ + g_rseq = seq; + g_gaitseq = gaitseq; +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : o - +// a - +//----------------------------------------------------------------------------- +void Game_SetOrientation( vec3_t o, vec3_t a ) +{ + g_clorg = o; + g_clang = a; +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *o - +// *a - +//----------------------------------------------------------------------------- +void Game_GetOrientation( float *o, float *a ) +{ + int i; + + for ( i = 0; i < 3; i++ ) + { + o[ i ] = g_clorg[ i ]; + a[ i ] = g_clang[ i ]; + } +} + /* ===================== HUD_PostRunCmd @@ -817,6 +997,13 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s to->client.fov = g_lastFOV; } + // Store of final sequence, etc. for client side animation + if ( g_runfuncs ) + { + Game_SetSequence( to->playerstate.sequence, to->playerstate.gaitsequence ); + Game_SetOrientation( to->playerstate.origin, cmd->viewangles ); + } + // All games can use FOV state g_lastFOV = to->client.fov; } diff --git a/cl_dll/input.cpp b/cl_dll/input.cpp index f883948..1119fb7 100644 --- a/cl_dll/input.cpp +++ b/cl_dll/input.cpp @@ -30,6 +30,8 @@ extern "C" int DLLEXPORT HUD_Key_Event( int eventcode, int keynum, const char *pszCurrentBinding ); } +extern int g_iAlive; + extern int g_weaponselect; extern cl_enginefunc_t gEngfuncs; @@ -686,7 +688,7 @@ void DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int activ gEngfuncs.GetViewAngles( (float *)viewangles ); // Set current view angles. - if ( gHUD.m_Health.m_iHealth > 0 ) + if ( g_iAlive ) { VectorCopy( viewangles, cmd->viewangles ); VectorCopy( viewangles, oldangles ); diff --git a/cl_dll/message.cpp b/cl_dll/message.cpp index b0a6754..8404e43 100644 --- a/cl_dll/message.cpp +++ b/cl_dll/message.cpp @@ -27,6 +27,10 @@ DECLARE_MESSAGE( m_Message, HudText ) DECLARE_MESSAGE( m_Message, GameTitle ) +// 1 Global client_textmessage_t for custom messages that aren't in the titles.txt +client_textmessage_t g_pCustomMessage; +char *g_pCustomName = "Custom"; +char g_pCustomText[1024]; int CHudMessage::Init(void) { @@ -415,13 +419,61 @@ int CHudMessage::Draw( float fTime ) void CHudMessage::MessageAdd( const char *pName, float time ) { - int i; + int i,j; + client_textmessage_t *tempMessage; for ( i = 0; i < maxHUDMessages; i++ ) { if ( !m_pMessages[i] ) { - m_pMessages[i] = TextMessageGet( pName ); + // Trim off a leading # if it's there + if ( pName[0] == '#' ) + tempMessage = TextMessageGet( pName+1 ); + else + tempMessage = TextMessageGet( pName ); + // If we couldnt find it in the titles.txt, just create it + if ( !tempMessage ) + { + g_pCustomMessage.effect = 2; + g_pCustomMessage.r1 = g_pCustomMessage.g1 = g_pCustomMessage.b1 = g_pCustomMessage.a1 = 100; + g_pCustomMessage.r2 = 240; + g_pCustomMessage.g2 = 110; + g_pCustomMessage.b2 = 0; + g_pCustomMessage.a2 = 0; + g_pCustomMessage.x = -1; // Centered + g_pCustomMessage.y = 0.7; + g_pCustomMessage.fadein = 0.01; + g_pCustomMessage.fadeout = 1.5; + g_pCustomMessage.fxtime = 0.25; + g_pCustomMessage.holdtime = 5; + g_pCustomMessage.pName = g_pCustomName; + strcpy( g_pCustomText, pName ); + g_pCustomMessage.pMessage = g_pCustomText; + + tempMessage = &g_pCustomMessage; + } + + for ( j = 0; j < maxHUDMessages; j++ ) + { + if ( m_pMessages[j] ) + { + // is this message already in the list + if ( !strcmp( tempMessage->pMessage, m_pMessages[j]->pMessage ) ) + { + return; + } + // get rid of any other messages in same location (only one displays at a time) + else if ( abs( tempMessage->y - m_pMessages[j]->y ) < 1 ) + { + if ( abs( tempMessage->x - m_pMessages[j]->x ) < 1 ) + { + m_pMessages[j] = NULL; + } + } + } + } + + m_pMessages[i] = tempMessage; m_startTime[i] = time; return; } diff --git a/cl_dll/studio_util.cpp b/cl_dll/studio_util.cpp new file mode 100644 index 0000000..87fc447 --- /dev/null +++ b/cl_dll/studio_util.cpp @@ -0,0 +1,244 @@ +#include +#include "hud.h" +#include "cl_util.h" +#include "const.h" +#include "com_model.h" +#include "studio_util.h" + +/* +==================== +AngleMatrix + +==================== +*/ +void AngleMatrix (const float *angles, float (*matrix)[4] ) +{ + float angle; + float sr, sp, sy, cr, cp, cy; + + angle = angles[YAW] * (M_PI*2 / 360); + sy = sin(angle); + cy = cos(angle); + angle = angles[PITCH] * (M_PI*2 / 360); + sp = sin(angle); + cp = cos(angle); + angle = angles[ROLL] * (M_PI*2 / 360); + sr = sin(angle); + cr = cos(angle); + + // matrix = (YAW * PITCH) * ROLL + matrix[0][0] = cp*cy; + matrix[1][0] = cp*sy; + matrix[2][0] = -sp; + matrix[0][1] = sr*sp*cy+cr*-sy; + matrix[1][1] = sr*sp*sy+cr*cy; + matrix[2][1] = sr*cp; + matrix[0][2] = (cr*sp*cy+-sr*-sy); + matrix[1][2] = (cr*sp*sy+-sr*cy); + matrix[2][2] = cr*cp; + matrix[0][3] = 0.0; + matrix[1][3] = 0.0; + matrix[2][3] = 0.0; +} + +/* +==================== +VectorCompare + +==================== +*/ +int VectorCompare (const float *v1, const float *v2) +{ + int i; + + for (i=0 ; i<3 ; i++) + if (v1[i] != v2[i]) + return 0; + + return 1; +} + +/* +==================== +CrossProduct + +==================== +*/ +void CrossProduct (const float *v1, const float *v2, float *cross) +{ + cross[0] = v1[1]*v2[2] - v1[2]*v2[1]; + cross[1] = v1[2]*v2[0] - v1[0]*v2[2]; + cross[2] = v1[0]*v2[1] - v1[1]*v2[0]; +} + +/* +==================== +VectorTransform + +==================== +*/ +void VectorTransform (const float *in1, float in2[3][4], float *out) +{ + out[0] = DotProduct(in1, in2[0]) + in2[0][3]; + out[1] = DotProduct(in1, in2[1]) + in2[1][3]; + out[2] = DotProduct(in1, in2[2]) + in2[2][3]; +} + +/* +================ +ConcatTransforms + +================ +*/ +void ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]) +{ + out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + + in1[0][2] * in2[2][0]; + out[0][1] = in1[0][0] * in2[0][1] + in1[0][1] * in2[1][1] + + in1[0][2] * in2[2][1]; + out[0][2] = in1[0][0] * in2[0][2] + in1[0][1] * in2[1][2] + + in1[0][2] * in2[2][2]; + out[0][3] = in1[0][0] * in2[0][3] + in1[0][1] * in2[1][3] + + in1[0][2] * in2[2][3] + in1[0][3]; + out[1][0] = in1[1][0] * in2[0][0] + in1[1][1] * in2[1][0] + + in1[1][2] * in2[2][0]; + out[1][1] = in1[1][0] * in2[0][1] + in1[1][1] * in2[1][1] + + in1[1][2] * in2[2][1]; + out[1][2] = in1[1][0] * in2[0][2] + in1[1][1] * in2[1][2] + + in1[1][2] * in2[2][2]; + out[1][3] = in1[1][0] * in2[0][3] + in1[1][1] * in2[1][3] + + in1[1][2] * in2[2][3] + in1[1][3]; + out[2][0] = in1[2][0] * in2[0][0] + in1[2][1] * in2[1][0] + + in1[2][2] * in2[2][0]; + out[2][1] = in1[2][0] * in2[0][1] + in1[2][1] * in2[1][1] + + in1[2][2] * in2[2][1]; + out[2][2] = in1[2][0] * in2[0][2] + in1[2][1] * in2[1][2] + + in1[2][2] * in2[2][2]; + out[2][3] = in1[2][0] * in2[0][3] + in1[2][1] * in2[1][3] + + in1[2][2] * in2[2][3] + in1[2][3]; +} + +// angles index are not the same as ROLL, PITCH, YAW + +/* +==================== +AngleQuaternion + +==================== +*/ +void AngleQuaternion( float *angles, vec4_t quaternion ) +{ + float angle; + float sr, sp, sy, cr, cp, cy; + + // FIXME: rescale the inputs to 1/2 angle + angle = angles[2] * 0.5; + sy = sin(angle); + cy = cos(angle); + angle = angles[1] * 0.5; + sp = sin(angle); + cp = cos(angle); + angle = angles[0] * 0.5; + sr = sin(angle); + cr = cos(angle); + + quaternion[0] = sr*cp*cy-cr*sp*sy; // X + quaternion[1] = cr*sp*cy+sr*cp*sy; // Y + quaternion[2] = cr*cp*sy-sr*sp*cy; // Z + quaternion[3] = cr*cp*cy+sr*sp*sy; // W +} + +/* +==================== +QuaternionSlerp + +==================== +*/ +void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt ) +{ + int i; + float omega, cosom, sinom, sclp, sclq; + + // decide if one of the quaternions is backwards + float a = 0; + float b = 0; + + for (i = 0; i < 4; i++) + { + a += (p[i]-q[i])*(p[i]-q[i]); + b += (p[i]+q[i])*(p[i]+q[i]); + } + if (a > b) + { + for (i = 0; i < 4; i++) + { + q[i] = -q[i]; + } + } + + cosom = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3]; + + if ((1.0 + cosom) > 0.000001) + { + if ((1.0 - cosom) > 0.000001) + { + omega = acos( cosom ); + sinom = sin( omega ); + sclp = sin( (1.0 - t)*omega) / sinom; + sclq = sin( t*omega ) / sinom; + } + else + { + sclp = 1.0 - t; + sclq = t; + } + for (i = 0; i < 4; i++) { + qt[i] = sclp * p[i] + sclq * q[i]; + } + } + else + { + qt[0] = -q[1]; + qt[1] = q[0]; + qt[2] = -q[3]; + qt[3] = q[2]; + sclp = sin( (1.0 - t) * (0.5 * M_PI)); + sclq = sin( t * (0.5 * M_PI)); + for (i = 0; i < 3; i++) + { + qt[i] = sclp * p[i] + sclq * qt[i]; + } + } +} + +/* +==================== +QuaternionMatrix + +==================== +*/ +void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] ) +{ + matrix[0][0] = 1.0 - 2.0 * quaternion[1] * quaternion[1] - 2.0 * quaternion[2] * quaternion[2]; + matrix[1][0] = 2.0 * quaternion[0] * quaternion[1] + 2.0 * quaternion[3] * quaternion[2]; + matrix[2][0] = 2.0 * quaternion[0] * quaternion[2] - 2.0 * quaternion[3] * quaternion[1]; + + matrix[0][1] = 2.0 * quaternion[0] * quaternion[1] - 2.0 * quaternion[3] * quaternion[2]; + matrix[1][1] = 1.0 - 2.0 * quaternion[0] * quaternion[0] - 2.0 * quaternion[2] * quaternion[2]; + matrix[2][1] = 2.0 * quaternion[1] * quaternion[2] + 2.0 * quaternion[3] * quaternion[0]; + + matrix[0][2] = 2.0 * quaternion[0] * quaternion[2] + 2.0 * quaternion[3] * quaternion[1]; + matrix[1][2] = 2.0 * quaternion[1] * quaternion[2] - 2.0 * quaternion[3] * quaternion[0]; + matrix[2][2] = 1.0 - 2.0 * quaternion[0] * quaternion[0] - 2.0 * quaternion[1] * quaternion[1]; +} + +/* +==================== +MatrixCopy + +==================== +*/ +void MatrixCopy( float in[3][4], float out[3][4] ) +{ + memcpy( out, in, sizeof( float ) * 3 * 4 ); +} \ No newline at end of file diff --git a/cl_dll/studio_util.h b/cl_dll/studio_util.h new file mode 100644 index 0000000..df472ee --- /dev/null +++ b/cl_dll/studio_util.h @@ -0,0 +1,33 @@ +#if !defined( STUDIO_UTIL_H ) +#define STUDIO_UTIL_H +#if defined( WIN32 ) +#pragma once +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h +#endif + +#ifndef PITCH +// MOVEMENT INFO +// up / down +#define PITCH 0 +// left / right +#define YAW 1 +// fall over +#define ROLL 2 +#endif + +#define FDotProduct( a, b ) (fabs((a[0])*(b[0])) + fabs((a[1])*(b[1])) + fabs((a[2])*(b[2]))) + +void AngleMatrix (const float *angles, float (*matrix)[4] ); +int VectorCompare (const float *v1, const float *v2); +void CrossProduct (const float *v1, const float *v2, float *cross); +void VectorTransform (const float *in1, float in2[3][4], float *out); +void ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]); +void MatrixCopy( float in[3][4], float out[3][4] ); +void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] ); +void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt ); +void AngleQuaternion( float *angles, vec4_t quaternion ); + +#endif // STUDIO_UTIL_H \ No newline at end of file diff --git a/cl_dll/vgui_TeamFortressViewport.cpp b/cl_dll/vgui_TeamFortressViewport.cpp index eb59f2d..d755fd1 100644 --- a/cl_dll/vgui_TeamFortressViewport.cpp +++ b/cl_dll/vgui_TeamFortressViewport.cpp @@ -1513,7 +1513,19 @@ void TeamFortressViewport::ShowVGUIMenu( int iMenu ) // See if another menu is visible, and if so, cache this one for display once the other one's finished if (m_pCurrentMenu) { - m_pCurrentMenu->SetNextMenu( pNewMenu ); + if ( m_pCurrentMenu->GetMenuID() == MENU_CLASS && iMenu == MENU_TEAM ) + { + CMenuPanel *temp = m_pCurrentMenu; + m_pCurrentMenu->Close(); + m_pCurrentMenu = pNewMenu; + m_pCurrentMenu->SetNextMenu( temp ); + m_pCurrentMenu->Open(); + UpdateCursorState(); + } + else + { + m_pCurrentMenu->SetNextMenu( pNewMenu ); + } } else { diff --git a/cl_dll/view.cpp b/cl_dll/view.cpp index bff341d..df282f6 100644 --- a/cl_dll/view.cpp +++ b/cl_dll/view.cpp @@ -835,6 +835,22 @@ void V_CalcNormalRefdef ( struct ref_params_s *pparams ) if ( CL_IsThirdPerson() ) { VectorCopy( camAngles, pparams->viewangles); + float pitch = camAngles[ 0 ]; + + // Normalize angles + if ( pitch > 180 ) + pitch -= 360.0; + else if ( pitch < -180 ) + pitch += 360; + + // Player pitch is inverted + pitch /= -3.0; + + // Slam local player's pitch value + ent->angles[ 0 ] = pitch; + ent->curstate.angles[ 0 ] = pitch; + ent->prevstate.angles[ 0 ] = pitch; + ent->latched.prevangles[ 0 ] = pitch; } // override all previous settings if the viewent isn't the client diff --git a/common/beamdef.h b/common/beamdef.h index 6ff8917..ad87648 100644 --- a/common/beamdef.h +++ b/common/beamdef.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/cl_entity.h b/common/cl_entity.h index 9cfc963..931267d 100644 --- a/common/cl_entity.h +++ b/common/cl_entity.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/com_model.h b/common/com_model.h new file mode 100644 index 0000000..78c2147 --- /dev/null +++ b/common/com_model.h @@ -0,0 +1,344 @@ +// com_model.h +#if !defined( COM_MODEL_H ) +#define COM_MODEL_H +#if defined( _WIN32 ) +#pragma once +#endif + +#define STUDIO_RENDER 1 +#define STUDIO_EVENTS 2 + +#define MAX_CLIENTS 32 +#define MAX_EDICTS 900 + +#define MAX_MODEL_NAME 64 +#define MAX_MAP_HULLS 4 +#define MIPLEVELS 4 +#define NUM_AMBIENTS 4 // automatic ambient sounds +#define MAXLIGHTMAPS 4 +#define PLANE_ANYZ 5 + +#define ALIAS_Z_CLIP_PLANE 5 + +// flags in finalvert_t.flags +#define ALIAS_LEFT_CLIP 0x0001 +#define ALIAS_TOP_CLIP 0x0002 +#define ALIAS_RIGHT_CLIP 0x0004 +#define ALIAS_BOTTOM_CLIP 0x0008 +#define ALIAS_Z_CLIP 0x0010 +#define ALIAS_ONSEAM 0x0020 +#define ALIAS_XY_CLIP_MASK 0x000F + +#define ZISCALE ((float)0x8000) + +#define CACHE_SIZE 32 // used to align key data structures + +typedef enum +{ + mod_brush, + mod_sprite, + mod_alias, + mod_studio +} modtype_t; + +// must match definition in modelgen.h +#ifndef SYNCTYPE_T +#define SYNCTYPE_T + +typedef enum +{ + ST_SYNC=0, + ST_RAND +} synctype_t; + +#endif + +typedef struct +{ + float mins[3], maxs[3]; + float origin[3]; + int headnode[MAX_MAP_HULLS]; + int visleafs; // not including the solid leaf 0 + int firstface, numfaces; +} dmodel_t; + +// plane_t structure +typedef struct mplane_s +{ + vec3_t normal; // surface normal + float dist; // closest appoach to origin + byte type; // for texture axis selection and fast side tests + byte signbits; // signx + signy<<1 + signz<<1 + byte pad[2]; +} mplane_t; + +typedef struct +{ + vec3_t position; +} mvertex_t; + +typedef struct +{ + unsigned short v[2]; + unsigned int cachededgeoffset; +} medge_t; + +typedef struct texture_s +{ + char name[16]; + unsigned width, height; + int anim_total; // total tenths in sequence ( 0 = no) + int anim_min, anim_max; // time for this frame min <=time< max + struct texture_s *anim_next; // in the animation sequence + struct texture_s *alternate_anims; // bmodels in frame 1 use these + unsigned offsets[MIPLEVELS]; // four mip maps stored + unsigned paloffset; +} texture_t; + +typedef struct +{ + float vecs[2][4]; // [s/t] unit vectors in world space. + // [i][3] is the s/t offset relative to the origin. + // s or t = dot(3Dpoint,vecs[i])+vecs[i][3] + float mipadjust; // ?? mipmap limits for very small surfaces + texture_t *texture; + int flags; // sky or slime, no lightmap or 256 subdivision +} mtexinfo_t; + +typedef struct mnode_s +{ +// common with leaf + int contents; // 0, to differentiate from leafs + int visframe; // node needs to be traversed if current + + short minmaxs[6]; // for bounding box culling + + struct mnode_s *parent; + +// node specific + mplane_t *plane; + struct mnode_s *children[2]; + + unsigned short firstsurface; + unsigned short numsurfaces; +} mnode_t; + +typedef struct msurface_s msurface_t; +typedef struct decal_s decal_t; + +// JAY: Compress this as much as possible +struct decal_s +{ + decal_t *pnext; // linked list for each surface + msurface_t *psurface; // Surface id for persistence / unlinking + short dx; // Offsets into surface texture (in texture coordinates, so we don't need floats) + short dy; + short texture; // Decal texture + byte scale; // Pixel scale + byte flags; // Decal flags + + short entityIndex; // Entity this is attached to +}; + +typedef struct mleaf_s +{ +// common with node + int contents; // wil be a negative contents number + int visframe; // node needs to be traversed if current + + short minmaxs[6]; // for bounding box culling + + struct mnode_s *parent; + +// leaf specific + byte *compressed_vis; + struct efrag_s *efrags; + + msurface_t **firstmarksurface; + int nummarksurfaces; + int key; // BSP sequence number for leaf's contents + byte ambient_sound_level[NUM_AMBIENTS]; +} mleaf_t; + +struct msurface_s +{ + int visframe; // should be drawn when node is crossed + + int dlightframe; // last frame the surface was checked by an animated light + int dlightbits; // dynamically generated. Indicates if the surface illumination + // is modified by an animated light. + + mplane_t *plane; // pointer to shared plane + int flags; // see SURF_ #defines + + int firstedge; // look up in model->surfedges[], negative numbers + int numedges; // are backwards edges + +// surface generation data + struct surfcache_s *cachespots[MIPLEVELS]; + + short texturemins[2]; // smallest s/t position on the surface. + short extents[2]; // ?? s/t texture size, 1..256 for all non-sky surfaces + + mtexinfo_t *texinfo; + +// lighting info + byte styles[MAXLIGHTMAPS]; // index into d_lightstylevalue[] for animated lights + // no one surface can be effected by more than 4 + // animated lights. + color24 *samples; + + decal_t *pdecals; +}; + +typedef struct +{ + int planenum; + short children[2]; // negative numbers are contents +} dclipnode_t; + +typedef struct hull_s +{ + dclipnode_t *clipnodes; + mplane_t *planes; + int firstclipnode; + int lastclipnode; + vec3_t clip_mins; + vec3_t clip_maxs; +} hull_t; + +#if !defined( CACHE_USER ) && !defined( QUAKEDEF_H ) +#define CACHE_USER +typedef struct cache_user_s +{ + void *data; +} cache_user_t; +#endif + +typedef struct model_s +{ + char name[ MAX_MODEL_NAME ]; + qboolean needload; // bmodels and sprites don't cache normally + + modtype_t type; + int numframes; + synctype_t synctype; + + int flags; + +// +// volume occupied by the model +// + vec3_t mins, maxs; + float radius; + +// +// brush model +// + int firstmodelsurface, nummodelsurfaces; + + int numsubmodels; + dmodel_t *submodels; + + int numplanes; + mplane_t *planes; + + int numleafs; // number of visible leafs, not counting 0 + struct mleaf_s *leafs; + + int numvertexes; + mvertex_t *vertexes; + + int numedges; + medge_t *edges; + + int numnodes; + mnode_t *nodes; + + int numtexinfo; + mtexinfo_t *texinfo; + + int numsurfaces; + msurface_t *surfaces; + + int numsurfedges; + int *surfedges; + + int numclipnodes; + dclipnode_t *clipnodes; + + int nummarksurfaces; + msurface_t **marksurfaces; + + hull_t hulls[MAX_MAP_HULLS]; + + int numtextures; + texture_t **textures; + + byte *visdata; + + color24 *lightdata; + + char *entities; + +// +// additional model data +// + cache_user_t cache; // only access through Mod_Extradata + +} model_t; + +typedef vec_t vec4_t[4]; + +typedef struct alight_s +{ + int ambientlight; // clip at 128 + int shadelight; // clip at 192 - ambientlight + vec3_t color; + float *plightvec; +} alight_t; + +typedef struct auxvert_s +{ + float fv[3]; // viewspace x, y +} auxvert_t; + +#include "custom.h" + +#define MAX_INFO_STRING 256 +#define MAX_SCOREBOARDNAME 32 +typedef struct player_info_s +{ + // User id on server + int userid; + + // User info string + char userinfo[ MAX_INFO_STRING ]; + + // Name + char name[ MAX_SCOREBOARDNAME ]; + + // Spectator or not, unused + int spectator; + + int ping; + int packet_loss; + + // skin information + char model[MAX_QPATH]; + int topcolor; + int bottomcolor; + + // last frame rendered + int renderframe; + + // Gait frame estimation + int gaitsequence; + float gaitframe; + float gaityaw; + vec3_t prevgaitorigin; + + customization_t customdata; +} player_info_t; + +#endif // #define COM_MODEL_H diff --git a/common/con_nprint.h b/common/con_nprint.h index 627d9f5..fc9280a 100644 --- a/common/con_nprint.h +++ b/common/con_nprint.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/const.h b/common/const.h index 5489c13..7b12ca8 100644 --- a/common/const.h +++ b/common/const.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/cvardef.h b/common/cvardef.h index 897e24e..a4cf7a4 100644 --- a/common/cvardef.h +++ b/common/cvardef.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/demo_api.h b/common/demo_api.h index 3f9464b..df98608 100644 --- a/common/demo_api.h +++ b/common/demo_api.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/dlight.h b/common/dlight.h index 88a80e6..287bc33 100644 --- a/common/dlight.h +++ b/common/dlight.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/entity_state.h b/common/entity_state.h index ee5c101..b68df87 100644 --- a/common/entity_state.h +++ b/common/entity_state.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/entity_types.h b/common/entity_types.h index 56c8f92..b084409 100644 --- a/common/entity_types.h +++ b/common/entity_types.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/event_api.h b/common/event_api.h index 2299ed9..466f3b4 100644 --- a/common/event_api.h +++ b/common/event_api.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/event_args.h b/common/event_args.h index a6b4eec..335adb3 100644 --- a/common/event_args.h +++ b/common/event_args.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/in_buttons.h b/common/in_buttons.h index cbca13c..7d4eb00 100644 --- a/common/in_buttons.h +++ b/common/in_buttons.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/mathlib.h b/common/mathlib.h index a6293ae..3e1082d 100644 --- a/common/mathlib.h +++ b/common/mathlib.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. @@ -39,7 +39,10 @@ extern int nanmask; #define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) -#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) +#ifndef VECTOR_H + #define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2]) +#endif + #define VectorSubtract(a,b,c) {(c)[0]=(a)[0]-(b)[0];(c)[1]=(a)[1]-(b)[1];(c)[2]=(a)[2]-(b)[2];} #define VectorAdd(a,b,c) {(c)[0]=(a)[0]+(b)[0];(c)[1]=(a)[1]+(b)[1];(c)[2]=(a)[2]+(b)[2];} #define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];} diff --git a/common/netadr.h b/common/netadr.h index 593903a..94925a9 100644 --- a/common/netadr.h +++ b/common/netadr.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/particledef.h b/common/particledef.h index c2f3ef1..15ba6db 100644 --- a/common/particledef.h +++ b/common/particledef.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. @@ -47,7 +47,7 @@ typedef struct particle_s ptype_t type; void (*deathfunc)( struct particle_s *particle ); - // for pt_clientcusttom, we'll call this function each frame + // For pt_clientcusttom, we'll call this function each frame void (*callback)( struct particle_s *particle, float frametime ); // for deathfunc, etc. diff --git a/common/pmtrace.h b/common/pmtrace.h index 02bf18c..657649d 100644 --- a/common/pmtrace.h +++ b/common/pmtrace.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/qfont.h b/common/qfont.h index 4233191..fc2a7de 100644 --- a/common/qfont.h +++ b/common/qfont.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/r_studioint.h b/common/r_studioint.h new file mode 100644 index 0000000..973ae18 --- /dev/null +++ b/common/r_studioint.h @@ -0,0 +1,108 @@ +#if !defined( R_STUDIOINT_H ) +#define R_STUDIOINT_H +#if defined( _WIN32 ) +#pragma once +#endif + +#define STUDIO_INTERFACE_VERSION 1 + +typedef struct engine_studio_api_s +{ + // Allocate number*size bytes and zero it + void *( *Mem_Calloc ) ( int number, size_t size ); + // Check to see if pointer is in the cache + void *( *Cache_Check ) ( struct cache_user_s *c ); + // Load file into cache ( can be swapped out on demand ) + void ( *LoadCacheFile ) ( char *path, struct cache_user_s *cu ); + // Retrieve model pointer for the named model + struct model_s *( *Mod_ForName ) ( const char *name, int crash_if_missing ); + // Retrieve pointer to studio model data block from a model + void *( *Mod_Extradata ) ( struct model_s *mod ); + // Retrieve indexed model from client side model precache list + struct model_s *( *GetModelByIndex ) ( int index ); + // Get entity that is set for rendering + struct cl_entity_s * ( *GetCurrentEntity ) ( void ); + // Get referenced player_info_t + struct player_info_s *( *PlayerInfo ) ( int index ); + // Get most recently received player state data from network system + struct entity_state_s *( *GetPlayerState ) ( int index ); + // Get viewentity + struct cl_entity_s * ( *GetViewEntity ) ( void ); + // Get current frame count, and last two timestampes on client + void ( *GetTimes ) ( int *framecount, double *current, double *old ); + // Get a pointer to a cvar by name + struct cvar_s *( *GetCvar ) ( const char *name ); + // Get current render origin and view vectors ( up, right and vpn ) + void ( *GetViewInfo ) ( float *origin, float *upv, float *rightv, float *vpnv ); + // Get sprite model used for applying chrome effect + struct model_s *( *GetChromeSprite ) ( void ); + // Get model counters so we can incement instrumentation + void ( *GetModelCounters ) ( int **s, int **a ); + // Get software scaling coefficients + void ( *GetAliasScale ) ( float *x, float *y ); + + // Get bone, light, alias, and rotation matrices + float ****( *StudioGetBoneTransform ) ( void ); + float ****( *StudioGetLightTransform )( void ); + float ***( *StudioGetAliasTransform ) ( void ); + float ***( *StudioGetRotationMatrix ) ( void ); + + // Set up body part, and get submodel pointers + void ( *StudioSetupModel ) ( int bodypart, void **ppbodypart, void **ppsubmodel ); + // Check if entity's bbox is in the view frustum + int ( *StudioCheckBBox ) ( void ); + // Apply lighting effects to model + void ( *StudioDynamicLight ) ( struct cl_entity_s *ent, struct alight_s *plight ); + void ( *StudioEntityLight ) ( struct alight_s *plight ); + void ( *StudioSetupLighting ) ( struct alight_s *plighting ); + + // Draw mesh vertices + void ( *StudioDrawPoints ) ( void ); + + // Draw hulls around bones + void ( *StudioDrawHulls ) ( void ); + // Draw bbox around studio models + void ( *StudioDrawAbsBBox ) ( void ); + // Draws bones + void ( *StudioDrawBones ) ( void ); + // Loads in appropriate texture for model + void ( *StudioSetupSkin ) ( void *ptexturehdr, int index ); + // Sets up for remapped colors + void ( *StudioSetRemapColors ) ( int top, int bottom ); + // Set's player model and returns model pointer + struct model_s *( *SetupPlayerModel ) ( int index ); + // Fires any events embedded in animation + void ( *StudioClientEvents ) ( void ); + // Retrieve/set forced render effects flags + int ( *GetForceFaceFlags ) ( void ); + void ( *SetForceFaceFlags ) ( int flags ); + // Tell engine the value of the studio model header + void ( *StudioSetHeader ) ( void *header ); + // Tell engine which model_t * is being renderered + void ( *SetRenderModel ) ( struct model_s *model ); + + // Final state setup and restore for rendering + void ( *SetupRenderer ) ( int rendermode ); + void ( *RestoreRenderer ) ( void ); + + // Set render origin for applying chrome effect + void ( *SetChromeOrigin ) ( void ); + + // True if using D3D/OpenGL + int ( *IsHardware ) ( void ); + + // Only called by hardware interface + void ( *GL_StudioDrawShadow ) ( void ); + void ( *GL_SetRenderMode ) ( int mode ); +} engine_studio_api_t; + +typedef struct r_studio_interface_s +{ + int version; + int ( *StudioDrawModel ) ( int flags ); + int ( *StudioDrawPlayer ) ( int flags, struct entity_state_s *pplayer ); +} r_studio_interface_t; + +extern r_studio_interface_t *pStudioAPI; + +#endif // R_STUDIOINT_H \ No newline at end of file diff --git a/common/ref_params.h b/common/ref_params.h index 28078f5..d9db414 100644 --- a/common/ref_params.h +++ b/common/ref_params.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/studio_event.h b/common/studio_event.h index 93c2860..ffec2cf 100644 --- a/common/studio_event.h +++ b/common/studio_event.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/usercmd.h b/common/usercmd.h index 3c69c70..09644ac 100644 --- a/common/usercmd.h +++ b/common/usercmd.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/common/weaponinfo.h b/common/weaponinfo.h index 50f940c..6f526c2 100644 --- a/common/weaponinfo.h +++ b/common/weaponinfo.h @@ -1,6 +1,6 @@ /*** * -* Copyright (c) 1999, 2000 Valve LLC. All rights reserved. +* Copyright (c) 1999, 2000, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. diff --git a/dedicated/Makefile b/dedicated/Makefile index a4dfef7..43a47ad 100644 --- a/dedicated/Makefile +++ b/dedicated/Makefile @@ -1,55 +1,55 @@ -# -# hlds_run (front end for hlds_l) Makefile for Linux i386 -# -# May 2000, Leon Hartwig (hartwig@valvesoftware.com) -# - -#make sure this is the correct compiler for your system -CC=gcc - -SRCDIR=. -OBJDIR=$(SRCDIR)/obj - -#safe optimization -CFLAGS=-w -m486 -O1 - -#full optimization -#CFLAGS=-w -m486 -O2 \ - -ffast-math -funroll-loops \ - -fexpensive-optimizations -malign-loops=2 \ - -malign-jumps=2 -malign-functions=2 - -#use these when debugging -#CFLAGS=$(BASE_CFLAGS) -g - -LDFLAGS=-lgcc -ldl - -AR=ar -RANLIB=ranlib - -INCLUDEDIRS=-I. -I../common - -DO_CC=$(CC) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $< - -############################################################################# -# HLDS FRONT END -############################################################################# - -$(OBJDIR)/%.o: $(SRCDIR)/%.cpp - $(DO_CC) - -OBJ = \ - $(OBJDIR)/sys_ded.o \ - $(OBJDIR)/engine.o \ - $(OBJDIR)/md5.o - -hlds_run : neat $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) -neat: - -mkdir $(OBJDIR) -clean: - -rm -f $(OBJ) - -rm -f hlds_run -spotless: clean - -rm -r $(OBJDIR) - +# +# hlds_run (front end for hlds_l) Makefile for Linux i386 +# +# May 2000, Leon Hartwig (hartwig@valvesoftware.com) +# + +#make sure this is the correct compiler for your system +CC=gcc + +SRCDIR=. +OBJDIR=$(SRCDIR)/obj + +#safe optimization +CFLAGS=-w -m486 -O1 + +#full optimization +#CFLAGS=-w -m486 -O2 \ + -ffast-math -funroll-loops \ + -fexpensive-optimizations -malign-loops=2 \ + -malign-jumps=2 -malign-functions=2 + +#use these when debugging +#CFLAGS=$(BASE_CFLAGS) -g + +LDFLAGS=-lgcc -ldl + +AR=ar +RANLIB=ranlib + +INCLUDEDIRS=-I. -I../common + +DO_CC=$(CC) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $< + +############################################################################# +# HLDS FRONT END +############################################################################# + +$(OBJDIR)/%.o: $(SRCDIR)/%.cpp + $(DO_CC) + +OBJ = \ + $(OBJDIR)/sys_ded.o \ + $(OBJDIR)/engine.o \ + $(OBJDIR)/md5.o + +hlds_run : neat $(OBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) +neat: + -mkdir $(OBJDIR) +clean: + -rm -f $(OBJ) + -rm -f hlds_run +spotless: clean + -rm -r $(OBJDIR) + diff --git a/dedicated/sys_ded.cpp b/dedicated/sys_ded.cpp index 899316b..7281ad0 100644 --- a/dedicated/sys_ded.cpp +++ b/dedicated/sys_ded.cpp @@ -211,8 +211,8 @@ void Sys_ConsoleOutput (char *string) } UpdateStatus( 1 /* force */ ); #else - printf( string ); - fflush(stdout); + printf( "%s", string ); + fflush( stdout ); #endif } diff --git a/dlls/client.cpp b/dlls/client.cpp index aa44e3a..973fae4 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -435,6 +435,16 @@ void ServerDeactivate( void ) // Peform any shutdown operations here... // + #ifdef PERSISTENCE_SAMPLE + for ( int i = 1; i <= gpGlobals->maxClients; i++ ) + { + CBasePlayer *pPlayer = (CBasePlayer*)UTIL_PlayerByIndex( i ); + if(pPlayer && pPlayer->IsPlayer()) + { + pPlayer->m_PersistenceInfo.SendInfo(); + } + } + #endif } void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax ) diff --git a/dlls/enginecallback.h b/dlls/enginecallback.h index 469995e..12fe603 100644 --- a/dlls/enginecallback.h +++ b/dlls/enginecallback.h @@ -55,7 +55,9 @@ extern enginefuncs_t g_engfuncs; #define TRACE_HULL (*g_engfuncs.pfnTraceHull) #define GET_AIM_VECTOR (*g_engfuncs.pfnGetAimVector) #define SERVER_COMMAND (*g_engfuncs.pfnServerCommand) -#define SERVER_EXECUTE (*g_engfuncs.pfnServerExecute) +#ifndef SERVER_EXECUTE + #define SERVER_EXECUTE (*g_engfuncs.pfnServerExecute) +#endif #define CLIENT_COMMAND (*g_engfuncs.pfnClientCommand) #define PARTICLE_EFFECT (*g_engfuncs.pfnParticleEffect) #define LIGHT_STYLE (*g_engfuncs.pfnLightStyle) diff --git a/dlls/gauss.cpp b/dlls/gauss.cpp index 93ac25b..18fac1e 100644 --- a/dlls/gauss.cpp +++ b/dlls/gauss.cpp @@ -410,6 +410,14 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) pentIgnore = ENT( m_pPlayer->pev ); + // The main firing event is sent unreliably so it won't be delayed. + PLAYBACK_EVENT_FULL( 0, m_pPlayer->edict(), m_usGaussFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, flDamage, 0.0, 0, 0, m_fPrimaryFire ? 1 : 0, 0 ); + + // This reliable event is used to stop the spinning sound + // It's delayed by a fraction of second to make sure it is delayed by 1 frame on the client + // It's sent reliably anyway, which could lead to other delays + PLAYBACK_EVENT_FULL( FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.01, (float *)&g_vecZero, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 1 ); + /* ALERT( at_console, "%f %f %f\n%f %f %f\n", vecSrc.x, vecSrc.y, vecSrc.z, @@ -418,9 +426,6 @@ void CGauss::Fire( Vector vecOrigSrc, Vector vecDir, float flDamage ) // ALERT( at_console, "%f %f\n", tr.flFraction, flMaxFrac ); - // Pass in correct values here - PLAYBACK_EVENT_FULL( FEV_RELIABLE, m_pPlayer->edict(), m_usGaussFire, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, flDamage, 0.0, 0, 0, m_fPrimaryFire ? 1 : 0, 0 ); - while (flDamage > 10 && nMaxHits > 0) { nMaxHits--; diff --git a/dlls/mp.dsp b/dlls/mp.dsp index 3403c16..c792505 100644 --- a/dlls/mp.dsp +++ b/dlls/mp.dsp @@ -26,7 +26,7 @@ CFG=mp - Win32 Release # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName ""$/SDKSrc/Public/dlls", NVGBAAAA" # PROP Scc_LocalPath "." -CPP=cl.exe +CPP=xicl6.exe MTL=midl.exe RSC=rc.exe @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Intermediate_Dir ".\Releasemp" # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /I "..\common\gamedb" /I "..\common\persistence" /I "..\common\persistance\sample" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /D "PERSISTENCE_SAMPLE" /YX /FD /c # SUBTRACT CPP /Fr # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -52,7 +52,7 @@ RSC=rc.exe BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo -LINK32=link.exe +LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /def:".\mp.def" # SUBTRACT LINK32 /profile @@ -80,7 +80,7 @@ SOURCE="$(InputPath)" # PROP Intermediate_Dir ".\debugmp" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /FR /YX /FD /c +# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /I "..\common\gamedb" /I "..\common\persistence" /I "..\common\persistance\sample" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /D "PERSISTENCE_SAMPLE" /FR /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" @@ -88,7 +88,7 @@ SOURCE="$(InputPath)" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo -LINK32=link.exe +LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 # ADD LINK32 user32.lib advapi32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\mp.def" /implib:".\Debug\mp.lib" # SUBTRACT LINK32 /profile @@ -117,7 +117,7 @@ SOURCE="$(InputPath)" # PROP Target_Dir "" # ADD BASE CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\engine" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "QUIVER" /D "VOXEL" /D "QUAKE2" /D "VALVE_DLL" /YX /c # SUBTRACT BASE CPP /Fr -# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /I "..\dlls" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\\" /I "..\common\gamedb" /I "..\common\persistence" /I "..\common\persistance\sample" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VALVE_DLL" /D "PERSISTENCE_SAMPLE" /YX /FD /c # SUBTRACT CPP /Fr # ADD BASE MTL /nologo /D "NDEBUG" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 @@ -126,7 +126,7 @@ SOURCE="$(InputPath)" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo -LINK32=link.exe +LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 /def:".\mp.def" # SUBTRACT BASE LINK32 /profile # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /profile /debug /machine:I386 /def:".\mp.def" @@ -168,15 +168,6 @@ SOURCE=.\animating.cpp # Begin Source File SOURCE=.\animation.cpp - -!IF "$(CFG)" == "mp - Win32 Release" - -!ELSEIF "$(CFG)" == "mp - Win32 Debug" - -!ELSEIF "$(CFG)" == "mp - Win32 Profile" - -!ENDIF - # End Source File # Begin Source File @@ -288,6 +279,10 @@ SOURCE=.\hornetgun.cpp # End Source File # Begin Source File +SOURCE=..\common\interface.cpp +# End Source File +# Begin Source File + SOURCE=.\items.cpp # End Source File # Begin Source File @@ -320,6 +315,10 @@ SOURCE=.\pathcorner.cpp # End Source File # Begin Source File +SOURCE=.\persistencehelpers.cpp +# End Source File +# Begin Source File + SOURCE=.\plane.cpp # End Source File # Begin Source File diff --git a/dlls/mp.dsw b/dlls/mp.dsw deleted file mode 100644 index 71212df..0000000 --- a/dlls/mp.dsw +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "mp"=.\mp.dsp - Package Owner=<4> - -Package=<5> -{{{ - begin source code control - "$/SDKSrc/Public/dlls", NVGBAAAA - . - end source code control -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ - begin source code control - "$/SDKSrc/Public/dlls", NVGBAAAA - . - end source code control -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/dlls/player.cpp b/dlls/player.cpp index ea4a16c..6752b96 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -843,6 +843,14 @@ void CBasePlayer::Killed( entvars_t *pevAttacker, int iGib ) { CSound *pSound; + #ifdef PERSISTENCE_SAMPLE + // PERSISTENCE_TODO: + // Log other changes to the player's persistence info like this. + + // Update the persistence database. + m_PersistenceInfo.IncField_PlayerInfo_NumKills(); + #endif + g_pGameRules->PlayerKilled( this, pevAttacker, g_pevLastInflictor ); if ( m_pTank != NULL ) @@ -1987,6 +1995,10 @@ void CBasePlayer :: UpdateStepSound( void ) void CBasePlayer::PreThink(void) { int buttonsChanged = (m_afButtonLast ^ pev->button); // These buttons have changed this frame + + #ifdef PERSISTENCE_SAMPLE + m_PersistenceInfo.Update(); + #endif // Debounced button codes for pressed/released // UNDONE: Do we need auto-repeat? @@ -3061,6 +3073,12 @@ void CBasePlayer::Spawn( void ) m_lastx = m_lasty = 0; g_pGameRules->PlayerSpawn( this ); + + #ifdef PERSISTENCE_SAMPLE + // Start getting their persistence data. + // (Only does it the first time they spawn). + m_PersistenceInfo.StartGettingInfo(g_engfuncs.pfnGetPlayerWONId(pev->pContainingEntity)); + #endif } diff --git a/dlls/player.h b/dlls/player.h index 0cbf4ad..adee653 100644 --- a/dlls/player.h +++ b/dlls/player.h @@ -15,6 +15,12 @@ #ifndef PLAYER_H #define PLAYER_H + +#ifdef PERSISTENCE_SAMPLE + #include "persistencehelpers.h" +#endif + + #define PLAYER_FATAL_FALL_SPEED 1024// approx 60 feet #define PLAYER_MAX_SAFE_FALL_SPEED 580// approx 20 feet #define DAMAGE_FOR_FALL_SPEED (float) 100 / ( PLAYER_FATAL_FALL_SPEED - PLAYER_MAX_SAFE_FALL_SPEED )// damage per unit per second. @@ -168,6 +174,12 @@ public: char m_szTeamName[TEAM_NAME_LENGTH]; + + #ifdef PERSISTENCE_SAMPLE + PlayerPersistenceInfo m_PersistenceInfo; + #endif + + virtual void Spawn( void ); void Pain( void ); diff --git a/engine/custom.h b/engine/custom.h index 9e33d77..0ec8713 100644 --- a/engine/custom.h +++ b/engine/custom.h @@ -20,6 +20,8 @@ #pragma once #endif +#include "const.h" + #define MAX_QPATH 64 // Must match value in quakedefs.h ///////////////// @@ -54,6 +56,7 @@ typedef struct resourceinfo_s #define RES_CUSTOM (1<<2) // Is this resource one that corresponds to another player's customization // or is it a server startup resource. #define RES_REQUESTED (1<<3) // Already requested a download of this one +#define RES_PRECACHED (1<<4) // Already precached #include "crc.h" diff --git a/engine/edict.h b/engine/edict.h index fa0ec29..7b49560 100644 --- a/engine/edict.h +++ b/engine/edict.h @@ -5,6 +5,8 @@ #endif #define MAX_ENT_LEAFS 48 +#include "progdefs.h" + struct edict_s { qboolean free; diff --git a/engine/eiface.h b/engine/eiface.h index f091f29..d0989e6 100644 --- a/engine/eiface.h +++ b/engine/eiface.h @@ -21,8 +21,8 @@ #define INTERFACE_VERSION 140 #endif // !HLDEMO_BUILD +#include #include "custom.h" - #include "cvardef.h" // // Defines entity interface between engine and DLLs. @@ -251,6 +251,8 @@ typedef struct enginefuncs_s void (*pfnForceUnmodified) ( FORCE_TYPE type, float *mins, float *maxs, const char *filename ); void (*pfnGetPlayerStats) ( const edict_t *pClient, int *ping, int *packet_loss ); + + void (*pfnAddServerCommand) ( char *cmd_name, void (*function) (void) ); } enginefuncs_t; // ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 138 @@ -374,7 +376,7 @@ typedef struct typedef struct { - // Initialize the game (one-time call after loading of game .dll ) + // Initialize/shutdown the game (one-time call after loading of game .dll ) void (*pfnGameInit) ( void ); int (*pfnSpawn) ( edict_t *pent ); void (*pfnThink) ( edict_t *pent ); @@ -459,11 +461,25 @@ typedef struct int (*pfnAllowLagCompensation)( void ); } DLL_FUNCTIONS; -extern DLL_FUNCTIONS gEntityInterface; +extern DLL_FUNCTIONS gEntityInterface; + +// Current version. +#define NEW_DLL_FUNCTIONS_VERSION 1 + +typedef struct +{ + // Called right before the object's memory is freed. + // Calls its destructor. + void (*pfnOnFreeEntPrivateData)(edict_t *pEnt); + void (*pfnGameShutdown)(void); + int (*pfnShouldCollide)( edict_t *pentTouched, edict_t *pentOther ); +} NEW_DLL_FUNCTIONS; +typedef int (*NEW_DLL_FUNCTIONS_FN)( NEW_DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ); + +// Pointers will be null if the game DLL doesn't support this API. +extern NEW_DLL_FUNCTIONS gNewDLLFunctions; typedef int (*APIFUNCTION)( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ); typedef int (*APIFUNCTION2)( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ); - #endif EIFACE_H -; diff --git a/engine/studio.h b/engine/studio.h index ccba658..69c7c84 100644 --- a/engine/studio.h +++ b/engine/studio.h @@ -37,7 +37,7 @@ Studio models are position independent, so the cache manager can move them. #define MAXSTUDIOBONES 128 // total bones actually used #define MAXSTUDIOMODELS 32 // sub-models per model #define MAXSTUDIOBODYPARTS 32 -#define MAXSTUDIOGROUPS 4 +#define MAXSTUDIOGROUPS 16 #define MAXSTUDIOANIMATIONS 512 // per sequence #define MAXSTUDIOMESHES 256 #define MAXSTUDIOEVENTS 1024 @@ -141,8 +141,12 @@ typedef struct vec3_t bbmax; } mstudiobbox_t; -#ifndef ZONE_H -typedef void *cache_user_t; +#if !defined( CACHE_USER ) && !defined( QUAKEDEF_H ) +#define CACHE_USER +typedef struct cache_user_s +{ + void *data; +} cache_user_t; #endif // demand loaded sequence groups diff --git a/pm_shared/pm_defs.h b/pm_shared/pm_defs.h index 1e3e498..dbd2d5c 100644 --- a/pm_shared/pm_defs.h +++ b/pm_shared/pm_defs.h @@ -84,7 +84,6 @@ typedef struct physent_s } physent_t; typedef struct playermove_s playermove_t; - struct playermove_s { int player_index; // So we don't try to run the PM_CheckStuck nudging too quickly. @@ -184,24 +183,24 @@ struct playermove_s // Common functions const char *(*PM_Info_ValueForKey) ( const char *s, const char *key ); - void (*PM_Particle)( vec3_t origin, int color, float life, int zpos, int zvel); - int (*PM_TestPlayerPosition) (vec3_t pos, pmtrace_t *ptrace ); + void (*PM_Particle)( float *origin, int color, float life, int zpos, int zvel); + int (*PM_TestPlayerPosition) (float *pos, pmtrace_t *ptrace ); void (*Con_NPrintf)( int idx, char *fmt, ... ); void (*Con_DPrintf)( char *fmt, ... ); void (*Con_Printf)( char *fmt, ... ); double (*Sys_FloatTime)( void ); void (*PM_StuckTouch)( int hitent, pmtrace_t *ptraceresult ); - int (*PM_PointContents) (vec3_t p, int *truecontents /*filled in if this is non-null*/ ); - int (*PM_TruePointContents) (vec3_t p); - int (*PM_HullPointContents) ( struct hull_s *hull, int num, vec3_t p); - pmtrace_t (*PM_PlayerTrace) (vec3_t start, vec3_t end, int traceFlags, int ignore_pe ); + int (*PM_PointContents) (float *p, int *truecontents /*filled in if this is non-null*/ ); + int (*PM_TruePointContents) (float *p); + int (*PM_HullPointContents) ( struct hull_s *hull, int num, float *p); + pmtrace_t (*PM_PlayerTrace) (float *start, float *end, int traceFlags, int ignore_pe ); struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehulll, int ignore_pe ); long (*RandomLong)( long lLow, long lHigh ); float (*RandomFloat)( float flLow, float flHigh ); int (*PM_GetModelType)( struct model_s *mod ); - void (*PM_GetModelBounds)( struct model_s *mod, vec3_t mins, vec3_t maxs ); - void *(*PM_HullForBsp)( physent_t *pe, vec3_t offset ); - float (*PM_TraceModel)( physent_t *pEnt, vec3_t start, vec3_t end, trace_t *trace ); + void (*PM_GetModelBounds)( struct model_s *mod, float *mins, float *maxs ); + void *(*PM_HullForBsp)( physent_t *pe, float *offset ); + float (*PM_TraceModel)( physent_t *pEnt, float *start, float *end, trace_t *trace ); int (*COM_FileSize)(char *filename); byte *(*COM_LoadFile) (char *path, int usehunk, int *pLength); void (*COM_FreeFile) ( void *buffer ); @@ -211,8 +210,12 @@ struct playermove_s // Run functions for this frame? qboolean runfuncs; void (*PM_PlaySound) ( int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch ); - const char *(*PM_TraceTexture) ( int ground, vec3_t vstart, vec3_t vend ); + const char *(*PM_TraceTexture) ( int ground, float *vstart, float *vend ); void (*PM_PlaybackEventFull) ( int flags, int clientindex, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 ); + + pmtrace_t (*PM_PlayerTraceEx) (float *start, float *end, int traceFlags, int (*pfnIgnore)( physent_t *pe ) ); + int (*PM_TestPlayerPositionEx) (float *pos, pmtrace_t *ptrace, int (*pfnIgnore)( physent_t *pe ) ); + struct pmtrace_s *(*PM_TraceLineEx)( float *start, float *end, int flags, int usehulll, int (*pfnIgnore)( physent_t *pe ) ); }; #endif diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index f97c42b..56d971b 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -1966,6 +1966,50 @@ void PM_FixPlayerCrouchStuck( int direction ) VectorCopy( test, pmove->origin ); // Failed } +void PM_UnDuck( void ) +{ + int i; + pmtrace_t trace; + vec3_t newOrigin; + + VectorCopy( pmove->origin, newOrigin ); + + if ( pmove->onground != -1 ) + { + for ( i = 0; i < 3; i++ ) + { + newOrigin[i] += ( pmove->player_mins[1][i] - pmove->player_mins[0][i] ); + } + } + + trace = pmove->PM_PlayerTrace( newOrigin, newOrigin, PM_NORMAL, -1 ); + + if ( !trace.startsolid ) + { + pmove->usehull = 0; + + // Oh, no, changing hulls stuck us into something, try unsticking downward first. + trace = pmove->PM_PlayerTrace( newOrigin, newOrigin, PM_NORMAL, -1 ); + if ( trace.startsolid ) + { + // See if we are stuck? If so, stay ducked with the duck hull until we have a clear spot + //Con_Printf( "unstick got stuck\n" ); + pmove->usehull = 1; + return; + } + + pmove->flags &= ~FL_DUCKING; + pmove->bInDuck = false; + pmove->view_ofs[2] = VEC_VIEW; + pmove->flDuckTime = 0; + + VectorCopy( newOrigin, pmove->origin ); + + // Recatagorize position since ducking can change origin + PM_CatagorizePosition(); + } +} + void PM_Duck( void ) { int i; @@ -1987,15 +2031,26 @@ void PM_Duck( void ) pmove->oldbuttons &= ~IN_DUCK; } - if ( pmove->dead ) + // Prevent ducking if the iuser3 variable is set + if ( pmove->iuser3 || pmove->dead ) + { + // Try to unduck + if ( pmove->flags & FL_DUCKING ) + { + PM_UnDuck(); + } return; + } - if ( ( pmove->cmd.buttons & IN_DUCK ) || ( pmove->bInDuck ) || ( pmove->flags & FL_DUCKING ) ) + if ( pmove->flags & FL_DUCKING ) { pmove->cmd.forwardmove *= 0.333; pmove->cmd.sidemove *= 0.333; pmove->cmd.upmove *= 0.333; + } + if ( ( pmove->cmd.buttons & IN_DUCK ) || ( pmove->bInDuck ) || ( pmove->flags & FL_DUCKING ) ) + { if ( pmove->cmd.buttons & IN_DUCK ) { if ( (nButtonPressed & IN_DUCK ) && !( pmove->flags & FL_DUCKING ) ) @@ -2044,45 +2099,8 @@ void PM_Duck( void ) } else { - pmtrace_t trace; - vec3_t newOrigin; - - VectorCopy( pmove->origin, newOrigin ); - - if ( pmove->onground != -1 ) - { - for ( i = 0; i < 3; i++ ) - { - newOrigin[i] += ( pmove->player_mins[1][i] - pmove->player_mins[0][i] ); - } - } - - trace = pmove->PM_PlayerTrace( newOrigin, newOrigin, PM_NORMAL, -1 ); - - if ( !trace.startsolid ) - { - pmove->usehull = 0; - - // Oh, no, changing hulls stuck us into something, try unsticking downward first. - trace = pmove->PM_PlayerTrace( newOrigin, newOrigin, PM_NORMAL, -1 ); - if ( trace.startsolid ) - { - // See if we are stuck? If so, stay ducked with the duck hull until we have a clear spot - //Con_Printf( "unstick got stuck\n" ); - pmove->usehull = 1; - return; - } - - pmove->flags &= ~FL_DUCKING; - pmove->bInDuck = false; - pmove->view_ofs[2] = VEC_VIEW; - pmove->flDuckTime = 0; - - VectorCopy( newOrigin, pmove->origin ); - - // Recatagorize position since ducking can change origin - PM_CatagorizePosition(); - } + // Try to unduck + PM_UnDuck(); } } } diff --git a/utils/bspinfo/bspinfo.mak b/utils/bspinfo/bspinfo.mak deleted file mode 100644 index 2413570..0000000 --- a/utils/bspinfo/bspinfo.mak +++ /dev/null @@ -1,253 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=bspinfo - Win32 Debug -!MESSAGE No configuration specified. Defaulting to bspinfo - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "bspinfo - Win32 Release" && "$(CFG)" !=\ - "bspinfo - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "bspinfo.mak" CFG="bspinfo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "bspinfo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "bspinfo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "bspinfo - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "bspinfo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\bspinfo.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\bspinfo.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(OUTDIR)\bspinfo.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/bspinfo.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/bspinfo.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/bspinfo.pdb" /machine:I386 /out:"$(OUTDIR)/bspinfo.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\bspinfo.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\scriplib.obj" - -"$(OUTDIR)\bspinfo.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "bspinfo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\bspinfo.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\bspinfo.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\bspinfo.exe" - -@erase "$(OUTDIR)\bspinfo.ilk" - -@erase "$(OUTDIR)\bspinfo.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MLd /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/bspinfo.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/bspinfo.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/bspinfo.pdb" /debug /machine:I386 /out:"$(OUTDIR)/bspinfo.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\bspinfo.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\scriplib.obj" - -"$(OUTDIR)\bspinfo.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "bspinfo - Win32 Release" -# Name "bspinfo - Win32 Debug" - -!IF "$(CFG)" == "bspinfo - Win32 Release" - -!ELSEIF "$(CFG)" == "bspinfo - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\bspinfo.c -DEP_CPP_BSPIN=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - - -"$(INTDIR)\bspinfo.obj" : $(SOURCE) $(DEP_CPP_BSPIN) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\bspfile.c -DEP_CPP_BSPFI=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/makels/makels.mak b/utils/makels/makels.mak deleted file mode 100644 index d0f4a57..0000000 --- a/utils/makels/makels.mak +++ /dev/null @@ -1,212 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=makels - Win32 Debug -!MESSAGE No configuration specified. Defaulting to makels - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "makels - Win32 Release" && "$(CFG)" != "makels - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "makels.mak" CFG="makels - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "makels - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "makels - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "makels - Win32 Debug" -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "makels - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\makels.exe" - -CLEAN : - -@erase "$(INTDIR)\makels.obj" - -@erase "$(OUTDIR)\makels.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/makels.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/makels.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/makels.pdb" /machine:I386\ - /out:"$(OUTDIR)/makels.exe" -LINK32_OBJS= \ - "$(INTDIR)\makels.obj" - -"$(OUTDIR)\makels.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "makels - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\makels.exe" "$(OUTDIR)\makels.bsc" - -CLEAN : - -@erase "$(INTDIR)\makels.obj" - -@erase "$(INTDIR)\makels.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\makels.bsc" - -@erase "$(OUTDIR)\makels.exe" - -@erase "$(OUTDIR)\makels.ilk" - -@erase "$(OUTDIR)\makels.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /FR"$(INTDIR)/" /Fp"$(INTDIR)/makels.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/"\ - /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/makels.bsc" -BSC32_SBRS= \ - "$(INTDIR)\makels.sbr" - -"$(OUTDIR)\makels.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/makels.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/makels.exe" -LINK32_OBJS= \ - "$(INTDIR)\makels.obj" - -"$(OUTDIR)\makels.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "makels - Win32 Release" -# Name "makels - Win32 Debug" - -!IF "$(CFG)" == "makels - Win32 Release" - -!ELSEIF "$(CFG)" == "makels - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\makels.cpp - -!IF "$(CFG)" == "makels - Win32 Release" - - -"$(INTDIR)\makels.obj" : $(SOURCE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "makels - Win32 Debug" - - -"$(INTDIR)\makels.obj" : $(SOURCE) "$(INTDIR)" - -"$(INTDIR)\makels.sbr" : $(SOURCE) "$(INTDIR)" - - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/mkmovie/mkmovie.mak b/utils/mkmovie/mkmovie.mak deleted file mode 100644 index 1426733..0000000 --- a/utils/mkmovie/mkmovie.mak +++ /dev/null @@ -1,196 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=mkmovie - Win32 Debug -!MESSAGE No configuration specified. Defaulting to mkmovie - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "mkmovie - Win32 Release" && "$(CFG)" !=\ - "mkmovie - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mkmovie.mak" CFG="mkmovie - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mkmovie - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "mkmovie - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "mkmovie - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mkmovie - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\mkmovie.exe" - -CLEAN : - -@erase "$(INTDIR)\mkmovie.obj" - -@erase "$(OUTDIR)\mkmovie.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/mkmovie.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/mkmovie.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/mkmovie.pdb" /machine:I386 /out:"$(OUTDIR)/mkmovie.exe" -LINK32_OBJS= \ - "$(INTDIR)\mkmovie.obj" - -"$(OUTDIR)\mkmovie.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "mkmovie - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "mkmovie_" -# PROP BASE Intermediate_Dir "mkmovie_" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "debug" -# PROP Intermediate_Dir "debug" -# PROP Target_Dir "" -OUTDIR=.\debug -INTDIR=.\debug - -ALL : "$(OUTDIR)\mkmovie.exe" - -CLEAN : - -@erase "$(INTDIR)\mkmovie.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\mkmovie.exe" - -@erase "$(OUTDIR)\mkmovie.ilk" - -@erase "$(OUTDIR)\mkmovie.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG"\ - /D "_CONSOLE" /Fp"$(INTDIR)/mkmovie.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c\ - -CPP_OBJS=.\debug/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/mkmovie.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/mkmovie.pdb" /debug /machine:I386 /out:"$(OUTDIR)/mkmovie.exe" -LINK32_OBJS= \ - "$(INTDIR)\mkmovie.obj" - -"$(OUTDIR)\mkmovie.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "mkmovie - Win32 Release" -# Name "mkmovie - Win32 Debug" - -!IF "$(CFG)" == "mkmovie - Win32 Release" - -!ELSEIF "$(CFG)" == "mkmovie - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\mkmovie.c -DEP_CPP_MKMOV=\ - "..\common\cmdlib.h"\ - "..\common\movie.h"\ - - -"$(INTDIR)\mkmovie.obj" : $(SOURCE) $(DEP_CPP_MKMOV) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/qbsp2/qbsp2.mak b/utils/qbsp2/qbsp2.mak deleted file mode 100644 index 6d875ec..0000000 --- a/utils/qbsp2/qbsp2.mak +++ /dev/null @@ -1,466 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=qbsp2 - Win32 Debug -!MESSAGE No configuration specified. Defaulting to qbsp2 - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "qbsp2 - Win32 Release" && "$(CFG)" != "qbsp2 - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "qbsp2.mak" CFG="qbsp2 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "qbsp2 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "qbsp2 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "qbsp2 - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "qbsp2 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "qbsp2___" -# PROP BASE Intermediate_Dir "qbsp2___" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "release" -# PROP Intermediate_Dir "release" -# PROP Target_Dir "" -OUTDIR=.\release -INTDIR=.\release - -ALL : "$(OUTDIR)\qbsp2.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\gldraw.obj" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\merge.obj" - -@erase "$(INTDIR)\outside.obj" - -@erase "$(INTDIR)\portals.obj" - -@erase "$(INTDIR)\qbsp.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\solidbsp.obj" - -@erase "$(INTDIR)\surfaces.obj" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\tjunc.obj" - -@erase "$(INTDIR)\writebsp.obj" - -@erase "$(OUTDIR)\qbsp2.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /GX /O2 /I "..\common" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "DOUBLEVEC_T" /YX /c -CPP_PROJ=/nologo /MT /GX /O2 /I "..\common" /D "NDEBUG" /D "WIN32" /D\ - "_CONSOLE" /D "DOUBLEVEC_T" /Fp"$(INTDIR)/qbsp2.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qbsp2.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/qbsp2.pdb" /machine:I386 /out:"$(OUTDIR)/qbsp2.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\gldraw.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\merge.obj" \ - "$(INTDIR)\outside.obj" \ - "$(INTDIR)\portals.obj" \ - "$(INTDIR)\qbsp.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\solidbsp.obj" \ - "$(INTDIR)\surfaces.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\tjunc.obj" \ - "$(INTDIR)\writebsp.obj" - -"$(OUTDIR)\qbsp2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "qbsp2 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "qbsp2__0" -# PROP BASE Intermediate_Dir "qbsp2__0" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "debug" -# PROP Intermediate_Dir "debug" -# PROP Target_Dir "" -OUTDIR=.\debug -INTDIR=.\debug - -ALL : "$(OUTDIR)\qbsp2.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\gldraw.obj" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\merge.obj" - -@erase "$(INTDIR)\outside.obj" - -@erase "$(INTDIR)\portals.obj" - -@erase "$(INTDIR)\qbsp.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\solidbsp.obj" - -@erase "$(INTDIR)\surfaces.obj" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\tjunc.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\writebsp.obj" - -@erase "$(OUTDIR)\qbsp2.exe" - -@erase "$(OUTDIR)\qbsp2.ilk" - -@erase "$(OUTDIR)\qbsp2.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "DOUBLEVEC_T" /YX /c -CPP_PROJ=/nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "_DEBUG" /D "WIN32" /D\ - "_CONSOLE" /D "DOUBLEVEC_T" /Fp"$(INTDIR)/qbsp2.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\debug/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qbsp2.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=opengl32.lib glu32.lib glaux.lib kernel32.lib user32.lib gdi32.lib\ - winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib\ - uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/qbsp2.pdb" /debug /machine:I386 /out:"$(OUTDIR)/qbsp2.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\gldraw.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\merge.obj" \ - "$(INTDIR)\outside.obj" \ - "$(INTDIR)\portals.obj" \ - "$(INTDIR)\qbsp.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\solidbsp.obj" \ - "$(INTDIR)\surfaces.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\tjunc.obj" \ - "$(INTDIR)\writebsp.obj" - -"$(OUTDIR)\qbsp2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "qbsp2 - Win32 Release" -# Name "qbsp2 - Win32 Debug" - -!IF "$(CFG)" == "qbsp2 - Win32 Release" - -!ELSEIF "$(CFG)" == "qbsp2 - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\merge.c -DEP_CPP_MERGE=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\merge.obj" : $(SOURCE) $(DEP_CPP_MERGE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\gldraw.c -DEP_CPP_GLDRA=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - {$(INCLUDE)}"\GL\gl.h"\ - {$(INCLUDE)}"\GL\glaux.h"\ - {$(INCLUDE)}"\GL\glu.h"\ - - -"$(INTDIR)\gldraw.obj" : $(SOURCE) $(DEP_CPP_GLDRA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\writebsp.c -DEP_CPP_WRITE=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\writebsp.obj" : $(SOURCE) $(DEP_CPP_WRITE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\portals.c -DEP_CPP_PORTA=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\portals.obj" : $(SOURCE) $(DEP_CPP_PORTA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\qbsp.c -DEP_CPP_QBSP_=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\qbsp.obj" : $(SOURCE) $(DEP_CPP_QBSP_) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\solidbsp.c -DEP_CPP_SOLID=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\solidbsp.obj" : $(SOURCE) $(DEP_CPP_SOLID) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\surfaces.c -DEP_CPP_SURFA=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\surfaces.obj" : $(SOURCE) $(DEP_CPP_SURFA) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\tjunc.c -DEP_CPP_TJUNC=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\tjunc.obj" : $(SOURCE) $(DEP_CPP_TJUNC) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\outside.c -DEP_CPP_OUTSI=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\bsp5.h"\ - - -"$(INTDIR)\outside.obj" : $(SOURCE) $(DEP_CPP_OUTSI) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\bsp5.h - -!IF "$(CFG)" == "qbsp2 - Win32 Release" - -!ELSEIF "$(CFG)" == "qbsp2 - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\threads.c -DEP_CPP_THREA=\ - "..\common\cmdlib.h"\ - "..\common\threads.h"\ - - -"$(INTDIR)\threads.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\bspfile.c -DEP_CPP_BSPFI=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\mathlib.c -DEP_CPP_MATHL=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\types.h"\ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/qbsp2/writebsp.mak b/utils/qbsp2/writebsp.mak deleted file mode 100644 index 609ba5a..0000000 --- a/utils/qbsp2/writebsp.mak +++ /dev/null @@ -1,179 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=writebsp - Win32 Debug -!MESSAGE No configuration specified. Defaulting to writebsp - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "writebsp - Win32 Release" && "$(CFG)" !=\ - "writebsp - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "writebsp.mak" CFG="writebsp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "writebsp - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "writebsp - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "writebsp - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\writebsp.exe" - -CLEAN : - -@erase "$(INTDIR)\writebsp.obj" - -@erase "$(OUTDIR)\writebsp.exe" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"writebsp.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/writebsp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/writebsp.pdb" /machine:I386 /out:"$(OUTDIR)/writebsp.exe" -LINK32_OBJS= \ - "$(INTDIR)\writebsp.obj" - -"$(OUTDIR)\writebsp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "writebsp - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\writebsp.exe" - -CLEAN : - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\writebsp.obj" - -@erase "$(OUTDIR)\writebsp.exe" - -@erase "$(OUTDIR)\writebsp.ilk" - -@erase "$(OUTDIR)\writebsp.pdb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"writebsp.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/writebsp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/writebsp.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/writebsp.exe" -LINK32_OBJS= \ - "$(INTDIR)\writebsp.obj" - -"$(OUTDIR)\writebsp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "writebsp - Win32 Release" -# Name "writebsp - Win32 Debug" - -!IF "$(CFG)" == "writebsp - Win32 Release" - -!ELSEIF "$(CFG)" == "writebsp - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\writebsp.c -DEP_CPP_WRITE=\ - ".\bsp5.h"\ - -NODEP_CPP_WRITE=\ - ".\bspfile.h"\ - ".\cmdlib.h"\ - ".\mathlib.h"\ - ".\threads.h"\ - - -"$(INTDIR)\writebsp.obj" : $(SOURCE) $(DEP_CPP_WRITE) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/qcsg/csg.h b/utils/qcsg/csg.h index 6813b22..7225c6d 100644 --- a/utils/qcsg/csg.h +++ b/utils/qcsg/csg.h @@ -14,7 +14,7 @@ #include "scriplib.h" #include "polylib.h" #include "threads.h" -#include "bspfile.h" +#include "bsplib.h" #include @@ -33,12 +33,16 @@ typedef struct int inormal[3]; } plane_t; + extern plane_t mapplanes[MAX_MAP_PLANES]; extern int nummapplanes; +extern int g_nMapFileVersion; // map file version * 100 (ie 201), zero for pre-Worldcraft 2.0.1 maps typedef struct { + vec3_t UAxis; + vec3_t VAxis; vec_t shift[2]; vec_t rotate; vec_t scale[2]; diff --git a/utils/qcsg/map.c b/utils/qcsg/map.c index 0691cd9..591b9cf 100644 --- a/utils/qcsg/map.c +++ b/utils/qcsg/map.c @@ -8,8 +8,6 @@ * ****/ -// map.c - #include "csg.h" int nummapbrushes; @@ -18,7 +16,7 @@ brush_t mapbrushes[MAX_MAP_BRUSHES]; int numbrushsides; side_t brushsides[MAX_MAP_SIDES]; -//============================================================================ +int g_nMapFileVersion; /* @@ -28,12 +26,12 @@ textureAxisFromPlane */ vec3_t baseaxis[18] = { -{0,0,1}, {1,0,0}, {0,-1,0}, // floor -{0,0,-1}, {1,0,0}, {0,-1,0}, // ceiling -{1,0,0}, {0,1,0}, {0,0,-1}, // west wall -{-1,0,0}, {0,1,0}, {0,0,-1}, // east wall -{0,1,0}, {1,0,0}, {0,0,-1}, // south wall -{0,-1,0}, {1,0,0}, {0,0,-1} // north wall + {0,0,1}, {1,0,0}, {0,-1,0}, // floor + {0,0,-1}, {1,0,0}, {0,-1,0}, // ceiling + {1,0,0}, {0,1,0}, {0,0,-1}, // west wall + {-1,0,0}, {0,1,0}, {0,0,-1}, // east wall + {0,1,0}, {1,0,0}, {0,0,-1}, // south wall + {0,-1,0}, {1,0,0}, {0,0,-1} // north wall }; void TextureAxisFromPlane(plane_t *pln, vec3_t xv, vec3_t yv) @@ -60,7 +58,6 @@ void TextureAxisFromPlane(plane_t *pln, vec3_t xv, vec3_t yv) } - /* ================= ParseBrush @@ -103,7 +100,7 @@ void ParseBrush (entity_t *mapent) b->numsides++; - // read the three point plane definition + // read the three point plane definition for (i=0 ; i<3 ; i++) { if (i != 0) @@ -123,16 +120,71 @@ void ParseBrush (entity_t *mapent) } - // read the texturedef + // read the texturedef GetToken (false); strcpy (side->td.name, token); - GetToken (false); - side->td.shift[0] = atoi(token); - GetToken (false); - side->td.shift[1] = atoi(token); - GetToken (false); - side->td.rotate = atoi(token); + if (g_nMapFileVersion < 220) + { + GetToken (false); + side->td.shift[0] = atof(token); + GetToken (false); + side->td.shift[1] = atof(token); + GetToken (false); + side->td.rotate = atof(token); + } + else + { + // texture U axis + GetToken (false); + if (strcmp (token, "[")) + { + Error("missing '[ in texturedef"); + } + + GetToken (false); + side->td.UAxis[0] = atof(token); + GetToken (false); + side->td.UAxis[1] = atof(token); + GetToken (false); + side->td.UAxis[2] = atof(token); + GetToken (false); + side->td.shift[0] = atof(token); + + GetToken (false); + if (strcmp (token, "]")) + { + Error("missing ']' in texturedef"); + } + + // texture V axis + GetToken (false); + if (strcmp (token, "[")) + { + Error("missing '[ in texturedef"); + } + + GetToken (false); + side->td.VAxis[0] = atof(token); + GetToken (false); + side->td.VAxis[1] = atof(token); + GetToken (false); + side->td.VAxis[2] = atof(token); + GetToken (false); + side->td.shift[1] = atof(token); + + GetToken (false); + if (strcmp (token, "]")) + { + Error("missing ']' in texturedef"); + } + + // Texture rotation is implicit in U/V axes. + GetToken(false); + side->td.rotate = 0; + } + + // texure scale GetToken (false); side->td.scale[0] = atof(token); GetToken (false); @@ -210,6 +262,12 @@ qboolean ParseMapEntity (void) else { e = ParseEpair (); + + if (!strcmp(e->key, "mapversion")) + { + g_nMapFileVersion = atoi(e->value); + } + e->next = mapent->epairs; mapent->epairs = e; } diff --git a/utils/qcsg/qcsg.c b/utils/qcsg/qcsg.c index 3e424c6..df9d38d 100644 --- a/utils/qcsg/qcsg.c +++ b/utils/qcsg/qcsg.c @@ -731,7 +731,7 @@ int main (int argc, char **argv) char name[1024]; double start, end; - printf( "qcsg.exe v2.7 (%s)\n", __DATE__ ); + printf( "qcsg.exe v2.8 (%s)\n", __DATE__ ); printf ("---- qcsg ----\n" ); for (i=1 ; iname, "aaatrigger",10)) tx.flags |= TEX_SPECIAL; - TextureAxisFromPlane(plane, vecs[0], vecs[1]); + if (g_nMapFileVersion < 220) + { + TextureAxisFromPlane(plane, vecs[0], vecs[1]); + } if (!bt->scale[0]) bt->scale[0] = 1; if (!bt->scale[1]) bt->scale[1] = 1; - -// rotate axis - if (bt->rotate == 0) - { sinv = 0 ; cosv = 1; } - else if (bt->rotate == 90) - { sinv = 1 ; cosv = 0; } - else if (bt->rotate == 180) - { sinv = 0 ; cosv = -1; } - else if (bt->rotate == 270) - { sinv = -1 ; cosv = 0; } - else - { - ang = bt->rotate / 180 * Q_PI; - sinv = sin(ang); - cosv = cos(ang); - } - - if (vecs[0][0]) - sv = 0; - else if (vecs[0][1]) - sv = 1; - else - sv = 2; - - if (vecs[1][0]) - tv = 0; - else if (vecs[1][1]) - tv = 1; - else - tv = 2; - - for (i=0 ; i<2 ; i++) + if (g_nMapFileVersion < 220) { - ns = cosv * vecs[i][sv] - sinv * vecs[i][tv]; - nt = sinv * vecs[i][sv] + cosv * vecs[i][tv]; - vecs[i][sv] = ns; - vecs[i][tv] = nt; - } + // rotate axis + if (bt->rotate == 0) + { sinv = 0 ; cosv = 1; } + else if (bt->rotate == 90) + { sinv = 1 ; cosv = 0; } + else if (bt->rotate == 180) + { sinv = 0 ; cosv = -1; } + else if (bt->rotate == 270) + { sinv = -1 ; cosv = 0; } + else + { + ang = bt->rotate / 180 * Q_PI; + sinv = sin(ang); + cosv = cos(ang); + } - for (i=0 ; i<2 ; i++) - for (j=0 ; j<3 ; j++) - tx.vecs[i][j] = vecs[i][j] / bt->scale[i]; + if (vecs[0][0]) + sv = 0; + else if (vecs[0][1]) + sv = 1; + else + sv = 2; + + if (vecs[1][0]) + tv = 0; + else if (vecs[1][1]) + tv = 1; + else + tv = 2; + + for (i=0 ; i<2 ; i++) + { + ns = cosv * vecs[i][sv] - sinv * vecs[i][tv]; + nt = sinv * vecs[i][sv] + cosv * vecs[i][tv]; + vecs[i][sv] = ns; + vecs[i][tv] = nt; + } + + for (i=0 ; i<2 ; i++) + for (j=0 ; j<3 ; j++) + tx.vecs[i][j] = vecs[i][j] / bt->scale[i]; + } + else + { + tx.vecs[0][0] = bt->UAxis[0] / bt->scale[0]; + tx.vecs[0][1] = bt->UAxis[1] / bt->scale[0]; + tx.vecs[0][2] = bt->UAxis[2] / bt->scale[0]; + + tx.vecs[1][0] = bt->VAxis[0] / bt->scale[1]; + tx.vecs[1][1] = bt->VAxis[1] / bt->scale[1]; + tx.vecs[1][2] = bt->VAxis[2] / bt->scale[1]; + } tx.vecs[0][3] = bt->shift[0] + DotProduct( origin, tx.vecs[0] ); tx.vecs[1][3] = bt->shift[1] + DotProduct( origin, tx.vecs[1] ); diff --git a/utils/qlumpy/qlumpy.mak b/utils/qlumpy/qlumpy.mak deleted file mode 100644 index 37330c2..0000000 --- a/utils/qlumpy/qlumpy.mak +++ /dev/null @@ -1,412 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=qlumpy - Win32 Debug -!MESSAGE No configuration specified. Defaulting to qlumpy - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "qlumpy - Win32 Release" && "$(CFG)" != "qlumpy - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "qlumpy.mak" CFG="qlumpy - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "qlumpy - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "qlumpy - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "qlumpy - Win32 Debug" -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "qlumpy - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\qlumpy.exe" - -CLEAN : - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\qlumpy.obj" - -@erase "$(INTDIR)\quakegrb.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\wadlib.obj" - -@erase "$(OUTDIR)\qlumpy.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W2 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W2 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/qlumpy.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qlumpy.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/qlumpy.pdb" /machine:I386\ - /out:"$(OUTDIR)/qlumpy.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\qlumpy.obj" \ - "$(INTDIR)\quakegrb.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\wadlib.obj" - -"$(OUTDIR)\qlumpy.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\qlumpy.exe" "$(OUTDIR)\qlumpy.bsc" - -CLEAN : - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\lbmlib.sbr" - -@erase "$(INTDIR)\qlumpy.obj" - -@erase "$(INTDIR)\qlumpy.sbr" - -@erase "$(INTDIR)\quakegrb.obj" - -@erase "$(INTDIR)\quakegrb.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\wadlib.obj" - -@erase "$(INTDIR)\wadlib.sbr" - -@erase "$(OUTDIR)\qlumpy.bsc" - -@erase "$(OUTDIR)\qlumpy.exe" - -@erase "$(OUTDIR)\qlumpy.ilk" - -@erase "$(OUTDIR)\qlumpy.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W2 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MLd /W2 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG"\ - /D "_CONSOLE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/qlumpy.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qlumpy.bsc" -BSC32_SBRS= \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\lbmlib.sbr" \ - "$(INTDIR)\qlumpy.sbr" \ - "$(INTDIR)\quakegrb.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\wadlib.sbr" - -"$(OUTDIR)\qlumpy.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/qlumpy.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/qlumpy.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\qlumpy.obj" \ - "$(INTDIR)\quakegrb.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\wadlib.obj" - -"$(OUTDIR)\qlumpy.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "qlumpy - Win32 Release" -# Name "qlumpy - Win32 Debug" - -!IF "$(CFG)" == "qlumpy - Win32 Release" - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\quakegrb.c -DEP_CPP_QUAKE=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\scriplib.h"\ - "..\common\wadlib.h"\ - ".\qlumpy.h"\ - - -!IF "$(CFG)" == "qlumpy - Win32 Release" - - -"$(INTDIR)\quakegrb.obj" : $(SOURCE) $(DEP_CPP_QUAKE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - - -"$(INTDIR)\quakegrb.obj" : $(SOURCE) $(DEP_CPP_QUAKE) "$(INTDIR)" - -"$(INTDIR)\quakegrb.sbr" : $(SOURCE) $(DEP_CPP_QUAKE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\qlumpy.c - -!IF "$(CFG)" == "qlumpy - Win32 Release" - -DEP_CPP_QLUMP=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\scriplib.h"\ - "..\common\wadlib.h"\ - ".\qlumpy.h"\ - - -"$(INTDIR)\qlumpy.obj" : $(SOURCE) $(DEP_CPP_QLUMP) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - -DEP_CPP_QLUMP=\ - ".\qlumpy.h"\ - - -"$(INTDIR)\qlumpy.obj" : $(SOURCE) $(DEP_CPP_QLUMP) "$(INTDIR)" - -"$(INTDIR)\qlumpy.sbr" : $(SOURCE) $(DEP_CPP_QLUMP) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\wadlib.c -DEP_CPP_WADLI=\ - "..\common\cmdlib.h"\ - "..\common\wadlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "qlumpy - Win32 Release" - - -"$(INTDIR)\wadlib.obj" : $(SOURCE) $(DEP_CPP_WADLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\wadlib.obj" : $(SOURCE) $(DEP_CPP_WADLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\wadlib.sbr" : $(SOURCE) $(DEP_CPP_WADLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\lbmlib.c -DEP_CPP_LBMLI=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - - -!IF "$(CFG)" == "qlumpy - Win32 Release" - - -"$(INTDIR)\lbmlib.obj" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\lbmlib.obj" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\lbmlib.sbr" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -!IF "$(CFG)" == "qlumpy - Win32 Release" - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\scriplib.sbr" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "qlumpy - Win32 Release" - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qlumpy - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\cmdlib.sbr" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/qrad/qrad.mak b/utils/qrad/qrad.mak deleted file mode 100644 index dc5507c..0000000 --- a/utils/qrad/qrad.mak +++ /dev/null @@ -1,576 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=qrad - Win32 Debug -!MESSAGE No configuration specified. Defaulting to qrad - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "qrad - Win32 Release" && "$(CFG)" != "qrad - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "qrad.mak" CFG="qrad - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "qrad - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "qrad - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "qrad - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "qrad - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\qrad.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\lightmap.obj" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\polylib.obj" - -@erase "$(INTDIR)\qrad.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\trace.obj" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\vismat.obj" - -@erase "$(OUTDIR)\qrad.exe" - -@erase "$(OUTDIR)\qrad.map" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /GX /Zi /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MT /GX /Zi /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/qrad.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qrad.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /map /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /profile /map:"$(INTDIR)/qrad.map"\ - /machine:I386 /out:"$(OUTDIR)/qrad.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lightmap.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\polylib.obj" \ - "$(INTDIR)\qrad.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\trace.obj" \ - "$(INTDIR)\vismat.obj" - -"$(OUTDIR)\qrad.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\qrad.exe" "$(OUTDIR)\qrad.bsc" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\bspfile.sbr" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\lightmap.obj" - -@erase "$(INTDIR)\lightmap.sbr" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\mathlib.sbr" - -@erase "$(INTDIR)\polylib.obj" - -@erase "$(INTDIR)\polylib.sbr" - -@erase "$(INTDIR)\qrad.obj" - -@erase "$(INTDIR)\qrad.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\threads.sbr" - -@erase "$(INTDIR)\trace.obj" - -@erase "$(INTDIR)\trace.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\vismat.obj" - -@erase "$(INTDIR)\vismat.sbr" - -@erase "$(OUTDIR)\qrad.bsc" - -@erase "$(OUTDIR)\qrad.exe" - -@erase "$(OUTDIR)\qrad.map" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D\ - "_CONSOLE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/qrad.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/qrad.bsc" -BSC32_SBRS= \ - "$(INTDIR)\bspfile.sbr" \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\lightmap.sbr" \ - "$(INTDIR)\mathlib.sbr" \ - "$(INTDIR)\polylib.sbr" \ - "$(INTDIR)\qrad.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\threads.sbr" \ - "$(INTDIR)\trace.sbr" \ - "$(INTDIR)\vismat.sbr" - -"$(OUTDIR)\qrad.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /map /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /profile /map:"$(INTDIR)/qrad.map"\ - /debug /machine:I386 /out:"$(OUTDIR)/qrad.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lightmap.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\polylib.obj" \ - "$(INTDIR)\qrad.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\trace.obj" \ - "$(INTDIR)\vismat.obj" - -"$(OUTDIR)\qrad.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "qrad - Win32 Release" -# Name "qrad - Win32 Debug" - -!IF "$(CFG)" == "qrad - Win32 Release" - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\trace.c -DEP_CPP_TRACE=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\trace.obj" : $(SOURCE) $(DEP_CPP_TRACE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -"$(INTDIR)\trace.obj" : $(SOURCE) $(DEP_CPP_TRACE) "$(INTDIR)" - -"$(INTDIR)\trace.sbr" : $(SOURCE) $(DEP_CPP_TRACE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\qrad.c -DEP_CPP_QRAD_=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - "..\common\threads.h"\ - ".\qrad.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\qrad.obj" : $(SOURCE) $(DEP_CPP_QRAD_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -"$(INTDIR)\qrad.obj" : $(SOURCE) $(DEP_CPP_QRAD_) "$(INTDIR)" - -"$(INTDIR)\qrad.sbr" : $(SOURCE) $(DEP_CPP_QRAD_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\vismat.c - -!IF "$(CFG)" == "qrad - Win32 Release" - -DEP_CPP_VISMA=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - "..\common\threads.h"\ - ".\qrad.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -"$(INTDIR)\vismat.obj" : $(SOURCE) $(DEP_CPP_VISMA) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - -DEP_CPP_VISMA=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - "..\common\threads.h"\ - ".\qrad.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -"$(INTDIR)\vismat.obj" : $(SOURCE) $(DEP_CPP_VISMA) "$(INTDIR)" - -"$(INTDIR)\vismat.sbr" : $(SOURCE) $(DEP_CPP_VISMA) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\lightmap.c -DEP_CPP_LIGHT=\ - "..\..\engine\anorms.h"\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - "..\common\threads.h"\ - ".\qrad.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\lightmap.obj" : $(SOURCE) $(DEP_CPP_LIGHT) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -"$(INTDIR)\lightmap.obj" : $(SOURCE) $(DEP_CPP_LIGHT) "$(INTDIR)" - -"$(INTDIR)\lightmap.sbr" : $(SOURCE) $(DEP_CPP_LIGHT) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\threads.c -DEP_CPP_THREA=\ - "..\common\cmdlib.h"\ - "..\common\threads.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\threads.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\threads.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\threads.sbr" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\cmdlib.sbr" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\mathlib.c -DEP_CPP_MATHL=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\mathlib.sbr" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\polylib.c -DEP_CPP_POLYL=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\polylib.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\polylib.obj" : $(SOURCE) $(DEP_CPP_POLYL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\polylib.obj" : $(SOURCE) $(DEP_CPP_POLYL) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\polylib.sbr" : $(SOURCE) $(DEP_CPP_POLYL) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - ".\..\common\scriplib.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\scriplib.sbr" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\bspfile.c -DEP_CPP_BSPFI=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - ".\..\common\scriplib.h"\ - - -!IF "$(CFG)" == "qrad - Win32 Release" - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "qrad - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\bspfile.sbr" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/smdlexp/smdlexp.mak b/utils/smdlexp/smdlexp.mak deleted file mode 100644 index f0f7ecc..0000000 --- a/utils/smdlexp/smdlexp.mak +++ /dev/null @@ -1,325 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -!IF "$(CFG)" == "" -CFG=smdlexp - Win32 Debug -!MESSAGE No configuration specified. Defaulting to smdlexp - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "smdlexp - Win32 Release" && "$(CFG)" !=\ - "smdlexp - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "smdlexp.mak" CFG="smdlexp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "smdlexp - Win32 Release" (based on\ - "Win32 (x86) Dynamic-Link Library") -!MESSAGE "smdlexp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "smdlexp - Win32 Debug" -RSC=rc.exe -MTL=mktyplib.exe -CPP=cl.exe - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" - -CLEAN : - -@erase "$(INTDIR)\smdlexp.obj" - -@erase "$(INTDIR)\smdlexp.res" - -@erase "$(OUTDIR)\SMDLEXP.exp" - -@erase "$(OUTDIR)\SMDLEXP.lib" - -@erase "..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "\3DSMAX2.5\MAXSDK\INCLUDE" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "\3DSMAX2.5\MAXSDK\INCLUDE" /D "WIN32" /D\ - "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)/smdlexp.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /win32 -MTL_PROJ=/nologo /D "NDEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/smdlexp.res" /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/smdlexp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib COMCTL32.LIB /nologo /subsystem:windows /dll /machine:I386 /out:"\3DSMAX\STDPLUGS\SMDLEXP.DLE" -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib COMCTL32.LIB /nologo\ - /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)/SMDLEXP.pdb"\ - /machine:I386 /def:".\smdlexp.def" /out:"\3DSMAX\STDPLUGS\SMDLEXP.DLE"\ - /implib:"$(OUTDIR)/SMDLEXP.lib" -DEF_FILE= \ - ".\smdlexp.def" -LINK32_OBJS= \ - "$(INTDIR)\smdlexp.obj" \ - "$(INTDIR)\smdlexp.res" \ - "..\..\..\quiver\src\utils\3dsmax\CORE.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\GEOM.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\MESH.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\UTIL.LIB" - -"..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" "$(OUTDIR)\smdlexp.bsc" - -CLEAN : - -@erase "$(INTDIR)\smdlexp.obj" - -@erase "$(INTDIR)\smdlexp.res" - -@erase "$(INTDIR)\smdlexp.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\smdlexp.bsc" - -@erase "$(OUTDIR)\SMDLEXP.exp" - -@erase "$(OUTDIR)\SMDLEXP.lib" - -@erase "$(OUTDIR)\SMDLEXP.pdb" - -@erase "..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" - -@erase "..\..\..\3DSMAX\STDPLUGS\SMDLEXP.ILK" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "\3DSMAX2.5\MAXSDK\INCLUDE" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /c -CPP_PROJ=/nologo /MD /W3 /Gm /GX /Zi /Od /I "\3DSMAX2.5\MAXSDK\INCLUDE" /D\ - "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/smdlexp.pch"\ - /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /win32 -MTL_PROJ=/nologo /D "_DEBUG" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -RSC_PROJ=/l 0x409 /fo"$(INTDIR)/smdlexp.res" /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/smdlexp.bsc" -BSC32_SBRS= \ - "$(INTDIR)\smdlexp.sbr" - -"$(OUTDIR)\smdlexp.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib COMCTL32.LIB /nologo /subsystem:windows /dll /debug /machine:I386 /out:"\3DSMAX\STDPLUGS\SMDLEXP.DLE" -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib COMCTL32.LIB /nologo\ - /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)/SMDLEXP.pdb" /debug\ - /machine:I386 /def:".\smdlexp.def" /out:"\3DSMAX\STDPLUGS\SMDLEXP.DLE"\ - /implib:"$(OUTDIR)/SMDLEXP.lib" -DEF_FILE= \ - ".\smdlexp.def" -LINK32_OBJS= \ - "$(INTDIR)\smdlexp.obj" \ - "$(INTDIR)\smdlexp.res" \ - "..\..\..\quiver\src\utils\3dsmax\CORE.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\GEOM.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\MESH.LIB" \ - "..\..\..\quiver\src\utils\3dsmax\UTIL.LIB" - -"..\..\..\3DSMAX\STDPLUGS\SMDLEXP.DLE" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "smdlexp - Win32 Release" -# Name "smdlexp - Win32 Debug" - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\smdlexp.cpp -DEP_CPP_SMDLE=\ - ".\smedefs.h"\ - -NODEP_CPP_SMDLE=\ - ".\ANIMTBL.H"\ - ".\DECOMP.H"\ - ".\istdplug.h"\ - ".\MAX.H"\ - ".\STDMAT.H"\ - - -!IF "$(CFG)" == "smdlexp - Win32 Release" - - -"$(INTDIR)\smdlexp.obj" : $(SOURCE) $(DEP_CPP_SMDLE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - - -"$(INTDIR)\smdlexp.obj" : $(SOURCE) $(DEP_CPP_SMDLE) "$(INTDIR)" - -"$(INTDIR)\smdlexp.sbr" : $(SOURCE) $(DEP_CPP_SMDLE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\smdlexp.def - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\smdlexp.rc - -"$(INTDIR)\smdlexp.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\quiver\src\utils\3dsmax\UTIL.LIB - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\quiver\src\utils\3dsmax\GEOM.LIB - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\quiver\src\utils\3dsmax\MESH.LIB - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=\quiver\src\utils\3dsmax\CORE.LIB - -!IF "$(CFG)" == "smdlexp - Win32 Release" - -!ELSEIF "$(CFG)" == "smdlexp - Win32 Debug" - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/sprgen/sprgen.mak b/utils/sprgen/sprgen.mak deleted file mode 100644 index 7c67df2..0000000 --- a/utils/sprgen/sprgen.mak +++ /dev/null @@ -1,335 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=sprgen - Win32 Debug -!MESSAGE No configuration specified. Defaulting to sprgen - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "sprgen - Win32 Release" && "$(CFG)" != "sprgen - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sprgen.mak" CFG="sprgen - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sprgen - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sprgen - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "sprgen - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sprgen - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\sprgen.exe" - -CLEAN : - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\sprgen.obj" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\sprgen.exe" - -@erase "$(OUTDIR)\sprgen.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /Zi /O1 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /Zi /O1 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/sprgen.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/sprgen.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/sprgen.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/sprgen.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\sprgen.obj" - -"$(OUTDIR)\sprgen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\sprgen.exe" "$(OUTDIR)\sprgen.bsc" - -CLEAN : - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\lbmlib.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\sprgen.obj" - -@erase "$(INTDIR)\sprgen.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\sprgen.bsc" - -@erase "$(OUTDIR)\sprgen.exe" - -@erase "$(OUTDIR)\sprgen.ilk" - -@erase "$(OUTDIR)\sprgen.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MLd /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D\ - "_CONSOLE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/sprgen.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/sprgen.bsc" -BSC32_SBRS= \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\lbmlib.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\sprgen.sbr" - -"$(OUTDIR)\sprgen.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/sprgen.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/sprgen.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\sprgen.obj" - -"$(OUTDIR)\sprgen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "sprgen - Win32 Release" -# Name "sprgen - Win32 Debug" - -!IF "$(CFG)" == "sprgen - Win32 Release" - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\sprgen.c -DEP_CPP_SPRGE=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\scriplib.h"\ - ".\spritegn.h"\ - - -!IF "$(CFG)" == "sprgen - Win32 Release" - - -"$(INTDIR)\sprgen.obj" : $(SOURCE) $(DEP_CPP_SPRGE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - - -"$(INTDIR)\sprgen.obj" : $(SOURCE) $(DEP_CPP_SPRGE) "$(INTDIR)" - -"$(INTDIR)\sprgen.sbr" : $(SOURCE) $(DEP_CPP_SPRGE) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -!IF "$(CFG)" == "sprgen - Win32 Release" - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\scriplib.sbr" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\lbmlib.c -DEP_CPP_LBMLI=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - - -!IF "$(CFG)" == "sprgen - Win32 Release" - - -"$(INTDIR)\lbmlib.obj" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\lbmlib.obj" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\lbmlib.sbr" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "sprgen - Win32 Release" - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "sprgen - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\cmdlib.sbr" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/studiomdl/studiomdl.mak b/utils/studiomdl/studiomdl.mak deleted file mode 100644 index a4ce0b2..0000000 --- a/utils/studiomdl/studiomdl.mak +++ /dev/null @@ -1,442 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=studiomdl - Win32 Debug -!MESSAGE No configuration specified. Defaulting to studiomdl - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "studiomdl - Win32 Release" && "$(CFG)" !=\ - "studiomdl - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "studiomdl.mak" CFG="studiomdl - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "studiomdl - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "studiomdl - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "studiomdl - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "studiomdl - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\studiomdl.exe" "$(OUTDIR)\studiomdl.bsc" - -CLEAN : - -@erase "$(INTDIR)\bmpread.obj" - -@erase "$(INTDIR)\bmpread.sbr" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\lbmlib.sbr" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\mathlib.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\studiomdl.obj" - -@erase "$(INTDIR)\studiomdl.sbr" - -@erase "$(INTDIR)\trilib.obj" - -@erase "$(INTDIR)\trilib.sbr" - -@erase "$(INTDIR)\tristrip.obj" - -@erase "$(INTDIR)\tristrip.sbr" - -@erase "$(INTDIR)\write.obj" - -@erase "$(INTDIR)\write.sbr" - -@erase "$(OUTDIR)\studiomdl.bsc" - -@erase "$(OUTDIR)\studiomdl.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/studiomdl.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\Release/ -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/studiomdl.bsc" -BSC32_SBRS= \ - "$(INTDIR)\bmpread.sbr" \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\lbmlib.sbr" \ - "$(INTDIR)\mathlib.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\studiomdl.sbr" \ - "$(INTDIR)\trilib.sbr" \ - "$(INTDIR)\tristrip.sbr" \ - "$(INTDIR)\write.sbr" - -"$(OUTDIR)\studiomdl.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:no /pdb:"$(OUTDIR)/studiomdl.pdb" /machine:I386\ - /out:"$(OUTDIR)/studiomdl.exe" -LINK32_OBJS= \ - "$(INTDIR)\bmpread.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\studiomdl.obj" \ - "$(INTDIR)\trilib.obj" \ - "$(INTDIR)\tristrip.obj" \ - "$(INTDIR)\write.obj" - -"$(OUTDIR)\studiomdl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "studiomdl - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\studiomdl.exe" "$(OUTDIR)\studiomdl.bsc" - -CLEAN : - -@erase "$(INTDIR)\bmpread.obj" - -@erase "$(INTDIR)\bmpread.sbr" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\lbmlib.obj" - -@erase "$(INTDIR)\lbmlib.sbr" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\mathlib.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\studiomdl.obj" - -@erase "$(INTDIR)\studiomdl.sbr" - -@erase "$(INTDIR)\trilib.obj" - -@erase "$(INTDIR)\trilib.sbr" - -@erase "$(INTDIR)\tristrip.obj" - -@erase "$(INTDIR)\tristrip.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\write.obj" - -@erase "$(INTDIR)\write.sbr" - -@erase "$(OUTDIR)\studiomdl.bsc" - -@erase "$(OUTDIR)\studiomdl.exe" - -@erase "$(OUTDIR)\studiomdl.ilk" - -@erase "$(OUTDIR)\studiomdl.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c -CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG"\ - /D "_CONSOLE" /FR"$(INTDIR)/" /Fp"$(INTDIR)/studiomdl.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/studiomdl.bsc" -BSC32_SBRS= \ - "$(INTDIR)\bmpread.sbr" \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\lbmlib.sbr" \ - "$(INTDIR)\mathlib.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\studiomdl.sbr" \ - "$(INTDIR)\trilib.sbr" \ - "$(INTDIR)\tristrip.sbr" \ - "$(INTDIR)\write.sbr" - -"$(OUTDIR)\studiomdl.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ - /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/studiomdl.pdb" /debug\ - /machine:I386 /out:"$(OUTDIR)/studiomdl.exe" -LINK32_OBJS= \ - "$(INTDIR)\bmpread.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\lbmlib.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\studiomdl.obj" \ - "$(INTDIR)\trilib.obj" \ - "$(INTDIR)\tristrip.obj" \ - "$(INTDIR)\write.obj" - -"$(OUTDIR)\studiomdl.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "studiomdl - Win32 Release" -# Name "studiomdl - Win32 Debug" - -!IF "$(CFG)" == "studiomdl - Win32 Release" - -!ELSEIF "$(CFG)" == "studiomdl - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\studiomdl.c -DEP_CPP_STUDI=\ - "..\..\dlls\activity.h"\ - "..\..\dlls\activitymap.h"\ - "..\..\engine\studio.h"\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - ".\studiomdl.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -"$(INTDIR)\studiomdl.obj" : $(SOURCE) $(DEP_CPP_STUDI) "$(INTDIR)" - -"$(INTDIR)\studiomdl.sbr" : $(SOURCE) $(DEP_CPP_STUDI) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\bmpread.c - -"$(INTDIR)\bmpread.obj" : $(SOURCE) "$(INTDIR)" - -"$(INTDIR)\bmpread.sbr" : $(SOURCE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\write.c -DEP_CPP_WRITE=\ - "..\..\engine\studio.h"\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - ".\studiomdl.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -"$(INTDIR)\write.obj" : $(SOURCE) $(DEP_CPP_WRITE) "$(INTDIR)" - -"$(INTDIR)\write.sbr" : $(SOURCE) $(DEP_CPP_WRITE) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\tristrip.c -DEP_CPP_TRIST=\ - "..\..\engine\studio.h"\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - ".\studiomdl.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -"$(INTDIR)\tristrip.obj" : $(SOURCE) $(DEP_CPP_TRIST) "$(INTDIR)" - -"$(INTDIR)\tristrip.sbr" : $(SOURCE) $(DEP_CPP_TRIST) "$(INTDIR)" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\mathlib.c -DEP_CPP_MATHL=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\mathlib.sbr" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\cmdlib.sbr" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\lbmlib.c -DEP_CPP_LBMLI=\ - "..\common\cmdlib.h"\ - "..\common\lbmlib.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\lbmlib.obj" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\lbmlib.sbr" : $(SOURCE) $(DEP_CPP_LBMLI) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\scriplib.sbr" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\trilib.c -DEP_CPP_TRILI=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\trilib.h"\ - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\trilib.obj" : $(SOURCE) $(DEP_CPP_TRILI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\trilib.sbr" : $(SOURCE) $(DEP_CPP_TRILI) "$(INTDIR)" - $(BuildCmds) - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/utils/visx2/vis.mak b/utils/visx2/vis.mak deleted file mode 100644 index a68e7db..0000000 --- a/utils/visx2/vis.mak +++ /dev/null @@ -1,493 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=vis - Win32 Debug -!MESSAGE No configuration specified. Defaulting to vis - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "vis - Win32 Release" && "$(CFG)" != "vis - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "vis.mak" CFG="vis - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "vis - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "vis - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "vis - Win32 Debug" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "vis - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\vis.exe" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\flow.obj" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\soundpvs.obj" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\vis.obj" - -@erase "$(OUTDIR)\vis.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# SUBTRACT CPP /Fr -CPP_PROJ=/nologo /MT /GX /O2 /I "..\common" /D "WIN32" /D "NDEBUG" /D\ - "_CONSOLE" /Fp"$(INTDIR)/vis.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/vis.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/vis.pdb" /machine:I386 /out:"$(OUTDIR)/vis.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\flow.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\soundpvs.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\vis.obj" - -"$(OUTDIR)\vis.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -OUTDIR=.\Debug -INTDIR=.\Debug - -ALL : "$(OUTDIR)\vis.exe" "$(OUTDIR)\vis.bsc" - -CLEAN : - -@erase "$(INTDIR)\bspfile.obj" - -@erase "$(INTDIR)\bspfile.sbr" - -@erase "$(INTDIR)\cmdlib.obj" - -@erase "$(INTDIR)\cmdlib.sbr" - -@erase "$(INTDIR)\flow.obj" - -@erase "$(INTDIR)\flow.sbr" - -@erase "$(INTDIR)\mathlib.obj" - -@erase "$(INTDIR)\mathlib.sbr" - -@erase "$(INTDIR)\scriplib.obj" - -@erase "$(INTDIR)\scriplib.sbr" - -@erase "$(INTDIR)\soundpvs.obj" - -@erase "$(INTDIR)\soundpvs.sbr" - -@erase "$(INTDIR)\threads.obj" - -@erase "$(INTDIR)\threads.sbr" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(INTDIR)\vis.obj" - -@erase "$(INTDIR)\vis.sbr" - -@erase "$(OUTDIR)\vis.bsc" - -@erase "$(OUTDIR)\vis.exe" - -@erase "$(OUTDIR)\vis.ilk" - -@erase "$(OUTDIR)\vis.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /Fr /YX /c -CPP_PROJ=/nologo /MT /Gm /GX /Zi /Od /I "..\common" /D "WIN32" /D "_DEBUG" /D\ - "_CONSOLE" /Fr"$(INTDIR)/" /Fp"$(INTDIR)/vis.pch" /YX /Fo"$(INTDIR)/"\ - /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\Debug/ -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/vis.bsc" -BSC32_SBRS= \ - "$(INTDIR)\bspfile.sbr" \ - "$(INTDIR)\cmdlib.sbr" \ - "$(INTDIR)\flow.sbr" \ - "$(INTDIR)\mathlib.sbr" \ - "$(INTDIR)\scriplib.sbr" \ - "$(INTDIR)\soundpvs.sbr" \ - "$(INTDIR)\threads.sbr" \ - "$(INTDIR)\vis.sbr" - -"$(OUTDIR)\vis.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/vis.pdb" /debug /machine:I386 /out:"$(OUTDIR)/vis.exe" -LINK32_OBJS= \ - "$(INTDIR)\bspfile.obj" \ - "$(INTDIR)\cmdlib.obj" \ - "$(INTDIR)\flow.obj" \ - "$(INTDIR)\mathlib.obj" \ - "$(INTDIR)\scriplib.obj" \ - "$(INTDIR)\soundpvs.obj" \ - "$(INTDIR)\threads.obj" \ - "$(INTDIR)\vis.obj" - -"$(OUTDIR)\vis.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "vis - Win32 Release" -# Name "vis - Win32 Debug" - -!IF "$(CFG)" == "vis - Win32 Release" - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\vis.c -DEP_CPP_VIS_C=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\threads.h"\ - ".\vis.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\vis.obj" : $(SOURCE) $(DEP_CPP_VIS_C) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -"$(INTDIR)\vis.obj" : $(SOURCE) $(DEP_CPP_VIS_C) "$(INTDIR)" - -"$(INTDIR)\vis.sbr" : $(SOURCE) $(DEP_CPP_VIS_C) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\soundpvs.c -DEP_CPP_SOUND=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - ".\vis.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\soundpvs.obj" : $(SOURCE) $(DEP_CPP_SOUND) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -"$(INTDIR)\soundpvs.obj" : $(SOURCE) $(DEP_CPP_SOUND) "$(INTDIR)" - -"$(INTDIR)\soundpvs.sbr" : $(SOURCE) $(DEP_CPP_SOUND) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\flow.c -DEP_CPP_FLOW_=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - ".\vis.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\flow.obj" : $(SOURCE) $(DEP_CPP_FLOW_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -"$(INTDIR)\flow.obj" : $(SOURCE) $(DEP_CPP_FLOW_) "$(INTDIR)" - -"$(INTDIR)\flow.sbr" : $(SOURCE) $(DEP_CPP_FLOW_) "$(INTDIR)" - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\vis.h - -!IF "$(CFG)" == "vis - Win32 Release" - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\threads.c -DEP_CPP_THREA=\ - "..\common\cmdlib.h"\ - "..\common\threads.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\threads.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\threads.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\threads.sbr" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\cmdlib.c -DEP_CPP_CMDLI=\ - "..\common\cmdlib.h"\ - {$(INCLUDE)}"\sys\STAT.H"\ - {$(INCLUDE)}"\sys\TYPES.H"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\cmdlib.obj" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\cmdlib.sbr" : $(SOURCE) $(DEP_CPP_CMDLI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\mathlib.c -DEP_CPP_MATHL=\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\mathlib.obj" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\mathlib.sbr" : $(SOURCE) $(DEP_CPP_MATHL) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\scriplib.c -DEP_CPP_SCRIP=\ - "..\common\cmdlib.h"\ - "..\common\scriplib.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\scriplib.obj" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\scriplib.sbr" : $(SOURCE) $(DEP_CPP_SCRIP) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=..\common\bspfile.c -DEP_CPP_BSPFI=\ - "..\common\bspfile.h"\ - "..\common\cmdlib.h"\ - "..\common\mathlib.h"\ - "..\common\scriplib.h"\ - - -!IF "$(CFG)" == "vis - Win32 Release" - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "vis - Win32 Debug" - - -BuildCmds= \ - $(CPP) $(CPP_PROJ) $(SOURCE) \ - - -"$(INTDIR)\bspfile.obj" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(BuildCmds) - -"$(INTDIR)\bspfile.sbr" : $(SOURCE) $(DEP_CPP_BSPFI) "$(INTDIR)" - $(BuildCmds) - -!ENDIF - -# End Source File -# End Target -# End Project -################################################################################