From 38128ea13497715bc930940b9a81c73c81f7c21f Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Tue, 16 Apr 2024 23:59:11 +0300 Subject: [PATCH] Additional clang-format --- .clang-format | 3 +- 2dlib/surface.cpp | 2 +- Descent3/AImain.cpp | 10 +- Descent3/GameLoop.cpp | 26 ++-- Descent3/LoadLevel.cpp | 2 +- Descent3/Mission.cpp | 2 +- Descent3/NewPyroGauges.cpp | 4 +- Descent3/ObjInit.cpp | 2 +- Descent3/Player.cpp | 6 +- Descent3/SLEW.cpp | 124 ++++++++--------- Descent3/TelCom.cpp | 6 +- Descent3/TelComAutoMap.cpp | 2 +- Descent3/aistruct.h | 6 +- Descent3/aiterrain.cpp | 4 +- Descent3/config.cpp | 5 +- Descent3/credits.cpp | 2 +- Descent3/ctlconfig.cpp | 5 +- Descent3/damage.cpp | 8 +- Descent3/damage.h | 8 +- Descent3/demofile.cpp | 6 +- Descent3/descent.cpp | 10 +- Descent3/difficulty.h | 2 +- Descent3/game.cpp | 4 +- Descent3/game.h | 4 +- Descent3/gameevent.cpp | 2 +- Descent3/gamesequence.cpp | 26 ++-- Descent3/gametexture.cpp | 2 +- Descent3/hotspotmap.cpp | 2 +- Descent3/hud.h | 4 +- Descent3/init.cpp | 6 +- Descent3/list.cpp | 2 +- Descent3/lnxmain.cpp | 2 +- Descent3/loadstate.cpp | 4 +- Descent3/macmain.cpp | 8 +- Descent3/menu.cpp | 8 +- Descent3/mission_download.cpp | 2 +- Descent3/mmItem.cpp | 9 +- Descent3/multi.cpp | 6 +- Descent3/multi.h | 8 +- Descent3/multi_connect.cpp | 4 +- Descent3/multi_dll_mgr.cpp | 2 +- Descent3/multi_server.cpp | 8 +- Descent3/multi_server.h | 2 +- Descent3/multi_ui.cpp | 2 +- Descent3/newui_core.cpp | 4 +- Descent3/newui_core.h | 2 +- Descent3/object.cpp | 48 +++---- Descent3/object_external_struct.h | 16 +-- Descent3/objinfo.cpp | 6 +- Descent3/procedurals.cpp | 6 +- Descent3/render.cpp | 10 +- Descent3/room.cpp | 30 ++-- Descent3/ship.h | 8 +- Descent3/soar.h | 6 +- Descent3/soar_helpers.cpp | 10 +- Descent3/subtitles.cpp | 8 +- Descent3/weapon.cpp | 2 +- bitmap/tga.cpp | 2 +- cfile/CFILE.cpp | 7 +- dd_lnxsound/ddlnxsound.h | 2 +- dd_lnxsound/mixer.cpp | 4 +- dd_sndlib/Ds3dlib.cpp | 4 +- dd_sndlib/auddev.h | 2 +- dd_sndlib/dsound3d.cpp | 4 +- dd_sndlib/eax.h | 2 +- dd_sndlib/ia3dapi.h | 24 ++-- ddgr_mac/ddgr_mac.cpp | 4 +- ddgr_mac/macOSSurface.cpp | 14 +- ddio_lnx/lnxkey.cpp | 8 +- ddio_lnx/lnxkey_ggi.cpp | 14 +- ddio_lnx/lnxkey_null.cpp | 8 +- ddio_lnx/lnxkey_raw.cpp | 18 +-- ddio_lnx/lnxkey_xwin.cpp | 4 +- ddio_lnx/lnxmouse.cpp | 2 +- ddio_mac/macController.cpp | 6 +- ddio_mac/macfile.cpp | 4 +- ddio_mac/macjoy.cpp | 4 +- ddio_mac/mackey.cpp | 4 +- ddio_win/winkey.cpp | 8 +- ddvid_lnx/video_lnx.cpp | 2 +- lib/BYTESWAP.H | 2 +- lib/Macros.h | 10 +- lib/debug.h | 4 +- lib/ds3dlib.h | 6 +- lib/findintersection.h | 2 +- lib/fix.h | 2 +- lib/gameos.h | 6 +- lib/linux/lnxdraw.h | 6 +- lib/lnxscreenmode.h | 4 +- lib/mem.h | 2 +- lib/music.h | 2 +- lib/networking.h | 20 +-- lib/pserror.h | 2 +- lib/rtperformance.h | 2 +- lib/ssl_lib.h | 2 +- lib/texture.h | 2 +- lib/win/DirectX/d3dtypes.h | 16 +-- lib/win/DirectX/ddraw.h | 6 +- lib/win/DirectX/dplay.h | 94 ++++++------- lib/win/DirectX/dplobby.h | 10 +- lib/win/DirectX/dsound.h | 18 +-- libmve/mvelibl.cpp | 4 +- linux/lnxapp.cpp | 2 +- linux/lnxcon.cpp | 2 +- linux/lnxcon_raw.cpp | 2 +- linux/registry.cpp | 2 +- lnxcontroller/lnxcontroller.cpp | 42 +++--- lnxmvelib/lnxdsound.cpp | 2 +- lnxmvelib/mvelibl.cpp | 4 +- mac/InSprocket.c | 8 +- mac/MACAPP.CPP | 8 +- mac/MACHEADERSD3.C | 218 +++++++++++++++--------------- mac/MACONLY.H | 4 +- mac/MACSOUND.CPP | 2 +- mac/MACSTREAMAUDIO.CPP | 8 +- mac/MAC_GLIDE_DEBUG.H | 2 +- mac/MAC_GLIDE_RELEASE.H | 2 +- mac/MAC_LLSOUND.CPP | 14 +- mac/MacDisplays.h | 2 +- mac/SNDSPROCKET.CPP | 2 +- mac/macdatabase.cpp | 96 ++++++------- mac/macdebug.cpp | 2 +- manage/manage.cpp | 8 +- manage/weaponpage.cpp | 4 +- mem/mem.cpp | 12 +- misc/endian.cpp | 2 +- misc/error.cpp | 2 +- music/sequencer.cpp | 2 +- netcon/includes/con_dll.h | 2 +- netcon/includes/inetgetfile.h | 4 +- netcon/lanclient/lanclient.h | 2 +- netgames/dmfc/dmfcbase.cpp | 2 +- netgames/dmfc/dmfcclient.cpp | 2 +- netgames/dmfc/dmfcinternal.h | 12 +- netgames/dmfc/dmfcserver.cpp | 2 +- netgames/includes/DMFC.h | 4 +- netgames/includes/idmfc.h | 6 +- networking/networking.cpp | 6 +- physics/Collide.cpp | 9 +- physics/FindIntersection.cpp | 19 +-- physics/physics.cpp | 7 +- renderer/Direct3D.cpp | 2 +- renderer/HardwareOpenGL.cpp | 2 +- renderer/RendererConfig.h | 4 +- renderer/SoftwareOpenGL.cpp | 26 ++-- renderer/dyna_gl_ryan.h | 2 +- renderer/opengl.cpp | 24 ++-- renderer/opengl_ryan.cpp | 30 ++-- renderer/renderer.cpp | 12 +- scripts/AIGame.cpp | 15 +- scripts/DallasFuncs.cpp | 6 +- scripts/aigame2.cpp | 4 +- scripts/aigame4.cpp | 2 +- scripts/lnx/osiris_vector.h | 2 +- scripts/osiris_vector.h | 2 +- sndlib/sndrender.cpp | 2 +- stream_audio/streamaudio.cpp | 2 +- ui/UIRes.cpp | 4 +- win32/WinController.cpp | 42 +++--- win32/winapp.cpp | 7 +- win32/windebug.cpp | 2 +- 161 files changed, 809 insertions(+), 805 deletions(-) diff --git a/.clang-format b/.clang-format index 4ee5a1b7..3a39fe3f 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,5 @@ --- -Language: Cpp -# BasedOnStyle: LLVM +BasedOnStyle: LLVM AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignConsecutiveMacros: false diff --git a/2dlib/surface.cpp b/2dlib/surface.cpp index de85524b..21e5ea59 100644 --- a/2dlib/surface.cpp +++ b/2dlib/surface.cpp @@ -601,7 +601,7 @@ void grSurface::xlat16_16(char *data, int w, int h, int format) { int temp_pix = sptr[(FixToInt(fv) * w) + FixToInt(fu)]; int r = (temp_pix >> 8) & 0xf; int g = (temp_pix >> 4) & 0xf; - int b = (temp_pix)&0xf; + int b = (temp_pix) & 0xf; r <<= 4; g <<= 4; diff --git a/Descent3/AImain.cpp b/Descent3/AImain.cpp index 6f61930a..3be7e398 100644 --- a/Descent3/AImain.cpp +++ b/Descent3/AImain.cpp @@ -1979,7 +1979,7 @@ bool goal_do_avoid_walls(object *obj, vector *mdir) { } // mprintf((0, "Dist %f %f (%d, %d)\n", dist, scale, - //facelist[i].room_index, facelist[i].face_index)); + // facelist[i].room_index, facelist[i].face_index)); if (dist < closest_dist) { closest_dist = dist; @@ -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); diff --git a/Descent3/GameLoop.cpp b/Descent3/GameLoop.cpp index bb93fe18..4d73c97b 100644 --- a/Descent3/GameLoop.cpp +++ b/Descent3/GameLoop.cpp @@ -845,7 +845,7 @@ #include "rtperformance.h" #include "demofile.h" #include "d3music.h" -//#include "gamespy.h" +// #include "gamespy.h" #include "osiris_dll.h" #include "aiambient.h" #include "marker.h" @@ -908,7 +908,7 @@ bool Rendering_main_view = false; bool Skip_render_game_frame = false; bool Menu_interface_mode = false; -//#ifdef GAMEGAUGE +// #ifdef GAMEGAUGE int frames_one_second = 0; int min_one_second = 0x7fffffff; int max_one_second = 0; @@ -921,7 +921,7 @@ short gamegauge_fpslog[GAMEGAUGE_MAX_LOG]; bool Game_gauge_do_time_test = false; char Game_gauge_usefile[_MAX_PATH] = "gg.dem"; -//#endif +// #endif longlong last_timer = 0; @@ -1005,7 +1005,7 @@ void ShrinkWindow() { #define CV_MARKER7 8 // Last marker view #define CV_MARKER8 9 // Last marker view #define CV_GUIDEBOT 10 // Guide-Bot -//#define CV_COOP 3 //View from a coop player +// #define CV_COOP 3 //View from a coop player #define NUM_CAMERA_VIEWS 3 @@ -1281,16 +1281,16 @@ void ProcessNormalKey(int key) { Clear_screen = 4; // clears screen. break; - //#ifndef DEMO + // #ifndef DEMO case KEY_F5: Game_interface_mode = GAME_TOGGLE_DEMO; return; case KEY_ALTED + KEY_F5: DemoAbort(true); return; - //#endif - // case KEY_SHIFTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_CARGO;return; - // case KEY_ALTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return; + // #endif + // case KEY_SHIFTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_CARGO;return; + // case KEY_ALTED+KEY_LAPOSTRO: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return; case KEY_SHIFTED + KEY_TAB: Game_interface_mode = GAME_TELCOM_BRIEFINGS; return; @@ -2474,9 +2474,9 @@ void ProcessKeys() { ProcessTestKeys(key); #endif - //#ifdef DEMO + // #ifdef DEMO DemoCheats(key); - //#endif + // #endif } } @@ -2719,11 +2719,11 @@ void GameRenderFrame(void) { // Increment frame count FrameCount++; - //#ifdef GAMEGAUGE + // #ifdef GAMEGAUGE frames_one_second++; gamegauge_total_frames++; - //#endif - // Update our glows + // #endif + // Update our glows PostUpdateAllLightGlows(); // Reset our powerup sparkle time if it has overflowed diff --git a/Descent3/LoadLevel.cpp b/Descent3/LoadLevel.cpp index cad28588..e1f3a60e 100644 --- a/Descent3/LoadLevel.cpp +++ b/Descent3/LoadLevel.cpp @@ -1375,7 +1375,7 @@ void WriteAllDoorways(CFILE *ofile); // Macro to translate old file handles (pre-version 94) to new ones #define OLD_HANDLE_OBJNUM_MASK 0x3ff // to mask off the object number part of the handle #define OLD_HANDLE_COUNT_MASK 0xfffffc00 // to maks off the count part of the handle -#define XLATE_HANDLE(handle) ((((handle)&OLD_HANDLE_COUNT_MASK) << 1) + ((handle)&OLD_HANDLE_OBJNUM_MASK)) +#define XLATE_HANDLE(handle) ((((handle) & OLD_HANDLE_COUNT_MASK) << 1) + ((handle) & OLD_HANDLE_OBJNUM_MASK)) /* diff --git a/Descent3/Mission.cpp b/Descent3/Mission.cpp index 822dc191..ef857456 100644 --- a/Descent3/Mission.cpp +++ b/Descent3/Mission.cpp @@ -883,7 +883,7 @@ bool LoadMission(const char *mssn) { #endif #else - //#endif + // #endif tLevelNode *lvls = NULL; // Temporary storage for level data. tMission *msn; CFILE *fp = NULL; // Mission file diff --git a/Descent3/NewPyroGauges.cpp b/Descent3/NewPyroGauges.cpp index 63a41d8f..10682543 100644 --- a/Descent3/NewPyroGauges.cpp +++ b/Descent3/NewPyroGauges.cpp @@ -60,7 +60,9 @@ ////////////////////////////////////////////////////////////////////////////// -static struct { int ringbmp; } NewPyroGaugeData; +static struct { + int ringbmp; +} NewPyroGaugeData; ////////////////////////////////////////////////////////////////////////////// diff --git a/Descent3/ObjInit.cpp b/Descent3/ObjInit.cpp index d32923de..6c4599c4 100644 --- a/Descent3/ObjInit.cpp +++ b/Descent3/ObjInit.cpp @@ -598,7 +598,7 @@ #include "sounds.h" #include "mem.h" #include "marker.h" -//#include +// #include #include #include "psrand.h" // Allocate and initialize an effect_info struct for an object diff --git a/Descent3/Player.cpp b/Descent3/Player.cpp index 1000a9d3..93ad7bf4 100644 --- a/Descent3/Player.cpp +++ b/Descent3/Player.cpp @@ -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) diff --git a/Descent3/SLEW.cpp b/Descent3/SLEW.cpp index d06c45a6..e68910c1 100644 --- a/Descent3/SLEW.cpp +++ b/Descent3/SLEW.cpp @@ -394,80 +394,80 @@ int SlewFrame(object *obj, int movement_limitations) { new_room = obj->roomnum; } else #endif - // NOTE LINK TO ABOVE IF - if (outside_mine) { // starting outside the mine? + // NOTE LINK TO ABOVE IF + if (outside_mine) { // starting outside the mine? - // See if we've moved back into a room - new_room = FindPointRoom(&new_pos); + // See if we've moved back into a room + new_room = FindPointRoom(&new_pos); - if (new_room != -1) { // back in the mine - outside_mine = 0; - mprintf((0, "SLEW: Re-entered mine at room %d\n", new_room)); - } else // not back in the mine - new_room = obj->roomnum; - } else { - bool was_outside = (ROOMNUM_OUTSIDE(obj->roomnum) != 0); + if (new_room != -1) { // back in the mine + outside_mine = 0; + mprintf((0, "SLEW: Re-entered mine at room %d\n", new_room)); + } else // not back in the mine + new_room = obj->roomnum; + } else { + bool was_outside = (ROOMNUM_OUTSIDE(obj->roomnum) != 0); - // Limit new position to terrain bounds if outside - if (was_outside) { - if (new_pos.x < 1.0) - new_pos.x = 1.0; - if (new_pos.x > TERRAIN_WIDTH * TERRAIN_SIZE - 1.0) - new_pos.x = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0; - if (new_pos.z < 1.0) - new_pos.z = 1.0; - if (new_pos.z > TERRAIN_DEPTH * TERRAIN_SIZE - 1.0) - new_pos.z = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0; - } + // Limit new position to terrain bounds if outside + if (was_outside) { + if (new_pos.x < 1.0) + new_pos.x = 1.0; + if (new_pos.x > TERRAIN_WIDTH * TERRAIN_SIZE - 1.0) + new_pos.x = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0; + if (new_pos.z < 1.0) + new_pos.z = 1.0; + if (new_pos.z > TERRAIN_DEPTH * TERRAIN_SIZE - 1.0) + new_pos.z = TERRAIN_WIDTH * TERRAIN_SIZE - 1.0; + } - // Call FVI up get updated room number - fq.p0 = &obj->pos; - fq.startroom = obj->roomnum; - fq.p1 = &new_pos; - fq.rad = 0; - fq.thisobjnum = OBJNUM(obj); - fq.ignore_obj_list = NULL; - fq.flags = FQ_IGNORE_RENDER_THROUGH_PORTALS; - fate = fvi_FindIntersection(&fq, &hit_info); + // Call FVI up get updated room number + fq.p0 = &obj->pos; + fq.startroom = obj->roomnum; + fq.p1 = &new_pos; + fq.rad = 0; + fq.thisobjnum = OBJNUM(obj); + fq.ignore_obj_list = NULL; + fq.flags = FQ_IGNORE_RENDER_THROUGH_PORTALS; + fate = fvi_FindIntersection(&fq, &hit_info); - // If bad room, don't move - if ((fate == HIT_OUT_OF_TERRAIN_BOUNDS) || (hit_info.hit_room == -1)) { - new_room = obj->roomnum; - new_pos = obj->pos; - } else - new_room = hit_info.hit_room; + // If bad room, don't move + if ((fate == HIT_OUT_OF_TERRAIN_BOUNDS) || (hit_info.hit_room == -1)) { + new_room = obj->roomnum; + new_pos = obj->pos; + } else + new_room = hit_info.hit_room; - // The object hit a wall, and maybe went outside the mine. - if (fate == HIT_WALL) { - int t; + // The object hit a wall, and maybe went outside the mine. + if (fate == HIT_WALL) { + int t; - mprintf((0, "SLEW: hit wall\n")); + mprintf((0, "SLEW: hit wall\n")); - // Check if we're in a room - t = FindPointRoom(&new_pos); + // Check if we're in a room + t = FindPointRoom(&new_pos); - if (t != -1) { // We're in a room - new_room = t; - mprintf((0, "SLEW: still in mine in room %d\n", new_room)); - } else { // Not in a room. Set a special flag - outside_mine = 1; - mprintf((0, "SLEW: left mine from room %d\n", new_room)); + if (t != -1) { // We're in a room + new_room = t; + mprintf((0, "SLEW: still in mine in room %d\n", new_room)); + } else { // Not in a room. Set a special flag + outside_mine = 1; + mprintf((0, "SLEW: left mine from room %d\n", new_room)); + } + } + + if (new_room != obj->roomnum) { // if we've changed rooms, say so + if (ROOMNUM_OUTSIDE(new_room)) + if (was_outside) + mprintf((0, "SLEW: Moved to cell %d, BOA TR %d\n", CELLNUM(new_room), TERRAIN_REGION(new_room))); + else + mprintf((0, "SLEW: Moved outside to cell %d\n", CELLNUM(new_room))); + else if (was_outside) + mprintf((0, "SLEW: Moved inside to room %d\n", new_room)); + else + mprintf((0, "SLEW: Moved into room %d\n", new_room)); } } - if (new_room != obj->roomnum) { // if we've changed rooms, say so - if (ROOMNUM_OUTSIDE(new_room)) - if (was_outside) - mprintf((0, "SLEW: Moved to cell %d, BOA TR %d\n", CELLNUM(new_room), TERRAIN_REGION(new_room))); - else - mprintf((0, "SLEW: Moved outside to cell %d\n", CELLNUM(new_room))); - else if (was_outside) - mprintf((0, "SLEW: Moved inside to room %d\n", new_room)); - else - mprintf((0, "SLEW: Moved into room %d\n", new_room)); - } - } - // Now we have the new room, so update the object position ObjSetPos(obj, &new_pos, new_room, NULL, false); diff --git a/Descent3/TelCom.cpp b/Descent3/TelCom.cpp index d5d41550..eee3098f 100644 --- a/Descent3/TelCom.cpp +++ b/Descent3/TelCom.cpp @@ -600,9 +600,9 @@ void TelComMain(bool ingame, bool SelectShip) { TelcomStartSound(TCSND_RUNNING); TelcomStopSound(TCSND_STARTUP); - //#ifdef DEMO + // #ifdef DEMO // Telcom_system.current_status = TS_MISSION; - //#endif + // #endif // initialize this to -1 so we get events right away Telcom_mouse_last_effect = -1; @@ -1211,7 +1211,7 @@ bool TelComMainMenu(tTelComInfo *tcs) { } break; case TCCARGO: - //#if (defined DEMO)||(defined OEM) + // #if (defined DEMO)||(defined OEM) MMButtons[mm].enabled = false; MMButtons[mm].system = TS_OFF; /* diff --git a/Descent3/TelComAutoMap.cpp b/Descent3/TelComAutoMap.cpp index 531c3766..1ee12f9a 100644 --- a/Descent3/TelComAutoMap.cpp +++ b/Descent3/TelComAutoMap.cpp @@ -509,7 +509,7 @@ void TCAMRenderRoom(int roomnum) { int r = (texel >> 10) & 0x1f; int g = (texel >> 5) & 0x1f; - int b = (texel)&0x1f; + int b = (texel) & 0x1f; p->p3_r = lm_red[r]; p->p3_g = lm_green[g]; diff --git a/Descent3/aistruct.h b/Descent3/aistruct.h index cb7ac2ab..175f1ba9 100644 --- a/Descent3/aistruct.h +++ b/Descent3/aistruct.h @@ -422,9 +422,9 @@ extern float AI_last_time_room_noise_alert_time[MAX_ROOMS + 8]; #define AIC_STATIC 0 #define AIC_PURE_PATH 1 #define AIC_AIS_FULL 2 -//#define AIC_DYNAMIC 3 -//#define AIC_AIS_MOVEMENT 4 -//#define AIC_AIS_FIRING 5 +// #define AIC_DYNAMIC 3 +// #define AIC_AIS_MOVEMENT 4 +// #define AIC_AIS_FIRING 5 // AI Action -- What is it doing? diff --git a/Descent3/aiterrain.cpp b/Descent3/aiterrain.cpp index 7df6029a..f5f68306 100644 --- a/Descent3/aiterrain.cpp +++ b/Descent3/aiterrain.cpp @@ -68,12 +68,12 @@ void ait_terrain_clean() { ai_terrain_check_list[CELLNUM(ai_segs_checked[i]) >> 3] = 0; } - //#ifdef _DEBUG + // #ifdef _DEBUG // for(i = 0; i < ((TERRAIN_WIDTH*TERRAIN_DEPTH)>>3)+1; i++) // { // ASSERT(ai_terrain_check_list[i] == 0); // } - //#endif + // #endif ai_num_segs_checked = 0; } diff --git a/Descent3/config.cpp b/Descent3/config.cpp index 8f8486ac..96357e80 100644 --- a/Descent3/config.cpp +++ b/Descent3/config.cpp @@ -1205,8 +1205,9 @@ struct hud_menu { sel = (stat & (STAT_SHIELDS + STAT_ENERGY)) ? 1 : (grstat & (STAT_SHIELDS + STAT_ENERGY)) ? 2 : 0; 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; + sel = (stat & (STAT_PRIMARYLOAD + STAT_SECONDARYLOAD)) ? 1 + : (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; diff --git a/Descent3/credits.cpp b/Descent3/credits.cpp index faf598c2..bdb1f7f1 100644 --- a/Descent3/credits.cpp +++ b/Descent3/credits.cpp @@ -408,7 +408,7 @@ void Credits_Display(void) { D3MusicStop(); ddio_KeyFlush(); // ddio_MouseReset(); // -mouse shouldn't be reset. ui system gets hosed -//unfortunately under NT. +// unfortunately under NT. #endif } diff --git a/Descent3/ctlconfig.cpp b/Descent3/ctlconfig.cpp index 37de0a9f..661e3132 100644 --- a/Descent3/ctlconfig.cpp +++ b/Descent3/ctlconfig.cpp @@ -1433,8 +1433,9 @@ void CtlConfig(int mode) { cfg_cb_data.wpncfg = &wpncfg; 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); + menu.SetCurrentOption((mode == CTLCONFIG_WPNSEL) ? IDV_WPNSEL + : (mode == CTLCONFIG_CONTROLLER) ? IDV_CCONFIG + : IDV_KCONFIG); menu.SetOnOptionSwitchCB(CtlConfigSwitchCB, (void *)&cfg_cb_data); // if(mode==CTLCONFIG_CONTROLLER) { diff --git a/Descent3/damage.cpp b/Descent3/damage.cpp index 278bfadc..8f48c3cf 100644 --- a/Descent3/damage.cpp +++ b/Descent3/damage.cpp @@ -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; diff --git a/Descent3/damage.h b/Descent3/damage.h index 54a2c9e0..b4189767 100644 --- a/Descent3/damage.h +++ b/Descent3/damage.h @@ -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 \ No newline at end of file diff --git a/Descent3/demofile.cpp b/Descent3/demofile.cpp index 82777614..ee33b83d 100644 --- a/Descent3/demofile.cpp +++ b/Descent3/demofile.cpp @@ -1400,10 +1400,10 @@ void DemoReadCollideGenericWeapon(void) { } bool LoadDemoDialog() { - //#ifdef DEMO + // #ifdef DEMO // DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK); // return false; - //#else + // #else char file[_MAX_PATH * 2]; @@ -1414,7 +1414,7 @@ bool LoadDemoDialog() { return true; } return false; - //#endif + // #endif } // This function aborts the demo recording or playback, regardless of the state diff --git a/Descent3/descent.cpp b/Descent3/descent.cpp index 350d0b56..37075d7a 100644 --- a/Descent3/descent.cpp +++ b/Descent3/descent.cpp @@ -419,7 +419,7 @@ char Descent3_temp_directory[_MAX_PATH]; // temp directory to put temp files // Descent3: Choke 1 // Initializes game elements and invokes the MainLoop // --------------------------------------------------------------------------- -//#define BETA +// #define BETA #if (defined(OEM) || defined(DEMO)) void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f); @@ -568,7 +568,7 @@ void Descent3() { // Otherwise this should be called from the main function. // --------------------------------------------------------------------------- -//#ifdef GAMEGAUGE +// #ifdef GAMEGAUGE extern int frames_one_second; extern int min_one_second; extern int max_one_second; @@ -577,7 +577,7 @@ extern int gamegauge_total_frames; extern float gamegauge_total_time; extern short gamegauge_fpslog[GAMEGAUGE_MAX_LOG]; -//#endif +// #endif void MainLoop() { int exit_game = 0; @@ -610,7 +610,7 @@ void MainLoop() { Credits_Display(); Function_mode = MENU_MODE; break; - //#ifdef GAMEGAUGE + // #ifdef GAMEGAUGE case GAMEGAUGE_MODE: { int c; for (c = 0; c < GAMEGAUGE_MAX_LOG; c++) @@ -619,7 +619,7 @@ void MainLoop() { PlayGame(); // exit_game = 1; } break; - //#endif + // #endif #ifdef EDITOR case EDITOR_GAME_MODE: // run level and then instead of menus, go to editor. QuickPlayGame(); diff --git a/Descent3/difficulty.h b/Descent3/difficulty.h index 3601d120..a948b5e4 100644 --- a/Descent3/difficulty.h +++ b/Descent3/difficulty.h @@ -9,7 +9,7 @@ extern ubyte ingame_difficulty; // DAJ static global instead of subroutine call for speed #define DIFF_LEVEL (((Game_mode & GM_MULTI)) ? Netgame.difficulty : ingame_difficulty) -//#define DIFF_LEVEL (((Game_mode & GM_MULTI))?Netgame.difficulty:dCurrentPilotDifficulty()) +// #define DIFF_LEVEL (((Game_mode & GM_MULTI))?Netgame.difficulty:dCurrentPilotDifficulty()) extern float Diff_ai_dodge_percent[5]; // extern float Diff_ai_dodge_speed[5]; // diff --git a/Descent3/game.cpp b/Descent3/game.cpp index 21098edf..1950829e 100644 --- a/Descent3/game.cpp +++ b/Descent3/game.cpp @@ -928,14 +928,14 @@ void SetScreenMode(int sm, bool force_res_change) { rend_initted = 0; } } - //#ifdef RELEASE + // #ifdef RELEASE // else if (sm == SM_CINEMATIC && (Renderer_type == RENDERER_GLIDE) ) { // if (rend_initted) { // rend_Close(); // rend_initted = 0; // } // } - //#endif + // #endif else { int scr_width, scr_height, scr_bitdepth; diff --git a/Descent3/game.h b/Descent3/game.h index 8b105a9a..a7f3b61f 100644 --- a/Descent3/game.h +++ b/Descent3/game.h @@ -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 diff --git a/Descent3/gameevent.cpp b/Descent3/gameevent.cpp index a74e3f10..052ce5d4 100644 --- a/Descent3/gameevent.cpp +++ b/Descent3/gameevent.cpp @@ -51,7 +51,7 @@ #include "gameloop.h" #include "spew.h" #include -//#include +// #include #include "mem.h" #include "player.h" diff --git a/Descent3/gamesequence.cpp b/Descent3/gamesequence.cpp index bd436348..d7181a20 100644 --- a/Descent3/gamesequence.cpp +++ b/Descent3/gamesequence.cpp @@ -1418,9 +1418,9 @@ void SetCurrentLevel(int level) { void StartLevelSounds(); -//#ifdef GAMEGAUGE +// #ifdef GAMEGAUGE extern float gamegauge_start_time; -//#endif +// #endif // Get rid of any viewer objects in the level void ClearViewerObjects() { @@ -1620,9 +1620,9 @@ void StartLevel() { Gametime = 0.0f; // Start the clock InitFrameTime(); - //#ifdef GAMEGAUGE + // #ifdef GAMEGAUGE gamegauge_start_time = timer_GetTime(); - //#endif + // #endif LoadLevelProgress(LOAD_PROGRESS_DONE, 0); #ifdef MACINTOSH @@ -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 @@ -2084,15 +2084,15 @@ void RunGameMenu() { // #endif } break; case GAME_TELCOM_CARGO: { - //#ifndef DEMO + // #ifndef DEMO DoWaitPopup(true, TXT_TELCOMLOAD); ui_ShowCursor(); TelComShow(TS_CARGO); ui_HideCursor(); DoWaitPopup(false); - //#else + // #else // DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK); - //#endif + // #endif } break; case GAME_TELCOM_BRIEFINGS: { DoWaitPopup(true, TXT_TELCOMLOAD); @@ -2102,15 +2102,15 @@ void RunGameMenu() { DoWaitPopup(false); } break; case GAME_TELCOM_AUTOMAP: { - //#ifndef DEMO + // #ifndef DEMO DoWaitPopup(true, TXT_TELCOMLOAD); ui_ShowCursor(); TelComShow(TS_MAP); ui_HideCursor(); DoWaitPopup(false); - //#else + // #else // DoMessageBox(TXT_ERROR, TXT_WRONGVERSION, MSGBOX_OK); - //#endif + // #endif } break; case GAME_PAUSE_INTERFACE: if (Game_mode & GM_MULTI) @@ -2371,7 +2371,7 @@ extern int need_to_page_in; extern int need_to_page_num; int paged_in_num = 0; -//#define PAGED_IN_CALC paged_in_count ? (float)paged_in_count/(float)need_to_page_in : 0.0f +// #define PAGED_IN_CALC paged_in_count ? (float)paged_in_count/(float)need_to_page_in : 0.0f #define PAGED_IN_CALC paged_in_num ? (float)paged_in_num / (float)need_to_page_num : 0.0f void PageInShip(int id) { int i, t; diff --git a/Descent3/gametexture.cpp b/Descent3/gametexture.cpp index a8e811a2..bb6c6b3f 100644 --- a/Descent3/gametexture.cpp +++ b/Descent3/gametexture.cpp @@ -767,7 +767,7 @@ void BuildTextureBumpmaps(int texhandle) { int red = ((color >> 10) & 0x1f) << 3; int green = ((color >> 5) & 0x1f) << 3; - int blue = ((color)&0x1f) << 3; + int blue = ((color) & 0x1f) << 3; buffer[i * w + t] = (sbyte)(0.29 * red + 0.60 * green + 0.11 * blue); } diff --git a/Descent3/hotspotmap.cpp b/Descent3/hotspotmap.cpp index 14a0b668..8f146b73 100644 --- a/Descent3/hotspotmap.cpp +++ b/Descent3/hotspotmap.cpp @@ -102,7 +102,7 @@ void makecorner(int corner_bmp, int back_bmp, char *tmap, int l, int t, int r, i ushort menutga_translate_pixel(int pixel, char *alpha_value) { int red = ((pixel >> 16) & 0xFF); int green = ((pixel >> 8) & 0xFF); - int blue = ((pixel)&0xFF); + int blue = ((pixel) & 0xFF); int alpha = ((pixel >> 24) & 0xFF); *alpha_value = alpha; diff --git a/Descent3/hud.h b/Descent3/hud.h index bdec428e..ecf13d97 100644 --- a/Descent3/hud.h +++ b/Descent3/hud.h @@ -315,8 +315,8 @@ extern float Hud_aspect_x; extern float Hud_aspect_y; // normalize hud coordinates -#define HUD_X(_x) ((float)(_x)*Hud_aspect_x) -#define HUD_Y(_y) ((float)(_y)*Hud_aspect_y) +#define HUD_X(_x) ((float)(_x) * Hud_aspect_x) +#define HUD_Y(_y) ((float)(_y) * Hud_aspect_y) // number of shield frames in gauge #define NUM_SHIELD_GAUGE_FRAMES 5 diff --git a/Descent3/init.cpp b/Descent3/init.cpp index 221cd116..e8d2da1b 100644 --- a/Descent3/init.cpp +++ b/Descent3/init.cpp @@ -960,7 +960,7 @@ #include "d3music.h" #include "PilotPicsAPI.h" #include "osiris_dll.h" -//#include "gamespy.h" +// #include "gamespy.h" #include "mem.h" #include "multi.h" #include "marker.h" @@ -970,7 +970,7 @@ #include "vibeinterface.h" // Uncomment this for all non-US versions!! -//#define LASERLOCK +// #define LASERLOCK // Uncomment this to allow all languages #define ALLOW_ALL_LANG 1 @@ -2020,7 +2020,7 @@ void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_tim #endif void IntroScreen() { -//#if (defined(OEM) || defined(DEMO) ) +// #if (defined(OEM) || defined(DEMO) ) #ifdef DEMO #ifdef MACINTOSH ShowStaticScreen("graphsim.ogf", true, 3.0); diff --git a/Descent3/list.cpp b/Descent3/list.cpp index 7db4af00..070b386b 100644 --- a/Descent3/list.cpp +++ b/Descent3/list.cpp @@ -1,5 +1,5 @@ #include "list.h" -//#include +// #include #include "mem.h" // Allocates space for a new list node, returning the pointer to it diff --git a/Descent3/lnxmain.cpp b/Descent3/lnxmain.cpp index 894589ba..b9ef85a2 100644 --- a/Descent3/lnxmain.cpp +++ b/Descent3/lnxmain.cpp @@ -124,7 +124,7 @@ static volatile char already_tried_signal_cleanup = 0; #define GAME_VERS_EXT "" #endif -//#define DEDICATED +// #define DEDICATED namespace { extern "C" { char game_version_buffer[150]; diff --git a/Descent3/loadstate.cpp b/Descent3/loadstate.cpp index 2f2df20e..97f00b57 100644 --- a/Descent3/loadstate.cpp +++ b/Descent3/loadstate.cpp @@ -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) diff --git a/Descent3/macmain.cpp b/Descent3/macmain.cpp index 8a2e9c32..4192d6f2 100644 --- a/Descent3/macmain.cpp +++ b/Descent3/macmain.cpp @@ -53,7 +53,7 @@ #ifdef USE_PROFILER #include -//#include "SpotlightAPI.h" +// #include "SpotlightAPI.h" #endif #ifdef NEEDED // ========================= @@ -320,7 +320,7 @@ int main(int argc, char *argv[]) { Descent = d3; - //¥ Initialize Metrowerks Code Profiler + // ¥ Initialize Metrowerks Code Profiler bool profilerInitted = false; #ifdef USE_PROFILER if (!ProfilerInit(collectDetailed, PPCTimeBase, 1024, 50)) { @@ -332,13 +332,13 @@ int main(int argc, char *argv[]) { } #endif - //¥ Here we go!!! + // ¥ Here we go!!! PreInitD3Systems(); d3->init(); d3->run(); -//¥ Close the Metrowerks Code Profiler +// ¥ Close the Metrowerks Code Profiler #ifdef USE_PROFILER if (profilerInitted) { mprintf((2, "Dumping profiler results and closing profiler\n")); diff --git a/Descent3/menu.cpp b/Descent3/menu.cpp index 1d6acf2b..d1573f98 100644 --- a/Descent3/menu.cpp +++ b/Descent3/menu.cpp @@ -725,9 +725,9 @@ int MainMenu() { main_menu.Create(); main_menu.AddItem(IDV_NEWGAME, KEY_N, TXT_MENUNEWGAME, MM_STARTMENU_TYPE); main_menu.AddItem(IDV_LOADGAME, KEY_L, TXT_LOADGAME); - //#ifndef DEMO + // #ifndef DEMO main_menu.AddItem(IDV_PLAYDEMO, KEY_D, TXT_VIEWDEMO); - //#endif + // #endif main_menu.AddItem(IDV_OPTIONS, KEY_O, TXT_MENUOPTIONS); main_menu.AddItem(IDV_PILOT, KEY_P, TXT_MENUPILOTS); main_menu.AddItem(IDV_MULTIPLAYER, KEY_M, TXT_MENUMULTIPLAYER); @@ -1230,7 +1230,7 @@ bool MenuNewGame() { i = generate_mission_listbox(msn_lb, n_missions, filelist, LocalLevelsDir, "*.msn"); #endif i += generate_mission_listbox(msn_lb, n_missions - i, filelist + i, D3MissionsDir, "*.mn3"); - //#ifdef RELEASE + // #ifdef RELEASE int k; for (k = 0; k < n_missions; k++) { if (!filelist[k]) @@ -1249,7 +1249,7 @@ bool MenuNewGame() { msn_lb->AddItem(TXT_MAINMISSION); n_missions++; } -//#endif +// #endif #else #define OEM_MISSION_NAME "Descent 3: Sol Ascent" #define OEM_TRAINING_NAME "Pilot Training " diff --git a/Descent3/mission_download.cpp b/Descent3/mission_download.cpp index 15aa934c..429f3a83 100644 --- a/Descent3/mission_download.cpp +++ b/Descent3/mission_download.cpp @@ -113,7 +113,7 @@ #include "ddio.h" #include "stringtable.h" #include "multi_dll_mgr.h" -//#include "inetgetfile.h" +// #include "inetgetfile.h" #include "grtext.h" #include "Mission.h" #include "mission_download.h" diff --git a/Descent3/mmItem.cpp b/Descent3/mmItem.cpp index 985b39cc..885252f0 100644 --- a/Descent3/mmItem.cpp +++ b/Descent3/mmItem.cpp @@ -101,7 +101,7 @@ #include "d3music.h" #include "ddio.h" -//#include +// #include #include "mem.h" #include @@ -359,9 +359,10 @@ 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 == 1) ? UIF_GROUP_START + : (type == 2) ? UIF_GROUP_END + : (type == 3) ? (UIF_GROUP_START + UIF_GROUP_END) + : 0); m_nmenu_items++; return true; diff --git a/Descent3/multi.cpp b/Descent3/multi.cpp index 99314f9d..d3c0021d 100644 --- a/Descent3/multi.cpp +++ b/Descent3/multi.cpp @@ -1665,7 +1665,7 @@ #include "BOA.h" #include "attach.h" #include "mission_download.h" -//#include "gamespy.h" +// #include "gamespy.h" #include "multi_world_state.h" #include "ObjScript.h" #include "audiotaunts.h" @@ -1702,7 +1702,7 @@ player_pos_suppress Player_pos_fix[MAX_PLAYERS]; // Define this if you want to have secondaries be sent as reliable packets //(not recommended - talk to Jason) -//#define RELIABLE_SECONDARIES +// #define RELIABLE_SECONDARIES // If this is true, PXO games won't save the kills, deaths, etc. bool Multi_no_stats_saved = false; @@ -9505,7 +9505,7 @@ void MultiDoMSafePowerup(ubyte *data); if (sequence < s || sequence > e) \ return; \ } -//#define ACCEPT_CONDITION(s,e) +// #define ACCEPT_CONDITION(s,e) // Takes the individual packet types and passes their data to the appropriate routines void MultiProcessData(ubyte *data, int len, int slot, network_address *from_addr) { diff --git a/Descent3/multi.h b/Descent3/multi.h index 17770ea6..a32cac8e 100644 --- a/Descent3/multi.h +++ b/Descent3/multi.h @@ -492,10 +492,10 @@ extern bool Multi_bail_ui_menu; #elif defined(OEM) #define MULTI_VERSION 5 #else -//#define MULTI_VERSION 4 -// Patch 1.1! -//#define MULTI_VERSION 6 -// Patch 1.3 +// #define MULTI_VERSION 4 +// Patch 1.1! +// #define MULTI_VERSION 6 +// Patch 1.3 #define MULTI_VERSION 10 #endif diff --git a/Descent3/multi_connect.cpp b/Descent3/multi_connect.cpp index 897ca10b..a30726fd 100644 --- a/Descent3/multi_connect.cpp +++ b/Descent3/multi_connect.cpp @@ -241,7 +241,7 @@ #include "game.h" #include "ddio.h" #include "Mission.h" -//#include "gametrack.h" +// #include "gametrack.h" #include "stringtable.h" #include "pilot.h" #include "ship.h" @@ -252,7 +252,7 @@ #include "multi_dll_mgr.h" #include "LoadLevel.h" -//#define USE_DIRECTPLAY +// #define USE_DIRECTPLAY #ifdef USE_DIRECTPLAY #include "directplay.h" diff --git a/Descent3/multi_dll_mgr.cpp b/Descent3/multi_dll_mgr.cpp index 3c63e6d4..f8fbae27 100644 --- a/Descent3/multi_dll_mgr.cpp +++ b/Descent3/multi_dll_mgr.cpp @@ -302,7 +302,7 @@ #include "module.h" #include "mem.h" #include "args.h" -//#define USE_DIRECTPLAY +// #define USE_DIRECTPLAY #ifdef USE_DIRECTPLAY #include "directplay.h" diff --git a/Descent3/multi_server.cpp b/Descent3/multi_server.cpp index d5440369..6a1cdf3a 100644 --- a/Descent3/multi_server.cpp +++ b/Descent3/multi_server.cpp @@ -621,7 +621,7 @@ #include "game2dll.h" #include "stringtable.h" -//#define USE_DIRECTPLAY +// #define USE_DIRECTPLAY #ifdef USE_DIRECTPLAY #include "directplay.h" @@ -629,7 +629,7 @@ #include "dedicated_server.h" #include "damage.h" -//#include "gamespy.h" +// #include "gamespy.h" #include "multi_world_state.h" #include "ObjScript.h" #include "marker.h" @@ -2981,9 +2981,9 @@ void GetNewRankings(object *killed, object *killer) { float killed_rank; float killer_rank; - //#ifdef OEM + // #ifdef OEM // return; - //#endif + // #endif #ifdef DEMO return; diff --git a/Descent3/multi_server.h b/Descent3/multi_server.h index f15e32f9..ed522b64 100644 --- a/Descent3/multi_server.h +++ b/Descent3/multi_server.h @@ -3,7 +3,7 @@ #include "pstypes.h" #include "multi.h" #include "game2dll.h" -//#include "gametrack.h" +// #include "gametrack.h" extern int Join_response_strings[]; diff --git a/Descent3/multi_ui.cpp b/Descent3/multi_ui.cpp index 47c772a8..30395758 100644 --- a/Descent3/multi_ui.cpp +++ b/Descent3/multi_ui.cpp @@ -312,7 +312,7 @@ #include "ConfigItem.h" #include "appdatabase.h" -//#define USE_DIRECTPLAY +// #define USE_DIRECTPLAY #ifdef USE_DIRECTPLAY #include "directplay.h" diff --git a/Descent3/newui_core.cpp b/Descent3/newui_core.cpp index 6af2b689..90fadd1e 100644 --- a/Descent3/newui_core.cpp +++ b/Descent3/newui_core.cpp @@ -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; diff --git a/Descent3/newui_core.h b/Descent3/newui_core.h index 8157fc9b..bf31cfbd 100644 --- a/Descent3/newui_core.h +++ b/Descent3/newui_core.h @@ -301,7 +301,7 @@ private: newuiHotspot *hot; } obj; void *internal; // internal info. - } * m_gadgetlist; + } *m_gadgetlist; UIWindow *m_parent; int m_ngadgets, m_gadgetlimit; diff --git a/Descent3/object.cpp b/Descent3/object.cpp index bd29f2f4..a366e129 100644 --- a/Descent3/object.cpp +++ b/Descent3/object.cpp @@ -2631,12 +2631,12 @@ void ObjDoFrame(object *obj) { if (obj->flags & OF_USES_LIFELEFT) obj->lifeleft -= Frametime; - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Process the control for this object switch (obj->control_type) { @@ -2701,12 +2701,12 @@ void ObjDoFrame(object *obj) { break; } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Update cycled animation if ((obj->control_type != CT_AI) && (obj->control_type != CT_DYING_AND_AI) && (obj->control_type != CT_DEBRIS) && @@ -2718,24 +2718,24 @@ void ObjDoFrame(object *obj) { } } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Do freeze stuff on AI controlled robots if ((obj->type == OBJ_ROBOT || obj->type == OBJ_BUILDING) && obj->control_type == CT_AI && obj->effect_info && (obj->effect_info->type_flags & EF_FREEZE)) obj->mtype.phys_info.velocity *= obj->effect_info->freeze_scalar; - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Check for object dead of old age if ((obj->flags & OF_USES_LIFELEFT) && (obj->lifeleft < 0)) { @@ -2767,12 +2767,12 @@ void ObjDoFrame(object *obj) { } } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // If object is dead, don't do any more processing on it if (obj->flags & OF_DEAD) { @@ -2780,12 +2780,12 @@ void ObjDoFrame(object *obj) { return; } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Do the movement for this object switch (obj->movement_type) { @@ -2831,12 +2831,12 @@ void ObjDoFrame(object *obj) { Int3(); // unknown movement type } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Do special effects stuff to object if (obj->effect_info) { @@ -2845,12 +2845,12 @@ void ObjDoFrame(object *obj) { RTP_ENDINCTIME(obj_doeffect_time); } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Deal with special player movement stuff if (obj->type == OBJ_PLAYER) { @@ -2859,12 +2859,12 @@ void ObjDoFrame(object *obj) { RTP_ENDINCTIME(obj_move_player_time); } - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Handle interval event for script. do { @@ -2878,12 +2878,12 @@ void ObjDoFrame(object *obj) { } while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope // and not share scope with another RTP_STARTINCTIME - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Cast light do { @@ -2893,23 +2893,23 @@ void ObjDoFrame(object *obj) { } while (0); // this do{}while(0) is here because the RTP_STARTINCTIME/RTP_ENDINCTIME must be in the same scope // and not share scope with another RTP_STARTINCTIME - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // if this object is walking/rolling on the terrain, make it not LOD at that point if (obj->movement_type == MT_WALKING && (obj->flags & OF_RENDERED) && OBJECT_OUTSIDE(obj)) TurnOffLODForCell(CELLNUM(obj->roomnum)); - //#ifdef _DEBUG + // #ifdef _DEBUG // if(Physics_player_verbose) // { // debug_check_terrain_objects(); // } - //#endif _DEBUG + // #endif _DEBUG // Mark object as not rendered for this frame obj->flags &= ~OF_RENDERED; diff --git a/Descent3/object_external_struct.h b/Descent3/object_external_struct.h index 43028205..57aeecfd 100644 --- a/Descent3/object_external_struct.h +++ b/Descent3/object_external_struct.h @@ -99,13 +99,13 @@ #define ROOMNUM_CELLNUM_MASK 0x7fffffff // Get a cell number from a room number -#define CELLNUM(roomnum) ((roomnum)&ROOMNUM_CELLNUM_MASK) +#define CELLNUM(roomnum) ((roomnum) & ROOMNUM_CELLNUM_MASK) // Make a room number from a cell number #define MAKE_ROOMNUM(cellnum) ((cellnum) | ROOMNUM_CELLNUM_FLAG) // Determine if a roomnum is really a cell number -#define ROOMNUM_OUTSIDE(roomnum) (((roomnum)&ROOMNUM_CELLNUM_FLAG) != 0) +#define ROOMNUM_OUTSIDE(roomnum) (((roomnum) & ROOMNUM_CELLNUM_FLAG) != 0) // Determine if an object is outside #define OBJECT_OUTSIDE(objp) ROOMNUM_OUTSIDE((objp)->roomnum) @@ -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) diff --git a/Descent3/objinfo.cpp b/Descent3/objinfo.cpp index 6d98a9d8..ec091530 100644 --- a/Descent3/objinfo.cpp +++ b/Descent3/objinfo.cpp @@ -33,11 +33,11 @@ int Num_object_ids[MAX_OBJECT_TYPES]; // Objects that must be remapped so we can reference by index // If you change this array then you must change the defines in the header file -//#ifdef _WIN32 +// #ifdef _WIN32 // char *Static_object_names[]={TBL_GENERIC("GuideBot"),TBL_GENERIC("ChaffChunk"),TBL_GENERIC("GuideBotRed")}; -//#else +// #else char *Static_object_names[] = {TBL_GENERIC("GuideBot"), TBL_GENERIC("ChaffChunk")}; -//#endif +// #endif #define NUM_STATIC_OBJECTS (sizeof(Static_object_names) / sizeof(*Static_object_names)) diff --git a/Descent3/procedurals.cpp b/Descent3/procedurals.cpp index f8c73e12..1b51a5c8 100644 --- a/Descent3/procedurals.cpp +++ b/Descent3/procedurals.cpp @@ -44,7 +44,7 @@ #define PROC_SIZE 128 #define TABSIZE 256 #define TABMASK (TABSIZE - 1) -#define PERM(x) perm[(x)&TABMASK] +#define PERM(x) perm[(x) & TABMASK] #define INDEX(ix, iy) PERM((ix) + PERM((iy))) #define RANDNBR ((prand()) / (float)RAND_MAX) #define LERP(t, x0, x1) ((x0) + (t) * ((x1) - (x0))) @@ -151,7 +151,7 @@ void InitProcedurals() { for (i = 0; i < 32768; i++) { int r = (i >> 10) & 0x1f; int g = (i >> 5) & 0x1f; - int b = (i)&0x1f; + int b = (i) & 0x1f; r = __max(0, r - 1); g = __max(0, g - 1); b = __max(0, b - 1); @@ -1196,7 +1196,7 @@ void EvaluateWaterProcedural(int handle) { float cur_frametime = gametime / frametime; int int_frame = cur_frametime; - int_frame %= ((diff)*2); + int_frame %= ((diff) * 2); if (int_frame >= diff) int_frame = (diff - 1) - (int_frame % diff); else diff --git a/Descent3/render.cpp b/Descent3/render.cpp index 217c74d4..ee9e86bb 100644 --- a/Descent3/render.cpp +++ b/Descent3/render.cpp @@ -51,7 +51,7 @@ #include "editor\d3edit.h" #endif -//#define KATMAI +// #define KATMAI // Katmai enhanced rotate only in a release build, because not // everyone has the intel compiler! @@ -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) { @@ -1350,7 +1350,7 @@ void RenderSpecularFacesFlat(room *rp) { texel = data[int_v * w + int_u]; r = (texel >> 10) & 0x1f; g = (texel >> 5) & 0x1f; - b = (texel)&0x1f; + b = (texel) & 0x1f; vr = lm_red[r]; vg = lm_green[g]; vb = lm_blue[b]; @@ -1859,7 +1859,7 @@ void RenderFace(room *rp, int facenum) { ushort texel = data[int_v * w + int_u]; int r = (texel >> 10) & 0x1f; int g = (texel >> 5) & 0x1f; - int b = (texel)&0x1f; + int b = (texel) & 0x1f; p->p3_r = p->p3_l * lm_red[r]; p->p3_g = p->p3_l * lm_green[g]; p->p3_b = p->p3_l * lm_blue[b]; diff --git a/Descent3/room.cpp b/Descent3/room.cpp index 5be3a8ca..5275ddea 100644 --- a/Descent3/room.cpp +++ b/Descent3/room.cpp @@ -976,23 +976,23 @@ void GetIJ(const vector *normal, int *ii, int *jj) { } } else // y > x - if (fabs(normal->y) > fabs(normal->z)) { - if (normal->y > 0) { - *ii = 0; - *jj = 2; // y > x, y > z + if (fabs(normal->y) > fabs(normal->z)) { + if (normal->y > 0) { + *ii = 0; + *jj = 2; // y > x, y > z + } else { + *ii = 2; + *jj = 0; + } } else { - *ii = 2; - *jj = 0; + if (normal->z > 0) { + *ii = 1; + *jj = 0; // z > y > x + } else { + *ii = 0; + *jj = 1; + } } - } else { - if (normal->z > 0) { - *ii = 1; - *jj = 0; // z > y > x - } else { - *ii = 0; - *jj = 1; - } - } } // 2d cross product diff --git a/Descent3/ship.h b/Descent3/ship.h index 3f2095a2..63d30f64 100644 --- a/Descent3/ship.h +++ b/Descent3/ship.h @@ -103,11 +103,11 @@ #define MAX_SHIPS 30 -//#ifdef DEMO //Demo2 will use GL -//#define DEFAULT_SHIP "Pyro-SE" -//#else +// #ifdef DEMO //Demo2 will use GL +// #define DEFAULT_SHIP "Pyro-SE" +// #else #define DEFAULT_SHIP "Pyro-GL" -//#endif +// #endif // Ship fire flags #define SFF_FUSION 1 // fires like fusion diff --git a/Descent3/soar.h b/Descent3/soar.h index 7a7c73dc..60776a07 100644 --- a/Descent3/soar.h +++ b/Descent3/soar.h @@ -16,9 +16,9 @@ #ifndef SOAR_H_ #define SOAR_H_ -//#ifdef _WIN32 -//#define SOAR_ENABLED -//#endif +// #ifdef _WIN32 +// #define SOAR_ENABLED +// #endif #ifdef SOAR_ENABLED diff --git a/Descent3/soar_helpers.cpp b/Descent3/soar_helpers.cpp index edef209c..4879d161 100644 --- a/Descent3/soar_helpers.cpp +++ b/Descent3/soar_helpers.cpp @@ -272,11 +272,11 @@ bool DSIsDoorOpenable(int n, int *is_openable) { } // doorway state -//#define DOORWAY_CLOSED 0 // door is closed -//#define DOORWAY_OPENING 1 // door is opening -//#define DOORWAY_WAITING 2 // door is waiting to be closed -//#define DOORWAY_CLOSING 3 // door is closing -//#define DOORWAY_OPEN 4 // door is open, that's it. +// #define DOORWAY_CLOSED 0 // door is closed +// #define DOORWAY_OPENING 1 // door is opening +// #define DOORWAY_WAITING 2 // door is waiting to be closed +// #define DOORWAY_CLOSING 3 // door is closing +// #define DOORWAY_OPEN 4 // door is open, that's it. bool DSGetDoorStatus(int n, int *status) { if (n < 0 || n > Highest_object_index || Objects[n].type != OBJ_DOOR) diff --git a/Descent3/subtitles.cpp b/Descent3/subtitles.cpp index 2db9a4bb..c76814da 100644 --- a/Descent3/subtitles.cpp +++ b/Descent3/subtitles.cpp @@ -32,12 +32,12 @@ */ #include "subtitles.h" -//#include "gamefont.h" -//#include "grtext.h" -//#include "renderer.h" +// #include "gamefont.h" +// #include "grtext.h" +// #include "renderer.h" #include "pserror.h" #include "ddio.h" -//#include "ddvid.h" +// #include "ddvid.h" #include "manage.h" #include "application.h" #include "mem.h" diff --git a/Descent3/weapon.cpp b/Descent3/weapon.cpp index 1504e580..f5cfd5af 100644 --- a/Descent3/weapon.cpp +++ b/Descent3/weapon.cpp @@ -341,7 +341,7 @@ #include "CFILE.H" #include "AIMain.h" -//#include "samirlog.h" +// #include "samirlog.h" #define LOGFILE(_s) weapon Weapons[MAX_WEAPONS]; diff --git a/bitmap/tga.cpp b/bitmap/tga.cpp index 5a29d52f..8315c680 100644 --- a/bitmap/tga.cpp +++ b/bitmap/tga.cpp @@ -173,7 +173,7 @@ inline short tga_read_short() { ushort bm_tga_translate_pixel(int pixel, int format) { int red = ((pixel >> 16) & 0xFF); int green = ((pixel >> 8) & 0xFF); - int blue = ((pixel)&0xFF); + int blue = ((pixel) & 0xFF); int alpha = ((pixel >> 24) & 0xFF); ushort newpix; diff --git a/cfile/CFILE.cpp b/cfile/CFILE.cpp index 15fc3fca..83351171 100644 --- a/cfile/CFILE.cpp +++ b/cfile/CFILE.cpp @@ -179,10 +179,9 @@ void cf_Close() { // Specify a directory to look in for files // 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 +// 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 int cf_SetSearchPath(const char *path, char *ext, ...) { if (strlen(path) >= _MAX_PATH) return 0; diff --git a/dd_lnxsound/ddlnxsound.h b/dd_lnxsound/ddlnxsound.h index 1d07b687..5518a326 100644 --- a/dd_lnxsound/ddlnxsound.h +++ b/dd_lnxsound/ddlnxsound.h @@ -1,7 +1,7 @@ #ifndef __LNX__DD_SOUND_H_ #define __LNX__DD_SOUND_H_ -//#include +// #include #include "SDL_thread.h" // Sound Library Internal Error Codes diff --git a/dd_lnxsound/mixer.cpp b/dd_lnxsound/mixer.cpp index bf4f3c3d..bc78b38d 100644 --- a/dd_lnxsound/mixer.cpp +++ b/dd_lnxsound/mixer.cpp @@ -410,10 +410,10 @@ void software_mixer::StreamMixer(char *ptr, int len) { cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size); // cur_buf->s->current_position = (char //*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n", - //cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); + // cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0)); // mprintf((0, "Data %X, length %d\n", - //cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); + // cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); if (cur_buf->play_info->m_stream_data) { switch (cur_buf->play_info->m_stream_format) { diff --git a/dd_sndlib/Ds3dlib.cpp b/dd_sndlib/Ds3dlib.cpp index 5eb6d15b..44761d99 100644 --- a/dd_sndlib/Ds3dlib.cpp +++ b/dd_sndlib/Ds3dlib.cpp @@ -1034,10 +1034,10 @@ void StreamMixer(char *ptr, int len) { cur_buf->play_info->user_data, cur_buf->play_info->m_stream_handle, &cur_buf->play_info->m_stream_size); // cur_buf->s->current_position = (char //*)cur_buf->play_info->m_stream_data; mprintf((0, "%x %d\n", - //cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); + // cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); ASSERT(!(cur_buf->play_info->m_stream_data && cur_buf->play_info->m_stream_size <= 0)); // mprintf((0, "Data %X, length %d\n", - //cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); + // cur_buf->play_info->m_stream_data, cur_buf->play_info->m_stream_size)); if (cur_buf->play_info->m_stream_data) { switch (cur_buf->play_info->m_stream_format) { diff --git a/dd_sndlib/auddev.h b/dd_sndlib/auddev.h index 4bc3c50a..d17b5ef3 100644 --- a/dd_sndlib/auddev.h +++ b/dd_sndlib/auddev.h @@ -67,7 +67,7 @@ #define SOUND_DECAY_MAXTIME 100.0f #define SOUND_GAIN_MAXSCALAR 1.0f -//#define SUPPORT_AUREAL +// #define SUPPORT_AUREAL // Creative labs Environmental Audio Extension Interface diff --git a/dd_sndlib/dsound3d.cpp b/dd_sndlib/dsound3d.cpp index 4e2f6f1c..bfeb3eae 100644 --- a/dd_sndlib/dsound3d.cpp +++ b/dd_sndlib/dsound3d.cpp @@ -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; } */ } diff --git a/dd_sndlib/eax.h b/dd_sndlib/eax.h index da04b34c..8f68176a 100644 --- a/dd_sndlib/eax.h +++ b/dd_sndlib/eax.h @@ -30,7 +30,7 @@ typedef struct { float fDamping; // 0 to 1 } EAX_REVERBPROPERTIES; -//#define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1) +// #define EAX_MAX_ENVIRONMENT (EAX_ENVIRONMENT_COUNT - 1) // presets #define EAX_PRESET_GENERIC EAX_ENVIRONMENT_GENERIC, 0.5F, 1.493F, 0.5F diff --git a/dd_sndlib/ia3dapi.h b/dd_sndlib/ia3dapi.h index 4835ff91..e0953490 100644 --- a/dd_sndlib/ia3dapi.h +++ b/dd_sndlib/ia3dapi.h @@ -1184,18 +1184,18 @@ DECLARE_INTERFACE_(IA3dMaterial, IUnknown) { #define IA3dMaterial_GetTransmittance(p, a, b) (p)->GetTransmittance(a, b) #endif // !defined(__cplusplus) || defined(CINTERFACE) - //=================================================================== - // Error Codes - // - // Use macros A3DERROR_CODE(code) for errors and A3DSUCCESS_CODE(code) - // for success codes or predefined universal COM success and failure - // code. - // - // All success codes should be mutally exclusive to all other success other. - // - // All error codes should be mutually exclusive to all other error codes. - // - //=================================================================== +//=================================================================== +// Error Codes +// +// Use macros A3DERROR_CODE(code) for errors and A3DSUCCESS_CODE(code) +// for success codes or predefined universal COM success and failure +// code. +// +// All success codes should be mutally exclusive to all other success other. +// +// All error codes should be mutually exclusive to all other error codes. +// +//=================================================================== #define A3DERROR_CODE(code) MAKE_HRESULT(1, FACILITY_ITF, code) #define A3DSUCCESS_CODE(code) MAKE_HRESULT(0, FACILITY_ITF, code) diff --git a/ddgr_mac/ddgr_mac.cpp b/ddgr_mac/ddgr_mac.cpp index 40832ef0..34bab27f 100644 --- a/ddgr_mac/ddgr_mac.cpp +++ b/ddgr_mac/ddgr_mac.cpp @@ -228,6 +228,6 @@ void ddgr_ScaleBitmap16(ushort *dest_data, int dest_width, int x1, int y1, int x } } -//¥====================================================== +// ¥====================================================== // MacOS Graphics routines -//¥====================================================== +// ¥====================================================== diff --git a/ddgr_mac/macOSSurface.cpp b/ddgr_mac/macOSSurface.cpp index 6b322fd7..020c0301 100644 --- a/ddgr_mac/macOSSurface.cpp +++ b/ddgr_mac/macOSSurface.cpp @@ -53,7 +53,7 @@ * $NoKeywords: $ */ -//#define check +// #define check // --------------------------------------------------------------------------- // Macintosh Headers @@ -208,13 +208,13 @@ ddgr_error ddgr_os_surf_InitVideo(ddgr_surface *sf) { if (macErr) throw(CMacOSSurfErr("Error while fading in monitor ", macErr, DDGRERR_DRIVERINIT)); - //¥ All's well! + // ¥ All's well! gFullScreenData.m_video_initted = true; } catch (CMacOSSurfErr theCaughtError) { mprintf((0, theCaughtError.m_ErrStr)); mprintf((0, "DSp MacOS Error: %d\n", theCaughtError.m_MacErr)); if (gFullScreenData.m_context) { - //¥ The monitor might be faded out so fade it back in and release the context + // ¥ The monitor might be faded out so fade it back in and release the context DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL); DSpContext_Release(gFullScreenData.m_context); gFullScreenData.m_context = nil; @@ -259,13 +259,13 @@ void ddgr_os_surf_CloseVideo(ddgr_surface *sf) { } if (gFullScreenData.m_context) { - //¥ The monitor might be faded out so fade it back in and release the context + // ¥ The monitor might be faded out so fade it back in and release the context DSpContext_FadeGammaIn(gFullScreenData.m_context, NULL); DSpContext_Release(gFullScreenData.m_context); gFullScreenData.m_context = nil; } - //¥ Video is deinitialized! + // ¥ Video is deinitialized! gFullScreenData.m_video_initted = false; } @@ -811,9 +811,9 @@ ddgr_error ddgr_os_surf_AttachHandle(ddgr_surface *sf, unsigned handle) { return err; } -//¥====================================================== +// ¥====================================================== // MacOS Full Screen Graphics routines -//¥====================================================== +// ¥====================================================== // Initialize the macintosh for full screen graphics ddgr_error ddgr_os_surf_fullscreen_Init(ddgr_init_info *info) { diff --git a/ddio_lnx/lnxkey.cpp b/ddio_lnx/lnxkey.cpp index 108b414a..59c58cb3 100644 --- a/ddio_lnx/lnxkey.cpp +++ b/ddio_lnx/lnxkey.cpp @@ -43,16 +43,16 @@ #include #include #include -//#include -//#include +// #include +// #include #include #include -//#include +// #include #include #include #include #include -//#include +// #include volatile struct tLnxKeys { union { diff --git a/ddio_lnx/lnxkey_ggi.cpp b/ddio_lnx/lnxkey_ggi.cpp index f7af236e..268a4c02 100644 --- a/ddio_lnx/lnxkey_ggi.cpp +++ b/ddio_lnx/lnxkey_ggi.cpp @@ -24,9 +24,9 @@ #include "ddio.h" #include "mono.h" -//########################################################## -// GGI Interface Functions -//########################################################## +// ########################################################## +// GGI Interface Functions +// ########################################################## void ddio_ggi_EmergencyQuit(int id); void ddio_ggi_InternalKeyInit(void); static int ddio_ggi_TranslateKey(int c, int code); @@ -35,7 +35,7 @@ void ddio_ggi_InternalClose(void); void ddio_ggi_KeyHandler(void); gii_input_t GGI_input_handle; void ddio_ggi_KeyBoardEventHandler(int transkey, int press); -//########################################################## +// ########################################################## volatile struct tLnxKeys { union { @@ -145,9 +145,9 @@ int ddio_KeyToAscii(int code) { return out; } -//################################################# -// ggi Interface Functions -//################################################# +// ################################################# +// ggi Interface Functions +// ################################################# void ddio_ggi_InternalKeyInit(void) { static bool first_time = true; diff --git a/ddio_lnx/lnxkey_null.cpp b/ddio_lnx/lnxkey_null.cpp index eda4f20d..76900d1c 100644 --- a/ddio_lnx/lnxkey_null.cpp +++ b/ddio_lnx/lnxkey_null.cpp @@ -38,10 +38,10 @@ #include #include #include -//#include -//#include -//#include -//#include +// #include +// #include +// #include +// #include extern volatile struct tLnxKeys { union { diff --git a/ddio_lnx/lnxkey_raw.cpp b/ddio_lnx/lnxkey_raw.cpp index 6f0897f1..507f53f5 100644 --- a/ddio_lnx/lnxkey_raw.cpp +++ b/ddio_lnx/lnxkey_raw.cpp @@ -37,12 +37,12 @@ #include #include #include -//#include +// #include #include #include #include #include -//#include +// #include #include #include @@ -50,9 +50,9 @@ #include "ddio.h" #include "mono.h" -//########################################################## -// raw Interface Functions -//########################################################## +// ########################################################## +// raw Interface Functions +// ########################################################## void ddio_raw_EmergencyQuit(int id); void ddio_raw_InternalKeyInit(void); void ddio_raw_KeyBoardEventHandler(int scancode, int press); @@ -63,7 +63,7 @@ void init_keyboard(); void close_keyboard(); int kbhit(); int readch(); -//########################################################## +// ########################################################## extern volatile struct tLnxKeys { union { @@ -137,9 +137,9 @@ void ddio_normal_InternalResetKey(ubyte key) { LKeys[key].status = false; } -//################################################# -// raw Interface Functions -//################################################# +// ################################################# +// raw Interface Functions +// ################################################# void (*kb_event_handler)(int scancode, int press); void ddio_raw_InternalKeyInit(void) { static bool first_time = true; diff --git a/ddio_lnx/lnxkey_xwin.cpp b/ddio_lnx/lnxkey_xwin.cpp index 6f5c193c..e913bcbd 100644 --- a/ddio_lnx/lnxkey_xwin.cpp +++ b/ddio_lnx/lnxkey_xwin.cpp @@ -34,8 +34,8 @@ #include "../lib/linux/dyna_xwin.h" #include "../lib/linux/dyna_xext.h" -//#include -//#include +// #include +// #include #include extern volatile struct tLnxKeys { diff --git a/ddio_lnx/lnxmouse.cpp b/ddio_lnx/lnxmouse.cpp index 6be6191f..9ef766cc 100644 --- a/ddio_lnx/lnxmouse.cpp +++ b/ddio_lnx/lnxmouse.cpp @@ -72,7 +72,7 @@ #include "ddio_lnx.h" #include "application.h" #include "args.h" -//#include "../lib/linux/dyna_xwin.h" +// #include "../lib/linux/dyna_xwin.h" #include "SDL.h" bool ddio_mouseGrabbed = false; diff --git a/ddio_mac/macController.cpp b/ddio_mac/macController.cpp index 76cfeeb0..43ca4d70 100644 --- a/ddio_mac/macController.cpp +++ b/ddio_mac/macController.cpp @@ -813,9 +813,9 @@ void gameMacController::set_axis_sensitivity(ct_type axis_type, ubyte axis, floa Int3(); } } -//#ifndef MACINTOSH +// #ifndef MACINTOSH // toggles use of deadzone for controllers. ctl can be 0 to ??? -// dead zone is from 0.0 to 0.5 +// dead zone is from 0.0 to 0.5 void gameMacController::set_controller_deadzone(int ctl, float deadzone) { if (deadzone < 0.0) deadzone = 0.0; @@ -828,7 +828,7 @@ float gameMacController::get_controller_deadzone(int ctl) { return val; } -//#endif +// #endif char Ctltext_AxisBindings[][16] = {"", "X-axis", "Y-axis", "Z-axis", "R-axis", "U-axis", "V-axis"}; char Ctltext_BtnBindings[][16] = {"", "btn1", "btn2", "btn3", "btn4", "btn5", "btn6", "btn7", "btn8", "btn9", "btn10", "btn11", "btn12", "btn13", "btn14", "btn15", "btn16", "btn17", diff --git a/ddio_mac/macfile.cpp b/ddio_mac/macfile.cpp index 049c9e5c..f5aadda7 100644 --- a/ddio_mac/macfile.cpp +++ b/ddio_mac/macfile.cpp @@ -51,7 +51,7 @@ #include #include #include -//#include +// #include // Mac Headers #include @@ -851,7 +851,7 @@ void macify_dospath(const char *dos_path, char *mac_path) { } #include -//#include +// #include #include #include "file_io.h" diff --git a/ddio_mac/macjoy.cpp b/ddio_mac/macjoy.cpp index 52d19301..5a0d0b52 100644 --- a/ddio_mac/macjoy.cpp +++ b/ddio_mac/macjoy.cpp @@ -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."); //@@ } diff --git a/ddio_mac/mackey.cpp b/ddio_mac/mackey.cpp index 1d01ea98..728d30e3 100644 --- a/ddio_mac/mackey.cpp +++ b/ddio_mac/mackey.cpp @@ -202,7 +202,7 @@ bool MacKeyboardHandler(void) { // ---------------------------------------------------------------------------- bool ddio_InternalKeyInit(ddio_init_info *init_info) { bool result = true; - //¥ Make is so we can get key ups + // ¥ Make is so we can get key ups SetEventMask(everyEvent); LMSetSysEvtMask(everyEvent); @@ -212,7 +212,7 @@ bool ddio_InternalKeyInit(ddio_init_info *init_info) { return result; } void ddio_InternalKeyClose() { - //¥ Restore the normal event mask + // ¥ Restore the normal event mask SetEventMask(everyEvent - keyUpMask); LMSetSysEvtMask(everyEvent - keyUpMask); } diff --git a/ddio_win/winkey.cpp b/ddio_win/winkey.cpp index 3a29843d..4dd88ea5 100644 --- a/ddio_win/winkey.cpp +++ b/ddio_win/winkey.cpp @@ -180,10 +180,10 @@ static struct tWinKeyData { HHOOK winhook; // windows hook unsigned long thread; // thread id // osMutex keyframe_mutex; // mutex between - //internal key frame and key thread. - bool nextframe; // used for mutexing between keyframe and thread. - bool acquired; // device acquired? - bool thread_active; // used in thread. + // internal key frame and key thread. + bool nextframe; // used for mutexing between keyframe and thread. + bool acquired; // device acquired? + bool thread_active; // used in thread. bool suspended; } WKD = {NULL, NULL, NULL, 0xffffffff, false, false, false, true}; diff --git a/ddvid_lnx/video_lnx.cpp b/ddvid_lnx/video_lnx.cpp index c2846372..0c5d6f90 100644 --- a/ddvid_lnx/video_lnx.cpp +++ b/ddvid_lnx/video_lnx.cpp @@ -12,7 +12,7 @@ #include #include #undef EGA -//#include +// #include typedef struct { int width, height, bytesperpixel, linewidth; } tinfo; diff --git a/lib/BYTESWAP.H b/lib/BYTESWAP.H index 53fb4516..d4b8fb93 100644 --- a/lib/BYTESWAP.H +++ b/lib/BYTESWAP.H @@ -73,7 +73,7 @@ inline float SWAPFLOAT(float x) #define MOTOROLA_FLOAT(x) SWAPFLOAT(Endian_SwapFloat(x)) */ #define SWAPSHORT(x) (short)(0xFFFF & (((x) << 8) | (((ushort)(x)) >> 8))) -#define SWAPINT(x) (int)(((x) << 24) | (((ulong)(x)) >> 24) | (((x)&0x0000ff00) << 8) | (((x)&0x00ff0000) >> 8)) +#define SWAPINT(x) (int)(((x) << 24) | (((ulong)(x)) >> 24) | (((x) & 0x0000ff00) << 8) | (((x) & 0x00ff0000) >> 8)) // Stupid function to trick the compiler into letting me byteswap a float inline float SWAPFLOAT(float x) { diff --git a/lib/Macros.h b/lib/Macros.h index 98c00ef9..faba205b 100644 --- a/lib/Macros.h +++ b/lib/Macros.h @@ -52,13 +52,13 @@ #define CHECK_FLAG(_var, _flag) ((_var) & (_flag)) #define max(a, b) (((a) > (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b)) -#define makeword(_h, _l) (((_h) << 16) + ((_l)&0xffff)) +#define makeword(_h, _l) (((_h) << 16) + ((_l) & 0xffff)) #define hiword(_v) ((_v) >> 16) -#define loword(_v) ((_v)&0x0000ffff) -#define makeshort(_h, _l) (((_h) << 8) + ((_l)&0x00ff)) +#define loword(_v) ((_v) & 0x0000ffff) +#define makeshort(_h, _l) (((_h) << 8) + ((_l) & 0x00ff)) #define hibyte(_w) ((_w) >> 8) -#define lobyte(_w) ((_w)&0x00ff) -#define kb_to_bytes(_kb) ((_kb)*1024) +#define lobyte(_w) ((_w) & 0x00ff) +#define kb_to_bytes(_kb) ((_kb) * 1024) #define _min(a, b) min(a, b) #define _max(a, b) max(a, b) #define ABS(a) ((a < 0) ? (-a) : (a)) diff --git a/lib/debug.h b/lib/debug.h index 8651f801..1839b23b 100644 --- a/lib/debug.h +++ b/lib/debug.h @@ -114,7 +114,7 @@ #ifndef IDNO #define IDNO 7 #endif -//#define DEBUG_LEVEL 0 //DAJ +// #define DEBUG_LEVEL 0 //DAJ #if defined(WIN32) || defined(__LINUX__) static const int OSMBOX_OK = 1; static const int OSMBOX_YESNO = 2; @@ -161,7 +161,7 @@ void Debug_ConsoleRedirectMessages(int virtual_window, int physical_window); } while (0) #elif defined(__LINUX__) void ddio_InternalKeyClose(); -//#define debug_break() do{__asm__ __volatile__ ( "int $3" );}while(0) +// #define debug_break() do{__asm__ __volatile__ ( "int $3" );}while(0) #ifndef MACOSXPPC #define debug_break() \ do { \ diff --git a/lib/ds3dlib.h b/lib/ds3dlib.h index 849a265e..a8a3b529 100644 --- a/lib/ds3dlib.h +++ b/lib/ds3dlib.h @@ -200,9 +200,9 @@ #ifndef __ds3dlib_h__ #define __ds3dlib_h__ -//#include -//#include // Multi-media system support -//#include "dsound.h" // Direct sound header file +// #include +// #include // Multi-media system support +// #include "dsound.h" // Direct sound header file #include "ssl_lib.h" // Shared sound header (between high and low-levels) #include "vecmat.h" diff --git a/lib/findintersection.h b/lib/findintersection.h index 8d1fa952..3efc7b95 100644 --- a/lib/findintersection.h +++ b/lib/findintersection.h @@ -203,7 +203,7 @@ #include "object.h" #include "vecmat.h" #include "terrain.h" -//#include "room.h" +// #include "room.h" #include "findintersection_external.h" extern float Ceiling_height; diff --git a/lib/fix.h b/lib/fix.h index 524823ec..32388c6c 100644 --- a/lib/fix.h +++ b/lib/fix.h @@ -85,7 +85,7 @@ fix FloatToFixFast(float num); // Conversion macros //??#define FloatToFix(num) Round((num) * FLOAT_SCALER) -#define FloatToFix(num) ((fix)((num)*FLOAT_SCALER)) +#define FloatToFix(num) ((fix)((num) * FLOAT_SCALER)) #define IntToFix(num) ((num) << FIX_SHIFT) #define ShortToFix(num) (((long)(num)) << FIX_SHIFT) #define FixToFloat(num) (((float)(num)) / FLOAT_SCALER) diff --git a/lib/gameos.h b/lib/gameos.h index 22f3f6af..390d8cfc 100644 --- a/lib/gameos.h +++ b/lib/gameos.h @@ -147,9 +147,9 @@ void os_ConsolePrintf(int n, int row, int col, char *format, ...); // --------------------------------------------------------------------------- // Operating system includes // --------------------------------------------------------------------------- -//#if defined(WIN32) +// #if defined(WIN32) // #include "win\oewin_os.h" -//#elif defined(MACINTOSH) // JCA: not needed +// #elif defined(MACINTOSH) // JCA: not needed // #include "oemac_os.h" -//#endif +// #endif #endif diff --git a/lib/linux/lnxdraw.h b/lib/linux/lnxdraw.h index 81086133..709b031b 100644 --- a/lib/linux/lnxdraw.h +++ b/lib/linux/lnxdraw.h @@ -1,8 +1,8 @@ #ifndef __LNXDRAW_H_ #define __LNXDRAW_H_ -//#include "dyna_xwin.h" -//#include "dyna_xext.h" +// #include "dyna_xwin.h" +// #include "dyna_xext.h" #include @@ -23,7 +23,7 @@ typedef struct { // Window *pre_created_window; // Window already created // XVisualInfo pre_created_visinfo; } LnxWindowDesc; -//#define LNXDRAWF_USEPRECREATEDWIN 0x01 +// #define LNXDRAWF_USEPRECREATEDWIN 0x01 typedef struct { // XSizeHints *lpSizeHints; diff --git a/lib/lnxscreenmode.h b/lib/lnxscreenmode.h index 42acdec3..f63573bc 100644 --- a/lib/lnxscreenmode.h +++ b/lib/lnxscreenmode.h @@ -35,8 +35,8 @@ #define __LNXVIDEOMODE_H__ #include "linux/linux_fix.h" -//#include "linux/dyna_xwin.h" -//#include +// #include "linux/dyna_xwin.h" +// #include #include #define MODE_OK 0 diff --git a/lib/mem.h b/lib/mem.h index 48c8f73e..61aca569 100644 --- a/lib/mem.h +++ b/lib/mem.h @@ -56,7 +56,7 @@ #ifndef MEM_H #define MEM_H -//#define MEM_USE_RTL 1 +// #define MEM_USE_RTL 1 #ifdef MACINTOSH #undef MEM_USE_RTL diff --git a/lib/music.h b/lib/music.h index 18b972de..a910cd12 100644 --- a/lib/music.h +++ b/lib/music.h @@ -237,7 +237,7 @@ inline tMusicVal QUANTIZE_MUSICVAL(float fval) { return (fval * 255); } // OMS Events #define OMSEVT_MAKE(_evt, _priority) (((_evt) << 2) + (_priority & 0x03)) -#define OMSEVT_PRIORITY(_evt) ((_evt)&0x3) +#define OMSEVT_PRIORITY(_evt) ((_evt) & 0x3) #define OMS_EVT_NONE OMSEVT_MAKE(0, 0) #define OMS_EVT_SONGENDED OMSEVT_MAKE(32, 0) // music completed (parm tells us what theme) diff --git a/lib/networking.h b/lib/networking.h index e8f01a4e..00f548e5 100644 --- a/lib/networking.h +++ b/lib/networking.h @@ -314,24 +314,24 @@ inline void INADDR_GET_SUN_SUNB(struct in_addr *st, unsigned char *s_b1, unsigne #define BOOL bool #define SOCKET unsigned int #define SOCKADDR_IN sockaddr_in -//#define SOCKADDR_IPX sockaddr_ipx +// #define SOCKADDR_IPX sockaddr_ipx #define SOCKADDR sockaddr -//#define INVALID_SOCKET -1 -//#define NSPROTO_IPX AF_IPX +// #define INVALID_SOCKET -1 +// #define NSPROTO_IPX AF_IPX #define TRUE true #define FALSE false #define HOSTENT struct hostent -//#define SOCKET_ERROR -1 +// #define SOCKET_ERROR -1 // Winsock = sockets error translation -//#define WSAEWOULDBLOCK EWOULDBLOCK -//#define WSAEINVAL EINVAL -//#define WSAENOPROTOOPT ENOPROTOOPT +// #define WSAEWOULDBLOCK EWOULDBLOCK +// #define WSAEINVAL EINVAL +// #define WSAENOPROTOOPT ENOPROTOOPT extern bool Use_DirectPlay; -//#ifdef FIXED -// inline int WSAGetLastError(){return errno;} +// #ifdef FIXED +// inline int WSAGetLastError(){return errno;} // helper macros for working with SOCKADDR_IN to make it look nicer between windows and Linux inline void INADDR_SET_SUN_SADDR(struct in_addr *st, unsigned int value) { st->S_un.S_addr = value; } @@ -358,7 +358,7 @@ inline void INADDR_GET_SUN_SUNB(struct in_addr *st, unsigned char *s_b1, unsigne *s_b3 = st->S_un.S_un_b.s_b3; *s_b4 = st->S_un.S_un_b.s_b4; } -//#endif // FIXED +// #endif // FIXED #endif // OS #define NWT_UNRELIABLE 1 diff --git a/lib/pserror.h b/lib/pserror.h index 7d63a9c8..613037b9 100644 --- a/lib/pserror.h +++ b/lib/pserror.h @@ -256,7 +256,7 @@ inline void SetDebugBreakHandlers(void (*stop)(), void (*resume)()) { if (DebugBreak_callback_resume) \ (*DebugBreak_callback_resume)(); \ } while (0) -///#define ASSERT(x) assert(x) +/// #define ASSERT(x) assert(x) #define ASSERT(x) \ do { \ if (!(unsigned)(x)) { \ diff --git a/lib/rtperformance.h b/lib/rtperformance.h index 292ae4ed..48375621 100644 --- a/lib/rtperformance.h +++ b/lib/rtperformance.h @@ -7,7 +7,7 @@ #endif #if defined(__LINUX__) || defined(MACINTOSH) -//#if defined(__LINUX__) +// #if defined(__LINUX__) #ifdef USE_RTP #undef USE_RTP // no rtp for now #endif diff --git a/lib/ssl_lib.h b/lib/ssl_lib.h index 0e92f33a..ce90e9c1 100644 --- a/lib/ssl_lib.h +++ b/lib/ssl_lib.h @@ -257,7 +257,7 @@ typedef struct { int roomnum; } pos_state; -//#define MAX_EFFECT_OFFSETS 5 +// #define MAX_EFFECT_OFFSETS 5 // sound priority values. #define SND_PRIORITY_CRITICAL 5 // usually streams have this priority, bumps off any other sounds. diff --git a/lib/texture.h b/lib/texture.h index 661fb25d..d542c460 100644 --- a/lib/texture.h +++ b/lib/texture.h @@ -97,7 +97,7 @@ typedef struct { // For the following enum table: LIN=Linear, PER=Perspective, NON=No Transparency, LIT = Shaded, // COLORED=Colored lighting, TRANS=Transparency -//ALPHA=Alpha renderer +// ALPHA=Alpha renderer #define MAX_RENDER_TYPES 15 diff --git a/lib/win/DirectX/d3dtypes.h b/lib/win/DirectX/d3dtypes.h index aa70cd8b..54c1c378 100644 --- a/lib/win/DirectX/d3dtypes.h +++ b/lib/win/DirectX/d3dtypes.h @@ -40,9 +40,9 @@ typedef LONG D3DFIXED; */ #define CI_GETALPHA(ci) ((ci) >> 24) #define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff) -#define CI_GETFRACTION(ci) ((ci)&0xff) +#define CI_GETFRACTION(ci) ((ci) & 0xff) #define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80) -#define CI_MASKALPHA(ci) ((ci)&0xffffff) +#define CI_MASKALPHA(ci) ((ci) & 0xffffff) #define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f)) /* @@ -54,15 +54,15 @@ typedef LONG D3DFIXED; #define RGBA_GETALPHA(rgb) ((rgb) >> 24) #define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff) #define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff) -#define RGBA_GETBLUE(rgb) ((rgb)&0xff) +#define RGBA_GETBLUE(rgb) ((rgb) & 0xff) #define RGBA_MAKE(r, g, b, a) ((D3DCOLOR)(((a) << 24) | ((r) << 16) | ((g) << 8) | (b))) /* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs * The float values must be in the range 0..1 */ -#define D3DRGB(r, g, b) (0xff000000L | (((long)((r)*255)) << 16) | (((long)((g)*255)) << 8) | (long)((b)*255)) +#define D3DRGB(r, g, b) (0xff000000L | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255)) #define D3DRGBA(r, g, b, a) \ - ((((long)((a)*255)) << 24) | (((long)((r)*255)) << 16) | (((long)((g)*255)) << 8) | (long)((b)*255)) + ((((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255)) /* * Format of RGB colors is @@ -72,10 +72,10 @@ typedef LONG D3DFIXED; */ #define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff) #define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff) -#define RGB_GETBLUE(rgb) ((rgb)&0xff) -#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba)&0x00ffffff)) +#define RGB_GETBLUE(rgb) ((rgb) & 0xff) +#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff)) #define RGB_MAKE(r, g, b) ((D3DCOLOR)(((r) << 16) | ((g) << 8) | (b))) -#define RGBA_TORGB(rgba) ((D3DCOLOR)((rgba)&0xffffff)) +#define RGBA_TORGB(rgba) ((D3DCOLOR)((rgba) & 0xffffff)) #define RGB_TORGBA(rgb) ((D3DCOLOR)((rgb) | 0xff000000)) #endif diff --git a/lib/win/DirectX/ddraw.h b/lib/win/DirectX/ddraw.h index fdfc057a..a1cbe0d5 100644 --- a/lib/win/DirectX/ddraw.h +++ b/lib/win/DirectX/ddraw.h @@ -124,7 +124,7 @@ typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL; * API's */ #if (defined(WIN32) || defined(_WIN32)) && !defined(_NO_COM) -//#if defined( _WIN32 ) && !defined( _NO_ENUM ) +// #if defined( _WIN32 ) && !defined( _NO_ENUM ) typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID); typedef BOOL(FAR PASCAL *LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID); extern HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW lpCallback, LPVOID lpContext); @@ -195,12 +195,12 @@ extern HRESULT WINAPI DirectDrawCreateClipper(DWORD dwFlags, LPDIRECTDRAWCLIPPER typedef long HRESULT; #endif -//#ifndef WINNT +// #ifndef WINNT typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID); typedef HRESULT(FAR PASCAL *LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID); typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID); typedef HRESULT(FAR PASCAL *LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID); -//#endif +// #endif /* * Generic pixel format with 8-bit RGB and alpha components diff --git a/lib/win/DirectX/dplay.h b/lib/win/DirectX/dplay.h index 79ba8f0d..c46a304a 100644 --- a/lib/win/DirectX/dplay.h +++ b/lib/win/DirectX/dplay.h @@ -584,11 +584,11 @@ DECLARE_INTERFACE_(IDirectPlay2, IUnknown) { STDMETHOD(SetSessionDesc)(THIS_ LPDPSESSIONDESC2, DWORD) PURE; }; - /**************************************************************************** - * - * IDirectPlay2 interface macros - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlay2 interface macros + * + ****************************************************************************/ #if !defined(__cplusplus) || defined(CINTERFACE) @@ -662,11 +662,11 @@ DECLARE_INTERFACE_(IDirectPlay2, IUnknown) { #endif - /**************************************************************************** - * - * IDirectPlay3 (and IDirectPlay3A) Interface - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlay3 (and IDirectPlay3A) Interface + * + ****************************************************************************/ #undef INTERFACE #define INTERFACE IDirectPlay3 @@ -723,11 +723,11 @@ DECLARE_INTERFACE_(IDirectPlay3, IDirectPlay2) { STDMETHOD(GetPlayerFlags)(THIS_ DPID, LPDWORD) PURE; }; - /**************************************************************************** - * - * IDirectPlay3 interface macros - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlay3 interface macros + * + ****************************************************************************/ #if !defined(__cplusplus) || defined(CINTERFACE) @@ -831,11 +831,11 @@ DECLARE_INTERFACE_(IDirectPlay3, IDirectPlay2) { #endif - /**************************************************************************** - * - * IDirectPlay4 (and IDirectPlay4A) Interface - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlay4 (and IDirectPlay4A) Interface + * + ****************************************************************************/ #undef INTERFACE #define INTERFACE IDirectPlay4 @@ -899,11 +899,11 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) { STDMETHOD(CancelPriority)(THIS_ DWORD, DWORD, DWORD) PURE; }; - /**************************************************************************** - * - * IDirectPlayX interface macros (for IDirectPlay4 and beyond) - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlayX interface macros (for IDirectPlay4 and beyond) + * + ****************************************************************************/ #if !defined(__cplusplus) || defined(CINTERFACE) @@ -1172,25 +1172,25 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) { */ #define DPENUMSESSIONS_ALL 0x00000002 - /* - * Start an asynchronous enum sessions - */ +/* + * Start an asynchronous enum sessions + */ #define DPENUMSESSIONS_ASYNC 0x00000010 - /* - * Stop an asynchronous enum sessions - */ +/* + * Stop an asynchronous enum sessions + */ #define DPENUMSESSIONS_STOPASYNC 0x00000020 - /* - * Enumerate sessions even if they require a password - */ +/* + * Enumerate sessions even if they require a password + */ #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040 - /* - * Return status about progress of enumeration instead of - * showing any status dialogs. - */ +/* + * Return status about progress of enumeration instead of + * showing any status dialogs. + */ #define DPENUMSESSIONS_RETURNSTATUS 0x00000080 /**************************************************************************** @@ -1241,10 +1241,10 @@ DECLARE_INTERFACE_(IDirectPlay4, IDirectPlay3) { */ #define DPOPEN_CREATE 0x00000002 - /* - * Return status about progress of open instead of showing - * any status dialogs. - */ +/* + * Return status about progress of open instead of showing + * any status dialogs. + */ #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS /**************************************************************************** @@ -1929,11 +1929,11 @@ DECLARE_INTERFACE_(IDirectPlay, IUnknown) { STDMETHOD(SetPlayerName)(THIS_ DPID, LPSTR, LPSTR) PURE; }; - /**************************************************************************** - * - * IDirectPlay interface macros - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlay interface macros + * + ****************************************************************************/ #if !defined(__cplusplus) || defined(CINTERFACE) diff --git a/lib/win/DirectX/dplobby.h b/lib/win/DirectX/dplobby.h index b174eef1..edbb1a21 100644 --- a/lib/win/DirectX/dplobby.h +++ b/lib/win/DirectX/dplobby.h @@ -303,11 +303,11 @@ DECLARE_INTERFACE_(IDirectPlayLobby3, IDirectPlayLobby) { STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE; }; - /**************************************************************************** - * - * IDirectPlayLobby interface macros - * - ****************************************************************************/ +/**************************************************************************** + * + * IDirectPlayLobby interface macros + * + ****************************************************************************/ #if !defined(__cplusplus) || defined(CINTERFACE) diff --git a/lib/win/DirectX/dsound.h b/lib/win/DirectX/dsound.h index 5941197e..f9dda677 100644 --- a/lib/win/DirectX/dsound.h +++ b/lib/win/DirectX/dsound.h @@ -615,9 +615,9 @@ DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown) { #define IDirectSoundNotify_SetNotificationPositions(p, a, b) (p)->SetNotificationPositions(a, b) #endif // !defined(__cplusplus) || defined(CINTERFACE) - // - // IKsPropertySet - // +// +// IKsPropertySet +// #ifndef _IKsPropertySet_ #define _IKsPropertySet_ @@ -667,9 +667,9 @@ DECLARE_INTERFACE_(IKsPropertySet, IUnknown) { #endif // _IKsPropertySet_ - // - // Return Codes - // +// +// Return Codes +// #define DS_OK 0 @@ -724,9 +724,9 @@ DECLARE_INTERFACE_(IKsPropertySet, IUnknown) { // The requested COM interface is not available #define DSERR_NOINTERFACE E_NOINTERFACE - // - // Flags - // +// +// Flags +// #define DSCAPS_PRIMARYMONO 0x00000001 #define DSCAPS_PRIMARYSTEREO 0x00000002 diff --git a/libmve/mvelibl.cpp b/libmve/mvelibl.cpp index a0d03d92..21e0a08e 100644 --- a/libmve/mvelibl.cpp +++ b/libmve/mvelibl.cpp @@ -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; diff --git a/linux/lnxapp.cpp b/linux/lnxapp.cpp index f9943158..b408ddc8 100644 --- a/linux/lnxapp.cpp +++ b/linux/lnxapp.cpp @@ -55,7 +55,7 @@ #include "mono.h" #include #include "ddio.h" -//#include "local_malloc.h" +// #include "local_malloc.h" #include #include #include diff --git a/linux/lnxcon.cpp b/linux/lnxcon.cpp index 816761ea..3532f580 100644 --- a/linux/lnxcon.cpp +++ b/linux/lnxcon.cpp @@ -44,7 +44,7 @@ #include "TaskSystem.h" //@@#include "mem.h" #include "mono.h" -//#include "local_malloc.h" +// #include "local_malloc.h" #include "pstring.h" #include #include diff --git a/linux/lnxcon_raw.cpp b/linux/lnxcon_raw.cpp index b9a97e3b..89de0113 100644 --- a/linux/lnxcon_raw.cpp +++ b/linux/lnxcon_raw.cpp @@ -26,7 +26,7 @@ #include "AppConsole.h" #include "TaskSystem.h" #include "mono.h" -//#include "local_malloc.h" +// #include "local_malloc.h" #include "pstring.h" #include #include diff --git a/linux/registry.cpp b/linux/registry.cpp index 4629cbfa..ef466749 100644 --- a/linux/registry.cpp +++ b/linux/registry.cpp @@ -33,7 +33,7 @@ #include #include #include -//#include "local_malloc.h" +// #include "local_malloc.h" #include "registry.h" #include "mono.h" diff --git a/lnxcontroller/lnxcontroller.cpp b/lnxcontroller/lnxcontroller.cpp index 6fe889a9..a023c34f 100644 --- a/lnxcontroller/lnxcontroller.cpp +++ b/lnxcontroller/lnxcontroller.cpp @@ -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)); diff --git a/lnxmvelib/lnxdsound.cpp b/lnxmvelib/lnxdsound.cpp index 3adde073..68f60644 100644 --- a/lnxmvelib/lnxdsound.cpp +++ b/lnxmvelib/lnxdsound.cpp @@ -9,7 +9,7 @@ #include #include #include -//#include "dyna_pthread.h"//threads +// #include "dyna_pthread.h"//threads #include "linux/lnxdsound.h" #include "SDL.h" diff --git a/lnxmvelib/mvelibl.cpp b/lnxmvelib/mvelibl.cpp index 13a54c18..d9c1e30e 100644 --- a/lnxmvelib/mvelibl.cpp +++ b/lnxmvelib/mvelibl.cpp @@ -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; diff --git a/mac/InSprocket.c b/mac/InSprocket.c index 4a129d4a..b8198c63 100644 --- a/mac/InSprocket.c +++ b/mac/InSprocket.c @@ -10,12 +10,12 @@ #include "pilot.h" #include "macapp.h" -//#ifndef DAJ_DEBUG //REMOVE +// #ifndef DAJ_DEBUG //REMOVE #define USE_MOUSE -//#endif -//#define MOUSE_MAX 32768.0f +// #endif +// #define MOUSE_MAX 32768.0f #define MOUSE_MAX 48000.0f -//#define MOUSE_MAX 65336.0f +// #define MOUSE_MAX 65336.0f #undef USE_KEYBOARD // NOT on you life Boolean iSprocket_inited = false; diff --git a/mac/MACAPP.CPP b/mac/MACAPP.CPP index b3f79b53..cc89aaee 100644 --- a/mac/MACAPP.CPP +++ b/mac/MACAPP.CPP @@ -62,7 +62,7 @@ bool oeMacApplication::first_time = true; CGrafPtr pWin; // short numDevices = 0; // Creates the window handle and instance -oeMacApplication::oeMacApplication(const char *name, unsigned flags) //:oeApplication() +oeMacApplication::oeMacApplication(const char *name, unsigned flags) //: oeApplication() { Rect rect; @@ -102,7 +102,7 @@ oeMacApplication::oeMacApplication(const char *name, unsigned flags) //:oeApplic m_WasCreated = true; m_DeferFunc = NULL; #ifndef DAJ_DEBUG - //#if 0 + // #if 0 SetupScreen(&m_hWnd); #else #ifdef USE_OPENGL @@ -143,7 +143,7 @@ oeMacApplication::~oeMacApplication() { if (m_WasCreated) { if (m_hWnd) { #ifndef DAJ_DEBUG - //#if 1 + // #if 1 ShutdownScreen(&m_hWnd); #else #ifdef USE_OPENGL @@ -189,7 +189,7 @@ void oeMacApplication::set_sizepos(int x, int y, int w, int h) { // real defer code. #define DEFER_PROCESS_ACTIVE 1 // process is still active #define DEFER_PROCESS_INPUT_IDLE 2 // process input from os not pending. -//#include "ddio.h" +// #include "ddio.h" int oeMacApplication::defer_block() { // IDLE PROCESSING if (m_DeferFunc) diff --git a/mac/MACHEADERSD3.C b/mac/MACHEADERSD3.C index 556a6e77..aa1e186b 100644 --- a/mac/MACHEADERSD3.C +++ b/mac/MACHEADERSD3.C @@ -11,7 +11,7 @@ * (the inverse operation (pointers_in_A0) is performed at the end...) */ #if __MC68K__ && !__CFM68K__ - #pragma d0_pointers on +#pragma d0_pointers on #endif /* * To allow the use of ToolBox calls which have now become obsolete on @@ -19,16 +19,16 @@ * #define OBSOLETE. If your application will never use these calls then you * can comment out this #define. NB: This is for 68K only ... * - + #if !defined(powerc) && !defined(OBSOLETE) - #define OBSOLETE 1 + #define OBSOLETE 1 #endif */ #ifndef OLDROUTINENAMES - #define OLDROUTINENAMES 0 +#define OLDROUTINENAMES 0 #endif -#ifndef OLDROUTINELOCATIONS - #define OLDROUTINELOCATIONS 0 +#ifndef OLDROUTINELOCATIONS +#define OLDROUTINELOCATIONS 0 #endif /* * Metrowerks-specific definitions @@ -38,34 +38,34 @@ * modification. */ #ifndef PtoCstr - #define PtoCstr p2cstr +#define PtoCstr p2cstr #endif #ifndef CtoPstr - #define CtoPstr c2pstr +#define CtoPstr c2pstr #endif #ifndef PtoCString - #define PtoCString p2cstr +#define PtoCString p2cstr #endif #ifndef CtoPString - #define CtoPString c2pstr +#define CtoPString c2pstr #endif #ifndef topLeft - #define topLeft(r) (((Point *) &(r))[0]) +#define topLeft(r) (((Point *)&(r))[0]) #endif #ifndef botRight - #define botRight(r) (((Point *) &(r))[1]) +#define botRight(r) (((Point *)&(r))[1]) #endif #ifndef TRUE - #define TRUE true +#define TRUE true #endif #ifndef FALSE - #define FALSE false +#define FALSE false #endif /* RA/8/19/98 No longer necessary -- will be removed for Pro5 #ifndef powerc - #include - long GetCurrentA5(void) - ONEWORDINLINE(0x200D); + #include + long GetCurrentA5(void) + ONEWORDINLINE(0x200D); #endif */ /* @@ -75,85 +75,85 @@ */ // #include // #include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include // #include - #include - #include - #include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include +#include +#include +#include // #include // #include - #include +#include // #include // #include - #include +#include // #include // #include // #include - #include +#include // #include // #include // #include - #include +#include // #include - #include +#include // #include // #include - #include - #include +#include +#include // #include // #include - #include +#include // #include // #include // #include // #include // #include - #include +#include // #include // #include - #include - #include +#include +#include // #include // #include - #include +#include // #include - #include - #include +#include +#include // #include // #include - #include +#include // #include // #include // #include // #include // #include // #include - #include - #include - #include +#include +#include +#include // #include - #include +#include // #include // #include - #include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include +#include // #include // #include // #include - #include +#include // #include // #include // #include @@ -165,40 +165,40 @@ // #include // #include // #include - #include +#include // #include - #include +#include // #include - #include +#include // #include // #include - #include +#include // #include // #include // #include - #include +#include // #include // #include - #include +#include // #include - #include +#include // #include - #include - #include +#include +#include // #include // #include - #include // Start using MacMemory.h - #include +#include // Start using MacMemory.h +#include // #include - #include - #include +#include +#include // #include // #include // #include - #include +#include // #include - #include - #include +#include +#include // #include // #include // #include @@ -207,13 +207,13 @@ // #include // #include // #include - #include - #include - #include - #include +#include +#include +#include +#include // #include - #include - #include +#include +#include // #include // #include // #include @@ -223,11 +223,11 @@ // #include // #include // #include - #include +#include // #include - #include - #include - #include +#include +#include +#include // #include // #include // #include @@ -252,25 +252,25 @@ // #include // #include // #include - #include +#include // #include // #include - #include - #include +#include +#include // #include // #include // #include // #include // #include - #include +#include // #include // #include // #include // #include - #include - #include +#include +#include // #include - #include +#include // #include // #include // #include @@ -278,38 +278,38 @@ // #include // #include // #include - #include +#include // #include // #include // #include // #include // #include // #include - #include - #include +#include +#include // #include - #include // Start using TextUtils.h -// #include -// #include -// #include - #include - #include +#include // Start using TextUtils.h + // #include + // #include + // #include +#include +#include // #include // #include - #include - #include - #include - #include +#include +#include +#include +#include // #include // #include - #include +#include // #include - #include // Start using MacTypes.h -// #include -// #include - #include +#include // Start using MacTypes.h + // #include + // #include +#include // #include - #include // Start using MacWindows.h +#include // Start using MacWindows.h // #include // #include /* @@ -319,5 +319,5 @@ #include #include #if __MC68K__ && !__CFM68K__ - #pragma d0_pointers reset +#pragma d0_pointers reset #endif diff --git a/mac/MACONLY.H b/mac/MACONLY.H index 1fdad74f..3bacf44b 100644 --- a/mac/MACONLY.H +++ b/mac/MACONLY.H @@ -12,9 +12,9 @@ #include "Macros.h" #define RELEASE -//#define mprintf(args) //Debug_ConsolePrintf args +// #define mprintf(args) //Debug_ConsolePrintf args -//#pragma options align packed +// #pragma options align packed #define MEM_USE_RTL 1 #define and andVar #define or orVar diff --git a/mac/MACSOUND.CPP b/mac/MACSOUND.CPP index f78e6b2d..57de93c8 100644 --- a/mac/MACSOUND.CPP +++ b/mac/MACSOUND.CPP @@ -24,7 +24,7 @@ #include "DDAccess.h" #include #include -//#include +// #include #include "CFILE.H" #include "pserror.h" #include "mono.h" diff --git a/mac/MACSTREAMAUDIO.CPP b/mac/MACSTREAMAUDIO.CPP index 0b1f6fe3..0bcac85a 100644 --- a/mac/MACSTREAMAUDIO.CPP +++ b/mac/MACSTREAMAUDIO.CPP @@ -158,10 +158,10 @@ #include #ifdef MACINTOSH -//#define __MACBUILD__ +// #define __MACBUILD__ #include "adecode.h" #endif -//#include "samirlog.h" +// #include "samirlog.h" #define LOGFILE(_s) #if defined(__LINUX__) @@ -1016,7 +1016,7 @@ void *AudioStream::StreamCallback(int *size) { if (!CHECK_FLAG(m_buffer[nextbuffer].flags, STRM_BUFF_USED)) { // mprintf((0, "**> stream %d (nextbuffer %d) (flags %x) unused stoping!! \n", m_sbufidx, nextbuffer, - //m_buffer[nextbuffer].flags)); mprintf((0, "STRM[%d]: Playing onetime buffer?\n",m_curid)); + // m_buffer[nextbuffer].flags)); mprintf((0, "STRM[%d]: Playing onetime buffer?\n",m_curid)); m_state = STRM_STOPPED; *size = 0; @@ -1041,7 +1041,7 @@ void *AudioStream::StreamCallback(int *size) { *size = m_buffer[m_sbufidx].nbytes; // mprintf((0, "cb size %x\n", m_buffer[m_sbufidx].nbytes)); // mprintf((0, "callback: m_buffer[%d] nbytes 0x%x data 0x%X\n", m_sbufidx, m_buffer[m_sbufidx].nbytes, - //m_buffer[m_sbufidx].data)); + // m_buffer[m_sbufidx].data)); if (CHECK_FLAG(m_buffer[m_sbufidx].flags, STRM_BUFF_TERMINAL)) { // mprintf((0, "STRMAUD: reached end of stream (%d bytes).\n", (*size))); diff --git a/mac/MAC_GLIDE_DEBUG.H b/mac/MAC_GLIDE_DEBUG.H index 72dcf8fc..a5b10f9f 100644 --- a/mac/MAC_GLIDE_DEBUG.H +++ b/mac/MAC_GLIDE_DEBUG.H @@ -11,7 +11,7 @@ #define STEALTH #undef SOUND_ON #define DAJ_DEBUG -//#pragma options align packed +// #pragma options align packed #define MEM_USE_RTL 1 #define and andVar #define or orVar diff --git a/mac/MAC_GLIDE_RELEASE.H b/mac/MAC_GLIDE_RELEASE.H index 1fad8c35..0a1d4d2f 100644 --- a/mac/MAC_GLIDE_RELEASE.H +++ b/mac/MAC_GLIDE_RELEASE.H @@ -11,7 +11,7 @@ #define SOUND_ON #undef STEALTH #undef DAJ_DEBUG -//#pragma options align packed +// #pragma options align packed #define MEM_USE_RTL 1 #define and andVar #define or orVar diff --git a/mac/MAC_LLSOUND.CPP b/mac/MAC_LLSOUND.CPP index 078423be..5f052866 100644 --- a/mac/MAC_LLSOUND.CPP +++ b/mac/MAC_LLSOUND.CPP @@ -335,19 +335,19 @@ int mac_llsSystem::PlaySound3d(play_information *play_info, int sound_index, pos channel_priority[channel] = volume * sound_priority[channel]; // mprintf((2, "ply %d chn %d vol %f pri %d\n", file_index, channel, volume, play_info->priority)); // mprintf((1, "3d%4d L%d %16s dist %.5f (%.5f,%.5f) pri %d, vol %.5f\n", file_index, f_looped, -//SoundFiles[file_index].name, dist, min, max, play_info->priority, volume)); +// SoundFiles[file_index].name, dist, min, max, play_info->priority, volume)); #ifdef SPROCKET17 if (m_sound_quality == SQT_HIGH) { // mprintf((1, "SRC %.5f %.5f %.5f ",cur_pos->position->x, cur_pos->position->y, cur_pos->position->z)); // mprintf((1, "LST %.5f %.5f %.5f\n", m_emulated_listener.position.x, m_emulated_listener.position.y, - //m_emulated_listener.position.z)); + // m_emulated_listener.position.z)); SSpSource_SetPosition3f(m_sr[channel], cur_pos->position->x, cur_pos->position->y, cur_pos->position->z); SSpSource_SetOrientation3f(m_sr[channel], cur_pos->orient->fvec.x, cur_pos->orient->fvec.y, cur_pos->orient->fvec.z); SSpSource_SetUpVector3f(m_sr[channel], cur_pos->orient->uvec.x, cur_pos->orient->uvec.y, cur_pos->orient->uvec.z); SSpSource_SetVelocity3f(m_sr[channel], 0, 0, 0); // SSpSource_SetVelocity3f(m_sr[channel], cur_pos->velocity->x, cur_pos->velocity->y, - //cur_pos->velocity->z); + // cur_pos->velocity->z); SSpSource_SetReferenceDistance(m_sr[channel], (max) / DIST_SCALE); SSpSource_CalcLocalization(m_sr[channel], m_lr, &snd_localization[m_sound_quality]); @@ -438,7 +438,7 @@ void mac_llsSystem::AdjustSound(int sound_uid, pos_state *cur_pos, float adjuste // if(volume <= 0.01) { // mprintf((2, "SMALL VOL %d %.3f dist %.3f (%.3f %.3f)\n", sound_uid, volume, - //dist, min, max)); StopSound(sound_uid); continue; + // dist, min, max)); StopSound(sound_uid); continue; // } channel_priority[channel] = volume * sound_priority[channel]; #ifdef SPROCKET17 @@ -781,7 +781,7 @@ bool mac_llsSystem::CheckAndForceSoundDataAlloc(int sound_uid) { return true; // If not, get the sound data // result = SoundLoadWaveFile(SoundFiles[sound_file_index].name, Sounds[sound_uid].import_volume, sound_file_index, - //SQT_HIGH, true); + // SQT_HIGH, true); result = SoundLoadWaveFile(SoundFiles[sound_file_index].name, Sounds[sound_uid].import_volume, sound_file_index, (m_sound_quality > 0) ? 1 : 0, true); // Why would it load once (table load time) and not now? @@ -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); } diff --git a/mac/MacDisplays.h b/mac/MacDisplays.h index db34b877..84ab6a72 100644 --- a/mac/MacDisplays.h +++ b/mac/MacDisplays.h @@ -4,7 +4,7 @@ #define DSP_800x600 1 #define DSP_1024x768 2 #define DSP_1152x870 3 -//#define DSP_1280x960 4 +// #define DSP_1280x960 4 extern DSpContextAttributes gDSpContextAttributes[]; extern DSpContextReference gDSpContext[]; diff --git a/mac/SNDSPROCKET.CPP b/mac/SNDSPROCKET.CPP index e5375c1d..83646ee6 100644 --- a/mac/SNDSPROCKET.CPP +++ b/mac/SNDSPROCKET.CPP @@ -447,7 +447,7 @@ void sndsprk_get_sound_loc(vms_matrix *listener, vms_vector *listener_pos, int l max_distance = (max_distance * 5) / 4; // Make all sounds travel 1.25 times as far. // Warning: Made the vm_vec_normalized_dir be vm_vec_normalized_dir_quick and got illegal values to acos in the - //fang computation. + // fang computation. distance = vm_vec_normalized_dir_quick(&vector_to_sound, sound_pos, listener_pos); if (distance < max_distance) { diff --git a/mac/macdatabase.cpp b/mac/macdatabase.cpp index f1f516bd..0bd8af58 100644 --- a/mac/macdatabase.cpp +++ b/mac/macdatabase.cpp @@ -53,16 +53,16 @@ #include "pserror.h" #include "gameos.h" -//#define ASSERT(x) -//#define mprintf(x) -//#define _MAX_FNAME 32 -//#define _MAX_DIR 32 -// typedef unsigned long ulong; -//#include -//#include -//#include -//#include -//#include +// #define ASSERT(x) +// #define mprintf(x) +// #define _MAX_FNAME 32 +// #define _MAX_DIR 32 +// typedef unsigned long ulong; +// #include +// #include +// #include +// #include +// #include // ---------------------------------------------------------------------------- // Internal Data Types @@ -151,10 +151,10 @@ bool osMacDatabase::ReadDataFromResourceFork(const char *label, void *entry, int bool success = false; try { - //¥ Start by terminating the entry in case anything goes wrong + // ¥ Start by terminating the entry in case anything goes wrong ((char *)entry)[0] = 0; - //¥ Open the resource file (must be closed later) + // ¥ Open the resource file (must be closed later) mPrefsFileRefNum = FSpOpenResFile(&mPrefsFileSpec, fsRdWrPerm); if (mPrefsFileRefNum == -1) { err = ResError(); @@ -164,18 +164,18 @@ bool osMacDatabase::ReadDataFromResourceFork(const char *label, void *entry, int } } - //¥ Switch to the prefs file's resource fork + // ¥ Switch to the prefs file's resource fork UseResFile(mPrefsFileRefNum); err = ResError(); if (err) { throw(CDatabaseErr("Could not switch to database resource file.", err)); } - //¥ Convert the name string from a c to a pascal style string + // ¥ Convert the name string from a c to a pascal style string Str255 labelPStr = "\p"; CPstrcpy(labelPStr, (char *)label); - //¥ See if this resource exists in the prefs file database + // ¥ See if this resource exists in the prefs file database Handle dataHandle = nil; dataHandle = Get1NamedResource(kMacDatabaseResourceType, labelPStr); err = ResError(); @@ -189,17 +189,17 @@ bool osMacDatabase::ReadDataFromResourceFork(const char *label, void *entry, int ASSERT(dataHandle); - //¥ Lock the handle down in memory + // ¥ Lock the handle down in memory HLock(dataHandle); - //¥ Copy the data to the buffer passed in by the database user - // Note! Only copies up to as many bytes as specified by entrylen initially, returns the + // ¥ Copy the data to the buffer passed in by the database user + // Note! Only copies up to as many bytes as specified by entrylen initially, returns the // actual size of the data in entrylen on completion int dataSize = GetHandleSize(dataHandle); *entrylen = (*entrylen < dataSize) ? *entrylen : dataSize; BlockMove(*dataHandle, entry, *entrylen); - //¥ Unlock the memory handle + // ¥ Unlock the memory handle HUnlock(dataHandle); success = true; @@ -213,7 +213,7 @@ bool osMacDatabase::ReadDataFromResourceFork(const char *label, void *entry, int CloseResFile(mPrefsFileRefNum); mPrefsFileRefNum = -1; - //¥ Restore the original resource file + // ¥ Restore the original resource file UseResFile(saveResFile); return success; @@ -232,7 +232,7 @@ bool osMacDatabase::WriteDataToResourceFork(const char *label, void *entry, int bool success = false; try { - //¥ Open the resource file (must be closed later in destructor) + // ¥ Open the resource file (must be closed later in destructor) mPrefsFileRefNum = FSpOpenResFile(&mPrefsFileSpec, fsRdWrPerm); if (mPrefsFileRefNum == -1) { err = ResError(); @@ -242,18 +242,18 @@ bool osMacDatabase::WriteDataToResourceFork(const char *label, void *entry, int } } - //¥ Switch to the prefs file's resource fork + // ¥ Switch to the prefs file's resource fork UseResFile(mPrefsFileRefNum); err = ResError(); if (err) { throw(CDatabaseErr("Could not switch to database resource file.", err)); } - //¥ Convert the name string from a c to a pascal style string + // ¥ Convert the name string from a c to a pascal style string Str255 labelPStr = "\p"; CPstrcpy(labelPStr, (char *)label); - //¥ See if this resource already exists in the prefs file database + // ¥ See if this resource already exists in the prefs file database Handle oldHandle = nil; oldHandle = Get1NamedResource(kMacDatabaseResourceType, labelPStr); err = ResError(); @@ -263,14 +263,14 @@ bool osMacDatabase::WriteDataToResourceFork(const char *label, void *entry, int if (oldHandle != nil) // If this resource exists, then delete it { - //¥ Now delete the old resource + // ¥ Now delete the old resource RemoveResource(oldHandle); err = ResError(); if (err) { throw(CDatabaseErr("Could not get delete previously existing database entry", err)); } - //¥ Write the changes to disk + // ¥ Write the changes to disk UpdateResFile(mPrefsFileRefNum); err = ResError(); if (err) { @@ -278,41 +278,41 @@ bool osMacDatabase::WriteDataToResourceFork(const char *label, void *entry, int } } - //¥ Create a handle to store the entry in + // ¥ Create a handle to store the entry in Handle entryH = nil; entryH = NewHandleClear(entrylen); if (!entryH) { throw(CDatabaseErr("Could not allocate memory for new database entry", nilHandleErr)); } - //¥ Lock the handle down in memory + // ¥ Lock the handle down in memory HLock(entryH); - //¥ Copy the new entry data to a handle to be added as a named resource + // ¥ Copy the new entry data to a handle to be added as a named resource BlockMove(entry, *entryH, entrylen); - //¥ Get a unique ID for this resource + // ¥ Get a unique ID for this resource short entryResID = 0; entryResID = Unique1ID(kMacDatabaseResourceType); - //¥ Add the resource to the database + // ¥ Add the resource to the database AddResource(entryH, kMacDatabaseResourceType, entryResID, labelPStr); err = ResError(); if (err) { throw(CDatabaseErr("Could not add entry to mac database resource file.", err)); } - //¥ Write the changes to disk + // ¥ Write the changes to disk UpdateResFile(mPrefsFileRefNum); err = ResError(); if (err) { throw(CDatabaseErr("Could add write mac database resource to disk.", err)); } - //¥ Unlock the memory handle + // ¥ Unlock the memory handle HUnlock(entryH); - //¥ Dispose of the memory handle + // ¥ Dispose of the memory handle DisposeHandle(entryH); success = true; @@ -326,7 +326,7 @@ bool osMacDatabase::WriteDataToResourceFork(const char *label, void *entry, int CloseResFile(mPrefsFileRefNum); mPrefsFileRefNum = -1; - //¥ Restore the original resource file + // ¥ Restore the original resource file UseResFile(saveResFile); return success; @@ -369,7 +369,7 @@ bool osMacDatabase::FillOutPrefsInfo(void) { OSErr theErr = noErr; bool success = false; - //¥ Get information about the current process (this app) + // ¥ Get information about the current process (this app) theErr = GetCurrentProcess(&thePSN); thePIR.processName = nil; thePIR.processInfoLength = sizeof(ProcessInfoRec); @@ -377,7 +377,7 @@ bool osMacDatabase::FillOutPrefsInfo(void) { theErr = GetProcessInformation(&thePSN, &thePIR); if (!theErr) { - //¥ Make sure the constructed name will not overflow the maximum file/folder length + // ¥ Make sure the constructed name will not overflow the maximum file/folder length Str31 fileTag = "\p Prefs"; Str31 folderTag = "\p Preferences"; int fileTagLength = (int)fileTag[0]; @@ -386,7 +386,7 @@ bool osMacDatabase::FillOutPrefsInfo(void) { Str255 tempAppName = "\p"; int tempAppNameLength = 0; - //¥ Shorten the app name length until it will fit into the file name + // ¥ Shorten the app name length until it will fit into the file name Pstrcpy(tempAppName, appSpec.name); tempAppNameLength = tempAppName[0]; while (fileTagLength + tempAppNameLength >= _MAX_FNAME) { @@ -394,11 +394,11 @@ bool osMacDatabase::FillOutPrefsInfo(void) { } tempAppName[0] = tempAppNameLength; - //¥ Construct the Prefs File Name + // ¥ Construct the Prefs File Name Pstrcpy(mPrefsFileName, tempAppName); Pstrcat(mPrefsFileName, fileTag); - //¥ Shorten the app name length until it will fit into the folder name + // ¥ Shorten the app name length until it will fit into the folder name Pstrcpy(tempAppName, appSpec.name); tempAppNameLength = tempAppName[0]; while (folderTagLength + tempAppNameLength >= _MAX_DIR) { @@ -406,7 +406,7 @@ bool osMacDatabase::FillOutPrefsInfo(void) { } tempAppName[0] = tempAppNameLength; - //¥ Construct the Prefs Folder Name + // ¥ Construct the Prefs Folder Name Pstrcpy(mPrefsFolderName, tempAppName); Pstrcat(mPrefsFolderName, folderTag); @@ -424,10 +424,10 @@ bool osMacDatabase::InitPrefsFile(void) { bool success = false; try { - //¥ Find the System "Preferences" folder + // ¥ Find the System "Preferences" folder theErr = FindFolder(kOnSystemDisk, kPreferencesFolderType, kCreateFolder, &prefVRefNum, &prefDirID); - //¥ Find (or make) the app prefs folder in the Preferences folder + // ¥ Find (or make) the app prefs folder in the Preferences folder mPrefsFileSpec.vRefNum = prefVRefNum; mPrefsFileSpec.parID = prefDirID; Pstrcpy(mPrefsFileSpec.name, mPrefsFolderName); @@ -439,7 +439,7 @@ bool osMacDatabase::InitPrefsFile(void) { throw(CDatabaseErr("An Error occurred getting at the preferences folder", theErr)); } - //¥ Create the app prefs folder in the Preferences folder + // ¥ Create the app prefs folder in the Preferences folder theErr = FSpDirCreate(&mPrefsFileSpec, smCurrentScript, &newDirID); if (theErr) { @@ -449,14 +449,14 @@ bool osMacDatabase::InitPrefsFile(void) { mPrefsFileSpec.parID = newDirID; } - //¥ At this point we should have a valid FSSpec for items inside the app prefs folder + // ¥ At this point we should have a valid FSSpec for items inside the app prefs folder Pstrcpy(mPrefsFileSpec.name, mPrefsFileName); - //¥ If we make it here OK, create Preferences file if necessary + // ¥ If we make it here OK, create Preferences file if necessary theErr = FSpCreate(&mPrefsFileSpec, mAppSignature, mPrefsFileType, smCurrentScript); - //¥ If there was no error, then file did not already exist, - // and we must create the resource map in the file + // ¥ If there was no error, then file did not already exist, + // and we must create the resource map in the file if (!theErr) { FSpCreateResFile(&mPrefsFileSpec, mAppSignature, mPrefsFileType, smCurrentScript); theErr = ResError(); diff --git a/mac/macdebug.cpp b/mac/macdebug.cpp index fb7ebac7..6971f288 100644 --- a/mac/macdebug.cpp +++ b/mac/macdebug.cpp @@ -74,7 +74,7 @@ char *Debug_DumpInfo(); // if we are running under a debugger, then pass true bool Debug_Init(bool debugger, bool mono_debug) { #ifdef DAJ_DEBUG - //#ifndef RELEASE + // #ifndef RELEASE Debug_break = debugger; if (mono_debug) { diff --git a/manage/manage.cpp b/manage/manage.cpp index 9648b7c7..d0460717 100644 --- a/manage/manage.cpp +++ b/manage/manage.cpp @@ -543,7 +543,7 @@ int mng_IsNetworkUp() { return 1; } void ReorderPages(int); -//#define JASONS_REORDERING +// #define JASONS_REORDERING void Read256TextureNames(); // Sets up our table files, get their filenames, etc. // Returns 1 on success, zero on error @@ -1639,9 +1639,9 @@ void mng_TransferPages() { done:; mem_free(local_tracklocks); } -//#define DELETING_PAGELOCKS 1 -//#define CLEANING_PAGELOCKS 1 -// Given a list of names and a pagetype, unlocks the ones already inside the lock file +// #define DELETING_PAGELOCKS 1 +// #define CLEANING_PAGELOCKS 1 +// Given a list of names and a pagetype, unlocks the ones already inside the lock file int mng_UnlockPagelockSeries(char *names[], int *pagetypes, int num); // Goes through the pagelock table and deletes all duplicate entries int mng_DeleteDuplicatePagelocks(); diff --git a/manage/weaponpage.cpp b/manage/weaponpage.cpp index 434ccb4e..bb9fb254 100644 --- a/manage/weaponpage.cpp +++ b/manage/weaponpage.cpp @@ -301,12 +301,12 @@ #define WEAPONPAGE_COMMAND_DRAG 6 #define WEAPONPAGE_COMMAND_FLAGS 7 #define WEAPONPAGE_COMMAND_FIRE_IMAGE_NAME 8 -//#define WEAPONPAGE_COMMAND_THRUST 9 // not used anymore +// #define WEAPONPAGE_COMMAND_THRUST 9 // not used anymore #define WEAPONPAGE_COMMAND_FULL_THRUST 10 #define WEAPONPAGE_COMMAND_SOUND_NAME 11 #define WEAPONPAGE_COMMAND_AMMO_USAGE 12 #define WEAPONPAGE_COMMAND_ENERGY_USAGE 13 -//#define WEAPONPAGE_COMMAND_EXPLODE_NAME 14 // exploding vclip name (not used anymore) +// #define WEAPONPAGE_COMMAND_EXPLODE_NAME 14 // exploding vclip name (not used anymore) #define WEAPONPAGE_COMMAND_FIRE_DELAY 15 #define WEAPONPAGE_COMMAND_NUM_SHOTS 16 #define WEAPONPAGE_COMMAND_PHYS_FLAGS 17 diff --git a/mem/mem.cpp b/mem/mem.cpp index 07d2331d..97a659ec 100644 --- a/mem/mem.cpp +++ b/mem/mem.cpp @@ -194,10 +194,10 @@ #include "mem.h" #include "pserror.h" #include "pstypes.h" -//#include "args.h" -//#include "ddio.h" +// #include "args.h" +// #include "ddio.h" // -//#define MEM_DEBUG +// #define MEM_DEBUG #ifdef MEM_USE_RTL #pragma message("mem.cpp: Compiling For Run-Time Library usage") @@ -295,7 +295,7 @@ int MacDynamicStartMem = 0; #define FAILSAFE_SIZE 2048 #ifdef DAJ_DEBUG -//#define MEM_LOGFILE +// #define MEM_LOGFILE #endif #define USE_MALLOC @@ -473,9 +473,9 @@ bool mem_dumpmallocstofile(char *filename) { return false; } // Windows memory management // Uncomment this to detect memory leaks and memory overwrites. Slows down mallocs and frees a little. -//#define MEM_DEBUG 1 +// #define MEM_DEBUG 1 // Uncomment this if you want everything written to "memory.out" -//#define MEM_LOGFILE 1 +// #define MEM_LOGFILE 1 #ifdef MEM_USE_RTL #undef MEM_DEBUG diff --git a/misc/endian.cpp b/misc/endian.cpp index 6087f97f..9142475d 100644 --- a/misc/endian.cpp +++ b/misc/endian.cpp @@ -27,7 +27,7 @@ #include "mono.h" #define SWAPSHORT(x) ((0xffff & ((x) << 8) | (((unsigned short)(x)) >> 8))) -#define SWAPINT(x) (((x) << 24) | (((unsigned long)(x)) >> 24) | (((x)&0x0000ff00) << 8) | (((x)&0x00ff0000) >> 8)) +#define SWAPINT(x) (((x) << 24) | (((unsigned long)(x)) >> 24) | (((x) & 0x0000ff00) << 8) | (((x) & 0x00ff0000) >> 8)) inline float SWAPFLOAT(float x) { int i = SWAPINT(*((int *)&(x))); return *((float *)&(i)); diff --git a/misc/error.cpp b/misc/error.cpp index 0774ae81..e7eff87e 100644 --- a/misc/error.cpp +++ b/misc/error.cpp @@ -210,7 +210,7 @@ void AssertionFailed(char *expstr, char *file, int line) { if (DebugBreak_callback_resume) (*DebugBreak_callback_resume)(); -#endif //#ifndef RELEASE +#endif // #ifndef RELEASE } // error message output function diff --git a/music/sequencer.cpp b/music/sequencer.cpp index 7bb1e754..50734fcc 100644 --- a/music/sequencer.cpp +++ b/music/sequencer.cpp @@ -138,7 +138,7 @@ #include #include -//#include "samirlog.h" +// #include "samirlog.h" #define LOGFILE(_s) OutrageMusicSeq::OutrageMusicSeq() { diff --git a/netcon/includes/con_dll.h b/netcon/includes/con_dll.h index a5fa9e43..9617a60c 100644 --- a/netcon/includes/con_dll.h +++ b/netcon/includes/con_dll.h @@ -255,7 +255,7 @@ #endif // Uncomment out this line of code to build the demo version of the multiplayer connection dlls -//#define DEMO 1 +// #define DEMO 1 // localization info char **StringTable; diff --git a/netcon/includes/inetgetfile.h b/netcon/includes/inetgetfile.h index 7102c641..439260ca 100644 --- a/netcon/includes/inetgetfile.h +++ b/netcon/includes/inetgetfile.h @@ -86,7 +86,7 @@ #if !MACOSX #include #include -//#include +// #include #endif #define BOOL bool @@ -120,7 +120,7 @@ inline int WSAGetLastError() { return errno; } #endif #include -//#include +// #include /* typedef int (*pthread_create_fp)(pthread_t *__thread,__const pthread_attr_t *__attr,void *(*__start_routine) (void diff --git a/netcon/lanclient/lanclient.h b/netcon/lanclient/lanclient.h index 3c596b42..24c4eadb 100644 --- a/netcon/lanclient/lanclient.h +++ b/netcon/lanclient/lanclient.h @@ -65,7 +65,7 @@ #include "ui.h" -//#define ubyte unsigned char +// #define ubyte unsigned char #define TRACKER_MENU_W 256 #define TRACKER_MENU_H 256 diff --git a/netgames/dmfc/dmfcbase.cpp b/netgames/dmfc/dmfcbase.cpp index 007293a0..93e649cd 100644 --- a/netgames/dmfc/dmfcbase.cpp +++ b/netgames/dmfc/dmfcbase.cpp @@ -610,7 +610,7 @@ DMFCBase::~DMFCBase(void) { SPRoot = NULL; } -//##################Setup and processing functions####################### +// ##################Setup and processing functions####################### // DMFCBase::InitializeForLevel // diff --git a/netgames/dmfc/dmfcclient.cpp b/netgames/dmfc/dmfcclient.cpp index fa88f8a5..c95d688a 100644 --- a/netgames/dmfc/dmfcclient.cpp +++ b/netgames/dmfc/dmfcclient.cpp @@ -280,7 +280,7 @@ char *DMFCGetString(int d); $$TABLE_SOUND "PlayerDeath" */ -//######################### Client allowed event handlers############################ +// ######################### Client allowed event handlers############################ // DMFCBase::OnClientPlayerKilled (Only called if server tells client to execute) // diff --git a/netgames/dmfc/dmfcinternal.h b/netgames/dmfc/dmfcinternal.h index ff0a9e5c..9ba6cfa6 100644 --- a/netgames/dmfc/dmfcinternal.h +++ b/netgames/dmfc/dmfcinternal.h @@ -246,8 +246,8 @@ #define DMFC_VERSION_MINOR 0 // DEMO 1.0 -//#define DMFC_VERSION_MAJOR 0 -//#define DMFC_VERSION_MINOR 60 +// #define DMFC_VERSION_MAJOR 0 +// #define DMFC_VERSION_MINOR 60 class DMFCBase; @@ -566,7 +566,7 @@ public: DMFCBase(void); ~DMFCBase(void); - //##################Setup and processing functions####################### + // ##################Setup and processing functions####################### // DMGFBase::LoadFunctions // @@ -586,7 +586,7 @@ public: // DMFCApp::GameClose, make sure that you put a call to this somewhere in the override void GameClose(void); - //###################Server Only functions################################ + // ###################Server Only functions################################ // DMFCBase::OnServerPlayerKilled // @@ -694,7 +694,7 @@ public: // Not automatically sent to clients virtual void OnServerObjectDestroyed(object *obj); - //######################### Client allowed event handlers############################ + // ######################### Client allowed event handlers############################ // DMFCBase::OnClientPlayerKilled (Only called if server tells client to execute) // @@ -2767,7 +2767,7 @@ private: #define UIID_WAITFORPLAYERS 0xEEE1 // Uncomment the following define to put a black background on the in-game menus -//#define DMFC_MENUBACKGROUND +// #define DMFC_MENUBACKGROUND #define PINFO_CLEAR -2 #define PINFO_INUSE -1 diff --git a/netgames/dmfc/dmfcserver.cpp b/netgames/dmfc/dmfcserver.cpp index cecda352..d67263ce 100644 --- a/netgames/dmfc/dmfcserver.cpp +++ b/netgames/dmfc/dmfcserver.cpp @@ -91,7 +91,7 @@ extern char *_DMFCErrorString; extern DMFCBase *basethis; char *DMFCGetString(int d); -//###################Server Only functions################################ +// ###################Server Only functions################################ // DMFCBase::OnServerPlayerKilled // diff --git a/netgames/includes/DMFC.h b/netgames/includes/DMFC.h index fa5f0682..ce88762b 100644 --- a/netgames/includes/DMFC.h +++ b/netgames/includes/DMFC.h @@ -590,8 +590,8 @@ typedef struct { #define MIF_INCLUDENONE \ 0x01 // for MIT_PSTATE, this will place a at the top, it will send a -1 to the function, if selected -//#define MIF_IGNORESERVER 0x02 //for MIT_PSTATE, this will keep the server out of the list -//#define MIF_IGNOREME 0x04 //for MIT_PSTATE, this will keep your pnum out of the list +// #define MIF_IGNORESERVER 0x02 //for MIT_PSTATE, this will keep the server out of the list +// #define MIF_IGNOREME 0x04 //for MIT_PSTATE, this will keep your pnum out of the list #define MAX_COLUMN_TITLE_SIZE 15 diff --git a/netgames/includes/idmfc.h b/netgames/includes/idmfc.h index 8319aabe..2934a249 100644 --- a/netgames/includes/idmfc.h +++ b/netgames/includes/idmfc.h @@ -191,7 +191,7 @@ public: // DMFCApp::GameClose, make sure that you put a call to this somewhere in the override virtual void GameClose(void) = 0; - //###################Server Only functions################################ + // ###################Server Only functions################################ // DMFCBase::OnServerPlayerKilled // @@ -299,7 +299,7 @@ public: // Not automatically sent to clients virtual void OnServerObjectDestroyed(object *obj) = 0; - //######################### Client allowed event handlers############################ + // ######################### Client allowed event handlers############################ // DMFCBase::OnClientPlayerKilled (Only called if server tells client to execute) // @@ -1695,7 +1695,7 @@ public: virtual bool CanScrollUp() = 0; }; -#endif //#ifdef USECLASSES +#endif // #ifdef USECLASSES //=========================================================================================== #ifdef __cplusplus diff --git a/networking/networking.cpp b/networking/networking.cpp index ed3aef27..a37b5bd5 100644 --- a/networking/networking.cpp +++ b/networking/networking.cpp @@ -302,7 +302,7 @@ typedef int socklen_t; #endif #include "descent.h" -//#include "../manage/shippage.h" +// #include "../manage/shippage.h" #include "appdatabase.h" #include "pstypes.h" @@ -2307,8 +2307,8 @@ int CDECLCALL gethostbynameworker(void *parm); #include "SDL_thread.h" // rcg06192000 use SDL threads. -//#include -//#include +// #include +// #include // typedef int (*pthread_create_fp)(pthread_t *__thread,__const pthread_attr_t *__attr,void *(*__start_routine) (void // *),void *__arg); typedef int (*pthread_detach_fp)(pthread_t __th); typedef pthread_t (*pthread_self_fp)(void); static // pthread_create_fp dpthread_create = NULL; static pthread_detach_fp dpthread_detach = NULL; static pthread_self_fp diff --git a/physics/Collide.cpp b/physics/Collide.cpp index 0b0a49c5..ad1600e2 100644 --- a/physics/Collide.cpp +++ b/physics/Collide.cpp @@ -938,8 +938,9 @@ 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 -// were hurting me more than robots! #define DAMAGE_THRESHOLD (F1_0/3) #define WALL_LOUDNESS_SCALE (20) +// #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; @@ -1114,14 +1115,14 @@ bool collide_weapon_and_wall(object *weapon, fix hitspeed, int hitseg, int hitwa bool f_volatile, f_lava, f_water; // mprintf((0, "Weapon hit wall, how nice.\n")); - //#ifndef RELEASE + // #ifndef RELEASE if ((stricmp(Weapons[weapon->id].name, "Yellow flare") == 0) && (weapon->parent_handle == Player_object->handle) && (KEY_STATE(KEY_LAPOSTRO))) if (ROOMNUM_OUTSIDE(hitseg)) AddHUDMessage("Terrain cell %d", CELLNUM(hitseg)); else AddHUDMessage("Room %d face %d", hitseg, hitwall); - //#endif + // #endif // Check if forcefield int tmap; diff --git a/physics/FindIntersection.cpp b/physics/FindIntersection.cpp index 2558542a..abed7d9e 100644 --- a/physics/FindIntersection.cpp +++ b/physics/FindIntersection.cpp @@ -844,7 +844,7 @@ #include "pserror.h" #include "collide.h" #include "terrain.h" -//#include "bspfi.h" +// #include "bspfi.h" #include "3d.h" #include "room.h" #include "descent.h" @@ -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,15 +3429,15 @@ 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) // || - //check_vector_to_object(&hit_point, &cur_dist, &fvi_anim_sphere_p0,&fvi_anim_sphere_p1, - //fvi_anim_sphere_rad, &Objects[objnum], &Objects[fvi_query_ptr->thisobjnum]) + // check_vector_to_object(&hit_point, &cur_dist, &fvi_anim_sphere_p0,&fvi_anim_sphere_p1, + // fvi_anim_sphere_rad, &Objects[objnum], &Objects[fvi_query_ptr->thisobjnum]) // { fvi_curobj = objnum; fvi_moveobj = m_obj_index; @@ -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) { diff --git a/physics/physics.cpp b/physics/physics.cpp index 99d1ec34..86a17d10 100644 --- a/physics/physics.cpp +++ b/physics/physics.cpp @@ -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")); diff --git a/renderer/Direct3D.cpp b/renderer/Direct3D.cpp index 82b49c18..570f0ad6 100644 --- a/renderer/Direct3D.cpp +++ b/renderer/Direct3D.cpp @@ -3120,7 +3120,7 @@ void d3d_SetFrameBufferCopyState(bool state) { for (int i = 0; i < 32768; i++) { int r = (i >> 10) & 0x1f; int g = (i >> 5) & 0x1f; - int b = (i)&0x1f; + int b = (i) & 0x1f; if (bit15 == false) { g <<= 1; diff --git a/renderer/HardwareOpenGL.cpp b/renderer/HardwareOpenGL.cpp index 2e7bc601..98591274 100644 --- a/renderer/HardwareOpenGL.cpp +++ b/renderer/HardwareOpenGL.cpp @@ -1860,7 +1860,7 @@ int rend_Init(renderer_type state, oeApplication *app, renderer_preferred_state return retval; #else return 0; -#endif //#ifdef DEDICATED_ONLY +#endif // #ifdef DEDICATED_ONLY } void rend_Close(void) { diff --git a/renderer/RendererConfig.h b/renderer/RendererConfig.h index 9a2ff502..fc9f6481 100644 --- a/renderer/RendererConfig.h +++ b/renderer/RendererConfig.h @@ -2,9 +2,9 @@ #define __RENDERER_CONFIG_H__ // use this to toggle "Hardware T&L" vs. "Software" -//#define USE_SOFTWARE_TNL +// #define USE_SOFTWARE_TNL // JEFF: I PUT THIS IN TO MAKE THINGS A LITTLE BRIGHTER SO I CAN SEE WHILE TESTING -//#define BRIGHTNESS_HACK 1.6f +// #define BRIGHTNESS_HACK 1.6f #endif diff --git a/renderer/SoftwareOpenGL.cpp b/renderer/SoftwareOpenGL.cpp index 773e5c8b..93df88e8 100644 --- a/renderer/SoftwareOpenGL.cpp +++ b/renderer/SoftwareOpenGL.cpp @@ -1976,7 +1976,7 @@ int rend_Init(renderer_type state, oeApplication *app, renderer_preferred_state return retval; #else return 0; -#endif //#ifdef DEDICATED_ONLY +#endif // #ifdef DEDICATED_ONLY } void rend_Close(void) { @@ -2094,18 +2094,18 @@ void rend_DrawPolygon3D(int handle, g3Point **p, int nv, int map_type) { colorp->a = alpha; } else - // Do lighting based on intesity (MONO) or colored (RGB) - if (OpenGL_state.cur_color_model == CM_MONO) { - colorp->r = pnt->p3_l; - colorp->g = pnt->p3_l; - colorp->b = pnt->p3_l; - colorp->a = alpha; - } else { - colorp->r = pnt->p3_r; - colorp->g = pnt->p3_g; - colorp->b = pnt->p3_b; - colorp->a = alpha; - } + // Do lighting based on intesity (MONO) or colored (RGB) + if (OpenGL_state.cur_color_model == CM_MONO) { + colorp->r = pnt->p3_l; + colorp->g = pnt->p3_l; + colorp->b = pnt->p3_l; + colorp->a = alpha; + } else { + colorp->r = pnt->p3_r; + colorp->g = pnt->p3_g; + colorp->b = pnt->p3_b; + colorp->a = alpha; + } } else { colorp->r = 1; colorp->g = 1; diff --git a/renderer/dyna_gl_ryan.h b/renderer/dyna_gl_ryan.h index c10478f0..69f57940 100644 --- a/renderer/dyna_gl_ryan.h +++ b/renderer/dyna_gl_ryan.h @@ -15,7 +15,7 @@ typedef void(GLFUNCCALL *PFNGLACTIVETEXTUREARBPROC)(GLenum texture); typedef void(GLFUNCCALL *PFNGLCLIENTACTIVETEXTUREARBPROC)(GLenum texture); typedef void(GLFUNCCALL *PFNGLMULTITEXCOORD4FARBPROC)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); // end ryan's add. -//#include +// #include #else #define GLFUNCCALL #endif diff --git a/renderer/opengl.cpp b/renderer/opengl.cpp index 4e602ceb..1fe11a4f 100644 --- a/renderer/opengl.cpp +++ b/renderer/opengl.cpp @@ -1715,18 +1715,18 @@ void opengl_DrawPolygon(int handle, g3Point **p, int nv, int map_type) { colorp->a = alpha; } else - // Do lighting based on intesity (MONO) or colored (RGB) - if (OpenGL_state.cur_color_model == CM_MONO) { - colorp->r = pnt->p3_l; - colorp->g = pnt->p3_l; - colorp->b = pnt->p3_l; - colorp->a = alpha; - } else { - colorp->r = pnt->p3_r; - colorp->g = pnt->p3_g; - colorp->b = pnt->p3_b; - colorp->a = alpha; - } + // Do lighting based on intesity (MONO) or colored (RGB) + if (OpenGL_state.cur_color_model == CM_MONO) { + colorp->r = pnt->p3_l; + colorp->g = pnt->p3_l; + colorp->b = pnt->p3_l; + colorp->a = alpha; + } else { + colorp->r = pnt->p3_r; + colorp->g = pnt->p3_g; + colorp->b = pnt->p3_b; + colorp->a = alpha; + } } else { colorp->r = 1; colorp->g = 1; diff --git a/renderer/opengl_ryan.cpp b/renderer/opengl_ryan.cpp index 4c97ba3e..e58fa6c7 100644 --- a/renderer/opengl_ryan.cpp +++ b/renderer/opengl_ryan.cpp @@ -4,7 +4,7 @@ #elif defined(__LINUX__) #include "linux/linux_fix.h" -//#include "linux/dyna_xext.h" +// #include "linux/dyna_xext.h" #include "lnxscreenmode.h" #ifdef __CHECK_FOR_TOO_SLOW_RENDERING__ @@ -13,7 +13,7 @@ #include "byteswap.h" -//#include +// #include #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) @@ -50,7 +50,7 @@ extern bool ddio_mouseGrabbed; #include "rend_opengl.h" #include "grdefs.h" #include "gl.h" -//#include "glu.h" +// #include "glu.h" #include "mem.h" #include "rtperformance.h" #include "dyna_gl.h" @@ -2634,18 +2634,18 @@ void opengl_DrawPolygon(int handle, g3Point **p, int nv, int map_type) { colorp->a = alpha; } else - // Do lighting based on intesity (MONO) or colored (RGB) - if (OpenGL_state.cur_color_model == CM_MONO) { - colorp->r = pnt->p3_l; - colorp->g = pnt->p3_l; - colorp->b = pnt->p3_l; - colorp->a = alpha; - } else { - colorp->r = pnt->p3_r; - colorp->g = pnt->p3_g; - colorp->b = pnt->p3_b; - colorp->a = alpha; - } + // Do lighting based on intesity (MONO) or colored (RGB) + if (OpenGL_state.cur_color_model == CM_MONO) { + colorp->r = pnt->p3_l; + colorp->g = pnt->p3_l; + colorp->b = pnt->p3_l; + colorp->a = alpha; + } else { + colorp->r = pnt->p3_r; + colorp->g = pnt->p3_g; + colorp->b = pnt->p3_b; + colorp->a = alpha; + } } else { colorp->r = 1; colorp->g = 1; diff --git a/renderer/renderer.cpp b/renderer/renderer.cpp index 12b2afad..1508b094 100644 --- a/renderer/renderer.cpp +++ b/renderer/renderer.cpp @@ -415,17 +415,17 @@ // Renderers for Windows version. Mac gets these through a global include file. #if defined(WIN32) #define USE_OPENGL -//#define USE_GLIDE +// #define USE_GLIDE #define USE_D3D -//#define USE_SOFTWARE +// #define USE_SOFTWARE #endif // Renderers for Linux version #if defined(__LINUX__) #define USE_OPENGL #define USE_GLIDE -//#define USE_D3D -//#define USE_SOFTWARE +// #define USE_D3D +// #define USE_SOFTWARE #endif #ifdef USE_SOFTWARE @@ -595,7 +595,7 @@ int rend_Init(renderer_type state, oeApplication *app, renderer_preferred_state return retval; #else return 0; -#endif //#ifdef DEDICATED_ONLY +#endif // #ifdef DEDICATED_ONLY } void rend_Close() { mprintf((0, "CLOSE:Renderer init is set to %d\n", Renderer_initted)); @@ -664,7 +664,7 @@ void rend_DrawPolygon(int handle, g3Point **p, int nv, int map_type) { Int3(); break; } -#endif //#ifdef DEDICATED_ONLY +#endif // #ifdef DEDICATED_ONLY } void rend_SetFlatColor(ddgr_color color) { switch (Renderer_type) { diff --git a/scripts/AIGame.cpp b/scripts/AIGame.cpp index 1c7aab24..c3943263 100644 --- a/scripts/AIGame.cpp +++ b/scripts/AIGame.cpp @@ -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,10 +7821,11 @@ 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_ATTACK_MY_TARGET 4 -// BSCOMM_ARE_YOU_IN_MODE +// #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 bool BarnSwallow::ReceiveCommand(int me, int it, gb_com *command) { bool f_ok = true; diff --git a/scripts/DallasFuncs.cpp b/scripts/DallasFuncs.cpp index f1edd363..211dccf1 100644 --- a/scripts/DallasFuncs.cpp +++ b/scripts/DallasFuncs.cpp @@ -697,8 +697,8 @@ #include "osiris_vector.h" // These should really be included, I think, but there's a problem with osiris_import.h being included twice -//#include "osiris_import.h" -//#include "osiris_common.h" +// #include "osiris_import.h" +// #include "osiris_common.h" /* @@ -5475,7 +5475,7 @@ int qObjRoom(int objref) { // These should be in object_external.h #define ROOMNUM_CELLNUM_FLAG 0x80000000 -#define ROOMNUM_OUTSIDE(roomnum) (((roomnum)&ROOMNUM_CELLNUM_FLAG) != 0) +#define ROOMNUM_OUTSIDE(roomnum) (((roomnum) & ROOMNUM_CELLNUM_FLAG) != 0) /* $$QUERY diff --git a/scripts/aigame2.cpp b/scripts/aigame2.cpp index 921b3bdd..3ef59f14 100644 --- a/scripts/aigame2.cpp +++ b/scripts/aigame2.cpp @@ -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; diff --git a/scripts/aigame4.cpp b/scripts/aigame4.cpp index 40616730..4f9e21f9 100644 --- a/scripts/aigame4.cpp +++ b/scripts/aigame4.cpp @@ -980,7 +980,7 @@ void MercEndBoss::DoFrame(int me) { // { // vector bf_pos = ray.hit_point + (orient.fvec //* 9.0f); Obj_Create(OBJ_POWERUP, - //memory->wallhit_id, 76, &bf_pos); + // memory->wallhit_id, 76, &bf_pos); /// //mprintf(0, "HERE X\n"); // } } diff --git a/scripts/lnx/osiris_vector.h b/scripts/lnx/osiris_vector.h index da63cc42..ec6b9c5f 100644 --- a/scripts/lnx/osiris_vector.h +++ b/scripts/lnx/osiris_vector.h @@ -47,7 +47,7 @@ fix FloatToFixFast(float num); // Conversion macros //??#define FloatToFix(num) Round((num) * FLOAT_SCALER) -#define FloatToFix(num) ((fix)((num)*FLOAT_SCALER)) +#define FloatToFix(num) ((fix)((num) * FLOAT_SCALER)) #define IntToFix(num) ((num) << FIX_SHIFT) #define ShortToFix(num) (((long)(num)) << FIX_SHIFT) #define FixToFloat(num) (((float)(num)) / FLOAT_SCALER) diff --git a/scripts/osiris_vector.h b/scripts/osiris_vector.h index a215d8d0..94e01f55 100644 --- a/scripts/osiris_vector.h +++ b/scripts/osiris_vector.h @@ -47,7 +47,7 @@ fix FloatToFixFast(float num); // Conversion macros //??#define FloatToFix(num) Round((num) * FLOAT_SCALER) -#define FloatToFix(num) ((fix)((num)*FLOAT_SCALER)) +#define FloatToFix(num) ((fix)((num) * FLOAT_SCALER)) #define IntToFix(num) ((num) << FIX_SHIFT) #define ShortToFix(num) (((long)(num)) << FIX_SHIFT) #define FixToFloat(num) (((float)(num)) / FLOAT_SCALER) diff --git a/sndlib/sndrender.cpp b/sndlib/sndrender.cpp index 0ad329b7..bf0bf8f0 100644 --- a/sndlib/sndrender.cpp +++ b/sndlib/sndrender.cpp @@ -318,7 +318,7 @@ void aureal_test() { OutrageMessageBox("Please terminate debug viewer"); #endif Sound_system.SetSoundMixer(old_mixer); -#endif //#ifdef WIN32 +#endif // #ifdef WIN32 } ///////////////////////////////////////////////////////////////////////////// diff --git a/stream_audio/streamaudio.cpp b/stream_audio/streamaudio.cpp index 175af8a4..b5895f45 100644 --- a/stream_audio/streamaudio.cpp +++ b/stream_audio/streamaudio.cpp @@ -154,7 +154,7 @@ #include "ddio.h" #include #include -//#include "samirlog.h" +// #include "samirlog.h" #define LOGFILE(_s) #if defined(MACINTOSH) typedef unsigned ReadFunction(void *data, void *buf, unsigned qty); diff --git a/ui/UIRes.cpp b/ui/UIRes.cpp index 9d1fcaa8..fabe02ea 100644 --- a/ui/UIRes.cpp +++ b/ui/UIRes.cpp @@ -184,9 +184,9 @@ bool UISnazzyTextItem::draw(int x, int y, tUIDrawClass draw_class) { if (m_flags & UISNAZZYTEXTF_BLINKING) { int r, r2, g, g2, b, b2; if (m_flags & UISTIF_INCREASING) - m_data.f += ((UIFrameTime)*1.5f); + m_data.f += ((UIFrameTime) * 1.5f); else - m_data.f -= ((UIFrameTime)*1.5f); + m_data.f -= ((UIFrameTime) * 1.5f); if (m_data.f < 0.0f) { m_data.f = 0.0; diff --git a/win32/WinController.cpp b/win32/WinController.cpp index 6d280877..3b4f1315 100644 --- a/win32/WinController.cpp +++ b/win32/WinController.cpp @@ -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)); diff --git a/win32/winapp.cpp b/win32/winapp.cpp index 7ecd1fa9..5c60ac73 100644 --- a/win32/winapp.cpp +++ b/win32/winapp.cpp @@ -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; diff --git a/win32/windebug.cpp b/win32/windebug.cpp index 7f8d840e..66c73ab3 100644 --- a/win32/windebug.cpp +++ b/win32/windebug.cpp @@ -321,7 +321,7 @@ int Debug_MessageBox(int type, const char *title, const char *str) { // This CODE SHOULD ONLY BE USED IN A DEBUGGABLE VERSION. #define SHOW_CALL_STACK // Uncomment SHOW_CALL_STACK to show the call stack in terminal cases -//#define DUMPRAM +// #define DUMPRAM #ifdef SHOW_CALL_STACK