mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Merge pull request #216 from DanielGibson/rb_astyle_2.05.1_upd
Update AStyle to 2.05.1, use it to format code
This commit is contained in:
commit
b9687575df
23 changed files with 439 additions and 408 deletions
|
@ -1,8 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO make sure that the astyle version is >= 2.03 or quit
|
||||
# keep the following in sync with our supplied astyle binaries!
|
||||
OUR_ASTYLE_VERSION="2.05.1"
|
||||
|
||||
astyle -v --formatted --options=astyle-options.ini --exclude="libs" --recursive *.h
|
||||
astyle -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive *.cpp
|
||||
print_usage () {
|
||||
echo "By default, this script only works on Linux i686 or amd64 (with our supplied astyle binaries)"
|
||||
echo "You can use your own astyle binary by setting the ASTYLE_BIN environment variable before calling this script"
|
||||
echo " e.g.: ASTYLE_BIN=/usr/bin/astyle $0"
|
||||
echo "But please make sure it's version $OUR_ASTYLE_VERSION because other versions may format differently!"
|
||||
}
|
||||
|
||||
#pause
|
||||
if [ -z "$ASTYLE_BIN" ]; then
|
||||
|
||||
if [ `uname -s` != "Linux" ]; then
|
||||
print_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "`uname -m`" in
|
||||
i?86 | x86 ) ASTYLE_SUFFIX="x86" ;;
|
||||
amd64 | x86_64 ) ASTYLE_SUFFIX="x86_64" ;;
|
||||
* ) print_usage ; exit 1 ;;
|
||||
esac
|
||||
|
||||
ASTYLE_BIN="./astyle.$ASTYLE_SUFFIX"
|
||||
fi
|
||||
|
||||
ASTYLE_VERSION=$($ASTYLE_BIN --version | grep -o -e "[[:digit:]\.]*")
|
||||
|
||||
if [ "$ASTYLE_VERSION" != "$OUR_ASTYLE_VERSION" ]; then
|
||||
echo "ERROR: $ASTYLE_BIN has version $ASTYLE_VERSION, but we want $OUR_ASTYLE_VERSION"
|
||||
echo " (Unfortunately, different versions of astyle produce slightly different formatting.)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --recursive "*.h"
|
||||
$ASTYLE_BIN -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" \
|
||||
--exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive "*.cpp"
|
||||
|
|
BIN
neo/astyle.exe
BIN
neo/astyle.exe
Binary file not shown.
BIN
neo/astyle.x86
Executable file
BIN
neo/astyle.x86
Executable file
Binary file not shown.
BIN
neo/astyle.x86_64
Executable file
BIN
neo/astyle.x86_64
Executable file
Binary file not shown.
|
@ -772,9 +772,9 @@ void idPush::ClipEntityRotation( trace_t& trace, const idEntity* ent, const idCl
|
|||
{
|
||||
skip->Disable();
|
||||
}
|
||||
|
||||
|
||||
ent->GetPhysics()->ClipRotation( trace, rotation, clipModel );
|
||||
|
||||
|
||||
if( skip )
|
||||
{
|
||||
skip->Enable();
|
||||
|
@ -793,9 +793,9 @@ void idPush::ClipEntityTranslation( trace_t& trace, const idEntity* ent, const i
|
|||
{
|
||||
skip->Disable();
|
||||
}
|
||||
|
||||
|
||||
ent->GetPhysics()->ClipTranslation( trace, translation, clipModel );
|
||||
|
||||
|
||||
if( skip )
|
||||
{
|
||||
skip->Enable();
|
||||
|
@ -819,9 +819,9 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
idRotation newRotation;
|
||||
float checkAngle;
|
||||
idPhysics* physics;
|
||||
|
||||
|
||||
physics = check->GetPhysics();
|
||||
|
||||
|
||||
#ifdef ROTATIONAL_PUSH_DEBUG
|
||||
bool startsolid = false;
|
||||
if( physics->ClipContents( clipModel ) )
|
||||
|
@ -829,12 +829,12 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
startsolid = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
results.fraction = 1.0f;
|
||||
results.endpos = clipModel->GetOrigin();
|
||||
results.endAxis = newAxis;
|
||||
memset( &results.c, 0, sizeof( results.c ) );
|
||||
|
||||
|
||||
// always pushed when standing on the pusher
|
||||
if( physics->IsGroundClipModel( clipModel->GetEntity()->entityNumber, clipModel->GetId() ) )
|
||||
{
|
||||
|
@ -852,12 +852,12 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
// if there is a collision
|
||||
if( results.fraction < 1.0f )
|
||||
{
|
||||
|
||||
|
||||
// FIXME: try to push the blocking entity as well or try to slide along collision plane(s)?
|
||||
|
||||
|
||||
results.c.normal = -results.c.normal;
|
||||
results.c.dist = -results.c.dist;
|
||||
|
||||
|
||||
// the entity will be crushed between the pusher and some other entity
|
||||
return PUSH_BLOCKED;
|
||||
}
|
||||
|
@ -903,32 +903,32 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
// if there is a collision
|
||||
if( trace.fraction < 1.0f )
|
||||
{
|
||||
|
||||
|
||||
// FIXME: try to push the blocking entity as well or try to slide along collision plane(s)?
|
||||
|
||||
|
||||
results.c.normal = -results.c.normal;
|
||||
results.c.dist = -results.c.dist;
|
||||
|
||||
|
||||
// the entity will be crushed between the pusher and some other entity
|
||||
return PUSH_BLOCKED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveEntityPosition( check );
|
||||
|
||||
|
||||
newRotation.Set( rotation.GetOrigin(), rotation.GetVec(), checkAngle );
|
||||
// NOTE: this code prevents msvc 6.0 & 7.0 from screwing up the above code in
|
||||
// release builds moving less floats than it should
|
||||
static float shit = checkAngle;
|
||||
|
||||
|
||||
newRotation.RotatePoint( rotationPoint );
|
||||
|
||||
|
||||
// rotate the entity
|
||||
physics->Rotate( newRotation );
|
||||
|
||||
|
||||
// set pusher into final position
|
||||
clipModel->Link( gameLocal.clip, clipModel->GetEntity(), clipModel->GetId(), clipModel->GetOrigin(), newAxis );
|
||||
|
||||
|
||||
#ifdef ROTATIONAL_PUSH_DEBUG
|
||||
if( physics->ClipContents( clipModel ) )
|
||||
{
|
||||
|
@ -938,11 +938,11 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// if the entity uses actor physics
|
||||
if( physics->IsType( idPhysics_Actor::Type ) )
|
||||
{
|
||||
|
||||
|
||||
// rotate the collision model back to axial
|
||||
if( !RotateEntityToAxial( check, rotationPoint ) )
|
||||
{
|
||||
|
@ -950,7 +950,7 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
return PUSH_BLOCKED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef ROTATIONAL_PUSH_DEBUG
|
||||
if( physics->ClipContents( clipModel ) )
|
||||
{
|
||||
|
@ -960,11 +960,11 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// if the entity is an actor using actor physics
|
||||
if( check->IsType( idActor::Type ) && physics->IsType( idPhysics_Actor::Type ) )
|
||||
{
|
||||
|
||||
|
||||
// if the entity is standing ontop of the pusher
|
||||
if( physics->IsGroundClipModel( clipModel->GetEntity()->entityNumber, clipModel->GetId() ) )
|
||||
{
|
||||
|
@ -975,7 +975,7 @@ int idPush::TryRotatePushEntity( trace_t& results, idEntity* check, idClipModel*
|
|||
actor->SetDeltaViewAngles( delta );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return PUSH_OK;
|
||||
}
|
||||
|
||||
|
@ -995,9 +995,9 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
idVec3 checkMove;
|
||||
idVec3 oldOrigin;
|
||||
idPhysics* physics;
|
||||
|
||||
|
||||
physics = check->GetPhysics();
|
||||
|
||||
|
||||
#ifdef TRANSLATIONAL_PUSH_DEBUG
|
||||
bool startsolid = false;
|
||||
if( physics->ClipContents( clipModel ) )
|
||||
|
@ -1005,12 +1005,12 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
startsolid = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
results.fraction = 1.0f;
|
||||
results.endpos = newOrigin;
|
||||
results.endAxis = clipModel->GetAxis();
|
||||
memset( &results.c, 0, sizeof( results.c ) );
|
||||
|
||||
|
||||
// always pushed when standing on the pusher
|
||||
if( physics->IsGroundClipModel( clipModel->GetEntity()->entityNumber, clipModel->GetId() ) )
|
||||
{
|
||||
|
@ -1026,12 +1026,12 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
// if there is a collision
|
||||
if( results.fraction < 1.0f )
|
||||
{
|
||||
|
||||
|
||||
// FIXME: try to push the blocking entity as well or try to slide along collision plane(s)?
|
||||
|
||||
|
||||
results.c.normal = -results.c.normal;
|
||||
results.c.dist = -results.c.dist;
|
||||
|
||||
|
||||
// the entity will be crushed between the pusher and some other entity
|
||||
return PUSH_BLOCKED;
|
||||
}
|
||||
|
@ -1058,41 +1058,41 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
// if there is a collisions
|
||||
if( trace.fraction < 1.0f )
|
||||
{
|
||||
|
||||
|
||||
results.c.normal = -results.c.normal;
|
||||
results.c.dist = -results.c.dist;
|
||||
|
||||
|
||||
// FIXME: try to push the blocking entity as well ?
|
||||
// FIXME: handle sliding along more than one collision plane ?
|
||||
// FIXME: this code has issues, player pushing box into corner in "maps/mre/aaron/test.map"
|
||||
|
||||
|
||||
/*
|
||||
oldOrigin = physics->GetOrigin();
|
||||
|
||||
|
||||
// movement still remaining
|
||||
checkMove *= (1.0f - trace.fraction);
|
||||
|
||||
|
||||
// project the movement along the collision plane
|
||||
if ( !checkMove.ProjectAlongPlane( trace.c.normal, 0.1f, 1.001f ) ) {
|
||||
return PUSH_BLOCKED;
|
||||
}
|
||||
checkMove *= 1.001f;
|
||||
|
||||
|
||||
// move entity from collision point along the collision plane
|
||||
physics->SetOrigin( trace.endpos );
|
||||
ClipEntityTranslation( trace, check, NULL, NULL, checkMove );
|
||||
|
||||
|
||||
if ( trace.fraction < 1.0f ) {
|
||||
physics->SetOrigin( oldOrigin );
|
||||
return PUSH_BLOCKED;
|
||||
}
|
||||
|
||||
|
||||
checkMove = trace.endpos - oldOrigin;
|
||||
|
||||
|
||||
// move entity in reverse only colliding with pusher
|
||||
physics->SetOrigin( trace.endpos );
|
||||
ClipEntityTranslation( trace, check, clipModel, NULL, -move );
|
||||
|
||||
|
||||
physics->SetOrigin( oldOrigin );
|
||||
*/
|
||||
if( trace.fraction < 1.0f )
|
||||
|
@ -1101,12 +1101,12 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveEntityPosition( check );
|
||||
|
||||
|
||||
// translate the entity
|
||||
physics->Translate( checkMove );
|
||||
|
||||
|
||||
#ifdef TRANSLATIONAL_PUSH_DEBUG
|
||||
// set the pusher in the translated position
|
||||
clipModel->Link( gameLocal.clip, clipModel->GetEntity(), clipModel->GetId(), newOrigin, clipModel->GetAxis() );
|
||||
|
@ -1118,7 +1118,7 @@ int idPush::TryTranslatePushEntity( trace_t& results, idEntity* check, idClipMod
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return PUSH_OK;
|
||||
}
|
||||
|
||||
|
@ -1131,36 +1131,36 @@ int idPush::DiscardEntities( idEntity* entityList[], int numEntities, int flags,
|
|||
{
|
||||
int i, num;
|
||||
idEntity* check;
|
||||
|
||||
|
||||
// remove all entities we cannot or should not push from the list
|
||||
for( num = i = 0; i < numEntities; i++ )
|
||||
{
|
||||
check = entityList[ i ];
|
||||
|
||||
|
||||
// if the physics object is not pushable
|
||||
if( !check->GetPhysics()->IsPushable() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if the entity doesn't clip with this pusher
|
||||
if( !( check->GetPhysics()->GetClipMask() & pusher->GetPhysics()->GetContents() ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// don't push players in noclip mode
|
||||
if( check->IsType( idPlayer::Type ) && static_cast<idPlayer*>( check )->noclip )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if we should only push idMoveable entities
|
||||
if( ( flags & PUSHFL_ONLYMOVEABLE ) && !check->IsType( idMoveable::Type ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if we shouldn't push entities the clip model rests upon
|
||||
if( flags & PUSHFL_NOGROUNDENTITIES )
|
||||
{
|
||||
|
@ -1169,11 +1169,11 @@ int idPush::DiscardEntities( idEntity* entityList[], int numEntities, int flags,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// keep entity in list
|
||||
entityList[ num++ ] = entityList[i];
|
||||
}
|
||||
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
|
@ -1195,26 +1195,26 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
bool wasEnabled;
|
||||
float totalMass;
|
||||
idClipModel* clipModel;
|
||||
|
||||
|
||||
clipModel = pusher->GetPhysics()->GetClipModel();
|
||||
|
||||
|
||||
totalMass = 0.0f;
|
||||
|
||||
|
||||
results.fraction = 1.0f;
|
||||
results.endpos = newOrigin;
|
||||
results.endAxis = clipModel->GetAxis();
|
||||
memset( &results.c, 0, sizeof( results.c ) );
|
||||
|
||||
|
||||
if( translation == vec3_origin )
|
||||
{
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
dir = translation;
|
||||
dir.Normalize();
|
||||
dir.z += 1.0f;
|
||||
dir *= 10.0f;
|
||||
|
||||
|
||||
// get bounds for the whole movement
|
||||
bounds = clipModel->GetBounds();
|
||||
if( bounds[0].x >= bounds[1].x )
|
||||
|
@ -1222,37 +1222,37 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
return totalMass;
|
||||
}
|
||||
pushBounds.FromBoundsTranslation( bounds, clipModel->GetOrigin(), clipModel->GetAxis(), translation );
|
||||
|
||||
|
||||
wasEnabled = clipModel->IsEnabled();
|
||||
|
||||
|
||||
// make sure we don't get the pushing clip model in the list
|
||||
clipModel->Disable();
|
||||
|
||||
|
||||
listedEntities = gameLocal.clip.EntitiesTouchingBounds( pushBounds, -1, entityList, MAX_GENTITIES );
|
||||
|
||||
|
||||
// discard entities we cannot or should not push
|
||||
listedEntities = DiscardEntities( entityList, listedEntities, flags, pusher );
|
||||
|
||||
|
||||
if( flags & PUSHFL_CLIP )
|
||||
{
|
||||
|
||||
|
||||
// can only clip movement of a trace model
|
||||
assert( clipModel->IsTraceModel() );
|
||||
|
||||
|
||||
// disable to be pushed entities for collision detection
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
entityList[i]->GetPhysics()->DisableClip();
|
||||
}
|
||||
|
||||
|
||||
gameLocal.clip.Translation( results, clipModel->GetOrigin(), clipModel->GetOrigin() + translation, clipModel, clipModel->GetAxis(), pusher->GetPhysics()->GetClipMask(), NULL );
|
||||
|
||||
|
||||
// enable to be pushed entities for collision detection
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
entityList[i]->GetPhysics()->EnableClip();
|
||||
}
|
||||
|
||||
|
||||
if( results.fraction == 0.0f )
|
||||
{
|
||||
if( wasEnabled )
|
||||
|
@ -1261,40 +1261,40 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
}
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
clipMove = results.endpos - clipModel->GetOrigin();
|
||||
clipOrigin = results.endpos;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
clipMove = translation;
|
||||
clipOrigin = newOrigin;
|
||||
}
|
||||
|
||||
|
||||
// we have to enable the clip model because we use it during pushing
|
||||
clipModel->Enable();
|
||||
|
||||
|
||||
// save pusher old position
|
||||
oldOrigin = clipModel->GetOrigin();
|
||||
|
||||
|
||||
// try to push the entities
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
|
||||
|
||||
check = entityList[ i ];
|
||||
|
||||
|
||||
idPhysics* physics = check->GetPhysics();
|
||||
|
||||
|
||||
// disable the entity for collision detection
|
||||
physics->DisableClip();
|
||||
|
||||
|
||||
res = TryTranslatePushEntity( pushResults, check, clipModel, flags, clipOrigin, clipMove );
|
||||
|
||||
|
||||
// enable the entity for collision detection
|
||||
physics->EnableClip();
|
||||
|
||||
|
||||
// if the entity is pushed
|
||||
if( res == PUSH_OK )
|
||||
{
|
||||
|
@ -1304,7 +1304,7 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
physics->EvaluateContacts();
|
||||
// put pusher back in old position
|
||||
clipModel->Link( gameLocal.clip, clipModel->GetEntity(), clipModel->GetId(), oldOrigin, clipModel->GetAxis() );
|
||||
|
||||
|
||||
// wake up this object
|
||||
if( flags & PUSHFL_APPLYIMPULSE )
|
||||
{
|
||||
|
@ -1315,31 +1315,31 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
impulse.Zero();
|
||||
}
|
||||
check->ApplyImpulse( clipModel->GetEntity(), clipModel->GetId(), clipModel->GetOrigin(), impulse );
|
||||
|
||||
|
||||
// add mass of pushed entity
|
||||
totalMass += physics->GetMass();
|
||||
}
|
||||
|
||||
|
||||
// if the entity is not blocking
|
||||
if( res != PUSH_BLOCKED )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if the blocking entity is a projectile
|
||||
if( check->IsType( idProjectile::Type ) )
|
||||
{
|
||||
check->ProcessEvent( &EV_Explode );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if blocking entities should be crushed
|
||||
if( flags & PUSHFL_CRUSH )
|
||||
{
|
||||
check->Damage( clipModel->GetEntity(), clipModel->GetEntity(), vec3_origin, "damage_crush", 1.0f, CLIPMODEL_ID_TO_JOINT_HANDLE( pushResults.c.id ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if the entity is an active articulated figure and gibs
|
||||
if( check->IsType( idAFEntity_Base::Type ) && check->spawnArgs.GetBool( "gib" ) )
|
||||
{
|
||||
|
@ -1348,13 +1348,13 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
check->ProcessEvent( &EV_Gib, "damage_Gib" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if the entity is a moveable item and gibs
|
||||
if( check->IsType( idMoveableItem::Type ) && check->spawnArgs.GetBool( "gib" ) )
|
||||
{
|
||||
check->ProcessEvent( &EV_Gib, "damage_Gib" );
|
||||
}
|
||||
|
||||
|
||||
// blocked
|
||||
results = pushResults;
|
||||
results.fraction = 0.0f;
|
||||
|
@ -1362,20 +1362,20 @@ float idPush::ClipTranslationalPush( trace_t& results, idEntity* pusher, const i
|
|||
results.endpos = clipModel->GetOrigin();
|
||||
results.c.entityNum = check->entityNumber;
|
||||
results.c.id = 0;
|
||||
|
||||
|
||||
if( !wasEnabled )
|
||||
{
|
||||
clipModel->Disable();
|
||||
}
|
||||
|
||||
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
if( !wasEnabled )
|
||||
{
|
||||
clipModel->Disable();
|
||||
}
|
||||
|
||||
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
@ -1398,21 +1398,21 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
bool wasEnabled;
|
||||
float totalMass;
|
||||
idClipModel* clipModel;
|
||||
|
||||
|
||||
clipModel = pusher->GetPhysics()->GetClipModel();
|
||||
|
||||
|
||||
totalMass = 0.0f;
|
||||
|
||||
|
||||
results.fraction = 1.0f;
|
||||
results.endpos = clipModel->GetOrigin();
|
||||
results.endAxis = newAxis;
|
||||
memset( &results.c, 0, sizeof( results.c ) );
|
||||
|
||||
|
||||
if( !rotation.GetAngle() )
|
||||
{
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
// get bounds for the whole movement
|
||||
bounds = clipModel->GetBounds();
|
||||
if( bounds[0].x >= bounds[1].x )
|
||||
|
@ -1420,37 +1420,37 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
return totalMass;
|
||||
}
|
||||
pushBounds.FromBoundsRotation( bounds, clipModel->GetOrigin(), clipModel->GetAxis(), rotation );
|
||||
|
||||
|
||||
wasEnabled = clipModel->IsEnabled();
|
||||
|
||||
|
||||
// make sure we don't get the pushing clip model in the list
|
||||
clipModel->Disable();
|
||||
|
||||
|
||||
listedEntities = gameLocal.clip.EntitiesTouchingBounds( pushBounds, -1, entityList, MAX_GENTITIES );
|
||||
|
||||
|
||||
// discard entities we cannot or should not push
|
||||
listedEntities = DiscardEntities( entityList, listedEntities, flags, pusher );
|
||||
|
||||
|
||||
if( flags & PUSHFL_CLIP )
|
||||
{
|
||||
|
||||
|
||||
// can only clip movement of a trace model
|
||||
assert( clipModel->IsTraceModel() );
|
||||
|
||||
|
||||
// disable to be pushed entities for collision detection
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
entityList[i]->GetPhysics()->DisableClip();
|
||||
}
|
||||
|
||||
|
||||
gameLocal.clip.Rotation( results, clipModel->GetOrigin(), rotation, clipModel, clipModel->GetAxis(), pusher->GetPhysics()->GetClipMask(), NULL );
|
||||
|
||||
|
||||
// enable to be pushed entities for collision detection
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
entityList[i]->GetPhysics()->EnableClip();
|
||||
}
|
||||
|
||||
|
||||
if( results.fraction == 0.0f )
|
||||
{
|
||||
if( wasEnabled )
|
||||
|
@ -1459,39 +1459,39 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
}
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
clipRotation = rotation * results.fraction;
|
||||
clipAxis = results.endAxis;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
clipRotation = rotation;
|
||||
clipAxis = newAxis;
|
||||
}
|
||||
|
||||
|
||||
// we have to enable the clip model because we use it during pushing
|
||||
clipModel->Enable();
|
||||
|
||||
|
||||
// save pusher old position
|
||||
oldAxis = clipModel->GetAxis();
|
||||
|
||||
|
||||
// try to push all the entities
|
||||
for( i = 0; i < listedEntities; i++ )
|
||||
{
|
||||
|
||||
|
||||
check = entityList[ i ];
|
||||
|
||||
|
||||
idPhysics* physics = check->GetPhysics();
|
||||
|
||||
|
||||
// disable the entity for collision detection
|
||||
physics->DisableClip();
|
||||
|
||||
|
||||
res = TryRotatePushEntity( pushResults, check, clipModel, flags, clipAxis, clipRotation );
|
||||
|
||||
|
||||
// enable the entity for collision detection
|
||||
physics->EnableClip();
|
||||
|
||||
|
||||
// if the entity is pushed
|
||||
if( res == PUSH_OK )
|
||||
{
|
||||
|
@ -1501,34 +1501,34 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
physics->EvaluateContacts();
|
||||
// put pusher back in old position
|
||||
clipModel->Link( gameLocal.clip, clipModel->GetEntity(), clipModel->GetId(), clipModel->GetOrigin(), oldAxis );
|
||||
|
||||
|
||||
// wake up this object
|
||||
check->ApplyImpulse( clipModel->GetEntity(), clipModel->GetId(), clipModel->GetOrigin(), vec3_origin );
|
||||
|
||||
|
||||
// add mass of pushed entity
|
||||
totalMass += physics->GetMass();
|
||||
}
|
||||
|
||||
|
||||
// if the entity is not blocking
|
||||
if( res != PUSH_BLOCKED )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if the blocking entity is a projectile
|
||||
if( check->IsType( idProjectile::Type ) )
|
||||
{
|
||||
check->ProcessEvent( &EV_Explode );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if blocking entities should be crushed
|
||||
if( flags & PUSHFL_CRUSH )
|
||||
{
|
||||
check->Damage( clipModel->GetEntity(), clipModel->GetEntity(), vec3_origin, "damage_crush", 1.0f, CLIPMODEL_ID_TO_JOINT_HANDLE( pushResults.c.id ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// if the entity is an active articulated figure and gibs
|
||||
if( check->IsType( idAFEntity_Base::Type ) && check->spawnArgs.GetBool( "gib" ) )
|
||||
{
|
||||
|
@ -1537,7 +1537,7 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
check->ProcessEvent( &EV_Gib, "damage_Gib" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// blocked
|
||||
results = pushResults;
|
||||
results.fraction = 0.0f;
|
||||
|
@ -1545,20 +1545,20 @@ float idPush::ClipRotationalPush( trace_t& results, idEntity* pusher, const int
|
|||
results.endpos = clipModel->GetOrigin();
|
||||
results.c.entityNum = check->entityNumber;
|
||||
results.c.id = 0;
|
||||
|
||||
|
||||
if( !wasEnabled )
|
||||
{
|
||||
clipModel->Disable();
|
||||
}
|
||||
|
||||
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
||||
if( !wasEnabled )
|
||||
{
|
||||
clipModel->Disable();
|
||||
}
|
||||
|
||||
|
||||
return totalMass;
|
||||
}
|
||||
|
||||
|
|
|
@ -528,7 +528,7 @@ private:
|
|||
static const int DOOMCLASSIC_RENDERWIDTH = 320 * 3;
|
||||
static const int DOOMCLASSIC_RENDERHEIGHT = 200 * 3;
|
||||
static const int DOOMCLASSIC_BYTES_PER_PIXEL = 4;
|
||||
static const int DOOMCLASSIC_IMAGE_SIZE_IN_BYTES = DOOMCLASSIC_RENDERWIDTH* DOOMCLASSIC_RENDERHEIGHT* DOOMCLASSIC_BYTES_PER_PIXEL;
|
||||
static const int DOOMCLASSIC_IMAGE_SIZE_IN_BYTES = DOOMCLASSIC_RENDERWIDTH * DOOMCLASSIC_RENDERHEIGHT * DOOMCLASSIC_BYTES_PER_PIXEL;
|
||||
|
||||
idArray< byte, DOOMCLASSIC_IMAGE_SIZE_IN_BYTES > doomClassicImageData;
|
||||
#endif
|
||||
|
|
|
@ -214,7 +214,7 @@ keyname_t keynames[] =
|
|||
NAMEKEY2( MOUSE15 ),
|
||||
NAMEKEY2( MOUSE16 ),
|
||||
// DG end
|
||||
|
||||
|
||||
NAMEKEY( MWHEELDOWN, "#str_07132" ),
|
||||
NAMEKEY( MWHEELUP, "#str_07131" ),
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
} \
|
||||
} \
|
||||
} \
|
||||
|
||||
|
||||
#define SERIALIZE_VECX( ser, var ) \
|
||||
{ \
|
||||
int size = var.GetSize(); \
|
||||
|
@ -61,14 +61,14 @@ If you have questions concerning this license or the applicable additional terms
|
|||
ser.Serialize( var[x] ); \
|
||||
} \
|
||||
} \
|
||||
|
||||
|
||||
#define SERIALIZE_JOINT( ser, var ) \
|
||||
{ \
|
||||
uint16 jointIndex = ( var == NULL_JOINT_INDEX ) ? 65535 : var; \
|
||||
ser.Serialize( jointIndex ); \
|
||||
var = ( jointIndex == 65535 ) ? NULL_JOINT_INDEX : (jointIndex_t)jointIndex; \
|
||||
} \
|
||||
|
||||
|
||||
//#define ENABLE_SERIALIZE_CHECKPOINTS
|
||||
//#define SERIALIZE_SANITYCHECK
|
||||
//#define SERIALIZE_NO_QUANT
|
||||
|
|
|
@ -861,9 +861,9 @@ Draws axis and threshold / range rings into an RGBA image
|
|||
void DrawJoypadTexture(
|
||||
const int size,
|
||||
byte image[],
|
||||
|
||||
|
||||
const idVec2 raw,
|
||||
|
||||
|
||||
const float threshold,
|
||||
const float range,
|
||||
const transferFunction_t shape,
|
||||
|
@ -1360,7 +1360,7 @@ void idUsercmdGenLocal::Mouse()
|
|||
case M_ACTION6:
|
||||
case M_ACTION7:
|
||||
case M_ACTION8:
|
||||
|
||||
|
||||
// DG: support some more mouse buttons
|
||||
case M_ACTION9:
|
||||
case M_ACTION10:
|
||||
|
|
|
@ -46,8 +46,8 @@ public:
|
|||
|
||||
idHashNodeT( const _key_ & key, const _value_ & value, idHashNodeT* next )
|
||||
: key( key ),
|
||||
value( value ),
|
||||
next( next )
|
||||
value( value ),
|
||||
next( next )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -88,8 +88,8 @@ class idHashNodeT< idStr, _value_ >
|
|||
public:
|
||||
idHashNodeT( const idStr& key, const _value_ & value, idHashNodeT* next )
|
||||
: key( key ),
|
||||
value( value ),
|
||||
next( next )
|
||||
value( value ),
|
||||
next( next )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -123,8 +123,8 @@ class idHashNodeT< const char*, _value_ >
|
|||
public:
|
||||
idHashNodeT( const char* const& key, const _value_ & value, idHashNodeT* next )
|
||||
: key( key ),
|
||||
value( value ),
|
||||
next( next )
|
||||
value( value ),
|
||||
next( next )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1431,15 +1431,15 @@ void DeterminantIsNegative( bool& negativeDeterminant, const float* row0, const
|
|||
const float det2_01_12 = row0[1] * row1[2] - row0[2] * row1[1];
|
||||
const float det2_01_13 = row0[1] * row1[3] - row0[3] * row1[1];
|
||||
const float det2_01_23 = row0[2] * row1[3] - row0[3] * row1[2];
|
||||
|
||||
|
||||
// 3x3 sub-determinants required to calculate 4x4 determinant
|
||||
const float det3_201_012 = row2[0] * det2_01_12 - row2[1] * det2_01_02 + row2[2] * det2_01_01;
|
||||
const float det3_201_013 = row2[0] * det2_01_13 - row2[1] * det2_01_03 + row2[3] * det2_01_01;
|
||||
const float det3_201_023 = row2[0] * det2_01_23 - row2[2] * det2_01_03 + row2[3] * det2_01_02;
|
||||
const float det3_201_123 = row2[1] * det2_01_23 - row2[2] * det2_01_13 + row2[3] * det2_01_12;
|
||||
|
||||
|
||||
const float det = ( - det3_201_123 * row3[0] + det3_201_023 * row3[1] - det3_201_013 * row3[2] + det3_201_012 * row3[3] );
|
||||
|
||||
|
||||
negativeDeterminant = ( det < 0.0f );
|
||||
}
|
||||
|
||||
|
@ -3348,12 +3348,12 @@ Clips a polygon with homogeneous coordinates to the axis aligned plane[axis] = s
|
|||
static int ClipHomogeneousPolygonToSide_Generic( idVec4* __restrict newPoints, idVec4* __restrict points, int numPoints, int axis, float sign, float offset )
|
||||
{
|
||||
assert( newPoints != points );
|
||||
|
||||
|
||||
assert( numPoints < 16 );
|
||||
int sides[16];
|
||||
|
||||
|
||||
const float side = sign * offset;
|
||||
|
||||
|
||||
// calculate the plane side for each original point and calculate all potential new points
|
||||
for( int i = 0; i < numPoints; i++ )
|
||||
{
|
||||
|
@ -3362,10 +3362,10 @@ static int ClipHomogeneousPolygonToSide_Generic( idVec4* __restrict newPoints, i
|
|||
newPoints[i * 2 + 0] = points[i];
|
||||
newPoints[i * 2 + 1] = ClipHomogeneousLineToSide( points[i], points[j], axis, side );
|
||||
};
|
||||
|
||||
|
||||
// repeat the first side at the end to avoid having to wrap around
|
||||
sides[numPoints] = sides[0];
|
||||
|
||||
|
||||
// compact the array of points
|
||||
int numNewPoints = 0;
|
||||
for( int i = 0; i < numPoints; i++ )
|
||||
|
@ -3379,7 +3379,7 @@ static int ClipHomogeneousPolygonToSide_Generic( idVec4* __restrict newPoints, i
|
|||
newPoints[numNewPoints++] = newPoints[i * 2 + 1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
assert( numNewPoints <= 16 );
|
||||
return numNewPoints;
|
||||
}
|
||||
|
@ -3395,7 +3395,7 @@ static int ClipHomogeneousPolygonToUnitCube_Generic( idVec4* points, int numPoin
|
|||
{
|
||||
assert( numPoints < 16 - 6 );
|
||||
ALIGNTYPE16 idVec4 newPoints[2 * 16]; // the C clip code temporarily doubles the points
|
||||
|
||||
|
||||
#if defined( CLIP_SPACE_D3D ) // the D3D near plane is at Z=0 instead of Z=-1
|
||||
numPoints = ClipHomogeneousPolygonToSide_Generic( newPoints, points, numPoints, 2, -1.0f, 0.0f ); // near
|
||||
#else
|
||||
|
|
|
@ -130,29 +130,29 @@ public:
|
|||
{
|
||||
pthread_key_create( &key, NULL );
|
||||
}
|
||||
|
||||
|
||||
idSysThreadLocalStorage( const ptrdiff_t& val )
|
||||
{
|
||||
pthread_key_create( &key, NULL );
|
||||
pthread_setspecific( key, ( const void* ) val );
|
||||
}
|
||||
|
||||
|
||||
~idSysThreadLocalStorage()
|
||||
{
|
||||
pthread_key_delete( key );
|
||||
}
|
||||
|
||||
|
||||
operator ptrdiff_t()
|
||||
{
|
||||
return ( ptrdiff_t )pthread_getspecific( key );
|
||||
}
|
||||
|
||||
|
||||
const ptrdiff_t& operator = ( const ptrdiff_t& val )
|
||||
{
|
||||
pthread_setspecific( key, ( const void* ) val );
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
pthread_key_t key;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -177,7 +177,7 @@ class idRenderLog
|
|||
{
|
||||
public:
|
||||
idRenderLog() {}
|
||||
|
||||
|
||||
void StartFrame() {}
|
||||
void EndFrame() {}
|
||||
void Close() {}
|
||||
|
@ -185,16 +185,16 @@ public:
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void OpenBlock( const char* label );
|
||||
void CloseBlock();
|
||||
void OpenMainBlock( renderLogMainBlock_t block ) {}
|
||||
void CloseMainBlock() {}
|
||||
void Indent( renderLogIndentLabel_t label = RENDER_LOG_INDENT_DEFAULT ) {}
|
||||
void Outdent( renderLogIndentLabel_t label = RENDER_LOG_INDENT_DEFAULT ) {}
|
||||
|
||||
|
||||
void Printf( VERIFY_FORMAT_STRING const char* fmt, ... ) {}
|
||||
|
||||
|
||||
int activeLevel;
|
||||
};
|
||||
|
||||
|
|
|
@ -812,19 +812,19 @@ const char* vertexInsert_GLSL_ES_1_0 =
|
|||
const char* vertexInsert_GLSL_ES_1_0 =
|
||||
{
|
||||
"#version 100\n"
|
||||
|
||||
|
||||
#if !defined(USE_MESA)
|
||||
"#define GLES2\n"
|
||||
#endif
|
||||
|
||||
|
||||
"#define PC\n"
|
||||
|
||||
|
||||
#if 1 //defined(__ANDROID__)
|
||||
"precision mediump float;\n"
|
||||
#else
|
||||
"precision highp float;\n"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(USE_GPU_SKINNING) && !defined(__ANDROID__)
|
||||
"#extension GL_ARB_gpu_shader5 : enable\n"
|
||||
#endif
|
||||
|
@ -915,13 +915,13 @@ const char* fragmentInsert_GLSL_ES_1_0 =
|
|||
const char* fragmentInsert_GLSL_ES_1_0 =
|
||||
{
|
||||
"#version 100\n"
|
||||
|
||||
|
||||
#if !defined(USE_MESA)
|
||||
"#define GLES2\n"
|
||||
#endif
|
||||
|
||||
|
||||
"#define PC\n"
|
||||
|
||||
|
||||
#if 1 //defined(__ANDROID__)
|
||||
"precision mediump float;\n"
|
||||
//"#extension GL_OES_standard_derivatives : enable\n"
|
||||
|
|
|
@ -146,16 +146,16 @@ static byte TriangleFacing_Generic( const idVec3& v1, const idVec3& v2, const id
|
|||
const float sx = v2.x - v1.x;
|
||||
const float sy = v2.y - v1.y;
|
||||
const float sz = v2.z - v1.z;
|
||||
|
||||
|
||||
const float tx = v3.x - v1.x;
|
||||
const float ty = v3.y - v1.y;
|
||||
const float tz = v3.z - v1.z;
|
||||
|
||||
|
||||
const float normalX = ty * sz - tz * sy;
|
||||
const float normalY = tz * sx - tx * sz;
|
||||
const float normalZ = tx * sy - ty * sx;
|
||||
const float normalW = normalX * v1.x + normalY * v1.y + normalZ * v1.z;
|
||||
|
||||
|
||||
const float d = lightOrigin.x * normalX + lightOrigin.y * normalY + lightOrigin.z * normalZ - normalW;
|
||||
return ( d > 0.0f ) ? 255 : 0;
|
||||
}
|
||||
|
@ -178,14 +178,14 @@ static byte TriangleCulled_Generic( const idVec3& v1, const idVec3& v2, const id
|
|||
c[1][i] = v2[0] * lightProject[i][0] + v2[1] * lightProject[i][1] + v2[2] * lightProject[i][2] + lightProject[i][3];
|
||||
c[2][i] = v3[0] * lightProject[i][0] + v3[1] * lightProject[i][1] + v3[2] * lightProject[i][2] + lightProject[i][3];
|
||||
}
|
||||
|
||||
|
||||
// calculate the culled bits
|
||||
int bits = 0;
|
||||
for( int i = 0; i < 3; i++ )
|
||||
{
|
||||
const float minW = 0.0f;
|
||||
const float maxW = c[i][3];
|
||||
|
||||
|
||||
if( c[i][0] > minW )
|
||||
{
|
||||
bits |= ( 1 << 0 );
|
||||
|
@ -211,7 +211,7 @@ static byte TriangleCulled_Generic( const idVec3& v1, const idVec3& v2, const id
|
|||
bits |= ( 1 << 5 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if any bits weren't set, the triangle is completely off one side of the frustum
|
||||
return ( bits != 63 ) ? 255 : 0;
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ void idSoundVoice_Base::InitSurround( int outputChannels, int channelMask )
|
|||
idSoundVoice_Base::CalculateSurround
|
||||
========================
|
||||
*/
|
||||
void idSoundVoice_Base::CalculateSurround( int srcChannels, float pLevelMatrix[ MAX_CHANNELS_PER_VOICE* MAX_CHANNELS_PER_VOICE ], float scale )
|
||||
void idSoundVoice_Base::CalculateSurround( int srcChannels, float pLevelMatrix[ MAX_CHANNELS_PER_VOICE * MAX_CHANNELS_PER_VOICE ], float scale )
|
||||
{
|
||||
// Hack for mono
|
||||
if( dstChannels == 1 )
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
static void InitSurround( int outputChannels, int channelMask );
|
||||
|
||||
void CalculateSurround( int srcChannels, float pLevelMatrix[ MAX_CHANNELS_PER_VOICE* MAX_CHANNELS_PER_VOICE ], float scale );
|
||||
void CalculateSurround( int srcChannels, float pLevelMatrix[ MAX_CHANNELS_PER_VOICE * MAX_CHANNELS_PER_VOICE ], float scale );
|
||||
|
||||
// RB begin
|
||||
virtual void SetPosition( const idVec3& p )
|
||||
|
|
|
@ -71,13 +71,13 @@ idSoundVoice_XAudio2::idSoundVoice_XAudio2
|
|||
*/
|
||||
idSoundVoice_XAudio2::idSoundVoice_XAudio2()
|
||||
: pSourceVoice( NULL ),
|
||||
leadinSample( NULL ),
|
||||
loopingSample( NULL ),
|
||||
formatTag( 0 ),
|
||||
numChannels( 0 ),
|
||||
sampleRate( 0 ),
|
||||
paused( true ),
|
||||
hasVUMeter( false )
|
||||
leadinSample( NULL ),
|
||||
loopingSample( NULL ),
|
||||
formatTag( 0 ),
|
||||
numChannels( 0 ),
|
||||
sampleRate( 0 ),
|
||||
paused( true ),
|
||||
hasVUMeter( false )
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -204,407 +204,407 @@ static void ConvertUTF8toUTF32( const char* utf8str, int32* utf32buf )
|
|||
static int SDL_KeyToDoom3Key( SDL_Keycode key, bool& isChar )
|
||||
{
|
||||
isChar = false;
|
||||
|
||||
|
||||
if( key >= SDLK_SPACE && key < SDLK_DELETE )
|
||||
{
|
||||
isChar = true;
|
||||
//return key;// & 0xff;
|
||||
}
|
||||
|
||||
|
||||
switch( key )
|
||||
{
|
||||
case SDLK_ESCAPE:
|
||||
return K_ESCAPE;
|
||||
|
||||
|
||||
case SDLK_SPACE:
|
||||
return K_SPACE;
|
||||
|
||||
//case SDLK_EXCLAIM:
|
||||
/*
|
||||
SDLK_QUOTEDBL:
|
||||
SDLK_HASH:
|
||||
SDLK_DOLLAR:
|
||||
SDLK_AMPERSAND:
|
||||
SDLK_QUOTE = 39,
|
||||
SDLK_LEFTPAREN = 40,
|
||||
SDLK_RIGHTPAREN = 41,
|
||||
SDLK_ASTERISK = 42,
|
||||
SDLK_PLUS = 43,
|
||||
SDLK_COMMA = 44,
|
||||
SDLK_MINUS = 45,
|
||||
SDLK_PERIOD = 46,
|
||||
SDLK_SLASH = 47,
|
||||
*/
|
||||
|
||||
//case SDLK_EXCLAIM:
|
||||
/*
|
||||
SDLK_QUOTEDBL:
|
||||
SDLK_HASH:
|
||||
SDLK_DOLLAR:
|
||||
SDLK_AMPERSAND:
|
||||
SDLK_QUOTE = 39,
|
||||
SDLK_LEFTPAREN = 40,
|
||||
SDLK_RIGHTPAREN = 41,
|
||||
SDLK_ASTERISK = 42,
|
||||
SDLK_PLUS = 43,
|
||||
SDLK_COMMA = 44,
|
||||
SDLK_MINUS = 45,
|
||||
SDLK_PERIOD = 46,
|
||||
SDLK_SLASH = 47,
|
||||
*/
|
||||
case SDLK_0:
|
||||
return K_0;
|
||||
|
||||
|
||||
case SDLK_1:
|
||||
return K_1;
|
||||
|
||||
|
||||
case SDLK_2:
|
||||
return K_2;
|
||||
|
||||
|
||||
case SDLK_3:
|
||||
return K_3;
|
||||
|
||||
|
||||
case SDLK_4:
|
||||
return K_4;
|
||||
|
||||
|
||||
case SDLK_5:
|
||||
return K_5;
|
||||
|
||||
|
||||
case SDLK_6:
|
||||
return K_6;
|
||||
|
||||
|
||||
case SDLK_7:
|
||||
return K_7;
|
||||
|
||||
|
||||
case SDLK_8:
|
||||
return K_8;
|
||||
|
||||
|
||||
case SDLK_9:
|
||||
return K_9;
|
||||
|
||||
// DG: add some missing keys..
|
||||
|
||||
// DG: add some missing keys..
|
||||
case SDLK_UNDERSCORE:
|
||||
return K_UNDERLINE;
|
||||
|
||||
|
||||
case SDLK_MINUS:
|
||||
return K_MINUS;
|
||||
|
||||
|
||||
case SDLK_COMMA:
|
||||
return K_COMMA;
|
||||
|
||||
|
||||
case SDLK_COLON:
|
||||
return K_COLON;
|
||||
|
||||
|
||||
case SDLK_SEMICOLON:
|
||||
return K_SEMICOLON;
|
||||
|
||||
|
||||
case SDLK_PERIOD:
|
||||
return K_PERIOD;
|
||||
|
||||
|
||||
case SDLK_AT:
|
||||
return K_AT;
|
||||
|
||||
|
||||
case SDLK_EQUALS:
|
||||
return K_EQUALS;
|
||||
// DG end
|
||||
|
||||
/*
|
||||
SDLK_COLON = 58,
|
||||
SDLK_SEMICOLON = 59,
|
||||
SDLK_LESS = 60,
|
||||
SDLK_EQUALS = 61,
|
||||
SDLK_GREATER = 62,
|
||||
SDLK_QUESTION = 63,
|
||||
SDLK_AT = 64,
|
||||
*/
|
||||
/*
|
||||
Skip uppercase letters
|
||||
*/
|
||||
/*
|
||||
SDLK_LEFTBRACKET = 91,
|
||||
SDLK_BACKSLASH = 92,
|
||||
SDLK_RIGHTBRACKET = 93,
|
||||
SDLK_CARET = 94,
|
||||
SDLK_UNDERSCORE = 95,
|
||||
SDLK_BACKQUOTE = 96,
|
||||
*/
|
||||
|
||||
// DG end
|
||||
|
||||
/*
|
||||
SDLK_COLON = 58,
|
||||
SDLK_SEMICOLON = 59,
|
||||
SDLK_LESS = 60,
|
||||
SDLK_EQUALS = 61,
|
||||
SDLK_GREATER = 62,
|
||||
SDLK_QUESTION = 63,
|
||||
SDLK_AT = 64,
|
||||
*/
|
||||
/*
|
||||
Skip uppercase letters
|
||||
*/
|
||||
/*
|
||||
SDLK_LEFTBRACKET = 91,
|
||||
SDLK_BACKSLASH = 92,
|
||||
SDLK_RIGHTBRACKET = 93,
|
||||
SDLK_CARET = 94,
|
||||
SDLK_UNDERSCORE = 95,
|
||||
SDLK_BACKQUOTE = 96,
|
||||
*/
|
||||
|
||||
case SDLK_a:
|
||||
return K_A;
|
||||
|
||||
|
||||
case SDLK_b:
|
||||
return K_B;
|
||||
|
||||
|
||||
case SDLK_c:
|
||||
return K_C;
|
||||
|
||||
|
||||
case SDLK_d:
|
||||
return K_D;
|
||||
|
||||
|
||||
case SDLK_e:
|
||||
return K_E;
|
||||
|
||||
|
||||
case SDLK_f:
|
||||
return K_F;
|
||||
|
||||
|
||||
case SDLK_g:
|
||||
return K_G;
|
||||
|
||||
|
||||
case SDLK_h:
|
||||
return K_H;
|
||||
|
||||
|
||||
case SDLK_i:
|
||||
return K_I;
|
||||
|
||||
|
||||
case SDLK_j:
|
||||
return K_J;
|
||||
|
||||
|
||||
case SDLK_k:
|
||||
return K_K;
|
||||
|
||||
|
||||
case SDLK_l:
|
||||
return K_L;
|
||||
|
||||
|
||||
case SDLK_m:
|
||||
return K_M;
|
||||
|
||||
|
||||
case SDLK_n:
|
||||
return K_N;
|
||||
|
||||
|
||||
case SDLK_o:
|
||||
return K_O;
|
||||
|
||||
|
||||
case SDLK_p:
|
||||
return K_P;
|
||||
|
||||
|
||||
case SDLK_q:
|
||||
return K_Q;
|
||||
|
||||
|
||||
case SDLK_r:
|
||||
return K_R;
|
||||
|
||||
|
||||
case SDLK_s:
|
||||
return K_S;
|
||||
|
||||
|
||||
case SDLK_t:
|
||||
return K_T;
|
||||
|
||||
|
||||
case SDLK_u:
|
||||
return K_U;
|
||||
|
||||
|
||||
case SDLK_v:
|
||||
return K_V;
|
||||
|
||||
|
||||
case SDLK_w:
|
||||
return K_W;
|
||||
|
||||
|
||||
case SDLK_x:
|
||||
return K_X;
|
||||
|
||||
|
||||
case SDLK_y:
|
||||
return K_Y;
|
||||
|
||||
|
||||
case SDLK_z:
|
||||
return K_Z;
|
||||
|
||||
|
||||
case SDLK_RETURN:
|
||||
return K_ENTER;
|
||||
|
||||
|
||||
case SDLK_BACKSPACE:
|
||||
return K_BACKSPACE;
|
||||
|
||||
|
||||
case SDLK_PAUSE:
|
||||
return K_PAUSE;
|
||||
|
||||
// DG: add tab key support
|
||||
|
||||
// DG: add tab key support
|
||||
case SDLK_TAB:
|
||||
return K_TAB;
|
||||
// DG end
|
||||
|
||||
//case SDLK_APPLICATION:
|
||||
// return K_COMMAND;
|
||||
// DG end
|
||||
|
||||
//case SDLK_APPLICATION:
|
||||
// return K_COMMAND;
|
||||
case SDLK_CAPSLOCK:
|
||||
return K_CAPSLOCK;
|
||||
|
||||
|
||||
case SDLK_SCROLLLOCK:
|
||||
return K_SCROLL;
|
||||
|
||||
|
||||
case SDLK_POWER:
|
||||
return K_POWER;
|
||||
|
||||
|
||||
case SDLK_UP:
|
||||
return K_UPARROW;
|
||||
|
||||
|
||||
case SDLK_DOWN:
|
||||
return K_DOWNARROW;
|
||||
|
||||
|
||||
case SDLK_LEFT:
|
||||
return K_LEFTARROW;
|
||||
|
||||
|
||||
case SDLK_RIGHT:
|
||||
return K_RIGHTARROW;
|
||||
|
||||
|
||||
case SDLK_LGUI:
|
||||
return K_LWIN;
|
||||
|
||||
|
||||
case SDLK_RGUI:
|
||||
return K_RWIN;
|
||||
//case SDLK_MENU:
|
||||
// return K_MENU;
|
||||
|
||||
//case SDLK_MENU:
|
||||
// return K_MENU;
|
||||
|
||||
case SDLK_LALT:
|
||||
return K_LALT;
|
||||
|
||||
|
||||
case SDLK_RALT:
|
||||
return K_RALT;
|
||||
|
||||
|
||||
case SDLK_RCTRL:
|
||||
return K_RCTRL;
|
||||
|
||||
|
||||
case SDLK_LCTRL:
|
||||
return K_LCTRL;
|
||||
|
||||
|
||||
case SDLK_RSHIFT:
|
||||
return K_RSHIFT;
|
||||
|
||||
|
||||
case SDLK_LSHIFT:
|
||||
return K_LSHIFT;
|
||||
|
||||
|
||||
case SDLK_INSERT:
|
||||
return K_INS;
|
||||
|
||||
|
||||
case SDLK_DELETE:
|
||||
return K_DEL;
|
||||
|
||||
|
||||
case SDLK_PAGEDOWN:
|
||||
return K_PGDN;
|
||||
|
||||
|
||||
case SDLK_PAGEUP:
|
||||
return K_PGUP;
|
||||
|
||||
|
||||
case SDLK_HOME:
|
||||
return K_HOME;
|
||||
|
||||
|
||||
case SDLK_END:
|
||||
return K_END;
|
||||
|
||||
|
||||
case SDLK_F1:
|
||||
return K_F1;
|
||||
|
||||
|
||||
case SDLK_F2:
|
||||
return K_F2;
|
||||
|
||||
|
||||
case SDLK_F3:
|
||||
return K_F3;
|
||||
|
||||
|
||||
case SDLK_F4:
|
||||
return K_F4;
|
||||
|
||||
|
||||
case SDLK_F5:
|
||||
return K_F5;
|
||||
|
||||
|
||||
case SDLK_F6:
|
||||
return K_F6;
|
||||
|
||||
|
||||
case SDLK_F7:
|
||||
return K_F7;
|
||||
|
||||
|
||||
case SDLK_F8:
|
||||
return K_F8;
|
||||
|
||||
|
||||
case SDLK_F9:
|
||||
return K_F9;
|
||||
|
||||
|
||||
case SDLK_F10:
|
||||
return K_F10;
|
||||
|
||||
|
||||
case SDLK_F11:
|
||||
return K_F11;
|
||||
|
||||
|
||||
case SDLK_F12:
|
||||
return K_F12;
|
||||
// K_INVERTED_EXCLAMATION;
|
||||
|
||||
// K_INVERTED_EXCLAMATION;
|
||||
|
||||
case SDLK_F13:
|
||||
return K_F13;
|
||||
|
||||
|
||||
case SDLK_F14:
|
||||
return K_F14;
|
||||
|
||||
|
||||
case SDLK_F15:
|
||||
return K_F15;
|
||||
|
||||
|
||||
case SDLK_KP_7:
|
||||
return K_KP_7;
|
||||
|
||||
|
||||
case SDLK_KP_8:
|
||||
return K_KP_8;
|
||||
|
||||
|
||||
case SDLK_KP_9:
|
||||
return K_KP_9;
|
||||
|
||||
|
||||
case SDLK_KP_4:
|
||||
return K_KP_4;
|
||||
|
||||
|
||||
case SDLK_KP_5:
|
||||
return K_KP_5;
|
||||
|
||||
|
||||
case SDLK_KP_6:
|
||||
return K_KP_6;
|
||||
|
||||
|
||||
case SDLK_KP_1:
|
||||
return K_KP_1;
|
||||
|
||||
|
||||
case SDLK_KP_2:
|
||||
return K_KP_2;
|
||||
|
||||
|
||||
case SDLK_KP_3:
|
||||
return K_KP_3;
|
||||
|
||||
|
||||
case SDLK_KP_ENTER:
|
||||
return K_KP_ENTER;
|
||||
|
||||
|
||||
case SDLK_KP_0:
|
||||
return K_KP_0;
|
||||
|
||||
|
||||
case SDLK_KP_PERIOD:
|
||||
return K_KP_DOT;
|
||||
|
||||
|
||||
case SDLK_KP_DIVIDE:
|
||||
return K_KP_SLASH;
|
||||
// K_SUPERSCRIPT_TWO;
|
||||
|
||||
// K_SUPERSCRIPT_TWO;
|
||||
|
||||
case SDLK_KP_MINUS:
|
||||
return K_KP_MINUS;
|
||||
// K_ACUTE_ACCENT;
|
||||
|
||||
// K_ACUTE_ACCENT;
|
||||
|
||||
case SDLK_KP_PLUS:
|
||||
return K_KP_PLUS;
|
||||
|
||||
|
||||
case SDLK_NUMLOCKCLEAR:
|
||||
return K_NUMLOCK;
|
||||
|
||||
|
||||
case SDLK_KP_MULTIPLY:
|
||||
return K_KP_STAR;
|
||||
|
||||
|
||||
case SDLK_KP_EQUALS:
|
||||
return K_KP_EQUALS;
|
||||
|
||||
// K_MASCULINE_ORDINATOR;
|
||||
// K_GRAVE_A;
|
||||
// K_AUX1;
|
||||
// K_CEDILLA_C;
|
||||
// K_GRAVE_E;
|
||||
// K_AUX2;
|
||||
// K_AUX3;
|
||||
// K_AUX4;
|
||||
// K_GRAVE_I;
|
||||
// K_AUX5;
|
||||
// K_AUX6;
|
||||
// K_AUX7;
|
||||
// K_AUX8;
|
||||
// K_TILDE_N;
|
||||
// K_GRAVE_O;
|
||||
// K_AUX9;
|
||||
// K_AUX10;
|
||||
// K_AUX11;
|
||||
// K_AUX12;
|
||||
// K_AUX13;
|
||||
// K_AUX14;
|
||||
// K_GRAVE_U;
|
||||
// K_AUX15;
|
||||
// K_AUX16;
|
||||
|
||||
|
||||
// K_MASCULINE_ORDINATOR;
|
||||
// K_GRAVE_A;
|
||||
// K_AUX1;
|
||||
// K_CEDILLA_C;
|
||||
// K_GRAVE_E;
|
||||
// K_AUX2;
|
||||
// K_AUX3;
|
||||
// K_AUX4;
|
||||
// K_GRAVE_I;
|
||||
// K_AUX5;
|
||||
// K_AUX6;
|
||||
// K_AUX7;
|
||||
// K_AUX8;
|
||||
// K_TILDE_N;
|
||||
// K_GRAVE_O;
|
||||
// K_AUX9;
|
||||
// K_AUX10;
|
||||
// K_AUX11;
|
||||
// K_AUX12;
|
||||
// K_AUX13;
|
||||
// K_AUX14;
|
||||
// K_GRAVE_U;
|
||||
// K_AUX15;
|
||||
// K_AUX16;
|
||||
|
||||
case SDLK_PRINTSCREEN:
|
||||
return K_PRINTSCREEN;
|
||||
|
||||
|
||||
case SDLK_MODE:
|
||||
return K_RALT;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif // SDL2
|
||||
|
@ -930,7 +930,7 @@ sysEvent_t Sys_GetEvent()
|
|||
res.evType = SE_MOUSE_LEAVE;
|
||||
return res;
|
||||
|
||||
// DG: handle resizing and moving of window
|
||||
// DG: handle resizing and moving of window
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
{
|
||||
int w = ev.window.data1;
|
||||
|
@ -991,7 +991,7 @@ sysEvent_t Sys_GetEvent()
|
|||
case SDL_VIDEOEXPOSE:
|
||||
continue; // handle next event
|
||||
|
||||
// DG: handle resizing and moving of window
|
||||
// DG: handle resizing and moving of window
|
||||
case SDL_VIDEORESIZE:
|
||||
{
|
||||
int w = ev.resize.w;
|
||||
|
@ -1006,7 +1006,7 @@ sysEvent_t Sys_GetEvent()
|
|||
PushConsoleEvent( "vid_restart" );
|
||||
continue; // handle next event
|
||||
}
|
||||
// DG end
|
||||
// DG end
|
||||
#endif // SDL1.2
|
||||
|
||||
case SDL_KEYDOWN:
|
||||
|
@ -1046,7 +1046,7 @@ sysEvent_t Sys_GetEvent()
|
|||
// DG end
|
||||
#endif // SDL 1.2
|
||||
|
||||
// fall through
|
||||
// fall through
|
||||
case SDL_KEYUP:
|
||||
{
|
||||
bool isChar;
|
||||
|
@ -1232,12 +1232,12 @@ sysEvent_t Sys_GetEvent()
|
|||
|
||||
return res;
|
||||
|
||||
// WM0110
|
||||
// NOTE: it seems that the key bindings for the GUI and for the game are
|
||||
// totally independant. I think the event returned by this function seems to work
|
||||
// on the GUI and the event returned by Sys_ReturnJoystickInputEvent() works on
|
||||
// the game.
|
||||
// Also, remember that joystick keys must be binded to actions in order to work!
|
||||
// WM0110
|
||||
// NOTE: it seems that the key bindings for the GUI and for the game are
|
||||
// totally independant. I think the event returned by this function seems to work
|
||||
// on the GUI and the event returned by Sys_ReturnJoystickInputEvent() works on
|
||||
// the game.
|
||||
// Also, remember that joystick keys must be binded to actions in order to work!
|
||||
case SDL_JOYBUTTONDOWN:
|
||||
case SDL_JOYBUTTONUP:
|
||||
// sys_public.h: evValue is an axis number and evValue2 is the current state (-127 to 127)
|
||||
|
@ -1300,7 +1300,7 @@ sysEvent_t Sys_GetEvent()
|
|||
joystick_polls.Append( joystick_poll_t( J_ACTION11, ev.jbutton.state == SDL_PRESSED ? 1 : 0 ) );
|
||||
break;
|
||||
|
||||
// D-PAD left (XBox 360 wireless)
|
||||
// D-PAD left (XBox 360 wireless)
|
||||
case 11:
|
||||
// If joystick has a hat, then use the hat as D-PAD. If not, D-PAD is mapped
|
||||
// to buttons.
|
||||
|
@ -1316,7 +1316,7 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
break;
|
||||
|
||||
// D-PAD right
|
||||
// D-PAD right
|
||||
case 12:
|
||||
if( SDL_joystick_has_hat )
|
||||
{
|
||||
|
@ -1330,7 +1330,7 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
break;
|
||||
|
||||
// D-PAD up
|
||||
// D-PAD up
|
||||
case 13:
|
||||
if( SDL_joystick_has_hat )
|
||||
{
|
||||
|
@ -1344,7 +1344,7 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
break;
|
||||
|
||||
// D-PAD down
|
||||
// D-PAD down
|
||||
case 14:
|
||||
if( SDL_joystick_has_hat )
|
||||
{
|
||||
|
@ -1461,7 +1461,7 @@ sysEvent_t Sys_GetEvent()
|
|||
int percent;
|
||||
int axis;
|
||||
|
||||
// LEFT trigger
|
||||
// LEFT trigger
|
||||
case 2:
|
||||
// Convert TRIGGER value from space (-32768, 32767) to (0, 32767)
|
||||
triggerValue = ( ev.jaxis.value + 32768 ) / 2;
|
||||
|
@ -1471,7 +1471,7 @@ sysEvent_t Sys_GetEvent()
|
|||
joystick_polls.Append( joystick_poll_t( J_AXIS_LEFT_TRIG, triggerValue ) );
|
||||
break;
|
||||
|
||||
// Right trigger
|
||||
// Right trigger
|
||||
case 5:
|
||||
triggerValue = ( ev.jaxis.value + 32768 ) / 2;
|
||||
// common->Printf("Sys_GetEvent: RIGHT trigger value = %i / converted value = %i\n", ev.jaxis.value, trigger_value);
|
||||
|
@ -1480,7 +1480,7 @@ sysEvent_t Sys_GetEvent()
|
|||
joystick_polls.Append( joystick_poll_t( J_AXIS_RIGHT_TRIG, triggerValue ) );
|
||||
break;
|
||||
|
||||
// LEFT X
|
||||
// LEFT X
|
||||
case 0:
|
||||
res.evValue = J_AXIS_LEFT_X;
|
||||
joystick_polls.Append( joystick_poll_t( J_AXIS_LEFT_X, ev.jaxis.value ) );
|
||||
|
@ -1506,7 +1506,7 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
break;
|
||||
|
||||
// LEFT Y
|
||||
// LEFT Y
|
||||
case 1:
|
||||
res.evValue = J_AXIS_LEFT_Y;
|
||||
joystick_polls.Append( joystick_poll_t( J_AXIS_LEFT_Y, ev.jaxis.value ) );
|
||||
|
@ -1533,7 +1533,7 @@ sysEvent_t Sys_GetEvent()
|
|||
|
||||
break;
|
||||
|
||||
// RIGHT X
|
||||
// RIGHT X
|
||||
case 3:
|
||||
res.evValue = J_AXIS_RIGHT_X;
|
||||
joystick_polls.Append( joystick_poll_t( J_AXIS_RIGHT_X, ev.jaxis.value ) );
|
||||
|
@ -1559,7 +1559,7 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
break;
|
||||
|
||||
// RIGHT Y
|
||||
// RIGHT Y
|
||||
case 4:
|
||||
res.evValue = J_AXIS_RIGHT_Y;
|
||||
joystick_polls.Append( joystick_poll_t( J_AXIS_RIGHT_Y, ev.jaxis.value ) );
|
||||
|
@ -1591,8 +1591,8 @@ sysEvent_t Sys_GetEvent()
|
|||
}
|
||||
|
||||
return res;
|
||||
// WM0110
|
||||
|
||||
// WM0110
|
||||
|
||||
case SDL_QUIT:
|
||||
PushConsoleEvent( "quit" );
|
||||
res = no_more_events; // don't handle next event, just quit.
|
||||
|
|
|
@ -2454,14 +2454,14 @@ idPacketProcessor::sessionId_t idLobby::IncrementSessionID( idPacketProcessor::s
|
|||
idLib::Printf( "NET: "#msgType", not from "#sessionType_" host: %s\n", peer.address.ToString() ); \
|
||||
return; \
|
||||
} \
|
||||
|
||||
|
||||
#define VERIFY_FROM_CONNECTING_HOST( p, sessionType_, msgType ) \
|
||||
VERIFY_CONNECTING_PEER( p, sessionType_, msgType ); \
|
||||
if ( p != host ) { \
|
||||
idLib::Printf( "NET: "#msgType", not from "#sessionType_" host: %s\n", peer.address.ToString() ); \
|
||||
return; \
|
||||
} \
|
||||
|
||||
|
||||
/*
|
||||
========================
|
||||
idLobby::HandleHelloAck
|
||||
|
|
|
@ -410,7 +410,7 @@ enum keyNum_t
|
|||
K_MOUSE15,
|
||||
K_MOUSE16,
|
||||
// DG end
|
||||
|
||||
|
||||
K_MWHEELDOWN,
|
||||
K_MWHEELUP,
|
||||
|
||||
|
|
|
@ -556,12 +556,12 @@ and checking transitions
|
|||
int Sys_PollKeyboardInputEvents()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
||||
if( win32.g_pKeyboard == NULL )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
hr = win32.g_pKeyboard->GetDeviceState( sizeof( toggleFetch[ diFetch ] ), toggleFetch[ diFetch ] );
|
||||
if( hr != DI_OK )
|
||||
{
|
||||
|
@ -572,7 +572,7 @@ int Sys_PollKeyboardInputEvents()
|
|||
// interruption, or because the buffer overflowed
|
||||
// and some events were lost.
|
||||
hr = win32.g_pKeyboard->Acquire();
|
||||
|
||||
|
||||
// nuke the garbage
|
||||
if( !FAILED( hr ) )
|
||||
{
|
||||
|
@ -582,15 +582,15 @@ int Sys_PollKeyboardInputEvents()
|
|||
// may occur when the app is minimized or in the process of
|
||||
// switching, so just try again later
|
||||
}
|
||||
|
||||
|
||||
if( FAILED( hr ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// build faked events
|
||||
int numChanges = 0;
|
||||
|
||||
|
||||
for( int i = 0 ; i < 256 ; i++ )
|
||||
{
|
||||
if( toggleFetch[0][i] != toggleFetch[1][i] )
|
||||
|
@ -600,9 +600,9 @@ int Sys_PollKeyboardInputEvents()
|
|||
numChanges++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
diFetch ^= 1;
|
||||
|
||||
|
||||
return numChanges;
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
|||
key = K_NUMLOCK;
|
||||
}
|
||||
Sys_QueEvent( SE_KEY, key, true, 0, NULL, 0 );
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case WM_SYSKEYUP:
|
||||
|
@ -368,13 +368,13 @@ LONG WINAPI MainWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
|||
Sys_QueEvent( SE_CHAR, wParam, 0, 0, NULL, 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// DG: support utf-32 input via WM_UNICHAR
|
||||
case WM_UNICHAR:
|
||||
Sys_QueEvent( SE_CHAR, wParam, 0, 0, NULL, 0 );
|
||||
break;
|
||||
// DG end
|
||||
|
||||
|
||||
case WM_NCLBUTTONDOWN:
|
||||
// win32.movingWindow = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue