Additional clang-format

This commit is contained in:
Azamat H. Hackimov 2024-04-16 23:59:11 +03:00
parent 61be1317b2
commit 38128ea134
161 changed files with 809 additions and 805 deletions

View File

@ -1,6 +1,5 @@
---
Language: Cpp
# BasedOnStyle: LLVM
BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false

View File

@ -2999,8 +2999,8 @@ bool AINotify(object *obj, ubyte notify_type, void *info) {
{
if (!(Game_mode & GM_MULTI)) {
for (i = 0; i < AI_NumRendered; i++) {
// mprintf((0, "I know that I could dodge, if I was aware, says robot
//%d.\n", AI_RenderedList[i]));
// mprintf((0, "I know that I could dodge, if I was aware, says
// robot %d.\n", AI_RenderedList[i]));
if (!BOA_IsVisible(Objects[AI_RenderedList[i]].roomnum, other_obj->roomnum))
continue;
@ -4976,8 +4976,8 @@ void ai_move(object *obj) {
int g_status = cur_goal->status_reg;
// if((ai_info->ai_type == AIT_MELEE1) && (ai_info->status_reg
//& AISR_MELEE))
// if((ai_info->ai_type == AIT_MELEE1) &&
//(ai_info->status_reg & AISR_MELEE))
// {
// AIMoveTowardsPosition(obj,
//&ai_info->last_see_target_pos, ai_info->attack_vel_percent);

View File

@ -60,7 +60,9 @@
//////////////////////////////////////////////////////////////////////////////
static struct { int ringbmp; } NewPyroGaugeData;
static struct {
int ringbmp;
} NewPyroGaugeData;
//////////////////////////////////////////////////////////////////////////////

View File

@ -2082,9 +2082,9 @@ int PlayerChooseDeathFate(int slot, float damage, bool melee) {
else
is_moving = false;
fate = (damage <= DEATH_BREAKUP_THRESHOLD && is_moving && !melee && OBJECT_OUTSIDE(playerobj))
? DEATH_BREAKUP
: (damage <= DEATH_EXPLODE_THRESHOLD || melee) ? DEATH_FALL : DEATH_INSTANT;
fate = (damage <= DEATH_BREAKUP_THRESHOLD && is_moving && !melee && OBJECT_OUTSIDE(playerobj)) ? DEATH_BREAKUP
: (damage <= DEATH_EXPLODE_THRESHOLD || melee) ? DEATH_FALL
: DEATH_INSTANT;
if (fate == DEATH_BREAKUP) {
if ((ps_rand() % 4) < 2)

View File

@ -1206,7 +1206,8 @@ struct hud_menu {
y = add_hud_option(TXT_HUDSHIELDENERGY, &shield_energy, y, sel, true);
sel = (stat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 1
: (grstat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 2 : 0;
: (grstat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 2
: 0;
y = add_hud_option(TXT_HUDWEAPONS, &weapon_loads, y, sel, true);
sel = (stat & STAT_AFTERBURN) ? 1 : (grstat & STAT_AFTERBURN) ? 2 : 0;

View File

@ -1434,7 +1434,8 @@ void CtlConfig(int mode) {
cfg_cb_data.curcfg = NULL;
menu.AddSimpleOption(UID_CANCEL, TXT_GEN_EXIT);
menu.SetCurrentOption((mode == CTLCONFIG_WPNSEL) ? IDV_WPNSEL
: (mode == CTLCONFIG_CONTROLLER) ? IDV_CCONFIG : IDV_KCONFIG);
: (mode == CTLCONFIG_CONTROLLER) ? IDV_CCONFIG
: IDV_KCONFIG);
menu.SetOnOptionSwitchCB(CtlConfigSwitchCB, (void *)&cfg_cb_data);
// if(mode==CTLCONFIG_CONTROLLER) {

View File

@ -1455,10 +1455,10 @@ void FindHitpointUV(float *u, float *v, vector *point, room *rp, int facenum);
// Break the specified (glass) face into shards
// Parameters: rp, facenum - the face to break. The face must be a portal face.
// hitpnt - the point on the face where the face shatters. If NULL, uses center point
//of
// face hitvec - the direction in which the thing that's breaking the glass is moving. If
// NULL, uses the negative of the surface normal
// hitpnt - the point on the face where the face shatters. If NULL, uses center
// point of
// face hitvec - the direction in which the thing that's breaking the glass is
// moving. If NULL, uses the negative of the surface normal
void BreakGlassFace(room *rp, int facenum, vector *hitpnt, vector *hitvec) {
int roomnum;
vector t_hitpnt, t_hitvec;

View File

@ -135,10 +135,10 @@ void UnshakePlayer();
// Break the specified (glass) face into shards
// Parameters: rp, facenum - the face to break
// hitpnt - the point on the face where the face shatters. If NULL, uses center point
//of
// face hitvec - the direction in which the thing that's breaking the glass is moving. If
// NULL, uses the negative of the surface normal
// hitpnt - the point on the face where the face shatters. If NULL, uses center
// point of
// face hitvec - the direction in which the thing that's breaking the glass is
// moving. If NULL, uses the negative of the surface normal
void BreakGlassFace(room *rp, int facenum, vector *hitpnt = NULL, vector *hitvec = NULL);
#endif

View File

@ -256,8 +256,8 @@ extern renderer_preferred_state Render_preferred_state;
extern int Render_preferred_bitdepth;
#define GM_SINGLE 1 // Single player game.
//#define GM_SERIAL 2 // You are in serial mode (Jason doesn't
//like this.)
// #define GM_SERIAL 2 // You are in serial mode (Jason
// doesn't like this.)
#define GM_NETWORK 4 // You are in network mode
#define GM_MODEM 32 // You are in a modem (serial) game

View File

@ -1920,8 +1920,8 @@ void EndLevel(int state) {
// report the information to the pilot's mission data
CurrentPilotUpdateMissionStatus();
// Sound_system.StopAllSounds(); -- moved to below because bug was reported that sounds were playing
//in performance screen
// Sound_system.StopAllSounds(); -- moved to below because bug was reported that sounds were
// playing in performance screen
// save our shields (in case this call is due to starting a new level
// in InitPlayerNewLevel, we'll determine if we should restore them

View File

@ -1702,8 +1702,8 @@ int LGSSnapshot(CFILE *fp) {
//@@ PageInVClip (Weapons[op->id].fire_image_handle);
//@@ break;
//@@ }
//@@ case RT_POLYOBJ: // be sure to use translated handles for polyobjs
//and textures
//@@ case RT_POLYOBJ: // be sure to use translated handles for
// polyobjs and textures
//@@ gs_ReadShort(fp, sindex);
//@@ new_model = (sindex > -1) ? gs_Xlates->model_handles[sindex] : -1;
//@@ if (new_model != pobji->model_num)

View File

@ -361,7 +361,8 @@ bool mmInterface::AddItem(int id, int key, const char *text, int type) {
m_menuitems[m_nmenu_items].Create(id, key, MMITEM_X, MMITEM_Y + (m_nmenu_items * 20), text,
(type == 1) ? UIF_GROUP_START
: (type == 2) ? UIF_GROUP_END
: (type == 3) ? (UIF_GROUP_START + UIF_GROUP_END) : 0);
: (type == 3) ? (UIF_GROUP_START + UIF_GROUP_END)
: 0);
m_nmenu_items++;
return true;

View File

@ -1445,7 +1445,9 @@ void newuiSheet::Realize() {
hot = new newuiHotspot;
bval = desc->internal ? true : false;
hot->Create(m_parent, desc->id, desc->title, gx, gy, desc->parm.s[0], desc->parm.s[1],
(bval && !hotspot_group) ? UIF_GROUP_START : (bval && hotspot_group) ? UIF_GROUP_END : 0);
(bval && !hotspot_group) ? UIF_GROUP_START
: (bval && hotspot_group) ? UIF_GROUP_END
: 0);
if (bval && !hotspot_group) {
hotspot_group = true;

View File

@ -322,14 +322,14 @@ typedef struct physics_info {
int num_bounces; // Number of bounces before exploding (PHYSICS_UNLIMITED_BOUNCE is for unlimited bouncing)
float coeff_restitution; // What percent of velocity is kept after a bounce
float mass; // The mass of this object -- what about moving
// into type info
float mass; // The mass of this object -- what about
// moving into type info
float
drag; // How fast this slows down -- what about moving into type info
float rotdrag; // How much resistance to a change in spin rate -- what about moving into type info
union {
float full_thrust; // Maximum thrust magnitude -- what about moving
// into type info
float full_thrust; // Maximum thrust magnitude -- what about
// moving into type info
float max_velocity;
};
union {
@ -340,8 +340,8 @@ typedef struct physics_info {
float turnroll_ratio; // How much roll for a given turning rate -- what about moving into type info
float
wiggle_amplitude; // The amplitude of an object's wiggle -- what about moving into type info
float wiggles_per_sec; // How fast something wiggles -- what about moving into
// type info
float wiggles_per_sec; // How fast something wiggles -- what about
// moving into type info
vector dest_pos; // destination position for interpolating velocity (for multiplayer only)

View File

@ -222,8 +222,8 @@ inline bool FaceIsRenderable(room *rp, face *fp) {
// Determines if a face draws with alpha blending
// Parameters: fp - pointer to the face in question
// bm_handle - the handle for the bitmap for this frame, or -1 if don't care about
// transparence Returns: bitmask describing the alpha blending for the face the return
// bits are the ATF_ flags in renderer.h
// transparence Returns: bitmask describing the alpha blending for the face
// the return bits are the ATF_ flags in renderer.h
inline int GetFaceAlpha(face *fp, int bm_handle) {
int ret = AT_ALWAYS;
if (GameTextures[fp->tmap].flags & TF_SATURATE) {

View File

@ -180,9 +180,8 @@ void cf_Close() {
// Parameters: path - the directory path. Can be relative to the current cur (the full path will be stored)
// ext - if NULL, look in this dir for all files. If non-null, it is a
// NULL-terminated
// list of file extensions, & the dir will only be searched for files with a
// matching extension Returns: true if
// directory added, else false
// list of file extensions, & the dir will only be searched
// for files with a matching extension Returns: true if directory added, else false
int cf_SetSearchPath(const char *path, char *ext, ...) {
if (strlen(path) >= _MAX_PATH)
return 0;

View File

@ -385,8 +385,8 @@ bool sb_stream_element_init(sound_buffer_info *sb, char *sample_ptr, int sound_l
}
}
else {
Int3(); // unimplemented for
normal DirectSound CloseHandle(sb->s->hEvent); sb->s->hEvent = NULL;
Int3();
// unimplemented for normal DirectSound CloseHandle(sb->s->hEvent); sb->s->hEvent = NULL;
}
*/
}

View File

@ -153,8 +153,8 @@ bool joy_InitRemoteStick(tJoystick joy, char *server_adr, tJoystickRecord *stick
// start packet read thread.
//@@ Thread_running[(int)joy] = false;
//@@ unsigned thread_id;
//@@ unsigned long thread_handle = _beginthreadex(NULL, 0, joy_ReadRemotePacket, &Joysticks[(int)joy],
1, &thread_id);
//@@ unsigned long thread_handle = _beginthreadex(NULL, 0, joy_ReadRemotePacket,
&Joysticks[(int)joy], 1, &thread_id);
//@@ if (thread_handle == 0) {
//@@ Error("Remote joystick thread creation failed.");
//@@ }

View File

@ -288,7 +288,9 @@ static unsigned int snd_write_cursor = 0;
enum { snd_queue_max = 60 };
static struct _snd_queue { unsigned ptr; } snd_queue[snd_queue_max];
static struct _snd_queue {
unsigned ptr;
} snd_queue[snd_queue_max];
static unsigned snd_fill = 0;
static unsigned snd_empty = 0;
static int snd_pad = 0;

View File

@ -288,55 +288,49 @@ ct_config_data lnxgameController::get_controller_value(ct_type type_req) {
unsigned ctl = CONTROLLER_CTL_INFO(i, NULL_CONTROLLER);
if (m_ControlList[i].flags & CTF_V_AXIS) {
limit =
(m_ControlList[i].sens[CT_V_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_V_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_V_AXIS - 1] / 2);
pos = get_axis_value(i, CT_V_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_V_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_U_AXIS) {
limit =
(m_ControlList[i].sens[CT_U_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_U_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_U_AXIS - 1] / 2);
pos = get_axis_value(i, CT_U_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_U_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_R_AXIS) {
limit =
(m_ControlList[i].sens[CT_R_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_R_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_R_AXIS - 1] / 2);
pos = get_axis_value(i, CT_R_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_R_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_Z_AXIS) {
limit =
(m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_Z_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] / 2);
pos = get_axis_value(i, CT_Z_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_Z_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_Y_AXIS) {
limit =
(m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_Y_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] / 2);
pos = get_axis_value(i, CT_Y_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_Y_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_X_AXIS) {
limit =
(m_ControlList[i].sens[CT_X_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_X_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_X_AXIS - 1] / 2);
pos = get_axis_value(i, CT_X_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_X_AXIS, NULL_BINDING));

View File

@ -283,7 +283,9 @@ static unsigned int snd_write_cursor;
enum { snd_queue_max = 60 };
static struct _snd_queue { unsigned ptr; } snd_queue[snd_queue_max];
static struct _snd_queue {
unsigned ptr;
} snd_queue[snd_queue_max];
static unsigned snd_fill, snd_empty;
static int snd_pad;

View File

@ -823,8 +823,8 @@ int mac_llsSystem::FindFreeChannel(float volume, int priority) {
}
if (min_chan != -1) {
// mprintf((1, "\nK %d snd %d pri %.5f > %.5f\n", min_chan, snd_channel[min_chan]->userInfo, weighted_priority,
//channel_priority[min_chan]));
// mprintf((1, "\nK %d snd %d pri %.5f > %.5f\n", min_chan, snd_channel[min_chan]->userInfo,
// weighted_priority, channel_priority[min_chan]));
StopSound(snd_channel[min_chan]->userInfo);
return (min_chan);
}

View File

@ -938,7 +938,8 @@ void bump_this_object(object *objp, object *other_objp, vector *force, vector *c
}
*/
//#define DAMAGE_SCALE 128 // Was 32 before 8:55 am on Thursday, September 15, changed by MK, walls
// #define DAMAGE_SCALE 128 // Was 32 before 8:55 am on Thursday, September 15, changed by MK,
// walls
// were hurting me more than robots! #define DAMAGE_THRESHOLD (F1_0/3) #define WALL_LOUDNESS_SCALE (20)
// float force_force = 50.0;

View File

@ -1729,7 +1729,8 @@ int check_vector_to_object(vector *intp, float *col_dist, vector *p0, vector *p1
// if obj is player, and bumping into other player or a weapon of another coop player, reduce radius
// if (obj->type == OBJ_PLAYER &&
// ((otherobj->type == OBJ_PLAYER) ||
// ((Game_mode&GM_MULTI_COOP) && otherobj->type == OBJ_WEAPON && otherobj->ctype.laser_info.parent_type
// ((Game_mode&GM_MULTI_COOP) && otherobj->type == OBJ_WEAPON &&
// otherobj->ctype.laser_info.parent_type
//== OBJ_PLAYER))) size = size/2;
// This accounts for relative position vs. relative velocity
@ -3428,9 +3429,9 @@ void check_hit_obj(int objnum) {
goto sphere_sphere;
// pos = obj->pos +
// obj->anim_sphere_offset; dist = vm_VectorDistance(&pos,
// &fvi_anim_sphere_p0); size =
// Poly_models[obj->rtype.pobj_info.model_num].anim_size;
// obj->anim_sphere_offset; dist =
// vm_VectorDistance(&pos, &fvi_anim_sphere_p0);
// size = Poly_models[obj->rtype.pobj_info.model_num].anim_size;
// if((dist <= size +
// fvi_anim_sphere_rad)
@ -4366,8 +4367,8 @@ void fvi_rooms_objs(void) {
// Determines if a face draws with alpha blending
// Parameters: fp - pointer to the face in question
// bm_handle - the handle for the bitmap for this frame, or -1 if don't care about
// transparence Returns: bitmask describing the alpha blending for the face the return
// bits are the ATF_ flags in renderer.h
// transparence Returns: bitmask describing the alpha blending for the face
// the return bits are the ATF_ flags in renderer.h
inline int GetFaceAlpha(face *fp, int bm_handle) {
int ret = AT_ALWAYS;
if (GameTextures[fp->tmap].flags & TF_SATURATE) {

View File

@ -1465,7 +1465,8 @@ void do_physics_sim(object *obj) {
// if(!f_forcefield && !(f_volatile && obj->type == OBJ_PLAYER))
// {
// if(obj->mtype.phys_info.coeff_restitution != 1.0f)
// obj->mtype.phys_info.velocity -= (obj->mtype.phys_info.velocity * (1.0f
// obj->mtype.phys_info.velocity -=
//(obj->mtype.phys_info.velocity * (1.0f
//- obj->mtype.phys_info.coeff_restitution));
// }
@ -1473,8 +1474,8 @@ void do_physics_sim(object *obj) {
// bump_obj_against_fixed(obj, &hit_info.hit_face_pnt[0],
//&hit_info.hit_wallnorm[0]);
//
// if(hit_info.hit_wallnorm[0].y > .4 && (vm_GetMagnitude(&obj->mtype.phys_info.velocity) <
//.001f
// if(hit_info.hit_wallnorm[0].y > .4 &&
//(vm_GetMagnitude(&obj->mtype.phys_info.velocity) < .001f
//|| obj->mtype.phys_info.velocity * hit_info.hit_wallnorm[0] <= 0.0f))
// {
// mprintf((0, "At Rest!\n"));

View File

@ -6280,9 +6280,9 @@ bool Thief::DoSteal(int me, int it, int attempt_num, bool f_last_success) {
i = rand() % numThiefableItems;
gen_perc = ((float)rand()) / ((float)(RAND_MAX));
perc_chance = (attempt_num == 1)
? ThiefableItems[i].attempt_one
: (f_last_success) ? ThiefableItems[i].attempt_two : ThiefableItems[i].attempt_two_no_one;
perc_chance = (attempt_num == 1) ? ThiefableItems[i].attempt_one
: (f_last_success) ? ThiefableItems[i].attempt_two
: ThiefableItems[i].attempt_two_no_one;
if (attempted_steals[i]) {
// we already tried this one, try another
@ -7821,8 +7821,9 @@ void BarnSwallow::ComputeNextNestPnt(int me, vector *pos) {
*pos += memory->nest_center;
}
//#define BSCOMM_FOLLOW_ME 0 // send a percent chance so we can have
//a line sometimes #define BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWER 2 #define BSCOMM_FOLLOW_CANCEL_FROM_LEADER 3
// #define BSCOMM_FOLLOW_ME 0 // send a percent chance so we
// can have a line sometimes #define BSCOMM_FOLLOW_CANCEL_FROM_FOLLOWER 2 #define
// BSCOMM_FOLLOW_CANCEL_FROM_LEADER 3
// #define BSCOMM_ATTACK_MY_TARGET 4
// BSCOMM_ARE_YOU_IN_MODE

View File

@ -981,8 +981,8 @@ bool aiBlackStormTrooper::OnNotify(int me_handle, tOSIRISEVTAINOTIFY *data) {
//@@ if ((rand() % 100) < 60) {
//@@ set_state(me_handle, STATE_SNIPE);
//@@ }
//@@ memory->timer = Game_GetTime() + 2.0f + (rand() % 6)*0.5f; // use timer to
//switch states.
//@@ memory->timer = Game_GetTime() + 2.0f + (rand() % 6)*0.5f;
//// use timer to switch states.
//@@ }
break;

View File

@ -533,56 +533,50 @@ ct_config_data gameWinController::get_controller_value(ct_type type_req) {
unsigned ctl = CONTROLLER_CTL_INFO(i, NULL_CONTROLLER);
if (m_ControlList[i].flags & CTF_V_AXIS) {
limit =
(m_ControlList[i].sens[CT_V_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_V_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_V_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_V_AXIS - 1] / 2);
pos = get_axis_value(i, CT_V_AXIS, ctAnalog);
mprintf((0, "pos=%.2f\n", pos));
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_V_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_U_AXIS) {
limit =
(m_ControlList[i].sens[CT_U_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_U_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_U_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_U_AXIS - 1] / 2);
pos = get_axis_value(i, CT_U_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_U_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_R_AXIS) {
limit =
(m_ControlList[i].sens[CT_R_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_R_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_R_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_R_AXIS - 1] / 2);
pos = get_axis_value(i, CT_R_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_R_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_Z_AXIS) {
limit =
(m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_Z_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_Z_AXIS - 1] / 2);
pos = get_axis_value(i, CT_Z_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_Z_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_Y_AXIS) {
limit =
(m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_Y_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_Y_AXIS - 1] / 2);
pos = get_axis_value(i, CT_Y_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_Y_AXIS, NULL_BINDING));
}
if (m_ControlList[i].flags & CTF_X_AXIS) {
limit =
(m_ControlList[i].sens[CT_X_AXIS - 1] > 1.5f)
? 0.95f
: (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.0f) ? 0.80f : (m_ControlList[i].sens[CT_X_AXIS - 1] / 2);
limit = (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.5f) ? 0.95f
: (m_ControlList[i].sens[CT_X_AXIS - 1] > 1.0f) ? 0.80f
: (m_ControlList[i].sens[CT_X_AXIS - 1] / 2);
pos = get_axis_value(i, CT_X_AXIS, ctAnalog);
if (fabs(pos) > limit)
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_X_AXIS, NULL_BINDING));

View File

@ -715,8 +715,11 @@ bool oeWin32Application::GetSystemSpecs(const char *fname) {
os = oeWin32Application::version(&maj, &min, &build, desc);
fprintf(0, "OS: %s %d.%d.%d %s\n",
(os == Win9x) ? "Win9x" : (os == WinNT) ? "WinNT" : (os == WinCE) ? "WinCE" : "Non standard Win32", maj, min,
build, desc);
(os == Win9x) ? "Win9x"
: (os == WinNT) ? "WinNT"
: (os == WinCE) ? "WinCE"
: "Non standard Win32",
maj, min, build, desc);
// get system memory info
MEMORYSTATUS mem_stat;