Compare commits

...
Author SHA1 Message Date
wmcoolmon 4f719b2c4d Fixed text not displaying for single-weapon sips. 2004-12-25 19:17:23 +00:00
wmcoolmon 4b5f47441b Quick update to tempfix possible bug. 2004-12-25 17:45:38 +00:00
wmcoolmon 6b3c4a3bbe Fixed a couple of blonde moments. 2004-12-25 17:02:18 +00:00
wmcoolmon 2f8c97d99d Fix to modular tables workaround with Fs2NetD 2004-12-25 16:42:59 +00:00
wmcoolmon 3d527efc50 Sync to current NEW_HUD code 2004-12-25 09:28:41 +00:00
wmcoolmon 7dd62135a3 Fix to modular tables workaround with Fs2NetD + Sync to current NEW_HUD code 2004-12-25 09:27:41 +00:00
wmcoolmon 4071a37ef4 Fix to modular tables workaround with Fs2NetD 2004-12-25 09:25:41 +00:00
wmcoolmon dd6eea5406 Ogg support for WIN32 2004-12-25 00:23:46 +00:00
wmcoolmon 840a2b37b5 Added .ogg in proper directories 2004-12-25 00:22:54 +00:00
Goober5000 762d41f41c resorted command-line options and added an option for WMC's ballistic gauge
--Goober5000
2004-12-24 19:36:12 +00:00
wmcoolmon e0b48bec6f NEW_HUD compiles now. :) 2004-12-24 05:07:05 +00:00
wmcoolmon 28b3a8cffa Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-24 01:07:19 +00:00
wmcoolmon 431335b27d Ballistic primary ammo-gauge to the right of the HUD, support for weapon images in list. 2004-12-24 00:41:23 +00:00
wmcoolmon 237ae621a4 Removed unneccessary function call (.0000001 ms speed increase!) 2004-12-23 23:36:30 +00:00
wmcoolmon f959999594 Added +Hud Image: for weapons, which replaces the weapon name in the list with an image. 2004-12-23 23:35:02 +00:00
wmcoolmon 997d57faae Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-23 23:30:45 +00:00
wmcoolmon 1f2a891c7a Proposed HUD system stuffs - within NEW_HUD defines. 2004-12-23 23:08:21 +00:00
phreak 911528b6d7 commits for scramble-messages and unscramble-messages
-phreak
2004-12-23 15:58:55 +00:00
phreak 9b6620e21c added a pragma message if DevIL isn't compiled into the build 2004-12-22 23:05:48 +00:00
taylor 17fc45faba add a popup to make sure people know about pilot upgrade 2004-12-22 21:49:05 +00:00
taylor 59add586e3 safety check against very large missions 2004-12-22 21:48:21 +00:00
taylor bb472f8669 version bump to 3.6.5 2004-12-22 21:47:37 +00:00
wmcoolmon 2f807f5793 Quick fix to hudparse.cpp; If this causes any problems, roll it back and I'll take another look at it. 2004-12-22 09:09:38 +00:00
fryday a770aeab31 Fixed a tiny error in bob's code in d3d_init_environment (which seems to be called even
if there's no -env command-line) which created the cube-map and didn't check
if the creation of it failed. Added the same sanity check to d3d_render_to_env
2004-12-20 20:28:15 +00:00
fryday afa8e9b947 Commented out ATL dependencies (And changed one macro to an swprintf instead)
Tiny change in animplay ( pow(2.0, ...) instead of pow(2, ...)) because VS2K5
throws an ambiguity error over that.
2004-12-20 20:18:30 +00:00
taylor 6c733d9f7b fix crash from dynamically allocated Personas 2004-12-17 06:43:01 +00:00
Goober5000 4474d26e5b move wing name initialization to ship_level_init
--Goober5000
2004-12-15 17:32:19 +00:00
Goober5000 9ca91d3518 commented dumbfire lead indicator back in, because you need to know where your missiles are going
--Goober5000
2004-12-15 15:22:23 +00:00
Goober5000 d4823f735a added Verify, an error checking macro that works in both release and debug modes
--Goober5000
2004-12-15 15:14:03 +00:00
Goober5000 4f87d063b8 new version of stristr that doesn't need to allocate memory
--Goober5000
2004-12-14 17:23:52 +00:00
Goober5000 eaae1243e6 allow different wing names than ABGDEZ
--Goober5000
2004-12-14 14:46:13 +00:00
wmcoolmon 3ce44dcdfa Apparently I never commited -mpnoreturn... 2004-12-11 09:37:50 +00:00
wmcoolmon 17f4291b70 Changed music modular table ending to *-mus.tbm, in case a miscellaneous modular table is needed. 2004-12-11 09:03:08 +00:00
taylor 31019d38a2 dymanic allocation of Personas 2004-12-10 17:21:00 +00:00
taylor bca69ce180 fix old V bug when cancelling the pilot select screen 2004-12-05 23:47:18 +00:00
bobboau f56c5d230e sevral feature additions that WCS wanted,
and the foundations of a submodel animation system,
the calls to the animation triggering code (exept the procesing code,
wich shouldn't do anything without the triggering code)
have been commented out.
2004-12-05 22:01:12 +00:00
taylor 45caba7c72 support uncompressed DDS images
use TexSubImage2D for video anis
2004-12-05 01:28:39 +00:00
taylor 0fc13dfa87 text of -no_set_gamma cmdline option shouldn't specify D3D since it works in OGL too 2004-12-02 11:20:33 +00:00
taylor f5b60aa156 make OGL use same gamma reg setting as D3D since it's the same ramp
have OGL respect the -no_set_gamma cmdline option
reset gamma to default on OGL exit to make sure the desktop doesn't stay wrong
2004-12-02 11:18:15 +00:00
taylor 023d5ffab0 not used at the moment but that code was stupid 2004-12-02 11:14:29 +00:00
taylor a4760e9c70 little reorg to flags so Experimental won't show up twice
add/update the wiki links since none of them worked before
remove all options that require an argument since they won't work
2004-11-29 18:04:53 +00:00
taylor a58587d3a5 make sure we are checking the right bitmap_id 2004-11-29 18:02:01 +00:00
taylor 3b35a4f9c1 more EFF fixes - can't believe I forgot all this crap 2004-11-27 22:08:21 +00:00
taylor 6ddaabcead Linux tree merge 2004-11-27 10:51:01 +00:00
taylor d706747bd1 correct positions for default graphics with no table
compiler warning fix
2004-11-27 10:50:32 +00:00
taylor 503ea74554 make sure the old behavior still applies to everything that's not a beam 2004-11-27 10:49:14 +00:00
taylor 128a6d840f some fixes for position problems on the HUD in non-standard resolutions
few compiler warning fixes
2004-11-27 10:48:03 +00:00
taylor a0b4747c57 this should get movies working again in D3D and help OGL too 2004-11-27 10:42:18 +00:00
taylor e237b9d8ba couple of LAN game vs. FS2NetD fixes 2004-11-26 08:41:11 +00:00
taylor 0bd342af4a fix briefing related crash(es) (forgot I had this) 2004-11-24 20:12:25 +00:00
taylor 1c8018a5ab fix 2d warp in D3D, add cmdline option for 3d warp 2004-11-23 19:29:13 +00:00
taylor 5760eaf5fc try and protect the bitmap_entry stuff a bit better
fix the transparent support ship, again, but correctly this time
2004-11-23 00:10:06 +00:00
taylor ea4341a938 make sure species_defs.tbl can be found outside of root[0] and in VPs 2004-11-22 06:17:57 +00:00
Kazan a410c7f132 dumbbugfix 2004-11-21 16:07:22 +00:00
Kazan 83f954520c conflict res 2004-11-21 15:59:45 +00:00
taylor 29963bfe39 support for animated beam sections
various weapon-only-used fixes
remove the -1 frame fix since it was fixed elsewhere
2004-11-21 11:38:17 +00:00
taylor 163b45fdab some weapon-only-used loading fixes and general page-in cleanup
page in all ship textures from one function rather than two
2004-11-21 11:35:17 +00:00
taylor 73eda1ee69 page in all frames at once rather than separately (old code that wasn't updated) 2004-11-21 11:33:23 +00:00
taylor 2ea42c0928 newline fix (got tired of seeing this) 2004-11-21 11:31:46 +00:00
taylor af3afff65c move warning fixes from il_func.cpp to irc.cpp since that's where they are coming from 2004-11-21 11:31:02 +00:00
taylor 1651717c41 make hud_disabled_except_messages() do everything at once, add it to hud_show_radar() and hud_show_target_model() so those don't show up (bug #271) 2004-11-21 11:29:53 +00:00
taylor 71b718a3b9 some 64-bit OS comaptibility fixes 2004-11-21 11:27:31 +00:00
taylor c619e7b3b7 split bm_load_sub() into fast (memory only) and slow (disk only) versions
EFF bug fix for fps and much better error handling
2004-11-21 11:26:39 +00:00
Goober5000 6e5ee3312d #pragma'd a bunch of warnings
--Goober5000
2004-11-18 00:05:37 +00:00
Goober5000 14b29354bb added two new sexps
--Goober5000
2004-11-17 22:23:13 +00:00
taylor 9460f0c613 don't set gamma ramp while running FRED 2004-11-04 22:49:13 +00:00
taylor ff083e9600 note to self: copy is down pat, now just learn how to paste, moron 2004-11-04 08:33:44 +00:00
taylor 008a450cfd animate weapon glow/bitmaps properly while in flight, make sure
we don't exceed bitmap frame numbers, don't try to calculate
frame for particle spew animations since particle_render_all()
does that for us already
2004-11-02 08:32:38 +00:00
Goober5000 1e5edb91a7 tweaked some project settings
--Goober5000
2004-11-02 01:48:20 +00:00
taylor 863475d8d0 make use of Knossos_warp_ani_used flag - thanks Goober5000 2004-11-01 20:57:04 +00:00
taylor 5194bb5f80 new pilot code 2004-10-31 22:07:27 +00:00
taylor 2c6f07a416 compiler warning fixes, maybe fix issue that would cause cap ships to not fire beam weapons 2004-10-31 22:06:42 +00:00
taylor 664c3bf797 s/OGL_inited/OGL_enabled/g 2004-10-31 22:05:30 +00:00
taylor 031b923385 be sure to initialize splodeing_texture, fix issue that would cause loading problems for glows 2004-10-31 22:04:33 +00:00
taylor db75f373b3 little cleanup 2004-10-31 22:02:47 +00:00
taylor d2badfc49e new bmpman merge support, add PreProcDefines.h a few new places 2004-10-31 22:00:57 +00:00
taylor 200588c3b0 support external parsing sources without hurting currently parsing file (for EFF code) 2004-10-31 21:57:30 +00:00
taylor 5511c94080 new bmpman support, new OGL fixes don't need the freaky neb lighting fix anymore 2004-10-31 21:56:09 +00:00
taylor e4460b46f3 s/fisrt/first/g 2004-10-31 21:55:00 +00:00
taylor bd3855b315 new pilot code support, no-multiplayer and compiler warning fixes, center mouse cursor for redalert missions 2004-10-31 21:53:24 +00:00
taylor 00f6a2ee32 fix math error that was hitting Assert()'s and making OGL models flip around for no reason 2004-10-31 21:49:49 +00:00
taylor 4594df128c faster setting of 0 spec values (Kazan), comment out second (dumbfire?) lead indicator since it just looked wierd constantly being offset 2004-10-31 21:48:42 +00:00
taylor a3b330bdf5 bmpman merge 2004-10-31 21:46:38 +00:00
taylor 01a1403f67 Linux tree merge, better DDS support, texture panning 2004-10-31 21:46:10 +00:00
taylor a09c6beb5c Linux tree merge, single array for VBOs/HTL 2004-10-31 21:45:13 +00:00
taylor d589bcd911 Linux tree merge, use linear mag filter, small FRED fix, AA lines (disabled), use rgba colors for 3dunlit, proper gamma adjustment, bmpman merge 2004-10-31 21:42:31 +00:00
taylor 401dbfc523 move some otherwise bmpman stuff into grd3dbmpman.cpp 2004-10-31 21:40:11 +00:00
taylor 6cc7c6fcbd bmpman merge 2004-10-31 21:39:24 +00:00
taylor 7e37fee039 reinit device if lost - one of the D3D people should make sure this isn't stupid 2004-10-31 21:38:25 +00:00
taylor 0e2d84c60e s/fisrt/first/g, bmpman merge 2004-10-31 21:36:39 +00:00
taylor 647a03d53c OGL_enabled, s/fisrt/first/g 2004-10-31 21:35:53 +00:00
taylor 97e7b62860 rename __ASSERT check to _ASSERT to fix constant warning message - why did no one else fix this? 2004-10-31 21:34:39 +00:00
taylor da03d81df6 rename OGL_inited to OGL_enabled to match D3D version 2004-10-31 21:33:05 +00:00
taylor 194717b0c8 no networking with Inferno builds, basic 64-bit OS support 2004-10-31 21:32:27 +00:00
taylor ccf5d144b5 bump COUNT_ESTIMATE, reset time compression at the start of a mission, new pilot file support, add feature_disabled popup 2004-10-31 21:31:34 +00:00
taylor 87552b959c lots of cleanup with support for bmpman changes, full Linux/OSX support 2004-10-31 21:30:01 +00:00
taylor 1a384df3ce EFF animation support 2004-10-31 21:29:00 +00:00
taylor bf0a46d3f6 support new pilot code, Linux code tree merge, don't use same pilot directory for Inferno builds 2004-10-31 21:28:38 +00:00
taylor e0570a7677 bmpman merge, EFF animation support, better page in stuff, dozen or so smaller fixes and cleanup 2004-10-31 21:26:27 +00:00
taylor 738c92e036 change case of opengl files so I can stop worrying, add gropenglbmpman files 2004-10-31 21:24:11 +00:00
taylor 56e60218b3 #define if !#defined, add USE_DEVIL and FS2_SPEECH commented out 2004-10-31 21:23:08 +00:00
taylor 0dad90aa7f initial import from bmpman merge 2004-10-31 21:21:11 +00:00
Goober5000 9abdc3e9ae whoops
--Goober5000
2004-10-31 02:26:15 +00:00
Goober5000 35e62e4777 added Knossos_warp_ani_used flag for taylor
--Goober5000
2004-10-31 02:04:34 +00:00
taylor aa5d98a918 make sure all spec colors are set to 0 in hud_tri() 2004-10-18 17:13:36 +00:00
Goober5000 6e0f31092e fixed FRED bug that changed special arguments to (null)
--Goober5000
2004-10-18 09:27:47 +00:00
phreak 1c98f5954d Made WMCoolmon's hud target info brackets recognize alt-names
--phreak
2004-10-15 13:10:06 +00:00
Goober5000 19b5126542 added change-alt-name
--Goober5000
2004-10-15 10:03:09 +00:00
Goober5000 b5fa66428c cleaned up some sexp stuff and added wing capability to kamikaze sexp
--Goober5000
2004-10-15 09:21:55 +00:00
Goober5000 6a0d138a08 extra coding insurance
--Goober5000
2004-10-15 08:14:07 +00:00
Goober5000 14804a1396 tweakage
--Goober5000
2004-10-14 23:03:37 +00:00
Goober5000 38dbeab543 added ability for variable names to be used as special arguments
--Goober5000
2004-10-14 22:28:27 +00:00
Goober5000 41fdb82dd1 more ubersexp bugfixing
--Goober5000
2004-10-14 01:19:17 +00:00
Goober5000 91af9dbfc0 fixed a few when-argument bugs
--Goober5000
2004-10-13 10:46:49 +00:00
Goober5000 c3cc9f8e21 added toggle-subsystem-scanning ship flag
--Goober5000
2004-10-12 22:47:15 +00:00
Goober5000 1429123da4 added contrail speed threshold
--Goober5000
2004-10-12 07:34:45 +00:00
Goober5000 93973d4a49 added the no-bank ship flag (which works) and the affected-by-gravity flag
(which won't work until I implement gravity points)
--Goober5000
2004-10-11 22:29:25 +00:00
taylor df028f3714 make sure windowed mode gets the correct size 2004-10-10 22:15:10 +00:00
taylor 6937a4d1e2 warp mouse to center screen on mission start 2004-10-10 22:12:57 +00:00
taylor 19680f4ebd holy crap at the copy-paste error 2004-10-10 16:59:37 +00:00
taylor 8a450c6b4d almost forgot this for the IBX stuff 2004-10-09 18:08:33 +00:00
taylor dacc345814 one more try to fix the memory leak and end-of-mission crash for talking head anis 2004-10-09 17:58:48 +00:00
taylor 349459c502 better debugging for g3_end_frame() - mostly for FRED2 2004-10-09 17:54:32 +00:00
taylor fc9655bde3 safer handling of missing shield ani 2004-10-09 17:51:23 +00:00
taylor faac91b3be da simple IBX code, back to old line rendering for models since it should be faster for OGL now 2004-10-09 17:48:58 +00:00
taylor eaa75f0a3f da simple IBX code 2004-10-09 17:45:45 +00:00
taylor 6ca850fbe6 don't use DevIL to read the header, slightly more sane error checking 2004-10-09 17:44:10 +00:00
Kazan f035fff922 interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000) 2004-10-06 22:02:54 +00:00
Kazan 625220a856 Autopilot convergence collision fix for ai_fly_to_ship() and ai_waypoints() -- mathematically expensive, only usable by autopilot 2004-10-03 21:41:11 +00:00
Kazan 134aeb0085 fix autopilot formation bug 2004-09-28 22:51:41 +00:00
Kazan 7d51c61184 | is binary or, || is boolean or - please use the right one
autopilot velocity ramping biasing
made debugged+k kill guardianed ships
2004-09-28 19:54:32 +00:00
taylor ec523fdf0b fix logic error, may be support ship rearm fix 2004-09-26 20:58:29 +00:00
taylor 849e22dfff handle lost devices better, fix movie crash 2004-09-26 16:24:51 +00:00
taylor d334ab504a proper OGL line drawing in HTL... hopefully 2004-09-24 22:40:23 +00:00
Goober5000 09f3d78d1c some ubersexp fixes
--Goober5000
2004-09-24 02:13:00 +00:00
Goober5000 363313ee59 fixed two bugs... still more bugs to be found :p
--Goober5000
2004-09-23 23:52:58 +00:00
Goober5000 48371badfc ubersexp implementation complete
--Goober5000
2004-09-23 22:51:07 +00:00
Goober5000 cd3bb82030 a bunch of work on the actual implementation of when-argument
--Goober5000
2004-09-23 05:53:00 +00:00
Goober5000 2f0a9985de further work on ubersexp framework
--Goober5000
2004-09-22 21:52:22 +00:00
Goober5000 83887ad91b fixed some small problems in the framework - should be working nicely now;
next step is the actual sexp implementation :-P
--Goober5000
2004-09-22 08:32:05 +00:00
Goober5000 7c6bde8551 checking in framework for when-argument special ubersexp
--Goober5000
2004-09-22 06:56:45 +00:00
tbird d355d6be5c Modified the image loading to accept 24 and 32 bit images 2004-09-22 03:50:13 +00:00
Goober5000 35441575e7 a bit of reordering
--Goober5000
2004-09-17 08:07:52 +00:00
Goober5000 92424ee0e3 changed around the logic for the 3D warp effect
--Goober5000
2004-09-17 07:12:23 +00:00
Goober5000 bb4974a467 moved ssm stuff to header file so it would work in FRED
--Goober5000
2004-09-17 07:11:02 +00:00
Goober5000 d5cc98338e removed player-not-use-ai and changed player-use-ai to take an argument
--Goober5000
2004-09-17 00:28:32 +00:00
Goober5000 ea30714b53 changed toggle-hud to hud-disable; added hud-disable-except-messages
--Goober5000
2004-09-17 00:18:18 +00:00
et1 12ce22b1a4 Use yellow warp anim when doing exit jump with "-tbpwarpeffects" 2004-09-10 13:55:49 +00:00
et1 e2865c4576 Implemented "+WeaponMinRange" token. Fixed a crash issue with fighter launch checks 2004-09-10 13:54:21 +00:00
et1 14cbcbf2ac Command line option for TBP for warp stuff, "-tbpwarpeffects" 2004-09-10 13:51:45 +00:00
et1 c71f96710f Implemented "+WeaponMinRange" token 2004-09-10 13:50:09 +00:00
Goober5000 f787dd331d fix0red something weird
--Goober5000
2004-09-05 20:05:16 +00:00
Goober5000 33b42b554e whoops, fixed this for debug mode
--Goober5000
2004-09-05 19:41:31 +00:00
Goober5000 5ac6b0a787 we definitely want browse info... and Sticks wants a mapfile too
--Goober5000
2004-09-05 19:25:02 +00:00
Goober5000 11ae968eb6 fixed a few warnings
--Goober5000
2004-09-05 19:23:24 +00:00
Goober5000 48a882755e MultiUi.cpp should not be in the "Freespace2" project
--Goober5000
2004-09-05 18:42:31 +00:00
Goober5000 a179aa698b fixed a warning
--Goober5000
2004-09-02 04:02:44 +00:00
phreak a69435baa1 MISSION_FLAG_USE_NEW_AI fixes for bomber+ missile selection, rapid dumbfire
firing and primary weapons selection
2004-09-01 01:26:20 +00:00
phreak 2f4ff28011 created the mission flag MISSION_FLAG_USE_NEW_AI
this lets old missions use the retail AI so they are balanced.  new missions would
be able to select this in fred so designers can take advantage of it.
2004-09-01 00:58:46 +00:00
Goober5000 6cef921092 fixed a small bug in the custom hitpoints mod
--Goober5000
2004-09-01 00:22:36 +00:00
Goober5000 4c53554eae when calculating damage for scoring, don't count beams unless they're fired by a fighter or bomber
--Goober5000
2004-08-31 23:36:28 +00:00
Kazan ec7681b75d small standalone-related multibug fix
prohibited execution of process_debug_keys(int) while Game_mode & GM_MULTIPLAYER
2004-08-26 18:19:36 +00:00
Goober5000 0d46b06833 fix0red some warnings
--Goober5000
2004-08-23 07:48:09 +00:00
Goober5000 6316b4a4e4 warp effect is back to FS2 default
--Goober5000
2004-08-23 04:32:40 +00:00
Goober5000 85d7186bf6 ship-tag and ship-untag sexps
--Goober5000
2004-08-23 04:32:06 +00:00
Goober5000 b5ae16e463 ship-tag and ship-untag
--Goober5000
2004-08-23 04:00:15 +00:00
Goober5000 acbb64b9b4 modularized tag stuff in preparation for sexp
--Goober5000
2004-08-23 03:34:34 +00:00
Kazan 63af0632df wakka wakka - fix minor booboo 2004-08-20 05:13:08 +00:00
Kazan 60d31003cf added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this 2004-08-11 05:06:36 +00:00
phreak cb22efe237 fixed the -orbradar launcher string 2004-08-08 02:56:54 +00:00
phreak 3a7f5f7320 added radarorb.cpp and radarorb.h to project 2004-08-05 02:18:17 +00:00
phreak bf2870d53b forgot to commit orb change 2004-08-05 02:15:27 +00:00
phreak 5024413d68 orb radar rendering style 2004-08-02 22:54:07 +00:00
phreak e418257394 orb radar rendering style 2004-08-02 22:43:03 +00:00
phreak 4640a5eea4 added -orbradar to enable orb rendering for the radar 2004-08-02 22:40:59 +00:00
phreak c55568852b -phreak command line changed to -dualscanlines 2004-08-01 02:31:18 +00:00
et1 21448785ec Implemented "+SwarmWait:"-token and fixed weapon glow tails 2004-07-31 08:58:07 +00:00
et1 4acd808412 Implemented "+SwarmWait:"-token 2004-07-31 08:57:22 +00:00
et1 806e9eefd1 Fixed inaccuracy problems with non-homing swarmers 2004-07-31 08:54:38 +00:00
et1 4634470897 Make missing briefing icon message to tell the icon missing 2004-07-31 08:53:46 +00:00
et1 670d6a9078 If weapon loadout anim is missing, warn instead of int3 2004-07-31 08:52:45 +00:00
et1 1bf056b5ca Disabled ship shield load check for TBP 2004-07-31 08:51:47 +00:00
Kazan 3aae4e73f2 bugfixes 2004-07-29 23:41:22 +00:00
Kazan bd64ca2cb9 unbug the JS bug i caused --- kazan 2004-07-29 19:37:50 +00:00
taylor 1c6ef1c02c fix NULL pointer and try to prevent in future, remove excess commands in opengl_cleanup() 2004-07-29 09:35:29 +00:00
Kazan 1119146fcd fs2_open.exe was suffering the same problem as fred2 -- it was just a little less obvious 2004-07-29 03:49:44 +00:00
taylor 45d5f46063 plug memory leaks 2004-07-29 03:41:46 +00:00
Kazan a5407aff0a making another bug a little bit more dead inside :D 2004-07-27 20:09:12 +00:00
Kazan be1fba0b34 squished another 2004-07-27 18:52:11 +00:00
Kazan d1186a73ab i love it when bugs go crunch (autopilot ai fixup) 2004-07-27 18:04:09 +00:00
Goober5000 cb8f3dd3e2 outline of ship-tag and ship-untag sexps
--Goober5000
2004-07-26 21:26:45 +00:00
Goober5000 33144fdad4 updated launcher link
--Goober5000
2004-07-26 21:19:05 +00:00
Kazan 89e6af4fb5 remove MCD complete 2004-07-26 20:47:56 +00:00
Kazan a1c0d95647 remove MCD 2004-07-26 20:19:04 +00:00
Kazan a4dbb0ee88 add conditional compilation directive 2004-07-26 19:39:49 +00:00
Kazan a4e1bcfd2d Autopilot system completed -- i am dropping plans for GUI nav map
All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
Fixed FPS counter during time compression
2004-07-26 17:54:05 +00:00
Goober5000 3ad5ea54fb last bit of Unix fixorage
--Goober5000
2004-07-26 17:50:02 +00:00
Goober5000 2b9cdc2689 more #ifndef fixorage
--Goober5000
2004-07-26 17:39:20 +00:00
Goober5000 5a9eee5a12 fixored a problem when using the command-line compiler to compile everything under Windows
--Goober5000
2004-07-26 16:11:41 +00:00
Kazan ff8edc4adc only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged 2004-07-25 19:27:51 +00:00
Kazan d83dbd88c4 -fred_no_warn has become -no_warn and applies to both fred and fs2
added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
2004-07-25 18:46:30 +00:00
Kazan 7af6e41fa1 i have absolutely nothing to say about that subject 2004-07-25 00:31:31 +00:00
taylor b3c084db06 fix problem with sectioned menu bitmaps in OGL 2004-07-21 00:03:46 +00:00
wmcoolmon 37cdc6a4fe Fixed ifdef, was missing ship_decal_system otherwise 2004-07-20 04:03:21 +00:00
Kazan e9a29ac2e6 nothing major 2004-07-18 04:07:26 +00:00
taylor f7ffb89690 stupid braces... 2004-07-17 19:01:15 +00:00
taylor 77fcc86c14 fix set_*_matrix overcompensation, makes OGL work again 2004-07-17 18:59:01 +00:00
taylor f0dddf2854 oops, I can't spell 2004-07-17 18:49:57 +00:00
taylor d23c3a6e4d various OGL and memory leak fixes 2004-07-17 18:46:09 +00:00
taylor 26726238b5 don't use bitmap sections by default, openil_close() 2004-07-17 18:43:46 +00:00
taylor 51d8809a22 Bob say we fix OGL, so me fix OGL <grunt> 2004-07-17 18:40:40 +00:00
taylor 92e696a6ea force image orientation in DevIL 2004-07-17 18:38:04 +00:00
taylor cae2b33d34 make old warpmap and new glow bitmap 3D unlit to render right in OGL 2004-07-17 09:29:13 +00:00
taylor e1ab4e4532 add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again 2004-07-17 09:26:00 +00:00
taylor 21fe0590ed make sure avi and mpg movies get added to file cache 2004-07-17 09:03:29 +00:00
taylor 0d76068eb8 add .deps directory to ignored entries 2004-07-17 09:00:38 +00:00
taylor f6faea6f81 misspelled filename 2004-07-17 08:59:25 +00:00
wmcoolmon 72c34be6f9 I though I fixed this... 2004-07-15 00:16:46 +00:00
wmcoolmon 65da0763f7 Better -load_only_used handling; added mark_weapon_used(weapon ID), which does check for IDs of -1. 2004-07-14 01:27:01 +00:00
wmcoolmon baed9715df Better -load_only_used handling 2004-07-14 01:26:10 +00:00
Kazan 8d2fa0418a adding mcd 2004-07-12 16:37:01 +00:00
Kazan f7dd512ba8 MCD - define _MCD_CHECK to use memory tracking 2004-07-12 16:33:09 +00:00
Kazan 9c9006f55e fix a small multibug in tables validation (I had added this once before.. where did it go) 2004-07-12 14:38:13 +00:00
wmcoolmon 177698e014 More in-game stuff, mostly for restricted games 2004-07-12 03:34:55 +00:00
wmcoolmon 70834437dd Only send ships on the player's team 2004-07-12 03:26:03 +00:00
Kazan a501d4b688 removed a couple pointless useless messages from the debug console 2004-07-12 03:19:17 +00:00
wmcoolmon cb0360016d ... 2004-07-12 03:04:33 +00:00
wmcoolmon 55f179db5c Oops. :p 2004-07-12 03:04:03 +00:00
wmcoolmon e8c844b32a Ingame joining stuff - use -rt to enabled/disable 2004-07-12 02:50:48 +00:00
bobboau b8fb999660 added the working decal code 2004-07-11 03:22:54 +00:00
wmcoolmon 93964edfed Fixed bug with the base ship flag I unwittingly introduced. 2004-07-10 08:03:13 +00:00
Kazan 3a89eeffc9 minor bugfixes - oh yeah reenabling a rule for multistats :P 2004-07-10 03:18:23 +00:00
Kazan 72ac50ca24 fs2netd 1.0 RC5 full support - Rank and Medal updates 2004-07-09 22:05:32 +00:00
wmcoolmon 6f8e5b4447 Fixed conditional. 2004-07-09 07:32:55 +00:00
wmcoolmon 64efe3e91c Fixed HUD escort list for dogfight mode, and for any usage. 2004-07-09 05:53:05 +00:00
wmcoolmon eda444a92b Re-implemented nomotiondebris, as Bobb overwrote it when he commited his changes. 2004-07-09 05:52:19 +00:00
wmcoolmon 7999173fc7 Moved set_current_hud, as well as added a conditional to hud_positions_it; it shouldn't and won't be executed on a standalone server. 2004-07-08 22:08:21 +00:00
wmcoolmon a4c2329316 Moving set_current_hud, to ensure compatibility with multiplayer. 2004-07-08 22:06:56 +00:00
Kazan e2b8ce4d5d fixed a typo in one of the fs2netd strings
played with WMCoolmon's hacked up escort list
2004-07-07 23:34:08 +00:00
Kazan 13ee198069 FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages 2004-07-07 21:00:08 +00:00
Kazan 84e74a8abf minor multi fix 2004-07-06 23:45:34 +00:00
Kazan a1903268ad small multifix 2004-07-06 19:59:37 +00:00
bobboau f36d1802df FVF code, only the data that is needed is sent off to the card,,
OGL can take advantage of this if they want but it won't break
anything if they don't. also state block code has been implemented,
that's totaly internal to D3D no high level code is involved.
2004-07-05 05:09:21 +00:00
wmcoolmon a8beea705e Replaced some more Int3s with Warnings and Errors. 2004-07-03 08:23:00 +00:00
wmcoolmon 0e60209a24 Error handling for fire_beam instead of just calling Int3() 2004-07-03 07:55:22 +00:00
wmcoolmon 5187223a76 Removed function pointer w/ default arguments for compatibility with .NET Sorry, you'll just have to add that "0" by hand. :p 2004-07-03 06:08:54 +00:00
Kazan d99263ed75 working on autonav 2004-07-01 16:38:19 +00:00
phreak eb489320e1 function pointer radar update.
will enable us to make different radar styles that we can switch between
2004-07-01 02:07:54 +00:00
phreak 1b906e0369 function pointer radar update.
will enable us to make different radar styles that we can switch between
2004-07-01 01:54:59 +00:00
bobboau 5019375c1f implemented index buffered background bitmaps,
OGL people you realy should get this implemented
2004-07-01 01:12:33 +00:00
wmcoolmon 3f1f149312 Support as well as the extern for "-load_only_used"; this way everything that includes cmdline.h doesn't have to be recompiled. 2004-06-29 06:02:34 +00:00
wmcoolmon 698f4e0e16 Added "-load_only_used", which makes FS2 load only used weapon data 2004-06-29 06:00:45 +00:00
wmcoolmon c089510571 Fixed weapon miniinfo display 2004-06-28 10:00:33 +00:00
bobboau e2bb83fbdb high level index buffer suport and d3d implementation,
OGL people need to get this working on your end as it's broke now
2004-06-28 02:13:08 +00:00
wmcoolmon 16b030459f Bad return 2004-06-27 01:48:17 +00:00
wmcoolmon 2fbdb960f6 Unneccessary warning removed, small change for VC6. 2004-06-27 01:47:16 +00:00
wmcoolmon e80f8b391d Commented out ogg header 2004-06-27 01:45:23 +00:00
wmcoolmon 231f9a0246 Minor optimizations and removal of an errant !stricmp 2004-06-26 19:24:24 +00:00
wmcoolmon eb26a123cf Minor optimizations 2004-06-26 19:23:54 +00:00
wmcoolmon 2b8c618b27 Displayed escorts now settable up to MAX_COMPLETE_ESCORT_LIST via "$Max Escort Ships:" in hud_gauges.tbl
Escort list is now hud_gauges.tbl compatible.
2004-06-26 03:19:53 +00:00
wmcoolmon 7d0c23b02b Added "-targetinfo" to toggle info next to targeted object. 2004-06-26 00:28:05 +00:00
wmcoolmon 1fc27844ce Basic target info next to targeted object. 2004-06-26 00:27:20 +00:00
wmcoolmon d6d0be0a3c Added teh FS2 ogg support files. Not in the project so you still don't need the SDK. 2004-06-22 23:15:17 +00:00
wmcoolmon 94b5611023 Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
OGG code has been commented out, so you don't need the SDK yet.
2004-06-22 23:14:10 +00:00
wmcoolmon 5142d17030 Added support for -nomotiondebris 2004-06-19 22:16:20 +00:00
wmcoolmon 6bcd42f543 Added -nomotion debris command line option; also re-ordered categories. 2004-06-19 22:15:48 +00:00
randomtiger d00f29b663 Changed startup code to catch D3D9 request from launcher.
No actual startup code has been implemented.
2004-06-19 12:45:47 +00:00
wmcoolmon 633d2c58e2 Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values 2004-06-18 04:59:55 +00:00
wmcoolmon 55d46b3801 Bumped MAX_MISSION_MESSAGES to 500 2004-06-15 21:05:30 +00:00
wmcoolmon d329ae66ae Bumped MAX_SEXP_NODES to 3500 2004-06-15 21:04:18 +00:00
wmcoolmon 54d0d3bd2c Added hud-set-color and get-current-speed 2004-06-15 20:49:22 +00:00
wmcoolmon 9a50e83dce hud-set-color SEXP 2004-06-09 00:18:50 +00:00
wmcoolmon a98bc2643a Fix0red the current target's hud info appearing in the corner of the screen. 2004-06-08 01:12:58 +00:00
wmcoolmon 3bf411f705 Added +Color: option for custom gauges. 2004-06-08 00:35:43 +00:00
wmcoolmon 2d0dc11c64 Warpout failure bug fixingness 2004-06-07 07:36:08 +00:00
randomtiger 30c3556abc Commented out mprintf, it was swamping debug console.
Uncommented some code which I hope has plugged the memory leak.
2004-06-06 20:04:28 +00:00
randomtiger 6a3569280a Added new compression option -pcx32dds, build posted in RSB forum.
Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
2004-06-06 12:25:20 +00:00
randomtiger 76215199f1 Added pcx compression option -pcx32dds, build posted in RSB forum.
Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
2004-06-06 11:16:42 +00:00
wmcoolmon 3d8b7de265 More HUD update stuff. Coordinates are now floats, addparent is now obsolete. 2004-06-05 23:31:12 +00:00
phreak 4bc768fc32 spawn weapons can now be specified to be spawned at different angles other than
the sphere thats used in retail
2004-06-05 19:15:39 +00:00
phreak e34938c8dc added static_random_cone which is used for spawn angle features in multi 2004-06-05 19:14:42 +00:00
wmcoolmon 254efe0d53 Lotsa stuff. Custom gauges w/ ANIs support added, SEXPs to set gauge text, gauge image frames, and gauge coords. These SEXPs and toggle-hud reside in the Hud/change category. 2004-06-01 07:31:57 +00:00
wmcoolmon cdfd1299f0 Update to make images (not animations) work 2004-05-31 08:54:13 +00:00
wmcoolmon c005dc7dad Custom HUD support, better loading, etc etc. 2004-05-31 08:32:25 +00:00
wmcoolmon 9193af0210 Final draft of the HUD parsing system structure. May change how individual coord positions are specified in the TBL. -C 2004-05-30 08:04:49 +00:00
wmcoolmon 12eef3702d First bugfix in this!: Don't want Freespace exiting if it can't load a hud_gauge file. 2004-05-29 04:09:04 +00:00
wmcoolmon 480175df7d Added HUD gauges placement table, "hud_gauges.tbl" or "*-hdg.tbm" table module 2004-05-29 03:02:53 +00:00
wmcoolmon 8ae9aaebf8 Spotted something that might be a problem. 2004-05-29 03:01:00 +00:00
wmcoolmon e7ac8a5d12 Added stuff_float_list 2004-05-29 02:52:17 +00:00
wmcoolmon 6710e15c5c Modular music tables 2004-05-28 23:37:30 +00:00
wmcoolmon f5c586edaf Made HUD.tbl obsolete. Info is now taken directly from $Shield_icon in ships.tbl
Now this table can be used for something more useful...say, hud gauge positions?
2004-05-27 00:49:26 +00:00
wmcoolmon 16163aad45 Fixed cf_matches_spec; small bug was introduced. 2004-05-26 22:02:36 +00:00
wmcoolmon 1cb372a8e7 Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages 2004-05-26 21:02:27 +00:00
wmcoolmon e22820c475 Ship & weapon modular table files 2004-05-26 03:52:08 +00:00
wmcoolmon 9469dee1b8 Modular ship table support. Uses *-shp.tbm , with the same structure as a normal ships.tbl. Individual sections are optional and entries with the same name will override previous settings. -C 2004-05-26 02:31:39 +00:00
wmcoolmon 71aecd3927 Scratch that - .tbm is a better extension 2004-05-26 02:29:44 +00:00
wmcoolmon a8f2fb5c24 Added table chunk extension 2004-05-26 02:26:14 +00:00
wmcoolmon 5a4a0f9710 Updated function calls for VC7 use 2004-05-25 00:38:11 +00:00
wmcoolmon f5bbbff05b cleared up an ambiguous call for VC7 2004-05-25 00:26:25 +00:00
wmcoolmon fc0251d305 Updated to use <fstream> instead of <fstream.h> and fixed an un/signed disagreement 2004-05-25 00:24:00 +00:00
wmcoolmon 7129774def Updated to use <iostream> instead of <iostream.h> 2004-05-25 00:21:39 +00:00
taylor fc71fe2c0e filename case change 2004-05-24 07:25:32 +00:00
taylor de55362fe1 filename case change 2004-05-24 07:14:13 +00:00
taylor 4df953f3bd The Great Linux Merge 2004-05-24 07:04:25 +00:00
taylor a867b1979c add .cvsingore files 2004-05-24 04:12:07 +00:00
taylor 8acb0872ac autoconf/automake cleanup 2004-05-24 04:10:47 +00:00
542 changed files with 29983 additions and 23645 deletions

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
Makefile
Makefile.in
configure
FS2_Open.prj.bak
FS2_Open.pws
.tm_project.cache
config.guess
config.cache
config.log
config.status
config.sub
depcomp
install-sh
missing
mkinstalldirs
autom4te*
aclocal.m4
Freespace2.ncb
Freespace2.opt
Freespace2.plg
Release
Debug
+650
View File
@@ -0,0 +1,650 @@
# Anjuta Version 1.2.2
Compatibility Level: 1
<PROJECT_DESCRIPTION_START>
FS2 Open: SCP<PROJECT_DESCRIPTION_END>
<CONFIG_PROGS_START>
<CONFIG_PROGS_END>
<CONFIG_LIBS_START>
<CONFIG_LIBS_END>
<CONFIG_HEADERS_START>
<CONFIG_HEADERS_END>
<CONFIG_CHARACTERISTICS_START>
<CONFIG_CHARACTERISTICS_END>
<CONFIG_LIB_FUNCS_START>
<CONFIG_LIB_FUNCS_END>
<CONFIG_ADDITIONAL_START>
<CONFIG_ADDITIONAL_END>
<CONFIG_FILES_START>
<CONFIG_FILES_END>
<MAKEFILE_AM_START>
<MAKEFILE_AM_END>
props.file.type=project
anjuta.version=1.2.2
anjuta.compatibility.level=1
project.name=FS2_Open
project.type=GENERIC
project.target.type=EXECUTABLE
project.version=3.6
project.author=Taylor Richards
project.source.target=fs2_open
project.has.gettext=0
project.gui.command=
project.programming.language=C++
project.excluded.modules=intl
project.config.extra.modules.before=
project.config.extra.modules.after=
project.config.blocked=1
project.config.disable.overwriting=1 1 1 1 1 1 1 1 1
project.menu.entry=FS2_Open Version 3.6
project.menu.group=Application
project.menu.comment=FS2_Open Version 3.6
project.menu.icon=
project.menu.need.terminal=0
project.configure.options=
anjuta.program.arguments=
preferences.build.option.jobs=0
preferences.build.option.silent=0
preferences.build.option.autosave=0
preferences.anjuta.make.options=-k
preferences.make=make
preferences.build.option.keep.going=1
preferences.build.option.warn.undef=0
preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss
preferences.indent.opening=0
preferences.autoformat.disable=0
preferences.indent.automatic=1
preferences.use.tabs=1
preferences.indent.size=4
preferences.tabsize=4
preferences.indent.closing=0
module.include.name=.
module.include.type=
module.include.files=\
code/anim/animplay.h\
code/anim/packunpack.h\
code/demo/demo.h\
code/asteroid/asteroid.h\
code/bmpman/bmpman.h\
code/cfile/cfile.h\
code/cfile/cfilearchive.h\
code/cfile/cfilesystem.h\
code/cmdline/cmdline.h\
code/cmeasure/cmeasure.h\
code/controlconfig/controlsconfig.h\
code/cutscene/cutscenes.h\
code/cutscene/movie.h\
code/ddsutils/ddsutils.h\
code/debris/debris.h\
code/debugconsole/dbugfile.h\
code/debugconsole/timerbar.h\
code/decals/decals.h\
code/directx/dx8show.h\
code/directx/vasync.h\
code/directx/vd3dtypes.h\
code/directx/vddraw.h\
code/directx/vdinput.h\
code/directx/vdplay.h\
code/directx/vdplobby.h\
code/directx/vdsetup.h\
code/directx/vdsound.h\
code/directx/vdvp.h\
code/exceptionhandler/exceptionhandler.h\
code/fireball/fireballs.h\
code/freespace2/freespace.h\
code/freespace2/freespaceresource.h\
code/freespace2/levelpaging.h\
code/gamehelp/contexthelp.h\
code/gamehelp/gameplayhelp.h\
code/gamesequence/gamesequence.h\
code/gamesnd/eventmusic.h\
code/gamesnd/gamesnd.h\
code/globalincs/alphacolors.h\
code/globalincs/crypt.h\
code/globalincs/linklist.h\
code/globalincs/pstypes.h\
code/globalincs/systemvars.h\
code/globalincs/version.h\
code/graphics/2d.h\
code/graphics/font.h\
code/graphics/grd3d.h\
code/graphics/grd3dbmpman.h\
code/graphics/grd3dinternal.h\
code/graphics/grinternal.h\
code/graphics/gropengl.h\
code/graphics/grzbuffer.h\
code/graphics/line.h\
code/graphics/tmapper.h\
code/graphics/gl/wglext.h\
code/graphics/gl/GLAUX.H\
code/graphics/gl/GLU.H\
code/graphics/gl/Gl.h\
code/graphics/gl/Glext.h\
code/graphics/grd3dsetup.h\
code/graphics/grd3dlight.h\
code/graphics/grd3dbatch.h\
code/graphics/GrD3DParticle.h\
code/hud/hudconfig.h\
code/hud/hud.h\
code/hud/hudartillery.h\
code/hud/hudbrackets.h\
code/hud/hudescort.h\
code/hud/hudets.h\
code/hud/hudgauges.h\
code/hud/hudlock.h\
code/hud/hudmessage.h\
code/hud/hudobserver.h\
code/hud/hudresource.h\
code/hud/hudreticle.h\
code/hud/hudshield.h\
code/hud/hudsquadmsg.h\
code/hud/hudtarget.h\
code/hud/hudtargetbox.h\
code/hud/hudwingmanstatus.h\
code/inetfile/cftp.h\
code/inetfile/chttpget.h\
code/inetfile/inetgetfile.h\
code/io/joy.h\
code/io/joy_ff.h\
code/io/key.h\
code/io/keycontrol.h\
code/io/mouse.h\
code/io/sw_error.hpp\
code/io/sw_force.h\
code/io/sw_guid.hpp\
code/io/timer.h\
code/jumpnode/jumpnode.h\
code/lighting/lighting.h\
code/localization/fhash.h\
code/localization/localize.h\
code/math/fix.h\
code/math/floating.h\
code/math/fvi.h\
code/math/spline.h\
code/math/staticrand.h\
code/math/vecmat.h\
code/menuui/barracks.h\
code/menuui/credits.h\
code/menuui/fishtank.h\
code/menuui/mainhallmenu.h\
code/menuui/mainhalltemp.h\
code/menuui/optionsmenu.h\
code/menuui/optionsmenumulti.h\
code/menuui/playermenu.h\
code/menuui/readyroom.h\
code/menuui/snazzyui.h\
code/menuui/techmenu.h\
code/menuui/trainingmenu.h\
code/mission/missionbriefcommon.h\
code/mission/missioncampaign.h\
code/mission/missiongoals.h\
code/mission/missiongrid.h\
code/mission/missionhotkey.h\
code/mission/missionload.h\
code/mission/missionlog.h\
code/mission/missionmessage.h\
code/mission/missionparse.h\
code/mission/missiontraining.h\
code/missionui/chatbox.h\
code/missionui/missionbrief.h\
code/missionui/missioncmdbrief.h\
code/missionui/missiondebrief.h\
code/missionui/missionloopbrief.h\
code/missionui/missionpause.h\
code/missionui/missionrecommend.h\
code/missionui/missionscreencommon.h\
code/missionui/missionshipchoice.h\
code/missionui/missionstats.h\
code/missionui/missionweaponchoice.h\
code/missionui/redalert.h\
code/mm/mmreg.h\
code/mm/msacm.h\
code/model/modelsinc.h\
code/model/model.h\
code/nebula/neb.h\
code/nebula/neblightning.h\
code/network/fs2ox.h\
code/network/multi.h\
code/network/multi_campaign.h\
code/network/multi_data.h\
code/network/multi_dogfight.h\
code/network/multi_endgame.h\
code/network/multi_ingame.h\
code/network/multi_kick.h\
code/network/multi_log.h\
code/network/multi_obj.h\
code/network/multi_observer.h\
code/network/multi_oo.h\
code/network/multi_options.h\
code/network/multi_pause.h\
code/network/multi_pinfo.h\
code/network/multi_ping.h\
code/network/multi_pmsg.h\
code/network/multi_rate.h\
code/network/multi_respawn.h\
code/network/multi_team.h\
code/network/multi_update.h\
code/network/multi_voice.h\
code/network/multi_xfer.h\
code/network/multilag.h\
code/network/multimsgs.h\
code/network/multiteamselect.h\
code/network/multiui.h\
code/network/multiutil.h\
code/network/psnet.h\
code/network/psnet2.h\
code/network/stand_gui.h\
code/object/objcollide.h\
code/object/object.h\
code/object/objectsnd.h\
code/observer/observer.h\
code/osapi/monopub.h\
code/osapi/osapi.h\
code/osapi/osregistry.h\
code/osapi/outwnd.h\
code/palman/palman.h\
code/parse/encrypt.h\
code/parse/parselo.h\
code/parse/sexp.h\
code/particle/particle.h\
code/pcxutils/pcxutils.h\
code/physics/physics.h\
code/playerman/managepilot.h\
code/playerman/player.h\
code/popup/popup.h\
code/popup/popupdead.h\
code/radar/radar.h\
code/render/3d.h\
code/render/3dinternal.h\
code/scramble/scramble.h\
code/ship/afterburner.h\
code/ship/ai.h\
code/ship/aibig.h\
code/ship/aigoals.h\
code/ship/ailocal.h\
code/ship/awacs.h\
code/ship/ship.h\
code/ship/shipcontrails.h\
code/ship/shipfx.h\
code/ship/shiphit.h\
code/ship/subsysdamage.h\
code/sound/acm.h\
code/sound/audiostr.h\
code/sound/channel.h\
code/sound/ds.h\
code/sound/ds3d.h\
code/sound/dscap.h\
code/sound/fsspeech.h\
code/sound/midifile.h\
code/sound/midiseq.h\
code/sound/rbaudio.h\
code/sound/rtvoice.h\
code/sound/sound.h\
code/sound/speech.h\
code/sound/winmidi.h\
code/starfield/nebula.h\
code/starfield/starfield.h\
code/starfield/supernova.h\
code/stats/medals.h\
code/stats/scoring.h\
code/stats/stats.h\
code/tgautils/tgautils.h\
code/ui/ui.h\
code/ui/uidefs.h\
code/vcodec/codec1.h\
code/weapon/beam.h\
code/weapon/corkscrew.h\
code/weapon/emp.h\
code/weapon/flak.h\
code/weapon/muzzleflash.h\
code/weapon/shockwave.h\
code/weapon/swarm.h\
code/weapon/trails.h\
code/weapon/weapon.h\
code/windows_stub/config.h\
code/species_defs/species_defs.h\
code/fs2open_pxo/Client.h\
code/fs2open_pxo/TCP_Socket.h\
code/fs2open_pxo/protocol.h\
code/fs2open_pxo/udpsocket.h\
code/openil/il_func.h\
code/globalincs/globals.h\
code/jpgutils/jpgutils.h\
code/graphics/grstub.h\
code/irc/irc.h\
code/graphics/grbatch.h\
code/graphics/gropengltnl.h\
code/graphics/gropengllight.h\
code/graphics/gropenglextension.h\
code/graphics/gropengltexture.h\
code/autopilot/autopilot.h\
code/hud/hudnavigation.h
module.source.name=.
module.source.type=
module.source.files=\
code/anim/animplay.cpp\
code/anim/packunpack.cpp\
code/demo/demo.cpp\
code/asteroid/asteroid.cpp\
code/bmpman/bmpman.cpp\
code/cfile/cfile.cpp\
code/cfile/cfilearchive.cpp\
code/cfile/cfilelist.cpp\
code/cfile/cfilesystem.cpp\
code/cfilearchiver/cfilearchiver.cpp\
code/cmdline/cmdline.cpp\
code/cmeasure/cmeasure.cpp\
code/controlconfig/controlsconfig.cpp\
code/controlconfig/controlsconfigcommon.cpp\
code/cryptstring/cryptstring.cpp\
code/cutscene/cutscenes.cpp\
code/cutscene/movie.cpp\
code/ddsutils/ddsutils.cpp\
code/debris/debris.cpp\
code/debugconsole/console.cpp\
code/debugconsole/dbugfile.cpp\
code/debugconsole/timerbar.cpp\
code/decals/decals.cpp\
code/directx/dx8show.cpp\
code/exceptionhandler/exceptionhandler.cpp\
code/fireball/fireballs.cpp\
code/fireball/warpineffect.cpp\
code/freespace2/freespace.cpp\
code/freespace2/levelpaging.cpp\
code/gamehelp/contexthelp.cpp\
code/gamehelp/gameplayhelp.cpp\
code/gamesequence/gamesequence.cpp\
code/gamesnd/eventmusic.cpp\
code/gamesnd/gamesnd.cpp\
code/globalincs/alphacolors.cpp\
code/globalincs/crypt.cpp\
code/globalincs/systemvars.cpp\
code/globalincs/version.cpp\
code/globalincs/windebug.cpp\
code/graphics/2d.cpp\
code/graphics/font.cpp\
code/graphics/grd3d.cpp\
code/graphics/grd3dbmpman.cpp\
code/graphics/grd3dcalls.cpp\
code/graphics/grd3drender.cpp\
code/graphics/grd3dtexture.cpp\
code/graphics/gropengl.cpp\
code/graphics/grzbuffer.cpp\
code/graphics/grd3dsetup.cpp\
code/graphics/grd3dlight.cpp\
code/graphics/grd3dbatch.cpp\
code/graphics/GrD3DParticle.cpp\
code/hud/hud.cpp\
code/hud/hudartillery.cpp\
code/hud/hudbrackets.cpp\
code/hud/hudconfig.cpp\
code/hud/hudescort.cpp\
code/hud/hudets.cpp\
code/hud/hudlock.cpp\
code/hud/hudmessage.cpp\
code/hud/hudobserver.cpp\
code/hud/hudresource.cpp\
code/hud/hudreticle.cpp\
code/hud/hudshield.cpp\
code/hud/hudsquadmsg.cpp\
code/hud/hudtarget.cpp\
code/hud/hudtargetbox.cpp\
code/hud/hudwingmanstatus.cpp\
code/inetfile/cftp.cpp\
code/inetfile/chttpget.cpp\
code/inetfile/inetgetfile.cpp\
code/io/joy_ff.cpp\
code/io/joy.cpp\
code/io/joy-unix.cpp\
code/io/key.cpp\
code/io/keycontrol.cpp\
code/io/mouse.cpp\
code/io/swff_lib.cpp\
code/io/timer.cpp\
code/io/xmouse.cpp\
code/jumpnode/jumpnode.cpp\
code/lighting/lighting.cpp\
code/localization/fhash.cpp\
code/localization/localize.cpp\
code/math/floating.cpp\
code/math/fix.cpp\
code/math/fvi.cpp\
code/math/spline.cpp\
code/math/staticrand.cpp\
code/math/vecmat.cpp\
code/menuui/barracks.cpp\
code/menuui/credits.cpp\
code/menuui/fishtank.cpp\
code/menuui/mainhallmenu.cpp\
code/menuui/mainhalltemp.cpp\
code/menuui/optionsmenu.cpp\
code/menuui/optionsmenumulti.cpp\
code/menuui/playermenu.cpp\
code/menuui/readyroom.cpp\
code/menuui/snazzyui.cpp\
code/menuui/techmenu.cpp\
code/menuui/trainingmenu.cpp\
code/mission/missionbriefcommon.cpp\
code/mission/missioncampaign.cpp\
code/mission/missiongoals.cpp\
code/mission/missiongrid.cpp\
code/mission/missionhotkey.cpp\
code/mission/missionload.cpp\
code/mission/missionlog.cpp\
code/mission/missionmessage.cpp\
code/mission/missionparse.cpp\
code/mission/missiontraining.cpp\
code/missionui/chatbox.cpp\
code/missionui/missionbrief.cpp\
code/missionui/missioncmdbrief.cpp\
code/missionui/missiondebrief.cpp\
code/missionui/missionloopbrief.cpp\
code/missionui/missionpause.cpp\
code/missionui/missionrecommend.cpp\
code/missionui/missionscreencommon.cpp\
code/missionui/missionshipchoice.cpp\
code/missionui/missionstats.cpp\
code/missionui/missionweaponchoice.cpp\
code/missionui/redalert.cpp\
code/model/modelcollide.cpp\
code/model/modelinterp.cpp\
code/model/modeloctant.cpp\
code/model/modelread.cpp\
code/nebula/neb.cpp\
code/nebula/neblightning.cpp\
code/network/fs2ox.cpp\
code/network/multi.cpp\
code/network/multi_campaign.cpp\
code/network/multi_data.cpp\
code/network/multi_dogfight.cpp\
code/network/multi_endgame.cpp\
code/network/multi_ingame.cpp\
code/network/multi_kick.cpp\
code/network/multi_log.cpp\
code/network/multi_obj.cpp\
code/network/multi_observer.cpp\
code/network/multi_oo.cpp\
code/network/multi_options.cpp\
code/network/multi_pause.cpp\
code/network/multi_pinfo.cpp\
code/network/multi_ping.cpp\
code/network/multi_pmsg.cpp\
code/network/multi_rate.cpp\
code/network/multi_respawn.cpp\
code/network/multi_team.cpp\
code/network/multi_update.cpp\
code/network/multi_voice.cpp\
code/network/multi_xfer.cpp\
code/network/multilag.cpp\
code/network/multimsgs.cpp\
code/network/multiteamselect.cpp\
code/network/multiui.cpp\
code/network/multiutil.cpp\
code/network/psnet.cpp\
code/network/psnet2.cpp\
code/network/stand_gui.cpp\
code/network/stand_gui-unix.cpp\
code/object/collidedebrisship.cpp\
code/object/collidedebrisweapon.cpp\
code/object/collideshipship.cpp\
code/object/collideshipweapon.cpp\
code/object/collideweaponweapon.cpp\
code/object/objcollide.cpp\
code/object/object.cpp\
code/object/objectsnd.cpp\
code/object/objectsort.cpp\
code/observer/observer.cpp\
code/osapi/osapi.cpp\
code/osapi/osapi_unix.cpp\
code/osapi/osregistry.cpp\
code/osapi/osregistry_unix.cpp\
code/osapi/outwnd.cpp\
code/osapi/outwnd_unix.cpp\
code/palman/palman.cpp\
code/parse/encrypt.cpp\
code/parse/parselo.cpp\
code/parse/sexp.cpp\
code/particle/particle.cpp\
code/pcxutils/pcxutils.cpp\
code/physics/physics.cpp\
code/playerman/managepilot.cpp\
code/playerman/playercontrol.cpp\
code/popup/popup.cpp\
code/popup/popupdead.cpp\
code/radar/radar.cpp\
code/render/3ddraw.cpp\
code/render/3dclipper.cpp\
code/render/3dlaser.cpp\
code/render/3dmath.cpp\
code/render/3dsetup.cpp\
code/scramble/scramble.cpp\
code/ship/afterburner.cpp\
code/ship/ai.cpp\
code/ship/aibig.cpp\
code/ship/aicode.cpp\
code/ship/aigoals.cpp\
code/ship/awacs.cpp\
code/ship/shield.cpp\
code/ship/ship.cpp\
code/ship/shipcontrails.cpp\
code/ship/shipfx.cpp\
code/ship/shiphit.cpp\
code/sound/audiostr.cpp\
code/sound/acm.cpp\
code/sound/ds.cpp\
code/sound/ds3d.cpp\
code/sound/dscap.cpp\
code/sound/fsspeech.cpp\
code/sound/midifile.cpp\
code/sound/rbaudio.cpp\
code/sound/rtvoice.cpp\
code/sound/sound.cpp\
code/sound/speech.cpp\
code/sound/winmidi.cpp\
code/sound/winmidi_base.cpp\
code/sound/acm-unix.cpp\
code/starfield/nebula.cpp\
code/starfield/starfield.cpp\
code/starfield/supernova.cpp\
code/stats/medals.cpp\
code/stats/scoring.cpp\
code/stats/stats.cpp\
code/tgautils/tgautils.cpp\
code/ui/button.cpp\
code/ui/checkbox.cpp\
code/ui/gadget.cpp\
code/ui/icon.cpp\
code/ui/inputbox.cpp\
code/ui/keytrap.cpp\
code/ui/listbox.cpp\
code/ui/radio.cpp\
code/ui/scroll.cpp\
code/ui/slider.cpp\
code/ui/slider2.cpp\
code/ui/uidraw.cpp\
code/ui/uimouse.cpp\
code/ui/window.cpp\
code/vcodec/codec1.cpp\
code/weapon/beam.cpp\
code/weapon/corkscrew.cpp\
code/weapon/emp.cpp\
code/weapon/flak.cpp\
code/weapon/muzzleflash.cpp\
code/weapon/shockwave.cpp\
code/weapon/swarm.cpp\
code/weapon/trails.cpp\
code/weapon/weapons.cpp\
code/windows_stub/stubs.cpp\
code/species_defs/species_defs.cpp\
code/fs2open_pxo/Client.cpp\
code/fs2open_pxo/TCP_Client.cpp\
code/fs2open_pxo/TCP_Socket.cpp\
code/fs2open_pxo/udpsocket.cpp\
code/openil/il_func.cpp\
code/jpgutils/jpgutils.cpp\
code/irc/irc.cpp\
code/graphics/grbatch.cpp\
code/graphics/gropengltnl.cpp\
code/graphics/gropengllight.cpp\
code/graphics/gropenglextension.cpp\
code/graphics/gropengltexture.cpp\
code/sound/audiostr-unix.cpp\
code/autopilot/autopilot.cpp\
code/hud/hudnavigation.cpp
module.pixmap.name=.
module.pixmap.type=
module.pixmap.files=\
code/freespace2/app_icon.ico\
code/freespace2/goal_com.bmp\
code/freespace2/goal_fail.bmp\
code/freespace2/goal_inc.bmp\
code/freespace2/goal_none.bmp\
code/freespace2/goal_ord.bmp
module.data.name=.
module.data.type=
module.data.files=
module.help.name=.
module.help.type=
module.help.files=
module.doc.name=.
module.doc.type=
module.doc.files=\
AUTHORS\
ChangeLog\
COPYING\
INSTALL\
NEWS\
README
module.po.files=
compiler.options.supports=
compiler.options.include.paths=\
.\
..
compiler.options.library.paths=
compiler.options.libraries=
compiler.options.libraries.selected=
compiler.options.defines=\
HAVE_CONFIG_H
compiler.options.defines.selected=
compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0
compiler.options.optimize.buttons=0 0 1 0
compiler.options.other.buttons=1 0
compiler.options.other.c.flags=
compiler.options.other.l.flags=
compiler.options.other.l.libs=
project.src.paths=
+7 -11
View File
@@ -43,17 +43,17 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /D "USE_OPENGL" /D "HTL" /D "MORE_SPECIES" /U "_DEBUG" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "_MBCS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /U "_DEBUG" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
# ADD BSC32 /nologo /o"Release\Profile\Freespace2.bsc" "Release\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 Quartz.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_r.exe" /libpath:"release" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib"
# ADD LINK32 Quartz.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_r.exe" /libpath:"release" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib" /libpath:"C:\libraries\DevIL\lib"
# SUBTRACT LINK32 /pdb:none
# Begin Custom Build - Copying $(InputPath) to D:\games\freespace2
InputPath=\games\freespace2\fs2_open_r.exe
@@ -78,18 +78,18 @@ SOURCE="$(InputPath)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "NO_CD_CHECK" /D "MORE_SPECIES" /U "NDEBUG" /Fr /YX /FD /GZ /GZ /c
# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "code" /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "NO_CD_CHECK" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo /o"debug/profile/Freespace2.bsc" "./debug/profile/*.sbr"
# ADD BSC32 /nologo /o"Debug\Profile\Freespace2.bsc" "Debug\Profile\*.sbr"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Quartz.lib d3d8.lib d3dx8.lib DxErr8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_d.exe" /libpath:"debug" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib"
# SUBTRACT LINK32 /pdb:none /incremental:no /map
# ADD LINK32 Quartz.lib d3d8.lib d3dx8.lib DxErr8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib Dxerr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib code.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"C:\games\freespace2\fs2_open_d.exe" /libpath:"debug" /libpath:"c:\mssdk\lib" /libpath:"c:\dxsdk\lib" /libpath:"c:\speech_api\lib" /libpath:"C:\libraries\DevIL\lib"
# SUBTRACT LINK32 /pdb:none /incremental:no
# Begin Custom Build - Copying $(InputPath) to D:\games\freespace2
InputPath=\games\freespace2\fs2_open_d.exe
SOURCE="$(InputPath)"
@@ -157,9 +157,5 @@ SOURCE=.\code\FREESPACE2\LevelPaging.cpp
SOURCE=.\code\FREESPACE2\LevelPaging.h
# End Source File
# Begin Source File
SOURCE=.\code\network\multiui.cpp
# End Source File
# End Target
# End Project
-506
View File
@@ -1,506 +0,0 @@
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for fs2_open (top level)
#
# This file uses GNU Automake to generate makefiles
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DX8_INCLUDE = @DX8_INCLUDE@
DX8_LIB = @DX8_LIB@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
FS2_GRSOFT_FALSE = @FS2_GRSOFT_FALSE@
FS2_GRSOFT_TRUE = @FS2_GRSOFT_TRUE@
FS2_JOYSTICK_FALSE = @FS2_JOYSTICK_FALSE@
FS2_JOYSTICK_TRUE = @FS2_JOYSTICK_TRUE@
FS2_NETWORKING_FALSE = @FS2_NETWORKING_FALSE@
FS2_NETWORKING_TRUE = @FS2_NETWORKING_TRUE@
FS2_OS_UNIX_FALSE = @FS2_OS_UNIX_FALSE@
FS2_OS_UNIX_TRUE = @FS2_OS_UNIX_TRUE@
FS2_OS_WIN32_FALSE = @FS2_OS_WIN32_FALSE@
FS2_OS_WIN32_TRUE = @FS2_OS_WIN32_TRUE@
FS2_SOUND_FALSE = @FS2_SOUND_FALSE@
FS2_SOUND_TRUE = @FS2_SOUND_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = code
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS aclocal.m4 config.guess config.sub configure \
configure.in depcomp install-sh missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-recursive ctags ctags-recursive dist \
dist-all dist-gzip distcheck distclean distclean-generic \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am dvi-recursive info info-am \
info-recursive install install-am install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-recursive pdf pdf-am \
pdf-recursive ps ps-am ps-recursive tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+180
View File
@@ -0,0 +1,180 @@
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
AC_REQUIRE([AC_CANONICAL_TARGET])
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])
+126
View File
@@ -0,0 +1,126 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
PKG_NAME="the package."
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -name configure.ac -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
if grep "sed.*POTFILES" configure.ac >/dev/null; then
: do nothing -- we still have an old unmodified configure.ac
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
./setup-gettext
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AM_GNOME_GETTEXT" configure.ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
./setup-gettext
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --copy --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME
else
echo Skipping configure process.
fi
+5
View File
@@ -0,0 +1,5 @@
Makefile
Makefile.in
fs2_open_d
fs2_open_r
.deps
+336 -267
View File
@@ -1,305 +1,374 @@
# code/Makefile.am for fs2_open
#
# $Id: Makefile.am,v 1.2 2003-03-11 19:00:05 penguin Exp $
# $Id: Makefile.am,v 1.3 2004-05-24 04:10:03 taylor Exp $
noinst_PROGRAMS = fs2
if FS2_DEBUG
noinst_PROGRAMS = fs2_open_d
fs2_open_d_SOURCES = $(CODE_SOURCES)
else
noinst_PROGRAMS = fs2_open_r
fs2_open_r_SOURCES = $(CODE_SOURCES)
endif # FS2_DEBUG
fs2_SOURCES = \
anim/animplay.cpp \
anim/packunpack.cpp \
asteroid/asteroid.cpp \
bmpman/bmpman.cpp \
cfile/cfile.cpp \
cfile/cfilearchive.cpp \
cfile/cfilelist.cpp \
cfile/cfilesystem.cpp \
cmdline/cmdline.cpp \
cmeasure/cmeasure.cpp \
controlconfig/controlsconfig.cpp \
controlconfig/controlsconfigcommon.cpp \
cutscene/cutscenes.cpp \
debris/debris.cpp \
debugconsole/console.cpp \
decals/decals.cpp \
demo/demo.cpp \
exceptionhandler/exceptionhandler.cpp \
fireball/fireballs.cpp \
fireball/warpineffect.cpp \
freespace2/freespace.cpp \
freespace2/levelpaging.cpp \
gamehelp/contexthelp.cpp \
gamehelp/gameplayhelp.cpp \
gamesequence/gamesequence.cpp \
globalincs/alphacolors.cpp \
globalincs/crypt.cpp \
globalincs/systemvars.cpp \
globalincs/version.cpp \
graphics/2d.cpp \
graphics/aaline.cpp \
graphics/bitblt.cpp \
graphics/circle.cpp \
graphics/colors.cpp \
graphics/font.cpp \
graphics/gradient.cpp \
graphics/gropengl.cpp \
graphics/grzbuffer.cpp \
graphics/line.cpp \
graphics/pixel.cpp \
graphics/rect.cpp \
graphics/scaler.cpp \
graphics/shade.cpp \
hud/hud.cpp \
hud/hudartillery.cpp \
hud/hudbrackets.cpp \
hud/hudconfig.cpp \
hud/hudescort.cpp \
hud/hudets.cpp \
hud/hudlock.cpp \
hud/hudmessage.cpp \
hud/hudreticle.cpp \
hud/hudshield.cpp \
hud/hudsquadmsg.cpp \
hud/hudtarget.cpp \
hud/hudtargetbox.cpp \
hud/hudwingmanstatus.cpp \
io/key.cpp \
io/keycontrol.cpp \
io/mouse.cpp \
io/timer.cpp \
jumpnode/jumpnode.cpp \
lighting/lighting.cpp \
localization/fhash.cpp \
localization/localize.cpp \
math/fix.cpp \
math/floating.cpp \
math/fvi.cpp \
math/spline.cpp \
math/staticrand.cpp \
math/vecmat.cpp \
menuui/barracks.cpp \
menuui/credits.cpp \
menuui/fishtank.cpp \
menuui/mainhallmenu.cpp \
menuui/mainhalltemp.cpp \
menuui/optionsmenu.cpp \
menuui/playermenu.cpp \
menuui/readyroom.cpp \
menuui/snazzyui.cpp \
menuui/techmenu.cpp \
menuui/trainingmenu.cpp \
mission/missionbriefcommon.cpp \
mission/missioncampaign.cpp \
mission/missiongoals.cpp \
mission/missiongrid.cpp \
mission/missionhotkey.cpp \
mission/missionload.cpp \
mission/missionlog.cpp \
mission/missionmessage.cpp \
mission/missionparse.cpp \
mission/missiontraining.cpp \
missionui/missionbrief.cpp \
missionui/missioncmdbrief.cpp \
missionui/missiondebrief.cpp \
missionui/missionloopbrief.cpp \
missionui/missionpause.cpp \
missionui/missionrecommend.cpp \
missionui/missionscreencommon.cpp \
missionui/missionshipchoice.cpp \
missionui/missionstats.cpp \
missionui/missionweaponchoice.cpp \
missionui/redalert.cpp \
model/modelcollide.cpp \
model/modelinterp.cpp \
model/modeloctant.cpp \
model/modelread.cpp \
nebula/neb.cpp \
nebula/neblightning.cpp \
object/collidedebrisship.cpp \
object/collidedebrisweapon.cpp \
object/collideshipship.cpp \
object/collideshipweapon.cpp \
object/collideweaponweapon.cpp \
object/objcollide.cpp \
object/object.cpp \
object/objectsort.cpp \
observer/observer.cpp \
palman/palman.cpp \
parse/encrypt.cpp \
parse/parselo.cpp \
parse/sexp.cpp \
particle/particle.cpp \
pcxutils/pcxutils.cpp \
physics/physics.cpp \
playerman/managepilot.cpp \
playerman/playercontrol.cpp \
popup/popup.cpp \
popup/popupdead.cpp \
radar/radar.cpp \
render/3dclipper.cpp \
render/3ddraw.cpp \
render/3dlaser.cpp \
render/3dmath.cpp \
render/3dsetup.cpp \
ship/afterburner.cpp \
ship/ai.cpp \
ship/aibig.cpp \
ship/aicode.cpp \
ship/aigoals.cpp \
ship/awacs.cpp \
ship/shield.cpp \
ship/ship.cpp \
ship/shipcontrails.cpp \
ship/shipfx.cpp \
ship/shiphit.cpp \
starfield/nebula.cpp \
starfield/starfield.cpp \
starfield/supernova.cpp \
stats/medals.cpp \
stats/scoring.cpp \
stats/stats.cpp \
tgautils/tgautils.cpp \
ui/button.cpp \
ui/checkbox.cpp \
ui/gadget.cpp \
ui/icon.cpp \
ui/inputbox.cpp \
ui/keytrap.cpp \
ui/listbox.cpp \
ui/radio.cpp \
ui/scroll.cpp \
ui/slider.cpp \
ui/slider2.cpp \
ui/uidraw.cpp \
ui/uimouse.cpp \
ui/window.cpp \
weapon/beam.cpp \
weapon/corkscrew.cpp \
weapon/emp.cpp \
weapon/flak.cpp \
weapon/muzzleflash.cpp \
weapon/shockwave.cpp \
weapon/swarm.cpp \
weapon/trails.cpp \
weapon/weapons.cpp
LDADD =
CODE_SOURCES = \
anim/animplay.cpp \
anim/packunpack.cpp \
asteroid/asteroid.cpp \
autopilot/autopilot.cpp \
bmpman/bmpman.cpp \
cfile/cfile.cpp \
cfile/cfilearchive.cpp \
cfile/cfilelist.cpp \
cfile/cfilesystem.cpp \
cmdline/cmdline.cpp \
cmeasure/cmeasure.cpp \
controlconfig/controlsconfig.cpp \
controlconfig/controlsconfigcommon.cpp \
cutscene/cutscenes.cpp \
ddsutils/ddsutils.cpp \
debris/debris.cpp \
debugconsole/console.cpp \
debugconsole/timerbar.cpp \
decals/decals.cpp \
demo/demo.cpp \
exceptionhandler/exceptionhandler.cpp \
fireball/fireballs.cpp \
fireball/warpineffect.cpp \
freespace2/freespace.cpp \
freespace2/levelpaging.cpp \
gamehelp/contexthelp.cpp \
gamehelp/gameplayhelp.cpp \
gamesequence/gamesequence.cpp \
globalincs/alphacolors.cpp \
globalincs/crypt.cpp \
globalincs/systemvars.cpp \
globalincs/version.cpp \
graphics/2d.cpp \
graphics/font.cpp \
graphics/grbatch.cpp \
graphics/gropengl.cpp \
graphics/gropenglextension.cpp \
graphics/gropengllight.cpp \
graphics/gropengltexture.cpp \
graphics/gropengltnl.cpp \
graphics/grzbuffer.cpp \
hud/hud.cpp \
hud/hudartillery.cpp \
hud/hudbrackets.cpp \
hud/hudconfig.cpp \
hud/hudescort.cpp \
hud/hudets.cpp \
hud/hudlock.cpp \
hud/hudmessage.cpp \
hud/hudnavigation.cpp \
hud/hudreticle.cpp \
hud/hudshield.cpp \
hud/hudsquadmsg.cpp \
hud/hudtarget.cpp \
hud/hudtargetbox.cpp \
hud/hudwingmanstatus.cpp \
io/key.cpp \
io/keycontrol.cpp \
io/mouse.cpp \
io/timer.cpp \
jpgutils/jpgutils.cpp \
jumpnode/jumpnode.cpp \
lighting/lighting.cpp \
localization/fhash.cpp \
localization/localize.cpp \
math/fix.cpp \
math/floating.cpp \
math/fvi.cpp \
math/spline.cpp \
math/staticrand.cpp \
math/vecmat.cpp \
menuui/barracks.cpp \
menuui/credits.cpp \
menuui/fishtank.cpp \
menuui/mainhallmenu.cpp \
menuui/mainhalltemp.cpp \
menuui/optionsmenu.cpp \
menuui/playermenu.cpp \
menuui/readyroom.cpp \
menuui/snazzyui.cpp \
menuui/techmenu.cpp \
menuui/trainingmenu.cpp \
mission/missionbriefcommon.cpp \
mission/missioncampaign.cpp \
mission/missiongoals.cpp \
mission/missiongrid.cpp \
mission/missionhotkey.cpp \
mission/missionload.cpp \
mission/missionlog.cpp \
mission/missionmessage.cpp \
mission/missionparse.cpp \
mission/missiontraining.cpp \
missionui/missionbrief.cpp \
missionui/missioncmdbrief.cpp \
missionui/missiondebrief.cpp \
missionui/missionloopbrief.cpp \
missionui/missionpause.cpp \
missionui/missionrecommend.cpp \
missionui/missionscreencommon.cpp \
missionui/missionshipchoice.cpp \
missionui/missionstats.cpp \
missionui/missionweaponchoice.cpp \
missionui/redalert.cpp \
model/modelcollide.cpp \
model/modelinterp.cpp \
model/modeloctant.cpp \
model/modelread.cpp \
nebula/neb.cpp \
nebula/neblightning.cpp \
object/collidedebrisship.cpp \
object/collidedebrisweapon.cpp \
object/collideshipship.cpp \
object/collideshipweapon.cpp \
object/collideweaponweapon.cpp \
object/objcollide.cpp \
object/object.cpp \
object/objectsort.cpp \
observer/observer.cpp \
palman/palman.cpp \
parse/encrypt.cpp \
parse/parselo.cpp \
parse/sexp.cpp \
particle/particle.cpp \
pcxutils/pcxutils.cpp \
physics/physics.cpp \
playerman/managepilot.cpp \
playerman/playercontrol.cpp \
popup/popup.cpp \
popup/popupdead.cpp \
radar/radar.cpp \
render/3dclipper.cpp \
render/3ddraw.cpp \
render/3dlaser.cpp \
render/3dmath.cpp \
render/3dsetup.cpp \
ship/afterburner.cpp \
ship/ai.cpp \
ship/aibig.cpp \
ship/aicode.cpp \
ship/aigoals.cpp \
ship/awacs.cpp \
ship/shield.cpp \
ship/ship.cpp \
ship/shipcontrails.cpp \
ship/shipfx.cpp \
ship/shiphit.cpp \
starfield/nebula.cpp \
starfield/starfield.cpp \
starfield/supernova.cpp \
stats/medals.cpp \
stats/scoring.cpp \
stats/stats.cpp \
tgautils/tgautils.cpp \
ui/button.cpp \
ui/checkbox.cpp \
ui/gadget.cpp \
ui/icon.cpp \
ui/inputbox.cpp \
ui/keytrap.cpp \
ui/listbox.cpp \
ui/radio.cpp \
ui/scroll.cpp \
ui/slider.cpp \
ui/slider2.cpp \
ui/uidraw.cpp \
ui/uimouse.cpp \
ui/window.cpp \
weapon/beam.cpp \
weapon/corkscrew.cpp \
weapon/emp.cpp \
weapon/flak.cpp \
weapon/muzzleflash.cpp \
weapon/shockwave.cpp \
weapon/swarm.cpp \
weapon/trails.cpp \
weapon/weapons.cpp \
species_defs/species_defs.cpp
## conditional includes follow:
## joystic support sources
if FS2_JOYSTICK
fs2_SOURCES += \
io/joy.cpp \
io/joy_ff.cpp \
io/swff_lib.cpp
if FS2_OS_WIN32
CODE_SOURCES += \
io/joy.cpp \
io/joy_ff.cpp \
io/swff_lib.cpp
endif # FS2_OS_WIN32
if FS2_OS_UNIX
CODE_SOURCES += \
io/joy-unix.cpp
endif # FS2_OS_UNIX
endif # FS2_JOYSTICK
## networking support sources
if FS2_NETWORKING
fs2_SOURCES += \
hud/hudobserver.cpp \
network/multi.cpp \
network/multimsgs.cpp \
network/multiteamselect.cpp \
network/multiui.cpp \
network/multiutil.cpp \
network/multi_campaign.cpp \
network/multi_data.cpp \
network/multi_dogfight.cpp \
network/multi_endgame.cpp \
network/multi_ingame.cpp \
network/multi_kick.cpp \
network/multi_log.cpp \
network/multi_obj.cpp \
network/multi_observer.cpp \
network/multi_options.cpp \
network/multi_pause.cpp \
network/multi_pinfo.cpp \
network/multi_ping.cpp \
network/multi_pmsg.cpp \
network/multi_rate.cpp \
network/multi_respawn.cpp \
network/multi_team.cpp \
network/multi_voice.cpp \
network/multi_xfer.cpp \
network/psnet.cpp \
network/psnet2.cpp \
menuui/optionsmenumulti.cpp \
missionui/chatbox.cpp
CODE_SOURCES += \
hud/hudobserver.cpp \
irc/irc.cpp \
network/fs2ox.cpp \
network/multi.cpp \
network/multimsgs.cpp \
network/multiteamselect.cpp \
network/multiui.cpp \
network/multiutil.cpp \
network/multi_campaign.cpp \
network/multi_data.cpp \
network/multi_dogfight.cpp \
network/multi_endgame.cpp \
network/multi_ingame.cpp \
network/multi_kick.cpp \
network/multi_log.cpp \
network/multi_obj.cpp \
network/multi_observer.cpp \
network/multi_options.cpp \
network/multi_pause.cpp \
network/multi_pinfo.cpp \
network/multi_ping.cpp \
network/multi_pmsg.cpp \
network/multi_rate.cpp \
network/multi_respawn.cpp \
network/multi_team.cpp \
network/multi_voice.cpp \
network/multi_xfer.cpp \
network/psnet.cpp \
network/psnet2.cpp \
menuui/optionsmenumulti.cpp \
missionui/chatbox.cpp \
fs2open_pxo/Client.cpp \
fs2open_pxo/TCP_Client.cpp \
fs2open_pxo/TCP_Socket.cpp \
fs2open_pxo/udpsocket.cpp
if FS2_OS_WIN32
CODE_SOURCES += \
network/stand_gui.cpp
endif # FS2_OS_WIN32
if FS2_OS_UNIX
CODE_SOURCES += \
network/stand_gui-unix.cpp
endif # FS2_OS_UNIX
endif # FS2_NETWORKING
## sound support sources
if FS2_SOUND
fs2_SOURCES += \
gamesnd/eventmusic.cpp \
gamesnd/gamesnd.cpp \
object/objectsnd.cpp \
sound/acm.cpp \
sound/audiostr.cpp \
sound/ds.cpp \
sound/ds3d.cpp \
sound/dscap.cpp \
sound/midifile.cpp \
sound/rbaudio.cpp \
sound/rtvoice.cpp \
sound/sound.cpp \
sound/winmidi.cpp \
sound/winmidi_base.cpp \
vcodec/codec1.cpp
endif # FS2_SOUND
CODE_SOURCES += \
gamesnd/eventmusic.cpp \
gamesnd/gamesnd.cpp \
object/objectsnd.cpp \
sound/ds.cpp \
sound/midifile.cpp \
sound/rbaudio.cpp \
sound/rtvoice.cpp \
sound/sound.cpp \
sound/winmidi.cpp \
sound/winmidi_base.cpp \
vcodec/codec1.cpp \
sound/fsspeech.cpp \
sound/speech.cpp
## software-rendering support sources
if FS2_GRSOFT
fs2_SOURCES += \
graphics/grsoft.cpp \
graphics/tmapper.cpp
endif # FS2_GRSOFT
if FS2_OS_WIN32
CODE_SOURCES += \
sound/dscap.cpp \
sound/ds3d.cpp \
sound/audiostr.cpp \
sound/acm.cpp
endif # FS2_OS_WIN32
if FS2_OS_UNIX
CODE_SOURCES += \
sound/audiostr-unix.cpp \
sound/acm-unix.cpp
endif # FS2_OS_UNIX
endif # FS2_SOUND
## Win32-specific sources
if FS2_OS_WIN32
fs2_SOURCES += \
cutscene/movie.cpp \
directx/dx8show.cpp \
ddsutils/ddsutils.cpp \
globalincs/windebug.cpp \
glide/glide.cpp \
graphics/grd3d.cpp \
graphics/grd3drender.cpp \
graphics/grd3dtexture.cpp \
graphics/grdirectdraw.cpp \
graphics/grglide.cpp \
graphics/grglidetexture.cpp \
network/stand_gui.cpp \
osapi/osapi.cpp \
osapi/osregistry.cpp \
osapi/outwnd.cpp
CODE_SOURCES += \
cutscene/movie.cpp \
directx/dx8show.cpp \
globalincs/windebug.cpp \
glide/glide.cpp \
graphics/grd3d.cpp \
graphics/grd3dbatch.cpp \
graphics/grd3drender.cpp \
graphics/grd3dtexture.cpp \
graphics/grdirectdraw.cpp \
graphics/grglide.cpp \
graphics/grglidetexture.cpp \
osapi/osapi.cpp \
osapi/osregistry.cpp \
osapi/outwnd.cpp
endif # FS2_OS_WIN32
## Unix-specific sources
if FS2_OS_UNIX
fs2_SOURCES += \
io/xmouse.cpp \
osapi/osapi_unix.cpp \
osapi/osregistry_unix.cpp \
osapi/outwnd_unix.cpp
CODE_SOURCES += \
io/xmouse.cpp \
osapi/osapi_unix.cpp \
osapi/osregistry_unix.cpp \
osapi/outwnd_unix.cpp \
cutscene/movie.cpp \
windows_stub/stubs.cpp
endif # FS2_OS_UNIX
# Use devIL
if FS2_DEVIL
CODE_SOURCES += \
openil/il_func.cpp
endif # FS2_DEVIL
## compiler flags
# INCLUDES = -I.
AM_CXXFLAGS = -fno-exceptions @DX8_INCLUDE@
AM_LDFLAGS = -L/c/dx8/lib @DX8_LIB@
#if FS2_SPEECH
#LDADD += \
# -lFestival -lestools -lestbase -leststring -lncurses
#endif
LDADD =
if FS2_OS_WIN32
## compiler flags
# INCLUDES = -I.
AM_CXXFLAGS = \
-fexceptions \
${DX8_INCLUDE} \
${DEVIL_CFLAGS}
AM_LDFLAGS = \
${DX8_LIB} \
${DEVIL_LIBS}
## Win32 libraries needed
LDADD += \
-lgdi32 -lole32 -lwsock32 -lwinmm -lmsacm32 -lopengl32 \
-lcomctl32 -lstrmiids -ldxguid -lddraw -ldinput
LDADD += \
-lgdi32 -lole32 -lwsock32 -lwinmm -lmsacm32 -lopengl32 \
-lcomctl32 -lstrmiids -ldxguid -lddraw -ldinput
endif
if FS2_OS_UNIX
## Unix libraries needed
## -- TODO --
## Unix compiler flags
AM_CXXFLAGS = \
-Wno-missing-braces -Wno-multichar -Wno-deprecated \
${SDL_CFLAGS} \
${OPENAL_CFLAGS} \
${DEVIL_CFLAGS} \
-fsigned-char -DNO_DIRECT3D -DUSE_OPENGL
AM_LDFLAGS = \
${OGL_LIBDIR} -lGL -lGLU \
${SDL_LIBS} \
${OPENAL_LIBS} \
${DEVIL_LIBS}
endif
File diff suppressed because it is too large. Load diff
+67
View File
@@ -0,0 +1,67 @@
// Place all prepreprcoessor definitions that tuurn features on/off
// into this file.
// the purpose of this is to prevent what happens with FRED
// when DECALS_ENABLED was added to code.lib
/*
* $Logfile: /Freespace2/code/PreProcDefines.h $
* $Revision: 1.5 $
* $Date: 2004-12-05 22:01:11 $
* $Author: bobboau $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2004/10/31 21:23:08 taylor
* #define if !#defined, add USE_DEVIL and FS2_SPEECH commented out
*
* Revision 1.3 2004/10/06 22:02:53 Kazan
* interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000)
*
* Revision 1.2 2004/08/20 05:13:07 Kazan
* wakka wakka - fix minor booboo
*
* Revision 1.1 2004/08/11 05:06:17 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
*
*/
#if !defined(_pre_proc_defs_h_)
#define _pre_proc_defs_h_
#ifndef DECALS_ENABLED
#define DECALS_ENABLED 1
#endif
#ifndef HTL
#define HTL 1
#endif
#ifndef USE_OPENGL
#define USE_OPENGL 1
#endif
#ifndef MORE_SPECIES
#define MORE_SPECIES 1
#endif
#ifndef ENABLE_AUTO_PILOT
#define ENABLE_AUTO_PILOT 1
#endif
#ifndef _REPORT_MEM_LEAKS
#define _REPORT_MEM_LEAKS 1
#endif
/*
#ifndef USE_DEVIL
#define USE_DEVIL 1
#endif
#ifndef FS2_SPEECH
#define FS2_SPEECH 1
#endif
*/
#endif // _pre_proc_defs_h_
+28 -6
View File
@@ -9,13 +9,29 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.cpp $
* $Revision: 2.8 $
* $Date: 2004-03-05 09:01:52 $
* $Author: Goober5000 $
* $Revision: 2.13 $
* $Date: 2004-12-20 20:18:30 $
* $Author: fryday $
*
* C module for playing back anim files
*
* $Log: not supported by cvs2svn $
* Revision 2.12 2004/10/09 17:58:48 taylor
* one more try to fix the memory leak and end-of-mission crash for talking head anis
*
* Revision 2.11 2004/07/26 20:47:23 Kazan
* remove MCD complete
*
* Revision 2.10 2004/07/17 18:46:06 taylor
* various OGL and memory leak fixes
*
* Revision 2.9 2004/07/12 16:32:41 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.8 2004/03/05 09:01:52 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.7 2004/02/16 11:47:31 randomtiger
* Removed a lot of files that we dont need anymore.
* Changed htl to be on by default, command now -nohtl
@@ -249,6 +265,8 @@
#include "cfile/cfile.h"
#include "cmdline/cmdline.h"
static color Color_xparent;
anim *first_anim = NULL;
@@ -901,7 +919,7 @@ void anim_read_header(anim *ptr, CFILE *fp)
floor_pow++;
}
int floor_size = (int) pow(2, floor_pow);
int floor_size = (int) pow(2.0, floor_pow);
int diff = ptr->height - floor_size;
float waste = 100.0f * float((floor_size - diff))/(2.0f *(float)floor_size);
@@ -1095,7 +1113,7 @@ int anim_free(anim *ptr)
}
if ( !list )
return -1;
return -2;
// only free when ref_count is 0
ptr->ref_count--;
@@ -1115,11 +1133,15 @@ int anim_free(anim *ptr)
cfclose(ptr->cfile_ptr);
if ( ptr->cache ) {
free(ptr->cache);
ptr->cache = NULL;
}
}
else {
Assert(ptr->data);
free(ptr->data);
if ( ptr->data ) {
free(ptr->data);
ptr->data = NULL;
}
}
*prev_anim = ptr->next;
+9 -3
View File
@@ -9,13 +9,18 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.h $
* $Revision: 2.3 $
* $Date: 2003-12-08 22:30:02 $
* $Author: randomtiger $
* $Revision: 2.4 $
* $Date: 2004-08-11 05:06:18 $
* $Author: Kazan $
*
* Header file for playing back anim files
*
* $Log: not supported by cvs2svn $
* Revision 2.3 2003/12/08 22:30:02 randomtiger
* Put render state and other direct D3D calls repetition check back in, provides speed boost.
* Fixed bug that caused fullscreen only crash with DXT textures
* Put dithering back in for tgas and jpgs
*
* Revision 2.2 2003/11/11 02:15:41 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
@@ -107,6 +112,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __ANIMPLAY_H__
#define __ANIMPLAY_H__
+13 -3
View File
@@ -9,15 +9,22 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.cpp $
* $Revision: 2.5 $
* $Date: 2004-03-05 09:01:53 $
* $Author: Goober5000 $
* $Revision: 2.7 $
* $Date: 2004-07-26 20:47:23 $
* $Author: Kazan $
*
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
* Anim files. Also handles Anim loading, creating Anim instances (for
* utilizing an Anim), and getting getting frames of the Anim.
*
* $Log: not supported by cvs2svn $
* Revision 2.6 2004/07/12 16:32:41 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.5 2004/03/05 09:01:53 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.4 2004/02/14 00:18:29 randomtiger
* Please note that from now on OGL will only run with a registry set by Launcher v4. See forum for details.
* OK, these changes effect a lot of file, I suggest everyone updates ASAP:
@@ -194,6 +201,9 @@
#include "graphics/2d.h"
#include "anim/animplay.h"
int packer_code = PACKER_CODE;
int transparent_code = 254;
+8 -3
View File
@@ -9,15 +9,19 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.h $
* $Revision: 2.2 $
* $Date: 2004-03-05 09:01:53 $
* $Author: Goober5000 $
* $Revision: 2.3 $
* $Date: 2004-08-11 05:06:18 $
* $Author: Kazan $
*
* Code for handling packing and unpacking in Hoffoss's RLE format, used for
* Anim files. Also handles Anim loading, creating Anim instances (for
* utilizing an Anim), and getting getting frames of the Anim.
*
* $Log: not supported by cvs2svn $
* Revision 2.2 2004/03/05 09:01:53 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -154,6 +158,7 @@
#ifndef __PACKUNPACK_H__
#define __PACKUNPACK_H__
#include "PreProcDefines.h"
#include "globalincs/pstypes.h"
struct CFILE;
+13 -3
View File
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.cpp $
* $Revision: 2.7 $
* $Date: 2004-03-31 05:42:25 $
* $Author: Goober5000 $
* $Revision: 2.9 $
* $Date: 2004-07-26 20:47:23 $
* $Author: Kazan $
*
* C module for asteroid code
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/07/12 16:32:41 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.7 2004/03/31 05:42:25 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 2.6 2004/03/05 09:01:53 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -325,6 +333,8 @@
#include "network/multi.h"
#endif
#ifndef FS2_DEMO
#define ASTEROID_OBJ_USED (1<<0) // flag used in asteroid_obj struct
+8 -3
View File
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.h $
* $Revision: 2.4 $
* $Date: 2004-03-05 09:01:53 $
* $Author: Goober5000 $
* $Revision: 2.5 $
* $Date: 2004-08-11 05:06:18 $
* $Author: Kazan $
*
* Header file for asteroids
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/03/05 09:01:53 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.3 2003/10/15 22:03:23 Kazan
* Da Species Update :D
*
@@ -132,6 +136,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __ASTEROID_H__
#define __ASTEROID_H__
+808
View File
@@ -0,0 +1,808 @@
// Autopilot.cpp
// Derek Meek
// 4-30-2004
/*
* $Logfile: /Freespace2/code/Autopilot/Autopilot.cpp $
* $Revision: 1.14 $
* $Date: 2004-10-03 21:41:10 $
* $Author: Kazan $
*
* $Log: not supported by cvs2svn $
* Revision 1.13 2004/09/28 22:51:41 Kazan
* fix autopilot formation bug
*
* Revision 1.12 2004/09/28 19:54:31 Kazan
* | is binary or, || is boolean or - please use the right one
* autopilot velocity ramping biasing
* made debugged+k kill guardianed ships
*
* Revision 1.11 2004/07/29 23:41:21 Kazan
* bugfixes
*
* Revision 1.10 2004/07/27 18:52:10 Kazan
* squished another
*
* Revision 1.9 2004/07/27 18:04:09 Kazan
* i love it when bugs go crunch (autopilot ai fixup)
*
* Revision 1.8 2004/07/26 20:47:24 Kazan
* remove MCD complete
*
* Revision 1.7 2004/07/26 17:54:04 Kazan
* Autopilot system completed -- i am dropping plans for GUI nav map
* All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
* Fixed FPS counter during time compression
*
* Revision 1.6 2004/07/25 19:27:51 Kazan
* only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged
*
* Revision 1.5 2004/07/25 18:46:28 Kazan
* -fred_no_warn has become -no_warn and applies to both fred and fs2
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
*
* Revision 1.4 2004/07/25 00:31:27 Kazan
* i have absolutely nothing to say about that subject
*
* Revision 1.3 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 1.2 2004/07/01 16:38:18 Kazan
* working on autonav
*
* Revision 1.1 2004/05/07 23:50:14 Kazan
* Sorry Guys!
*
*
*
*
*/
#include "Autopilot.h"
#include "ship/ai.h"
#include "ship/aigoals.h"
#include "ship/ship.h"
#include "object/object.h"
#include "parse/sexp.h"
// Extern functions/variables
extern int Player_use_ai;
extern int sexp_distance2(int obj1, char *subj);
extern int ai_goal_find_empty_slot( ai_goal *goals );
extern fix Game_time_compression;
#if defined(ENABLE_AUTO_PILOT)
// Module variables
bool AutoPilotEngaged;
int CurrentNav;
float ramp_bias;
NavPoint Navs[MAX_NAVPOINTS];
// used for ramping time compression;
int start_dist;
// ********************************************************************************************
void autopilot_ai_waypoint_goal_fixup(ai_goal* aigp)
{
// this function sets wp_index properly;
for (int i = 0; i < Num_waypoint_lists; i++)
{
if (!stricmp(aigp->ship_name, Waypoint_lists[i].name))
{
aigp->wp_index = i;
return;
}
}
}
// ********************************************************************************************
bool Sel_NextNav()
{
if (AutoPilotEngaged)
return false;
int i;
if (CurrentNav == -1)
{
for (i = 0; i < MAX_NAVPOINTS; i++)
{
if (Navs[i].flags & NP_VALIDTYPE && !(Navs[i].flags & NP_NOSELECT))
{
CurrentNav=i;
return true;
}
}
}
else
{
for (i = CurrentNav+1; i < MAX_NAVPOINTS+CurrentNav; i++)
{
if (Navs[i%MAX_NAVPOINTS].flags & NP_VALIDTYPE && !(Navs[i%MAX_NAVPOINTS].flags & NP_NOSELECT))
{
if (i != CurrentNav)
{
CurrentNav=i%MAX_NAVPOINTS;
return true;
}
}
}
}
return false;
}
// ********************************************************************************************
vector NavPoint::GetPosition()
{
vector position;
if (flags & NP_WAYPOINT)
{
position = ((waypoint_list*)target_obj)->waypoints[waypoint_num-1];
}
else
{
position = Objects[((ship*)target_obj)->objnum].pos;
}
return position;
}
char* NavPoint::GetInteralName()
{
char *NavName;
char strtmp[3];
if (flags & NP_WAYPOINT)
{
NavName = new char[strlen(((waypoint_list*)target_obj)->name)+5];
memset(NavName, 0, strlen(((waypoint_list*)target_obj)->name)+5);
strcpy(NavName, ((waypoint_list*)target_obj)->name);
strcat(NavName, ":");
strcat(NavName, itoa(waypoint_num, strtmp, 10));
}
else
{
NavName = new char[strlen(((ship*)target_obj)->ship_name)+1];
memset(NavName, 0, strlen(((ship*)target_obj)->ship_name)+1);
strcpy(NavName, ((ship*)target_obj)->ship_name);
}
return NavName;
}
// ********************************************************************************************
// Tell us is autopilot is allow
// This needs:
// * Nav point selected
// * No enemies within X distance
// * Destination > 1,000 meters away
bool CanAutopilot()
{
bool CanAuto = true;
CanAuto = CanAuto && CurrentNav != -1;
int dist = sexp_distance2(Player_ship->objnum, "<any hostile>");
CanAuto = CanAuto && (5000 <= dist || dist == SEXP_NAN);
if (CanAuto) // protect against no currentNav
{
char *name = Navs[CurrentNav].GetInteralName();
CanAuto = CanAuto && (1000 <= sexp_distance2(Player_ship->objnum, name));
delete[] name;
}
return CanAuto;
}
// ********************************************************************************************
// Engages autopilot
// This does:
// * Control switched from player to AI
// * Time compression to 32x
// * Tell AI to fly to targetted Nav Point (for all nav-status wings/ships)
// * Sets max waypoint speed to the best-speed of the slowest ship tagged
void StartAutopilot()
{
if (!CanAutopilot())
return;
AutoPilotEngaged = true;
Player_use_ai = 1;
Game_time_compression = F1_0;
// determine speed cap
int i,j;
float speed_cap = 1000000.0; // 1m is a safe starting point
for (i = 0; i < MAX_SHIPS; i++)
{
if (Ships[i].objnum != -1 &&
(Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY)
)
)
{
if (speed_cap > Ship_info[Ships[i].ship_info_index].max_vel.xyz.z)
speed_cap = Ship_info[Ships[i].ship_info_index].max_vel.xyz.z;
}
}
// damp speed_cap to 90% of actual -- to make sure ships stay in formation
speed_cap = 0.90f * speed_cap;
ramp_bias = speed_cap/50.0f;
// assign ship goals
// when assigning goals to individual ships only do so if Ships[shipnum].wingnum != -1
// we will assign wing goals below
for (i = 0; i < MAX_SHIPS; i++)
{
if (Ships[i].objnum != -1 &&
(Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY)
)
)
{
// clear the ship goals and cap the waypoint speed
ai_clear_ship_goals(&Ai_info[Ships[i].ai_index]);
Ai_info[Ships[i].ai_index].waypoint_speed_cap = (int)speed_cap;
// if they're not part of a wing set their goal
if (Ships[i].wingnum == -1)
{
if (Navs[CurrentNav].flags & NP_WAYPOINT)
{
ai_add_ship_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, -1, ((waypoint_list*)Navs[CurrentNav].target_obj)->name, &Ai_info[Ships[i].ai_index] );
//fixup has to wait until after wing goals
}
else
{
ai_add_ship_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_FLY_TO_SHIP, -1, ((ship*)Navs[CurrentNav].target_obj)->ship_name, &Ai_info[Ships[i].ai_index] );
}
}
}
}
// assign wing goals
for (i = 0; i < MAX_WINGS; i++)
{
if (Wings[i].flags & WF_NAV_CARRY )
{
//ai_add_ship_goal_player( int type, int mode, int submode, char *shipname, ai_info *aip );
//ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_STAY_NEAR_SHIP, 0, target_shipname, wingnum );
//ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, 0, target_shipname, wingnum );
//ai_clear_ship_goals( &(Ai_info[Ships[num].ai_index]) );
ai_clear_wing_goals( i );
if (Navs[CurrentNav].flags & NP_WAYPOINT)
{
ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_WAYPOINTS_ONCE, AIF_FORMATION_WING, ((waypoint_list*)Navs[CurrentNav].target_obj)->name, i );
// "fix up" the goal
for (j = 0; j < MAX_AI_GOALS; j++)
{
if (Wings[i].ai_goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
Wings[i].ai_goals[j].ai_mode == AIM_WAYPOINTS )
{
autopilot_ai_waypoint_goal_fixup(&(Wings[i].ai_goals[j]));
}
}
}
else
{
ai_add_wing_goal_player( AIG_TYPE_PLAYER_WING, AI_GOAL_FLY_TO_SHIP, AIF_FORMATION_WING, ((ship*)Navs[CurrentNav].target_obj)->ship_name, i );
}
}
}
// fixup has to go down here because ships are assigned goals during wing goals as well
for (i = 0; i < MAX_SHIPS; i++)
{
if (Ships[i].objnum != -1)
{
if (Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY))
for (j = 0; j < MAX_AI_GOALS; j++)
{
if (Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_WAYPOINTS)
{
autopilot_ai_waypoint_goal_fixup( &(Ai_info[Ships[i].ai_index].goals[j]) );
// formation fixup
//ai_form_on_wing(&Objects[Ships[i].objnum], &Objects[Player_ship->objnum]);
}
}
}
}
start_dist = DistanceTo(CurrentNav);
}
// ********************************************************************************************
// Checks if autopilot should automatically die
// Returns true if:
// * Targetted waypoint < 10,000 meters away
// * Enemy < 10,000 meters
bool Autopilot_AutoDiable()
{
return !CanAutopilot();
}
// ********************************************************************************************
// Disengages autopilot
// this does:
// * Time compression to 1x
// * Delete AI nav goal
// * Control switched from AI to player
void EndAutoPilot()
{
AutoPilotEngaged = false;
Game_time_compression = F1_0;
Player_use_ai = 0;
//Clear AI Goals
// assign ship goals
// when assigning goals to individual ships only do so if Ships[shipnum].wingnum != -1
// we will assign wing goals below
int i,j;
for (i = 0; i < MAX_SHIPS; i++)
{
if (Ships[i].objnum != -1 &&
(
Ships[i].flags2 & SF2_NAVPOINT_CARRY ||
(Ships[i].wingnum != -1 && Wings[Ships[i].wingnum].flags & WF_NAV_CARRY )
)
)
{
Ai_info[Ships[i].ai_index].waypoint_speed_cap = -1; // uncap their speed
// old "dumb" routine
//ai_clear_ship_goals( &(Ai_info[Ships[i].ai_index]) );
for (j = 0; j < MAX_AI_GOALS; j++)
{
if (Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AI_GOAL_FLY_TO_SHIP ||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_WAYPOINTS ||
Ai_info[Ships[i].ai_index].goals[j].ai_mode == AIM_FLY_TO_SHIP)
{
ai_remove_ship_goal( &(Ai_info[Ships[i].ai_index]), j );
}
}
}
}
// assign wing goals
for (i = 0; i < MAX_WINGS; i++)
{
if (Wings[i].flags & WF_NAV_CARRY )
{
// old "dumb" routine
//ai_clear_wing_goals( i );
for (j = 0; j < MAX_AI_GOALS; j++)
{
if (Wings[i].ai_goals[j].ai_mode == AI_GOAL_WAYPOINTS_ONCE ||
Wings[i].ai_goals[j].ai_mode == AI_GOAL_FLY_TO_SHIP ||
Wings[i].ai_goals[j].ai_mode == AIM_WAYPOINTS ||
Wings[i].ai_goals[j].ai_mode == AIM_FLY_TO_SHIP)
{
Wings[i].ai_goals[j].ai_mode = AI_GOAL_NONE;
Wings[i].ai_goals[j].signature = -1;
Wings[i].ai_goals[j].priority = -1;
}
}
}
}
}
// ********************************************************************************************
// Checks for changes every NPS_TICKRATE milliseconds
// Checks:
// * if we've gotten close enough to a nav point for it to be counted as "Visited"
// * If we're current AutoNavigating it checks if we need to autodisengage
void NavSystem_Do()
{
static unsigned int last_update = 0;
if (clock () - last_update > NPS_TICKRATE)
{
if (AutoPilotEngaged)
if (Autopilot_AutoDiable())
EndAutoPilot();
// check if a NavPoints target has left, delete it if so
int i;
for (i = 0; i < MAX_NAVPOINTS; i++)
{
if (Navs[i].flags & NP_SHIP)
{
if (((ship*)Navs[i].target_obj)->objnum == -1)
DelNavPoint(i);
}
}
// check if we're reached a Node
for (i = 0; i < MAX_NAVPOINTS; i++)
{
if (Navs[i].flags & NP_VALIDTYPE && DistanceTo(i) < 1000)
Navs[i].flags |= NP_VISITED;
}
}
// ramp time compression
if (AutoPilotEngaged)
{
int dstfrm_start = start_dist - DistanceTo(CurrentNav);
// Ramp UP time compression
if (dstfrm_start < (3500*ramp_bias))
{
if (dstfrm_start >= (3000*ramp_bias) && DistanceTo(CurrentNav) > 30000)
Game_time_compression = F1_0 * 64;
else if (dstfrm_start >= (2000*ramp_bias))
Game_time_compression = F1_0 * 32;
else if (dstfrm_start >= (1600*ramp_bias))
Game_time_compression = F1_0 * 16;
else if (dstfrm_start >= (1200*ramp_bias))
Game_time_compression = F1_0 * 8;
else if (dstfrm_start >= (800*ramp_bias))
Game_time_compression = F1_0 * 4;
else if (dstfrm_start >= (400*ramp_bias))
Game_time_compression = F1_0 * 2;
}
// Ramp DOWN time compression
if (DistanceTo(CurrentNav) <= (7000*ramp_bias))
{
int dist = DistanceTo(CurrentNav);
if (dist >= (5000*ramp_bias))
Game_time_compression = F1_0 * 32;
else if (dist >= (4000*ramp_bias))
Game_time_compression = F1_0 * 16;
else if (dist >= (3000*ramp_bias))
Game_time_compression = F1_0 * 8;
else if (dist >= (2000*ramp_bias))
Game_time_compression = F1_0 * 4;
else if (dist >= (1000*ramp_bias))
Game_time_compression = F1_0 * 2;
}
}
}
// ********************************************************************************************
// Inits the Nav System
void NavSystem_Init()
{
memset((char *)&Navs, 0, sizeof(Navs));
AutoPilotEngaged = false;
CurrentNav = -1;
}
// ********************************************************************************************
// Finds a Nav point by name
int FindNav(char *Nav)
{
for (int i = 0; i < MAX_NAVPOINTS; i++)
{
if (!stricmp(Navs[i].NavName, Nav))
return i;
}
return -1;
}
// ********************************************************************************************
// Set A Nav point to "ZERO"
void ZeroNav(int i)
{
memset((char *)&Navs[i], 0, sizeof(NavPoint));
}
// ********************************************************************************************
// Removes a Nav
bool DelNavPoint(char *Nav)
{
int n = FindNav(Nav);
return DelNavPoint(n);
}
bool DelNavPoint(int nav)
{
if (nav != -1)
{
if (nav != MAX_NAVPOINTS-1)
{
for (int i = nav; i < MAX_NAVPOINTS-1; i++)
{
Navs[nav] = Navs[nav+1];
}
}
ZeroNav(MAX_NAVPOINTS-1);
return true;
}
return false;
}
// ********************************************************************************************
// adds a Nav
bool AddNav_Ship(char *Nav, char *TargetName, int flags)
{
// find an empty nav - should be the end
int empty = -1;
for (int i = 0; i < MAX_NAVPOINTS && empty == -1; i++)
{
if (Navs[i].flags == 0)
empty = i;
}
if (empty == -1) // no empty navpoint slots
return false;
// Create the NavPoint struct
NavPoint tnav;
strncpy(tnav.NavName, Nav, 32);
tnav.flags = NP_SHIP | flags;
Assert(!(tnav.flags & NP_WAYPOINT));
for (i = 0; i < MAX_SHIPS; i++)
{
if (Ships[i].objnum != -1 && !stricmp(TargetName, Ships[i].ship_name))
{
tnav.target_obj = (void *)&Ships[i];
}
}
tnav.waypoint_num = 0; // unused for NP_SHIP
// copy it into it's location
Navs[empty] = tnav;
return true;
}
bool AddNav_Waypoint(char *Nav, char *WP_Path, int node, int flags)
{
// find an empty nav - should be the end
int empty = -1;
if (node == 0)
node = 1;
for (int i = 0; i < MAX_NAVPOINTS && empty == -1; i++)
{
if (Navs[i].flags == 0)
empty = i;
}
if (empty == -1) // no empty navpoint slots
return false;
// Create the NavPoint struct
NavPoint tnav;
strncpy(tnav.NavName, Nav, 32);
tnav.flags = NP_WAYPOINT | flags;
Assert(!(tnav.flags & NP_SHIP));
for (i = 0; i < Num_waypoint_lists; i++)
{
if (!stricmp(WP_Path, Waypoint_lists[i].name))
{
tnav.target_obj = (void *)&Waypoint_lists[i];
}
}
tnav.waypoint_num = node;
// copy it into it's location
Navs[empty] = tnav;
return true;
}
// ********************************************************************************************
//Change Flags
bool Nav_Alt_Flags(char *Nav, int flags)
{
flags &= ~NP_VALIDTYPE; //clear the NP_SHIP and NP_WAYPOINT bits, make sure they haven't been set
int nav = FindNav(Nav);
if (nav != -1)
{
Navs[nav].flags &= NP_VALIDTYPE; // Clear all bits BUT NP_SHIP or NO_WAYPOINT
Navs[nav].flags |= flags; // merge
}
return (nav != -1);
}
//Get Flags
int Nav_Get_Flags(char *Nav)
{
int flags = 0;
int nav = FindNav(Nav);
if (nav != -1)
flags = Navs[nav].flags;
return flags;
}
// ********************************************************************************************
// Sexp Accessors
//Generic
bool Nav_Set_Flag(char *Nav, int flag)
{
Assert(!(flag & NP_VALIDTYPE));
int nav = FindNav(Nav);
if (nav != -1)
{
Navs[nav].flags |= flag;
return true;
}
return false;
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_UnSet_Flag(char *Nav, int flag)
{
Assert(!(flag & NP_VALIDTYPE));
int nav = FindNav(Nav);
if (nav != -1)
{
Navs[nav].flags &= ~flag;
return true;
}
return false;
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//Named
bool Nav_Set_Hidden(char *Nav)
{
return Nav_Set_Flag(Nav, NP_HIDDEN);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_Set_NoAccess(char *Nav)
{
return Nav_Set_Flag(Nav, NP_NOACCESS);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_Set_Visited(char *Nav)
{
return Nav_Set_Flag(Nav, NP_VISITED);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_UnSet_Hidden(char *Nav)
{
return Nav_UnSet_Flag(Nav, NP_HIDDEN);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_UnSet_NoAccess(char *Nav)
{
return Nav_UnSet_Flag(Nav, NP_NOACCESS);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool Nav_UnSet_Visited(char *Nav)
{
return Nav_UnSet_Flag(Nav, NP_VISITED);
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
unsigned int DistanceTo(char *nav)
{
int n = FindNav(nav);
return DistanceTo(n);
}
unsigned int DistanceTo(int nav)
{
if (nav > MAX_NAVPOINTS && nav < 0)
return 0xFFFFFFFF;
char *name = Navs[nav].GetInteralName();
int distance = sexp_distance2(Player_ship->objnum, name);
delete[] name;
if (distance == SEXP_NAN)
return 0xFFFFFFFF;
return distance;
}
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
bool IsVisited(char *nav)
{
int n = FindNav(nav);
return IsVisited(n);
}
bool IsVisited(int nav)
{
if (nav > MAX_NAVPOINTS && nav < 0)
return 0;
if (Navs[nav].flags & NP_VISITED)
return 1;
return 0;
}
#endif
+147
View File
@@ -0,0 +1,147 @@
// Autopilot.h
// Derek Meek
// 4-30-2004
/*
* $Logfile: /Freespace2/code/Autopilot/Autopilot.h $
* $Revision: 1.6 $
* $Date: 2004-08-11 05:06:18 $
* $Author: Kazan $
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2004/07/27 18:52:10 Kazan
* squished another
*
* Revision 1.4 2004/07/25 19:27:51 Kazan
* only disable afterburning during AIM_WAYPOINTS and AIM_FLY_TO_SHIP while AutoPilotEngaged
*
* Revision 1.3 2004/07/25 00:31:27 Kazan
* i have absolutely nothing to say about that subject
*
* Revision 1.2 2004/07/01 16:38:18 Kazan
* working on autonav
*
* Revision 1.1 2004/05/07 23:50:14 Kazan
* Sorry Guys!
*
*
*
*
*/
#include "PreProcDefines.h"
#if !defined(_AUTOPILOT_H_)
#define _AUTOPILOT_H_
#include "globalincs/pstypes.h"
// milliseconds between updates
#define NPS_TICKRATE 250
#define MAX_NAVPOINTS 8
#define NP_WAYPOINT 0x0001 // Nav Point is bound to the poistion of a single node of a waypoint path
#define NP_SHIP 0x0002 // Nav Point is bound to the poisiton of a certain ship
#define NP_HIDDEN 0x0004 // Nav Point doesn't show on map and isn't selectable
#define NP_NOACCESS 0x0008 // Nav Point isn't selectable
#define NP_VISITED 0x0100 // Whether we've been within 1,000 meters of this waypoint
#define NP_NOSELECT ( NP_HIDDEN | NP_NOACCESS )
#define NP_VALIDTYPE ( NP_WAYPOINT | NP_SHIP )
struct NavPoint
{
char NavName[32];
int flags;
void *target_obj;
int waypoint_num; //only used when flags & NP_WAYPOINT
vector GetPosition();
char* GetInteralName();
};
extern bool AutoPilotEngaged;
extern int CurrentNav;
extern NavPoint Navs[MAX_NAVPOINTS];
// Cycles through the NavPoint List
bool Sel_NextNav();
// Tell us is autopilot is allow
// This needs:
// * Nav point selected
// * No enemies within 5,000 meters
// * Destination > 1,000 meters away
bool CanAutopilot();
// Engages autopilot
// This does:
// * Control switched from player to AI
// * Time compression to 32x
// * Tell AI to fly to targetted Nav Point (for all nav-status wings/ships)
// * Sets max waypoint speed to the best-speed of the slowest ship tagged
void StartAutopilot();
// Checks if autopilot should automatically die
// Returns true if:
// * Targetted waypoint < 1,000 meters away
// * Enemy < 5,000 meters
bool Autopilot_AutoDiable();
// Disengages autopilot
// this does:
// * Time compression to 1x
// * Delete AI nav goal
// * Control switched from AI to player
void EndAutoPilot();
// Checks for changes every NPS_TICKRATE milliseconds
// Checks:
// * if we've gotten close enough to a nav point for it to be counted as "Visited"
// * If we're current AutoNavigating it checks if we need to autodisengage
void NavSystem_Do();
// Inits the Nav System
void NavSystem_Init();
// Finds a Nav point by name
int FindNav(char *Nav);
// Set A Nav point to "ZERO"
void ZeroNav(int i);
// Removes a Nav
bool DelNavPoint(char *Nav);
bool DelNavPoint(int nav);
// adds a Nav
bool AddNav_Ship(char *Nav, char *TargetName, int flags);
bool AddNav_Waypoint(char *Nav, char *WP_Path, int node, int flags);
//Change Flags
bool Nav_Alt_Flags(char *Nav, int flags);
// Sexp Accessors
bool Nav_Set_Flag(char *Nav, int flag);
bool Nav_UnSet_Flag(char *Nav, int flag);
bool Nav_Set_Hidden(char *Nav);
bool Nav_Set_NoAccess(char *Nav);
bool Nav_Set_Visited(char *Nav);
bool Nav_UnSet_Hidden(char *Nav);
bool Nav_UnSet_NoAccess(char *Nav);
bool Nav_UnSet_Visited(char *Nav);
// Useful functions
unsigned int DistanceTo(char *nav);
unsigned int DistanceTo(int nav);
bool IsVisited(char *nav);
bool IsVisited(int nav);
#endif
+131
View File
@@ -0,0 +1,131 @@
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/bmpman/bm_internal.h $
* $Revision: 2.1 $
* $Date: 2004-11-23 00:10:06 $
* $Author: taylor $
*
* bmpman info that's internal to bmpman related files only
*
* $Log: not supported by cvs2svn $
*
* $NoKeywords: $
*/
#ifndef __BM_INTERNAL_H__
#define __BM_INTERNAL_H__
// extra check to make sure this stuff doesn't end up in normal files
// don't use any of this unless BMPMAN_INTERNAL is defined
#ifdef BMPMAN_INTERNAL
#include "globalincs/pstypes.h"
#include "bmpman/bmpman.h"
// keep this defined to use per-ship nondarkening pixels
#define BMPMAN_SPECIAL_NONDARK
#define BM_TYPE_NONE 0
#define BM_TYPE_PCX 1
#define BM_TYPE_USER 2
#define BM_TYPE_ANI 3 // in-house ANI format
#define BM_TYPE_EFF 4 // specifies any type of animated image, the EFF itself is just text
#define BM_TYPE_32_BIT_FORMATS 5 // everything after this could/should be 24/32-bit
#define BM_TYPE_TGA 6 // 16 or 32 bit targa
#define BM_TYPE_DDS 7 // generic identifier for DDS
#define BM_TYPE_DXT1 8 // 24 bit with switchable alpha (compressed)
#define BM_TYPE_DXT3 9 // 32 bit with 4 bit alpha (compressed)
#define BM_TYPE_DXT5 10 // 32 bit with 8 bit alpha (compressed)
#define BM_TYPE_JPG 11 // 32 bit jpeg
/// Moved from cpp file ///////////////////
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
typedef struct bm_extra_info {
struct {
// Stuff needed for animations
int first_frame; // used for animations -- points to index of first frame
ubyte num_frames; // used for animation -- number of frames in the animation
ubyte fps; // used for animation -- frames per second
} ani;
struct {
// Stuff needed for user bitmaps
void *data; // For user bitmaps, this is where the data comes from
ubyte bpp; // For user bitmaps, this is what format the data is
ubyte flags; // Flags passed to bm_create
} user;
struct {
// Stuff for static animations
ubyte type; // type for individual images
char filename[MAX_FILENAME_LEN]; // filename for individual images
} eff;
} bm_extra_info;
typedef struct bitmap_entry {
// identification
char filename[MAX_FILENAME_LEN]; // filename for this bitmap
uint signature; // a unique signature identifying the data
uint palette_checksum; // checksum used to be sure bitmap is in current palette
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
int last_used; // When this bitmap was last used
ubyte type; // PCX, USER, ANI, etc
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
int dir_type; // which directory this was loaded from (to skip other locations with same name)
// compressed bitmap stuff (.dds) - RT please take a look at this and tell me if we really need it
int mem_taken; // How much memory does this bitmap use? - UnknownPlayer
int num_mipmaps; // number of mipmap levels, we need to read all of them
// Stuff to keep track of usage
ubyte preloaded; // If set, then this was loaded from the lst file
int preload_count; // how many times this gets used in game, for unlocking
ubyte used_flags; // What flags it was accessed thru
// Bitmap info
bitmap bm;
// Data for animations and user bitmaps
bm_extra_info info;
#ifdef BMPMAN_NDEBUG
// bookeeping
ubyte used_last_frame; // If set, then it was used last frame
ubyte used_this_frame; // If set, then it was used this frame
int data_size; // How much data this bitmap uses
int used_count; // How many times it was accessed
#endif
} bitmap_entry;
extern bitmap_entry bm_bitmaps[MAX_BITMAPS];
// image specific lock functions
void bm_lock_ani( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_dds( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_jpg( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_pcx( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_tga( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
void bm_lock_user( int handle, int bitmapnum, bitmap_entry *be, bitmap *bmp, ubyte bpp, ubyte flags );
#endif // BMPMAN_INTERNAL
#endif // __BM_INTERNAL_H__
File diff suppressed because it is too large. Load diff
+58 -87
View File
@@ -10,13 +10,28 @@
/*
* $Logfile: /Freespace2/code/Bmpman/BmpMan.h $
*
* $Revision: 2.13 $
* $Date: 2004-05-06 22:35:26 $
* $Revision: 2.18 $
* $Date: 2004-11-23 00:10:06 $
* $Author: taylor $
*
* Prototypes for Bitmap Manager functions
*
* $Log: not supported by cvs2svn $
* Revision 2.17 2004/11/21 15:59:45 Kazan
* conflict res
*
* Revision 2.16 2004/10/31 21:26:27 taylor
* bmpman merge, EFF animation support, better page in stuff, dozen or so smaller fixes and cleanup
*
* Revision 2.15 2004/10/06 22:02:54 Kazan
* interface corruption fix - thanks taylor (MAX_BITMAPS upped to 7000)
*
* Revision 2.14 2004/08/11 05:06:18 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.13 2004/05/06 22:35:26 taylor
* DDS mipmap reading, remove unneeded bm_unlock() during page in
*
* Revision 2.12 2004/04/01 15:31:20 taylor
* don't use interface anis as ship textures
*
@@ -280,6 +295,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _BMPMAN_H
#define _BMPMAN_H
@@ -290,85 +306,34 @@
#define BMPMAN_NDEBUG
#endif
#define MAX_BITMAPS 3500 // How many bitmaps the game can handle
// this is causing problems - let's UP IT -- Kazan
// bumped from 3500 to 4500 2004/09/21 - taylor
//#define MAX_BITMAPS 3500 // How many bitmaps the game can handle
#define MAX_BITMAPS 4500 // How many bitmaps the game can handle
// 16 bit pixel formats
#define BM_PIXEL_FORMAT_ARGB 0 // for glide - can assume certain things, like 1555 LFB writes, whee!
#define BM_PIXEL_FORMAT_D3D 1 // d3d - card dependant. booo!
#define BM_PIXEL_FORMAT_ARGB_D3D 2 // this card has nice 1555 textures like Glide - ahhhhh!
enum
{
BM_TYPE_NONE,
BM_TYPE_PCX, // 16 bit PCX
BM_TYPE_USER, // Data created at run time
BM_TYPE_ANI, // In-house ANI format
// Only list 32 bit formats after this flag please
BM_TYPE_32_BIT_FORMATS,
BM_TYPE_TGA,
BM_TYPE_JPG,
BM_TYPE_DDS,
};
/// Moved from cpp file ///////////////////
// Consider these 'protected' structures and functions that should only be used by special bitmap functions
extern int bm_inited;
typedef union bm_extra_info {
struct {
// Stuff needed for animations
int first_frame; // used for animations -- points to index of first frame
ubyte num_frames; // used for animation -- number of frames in the animation
ubyte fps; // used for animation -- frames per second
} ani;
struct {
// Stuff needed for user bitmaps
void *data; // For user bitmaps, this is where the data comes from
ubyte bpp; // For user bitmaps, this is what format the data is
ubyte flags; // Flags passed to bm_create
} user;
} bm_extra_info;
extern int Bm_paging;
typedef struct bitmap_entry {
// identification
char filename[MAX_FILENAME_LEN]; // filename for this bitmap
void bm_init();
uint signature; // a unique signature identifying the data
uint palette_checksum; // checksum used to be sure bitmap is in current palette
int handle; // Handle = id*MAX_BITMAPS + bitmapnum
int last_used; // When this bitmap was last used
void bm_close();
ubyte type; // PCX, USER, ANI, etc
signed char ref_count; // Number of locks on bitmap. Can't unload unless ref_count is 0.
int bm_get_cache_slot( int bitmap_id, int separate_ani_frames );
// compressed bitmap stuff (.dds) - RT please take a look at this and tell me if we really need it
int mem_taken; // How much memory does this bitmap use? - UnknownPlayer
int num_mipmaps; // number of mipmap levels, we need to read all of them
int bm_get_next_handle();
// Stuff to keep track of usage
ubyte preloaded; // If set, then this was loaded from the lst file
ubyte used_flags; // What flags it was accessed thru
void *bm_malloc(int n, int size);
// Bitmap info
bitmap bm;
// Data for animations and user bitmaps
bm_extra_info info;
#ifdef BMPMAN_NDEBUG
// bookeeping
ubyte used_last_frame; // If set, then it was used last frame
ubyte used_this_frame; // If set, then it was used this frame
int data_size; // How much data this bitmap uses
int used_count; // How many times it was accessed
#endif
} bitmap_entry;
void bm_gfx_init();
void bm_gfx_close();
int bm_gfx_get_cache_slot( int bitmap_id, int separate_ani_frames );
int bm_gfx_get_next_handle();
void bm_update_memory_used(int n, int size);
// 16 bit pixel formats
extern int Bm_pixel_format;
@@ -382,12 +347,12 @@ extern int bm_texture_ram;
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number.
int bm_gfx_load(char * filename);
int bm_load(char * filename);
// special load function. basically allows you to load a bitmap which already exists (by filename).
// this is useful because in some cases we need to have a bitmap which is locked in screen format
// _and_ texture format, such as pilot pics and squad logos
int bm_gfx_load_duplicate(char *filename);
int bm_load_duplicate(char *filename);
// Creates a bitmap that exists in RAM somewhere, instead
// of coming from a disk file. You pass in a pointer to a
@@ -397,29 +362,29 @@ int bm_gfx_load_duplicate(char *filename);
// On success, it returns the bitmap number. You cannot
// free that RAM until bm_release is called on that bitmap.
// See example at bottom of this file
int bm_gfx_create( int bpp, int w, int h, void * data, int flags = 0);
int bm_create( int bpp, int w, int h, void * data, int flags = 0);
// Frees up a bitmap's data, but bitmap number 'n' can
// still be used, it will just have to be paged in next
// time it is locked.
int bm_gfx_unload( int n );
int bm_unload( int n );
// Frees up a bitmap's data, and it's slot, so bitmap
// number 'n' cannot be used anymore, and bm_load or
// bm_create might reuse the slot.
void bm_gfx_release(int n);
void bm_release(int n);
// This loads a bitmap sequence so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number of the first frame and nframes is set.
extern int bm_gfx_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
extern int bm_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0, int dir_type = CF_TYPE_ANY );
// This locks down a bitmap and returns a pointer to a bitmap
// that can be accessed until you call bm_unlock. Only lock
// a bitmap when you need it! This will convert it into the
// appropriate format also.
extern bitmap * bm_gfx_lock( int bitmapnum, ubyte bpp, ubyte flags );
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags );
// The signature is a field that gets filled in with
// a unique signature for each bitmap. The signature for each bitmap
@@ -427,10 +392,10 @@ extern bitmap * bm_gfx_lock( int bitmapnum, ubyte bpp, ubyte flags );
extern uint bm_get_signature( int bitmapnum);
// Unlocks a bitmap
extern void bm_gfx_unlock( int bitmapnum );
extern void bm_unlock( int bitmapnum );
// Gets info. w,h,or flags,nframes or fps can be NULL if you don't care.
extern void bm_gfx_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL, bitmap_section_info **sections = NULL );
extern void bm_get_info( int bitmapnum, int *w=NULL, int * h=NULL, ubyte * flags=NULL, int *nframes=NULL, int *fps=NULL, bitmap_section_info **sections = NULL );
// get filename
extern void bm_get_filename(int bitmapnum, char *filename);
@@ -440,10 +405,10 @@ extern void bm_update();
// call to load all data for all bitmaps that have been requested to be loaded
extern void bm_gfx_load_all();
extern void bm_gfx_unload_all();
extern void bm_unload_all();
// call to get the palette for a bitmap
void bm_gfx_get_palette(int n, ubyte *pal, char *name);
void bm_get_palette(int n, ubyte *pal, char *name);
// Hacked function to get a pixel from a bitmap.
// Only works good in 8bpp mode.
@@ -452,7 +417,7 @@ void bm_gfx_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *
// Returns number of bytes of bitmaps locked this frame
// ntotal = number of bytes of bitmaps locked this frame
// nnew = number of bytes of bitmaps locked this frame that weren't locked last frame
void bm_gfx_get_frame_usage(int *ntotal, int *nnew);
void bm_get_frame_usage(int *ntotal, int *nnew);
/*
* Example on using bm_create
@@ -499,28 +464,31 @@ void bm_gfx_get_frame_usage(int *ntotal, int *nnew);
// Paging stuff
//============================================================================
void bm_gfx_page_in_start();
void bm_gfx_page_in_stop();
void bm_page_in_start();
void bm_page_in_stop();
// Paging code in a library should call these functions
// in its page in function.
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_gfx_page_in_texture( int bitmapnum, int num_frames=1 );
void bm_page_in_texture( int bitmapnum, int num_frames=1 );
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_gfx_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
void bm_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
// marks a texture as being a transparent textyre used for this level
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_gfx_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
void bm_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
// Marks an aabitmap as being used for this level
// If num_frames is passed, assume this is an animation
void bm_gfx_page_in_aabitmap( int bitmapnum, int num_frames=1 );
void bm_page_in_aabitmap( int bitmapnum, int num_frames=1 );
// unload a texture that was paged in
void bm_page_out( int handle );
//
// Mode: 0 = High memory
@@ -544,21 +512,24 @@ void bm_set_components_argb_d3d_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *
void bm_set_components_argb_d3d_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
// get the rgba components of a pixel, any of the parameters can be NULL
void bm_gfx_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
//============================================================================
// section info stuff
//============================================================================
// given a bitmap and a section, return the size (w, h)
void bm_gfx_get_section_size(int bitmapnum, int sx, int sy, int *w, int *h);
void bm_get_section_size(int bitmapnum, int sx, int sy, int *w, int *h);
extern int GLOWMAP; //this holds a reference to a map that is a fully lit version of it's index -Bobboau
extern int SPECMAP; //this holds a reference to a map that is for specular mapping -Bobboau
extern int ENVMAP; //this holds a reference to a map that is for environment mapping -Bobboau
int bm_is_compressed(int num);
int bm_get_tcache_type(int num);
int bm_get_size(int num);
int bm_get_num_mipmaps(int num);
void bm_print_bitmaps();
#endif
+49 -19
View File
@@ -9,13 +9,41 @@
/*
* $Logfile: /Freespace2/code/CFile/cfile.cpp $
* $Revision: 2.15 $
* $Date: 2004-05-06 22:12:14 $
* $Author: taylor $
* $Revision: 2.24 $
* $Date: 2004-12-25 00:22:54 $
* $Author: wmcoolmon $
*
* Utilities for operating on files
*
* $Log: not supported by cvs2svn $
* Revision 2.23 2004/10/31 21:29:00 taylor
* EFF animation support
*
* Revision 2.22 2004/10/09 18:08:33 taylor
* almost forgot this for the IBX stuff
*
* Revision 2.21 2004/07/26 20:47:25 Kazan
* remove MCD complete
*
* Revision 2.20 2004/07/17 09:03:29 taylor
* make sure avi and mpg movies get added to file cache
*
* Revision 2.19 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.18 2004/06/22 23:14:09 wmcoolmon
* Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
* OGG code has been commented out, so you don't need the SDK yet.
*
* Revision 2.17 2004/05/26 02:29:44 wmcoolmon
* Scratch that - .tbm is a better extension
*
* Revision 2.16 2004/05/26 02:26:14 wmcoolmon
* Added table chunk extension
*
* Revision 2.15 2004/05/06 22:12:14 taylor
* make sure JPG and DDS files are added to the file cache for maps and effects
*
* Revision 2.14 2004/03/05 09:01:54 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -260,6 +288,8 @@
#include "cfile/cfilesystem.h"
#include "cfile/cfilearchive.h"
char Cfile_root_dir[CFILE_ROOT_DIRECTORY_LEN] = "";
// During cfile_init, verify that Pathtypes[n].index == n for each item
@@ -272,32 +302,32 @@ cf_pathtype Pathtypes[CF_MAX_PATH_TYPES] = {
// What type this is Path Extensions Parent type
{ CF_TYPE_INVALID, NULL, NULL, CF_TYPE_INVALID },
// Root must be index 1!!
{ CF_TYPE_ROOT, "", ".mve", CF_TYPE_ROOT },
{ CF_TYPE_ROOT, "", ".mve .avi .mpg", CF_TYPE_ROOT },
{ CF_TYPE_DATA, "data", ".cfg .log .txt", CF_TYPE_ROOT },
{ CF_TYPE_MAPS, "data" DIR_SEPARATOR_STR "maps", ".pcx .ani .tga .jpg .dds", CF_TYPE_DATA },
{ CF_TYPE_MAPS, "data" DIR_SEPARATOR_STR "maps", ".pcx .ani .eff .tga .jpg .dds", CF_TYPE_DATA },
{ CF_TYPE_TEXT, "data" DIR_SEPARATOR_STR "text", ".txt .net", CF_TYPE_DATA },
{ CF_TYPE_MISSIONS, "data" DIR_SEPARATOR_STR "missions", ".fs2 .fc2 .ntl .ssv", CF_TYPE_DATA },
{ CF_TYPE_MODELS, "data" DIR_SEPARATOR_STR "models", ".pof", CF_TYPE_DATA },
{ CF_TYPE_TABLES, "data" DIR_SEPARATOR_STR "tables", ".tbl", CF_TYPE_DATA },
{ CF_TYPE_SOUNDS, "data" DIR_SEPARATOR_STR "sounds", ".wav", CF_TYPE_DATA },
{ CF_TYPE_SOUNDS_8B22K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "8b22k", ".wav", CF_TYPE_SOUNDS },
{ CF_TYPE_SOUNDS_16B11K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "16b11k", ".wav", CF_TYPE_SOUNDS },
{ CF_TYPE_TABLES, "data" DIR_SEPARATOR_STR "tables", ".tbl .tbm", CF_TYPE_DATA },
{ CF_TYPE_SOUNDS, "data" DIR_SEPARATOR_STR "sounds", ".wav .ogg", CF_TYPE_DATA },
{ CF_TYPE_SOUNDS_8B22K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "8b22k", ".wav .ogg", CF_TYPE_SOUNDS },
{ CF_TYPE_SOUNDS_16B11K, "data" DIR_SEPARATOR_STR "sounds" DIR_SEPARATOR_STR "16b11k", ".wav .ogg", CF_TYPE_SOUNDS },
{ CF_TYPE_VOICE, "data" DIR_SEPARATOR_STR "voice", "", CF_TYPE_DATA },
{ CF_TYPE_VOICE_BRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "briefing", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_CMD_BRIEF, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "command_briefings", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_DEBRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "debriefing", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_PERSONAS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "personas", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_SPECIAL, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "special", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_TRAINING, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "training", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_MUSIC, "data" DIR_SEPARATOR_STR "music", ".wav", CF_TYPE_VOICE },
{ CF_TYPE_MOVIES, "data" DIR_SEPARATOR_STR "movies", ".mve .msb", CF_TYPE_DATA },
{ CF_TYPE_VOICE_BRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "briefing", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_CMD_BRIEF, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "command_briefings", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_DEBRIEFINGS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "debriefing", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_PERSONAS, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "personas", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_SPECIAL, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "special", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_VOICE_TRAINING, "data" DIR_SEPARATOR_STR "voice" DIR_SEPARATOR_STR "training", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_MUSIC, "data" DIR_SEPARATOR_STR "music", ".wav .ogg", CF_TYPE_VOICE },
{ CF_TYPE_MOVIES, "data" DIR_SEPARATOR_STR "movies", ".mve .msb .avi .mpg", CF_TYPE_DATA },
{ CF_TYPE_INTERFACE, "data" DIR_SEPARATOR_STR "interface", ".pcx .ani .tga", CF_TYPE_DATA },
{ CF_TYPE_FONT, "data" DIR_SEPARATOR_STR "fonts", ".vf", CF_TYPE_DATA },
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .pcx .neb .tga .jpg .dds", CF_TYPE_DATA },
{ CF_TYPE_EFFECTS, "data" DIR_SEPARATOR_STR "effects", ".ani .eff .pcx .neb .tga .jpg .dds", CF_TYPE_DATA },
{ CF_TYPE_HUD, "data" DIR_SEPARATOR_STR "hud", ".ani .pcx .tga", CF_TYPE_DATA },
{ CF_TYPE_PLAYER_MAIN, "data" DIR_SEPARATOR_STR "players", "", CF_TYPE_DATA },
{ CF_TYPE_PLAYER_IMAGES_MAIN, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "images", ".pcx", CF_TYPE_PLAYER_MAIN },
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp", CF_TYPE_DATA }, //clr=cached color
{ CF_TYPE_CACHE, "data" DIR_SEPARATOR_STR "cache", ".clr .tmp .ibx", CF_TYPE_DATA }, //clr=cached color
{ CF_TYPE_PLAYERS, "data" DIR_SEPARATOR_STR "players", ".hcf", CF_TYPE_DATA },
{ CF_TYPE_SINGLE_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "single", ".plr .csg .css", CF_TYPE_PLAYERS },
{ CF_TYPE_MULTI_PLAYERS, "data" DIR_SEPARATOR_STR "players" DIR_SEPARATOR_STR "multi", ".plr", CF_TYPE_DATA },
+11 -3
View File
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/CFile/cfile.h $
* $Revision: 2.7 $
* $Date: 2003-08-20 08:12:08 $
* $Author: wmcoolmon $
* $Revision: 2.9 $
* $Date: 2004-08-11 05:06:19 $
* $Author: Kazan $
*
* <insert description of file here>
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/05/26 21:02:26 wmcoolmon
* Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages
*
* Revision 2.7 2003/08/20 08:12:08 wmcoolmon
* Made cfile_delete return 0 on failure, 1 on success
*
* Revision 2.6 2002/11/10 16:29:53 DTP
* -DTP reworked mod support,
*
@@ -356,6 +362,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __CFILE_H__
#define __CFILE_H__
@@ -444,6 +451,7 @@ typedef struct {
#define CF_SORT_NONE 0
#define CF_SORT_NAME 1
#define CF_SORT_TIME 2
#define CF_SORT_REVERSE 3
#define cfread_fix(file) (fix)cfread_int(file)
#define cfwrite_fix(i,file) cfwrite_int(i,file)
+12 -3
View File
@@ -9,14 +9,21 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileArchive.cpp $
* $Revision: 2.4 $
* $Date: 2004-03-05 09:01:54 $
* $Author: Goober5000 $
* $Revision: 2.6 $
* $Date: 2004-07-26 20:47:25 $
* $Author: Kazan $
*
* Low-level code for reading data out of large archive files or normal files. All
* reads/seeks come through here.
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.4 2004/03/05 09:01:54 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.3 2003/03/19 09:05:25 Goober5000
* more housecleaning, this time for debug warnings
* --Goober5000
@@ -103,6 +110,8 @@
#include "cfile/cfile.h"
#include "cfile/cfilearchive.h"
#define CHECK_POSITION
// Called once to setup the low-level reading code.
+7 -3
View File
@@ -9,14 +9,17 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileArchive.h $
* $Revision: 2.1 $
* $Date: 2002-07-07 19:55:58 $
* $Author: penguin $
* $Revision: 2.2 $
* $Date: 2004-08-11 05:06:19 $
* $Author: Kazan $
*
* External def's for CfileArchive.cpp. This should only be used
* internally by cfile stuff.
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2002/07/07 19:55:58 penguin
* Back-port to MSVC
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -48,6 +51,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CFILEARCHIVE_H
#define _CFILEARCHIVE_H
+31 -3
View File
@@ -9,13 +9,22 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileList.cpp $
* $Revision: 2.2 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:25 $
* $Author: Kazan $
*
* Code for doing directory lists and sorts
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/17 09:26:00 taylor
* add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
*
* Revision 2.3 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.2 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.1 2002/07/29 19:37:21 penguin
* added #ifdef _WIN32 around windows-specific system headers
*
@@ -74,6 +83,9 @@
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
// Sorts a list of filenames using the specified sorting method (CF_SORT_*).
// n = number of filenames in list to sort
// list = list of filenames to be sorted
@@ -141,6 +153,22 @@ void cf_sort_filenames( int n, char **list, int sort, file_list_info *info )
incr /= 2;
}
return;
} else if (sort == CF_SORT_REVERSE) {
incr = n / 2;
char buffer[MAX_FILENAME_LEN];
for (i = 0; i < incr; i++) {
t = list[n - 1 - i];
if ( stricmp(list[i], t) > 0 ) {
strcpy(buffer, list[i]);
strcpy(list[i], t);
strcpy(t, buffer);
}
}
return;
}
+303 -127
View File
@@ -9,9 +9,9 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileSystem.cpp $
* $Revision: 2.17 $
* $Date: 2004-05-03 21:22:19 $
* $Author: Kazan $
* $Revision: 2.24 $
* $Date: 2004-11-21 11:27:31 $
* $Author: taylor $
*
* Functions to keep track of and find files that can exist
* on the harddrive, cd-rom, or in a pack file on either of those.
@@ -20,6 +20,29 @@
* all those locations, inherently enforcing precedence orders.
*
* $Log: not supported by cvs2svn $
* Revision 2.23 2004/10/31 21:28:38 taylor
* support new pilot code, Linux code tree merge, don't use same pilot directory for Inferno builds
*
* Revision 2.22 2004/07/26 20:47:25 Kazan
* remove MCD complete
*
* Revision 2.21 2004/07/17 09:26:00 taylor
* add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
*
* Revision 2.20 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.19 2004/05/26 22:02:36 wmcoolmon
* Fixed cf_matches_spec; small bug was introduced.
*
* Revision 2.18 2004/05/26 21:02:26 wmcoolmon
* Added weapons_expl modular table, updated cfilesystem to work with modular tables, fixed loading order, fixed ship loading error messages
*
* Revision 2.17 2004/05/03 21:22:19 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.16 2004/05/01 21:47:43 Kazan
* bah! stupid me "NULL" not "null" - i hate when i do that
*
@@ -168,9 +191,14 @@
#include <winbase.h> /* needed for memory mapping of file functions */
#endif
#ifdef unix
#ifdef SCP_UNIX
#include <glob.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <fnmatch.h>
#include <sys/stat.h>
#include <unistd.h>
#endif
#include "cmdline/cmdline.h"
@@ -178,9 +206,14 @@
#include "cfile/cfilesystem.h"
#include "localization/localize.h"
#define CF_ROOTTYPE_PATH 0
#define CF_ROOTTYPE_PACK 1
// for a defined and specifically set location to get/send pilot/campaign files
char *Pilot_file_path = NULL;
// Created by:
// specifying hard drive tree
// searching for pack files on hard drive // Found by searching all known paths
@@ -208,7 +241,8 @@ typedef struct cf_root_block {
static int Num_roots = 0;
static cf_root_block *Root_blocks[CF_MAX_ROOT_BLOCKS];
static int Num_path_roots = 0;
// Created by searching all roots in order. This means Files is then sorted by precedence.
typedef struct cf_file {
@@ -299,10 +333,11 @@ int cf_get_packfile_count(cf_root *root)
for (i=CF_TYPE_ROOT; i<CF_MAX_PATH_TYPES; i++ ) {
strcpy( filespec, root->path );
if(strlen(Pathtypes[i].path)) {
strcat( filespec, Pathtypes[i].path );
if(strlen(Pathtypes[i].path)) {
strcat( filespec, Pathtypes[i].path );
if ( filespec[strlen(filespec)-1] != DIR_SEPARATOR_CHAR ) {
strcat( filespec, DIR_SEPARATOR_STR );
// }
}
}
#if defined _WIN32
@@ -323,7 +358,7 @@ int cf_get_packfile_count(cf_root *root)
_findclose( find_handle );
}
#elif defined unix
#elif defined SCP_UNIX
strcat( filespec, "*.[vV][pP]" );
glob_t globinfo;
@@ -391,7 +426,9 @@ void cf_build_pack_list( cf_root *root )
if(strlen(Pathtypes[i].path)) {
strcat( filespec, Pathtypes[i].path );
strcat( filespec, DIR_SEPARATOR_STR );
if ( filespec[strlen(filespec)-1] != DIR_SEPARATOR_CHAR ) {
strcat( filespec, DIR_SEPARATOR_STR );
}
}
@@ -431,7 +468,7 @@ void cf_build_pack_list( cf_root *root )
_findclose( find_handle );
}
#elif defined unix
#elif defined SCP_UNIX
strcat( filespec, "*.[vV][pP]" );
glob_t globinfo;
memset(&globinfo, 0, sizeof(globinfo));
@@ -485,10 +522,57 @@ void cf_build_pack_list( cf_root *root )
void cf_build_root_list(char *cdrom_dir)
{
Num_roots = 0;
Num_path_roots = 0;
cf_root *root;
char str_temp[128], *cur_pos;
#ifdef SCP_UNIX
// =========================================================================
// now look for mods under the users HOME directory to use before system ones
if (Cmdline_mod) {
for (cur_pos=Cmdline_mod; strlen(cur_pos) != 0; cur_pos+= (strlen(cur_pos)+1))
{
memset(str_temp, 0, 128);
strcpy(str_temp, cur_pos);
strcat(str_temp, DIR_SEPARATOR_STR);
root = cf_create_root();
strcpy( root->path, Cfile_user_dir );
// do we already have a slash? as in the case of a root directory install
if(strlen(root->path) && (root->path[strlen(root->path)-1] != DIR_SEPARATOR_CHAR)){
strcat(root->path, DIR_SEPARATOR_STR); // put trailing backslash on for easier path construction
}
strcat(root->path, str_temp);
root->roottype = CF_ROOTTYPE_PATH;
cf_build_pack_list(root);
}
}
// =========================================================================
// =========================================================================
// set users HOME directory as default for loading and saving files
root = cf_create_root();
strcpy( root->path, Cfile_user_dir );
// do we already have a slash? as in the case of a root directory install
if(strlen(root->path) && (root->path[strlen(root->path)-1] != DIR_SEPARATOR_CHAR)){
strcat(root->path, DIR_SEPARATOR_STR); // put trailing backslash on for easier path construction
}
root->roottype = CF_ROOTTYPE_PATH;
// set the default player location to here
if ( Pilot_file_path == NULL )
Pilot_file_path = root->path;
// Next, check any VP files under the current directory.
cf_build_pack_list(root);
// =========================================================================
#endif
if(Cmdline_mod) {
// stackable Mod support -- Kazan
//This for statement is a work of art :D
@@ -501,8 +585,6 @@ void cf_build_root_list(char *cdrom_dir)
memset(str_temp, 0, 128);
strcpy(str_temp, cur_pos);
strcat(str_temp, DIR_SEPARATOR_STR);
root = cf_create_root();
@@ -535,6 +617,10 @@ void cf_build_root_list(char *cdrom_dir)
root->roottype = CF_ROOTTYPE_PATH;
// set the default path for pilot files
if ( Pilot_file_path == NULL )
Pilot_file_path = root->path;
//======================================================
// Next, check any VP files under the current directory.
cf_build_pack_list(root);
@@ -583,11 +669,18 @@ void cf_search_root_path(int root_index)
for (i=CF_TYPE_ROOT; i<CF_MAX_PATH_TYPES; i++ ) {
// we don't want to add player files to the cache - taylor
if ( (i == CF_TYPE_SINGLE_PLAYERS) || (i == CF_TYPE_MULTI_PLAYERS) ) {
continue;
}
strcpy( search_path, root->path );
if(strlen(Pathtypes[i].path)) {
strcat( search_path, Pathtypes[i].path );
strcat( search_path, DIR_SEPARATOR_STR );
if ( search_path[strlen(search_path)-1] != DIR_SEPARATOR_CHAR ) {
strcat( search_path, DIR_SEPARATOR_STR );
}
}
#if defined _WIN32
@@ -626,37 +719,51 @@ void cf_search_root_path(int root_index)
_findclose( find_handle );
}
#elif defined unix
strcat( search_path, "*" );
glob_t globinfo;
memset(&globinfo, 0, sizeof(globinfo));
int status = glob(search_path, 0, NULL, &globinfo);
if (status == 0) {
for (unsigned int j = 0; j < globinfo.gl_pathc; j++) {
// Determine if this is a regular file
struct stat statbuf;
memset(&statbuf, 0, sizeof(statbuf));
stat(globinfo.gl_pathv[j], &statbuf);
if (S_ISREG(statbuf.st_mode)) {
char *ext = strchr(globinfo.gl_pathv[j], '.' );
#elif defined SCP_UNIX
DIR *dirp;
struct dirent *dir;
dirp = opendir (search_path);
if ( dirp ) {
while ((dir = readdir (dirp)) != NULL)
{
if (!fnmatch ("*.*", dir->d_name, 0))
{
char fn[MAX_PATH];
snprintf(fn, MAX_PATH-1, "%s%s", search_path, dir->d_name);
fn[MAX_PATH-1] = 0;
struct stat buf;
if (stat(fn, &buf) == -1) {
continue;
}
if (!S_ISREG(buf.st_mode)) {
continue;
}
char *ext = strchr( dir->d_name, '.' );
if ( ext ) {
if ( is_ext_in_list( Pathtypes[i].extensions, ext ) ) {
// Found a file!!!!
cf_file *file = cf_create_file();
strcpy( file->name_ext, globinfo.gl_pathv[j] );
strcpy( file->name_ext, dir->d_name );
file->root_index = root_index;
file->pathtype_index = i;
file->write_time = statbuf.st_mtime;
file->size = statbuf.st_size;
file->write_time = buf.st_mtime;
file->size = buf.st_size;
file->pack_offset = 0; // Mark as a non-packed file
//mprintf(( "Found file '%s'\n", file->name_ext ));
}
}
}
}
globfree(&globinfo);
closedir(dirp);
}
#endif
}
@@ -674,7 +781,7 @@ typedef struct VP_FILE {
int offset;
int size;
char filename[32];
time_t write_time;
_fs_time_t write_time;
} VP_FILE;
void cf_search_root_pack(int root_index)
@@ -695,6 +802,10 @@ void cf_search_root_pack(int root_index)
Assert( sizeof(VP_header) == 16 );
fread(&VP_header, 1, sizeof(VP_header), fp);
VP_header.version = INTEL_INT( VP_header.version );
VP_header.index_offset = INTEL_INT( VP_header.index_offset );
VP_header.num_files = INTEL_INT( VP_header.num_files );
// Read index info
fseek(fp, VP_header.index_offset, SEEK_SET);
@@ -709,6 +820,10 @@ void cf_search_root_pack(int root_index)
fread( &find, sizeof(VP_FILE), 1, fp );
find.offset = INTEL_INT( find.offset );
find.size = INTEL_INT( find.size );
find.write_time = INTEL_INT( find.write_time );
if ( find.size == 0 ) {
if ( !stricmp( find.filename, ".." )) {
int l = strlen(search_path);
@@ -718,8 +833,8 @@ void cf_search_root_pack(int root_index)
}
*p = 0;
} else {
if ( strlen(search_path) ) {
strcat( search_path, DIR_SEPARATOR_STR );
if ( strlen(search_path) && (search_path[strlen(search_path)-1] != DIR_SEPARATOR_CHAR) ) {
strcat( search_path, DIR_SEPARATOR_STR );
}
strcat( search_path, find.filename );
}
@@ -859,18 +974,14 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
// of the file
// NOTE: full path should also include localization, if so desired
#ifdef SCP_UNIX
if ( strpbrk(filespec, "/") ) { // do we have a full path already?
#else
if ( strpbrk(filespec,"/\\:") ) { // do we have a full path already?
#endif
FILE *fp = fopen(filespec, "rb" );
if (fp) {
if ( size ) {
#if defined _WIN32
*size = filelength(fileno(fp));
#elif defined unix
struct stat statbuf;
fstat(fileno(fp), &statbuf);
*size = statbuf.st_size;
#endif
}
if ( size ) *size = filelength(fileno(fp));
if ( offset ) *offset = 0;
if ( pack_filename ) {
strcpy( pack_filename, filespec );
@@ -911,6 +1022,7 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
case CF_TYPE_MULTI_PLAYERS:
case CF_TYPE_MULTI_CACHE:
case CF_TYPE_MISSIONS:
case CF_TYPE_CACHE:
cfs_slow_search = 1;
break;
@@ -958,7 +1070,7 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
return 1;
}
}
#elif defined unix
#elif defined SCP_UNIX
FILE *fp = fopen(longname, "rb" );
if (fp) {
if ( size ) {
@@ -1004,7 +1116,9 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
strcpy( pack_filename, r->path );
if ( f->pack_offset < 1 ) {
strcat( pack_filename, Pathtypes[f->pathtype_index].path );
strcat( pack_filename, DIR_SEPARATOR_STR );
if ( pack_filename[strlen(pack_filename)-1] != DIR_SEPARATOR_CHAR ) {
strcat( pack_filename, DIR_SEPARATOR_STR );
}
strcat( pack_filename, f->name_ext );
}
}
@@ -1026,7 +1140,9 @@ int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, in
if(strlen(Pathtypes[f->pathtype_index].path)){
strcat( pack_filename, Pathtypes[f->pathtype_index].path );
strcat( pack_filename, DIR_SEPARATOR_STR );
if ( pack_filename[strlen(pack_filename)-1] != DIR_SEPARATOR_CHAR ) {
strcat( pack_filename, DIR_SEPARATOR_STR );
}
}
strcat( pack_filename, f->name_ext );
@@ -1046,17 +1162,35 @@ int cf_matches_spec(char *filespec, char *filename)
{
char *src_ext, *dst_ext;
src_ext = strchr(filespec, '.');
if (!src_ext)
return 1;
if (*src_ext == '*')
return 1;
src_ext = strrchr(filespec, '*');
if(!src_ext)
{
src_ext = strchr(filespec, '.');
if (!src_ext)
return 1;
}
else
{
src_ext++;
}
dst_ext = strchr(filename, '.');
if(strlen(filespec) > strlen(filename))
{
return 0;
}
dst_ext = filename + strlen(filename) - ((filespec + strlen(filespec)) - src_ext);
if (!dst_ext)
return 1;
return !stricmp(dst_ext, src_ext);
if(src_ext == filespec)
{
return !stricmp(dst_ext, src_ext);
}
else
{
return (!stricmp(dst_ext, src_ext) && !strnicmp(dst_ext, src_ext, src_ext - filespec));
}
}
int (*Get_file_list_filter)(char *filename) = NULL;
@@ -1089,7 +1223,7 @@ int cf_file_already_in_list( int num_files, char **list, char *filename )
int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort, file_list_info *info )
{
char *ptr;
int i, l, find_handle, num_files = 0, own_flag = 0;
int i, l, num_files = 0, own_flag = 0;
if (max < 1) {
Get_file_list_filter = NULL;
@@ -1106,10 +1240,12 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
char filespec[MAX_PATH_LEN];
#if defined _WIN32
cf_create_default_path_string( filespec, pathtype, filter );
#if defined _WIN32
_finddata_t find;
int find_handle;
find_handle = _findfirst( filespec, &find );
if (find_handle != -1) {
do {
@@ -1140,41 +1276,53 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
_findclose( find_handle );
}
#elif defined unix
char base_filespec[MAX_PATH_LEN];
cf_create_default_path_string( base_filespec, pathtype );
int base_filespec_len = strlen(base_filespec);
glob_t globinfo;
memset(&globinfo, 0, sizeof(globinfo));
int status = glob(filespec, 0, NULL, &globinfo);
if (status == 0) {
for (unsigned int i = 0; i < globinfo.gl_pathc; i++) {
// Determine if this is a regular file
struct stat statbuf;
memset(&statbuf, 0, sizeof(statbuf));
stat(globinfo.gl_pathv[i], &statbuf);
if (S_ISREG(statbuf.st_mode)) {
if ( !Get_file_list_filter || (*Get_file_list_filter)(globinfo.gl_pathv[i]) ) {
char *found_file = globinfo.gl_pathv[i];
Assert(strncmp(found_file, base_filespec, base_filespec_len) == 0);
found_file += base_filespec_len;
ptr = strrchr(found_file, '.');
if (ptr)
l = ptr - found_file;
else
l = strlen(found_file);
list[num_files] = (char *)malloc(l + 1);
strncpy(list[num_files], found_file, l);
list[num_files][l] = 0;
if (info)
info[num_files].write_time = statbuf.st_mtime;
num_files++;
}
#elif defined SCP_UNIX
cf_create_default_path_string( filespec, pathtype, NULL );
DIR *dirp;
struct dirent *dir;
dirp = opendir (filespec);
if ( dirp ) {
while ((dir = readdir (dirp)) != NULL)
{
if (num_files >= max)
break;
if (fnmatch(filter, dir->d_name, 0) != 0)
continue;
char fn[MAX_PATH];
snprintf(fn, MAX_PATH-1, "%s/%s", filespec, dir->d_name);
fn[MAX_PATH-1] = 0;
struct stat buf;
if (stat(fn, &buf) == -1) {
continue;
}
if (!S_ISREG(buf.st_mode)) {
continue;
}
if ( !Get_file_list_filter || (*Get_file_list_filter)(dir->d_name) ) {
ptr = strrchr(dir->d_name, '.');
if (ptr)
l = ptr - dir->d_name;
else
l = strlen(dir->d_name);
list[num_files] = (char *)malloc(l + 1);
strncpy(list[num_files], dir->d_name, l);
list[num_files][l] = 0;
if (info)
info[num_files].write_time = buf.st_mtime;
num_files++;
}
globfree(&globinfo);
}
closedir(dirp);
}
#endif
@@ -1189,7 +1337,6 @@ int cf_get_file_list( int max, char **list, int pathtype, char *filter, int sort
}
if (num_files >= max)
break;
if ( !cf_matches_spec( filter,f->name_ext)) {
@@ -1287,12 +1434,12 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
char filespec[MAX_PATH_LEN];
// Search the default directories
#if defined _WIN32
cf_create_default_path_string( filespec, pathtype, filter );
mprintf(("cf_get_file_list_preallocated looking for type=%d, filter=\"%s\"\n",
pathtype, filter));
// Search the default directories
#if defined _WIN32
int find_handle;
_finddata_t find;
@@ -1325,41 +1472,51 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
_findclose( find_handle );
}
#elif defined unix
char base_filespec[MAX_PATH_LEN];
cf_create_default_path_string( base_filespec, pathtype );
int base_filespec_len = strlen(base_filespec);
glob_t globinfo;
memset(&globinfo, 0, sizeof(globinfo));
int status = glob(filespec, 0, NULL, &globinfo);
if (status == 0) {
for (unsigned int i = 0; i < globinfo.gl_pathc; i++) {
// Determine if this is a regular file
struct stat statbuf;
memset(&statbuf, 0, sizeof(statbuf));
stat(globinfo.gl_pathv[i], &statbuf);
if (S_ISREG(statbuf.st_mode)) {
if ( !Get_file_list_filter || (*Get_file_list_filter)(globinfo.gl_pathv[i]) ) {
char *found_file = globinfo.gl_pathv[i];
Assert(strncmp(found_file, base_filespec, base_filespec_len) == 0);
found_file += base_filespec_len;
#elif defined SCP_UNIX
cf_create_default_path_string( filespec, pathtype, NULL );
strncpy(arr[num_files], found_file, MAX_FILENAME_LEN - 1 );
char *ptr = strrchr(arr[num_files], '.');
if ( ptr ) {
*ptr = 0;
}
DIR *dirp;
struct dirent *dir;
if (info) {
info[num_files].write_time = statbuf.st_mtime;
}
num_files++;
dirp = opendir (filespec);
if ( dirp ) {
while ((dir = readdir (dirp)) != NULL)
{
if (num_files >= max)
break;
if (fnmatch(filter, dir->d_name, 0) != 0)
continue;
char fn[MAX_PATH];
snprintf(fn, MAX_PATH-1, "%s/%s", filespec, dir->d_name);
fn[MAX_PATH-1] = 0;
struct stat buf;
if (stat(fn, &buf) == -1) {
continue;
}
if (!S_ISREG(buf.st_mode)) {
continue;
}
if ( !Get_file_list_filter || (*Get_file_list_filter)(dir->d_name) ) {
strncpy(arr[num_files], dir->d_name, MAX_FILENAME_LEN - 1 );
char *ptr = strrchr(arr[num_files], '.');
if ( ptr ) {
*ptr = 0;
}
if (info) {
info[num_files].write_time = buf.st_mtime;
}
num_files++;
}
}
globfree(&globinfo);
closedir(dirp);
}
#endif
@@ -1429,7 +1586,11 @@ int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char *
// Output: path - Fully qualified pathname.
void cf_create_default_path_string( char *path, int pathtype, char *filename, bool localize )
{
if ( filename && strpbrk(filename,"/\\:") ) {
#ifdef SCP_UNIX
if ( filename && strpbrk(filename,"/") ) {
#else
if ( filename && strpbrk(filename,"/\\:") ) {
#endif
// Already has full path
strcpy( path, filename );
@@ -1443,14 +1604,30 @@ void cf_create_default_path_string( char *path, int pathtype, char *filename, bo
Assert(CF_TYPE_SPECIFIED(pathtype));
strcpy(path, root->path);
// force a specific directory to search for player files
if ( (pathtype == CF_TYPE_SINGLE_PLAYERS) || (pathtype == CF_TYPE_MULTI_PLAYERS) ) {
strcpy(path, Pilot_file_path);
} else {
strcpy(path, root->path);
}
strcat(path, Pathtypes[pathtype].path);
// Don't add slash for root directory
if (Pathtypes[pathtype].path[0] != '\0') {
strcat(path, DIR_SEPARATOR_STR);
if ( path[strlen(path)-1] != DIR_SEPARATOR_CHAR ) {
strcat(path, DIR_SEPARATOR_STR);
}
}
#ifdef INF_BUILD
// keep pilot files separated for an Inferno build since they aren't compatible
if ( pathtype == CF_TYPE_SINGLE_PLAYERS ) {
strcat(path, "inferno");
strcat(path, DIR_SEPARATOR_STR);
}
#endif
// add filename
if (filename) {
strcat(path, filename);
@@ -1475,4 +1652,3 @@ void cf_create_default_path_string( char *path, int pathtype, char *filename, bo
}
}
}
+8 -3
View File
@@ -9,9 +9,9 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileSystem.h $
* $Revision: 2.1 $
* $Date: 2004-03-05 09:01:54 $
* $Author: Goober5000 $
* $Revision: 2.2 $
* $Date: 2004-08-11 05:06:19 $
* $Author: Kazan $
*
* Functions to keep track of and find files that can exist
* on the harddrive, cd-rom, or in a pack file on either of those.
@@ -20,6 +20,10 @@
* all those locations, inherently enforcing precedence orders.
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2004/03/05 09:01:54 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -46,6 +50,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CFILESYSTEM_H
#define _CFILESYSTEM_H
+240 -56
View File
@@ -9,11 +9,78 @@
/*
* $Logfile: /Freespace2/code/Cmdline/cmdline.cpp $
* $Revision: 2.70 $
* $Date: 2004-05-01 22:47:23 $
* $Author: randomtiger $
* $Revision: 2.88 $
* $Date: 2004-12-24 19:36:12 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 2.87 2004/12/11 09:37:17 wmcoolmon
* Apparently I never commited -mpnoreturn...
*
* Revision 2.86 2004/12/02 11:20:33 taylor
* text of -no_set_gamma cmdline option shouldn't specify D3D since it works in OGL too
*
* Revision 2.85 2004/11/29 18:04:53 taylor
* little reorg to flags so Experimental won't show up twice
* add/update the wiki links since none of them worked before
* remove all options that require an argument since they won't work
*
* Revision 2.84 2004/11/23 19:29:13 taylor
* fix 2d warp in D3D, add cmdline option for 3d warp
*
* Revision 2.83 2004/09/10 13:51:45 et1
* Command line option for TBP for warp stuff, "-tbpwarpeffects"
*
* Revision 2.82 2004/08/08 02:56:54 phreak
* fixed the -orbradar launcher string
*
* Revision 2.81 2004/08/02 22:40:59 phreak
* added -orbradar to enable orb rendering for the radar
*
* Revision 2.80 2004/08/01 02:31:18 phreak
* -phreak command line changed to -dualscanlines
*
* Revision 2.79 2004/07/29 03:49:44 Kazan
* fs2_open.exe was suffering the same problem as fred2 -- it was just a little less obvious
*
* Revision 2.78 2004/07/26 20:47:25 Kazan
* remove MCD complete
*
* Revision 2.77 2004/07/25 18:46:28 Kazan
* -fred_no_warn has become -no_warn and applies to both fred and fs2
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
*
* Revision 2.76 2004/07/12 16:32:42 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.75 2004/07/05 05:09:15 bobboau
* FVF code, only the data that is needed is sent off to the card,,
* OGL can take advantage of this if they want but it won't break
* anything if they don't. also state block code has been implemented,
* that's totaly internal to D3D no high level code is involved.
*
* Revision 2.74 2004/06/29 06:00:45 wmcoolmon
* Added "-load_only_used", which makes FS2 load only used weapon data
*
* Revision 2.73 2004/06/26 00:28:05 wmcoolmon
* Added "-targetinfo" to toggle info next to targeted object.
*
* Revision 2.72 2004/06/19 22:15:48 wmcoolmon
* Added -nomotion debris command line option; also re-ordered categories.
*
* Revision 2.71 2004/06/06 12:25:19 randomtiger
* Added new compression option -pcx32dds, build posted in RSB forum.
* Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
* Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
*
* Revision 2.70 2004/05/01 22:47:23 randomtiger
* FS2_open will now take flag settings from cmdline_fso.cfg not cmdline.cfg.
* This means retail FS2 will not crash because of fs2_open flags.
* The new version of the launcher (v5) must used to setup flags now.
* Anyone distributing pre 3.6 builds should make this clear and 3.6 should come with Launcher v5.
*
* Revision 2.69 2004/05/01 17:10:18 Kazan
* Multiple -mod - "-mod ModA,ModB,ModC" in order of priority
* Giving you:
@@ -538,6 +605,7 @@
#include "species_defs/species_defs.h"
#include "hud/hudconfig.h"
// variables
class cmdline_parm {
public:
@@ -555,6 +623,12 @@ public:
char *str();
};
float Cmdline_max_subdivide = 0.0f;
int Cmdline_env = 0;
int Cmdline_decals = 0;
int Cmdline_alpha_env = 0;
enum
{
// DO NOT CHANGE ANYTHING ABOUT THESE FIRST TWO OR WILL MESS UP THE LAUNCHER
@@ -603,55 +677,67 @@ typedef struct
// Please group them by type, ie Graphics, gameplay etc, maximum 20 different types
Flag exe_params[] =
{
"-spec", "Enable specular", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
"-glow", "Enable glowmaps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "",
"-pcx32", "Enable 32bit textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/32%20bit%20PCX%20textures",
"-jpgtga", "Enable jpg,tga textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/JPG%20and%20TGA%20textures",
"-d3dmipmap", "Enable mipmapping", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Mipmaping%2C%20blending%20textures%20over%20distance",
"-cell", "Enable cell shading", true, 0, EASY_DEFAULT, "Graphics", "",
"-phreak", "Enable Phreaks options", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
"-ship_choice_3d","Enable models instead of ani", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
"-d3d_no_vsync", "Disable vertical sync", true, 0, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Disable%20V-Sync",
"-2d_poof", "Stops fog intersect hull", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "",
"-spec", "Enable specular", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.spec",
"-glow", "Enable glowmaps", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.glow",
"-pcx32", "Enable 32bit textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.pcx32",
"-jpgtga", "Enable jpg,tga textures", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.jpgtga",
"-d3dmipmap", "Enable mipmapping", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3dmipmap",
"-nomotiondebris","Disable motion debris", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nomotiondebris",
"-2d_poof", "Stops fog intersect hull", true, EASY_ALL_ON, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.2d_poof",
"-cell", "Enable cell shading", true, 0, EASY_DEFAULT, "Graphics", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.cell",
"-nobeampierce", "", true, EASY_ALL_ON, EASY_DEFAULT, "Gameplay", "",
"-radar_reduce", "", true, EASY_ALL_ON, EASY_DEFAULT, "Gameplay", "",
"-pcx2dds", "Compress pcx", true, 0, EASY_DEFAULT, "Game Speed", "",
"-d3d_no_vsync", "Disable vertical sync", true, 0, EASY_DEFAULT, "Game Speed", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3d_no_vsync",
"-fps", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
"-window", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-timerbar", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-stats", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-coords", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
"-show_mem_usage","", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-pofspew", "", false, 0, EASY_DEFAULT, "Dev Tool", "",
"-tablecrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-missioncrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "",
"-oldfire", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-nohtl", "Software mode (very slow)", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-nosound", "No sound or music", false, 0, EASY_DEFAULT, "Troubleshoot", "",
"-nomusic", "No music", false, 0, EASY_DEFAULT, "Troubleshoot", "",
"-no_set_gamma", "Disable D3D gamma", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-dnoshowvid", "Disable video playback", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-safeloading", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-query_speech", "", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-d3d_bad_tsys", "Enable inefficient textures", false, 0, EASY_DEFAULT, "Troubleshoot", "",
"-novbo", "Disable OpenGL VBO", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-standalone", "", false, 0, EASY_DEFAULT, "Multi", "",
"-startgame", "", false, 0, EASY_DEFAULT, "Multi", "",
"-closed", "", false, 0, EASY_DEFAULT, "Multi", "",
"-restricted", "", false, 0, EASY_DEFAULT, "Multi", "",
"-multilog", "", false, 0, EASY_DEFAULT, "Multi", "",
"-clientdamage", "", false, 0, EASY_DEFAULT, "Multi", "",
"-batch_3dunlit", "Batch dynamic data (in dev)", false, 0, EASY_DEFAULT, "Experimental", "",
"-nobeampierce", "", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nobeampierce",
"-dualscanlines", "Another pair of scanning lines", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.dualscanlines",
"-ship_choice_3d","Use models for ship selection", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.ship_choice_3d",
"-targetinfo", "Enable info next to target", true, 0, EASY_DEFAULT, "Gameplay", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.targetinfo",
"-orbradar", "Enables 3d radar", true, 0, EASY_DEFAULT, "Gameplay", "",
"-3dwarp", "Enable 3d warp", true, 0, EASY_DEFAULT, "Gameplay", "",
"-tbpwarpeffects","Enable TBP Warp Effects", true, 0, EASY_DEFAULT, "Gameplay", "", // TBP warp effects -Et1
"-ballistic_gauge", "Enable ballistic ammo gauge", true, 0, EASY_DEFAULT, "Gameplay", "",
"-snd_preload", "Preload mission game sounds", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Audio", "",
"-snd_preload", "Preload mission game sounds", true, EASY_MEM_ALL_ON, EASY_DEFAULT_MEM, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.snd_preload",
"-noaudio", "Disable sound and music", false, 0, EASY_DEFAULT, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nosound",
"-nomusic", "Disable music", false, 0, EASY_DEFAULT, "Audio", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nomusic",
"-standalone", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.standalone",
"-startgame", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.startgame",
"-closed", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.closed",
"-restricted", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.restricted",
"-multilog", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.multilog",
"-clientdamage", "", false, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.clientdamage",
"-mpnoreturn", "Disables flight deck option", true, 0, EASY_DEFAULT, "Multi", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Command-Line%20Reference#-mpnoreturn",
"-oldfire", "", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.oldfire",
"-nohtl", "Software mode (very slow)", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.nohtl",
"-no_set_gamma", "Disable setting of gamma", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-dnoshowvid", "Disable video playback", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.dnoshowvid",
"-safeloading", "", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.safeloading",
"-query_speech", "Does this build have speech?", true, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.query_speech",
"-d3d_bad_tsys", "Enable inefficient textures", false, 0, EASY_DEFAULT, "Troubleshoot", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.d3d_bad_tsys",
"-novbo", "Disable OpenGL VBO", true, 0, EASY_DEFAULT, "Troubleshoot", "",
"-env", "environment mapping maping", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.env",
"-alpha_env", "uses uses alpha for env maping", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.alpha_env",
"-decals", "impact decals", true, 0, EASY_DEFAULT, "Experimental", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.decals",
"-loadonlyused", "Loads only used weapons", true, 0, EASY_DEFAULT, "Experimental", "",
"-fps", "Show frames per seconds", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.fps",
"-window", "Run in window", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.window",
"-timerbar", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.timerbar",
"-stats", "Show statistics", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.stats",
"-coords", "Show coordinates", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.coords",
"-show_mem_usage","Show memory usage", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.show_mem_usage",
"-pofspew", "", false, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.pofspew",
"-tablecrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.tablecrcs",
"-missioncrcs", "", true, 0, EASY_DEFAULT, "Dev Tool", "http://dynamic4.gamespy.com/~freespace/fsdoc/index.php?pagename=Command-Line%20Reference#x2d.missioncrcs",
};
// here are the command line parameters that we will be using for FreeSpace
cmdline_parm standalone_arg("-standalone", NULL);
cmdline_parm mpnoreturn_arg("-mpnoreturn", NULL); //Removes 'Return to Flight Deck' in respawn dialog -C
cmdline_parm nosound_arg("-nosound", NULL);
cmdline_parm nomusic_arg("-nomusic", NULL);
cmdline_parm startgame_arg("-startgame", NULL);
@@ -672,7 +758,8 @@ cmdline_parm timeout("-timeout", NULL);
cmdline_parm window("-window", NULL);
cmdline_parm almission_arg("-almission", NULL); //DTP for autoload Multi mission
cmdline_parm allslev_arg("-allslev", NULL); //Give access to all single player missions
cmdline_parm phreak_arg("-phreak", NULL); // Change to phreaks options including new targetting code
cmdline_parm dualscanlines_arg("-dualscanlines", NULL); // Change to phreaks options including new targetting code
cmdline_parm targetinfo_arg("-targetinfo", NULL); //Adds ship name/class to right of target box -C
cmdline_parm dnoshowvid_arg("-dnoshowvid", NULL); // Allows video streaming
cmdline_parm mod_arg("-mod", NULL); //DTP modsupport
cmdline_parm fps_arg("-fps", NULL);
@@ -685,6 +772,7 @@ cmdline_parm spec_point_arg("-spec_point", NULL); // comand line FOV -Bobboau
cmdline_parm spec_static_arg("-spec_static", NULL); // comand line FOV -Bobboau
cmdline_parm spec_tube_arg("-spec_tube", NULL); // comand line FOV -Bobboau
cmdline_parm safeloading_arg("-safeloading", NULL); //Uses old loading method -C
cmdline_parm nomotiondebris_arg("-nomotiondebris", NULL); //Removes those ugly floating rocks -C
cmdline_parm spec_arg("-spec", NULL); // use specular highlighting -Sticks
cmdline_parm glow_arg("-glow", NULL); // use Bobs glow code
cmdline_parm MissionCRCs("-missioncrcs", NULL);
@@ -695,6 +783,7 @@ cmdline_parm jpgtga_arg("-jpgtga",NULL);
cmdline_parm no_set_gamma_arg("-no_set_gamma",NULL);
cmdline_parm d3d_no_vsync_arg("-d3d_no_vsync", NULL);
cmdline_parm pcx32_arg("-pcx32",NULL);
cmdline_parm pcx32dds_arg("-pcx2dds",NULL);
cmdline_parm timerbar_arg("-timerbar", NULL);
cmdline_parm stats_arg("-stats", NULL);
cmdline_parm query_speech_arg("-query_speech", NULL);
@@ -709,7 +798,18 @@ cmdline_parm get_flags_arg("-get_flags",NULL);
cmdline_parm d3d_lesstmem_arg("-d3d_bad_tsys",NULL);
cmdline_parm batch_3dunlit_arg("-batch_3dunlit",NULL);
cmdline_parm fred2_htl_arg("-fredhtl",NULL);
cmdline_parm fred2_nowarn_arg("-fred_no_warn", NULL);
cmdline_parm nowarn_arg("-no_warn", NULL);
cmdline_parm max_subdivide_arg("-max_subdivide", NULL); // comand line maximum level of tesleation for n-patches -Bobboau
cmdline_parm env("-env", NULL);
cmdline_parm alpha_env("-alpha_env", NULL);
cmdline_parm decals("-decals", NULL);
cmdline_parm orb_radar("-orbradar",NULL);
cmdline_parm TBPWarpEffects( "-tbpwarpeffects", NULL ); // TBP warp effects -Et1
cmdline_parm use_3dwarp("-3dwarp", NULL);
cmdline_parm ballistic_gauge("-ballistic_gauge", NULL );
//Experimental
cmdline_parm load_only_used("-loadonlyused", NULL);
cmdline_parm poof_2d_arg("-2d_poof", NULL);
cmdline_parm Radar_Range_Clamp("-radar_reduce", NULL);
@@ -719,6 +819,7 @@ cmdline_parm snd_preload_arg("-snd_preload", NULL);
cmdline_parm no_fpscap("-no_fps_capping", NULL);
int Cmdline_mpnoreturn = 0;
int Cmdline_show_stats = 0;
int Cmdline_timerbar = 0;
int Cmdline_multi_stream_chat_to_file = 0;
@@ -749,10 +850,14 @@ int Cmdline_SpewMission_CRCs = 0; // Kazan for making valid mission lists
int Cmdline_SpewTable_CRCs = 0;
int Cmdline_ship_choice_3d = 0;
int Cmdline_d3d_particle = 0;
int Cmdline_orb_radar = 0;
int Cmdline_TBPWarpEffects = 0; // TBP warp effects -Et1
int Cmdline_3dwarp = 0;
int Cmdline_window = 0;
int Cmdline_allslev = 0;
int Cmdline_phreak = 0;
int Cmdline_dualscanlines = 0;
int Cmdline_targetinfo = 0;
int Cmdline_dnoshowvid = 0;
int Cmdline_show_fps = 0;
int Cmdline_safeloading = 0;
@@ -773,6 +878,8 @@ int Cmdline_jpgtga = 0;
int Cmdline_no_set_gamma = 0;
int Cmdline_d3d_no_vsync = 0;
int Cmdline_pcx32 = 0;
int Cmdline_pcx32dds = 0;
int Cmdline_nomotiondebris = 0;
int Cmdline_query_speech = 0;
int Cmdline_show_mem_usage = 0;
@@ -780,7 +887,12 @@ int Cmdline_d3d_lesstmem = 0;
int Cmdline_beams_no_pierce_shields = 0; // Goober5000
int Cmdline_FRED2_htl = 0; // turn HTL on in fred - Kazan
int CmdLine_FRED2_NoWarn = 0; // turn warnings off in FRED
int CmdLine_NoWarn = 0; // turn warnings off in FRED
int Cmdline_ballistic_gauge = 0; // WMCoolmon's gauge thingy
//Experimental
int Cmdline_load_only_used;
int Cmdline_novbo = 0; // turn off OGL VBO support, troubleshooting
int Cmdline_snd_preload = 0; // preload game sounds during mission load
@@ -1024,6 +1136,11 @@ bool SetCmdlineParams()
Cmdline_NoFPSCap = 1;
}
if(load_only_used.found())
{
Cmdline_load_only_used = 1;
}
if(poof_2d_arg.found())
{
Cmdline_2d_poof = 1;
@@ -1031,12 +1148,13 @@ bool SetCmdlineParams()
if (Radar_Range_Clamp.found())
{
Radar_ranges[RR_MAX_RANGES-1] = Radar_Range_Clamp.get_float();
if (Radar_Range_Clamp.get_float() > 0.0f)
Radar_ranges[RR_MAX_RANGES-1] = Radar_Range_Clamp.get_float();
}
if (fred2_nowarn_arg.found())
if (nowarn_arg.found())
{
CmdLine_FRED2_NoWarn = 1;
CmdLine_NoWarn = 1;
}
if (fred2_htl_arg.found())
@@ -1062,6 +1180,10 @@ bool SetCmdlineParams()
Is_standalone = 1;
}
if(mpnoreturn_arg.found()) {
Cmdline_mpnoreturn = 1;
}
// run with no sound
if ( nosound_arg.found() ) {
Cmdline_freespace_no_sound = 1;
@@ -1171,14 +1293,20 @@ bool SetCmdlineParams()
Cmdline_allslev = 1;
}
if(phreak_arg.found() ) {
Cmdline_phreak = 1;
if(dualscanlines_arg.found() ) {
Cmdline_dualscanlines = 1;
}
if(targetinfo_arg.found())
{
Cmdline_targetinfo = 1;
}
if(dnoshowvid_arg.found() ) {
Cmdline_dnoshowvid = 1;
}
if(mod_arg.found() ) {
Cmdline_mod = mod_arg.str();
@@ -1195,10 +1323,11 @@ bool SetCmdlineParams()
// Ok - mod stacking support
int len = strlen(Cmdline_mod);
char *modlist = new char[len+1];
char *modlist = new char[len+2];
memset(modlist, 0, len+2);
strcpy(modlist, Cmdline_mod);
modlist[len]= '\0'; // double null termination at the end
//modlist[len]= '\0'; // double null termination at the end
// null terminate each individual
for (int i = 0; i < len; i++)
@@ -1221,6 +1350,10 @@ bool SetCmdlineParams()
Cmdline_safeloading = 1;
}
if ( nomotiondebris_arg.found() ) {
Cmdline_nomotiondebris = 1;
}
if( cache_ani_arg.found() ) {
Cmdline_cache_ani = 1;
}
@@ -1241,6 +1374,22 @@ bool SetCmdlineParams()
Viewer_zoom = VIEWER_ZOOM_DEFAULT = Cmdline_fov = fov_arg.get_float();
}
if (orb_radar.found())
{
Cmdline_orb_radar = 1;
}
// TBP warp effects -Et1
if( TBPWarpEffects.found() )
{
Cmdline_TBPWarpEffects = 1;
}
if ( use_3dwarp.found() ) {
Cmdline_3dwarp = 1;
}
//specular comand lines
if ( spec_exp_arg.found() ) {
@@ -1297,6 +1446,11 @@ bool SetCmdlineParams()
Cmdline_pcx32 = 1;
}
if(pcx32dds_arg.found() )
{
Cmdline_pcx32dds = 1;
}
if(glow_arg.found() )
{
Cmdline_noglow = 0;
@@ -1408,6 +1562,36 @@ bool SetCmdlineParams()
Cmdline_snd_preload = 1;
}
if ( max_subdivide_arg.found() ) {
Cmdline_max_subdivide = max_subdivide_arg.get_float();
}else{
Cmdline_max_subdivide = 0;
}
if ( alpha_env.found() ) {
Cmdline_alpha_env = 1;
}else{
Cmdline_alpha_env = 0;
}
if ( env.found() ) {
Cmdline_env = 1;
}else{
Cmdline_env = 0;
}
if ( decals.found() ) {
Cmdline_decals = 1;
}else{
Cmdline_decals = 0;
}
if ( ballistic_gauge.found() ) {
Cmdline_ballistic_gauge = 1;
} else {
Cmdline_ballistic_gauge = 0;
}
return true;
}
+57 -6
View File
@@ -11,11 +11,49 @@
/*
* $Logfile: /Freespace2/code/Cmdline/cmdline.h $
* $Revision: 2.54 $
* $Date: 2004-04-26 18:23:47 $
* $Author: Kazan $
* $Revision: 2.64 $
* $Date: 2004-12-24 19:36:12 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 2.63 2004/11/23 19:29:13 taylor
* fix 2d warp in D3D, add cmdline option for 3d warp
*
* Revision 2.62 2004/09/10 13:51:20 et1
* Command line option for TBP for warp stuff, "-tbpwarpeffects"
*
* Revision 2.61 2004/08/11 05:06:19 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.60 2004/08/02 22:40:59 phreak
* added -orbradar to enable orb rendering for the radar
*
* Revision 2.59 2004/08/01 02:31:18 phreak
* -phreak command line changed to -dualscanlines
*
* Revision 2.58 2004/07/25 18:46:28 Kazan
* -fred_no_warn has become -no_warn and applies to both fred and fs2
* added new ai directive (last commit) and disabled afterburners while performing AIM_WAYPOINTS or AIM_FLY_TO_SHIP
* fixed player ship speed bug w/ player-use-ai, now stays in formation correctly and manages speed
* made -radar_reduce ignore itself if no parameter is given (ignoring launcher bug)
*
* Revision 2.57 2004/07/05 05:09:15 bobboau
* FVF code, only the data that is needed is sent off to the card,,
* OGL can take advantage of this if they want but it won't break
* anything if they don't. also state block code has been implemented,
* that's totaly internal to D3D no high level code is involved.
*
* Revision 2.56 2004/06/19 22:15:48 wmcoolmon
* Added -nomotion debris command line option; also re-ordered categories.
*
* Revision 2.55 2004/06/06 12:25:19 randomtiger
* Added new compression option -pcx32dds, build posted in RSB forum.
* Changed flag because of launcher bug, have fixed launcher bug, will distribute later.
* Also removed experimental flag from launcher flag list, stupid people were reporting bugs on unfinished code.
*
* Revision 2.54 2004/04/26 18:23:47 Kazan
* -no_fps_capping
*
* Revision 2.53 2004/04/26 00:23:26 taylor
* novbo and snd_preload cmdline options, fix moddir getting appended space
*
@@ -408,7 +446,7 @@
*
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef FS_CMDLINE_HEADER_FILE
#define FS_CMDLINE_HEADER_FILE
@@ -454,13 +492,15 @@ extern int Cmdline_window;
extern char *Cmdline_almission; //DTP for autoload mission
extern int Cmdline_gf4fix; //DTP for Random tigers GF4fix.
extern int Cmdline_allslev;
extern int Cmdline_phreak;
extern int Cmdline_dualscanlines;
extern int Cmdline_dnoshowvid; //WMC Toggles movie playing support
extern char *Cmdline_mod; //DTP for mod support
extern int Cmdline_show_fps;//DTP moved here because it is the correct place for it to be.
extern int Cmdline_show_stats;
extern int Cmdline_safeloading;
extern int Cmdline_nospec;
extern int Cmdline_orb_radar;
extern int Cmdline_TBPWarpEffects; // TBP warp effects -Et1
extern int Cmdline_cache_ani;
extern int Cmdline_d3dmipmap;
@@ -480,6 +520,8 @@ extern int Cmdline_jpgtga;
extern int Cmdline_no_set_gamma;
extern int Cmdline_d3d_no_vsync;
extern int Cmdline_pcx32;
extern int Cmdline_pcx32dds;
extern int Cmdline_nomotiondebris;
extern int Cmdline_noglow;
extern int Cmdline_timerbar;
@@ -496,13 +538,22 @@ extern int Cmdline_d3d_lesstmem;
extern int Cmdline_batch_3dunlit;
extern int Cmdline_2d_poof;
extern int Cmdline_3dwarp;
extern int Cmdline_FRED2_htl;
extern int CmdLine_FRED2_NoWarn;
extern int CmdLine_NoWarn;
extern int Cmdline_novbo;
extern int Cmdline_snd_preload;
extern int Cmdline_NoFPSCap;
extern float Cmdline_max_subdivide;
extern int Cmdline_alpha_env;
extern int Cmdline_env;
extern int Cmdline_decals;
extern int Cmdline_ballistic_gauge;
//extern char FreeSpace_Directory[]; // allievating a cfilesystem problem caused by fred -- Kazan
#endif
+12 -3
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.cpp $
* $Revision: 2.3 $
* $Date: 2004-03-05 09:01:57 $
* $Author: Goober5000 $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:25 $
* $Author: Kazan $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.3 2004/03/05 09:01:57 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.2 2003/03/18 10:07:00 unknownplayer
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
*
@@ -228,6 +235,8 @@
#include "math/staticrand.h"
#include "object/object.h"
cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
cmeasure Cmeasures[MAX_CMEASURES];
+8 -3
View File
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.h $
* $Revision: 2.2 $
* $Date: 2004-03-05 09:01:57 $
* $Author: Goober5000 $
* $Revision: 2.3 $
* $Date: 2004-08-11 05:06:19 $
* $Author: Kazan $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 2.2 2004/03/05 09:01:57 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -115,6 +119,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CMEASURE_H
#define _CMEASURE_H
+50 -14
View File
@@ -41,12 +41,12 @@ RSC=rc.exe
# PROP Intermediate_Dir "..\Release\Profile"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /Ob2 /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENGL" /D "MORE_SPECIES" /U "_DEBUG" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MT /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /Ob2 /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /U "_DEBUG" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
# ADD BSC32 /nologo /o"..\Release\Profile\code.bsc" "..\Release\Profile\*.sbr"
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
@@ -64,12 +64,12 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "..\Debug\Profile"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "MORE_SPECIES" /D "_REPORT_MEM_LEAKS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "." /I "c:\mssdk\include\\" /I "c:\dxsdk\include" /I "c:\speech_api\include" /I "c:\devil-sdk\include" /I "C:\libraries\DevIL\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo /o".\debug/profile/code.bsc"
# ADD BSC32 /nologo /o"..\Debug\Profile\code.bsc" "..\Debug\Profile\*.sbr"
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
@@ -123,6 +123,10 @@ SOURCE=.\Bmpman\BmpMan.cpp
SOURCE=.\Bmpman\BmpMan.h
# End Source File
# Begin Source File
SOURCE=.\bmpman\bm_internal.h
# End Source File
# End Group
# Begin Group "CFile"
@@ -543,23 +547,27 @@ SOURCE=.\Graphics\GrD3DTexture.cpp
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Graphics\GrOpenGL.h
SOURCE=.\graphics\gropengl.h
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenglExtension.h
SOURCE=.\graphics\gropenglbmpman.h
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenGLlight.h
SOURCE=.\graphics\gropenglextension.h
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenglTexture.h
SOURCE=.\graphics\gropengllight.h
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenGLTNL.h
SOURCE=.\graphics\gropengltexture.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltnl.h
# End Source File
# End Group
# Begin Group "OpenGL CPPs"
@@ -567,23 +575,27 @@ SOURCE=.\graphics\GrOpenGLTNL.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Graphics\GrOpenGL.cpp
SOURCE=.\graphics\gropengl.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenglExtension.cpp
SOURCE=.\graphics\gropenglbmpman.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenGLlight.cpp
SOURCE=.\graphics\gropenglextension.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenglTexture.cpp
SOURCE=.\graphics\gropengllight.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrOpenGLTNL.cpp
SOURCE=.\graphics\gropengltexture.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltnl.cpp
# End Source File
# End Group
# End Group
@@ -701,6 +713,10 @@ SOURCE=.\Hud\HUDObserver.h
# End Source File
# Begin Source File
SOURCE=.\hud\hudparse.cpp
# End Source File
# Begin Source File
SOURCE=.\Hud\HUDreticle.cpp
# End Source File
# Begin Source File
@@ -1526,6 +1542,22 @@ SOURCE=.\Radar\Radar.cpp
SOURCE=.\Radar\Radar.h
# End Source File
# Begin Source File
SOURCE=.\radar\radarorb.cpp
# End Source File
# Begin Source File
SOURCE=.\radar\radarorb.h
# End Source File
# Begin Source File
SOURCE=.\radar\radarsetup.cpp
# End Source File
# Begin Source File
SOURCE=.\radar\radarsetup.h
# End Source File
# End Group
# Begin Group "Render"
@@ -2571,5 +2603,9 @@ SOURCE=.\Autopilot\Autopilot.cpp
SOURCE=.\Autopilot\Autopilot.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\PreProcDefines.h
# End Source File
# End Target
# End Project
+31 -5
View File
@@ -9,13 +9,26 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.cpp $
* $Revision: 2.5 $
* $Date: 2004-03-05 09:01:58 $
* $Author: Goober5000 $
* $Revision: 2.9 $
* $Date: 2004-07-29 19:37:50 $
* $Author: Kazan $
*
* C module for keyboard, joystick and mouse configuration
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/07/26 20:47:26 Kazan
* remove MCD complete
*
* Revision 2.7 2004/07/25 00:31:28 Kazan
* i have absolutely nothing to say about that subject
*
* Revision 2.6 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.5 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.4 2003/11/11 02:15:43 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
@@ -350,6 +363,8 @@
#include "hud/hud.h"
#endif
#define NUM_SYSTEM_KEYS 14
#define NUM_BUTTONS 19
#define NUM_TABS 4
@@ -831,7 +846,13 @@ void control_config_list_prepare()
if ((Control_config[z].tab == Tab) && control_config_valid_action(z)) {
k = Control_config[z].key_id;
j = Control_config[z].joy_id;
Cc_lines[Num_cc_lines].label = XSTR(Control_config[z].text, CONTROL_CONFIG_XSTR + z);
if (Control_config[z].hasXSTR)
Cc_lines[Num_cc_lines].label = XSTR(Control_config[z].text, CONTROL_CONFIG_XSTR + z);
else
Cc_lines[Num_cc_lines].label = Control_config[z].text;
Cc_lines[Num_cc_lines].cc_index = z;
Cc_lines[Num_cc_lines++].y = y;
y += font_height + 2;
@@ -2194,7 +2215,11 @@ void control_config_do_frame(float frametime)
gr_get_string_size(&w, NULL, str);
gr_printf(x - w / 2, y - font_height, str);
strcpy(buf, XSTR(Control_config[i].text, CONTROL_CONFIG_XSTR + i));
if (Control_config[i].hasXSTR)
strcpy(buf, XSTR(Control_config[i].text, CONTROL_CONFIG_XSTR + i));
else
strcpy(buf, Control_config[i].text);
gr_force_fit_string(buf, 255, Conflict_wnd_coords[gr_screen.res][CONTROL_W_COORD]);
gr_get_string_size(&w, NULL, buf);
gr_printf(x - w / 2, y, buf);
@@ -2466,6 +2491,7 @@ int check_control(int id, int key)
}
if ((Control_config[id].key_id == key) || joy_down_count(Control_config[id].joy_id, 1) || mouse_down_count(1 << Control_config[id].joy_id)) {
//mprintf(("Key used %d", key));
control_used(id);
return 1;
}
+12 -2
View File
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.h $
* $Revision: 2.7 $
* $Date: 2004-05-03 21:22:19 $
* $Revision: 2.9 $
* $Date: 2004-08-11 05:06:19 $
* $Author: Kazan $
*
* Header file for keyboard, joystick and mouse configuration
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/07/25 00:31:28 Kazan
* i have absolutely nothing to say about that subject
*
* Revision 2.7 2004/05/03 21:22:19 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.6 2004/04/06 03:09:01 phreak
* added a control config option for the wireframe hud targetbox i enabled ages ago
*
@@ -286,6 +294,7 @@
*
*/
#include "PreProcDefines.h"
#ifndef CONTROLS_CONFIG_H
#define CONTROLS_CONFIG_H
@@ -317,6 +326,7 @@ typedef struct config_item {
short key_default; // default key bound to action
short joy_default; // default joystick button bound to action
char tab; // what tab (category) it belongs in
bool hasXSTR; // whether we should translate this with an XSTR
char *text; // describes the action in the config screen
char type; // manner control should be checked in
short key_id; // actual key bound to action
@@ -9,13 +9,24 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfigCommon.cpp $
* $Revision: 2.6 $
* $Date: 2004-05-03 21:22:19 $
* $Revision: 2.9 $
* $Date: 2004-07-26 20:47:26 $
* $Author: Kazan $
*
* C module for keyboard, joystick and mouse configuration common stuff (between Fred and FreeSpace)
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/07/25 00:31:28 Kazan
* i have absolutely nothing to say about that subject
*
* Revision 2.7 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.6 2004/05/03 21:22:19 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.5 2004/04/06 03:09:01 phreak
* added a control config option for the wireframe hud targetbox i enabled ages ago
*
@@ -398,6 +409,7 @@
#include "io/joy.h"
#include "localization/localize.h"
#define TARGET_TAB 0
#define SHIP_TAB 1
#define WEAPON_TAB 2
@@ -420,155 +432,155 @@ int Invert_axis_defaults[JOY_NUM_AXES] = { 0, 0, 0, 0, 0, 0 };
//XSTR:OFF
config_item Control_config[CCFG_MAX + 1] = {
// targeting a ship
{ KEY_T, -1, TARGET_TAB, "Target Next Ship" },
{ KEY_SHIFTED | KEY_T, -1, TARGET_TAB, "Target Previous Ship" },
{ KEY_H, 2, TARGET_TAB, "Target Next Closest Hostile Ship" },
{ KEY_SHIFTED | KEY_H, -1, TARGET_TAB, "Target Previous Closest Hostile Ship" },
{ KEY_ALTED | KEY_H, -1, TARGET_TAB, "Toggle Auto Targeting" },
{ KEY_F, -1, TARGET_TAB, "Target Next Closest Friendly Ship" },
{ KEY_SHIFTED | KEY_F, -1, TARGET_TAB, "Target Previous Closest Friendly Ship" },
{ KEY_Y, 4, TARGET_TAB, "Target Ship in Reticle" },
{ KEY_G, -1, TARGET_TAB, "Target Target's Nearest Attacker" },
{ KEY_ALTED | KEY_Y, -1, TARGET_TAB, "Target Last Ship to Send Transmission" },
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, "Turn Off Auto-Targeting" },
{ KEY_T, -1, TARGET_TAB, true, "Target Next Ship" },
{ KEY_SHIFTED | KEY_T, -1, TARGET_TAB, true, "Target Previous Ship" },
{ KEY_H, 2, TARGET_TAB, true, "Target Next Closest Hostile Ship" },
{ KEY_SHIFTED | KEY_H, -1, TARGET_TAB, true, "Target Previous Closest Hostile Ship" },
{ KEY_ALTED | KEY_H, -1, TARGET_TAB, true, "Toggle Auto Targeting" },
{ KEY_F, -1, TARGET_TAB, true, "Target Next Closest Friendly Ship" },
{ KEY_SHIFTED | KEY_F, -1, TARGET_TAB, true, "Target Previous Closest Friendly Ship" },
{ KEY_Y, 4, TARGET_TAB, true, "Target Ship in Reticle" },
{ KEY_G, -1, TARGET_TAB, true, "Target Target's Nearest Attacker" },
{ KEY_ALTED | KEY_Y, -1, TARGET_TAB, true, "Target Last Ship to Send Transmission" },
{ KEY_ALTED | KEY_T, -1, TARGET_TAB, true, "Turn Off Auto-Targeting" },
// targeting a ship's subsystem
{ KEY_V, -1, TARGET_TAB, "Target Subsystem in Reticle" },
{ KEY_S, -1, TARGET_TAB, "Target Next Subsystem" },
{ KEY_SHIFTED | KEY_S, -1, TARGET_TAB, "Target Previous Subsystem" },
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, "Turn Off Auto-Targeting of Subsystems" },
{ KEY_V, -1, TARGET_TAB, true, "Target Subsystem in Reticle" },
{ KEY_S, -1, TARGET_TAB, true, "Target Next Subsystem" },
{ KEY_SHIFTED | KEY_S, -1, TARGET_TAB, true, "Target Previous Subsystem" },
{ KEY_ALTED | KEY_S, -1, TARGET_TAB, true, "Turn Off Auto-Targeting of Subsystems" },
// matching speed
{ KEY_M, -1, COMPUTER_TAB, "Match Target Speed" },
{ KEY_ALTED | KEY_M, -1, COMPUTER_TAB, "Toggle Auto Speed Matching" },
{ KEY_M, -1, COMPUTER_TAB, true, "Match Target Speed" },
{ KEY_ALTED | KEY_M, -1, COMPUTER_TAB, true, "Toggle Auto Speed Matching" },
// weapons
{ KEY_LCTRL, 0, WEAPON_TAB, "Fire Primary Weapon", CC_TYPE_CONTINUOUS },
{ KEY_SPACEBAR, 1, WEAPON_TAB, "Fire Secondary Weapon", CC_TYPE_CONTINUOUS },
{ KEY_PERIOD, -1, WEAPON_TAB, "Cycle Forward Primary Weapon" },
{ KEY_COMMA, -1, WEAPON_TAB, "Cycle Backward Primary Weapon" },
{ KEY_DIVIDE, -1, WEAPON_TAB, "Cycle Secondary Weapon Bank" },
{ KEY_SHIFTED | KEY_DIVIDE, -1, WEAPON_TAB, "Cycle Secondary Weapon Firing Rate" },
{ KEY_X, 3, WEAPON_TAB, "Launch Countermeasure" },
{ KEY_LCTRL, 0, WEAPON_TAB, true, "Fire Primary Weapon", CC_TYPE_CONTINUOUS },
{ KEY_SPACEBAR, 1, WEAPON_TAB, true, "Fire Secondary Weapon", CC_TYPE_CONTINUOUS },
{ KEY_PERIOD, -1, WEAPON_TAB, true, "Cycle Forward Primary Weapon" },
{ KEY_COMMA, -1, WEAPON_TAB, true, "Cycle Backward Primary Weapon" },
{ KEY_DIVIDE, -1, WEAPON_TAB, true, "Cycle Secondary Weapon Bank" },
{ KEY_SHIFTED | KEY_DIVIDE, -1, WEAPON_TAB, true, "Cycle Secondary Weapon Firing Rate" },
{ KEY_X, 3, WEAPON_TAB, true, "Launch Countermeasure" },
// controls
{ KEY_A, -1, SHIP_TAB, "Forward Thrust", CC_TYPE_CONTINUOUS },
{ KEY_Z, -1, SHIP_TAB, "Reverse Thrust", CC_TYPE_CONTINUOUS },
{ KEY_PAD7, -1, SHIP_TAB, "Bank Left", CC_TYPE_CONTINUOUS },
{ KEY_PAD9, -1, SHIP_TAB, "Bank Right", CC_TYPE_CONTINUOUS },
{ KEY_PAD8, -1, SHIP_TAB, "Pitch Forward", CC_TYPE_CONTINUOUS },
{ KEY_PAD2, -1, SHIP_TAB, "Pitch Backward", CC_TYPE_CONTINUOUS },
{ KEY_PAD4, -1, SHIP_TAB, "Turn Left", CC_TYPE_CONTINUOUS },
{ KEY_PAD6, -1, SHIP_TAB, "Turn Right", CC_TYPE_CONTINUOUS },
{ KEY_A, -1, SHIP_TAB, true, "Forward Thrust", CC_TYPE_CONTINUOUS },
{ KEY_Z, -1, SHIP_TAB, true, "Reverse Thrust", CC_TYPE_CONTINUOUS },
{ KEY_PAD7, -1, SHIP_TAB, true, "Bank Left", CC_TYPE_CONTINUOUS },
{ KEY_PAD9, -1, SHIP_TAB, true, "Bank Right", CC_TYPE_CONTINUOUS },
{ KEY_PAD8, -1, SHIP_TAB, true, "Pitch Forward", CC_TYPE_CONTINUOUS },
{ KEY_PAD2, -1, SHIP_TAB, true, "Pitch Backward", CC_TYPE_CONTINUOUS },
{ KEY_PAD4, -1, SHIP_TAB, true, "Turn Left", CC_TYPE_CONTINUOUS },
{ KEY_PAD6, -1, SHIP_TAB, true, "Turn Right", CC_TYPE_CONTINUOUS },
// throttle controls
{ KEY_BACKSP, -1, SHIP_TAB, "Set Throttle to Zero" },
{ KEY_SLASH, -1, SHIP_TAB, "Set Throttle to Max" },
{ KEY_LBRACKET, -1, SHIP_TAB, "Set Throttle to One-Third" },
{ KEY_RBRACKET, -1, SHIP_TAB, "Set Throttle to Two-Thirds" },
{ KEY_EQUAL, -1, SHIP_TAB, "Increase Throttle 5 Percent" },
{ KEY_MINUS, -1, SHIP_TAB, "Decrease Throttle 5 Percent" },
{ KEY_BACKSP, -1, SHIP_TAB, true, "Set Throttle to Zero" },
{ KEY_SLASH, -1, SHIP_TAB, true, "Set Throttle to Max" },
{ KEY_LBRACKET, -1, SHIP_TAB, true, "Set Throttle to One-Third" },
{ KEY_RBRACKET, -1, SHIP_TAB, true, "Set Throttle to Two-Thirds" },
{ KEY_EQUAL, -1, SHIP_TAB, true, "Increase Throttle 5 Percent" },
{ KEY_MINUS, -1, SHIP_TAB, true, "Decrease Throttle 5 Percent" },
// squadmate messaging
{ KEY_SHIFTED | KEY_A, -1, COMPUTER_TAB, "Attack My Target" },
{ KEY_SHIFTED | KEY_Z, -1, COMPUTER_TAB, "Disarm My Target" },
{ KEY_SHIFTED | KEY_D, -1, COMPUTER_TAB, "Disable My Target" },
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, "Attack my Subsystem" },
{ KEY_SHIFTED | KEY_X, -1, COMPUTER_TAB, "Capture My Target" },
{ KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, "Engage Enemy" },
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, "Form on my Wing" },
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, "Ignore my Target" },
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, "Protect my Target" },
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, "Cover me" },
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, "Return to base" },
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, "Rearm me" },
{ KEY_SHIFTED | KEY_A, -1, COMPUTER_TAB, true, "Attack My Target" },
{ KEY_SHIFTED | KEY_Z, -1, COMPUTER_TAB, true, "Disarm My Target" },
{ KEY_SHIFTED | KEY_D, -1, COMPUTER_TAB, true, "Disable My Target" },
{ KEY_SHIFTED | KEY_V, -1, COMPUTER_TAB, true, "Attack my Subsystem" },
{ KEY_SHIFTED | KEY_X, -1, COMPUTER_TAB, true, "Capture My Target" },
{ KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Engage Enemy" },
{ KEY_SHIFTED | KEY_W, -1, COMPUTER_TAB, true, "Form on my Wing" },
{ KEY_SHIFTED | KEY_I, -1, COMPUTER_TAB, true, "Ignore my Target" },
{ KEY_SHIFTED | KEY_P, -1, COMPUTER_TAB, true, "Protect my Target" },
{ KEY_SHIFTED | KEY_C, -1, COMPUTER_TAB, true, "Cover me" },
{ KEY_SHIFTED | KEY_J, -1, COMPUTER_TAB, true, "Return to base" },
{ KEY_SHIFTED | KEY_R, -1, COMPUTER_TAB, true, "Rearm me" },
{ KEY_R, 6, TARGET_TAB, "Target Closest Attacking Ship" },
{ KEY_R, 6, TARGET_TAB, true, "Target Closest Attacking Ship" },
// Views
{ KEY_PADMULTIPLY, -1, COMPUTER_TAB, "Chase View" },
{ KEY_PADPERIOD, -1, COMPUTER_TAB, "External View"},
{ KEY_PADENTER, -1, COMPUTER_TAB, "Toggle External Camera Lock"},
{ KEY_PAD0, -1, COMPUTER_TAB, "Free Look View", CC_TYPE_CONTINUOUS },
{ KEY_PADDIVIDE, -1, COMPUTER_TAB, "Current Target View" },
{ KEY_PADPLUS, -1, COMPUTER_TAB, "Increase View Distance", CC_TYPE_CONTINUOUS },
{ KEY_PADMINUS, -1, COMPUTER_TAB, "Decrease View Distance", CC_TYPE_CONTINUOUS },
{ KEY_PAD5, -1, COMPUTER_TAB, "Center View", CC_TYPE_CONTINUOUS },
{ -1, 33, COMPUTER_TAB, "View Up", CC_TYPE_CONTINUOUS },
{ -1, 32, COMPUTER_TAB, "View Rear", CC_TYPE_CONTINUOUS },
{ -1, 34, COMPUTER_TAB, "View Left", CC_TYPE_CONTINUOUS },
{ -1, 35, COMPUTER_TAB, "View Right", CC_TYPE_CONTINUOUS },
{ KEY_PADMULTIPLY, -1, COMPUTER_TAB, true, "Chase View" },
{ KEY_PADPERIOD, -1, COMPUTER_TAB, true, "External View"},
{ KEY_PADENTER, -1, COMPUTER_TAB, true, "Toggle External Camera Lock"},
{ KEY_PAD0, -1, COMPUTER_TAB, true, "Free Look View", CC_TYPE_CONTINUOUS },
{ KEY_PADDIVIDE, -1, COMPUTER_TAB, true, "Current Target View" },
{ KEY_PADPLUS, -1, COMPUTER_TAB, true, "Increase View Distance", CC_TYPE_CONTINUOUS },
{ KEY_PADMINUS, -1, COMPUTER_TAB, true, "Decrease View Distance", CC_TYPE_CONTINUOUS },
{ KEY_PAD5, -1, COMPUTER_TAB, true, "Center View", CC_TYPE_CONTINUOUS },
{ -1, 33, COMPUTER_TAB, true, "View Up", CC_TYPE_CONTINUOUS },
{ -1, 32, COMPUTER_TAB, true, "View Rear", CC_TYPE_CONTINUOUS },
{ -1, 34, COMPUTER_TAB, true, "View Left", CC_TYPE_CONTINUOUS },
{ -1, 35, COMPUTER_TAB, true, "View Right", CC_TYPE_CONTINUOUS },
{ KEY_RAPOSTRO, -1, COMPUTER_TAB, "Cycle Radar Range" },
{ KEY_C, -1, COMPUTER_TAB, "Communications Menu" },
{ -1, -1, -1, "Show Objectives" },
{ KEY_ALTED | KEY_J, -1, COMPUTER_TAB, "Enter Subspace (End Mission)" },
{ KEY_J, -1, TARGET_TAB, "Target Target's Target" },
{ KEY_TAB, 5, SHIP_TAB, "Afterburner", CC_TYPE_CONTINUOUS },
{ KEY_RAPOSTRO, -1, COMPUTER_TAB, true, "Cycle Radar Range" },
{ KEY_C, -1, COMPUTER_TAB, true, "Communications Menu" },
{ -1, -1, -1, true, "Show Objectives" },
{ KEY_ALTED | KEY_J, -1, COMPUTER_TAB, true, "Enter Subspace (End Mission)" },
{ KEY_J, -1, TARGET_TAB, true, "Target Target's Target" },
{ KEY_TAB, 5, SHIP_TAB, true, "Afterburner", CC_TYPE_CONTINUOUS },
{ KEY_INSERT, -1, COMPUTER_TAB, "Increase Weapon Energy" },
{ KEY_DELETE, -1, COMPUTER_TAB, "Decrease Weapon Energy" },
{ KEY_HOME, -1, COMPUTER_TAB, "Increase Shield Energy" },
{ KEY_END, -1, COMPUTER_TAB, "Decrease Shield Energy" },
{ KEY_PAGEUP, -1, COMPUTER_TAB, "Increase Engine Energy" },
{ KEY_PAGEDOWN, -1, COMPUTER_TAB, "Decrease Engine Energy" },
{ KEY_ALTED | KEY_D, -1, COMPUTER_TAB, "Equalize Energy Settings" },
{ KEY_INSERT, -1, COMPUTER_TAB, true, "Increase Weapon Energy" },
{ KEY_DELETE, -1, COMPUTER_TAB, true, "Decrease Weapon Energy" },
{ KEY_HOME, -1, COMPUTER_TAB, true, "Increase Shield Energy" },
{ KEY_END, -1, COMPUTER_TAB, true, "Decrease Shield Energy" },
{ KEY_PAGEUP, -1, COMPUTER_TAB, true, "Increase Engine Energy" },
{ KEY_PAGEDOWN, -1, COMPUTER_TAB, true, "Decrease Engine Energy" },
{ KEY_ALTED | KEY_D, -1, COMPUTER_TAB, true, "Equalize Energy Settings" },
{ KEY_Q, 7, COMPUTER_TAB, "Equalize Shield" },
{ KEY_UP, -1, COMPUTER_TAB, "Augment Forward Shield" },
{ KEY_DOWN, -1, COMPUTER_TAB, "Augment Rear Shield" },
{ KEY_LEFT, -1, COMPUTER_TAB, "Augment Left Shield" },
{ KEY_RIGHT, -1, COMPUTER_TAB, "Augment Right Shield" },
{ KEY_SCROLLOCK, -1, COMPUTER_TAB, "Transfer Energy Laser->Shield" },
{ KEY_SHIFTED | KEY_SCROLLOCK, -1, COMPUTER_TAB, "Transfer Energy Shield->Laser" },
{ -1, -1, -1, "Show Damage Popup Window" },
{ KEY_Q, 7, COMPUTER_TAB, true, "Equalize Shield" },
{ KEY_UP, -1, COMPUTER_TAB, true, "Augment Forward Shield" },
{ KEY_DOWN, -1, COMPUTER_TAB, true, "Augment Rear Shield" },
{ KEY_LEFT, -1, COMPUTER_TAB, true, "Augment Left Shield" },
{ KEY_RIGHT, -1, COMPUTER_TAB, true, "Augment Right Shield" },
{ KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Laser->Shield" },
{ KEY_SHIFTED | KEY_SCROLLOCK, -1, COMPUTER_TAB, true, "Transfer Energy Shield->Laser" },
{ -1, -1, -1, true, "Show Damage Popup Window" },
{ -1, -1, SHIP_TAB, "Bank When Pressed", CC_TYPE_CONTINUOUS },
{ -1, -1, -1, "Show NavMap" },
{ KEY_ALTED | KEY_E, -1, COMPUTER_TAB, "Add or Remove Escort" },
{ KEY_ALTED | KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, "Clear Escort List" },
{ KEY_E, -1, TARGET_TAB, "Target Next Escort Ship" },
{ KEY_ALTED | KEY_R, -1, TARGET_TAB, "Target Closest Repair Ship" },
{ -1, -1, SHIP_TAB, true, "Bank When Pressed", CC_TYPE_CONTINUOUS },
{ -1, -1, -1, true, "Show NavMap" },
{ KEY_ALTED | KEY_E, -1, COMPUTER_TAB, true, "Add or Remove Escort" },
{ KEY_ALTED | KEY_SHIFTED | KEY_E, -1, COMPUTER_TAB, true, "Clear Escort List" },
{ KEY_E, -1, TARGET_TAB, true, "Target Next Escort Ship" },
{ KEY_ALTED | KEY_R, -1, TARGET_TAB, true, "Target Closest Repair Ship" },
{ KEY_U, -1, TARGET_TAB, "Target Next Uninspected Cargo" },
{ KEY_SHIFTED | KEY_U, -1, TARGET_TAB, "Target Previous Uninspected Cargo" },
{ KEY_N, -1, TARGET_TAB, "Target Newest Ship In Area" },
{ KEY_K, -1, TARGET_TAB, "Target Next Live Turret" },
{ KEY_SHIFTED | KEY_K, -1, TARGET_TAB, "Target Previous Live Turret" },
{ KEY_U, -1, TARGET_TAB, true, "Target Next Uninspected Cargo" },
{ KEY_SHIFTED | KEY_U, -1, TARGET_TAB, true, "Target Previous Uninspected Cargo" },
{ KEY_N, -1, TARGET_TAB, true, "Target Newest Ship In Area" },
{ KEY_K, -1, TARGET_TAB, true, "Target Next Live Turret" },
{ KEY_SHIFTED | KEY_K, -1, TARGET_TAB, true, "Target Previous Live Turret" },
{ KEY_B, -1, TARGET_TAB, "Target Next Hostile Bomb or Bomber" },
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, "Target Previous Hostile Bomb or Bomber" },
{ KEY_B, -1, TARGET_TAB, true, "Target Next Hostile Bomb or Bomber" },
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, true, "Target Previous Hostile Bomb or Bomber" },
// multiplayer messaging keys
{ KEY_1, -1, COMPUTER_TAB, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
{ KEY_2, -1, COMPUTER_TAB, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
{ KEY_3, -1, COMPUTER_TAB, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
{ KEY_4, -1, COMPUTER_TAB, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, "(Multiplayer) Observer zoom to target"},
{ KEY_1, -1, COMPUTER_TAB, true, "(Multiplayer) Message All", CC_TYPE_CONTINUOUS },
{ KEY_2, -1, COMPUTER_TAB, true, "(Multiplayer) Message Friendly", CC_TYPE_CONTINUOUS },
{ KEY_3, -1, COMPUTER_TAB, true, "(Multiplayer) Message Hostile", CC_TYPE_CONTINUOUS },
{ KEY_4, -1, COMPUTER_TAB, true, "(Multiplayer) Message Target", CC_TYPE_CONTINUOUS },
{ KEY_ALTED | KEY_X, -1, COMPUTER_TAB, true, "(Multiplayer) Observer zoom to target"},
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, "Increase time compression" },
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, "Decrease time compression" },
{ KEY_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, true, "Increase time compression" },
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, true, "Decrease time compression" },
{ KEY_L, -1, COMPUTER_TAB, "Toggle high HUD contrast" },
{ KEY_L, -1, COMPUTER_TAB, true, "Toggle high HUD contrast" },
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, "(Multiplayer) Toggle network info"},
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, "(Multiplayer) Self destruct"},
{ KEY_SHIFTED | KEY_N, -1, COMPUTER_TAB, true, "(Multiplayer) Toggle network info"},
{ KEY_SHIFTED | KEY_END, -1, COMPUTER_TAB, true, "(Multiplayer) Self destruct"},
// Misc
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, "Toggle HUD"},
{ KEY_SHIFTED | KEY_3, -1, SHIP_TAB, "Right Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_1, -1, SHIP_TAB, "Left Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, "Up Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, "Down Thrust", CC_TYPE_CONTINUOUS},
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, "Toggle HUD Wireframe Targetbox"},
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, true, "Toggle HUD"},
{ KEY_SHIFTED | KEY_3, -1, SHIP_TAB, true, "Right Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_1, -1, SHIP_TAB, true, "Left Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADPLUS, -1, SHIP_TAB, true, "Up Thrust", CC_TYPE_CONTINUOUS},
{ KEY_SHIFTED | KEY_PADENTER, -1, SHIP_TAB, true, "Down Thrust", CC_TYPE_CONTINUOUS},
{ KEY_ALTED | KEY_SHIFTED | KEY_Q, -1, COMPUTER_TAB, true, "Toggle HUD Wireframe Targetbox"},
#if defined(ENABLE_AUTO_PILOT)
// Auto Navigation Systen
{ KEY_ALTED | KEY_A, -1, COMPUTER_TAB, "Toggle Auto Pilot"},
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, "Cycle Nav Points"},
{ KEY_ALTED | KEY_A, -1, COMPUTER_TAB, false, "Toggle Auto Pilot"},
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, false, "Cycle Nav Points"},
#endif
{ -1, -1, -1, "" }
{ -1, -1, -1, false, "" }
};
char *Scan_code_text_german[] = {
+13 -6
View File
@@ -9,16 +9,22 @@
/*
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.cpp $
* $Revision: 2.11 $
* $Date: 2004-04-26 13:11:11 $
* $Author: taylor $
* $Revision: 2.11 $
* $Date: 2004-04-26 13:11:11 $
* $Author: taylor $
* $Revision: 2.13 $
* $Date: 2004-07-26 20:47:26 $
* $Author: Kazan $
* $Revision: 2.13 $
* $Date: 2004-07-26 20:47:26 $
* $Author: Kazan $
*
* Code for the cutscenes viewer screen
*
* $Log: not supported by cvs2svn $
* Revision 2.12 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.11 2004/04/26 13:11:11 taylor
* mark view cutscenes ignoring extension and file case
*
* Revision 2.10 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -219,6 +225,7 @@
#include "localization/localize.h"
#include "parse/parselo.h"
char *Cutscene_bitmap_name[GR_NUM_RESOLUTIONS] = {
"ViewFootage",
"2_ViewFootage"
+8 -3
View File
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.h $
* $Revision: 2.2 $
* $Date: 2004-03-05 09:01:58 $
* $Author: Goober5000 $
* $Revision: 2.3 $
* $Date: 2004-08-11 05:06:20 $
* $Author: Kazan $
*
* Code for the cutscenes viewer screen
*
* $Log: not supported by cvs2svn $
* Revision 2.2 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -53,6 +57,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
#define _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
+23 -10
View File
@@ -9,13 +9,22 @@
/*
* $Logfile: /Freespace2/code/cutscene/movie.cpp $
* $Revision: 2.20 $
* $Date: 2004-04-26 13:09:20 $
* $Revision: 2.23 $
* $Date: 2004-11-27 10:42:18 $
* $Author: taylor $
*
* movie player code
*
* $Log: not supported by cvs2svn $
* Revision 2.22 2004/07/26 20:47:26 Kazan
* remove MCD complete
*
* Revision 2.21 2004/07/12 16:32:43 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.20 2004/04/26 13:09:20 taylor
* cvs log header, mark cutscenes viewable for later, gr_flip() to fix OGL white flash
*
*
*
* $NoKeywords: $
@@ -32,6 +41,8 @@
#include "cutscene/cutscenes.h" // cutscene_mark_viewable()
#include "freespace2/freespace.h" // for Game_mode, etc.
// This module links freespace movie calls to the actual API calls the play the movie.
// This module handles all the different requires of OS and gfx API and finding the file to play
#ifdef _WIN32
@@ -101,12 +112,6 @@ bool movie_play(char *name)
cutscene_mark_viewable(name);
}
// reset the gr_* stuff before trying to play a movie
// fixes white flash in OGL and possibly other wierd stuff
gr_reset_clip();
gr_clear();
gr_flip();
extern int Is_standalone;
if(Is_standalone) return false;
if(Cmdline_dnoshowvid) return false;
@@ -132,9 +137,13 @@ bool movie_play(char *name)
GlobalD3DVars::D3D_activate = 0;
GlobalD3DVars::lpD3DDevice->EndScene();
GlobalD3DVars::lpD3DDevice->Present(NULL,NULL,NULL,NULL);
d3d_lost_device();
// d3d_lost_device();
}
// reset the gr_* stuff before trying to play a movie
gr_flip(); // in the case of D3D this should recover the device
gr_clear();
// This clears the screen
InvalidateRect((HWND) os_get_window(), NULL, TRUE);
PAINTSTRUCT paint_info;
@@ -217,7 +226,11 @@ bool movie_play(char *name)
// We finished playing the movie
CloseClip((HWND) os_get_window());
GlobalD3DVars::D3D_activate = 1;
if (gr_screen.mode == GR_DIRECT3D) {
GlobalD3DVars::D3D_activate = 1;
}
return true;
}
+2
View File
@@ -1,3 +1,5 @@
#include "PreProcDefines.h"
#ifndef _MOVIE_HEADER_FILE
#define _MOVIE_HEADER_FILE
+128 -107
View File
@@ -1,142 +1,172 @@
#include "ddsutils/ddsutils.h"
#include "cfile/cfile.h"
int Texture_compression_enabled=0;
static int dds_read_header_internal(LPDDSURFACEDESC2 lpddsd, char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels)
int dds_read_header(char *filename, CFILE *img_cfp, int *width, int *height, int *bpp, int *compression_type, int *levels, int *size)
{
DDSURFACEDESC2 dds_header;
char code[5];
CFILE *ddsfile;
char real_name[MAX_FILENAME_LEN];
char *p;
int retval=DDS_ERROR_NONE;
int ct;
int bits=0;
int retval = DDS_ERROR_NONE;
int ct = DDS_UNCOMPRESSED;
int bits = 0;
//this better not happen.. ever
Assert(filename!=NULL);
if (img_cfp == NULL) {
// this better not happen.. ever
Assert(filename != NULL);
//make sure there is an extension
strcpy(real_name, filename);
p=strchr(real_name, '.');
if (p) *p=0;
strcat(real_name, ".dds");
// make sure there is an extension
strcpy(real_name, filename);
char *p = strchr(real_name, '.');
if (p) { *p=0; }
strcat(real_name, ".dds");
memset(code,0,sizeof(code));
//try to open the file
ddsfile = cfopen(real_name, "rb");
// try to open the file
ddsfile = cfopen(real_name, "rb");
//file not found
if (!ddsfile)
{
return DDS_ERROR_INVALID_FILENAME;
// file not found
if (ddsfile == NULL)
return DDS_ERROR_INVALID_FILENAME;
} else {
ddsfile = img_cfp;
}
//read the code
cfread(code,1,4,ddsfile);
code[4]=0;
memset(code, 0, sizeof(code));
//check it
if (strncmp(code,DDS_FILECODE,4)!=0)
{
// read the code
cfread(code, 1, 4, ddsfile);
code[4] = 0;
// check it
if (strncmp(code, DDS_FILECODE, 4) != 0)
return DDS_ERROR_BAD_HEADER;
// read the header
cfread(&dds_header, sizeof(DDSURFACEDESC2), 1, ddsfile);
// calculate the type and size of the data
if (dds_header.ddpfPixelFormat.dwFlags & DDPF_FOURCC) {
*size = dds_header.dwMipMapCount > 1 ? dds_header.dwPitchOrLinearSize * 2 : dds_header.dwPitchOrLinearSize;
switch (dds_header.ddpfPixelFormat.dwFourCC) {
case FOURCC_DXT1:
bits=24;
ct=DDS_DXT1;
break;
case FOURCC_DXT3:
bits=32;
ct=DDS_DXT3;
break;
case FOURCC_DXT5:
bits=32;
ct=DDS_DXT5;
break;
// dxt2 and dxt4 aren't supported
case FOURCC_DXT2:
case FOURCC_DXT4:
retval = DDS_ERROR_INVALID_FORMAT;
ct = DDS_DXT_INVALID;
break;
// none of the above
default:
retval = DDS_ERROR_UNSUPPORTED;
ct = DDS_DXT_INVALID;
break;
}
} else if (dds_header.ddpfPixelFormat.dwFlags & DDPF_RGB) {
if (dds_header.dwDepth == 0)
dds_header.dwDepth = 1;
*size = dds_header.dwWidth * dds_header.dwHeight * dds_header.dwDepth * (dds_header.ddpfPixelFormat.dwRGBBitCount / 8);
bits = dds_header.ddpfPixelFormat.dwRGBBitCount;
ct = DDS_UNCOMPRESSED;
} else {
// it's not a readable format
retval = DDS_ERROR_UNSUPPORTED;
}
//read the header
cfread(lpddsd,sizeof(DDSURFACEDESC2),1,ddsfile);
// stuff important info
if (bpp)
*bpp = bits;
if (compression_type)
*compression_type = ct;
//stuff important info
if (width)
*width = lpddsd->dwWidth;
*width = dds_header.dwWidth;
if (height)
*height = lpddsd->dwHeight;
*height = dds_header.dwHeight;
if (levels)
*levels = lpddsd->dwMipMapCount;
*levels = dds_header.dwMipMapCount;
switch(lpddsd->ddpfPixelFormat.dwFourCC)
{
case FOURCC_DXT1:
bits=24;
ct=DDS_DXT1;
break;
case FOURCC_DXT3:
bits=32;
ct=DDS_DXT3;
break;
case FOURCC_DXT5:
bits=32;
ct=DDS_DXT5;
break;
//dxt2 and dxt4 aren't supported
case FOURCC_DXT2:
case FOURCC_DXT4:
retval=DDS_ERROR_INVALID_FORMAT;
ct=DDS_DXT_INVALID;
break;
//none of the above
default:
retval=DDS_ERROR_UNCOMPRESSED;
ct=DDS_DXT_INVALID;
break;
if (img_cfp == NULL) {
// close file and return
cfclose(ddsfile);
ddsfile = NULL;
}
if (bpp) *bpp=bits;
if (compression_type) *compression_type=ct;
//close file and return
cfclose(ddsfile);
return retval;
}
int dds_read_header(char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels)
{
DDSURFACEDESC2 ddsd;
return dds_read_header_internal(&ddsd, filename, width, height, bpp, compression_type, levels);
}
//reads pixel info from a dds file
int dds_read_bitmap(char *filename, int *size, uint* data)
int dds_read_bitmap(char *filename, ubyte **data, ubyte *bpp)
{
int retval;
DDSURFACEDESC2 ddsd;
int w,h,ct,lvl,bpp;
int w,h,ct,lvl;
int size = 0, bits = 0;
CFILE *cfp;
ubyte* tmp;
char real_name[MAX_FILENAME_LEN];
//this must be set
Assert(size!=NULL);
//read the header -- if its at this stage, it should be legal.
retval=dds_read_header_internal(&ddsd, filename, &w, &h, &bpp, &ct, &lvl);
Assert(retval==DDS_ERROR_NONE);
// this better not happen.. ever
Assert(filename != NULL);
//get some more info from the surface
*size=ddsd.dwMipMapCount > 1 ? ddsd.dwLinearSize * 2 : ddsd.dwLinearSize;
// make sure there is an extension
strcpy(real_name, filename);
char *p = strchr(real_name, '.');
if (p) { *p = 0; }
strcat(real_name, ".dds");
//open it up and go to the data section
cfp=cfopen(filename,"rb");
cfseek(cfp,DDS_OFFSET, CF_SEEK_SET);
// open it up and go to the data section
cfp = cfopen(real_name, "rb");
//get the data
tmp=(ubyte*)malloc(*size);
if (!tmp)
{
cfclose(cfp);
return DDS_ERROR_NO_MEM; //barf
// just in case
if (cfp == NULL)
return DDS_ERROR_INVALID_FILENAME;
// read the header -- if its at this stage, it should be legal.
retval = dds_read_header(real_name, cfp, &w, &h, &bits, &ct, &lvl, &size);
Assert(retval == DDS_ERROR_NONE);
// this really shouldn't be needed but better safe than sorry
if (retval != DDS_ERROR_NONE) {
return retval;
}
cfread(tmp,1,*size,cfp);
cfseek(cfp, DDS_OFFSET, CF_SEEK_SET);
*data=(uint)tmp;
//we look done here
// read in the data
cfread(*data, 1, size, cfp);
if (bpp)
*bpp = (ubyte)bits;
// we look done here
cfclose(cfp);
return DDS_ERROR_NONE;
}
@@ -160,8 +190,8 @@ const char *dds_error_string(int code)
case DDS_ERROR_INVALID_FORMAT:
return "File was compressed, but it was DXT2 or DXT4";
case DDS_ERROR_UNCOMPRESSED:
return "*.DDS files must be compressed and use DXT1, DXT3, or DXT5 compression";
case DDS_ERROR_UNSUPPORTED:
return "*.DDS files must be uncompressed or use DXT1, DXT3, or DXT5 compression";
default:
return "Abort, retry, fail?";
@@ -170,12 +200,3 @@ const char *dds_error_string(int code)
//get a warning otherwise
return "Abort, retry, fail?";
}
+18 -46
View File
@@ -4,18 +4,24 @@
#ifndef __DDS_H
#define __DDS_H
#include "PreProcDefines.h"
#include "globalincs/pstypes.h"
#ifdef _WIN32
#include "directx/vddraw.h"
#endif
struct CFILE;
#define DDS_ERROR_NONE 0 //everything went fine
#define DDS_ERROR_INVALID_FILENAME 1 //bad filename
#define DDS_ERROR_NO_MEM 2 //not enough mem to load
#define DDS_ERROR_UNCOMPRESSED 3 //not using dxtc compression
#define DDS_ERROR_UNSUPPORTED 3 //not a readable format
#define DDS_ERROR_INVALID_FORMAT 4 //can only use dxtc1, dxtc3, dxtc5
#define DDS_ERROR_BAD_HEADER 5 //header was not "DDS "
#define DDS_DXT_INVALID -1
#define DDS_UNCOMPRESSED 0
#define DDS_DXT1 1
#define DDS_DXT3 3
#define DDS_DXT5 5
@@ -43,18 +49,12 @@
#endif
#endif
//these structures are the headers for a dds file
typedef struct _DDSCAPS2
{
DWORD dwCaps; // capabilities of surface wanted
DWORD dwCaps2;
DWORD dwCaps3;
union
{
DWORD dwCaps4;
DWORD dwVolumeDepth;
} DUMMYUNIONNAMEN(1);
DWORD dwCaps1;
DWORD dwCaps2;
DWORD Reserved[2];
} DDSCAPS2;
typedef struct _DDSURFACEDESC2
@@ -63,41 +63,13 @@ typedef struct _DDSURFACEDESC2
DWORD dwFlags; // determines what fields are valid
DWORD dwHeight; // height of surface to be created
DWORD dwWidth; // width of input surface
union
{
LONG lPitch; // distance to start of next line (return value only)
DWORD dwLinearSize; // Formless late-allocated optimized surface size
} DUMMYUNIONNAMEN(1);
union
{
DWORD dwBackBufferCount; // number of back buffers requested
DWORD dwDepth; // the depth if this is a volume texture
} DUMMYUNIONNAMEN(5);
union
{
DWORD dwMipMapCount; // number of mip-map levels requestde
// dwZBufferBitDepth removed, use ddpfPixelFormat one instead
DWORD dwRefreshRate; // refresh rate (used when display mode is described)
DWORD dwSrcVBHandle; // The source used in VB::Optimize
} DUMMYUNIONNAMEN(2);
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
DWORD dwReserved; // reserved
LPVOID lpSurface; // pointer to the associated surface memory
union
{
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces
} DUMMYUNIONNAMEN(3);
DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
union
{
DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
DWORD dwFVF; // vertex format description of vertex buffers
} DUMMYUNIONNAMEN(4);
DWORD dwPitchOrLinearSize;
DWORD dwDepth;
DWORD dwMipMapCount;
DWORD dwReserved1[11];
DDPIXELFORMAT ddpfPixelFormat;
DDSCAPS2 ddsCaps; // direct draw surface capabilities
DWORD dwTextureStage; // stage in multitexture cascade
DWORD dwReserved2;
} DDSURFACEDESC2, FAR* LPDDSURFACEDESC2;
#define DDS_OFFSET 4+sizeof(DDSURFACEDESC2) //place where the data starts -- should be 128
@@ -105,11 +77,11 @@ typedef struct _DDSURFACEDESC2
//reads a dds header
//returns one of the error values
//'compression_type' comes back as one of the DDS_DXTC* defines
int dds_read_header(char *filename, int *width, int *height, int *bpp, int *compression_type, int *levels);
int dds_read_header(char *filename, CFILE *img_cfp = NULL, int *width = 0, int *height = 0, int *bpp = 0, int *compression_type = 0, int *levels = 0, int *size = 0);
//reads bitmap
//size of the data it stored in size
int dds_read_bitmap(char *filename, int *size, uint* data);
int dds_read_bitmap(char *filename, ubyte **data, ubyte *bpp);
//returns a string from a DDS error code
const char* dds_error_string(int code);
+19 -3
View File
@@ -9,13 +9,25 @@
/*
* $Logfile: /Freespace2/code/Debris/Debris.cpp $
* $Revision: 2.6 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 2.9 $
* $Date: 2004-07-26 20:47:26 $
* $Author: Kazan $
*
* Code for the pieces of exploding object debris.
*
* $Log: not supported by cvs2svn $
* Revision 2.8 2004/07/12 16:32:44 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.7 2004/07/01 01:52:20 phreak
* function pointer radar update.
* will enable us to make different radar styles that we can switch between
*
* Revision 2.6 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 2.5 2004/03/05 09:01:59 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -252,6 +264,7 @@
#include "io/timer.h"
#include "species_defs/species_defs.h"
#include "ship/ship.h"
#include "radar/radarsetup.h"
#ifndef NO_NETWORK
#include "network/multi.h"
@@ -259,6 +272,9 @@
#include "network/multiutil.h"
#endif
#define MAX_LIFE 10.0f
#define MIN_RADIUS_FOR_PERSISTANT_DEBRIS 50 // ship radius at which debris from it becomes persistant
#define DEBRIS_SOUND_DELAY 2000 // time to start debris sound after created
+8 -3
View File
@@ -9,13 +9,17 @@
/*
* $Logfile: /Freespace2/code/Debris/Debris.h $
* $Revision: 2.1 $
* $Date: 2004-03-05 09:01:59 $
* $Author: Goober5000 $
* $Revision: 2.2 $
* $Date: 2004-08-11 05:06:20 $
* $Author: Kazan $
*
* Code for the pieces of exploding object debris.
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2004/03/05 09:01:59 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -141,6 +145,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _DEBRIS_H
#define _DEBRIS_H
+11 -3
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/DebugConsole/Console.cpp $
* $Revision: 2.3 $
* $Date: 2004-03-05 09:01:58 $
* $Author: Goober5000 $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:27 $
* $Author: Kazan $
*
* Routines for managing the debug console window.
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/12 16:32:44 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.3 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.2 2003/03/18 10:07:01 unknownplayer
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
*
@@ -124,6 +131,7 @@
#include "osapi/osapi.h"
#include "debugconsole/dbugfile.h"
#define MAX_COMMANDS 300
static int Num_debug_commands = 0;
+2
View File
@@ -9,6 +9,8 @@
#include "dbugfile.h"
#pragma warning(disable:4711) // function selected for inlining
int dbugfile_counters[MAX_COUNTERS];
+2
View File
@@ -1,3 +1,5 @@
#include "PreProcDefines.h"
#ifndef _DBUGFILE_HEADER_
#define _DBUGFILE_HEADER_
+1
View File
@@ -20,6 +20,7 @@
#include "timerbar.h"
#include "globalincs\pstypes.h"
// Internal structure for handling frame data
typedef struct
{
+11 -3
View File
@@ -8,11 +8,18 @@
/*
* $Logfile: /Freespace2/code/debugconsole/timerbar.h $
* $Revision: 1.8 $
* $Date: 2004-02-16 11:47:31 $
* $Author: randomtiger $
* $Revision: 1.9 $
* $Date: 2004-08-11 05:06:20 $
* $Author: Kazan $
*
* $Log: not supported by cvs2svn $
* Revision 1.8 2004/02/16 11:47:31 randomtiger
* Removed a lot of files that we dont need anymore.
* Changed htl to be on by default, command now -nohtl
* Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system.
* Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing.
* Removed old dshow code and took away timerbar compile flag condition since it uses a runtime flag now.
*
* Revision 1.7 2003/11/19 20:37:23 randomtiger
* Almost fully working 32 bit pcx, use -pcx32 flag to activate.
* Made some commandline variables fit the naming standard.
@@ -43,6 +50,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _TIMERBAR_HEADER_
#define _TIMERBAR_HEADER_
File diff suppressed because it is too large. Load diff
+83 -51
View File
@@ -1,14 +1,27 @@
//header file for makeing decals-Bobboau
//header file for making decals-Bobboau
#include "PreProcDefines.h"
#ifndef _DECAL_H
#define _DECAL_H
#define MAX_DECAL_POLY 20
#include "object/object.h"
//#define DECALS_ENABLED
#define MAX_DECAL_POLY 40
#define MAX_DECAL_POLY_POINT 10
#define MAX_DECAL_DEFPOINTS 1000
#define MAX_DECAL_DEFPOINTS 10000
#define MAX_DECAL_POINT 10
#define MAX_SHIP_DECALS 25
#define MAX_GLOBAL_DECAL_POLYS 11000
#define QUICKFIND_SUBDIVISION 100
#define QUICKFIND_SEGMENT_LENGTH (MAX_GLOBAL_DECAL_POLYS/QUICKFIND_SUBDIVISION)
#define MAX_GLOBAL_DECALS 5000
#include "globalincs/pstypes.h"
//#include "ship/ship.h"
#define DP_EOF 0
#define DP_DEFPOINTS 1
@@ -17,63 +30,82 @@
#define DP_SORTNORM 4
#define DP_BOUNDBOX 5
typedef struct decal_model{ //this will store a triangulated version of the ships polygons
struct{
int point[3]; //an index to the vert list-Bobboau
vector center; //the center of the poly
float radius; //the max radius of the poly
}poly[MAX_DECAL_POLY];
vector vert[MAX_DECAL_DEFPOINTS]; //the defpoints-Bobboau
int n_polys;
}decal_model;
struct decal;
struct decal_list;
struct decal_list_controle;
//extern decal_model d_model;
struct decal_poly{
vector norm[3];
vertex point[3];
decal_poly *next;
decal* parent;
int idx;
};
typedef struct decal{
struct{
int backfaced; //flag that this poly uses the backfaced texture
uv_pair uv[MAX_DECAL_POLY_POINT]; //uv coordanants
int point[MAX_DECAL_POLY_POINT]; //an index to the vert list-Bobboau
int n_poly;
vector norm; //the normal used for lighting
}poly[MAX_DECAL_POLY];
vector position;
struct decal{
int n_poly;
int timestamp; //when this decal was created
int burn_time; //how long it takes for the glow texture to fade
int vertex_buffer_start; //were is the start of this decal's polys in the vertex buffer
decal_poly* poly;
decal_poly* add_poly();
decal_poly* get_last_poly();
void remove_last_poly();
decal_list_controle *parent;
};
struct decal_list{
decal dec;
decal_list *next;
};
struct decal_item{
decal_list dec;
bool used;
};
struct decal_list_controle{
int n_decals;
int buffer;
int texture;
int n_poly;
int burn_texture;
int glow_texture;
bool modifyed;
decal_list *d_list;
decal_list *end;
decal_list *add_new();
void trim();
void clear();
~decal_list_controle();
decal_list_controle();
};
struct decal_system{
decal_list_controle *decals;
int n_decal_textures;
bool decals_modified;
int max_decals;
decal_system():decals(NULL),n_decal_textures(0),decals_modified(false){};
};
//this is used to give all the data to the generation data to the functions that make them
struct decal_point{
vector pnt;
matrix orient;
float radius;
int submodel_parent; //the submodel this is part of
vector vert[1000]; //the defpoints-Bobboau
int frames; //number of frames in an animation
int fps; //frames per second
int starting_keyframe; //the frame that indicates the end of the inital nonlooped portion and the start of the middle looped part
int ending_keyframe; //the frame that indicates the end of the loopable portion and the start of the end part
int texture; //the texture to be used, first in animation
int backfaced_texture; //the texture to be used by backfaced polys, first in animation
int is_valid; //this means it is a good decal that should be rendered-Bobboau
int n_poly; //the number of polys
int timestamp; //this is when the decal was made-Bobboau
int lifetime; //this is how long the decal should be alive for-Bobboau
int importance; //this is for big things large beam marks and bomb craters should last longer than the odd laser impacts-Bobboau
int state; //1 starting, 2 looping(mostly for beams), 3 ending, 4 static
}decal;
};
typedef struct decal_point{
vector pnt;
matrix orient;
float radius;
}decal_point;
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1);//makes the decal
#endif
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture = -1, int glow_texture = -1, int burn_texture = -1, int burn_time = 1000);//makes the decal
int decal_create_simple(object * obj, decal_point *point, int texture);//makes a simple non-clipped decal
void decal_render_all(object * obj); //renders all decals
int decal_create(object * obj, decal_point *point, int subobject, int texture, int backfaced_texture);//makes the decal
int decal_create_sub(void *model_ptr);
/*
void clear_decals(decal_system *system);
int decal_is_in_face(int n, vertex vertlist[n]);//sees if a poly is inside a decal: 0 is yes, 1 is sort of, -1 is no
*/
#endif
+12 -3
View File
@@ -9,12 +9,19 @@
/*
* $Logfile: /Freespace2/code/Demo/Demo.cpp $
* $Revision: 2.3 $
* $Date: 2004-03-05 09:01:59 $
* $Author: Goober5000 $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:27 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/12 16:32:45 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.3 2004/03/05 09:01:59 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.2 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -64,6 +71,8 @@
#include "ship/shiphit.h"
#include "cfile/cfile.h"
// -----------------------------------------------------------------------------------------------------------------------------
// DEMO DEFINES/VARS
//
+8 -3
View File
@@ -9,12 +9,15 @@
/*
* $Logfile: /Freespace2/code/Demo/Demo.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2004-08-11 05:06:21 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -31,6 +34,8 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
#define _FS2_DEMO_SYSTEM_HEADER_FILE
+5 -3
View File
@@ -9,7 +9,8 @@
#include <commctrl.h>
#include <commdlg.h>
#include <tchar.h>
#include <atlbase.h>
//#include <atlbase.h> // No dependecy on ATL!!!
enum PLAYSTATE {Stopped, Paused, Running, Init};
@@ -93,7 +94,7 @@ BOOL IsAudioOnly()
HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
{
USES_CONVERSION;
// USES_CONVERSION;
WCHAR wFile[MAX_PATH];
HRESULT hr;
@@ -101,7 +102,8 @@ HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
UpdateWindow(ghApp);
// Convert filename to wide character string
wcscpy(wFile, T2W(szFile));
// wcscpy(wFile, T2W(szFile)); // requires ATL
swprintf(wFile, L"%s", szFile); // Uses libc to convert instead
// Get the interface for DirectShow's GraphBuilder
JIF(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
+2
View File
@@ -1,3 +1,5 @@
#include "PreProcDefines.h"
#ifndef _DX8SHOW_HEADER_FILE
#define _DX8SHOW_HEADER_FILE
+2
View File
@@ -5,6 +5,8 @@
* File: async.h
* Content: AsyncData object include file
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __ASYNC_INCLUDED__
#define __ASYNC_INCLUDED__
+1
View File
@@ -7,6 +7,7 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef _D3DTYPES_H_
#define _D3DTYPES_H_
+1
View File
@@ -7,6 +7,7 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DDRAW_INCLUDED__
#define __DDRAW_INCLUDED__
+1
View File
@@ -7,6 +7,7 @@
*
****************************************************************************/
#include "PreProcDefines.h"
#ifndef __DINPUT_INCLUDED__
#define __DINPUT_INCLUDED__
+1
View File
@@ -7,6 +7,7 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DPLAY_INCLUDED__
#define __DPLAY_INCLUDED__
+2
View File
@@ -5,6 +5,8 @@
* File: dplobby.h
* Content: DirectPlayLobby include file
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DPLOBBY_INCLUDED__
#define __DPLOBBY_INCLUDED__
+2
View File
@@ -6,6 +6,8 @@
* Content: DirectXSetup, error codes and flags
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DSETUP_H__
#define __DSETUP_H__
+2
View File
@@ -7,6 +7,8 @@
*
**************************************************************************/
#include "PreProcDefines.h"
#ifndef __DSOUND_INCLUDED__
#define __DSOUND_INCLUDED__
+2
View File
@@ -7,6 +7,8 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DVP_INCLUDED__
#define __DVP_INCLUDED__
#if defined( _WIN32 ) && !defined( _NO_COM )
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.cpp $
* $Revision: 2.5 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 2.7 $
* $Date: 2004-07-26 20:47:27 $
* $Author: Kazan $
*
* Main file for dealing with exception handling
*
* $Log: not supported by cvs2svn $
* Revision 2.6 2004/07/12 16:32:45 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.5 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 2.4 2004/03/06 23:28:22 bobboau
* fixed motion debris
* animated laser textures
@@ -68,6 +76,8 @@ on how to hook it in.
#include <windows.h>
#pragma warning(disable:4711) // function selected for inlining
// --------------------
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.h $
* $Revision: 2.1 $
* $Date: 2002-07-07 19:55:58 $
* $Author: penguin $
* $Revision: 2.2 $
* $Date: 2004-08-11 05:06:22 $
* $Author: Kazan $
*
* Header file for program exception handling
*
* $Log: not supported by cvs2svn $
* Revision 2.1 2002/07/07 19:55:58 penguin
* Back-port to MSVC
*
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
@@ -35,6 +38,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifdef _MSC_VER
#pragma once // Include this file only once
#endif
+39 -5
View File
@@ -9,13 +9,38 @@
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.cpp $
* $Revision: 2.12 $
* $Date: 2004-05-12 22:49:14 $
* $Author: phreak $
* $Revision: 2.19 $
* $Date: 2004-11-01 20:57:03 $
* $Author: taylor $
*
* Code to move, render and otherwise deal with fireballs.
*
* $Log: not supported by cvs2svn $
* Revision 2.18 2004/10/31 02:26:15 Goober5000
* whoops
* --Goober5000
*
* Revision 2.17 2004/10/31 02:04:33 Goober5000
* added Knossos_warp_ani_used flag for taylor
* --Goober5000
*
* Revision 2.16 2004/09/17 07:12:22 Goober5000
* changed around the logic for the 3D warp effect
* --Goober5000
*
* Revision 2.15 2004/08/23 04:32:39 Goober5000
* warp effect is back to FS2 default
* --Goober5000
*
* Revision 2.14 2004/07/26 20:47:28 Kazan
* remove MCD complete
*
* Revision 2.13 2004/07/12 16:32:45 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.12 2004/05/12 22:49:14 phreak
* renamed the warp model variable from 'wm' to 'Warp_model'
*
* Revision 2.11 2004/03/17 04:07:29 bobboau
* new fighter beam code
* fixed old after burner trails
@@ -388,7 +413,9 @@
#include "cmdline/cmdline.h"
#include "parse/parselo.h"
int Warp_model;
int Knossos_warp_ani_used;
#define WARPHOLE_GROW_TIME (3.5f) // time for warphole to reach max size (also time to shrink to nothing once it begins to shrink)
@@ -564,6 +591,9 @@ void fireball_init()
Fireballs[i].objnum = -1;
}
// Goober5000 - reset Knossos warp flag
Knossos_warp_ani_used = 0;
mprintf(("loading warp model"));
Warp_model = -1;
Warp_model = model_load("warp.pof", 0, NULL, 0);
@@ -652,7 +682,7 @@ void fireball_render(object * obj)
// obj->alt_rad = rad;
warpin_render(obj, &obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius, (Fireballs[num].flags & FBF_WARP_FORCE_OLD) );
warpin_render(obj, &obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius, (Fireballs[num].flags & FBF_WARP_3D) );
}
break;
@@ -1191,7 +1221,11 @@ void fireballs_page_in()
for ( i = 0; i < MAX_FIREBALL_TYPES ; i++ ) {
fd = &Fireball_info[i];
for(idx=0; idx<fd->lod_count; idx++){
// if this is a Knossos ani, only load if Knossos_warp_ani_used is true
if ( (i == FIREBALL_KNOSSOS_EFFECT) && !Knossos_warp_ani_used)
continue;
for(idx=0; idx<fd->lod_count; idx++) {
bm_page_in_texture( fd->lod[idx].bitmap_id, fd->lod[idx].num_frames );
}
}
+23 -5
View File
@@ -9,13 +9,27 @@
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.h $
* $Revision: 2.7 $
* $Date: 2004-05-12 22:49:13 $
* $Author: phreak $
* $Revision: 2.11 $
* $Date: 2004-10-31 02:04:33 $
* $Author: Goober5000 $
*
* Prototypes for fireball functions
*
* $Log: not supported by cvs2svn $
* Revision 2.10 2004/09/17 07:12:22 Goober5000
* changed around the logic for the 3D warp effect
* --Goober5000
*
* Revision 2.9 2004/08/23 04:32:39 Goober5000
* warp effect is back to FS2 default
* --Goober5000
*
* Revision 2.8 2004/08/11 05:06:22 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.7 2004/05/12 22:49:13 phreak
* renamed the warp model variable from 'wm' to 'Warp_model'
*
* Revision 2.6 2004/03/17 04:07:29 bobboau
* new fighter beam code
* fixed old after burner trails
@@ -184,6 +198,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FIREBALLS_H
#define _FIREBALLS_H
@@ -220,7 +235,7 @@ typedef struct fireball_info {
#define FBF_WARP_CLOSE_SOUND_PLAYED (1<<0)
#define FBF_WARP_CAPITAL_SIZE (1<<1)
#define FBF_WARP_CRUISER_SIZE (1<<2)
#define FBF_WARP_FORCE_OLD (1<<3) // Goober5000
#define FBF_WARP_3D (1<<3) // Goober5000
#define FBF_WARP_VIA_SEXP (1<<4) // Goober5000
typedef struct fireball {
@@ -265,9 +280,12 @@ float fireball_lifeleft( object *obj );
float fireball_lifeleft_percent( object *obj );
// internal function to draw warp grid.
extern void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int force_old = 0 );
extern void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d = 0 );
extern int Warp_glow_bitmap; // Internal
extern int Warp_model;
// Goober5000
extern int Knossos_warp_ani_used;
#endif /* _FIREBALLS_H */
+97 -55
View File
@@ -9,13 +9,39 @@
/*
* $Logfile: /Freespace2/code/Fireball/WarpInEffect.cpp $
* $Revision: 2.15 $
* $Date: 2004-05-12 22:49:13 $
* $Author: phreak $
* $Revision: 2.22 $
* $Date: 2004-11-23 19:29:13 $
* $Author: taylor $
*
* Code for rendering the warp in effects for ships
*
* $Log: not supported by cvs2svn $
* Revision 2.21 2004/09/17 07:12:22 Goober5000
* changed around the logic for the 3D warp effect
* --Goober5000
*
* Revision 2.20 2004/08/23 04:32:39 Goober5000
* warp effect is back to FS2 default
* --Goober5000
*
* Revision 2.19 2004/07/26 20:47:28 Kazan
* remove MCD complete
*
* Revision 2.18 2004/07/17 09:29:13 taylor
* make old warpmap and new glow bitmap 3D unlit to render right in OGL
*
* Revision 2.17 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.16 2004/07/05 05:09:18 bobboau
* FVF code, only the data that is needed is sent off to the card,,
* OGL can take advantage of this if they want but it won't break
* anything if they don't. also state block code has been implemented,
* that's totaly internal to D3D no high level code is involved.
*
* Revision 2.15 2004/05/12 22:49:13 phreak
* renamed the warp model variable from 'wm' to 'Warp_model'
*
* Revision 2.14 2004/05/08 01:08:48 Goober5000
* small fix
* --Goober5000
@@ -189,7 +215,10 @@
#include "Nebula/Neb.h"
#include "globalincs/pstypes.h"
extern int Warp_model;
extern int Cmdline_nohtl;
extern int Cmdline_3dwarp;
DCF(norm,"normalize a zero length vector")
{
@@ -215,7 +244,7 @@ void draw_face( vertex *v1, vertex *v2, vertex *v3 )
vertlist[2] = v3;
}
g3_draw_poly( 3, vertlist, TMAP_FLAG_TEXTURED );
g3_draw_poly( 3, vertlist, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
}
@@ -223,7 +252,7 @@ void draw_face( vertex *v1, vertex *v2, vertex *v3 )
#define wR_VERTICES() do { g3_rotate_vertex(verts[0], &bottom1); g3_rotate_vertex(verts[1], &bottom2); g3_rotate_vertex(verts[2], &top2); g3_rotate_vertex(verts[3], &top1); } while(0);
#define wP_VERTICES() do { for(idx=0; idx<4; idx++){ g3_project_vertex(verts[idx]); } } while(0);
void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int force_old)
void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius, int warp_3d)
{
int i;
@@ -242,7 +271,62 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
vector vecs[5];
vertex verts[5];
if(Warp_model > -1 && !force_old && !(The_mission.flags & MISSION_FLAG_OLD_WARP_EFFECT)){
vecs[4] = center; //this is for the warp glow-Bobboau
verts[4].u = 0.5f; verts[4].v = 0.5f;
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[4], &vecs[4] );
} else {
g3_transfer_vertex( &verts[4], &vecs[4] );
}
if ( Warp_glow_bitmap != -1 ) {
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, (The_mission.flags & MISSION_FLAG_FULLNEB)?(1.0f - neb2_get_fog_intensity(obj)):1.0f );
float r = radius;
int render_it;
#define OUT_PERCENT1 0.80f
#define OUT_PERCENT2 0.90f
#define IN_PERCENT1 0.10f
#define IN_PERCENT2 0.20f
if ( life_percent < IN_PERCENT1 ) {
// do nothing
render_it = 0;
} else if ( life_percent < IN_PERCENT2 ) {
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
render_it = 1;
} else if ( life_percent < OUT_PERCENT1 ) {
// do nothing
render_it = 1;
} else if ( life_percent < OUT_PERCENT2 ) {
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
render_it = 1;
} else {
// do nothing
render_it = 0;
}
if (render_it) {
int saved_gr_zbuffering = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_READ);
// Add in noise
//float Noise[NOISE_NUM_FRAMES] = {
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
r *= (0.40f + Noise[noise_frame]*0.30f);
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
gr_zbuffer_set(saved_gr_zbuffering);
}
}
if(Warp_model > -1 && (warp_3d || (The_mission.flags & MISSION_FLAG_3D_WARP_EFFECT) || Cmdline_3dwarp))
{
float model_Interp_scale_x = radius /20;
float model_Interp_scale_y = radius /20;
float model_Interp_scale_z = radius /20;
@@ -303,9 +387,6 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
gr_set_cull(1);
*/
vecs[4] = center; //this is for the warp glow-Bobboau
verts[4].u = 0.5f; verts[4].v = 0.5f;
g3_rotate_vertex( &verts[4], &vecs[4] );
}else{
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
@@ -336,59 +417,20 @@ void warpin_render(object *obj, matrix *orient, vector *pos, int texture_bitmap_
verts[4].u = 0.5f; verts[4].v = 0.5f;
for (i=0; i<5; i++ ) {
g3_rotate_vertex( &verts[i], &vecs[i] );
if (Cmdline_nohtl) {
g3_rotate_vertex( &verts[i], &vecs[i] );
} else {
g3_transfer_vertex( &verts[i], &vecs[i] );
}
}
gr_set_cull(0); // fixes rendering problem in D3D - taylor
draw_face( &verts[0], &verts[4], &verts[1] );
draw_face( &verts[1], &verts[4], &verts[2] );
draw_face( &verts[4], &verts[3], &verts[2] );
draw_face( &verts[0], &verts[3], &verts[4] );
gr_set_cull(1);
}
if ( Warp_glow_bitmap != -1 ) {
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, (The_mission.flags & MISSION_FLAG_FULLNEB)?(1.0f - neb2_get_fog_intensity(obj)):1.0f );
float r = radius;
int render_it;
#define OUT_PERCENT1 0.80f
#define OUT_PERCENT2 0.90f
#define IN_PERCENT1 0.10f
#define IN_PERCENT2 0.20f
if ( life_percent < IN_PERCENT1 ) {
// do nothing
render_it = 0;
} else if ( life_percent < IN_PERCENT2 ) {
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
render_it = 1;
} else if ( life_percent < OUT_PERCENT1 ) {
// do nothing
render_it = 1;
} else if ( life_percent < OUT_PERCENT2 ) {
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
render_it = 1;
} else {
// do nothing
render_it = 0;
}
if (render_it) {
int saved_gr_zbuffering = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_READ);
// Add in noise
//float Noise[NOISE_NUM_FRAMES] = {
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
r *= (0.40f + Noise[noise_frame]*0.30f);
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED );
gr_zbuffer_set(saved_gr_zbuffering);
}
}
gr_zbuffer_set( saved_gr_zbuffering );
}
+277 -41
View File
@@ -9,13 +9,101 @@
/*
* $Logfile: /Freespace2/code/Freespace2/FreeSpace.cpp $
* $Revision: 2.91 $
* $Date: 2004-05-03 21:22:20 $
* $Author: Kazan $
* $Revision: 2.116 $
* $Date: 2004-12-25 09:28:41 $
* $Author: wmcoolmon $
*
* Freespace main body
*
* $Log: not supported by cvs2svn $
* Revision 2.115 2004/12/25 09:24:54 wmcoolmon
* Fix to modular tables workaround with Fs2NetD
*
* Revision 2.114 2004/12/10 17:21:00 taylor
* dymanic allocation of Personas
*
* Revision 2.113 2004/12/02 11:18:14 taylor
* make OGL use same gamma reg setting as D3D since it's the same ramp
* have OGL respect the -no_set_gamma cmdline option
* reset gamma to default on OGL exit to make sure the desktop doesn't stay wrong
*
* Revision 2.112 2004/11/26 08:41:11 taylor
* couple of LAN game vs. FS2NetD fixes
*
* Revision 2.111 2004/10/31 21:31:34 taylor
* bump COUNT_ESTIMATE, reset time compression at the start of a mission, new pilot file support, add feature_disabled popup
*
* Revision 2.110 2004/08/23 07:48:08 Goober5000
* fix0red some warnings
* --Goober5000
*
* Revision 2.109 2004/08/05 02:15:27 phreak
* forgot to commit orb change
*
* Revision 2.108 2004/07/26 21:19:05 Goober5000
* updated launcher link
* --Goober5000
*
* Revision 2.107 2004/07/26 20:47:28 Kazan
* remove MCD complete
*
* Revision 2.106 2004/07/26 17:54:04 Kazan
* Autopilot system completed -- i am dropping plans for GUI nav map
* All builds should have ENABLE_AUTO_PILOT defined from now on (.dsp's i am committing reflect this) the system will only be noticed if the mission designer brings it online by defining a nav point
* Fixed FPS counter during time compression
*
* Revision 2.105 2004/07/18 04:07:26 Kazan
* nothing major
*
* Revision 2.104 2004/07/17 18:46:06 taylor
* various OGL and memory leak fixes
*
* Revision 2.103 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.102 2004/07/12 03:19:15 Kazan
* removed a couple pointless useless messages from the debug console
*
* Revision 2.101 2004/07/11 03:22:47 bobboau
* added the working decal code
*
* Revision 2.100 2004/07/08 22:08:21 wmcoolmon
* Moved set_current_hud, as well as added a conditional to hud_positions_it; it shouldn't and won't be executed on a standalone server.
*
* Revision 2.99 2004/07/01 16:38:18 Kazan
* working on autonav
*
* Revision 2.98 2004/07/01 02:06:31 phreak
* function pointer radar update.
* will enable us to make different radar styles that we can switch between
*
* Revision 2.97 2004/07/01 01:12:31 bobboau
* implemented index buffered background bitmaps,
* OGL people you realy should get this implemented
*
* Revision 2.96 2004/06/22 23:14:09 wmcoolmon
* Nonworking OGG support for sound (not music) added, disabled load-only-used-weapons code, modification to sound system registry code.
* OGG code has been commented out, so you don't need the SDK yet.
*
* Revision 2.95 2004/06/19 12:45:47 randomtiger
* Changed startup code to catch D3D9 request from launcher.
* No actual startup code has been implemented.
*
* Revision 2.94 2004/06/18 04:59:53 wmcoolmon
* Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values
*
* Revision 2.93 2004/05/30 08:04:48 wmcoolmon
* Final draft of the HUD parsing system structure. May change how individual coord positions are specified in the TBL. -C
*
* Revision 2.92 2004/05/27 00:49:25 wmcoolmon
* Made HUD.tbl obsolete. Info is now taken directly from $Shield_icon in ships.tbl
* Now this table can be used for something more useful...say, hud gauge positions?
*
* Revision 2.91 2004/05/03 21:22:20 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.90 2004/04/27 20:41:58 taylor
* add NULL check to game_hacked_data() to prevent crash
*
@@ -975,6 +1063,7 @@ static const char RCS_Name[] = "$Name: not supported by cvs2svn $";
#include "hud/hudmessage.h"
#include "hud/hudshield.h"
#include "hud/hudtargetbox.h"
#include "hud/hudparse.h"
#include "io/joy.h"
#include "io/joy_ff.h"
#include "io/key.h"
@@ -1047,6 +1136,7 @@ static const char RCS_Name[] = "$Name: not supported by cvs2svn $";
#include "weapon/muzzleflash.h"
#include "weapon/shockwave.h"
#include "weapon/weapon.h"
#include "radar/radarsetup.h"
#if defined(ENABLE_AUTO_PILOT)
#include "autopilot/autopilot.h"
@@ -1071,6 +1161,8 @@ extern int Om_tracker_flag; // needed for FS2OpenPXO config
#endif
#ifdef NDEBUG
#ifdef FRED
#error macro FRED is defined when trying to build release Fred. Please undefine FRED macro in build settings
@@ -1115,6 +1207,8 @@ void multi_spew_table_checksums(int max_files, char *outfile);
extern bool frame_rate_display;
bool cube_map_drawen = false;
void game_level_init(int seed = -1);
void game_post_level_init();
void game_do_frame();
@@ -1508,7 +1602,7 @@ float Game_shudder_intensity = 0.0f; // should be between 0.0 and 100.0
#ifndef NO_SOUND
// EAX stuff
sound_env Game_sound_env;
sound_env Game_default_sound_env = {SND_ENV_GENERIC, 0.2F,0.2F,1.0F};
sound_env Game_default_sound_env = {SND_ENV_BATHROOM, 0.2F,0.2F,1.0F};
int Game_sound_env_update_timestamp;
#endif
@@ -1881,7 +1975,6 @@ void game_level_close()
// De-Initialize the game subsystems
sexp_music_close(); // Goober5000
message_mission_shutdown();
event_music_level_close();
game_stop_looped_sounds();
snd_stop_all();
@@ -1890,6 +1983,7 @@ void game_level_close()
#endif
gamesnd_unload_gameplay_sounds(); // unload gameplay sounds from memory
anim_level_close(); // stop and clean up any anim instances
message_mission_shutdown(); // called after anim_level_close() to make sure instances are clear
shockwave_level_close();
fireball_level_close();
shield_hit_close();
@@ -1901,12 +1995,13 @@ void game_level_close()
ct_level_close();
beam_level_close();
mflash_level_close();
mission_brief_common_reset(); // close out parsed briefing/mission stuff
audiostream_unpause_all();
Game_paused = 0;
}
void init_decals();
// intializes game stuff and loads the mission. Returns 0 on failure, 1 on success
// input: seed => DEFAULT PARAMETER (value -1). Only set by demo playback code.
void game_level_init(int seed)
@@ -1954,6 +2049,12 @@ void game_level_init(int seed)
model_free_all(); // Free all existing models
mission_brief_common_init(); // Free all existing briefing/debriefing text
weapon_level_init();
init_decals();
#if defined(ENABLE_AUTO_PILOT)
NavSystem_Init(); // zero out the nav system
#endif
ai_level_init(); // Call this before ship_init() because it reads ai.tbl.
ship_level_init();
player_level_init();
@@ -1992,9 +2093,7 @@ void game_level_init(int seed)
ssm_level_init();
supernova_level_init();
#if defined(ENABLE_AUTO_PILOT)
NavSystem_Init(); // zero out the nav system
#endif
// multiplayer dogfight hack
dogfight_blown = 0;
@@ -2010,6 +2109,10 @@ void game_level_init(int seed)
// campaign wasn't ended
Campaign_ended_in_mission = 0;
cube_map_drawen = false;
}
// called when a mission is over -- does server specific stuff.
@@ -2105,7 +2208,8 @@ void game_post_level_init()
// of game_busy_callback(NULL), which I conveniently print out to the
// debug output window with the '=== ENDING LOAD ==' stuff.
//#define COUNT_ESTIMATE 3706
#define COUNT_ESTIMATE 1111
//#define COUNT_ESTIMATE 1111
#define COUNT_ESTIMATE 2311
int Game_loading_callback_inited = 0;
@@ -2235,7 +2339,7 @@ void game_maybe_update_sound_environment()
//
void game_assign_sound_environment()
{
/*
/*
if (The_mission.flags & MISSION_FLAG_SUBSPACE) {
Game_sound_env.id = SND_ENV_DRUGGED;
Game_sound_env.volume = 0.800f;
@@ -2551,12 +2655,12 @@ DCF(gamma,"Sets Gamma factor")
void run_launcher()
{
const char *launcher_link = "explorer.exe \"http://www.randomtiger.pwp.blueyonder.co.uk/freespace/Launcher4.rar\"";
const char *launcher_link = "explorer.exe \"http://www.randomtiger.pwp.blueyonder.co.uk/freespace/Launcher5.rar\"";
int download = MessageBox((HWND)os_get_window(),
"Run the fs2_open launcher to fix your problem. "
"Would you like to download the latest version of the launcher? "
"You must have at least v4.0 to run OGL and v3.0 to run D3D8.",
"You must have at least version 5.0 to run fs2_open versions above 3.6.",
"Question", MB_YESNO | MB_ICONQUESTION);
if(download == IDYES)
@@ -2566,6 +2670,9 @@ void run_launcher()
return;
}
// This now crashes the launcher since fs2_open is still open
return;
// fire up the UpdateLauncher executable
STARTUPINFO si;
PROCESS_INFORMATION pi;
@@ -2589,7 +2696,7 @@ void run_launcher()
if (!launcher_ran)
{
download = MessageBox((HWND)os_get_window(),
"The Launcher could not be started, you cant run fs2_open without it. "
"The Launcher could not be started. You cannot run fs2_open without it. "
"Would you like to download it?", "FS2_Open Startup Error", MB_YESNO | MB_ICONQUESTION);
if(download == IDYES)
@@ -2602,6 +2709,8 @@ void run_launcher()
void game_init()
{
char *ptr;
Game_current_mission_filename[0] = 0;
@@ -2706,9 +2815,11 @@ void game_init()
exit(0);
}
if (!Is_standalone) {
snd_init(use_a3d, use_eax);
if (!Is_standalone)
{
unsigned short UserSampleRate = (unsigned short) os_config_read_uint(NULL, "SoundSampleRate", 22050);
unsigned short UserSampleBits = (unsigned short) os_config_read_uint(NULL, "SoundSampleBits", 16);
snd_init(use_a3d, use_eax, UserSampleRate, UserSampleBits);
}
if(fsspeech_init() == false) {
@@ -2776,7 +2887,24 @@ void game_init()
bool is_640x480 = strstr(ptr, "640") && strstr(ptr, "480");
int res = (!is_640x480 && has_sparky_hi) ? GR_1024 : GR_640;
if (strstr(ptr, NOX("D3D8-") ))
// D3D9 should run on a seperate path to D3D8
// This will allow users to play D3D8 while we develope D3D9
if (strstr(ptr, NOX("D3D9-") ))
{
int adapter, aatype;
if(sscanf(ptr, "D3D9-(%dx%d)x%d bit ad%d aa%d", &width, &height, &cdepth, &adapter, &aatype) != 5)
strcpy(Device_init_error, "Cant understand 'videocardFs2open' D3D9 reg entry.");
else
{
sprintf(Device_init_error,
"This build does not support D3D9.\n\n"
"Adapter num: %d\n"
"Mode: %dx%dx%d\n"
"AA type: %d\n", adapter, width, height, cdepth, aatype);
}
}
else if (strstr(ptr, NOX("D3D8-") ))
{
if(sscanf(ptr, "D3D8-(%dx%d)x%d bit", &width, &height, &cdepth) != 3)
strcpy(Device_init_error, "Cant understand 'videocardFs2open' D3D8 reg entry.");
@@ -2836,7 +2964,7 @@ void game_init()
// ENVMAP = bm_load("environment");
// Set the gamma
if(gr_screen.mode == GR_DIRECT3D)
if( (gr_screen.mode == GR_DIRECT3D) || (gr_screen.mode == GR_OPENGL) )
{
// D3D's gamma system now works differently. 1.0 is the default value
ptr = os_config_read_string(NULL, NOX("GammaD3D"), NOX("1.0"));
@@ -2917,7 +3045,7 @@ void game_init()
Init_Species_Definitions(); // Load up the Species defs - this needs to be done FIRST -- Kazan
// hud shield icon stuff
hud_shield_game_init();
//hud_shield_game_init(); No longer needed; see ships.tbl -C
control_config_common_init(); // sets up localization stuff in the control config
@@ -2933,7 +3061,7 @@ void game_init()
gamesnd_parse_soundstbl();
if (!Is_standalone)
radar_init();
select_radar_mode(Cmdline_orb_radar);
gameseq_init();
@@ -2956,13 +3084,16 @@ void game_init()
weapon_init();
ai_init();
ship_init(); // read in ships.tbl
void ship_info_close();
atexit(ship_info_close);
player_init();
mission_campaign_init(); // load in the default campaign
anim_init();
context_help_init();
techroom_intel_init(); // parse species.tbl, load intel info
if(!Is_standalone)
{
hud_positions_init(); //Setup hud positions
}
#ifndef NO_NETWORK
// initialize psnet
@@ -3003,6 +3134,8 @@ void game_init()
mprintf(("cfile_init() took %d\n", e1 - s1));
// mprintf(("1000 cfopens() took %d\n", e2 - s2));
}
char transfer_text[128];
@@ -3055,7 +3188,7 @@ void game_get_framerate()
Framerate = FRAME_FILTER / frametotal;
else
Framerate = Framecount / frametotal;
sprintf( text, NOX("FPS: %.1f"), Framerate );
sprintf( text, NOX("FPS: %.1f"), Framerate * (Game_time_compression>>16));
} else {
sprintf( text, NOX("FPS: ?") );
}
@@ -3958,6 +4091,62 @@ extern void compute_slew_matrix(matrix *orient, angles *a); // TODO: move code t
// Player's velocity just before he blew up. Used to keep camera target moving.
vector Dead_player_last_vel = {1.0f, 1.0f, 1.0f};
#define render_environment {gr_set_environment_mapping(i);g3_set_view_matrix( &nv, &new_orient, new_zoom );gr_set_proj_matrix( (PI/2.0f), 1.0f, 1.0f, 30000.0f);if ( Game_subspace_effect ){stars_draw(0,0,0,1,1);} else {stars_draw(1,1,1,0,1);}i++;}
extern float View_zoom, Canv_w2, Canv_h2;
void setup_environment_mapping(vector *eye_pos, matrix *eye_orient){
if(gr_screen.mode != GR_DIRECT3D)return;
if(!Cmdline_nohtl){
// matrix old_orient = Eye_matrix;
// vector old_position = Eye_position;
matrix new_orient;
float old_zoom = View_zoom, new_zoom = 0.925f;
vector nv = ZERO_VECTOR;
{
int i = 0;
new_orient.vec.fvec.xyz.x = 1.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 0.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
vm_fix_matrix(&new_orient);
render_environment
new_orient.vec.fvec.xyz.x = -1.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 0.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
vm_fix_matrix(&new_orient);
render_environment
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 1.0f;new_orient.vec.fvec.xyz.z = 0.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 0.0f;new_orient.vec.uvec.xyz.z = -1.0f;
vm_fix_matrix(&new_orient);
render_environment
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = -1.0f;new_orient.vec.fvec.xyz.z = 0.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 0.0f;new_orient.vec.uvec.xyz.z = 1.0f;
vm_fix_matrix(&new_orient);
render_environment
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = 1.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
vm_fix_matrix(&new_orient);
render_environment
new_orient.vec.fvec.xyz.x = 0.0f;new_orient.vec.fvec.xyz.y = 0.0f;new_orient.vec.fvec.xyz.z = -1.0f;
new_orient.vec.uvec.xyz.x = 0.0f;new_orient.vec.uvec.xyz.y = 1.0f;new_orient.vec.uvec.xyz.z = 0.0f;
vm_fix_matrix(&new_orient);
render_environment
}
// View_zoom = old_zoom;
g3_set_view_matrix( eye_pos, eye_orient, old_zoom );
gr_set_proj_matrix( ((4.0f/9.0f)*(PI)*View_zoom), Canv_w2/Canv_h2, 1.0f, 30000.0f);
gr_set_environment_mapping(-1);
// first_frame = false;
}
// }
}
// Set eye_pos and eye_orient based on view mode.
void game_render_frame_setup(vector *eye_pos, matrix *eye_orient)
{
@@ -4233,20 +4422,24 @@ void game_render_frame( vector * eye_pos, matrix * eye_orient )
}
#endif
//fugly hack. this will make the skybox render in HT&L
//i want the stars_draw() function to get ported to HT&L quick
int nohtl_save = Cmdline_nohtl;
Cmdline_nohtl = 1;
// don't set proj/view matrix before this call, breaks OGL
gr_setup_background_fog(true);
if ( Game_subspace_effect ) {
stars_draw(0,0,0,1);
stars_draw(0,0,0,1,0);
} else {
stars_draw(1,1,1,0);
stars_draw(1,1,1,0,0);
}
Cmdline_nohtl = nohtl_save;
gr_setup_background_fog(false);
if((!cube_map_drawen || Game_subspace_effect) && Cmdline_env){
setup_environment_mapping(eye_pos, eye_orient);
cube_map_drawen = true;
}
if (!Cmdline_nohtl) gr_set_proj_matrix( (4.0f/9.0f) * 3.14159f * View_zoom, gr_screen.aspect*(float)gr_screen.clip_width/(float)gr_screen.clip_height, MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
if (!Cmdline_nohtl) gr_set_view_matrix(&Eye_position, &Eye_matrix);
if (!Cmdline_nohtl) {
gr_set_proj_matrix( (4.0f/9.0f) * 3.14159f * View_zoom, gr_screen.aspect*(float)gr_screen.clip_width/(float)gr_screen.clip_height, MIN_DRAW_DISTANCE, MAX_DRAW_DISTANCE);
gr_set_view_matrix(&Eye_position, &Eye_matrix);
}
obj_render_all(obj_render);
beam_render_all(); // render all beam weapons
@@ -5438,8 +5631,8 @@ int game_poll()
}
k = key_inkey();
if (k)
mprintf(("game_poll(): got key 0x%02x\n", k));
//if (k)
// mprintf(("game_poll(): got key 0x%02x\n", k));
#ifdef FS2_DEMO
demo_maybe_show_trailer(k);
@@ -6682,6 +6875,9 @@ void game_enter_state( int old_state, int new_state )
break;
case GS_STATE_GAME_PLAY:
// reset time compression to default level so it's right at the beginning of a mission - taylor
Game_time_compression = F1_0;
// coming from the gameplay state or the main menu, we might need to load the mission
if ( (Game_mode & GM_NORMAL) && ((old_state == GS_STATE_MAIN_MENU) || (old_state == GS_STATE_GAME_PLAY) || (old_state == GS_STATE_DEATH_BLEW_UP)) ) {
if ( !game_start_mission() ) // this should put us into a new state.
@@ -6724,6 +6920,13 @@ void game_enter_state( int old_state, int new_state )
}
player_restore_target_and_weapon_link_prefs();
//Set the current hud
#ifdef NEW_HUD
set_current_hud(Player_ship);
#else
set_current_hud(Player_ship->ship_info_index);
#endif
Game_mode |= GM_IN_MISSION;
#ifndef NDEBUG
@@ -7516,6 +7719,8 @@ int WinMainSub(int argc, char *argv[])
#endif
{
#ifdef _DEBUG
void memblockinfo_output_memleak();
atexit(memblockinfo_output_memleak);
@@ -7628,6 +7833,7 @@ int WinMainSub(int argc, char *argv[])
#endif
game_init();
game_stop_time();
if (Cmdline_SpewMission_CRCs) // -missioncrcs
@@ -7691,6 +7897,8 @@ int WinMainSub(int argc, char *argv[])
if ( state == GS_STATE_QUIT_GAME ){
break;
}
}
#ifdef FS2_DEMO
@@ -7703,6 +7911,7 @@ int WinMainSub(int argc, char *argv[])
#endif
game_shutdown();
#ifdef _WIN32
return 1;
#else
@@ -7716,6 +7925,8 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdSh
int main(int argc, char *argv[])
#endif
{
#ifdef _WIN32
#ifdef _DEBUG
void memblockinfo_output_memleak();
@@ -7759,7 +7970,7 @@ int main(int argc, char *argv[])
#ifdef _WIN32
_CrtDumpMemoryLeaks();
#endif
return result;
}
@@ -7824,6 +8035,7 @@ void game_shutdown(void)
// a player, Player will be NULL, in which case we shouldn't write the player file out!
if (!(Game_mode & GM_STANDALONE_SERVER) && (Player!=NULL) && !Is_standalone){
write_pilot_file();
mission_campaign_savefile_save();
}
#ifndef NO_NETWORK
@@ -7838,6 +8050,7 @@ void game_shutdown(void)
unload_animating_pointer();// frees the frames used for the animating mouse pointer
bm_unload_all(); // free bitmaps
mission_campaign_close(); // close out the campaign stuff
message_mission_close(); // clear loaded table data from message.tbl
#ifndef NO_NETWORK
multi_voice_close(); // close down multiplayer voice (including freeing buffers, etc)
multi_log_close();
@@ -7853,6 +8066,9 @@ void game_shutdown(void)
training_menu_close();
gr_close();
// free left over memory from table parsing
player_tips_close();
joy_close();
audiostream_close();
@@ -8426,6 +8642,12 @@ void game_feature_not_in_demo_popup()
popup(PF_USE_AFFIRMATIVE_ICON|PF_BODY_BIG, 1, POPUP_OK, XSTR( "Sorry, this feature is available only in the retail version", 200));
}
// Call this function when you want to inform the player that a feature is disabled in this build
void game_feature_disabled_popup()
{
popup(PF_USE_AFFIRMATIVE_ICON|PF_BODY_BIG, 1, POPUP_OK, XSTR( "Sorry, the requested feature is currently disabled in this build", -1));
}
// format the specified time (fixed point) into a nice string
void game_format_time(fix m_time,char *time_str)
{
@@ -9588,13 +9810,27 @@ DCF(wepspew, "display the checksum for the current weapons.tbl")
// if the game is running using hacked data
void multi_update_valid_tables(); // in multiutil.obj
extern bool modular_tables_loaded;
int game_hacked_data()
{
// hacked!
/*if(!Game_weapons_tbl_valid || !Game_ships_tbl_valid){
int retval = 0;
#ifndef NO_NETWORK
//omfg modular tables
if(modular_tables_loaded)
{
return 1;
}*/
}
// LAN game, only check if weapon and ship are valid since we can't or don't
// won't to validate against PXO server
if (!Om_tracker_flag) {
if (!Game_weapons_tbl_valid || !Game_ships_tbl_valid)
retval = 1;
return retval;
}
if (!cf_exist( "tvalid.cfg", CF_TYPE_DATA ))
{
@@ -9613,8 +9849,6 @@ int game_hacked_data()
char *buffer = new char[cfilelength(tvalid_cfg)];
cfread(buffer, 1, cfilelength(tvalid_cfg), tvalid_cfg);
int retval = 0;
if (strstr(buffer, "invalid")) // got hacked data
retval = 1;
@@ -9623,6 +9857,8 @@ int game_hacked_data()
if (tvalid_cfg != NULL)
cfclose(tvalid_cfg);
#endif
// not hacked
return retval;
}
+13 -3
View File
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/FREESPACE2/FreeSpace.h $
* $Revision: 2.2 $
* $Date: 2004-04-07 03:31:53 $
* $Author: righteous1 $
* $Revision: 2.4 $
* $Date: 2004-10-31 21:31:34 $
* $Author: taylor $
*
* FreeSpace, the game, not the project, header information.
*
* $Log: not supported by cvs2svn $
* Revision 2.3 2004/08/11 05:06:22 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.2 2004/04/07 03:31:53 righteous1
* Updated to add alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -149,6 +155,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FREESPACE_H
#define _FREESPACE_H
#ifndef STAMPER_PROGRAM // because of all the dependancies, I have to do this...yuck!!! MWA 7/21/97
@@ -344,6 +351,9 @@ int game_do_cd_mission_check(char *filename);
// Used to tell the player that a feature isn't available in the demo version of FreeSpace
void game_feature_not_in_demo_popup();
// Used to tell the player that a feature is disabled by build settings
void game_feature_disabled_popup();
// Return version string for demo or full version, depending on build.
void get_version_string(char *str);
+20 -4
View File
@@ -9,13 +9,27 @@
/*
* $Logfile: /Freespace2/code/Freespace2/LevelPaging.cpp $
* $Revision: 2.2 $
* $Date: 2004-03-05 09:02:01 $
* $Author: Goober5000 $
* $Revision: 2.6 $
* $Date: 2004-07-26 20:47:29 $
* $Author: Kazan $
*
* Code to page in all the bitmaps at the beginning of a level.
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.4 2004/07/01 01:53:00 phreak
* function pointer radar update.
* will enable us to make different radar styles that we can switch between
*
* Revision 2.3 2004/06/18 04:59:53 wmcoolmon
* Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values
*
* Revision 2.2 2004/03/05 09:02:01 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -62,13 +76,14 @@
#include "freespace2/freespace.h"
#include "freespace2/levelpaging.h"
// All the page in functions
extern void ship_page_in();
extern void debris_page_in();
extern void particle_page_in();
extern void stars_page_in();
extern void hud_page_in();
extern void radar_page_in();
extern void (*radar_page_in)();
extern void weapons_page_in();
extern void fireballs_page_in();
extern void shockwave_page_in();
@@ -91,6 +106,7 @@ void level_page_in()
// Most important ones first
ship_page_in();
//Must be called after paging in ships
weapons_page_in();
fireballs_page_in();
particle_page_in();
+7 -3
View File
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/FREESPACE2/LevelPaging.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:22 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2004-08-11 05:06:22 $
* $Author: Kazan $
*
* Code to page in all the bitmaps at the beginning of a level.
*
* $Log: not supported by cvs2svn $
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -30,6 +33,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _LEVELPAGING_H
#define _LEVELPAGING_H
+20 -7
View File
@@ -10,12 +10,22 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/Client.cpp $
* $Revision: 1.13 $
* $Date: 2004-03-07 23:07:20 $
* $Revision: 1.16 $
* $Date: 2004-11-21 16:07:22 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.15 2004/11/18 00:05:36 Goober5000
* #pragma'd a bunch of warnings
* --Goober5000
*
* Revision 1.14 2004/05/25 00:21:39 wmcoolmon
* Updated to use <iostream> instead of <iostream.h>
*
* Revision 1.13 2004/03/07 23:07:20 Kazan
* [Incomplete] Readd of Software renderer so Standalone server works
*
* Revision 1.12 2004/03/05 09:01:56 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -51,10 +61,13 @@
*
*/
// 4711 = function selected for automatic inline expansion
#pragma warning(disable: 4711)
#include "Client.h"
//#include "protocol.h"
#include "udpsocket.h"
#include <iostream.h>
#include <iostream>
#include <time.h>
#include "network/multi_log.h"
#include "playerman/player.h"
@@ -408,7 +421,7 @@ int Fs2OpenPXO_Login(const char* username, const char* password, UDP_Socket &Soc
if (Socket.SendPacket((char *) &loginpckt, sizeof(loginpckt), sender, port) == -1)
{
cout << "Error Sending Packet" << endl;
std::cout << "Error Sending Packet" << std::endl;
}
// await reply
@@ -457,8 +470,8 @@ void SendHeartBeat(const char* masterserver, int targetport, UDP_Socket &Socket,
hbpack.players = (short) players;
hbpack.port = port;
Socket.SendPacket((char *) &hbpack, sizeof(serverlist_hb_packet), std::string(masterserver), targetport);
std::string ms = masterserver;
Socket.SendPacket((char *) &hbpack, sizeof(serverlist_hb_packet), ms, targetport);
}
@@ -541,7 +554,7 @@ int Ping(const char* target)
UDP_Socket Socket(FS2OPEN_CLIENT_PORT);
if (!Socket.InitSocket())
{
cout << "Initialization Error!" << endl;
std::cout << "Initialization Error!" << std::endl;
exit(1);
}
+16 -3
View File
@@ -10,12 +10,20 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/Client.h $
* $Revision: 1.14 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 1.16 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.15 2004/07/07 21:00:06 Kazan
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
*
* Revision 1.14 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.13 2004/03/09 00:02:16 Kazan
* more fs2netd stuff
*
@@ -49,6 +57,7 @@
*
*/
#include "PreProcDefines.h"
#pragma warning(disable:4018) // signed/unsigned mismatch
#pragma warning(disable:4100) // unreferenced formal parameter
#pragma warning(disable:4511) // copy constructor could not be generated
@@ -115,10 +124,14 @@ int Ping(const char* target, TCP_Socket &Socket);
void SendHeartBeat(const char* masterserver, int targetport, TCP_Socket &Socket, const char* myName, const char* MisName, const char* title, int flags, int port, int players);
int Fs2OpenPXO_Login(const char* username, const char* password, TCP_Socket &Socket, const char* masterserver, int port=FS2OPEN_PXO_PORT, int timeout=15);
int GetPingReply(TCP_Socket &Socket);
void SendPingReply(TCP_Socket &Socket, int tstamp);
// longer timeouts - mySQL operations
file_record* GetTablesList(int &numTables, const char *masterserver, TCP_Socket &Socket, int port=FS2OPEN_PXO_PORT, int timeout=30);
file_record* GetMissionsList(int &numMissions, const char *masterserver, TCP_Socket &Socket, int port=FS2OPEN_PXO_PORT, int timeout=30);
fs2open_banmask* GetBanList(int &numBanMasks, TCP_Socket &Socket, int timeout=15);
#endif
+161 -16
View File
@@ -11,11 +11,34 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Client.cpp $
* $Revision: 1.15 $
* $Date: 2004-03-31 05:42:26 $
* $Revision: 1.22 $
* $Date: 2004-11-18 00:05:36 $
* $Author: Goober5000 $
*
* $Log: not supported by cvs2svn $
* Revision 1.21 2004/07/26 20:47:29 Kazan
* remove MCD complete
*
* Revision 1.20 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 1.19 2004/07/09 22:05:32 Kazan
* fs2netd 1.0 RC5 full support - Rank and Medal updates
*
* Revision 1.18 2004/07/07 21:00:06 Kazan
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
*
* Revision 1.17 2004/07/06 23:45:34 Kazan
* minor multi fix
*
* Revision 1.16 2004/05/25 00:21:39 wmcoolmon
* Updated to use <iostream> instead of <iostream.h>
*
* Revision 1.15 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.14 2004/03/09 17:59:01 Kazan
* Disabled multithreaded TCP_Socket in favor of safer single threaded
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
@@ -73,18 +96,20 @@
// 4018 = signed/unsigned mismatch
// 4663 = new template specification syntax
// 4245 = signed/unsigned mismatch in conversion of const value
#pragma warning(disable: 4663 4018 4663 4245)
// 4711 = function selected for automatic inline expansion
#pragma warning(disable: 4663 4018 4663 4245 4711)
#include "Client.h"
#include "protocol.h"
#include "TCP_Socket.h"
#include <iostream.h>
#include <iostream>
#include "playerman/player.h"
#include "ship/ship.h"
#include <time.h>
#include "network/multi_log.h"
#define PXO_ADDINT(n) *((int *)cur) = (n); cur += sizeof(int);
#define PXO_ADDSTRING(x, y) memcpy(cur, x, y); cur += y;
@@ -163,10 +188,11 @@ int SendPlayerData(int SID, const char* player_name, const char* user, player *p
// char *cur = PacketBuffer;
fs2open_pilot_update *p_update = (fs2open_pilot_update *) PacketBuffer;
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + (sizeof(fs2open_pilot_update) - sizeof(fs2open_ship_typekill *)));
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + 204);
int *medals = (int*)(PacketBuffer + 204 + (sizeof(fs2open_ship_typekill) * MAX_SHIP_TYPES));
p_update->pid = PCKT_PILOT_UPDATE;
p_update->pid = PCKT_PILOT_UPDATE2;
p_update->sid = SID;
strncpy(p_update->name, player_name, 65);
@@ -186,17 +212,27 @@ int SendPlayerData(int SID, const char* player_name, const char* user, player *p
p_update->SecHits = pl->stats.s_shots_hit;
p_update->SecFHits = pl->stats.s_bonehead_hits;
p_update->ship_types = MAX_SHIP_TYPES;
p_update->num_medals = NUM_MEDALS;
p_update->rank = pl->stats.rank;
for (int i = 0; i < MAX_SHIP_TYPES; i++)
int i;
for (i = 0; i < MAX_SHIP_TYPES; i++)
{
strncpy(type_kills[i].name, Ship_info[i].name, 32);
type_kills[i].kills = pl->stats.kills[i];
}
for (i = 0; i < NUM_MEDALS; i++)
{
int packet_size = 194; // size of all the ints only
medals[i] = pl->stats.medals[i];
}
int packet_size = 204; // size of all the ints only
packet_size += sizeof(fs2open_ship_typekill) * MAX_SHIP_TYPES; // add the size of the ship_kills array
packet_size += sizeof(int) * NUM_MEDALS; // add the size of the ship_kills array
// send Packet
if (Socket.SendData(PacketBuffer, packet_size) == -1)
@@ -241,7 +277,7 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
timeout = timeout * CLK_TCK;
memset((char *) &prq_packet, 0, sizeof(fs2open_get_pilot));
prq_packet.pid = PCKT_PILOT_GET;
prq_packet.pid = PCKT_PILOT_GET2;
prq_packet.sid = SID;
strncpy(prq_packet.pilotname, player_name, 64);
prq_packet.create = CanCreate;
@@ -255,9 +291,10 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
char PacketBuffer[16384]; // 16K should be enough i think..... I HOPE!
fs2open_pilot_reply *p_reply = (fs2open_pilot_reply *) PacketBuffer;
memset(PacketBuffer, 0, 16384);
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + sizeof(fs2open_pilot_reply) - sizeof(fs2open_ship_typekill *));
fs2open_ship_typekill *type_kills = (fs2open_ship_typekill *) (PacketBuffer + 72);
int *medals = NULL; //(int*)(PacketBuffer+72+(sizeof(fs2open_ship_typekill) * pilotrep.ship_types));
int CheckSize = sizeof(fs2open_pilot_reply) - sizeof(fs2open_ship_typekill *) - 2; //2 for the weird stinking msvc stuff
int CheckSize = 72, i;
int recvsize = 0, rs2;
Sleep(2); // give them a second
int starttime = clock();
@@ -274,7 +311,10 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
continue;
}
CheckSize += sizeof(fs2open_ship_typekill) * p_reply->ship_types;
if (p_reply->replytype == 0)
CheckSize += (sizeof(fs2open_ship_typekill) * p_reply->ship_types) + (sizeof(int) * p_reply->num_medals);
else
CheckSize = 8;
ml_printf("Precompletion Pilot Update: CheckSize = %d, recvsize = %d", CheckSize, recvsize);
while (CheckSize - recvsize > 0 && (clock() - starttime) <= timeout)
@@ -295,7 +335,8 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
break;
}
medals = (int*)(PacketBuffer+72+(sizeof(fs2open_ship_typekill) * p_reply->ship_types));
if (p_reply->replytype > 1)
@@ -315,6 +356,7 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
pl->stats.s_shots_fired = p_reply->SecShots;
pl->stats.s_shots_hit = p_reply->SecHits;
pl->stats.s_bonehead_hits = p_reply->SecFHits;
pl->stats.rank = p_reply->rank;
if (p_reply->ship_types == 0)
@@ -322,12 +364,22 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
else
{
// i should really assert p_reply->ship_types == MAX_SHIP_TYPES
for (int i = 0; i < MAX_SHIP_TYPES && p_reply->ship_types; i++)
for (i = 0; i < MAX_SHIP_TYPES && p_reply->ship_types; i++)
{
pl->stats.kills[i] = type_kills[i].kills;
}
}
if (p_reply->num_medals == 0)
memset(pl->stats.medals, 0, sizeof(int) * NUM_MEDALS);
else
{
// i should really assert p_reply->ship_types == MAX_SHIP_TYPES
for (i = 0; i < NUM_MEDALS && p_reply->num_medals; i++)
{
pl->stats.medals[i] = medals[i];
}
}
// ignored on load... fs2 doesn't need this
// type_kills[index].name[65] = Ship_info[index].name[32]
@@ -342,7 +394,87 @@ int GetPlayerData(int SID, const char* player_name, player *pl, const char* mast
return -1;
}
//**************************************************************************************************************************************************
fs2open_banmask* GetBanList(int &numBanMasks, TCP_Socket &Socket, int timeout)
{
// Clear any old dead crap data
Socket.IgnorePackets();
fs2open_banlist_request br_packet;
br_packet.pid = PCKT_BANLIST_RQST;
br_packet.reserved = 0;
timeout = timeout * CLK_TCK;
//std::string sender = masterserver;
// send Packet
if (Socket.SendData((char *)&br_packet, sizeof(fs2open_banlist_request)) == -1)
return NULL;
char PacketBuffer[16384]; // 16K should be enough i think..... I HOPE!
fs2open_banlist_reply *banreply_ptr = (fs2open_banlist_reply *) PacketBuffer;
fs2open_banmask *masks = NULL;
numBanMasks = 0;
Sleep(1); //lets give them a second
int starttime = clock();
int recvsize = 0, rs2;
int CheckSize = sizeof(int) * 2;
while ((clock() - starttime) <= timeout)
{
if (Socket.DataReady() && (recvsize = Socket.GetData(PacketBuffer, 16384)) != -1)
{
if (banreply_ptr->pid != PCKT_BANLIST_RPLY)
{
continue; // skip and ignore this packet
}
CheckSize += banreply_ptr->num_ban_masks * sizeof(fs2open_banmask);
ml_printf("Precompletion Table Get: CheckSize = %d, recvsize = %d", CheckSize, recvsize);
while (CheckSize - recvsize > 0 && (clock() - starttime) <= timeout)
{
if (Socket.DataReady())
{
rs2 = Socket.GetData(PacketBuffer+recvsize, 16384-recvsize);
ml_printf("Banlist Completetion: Got Additional %u bytes", rs2);
recvsize += rs2;
}
}
ml_printf("PostCompletion Banlist Get: CheckSize = %u, recvsize = %u", CheckSize, recvsize);
if ((clock() - starttime) >= timeout)
{
ml_printf("Banlist Transfer completetion timed out");
break;
}
masks = new fs2open_banmask[banreply_ptr->num_ban_masks];
memcpy(masks, PacketBuffer + 8, sizeof(fs2open_banmask) * banreply_ptr->num_ban_masks); // packet buffer will be two ints then the array;
numBanMasks = banreply_ptr->num_ban_masks;
return masks;
}
}
return NULL;
}
//**************************************************************************************************************************************************
@@ -546,7 +678,7 @@ int Fs2OpenPXO_Login(const char* username, const char* password, TCP_Socket &Soc
if (Socket.SendData((char *) &loginpckt, sizeof(loginpckt)) == -1)
{
cout << "Error Sending Packet" << endl;
std::cout << "Error Sending Packet" << std::endl;
return -1;
}
@@ -699,4 +831,17 @@ int GetPingReply(TCP_Socket &Socket)
Socket.GetData((char *)&rping, sizeof(fs2open_pingreply));
return int( float(clock() - rping.time)/2.0 );
}
//**************************************************************************************************************************************************
void SendPingReply(TCP_Socket &Socket, int tstamp)
{
fs2open_pingreply rping;
rping.pid = PCKT_PINGREPLY;
rping.time = tstamp;
Socket.SendData((char*)&rping, sizeof(rping));
}
+19 -6
View File
@@ -10,12 +10,23 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Socket.cpp $
* $Revision: 1.9 $
* $Date: 2004-03-31 05:42:26 $
* $Revision: 1.12 $
* $Date: 2004-11-18 00:05:36 $
* $Author: Goober5000 $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.11 2004/07/26 20:47:29 Kazan
* remove MCD complete
*
* Revision 1.10 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 1.9 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.8 2004/03/09 17:59:01 Kazan
* Disabled multithreaded TCP_Socket in favor of safer single threaded
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
@@ -47,16 +58,18 @@
*
*/
#pragma warning(disable:4100) // unreferenced formal parameter
#pragma warning(disable:4511) // copy constructor could not be generated
#pragma warning(disable:4512) // assignment operator could not be generated
#pragma warning(disable:4711) // function selected for inlining
// 4100 = unreferenced formal parameter
// 4511 = copy constructor could not be generated
// 4512 = assignment operator could not be generated
// 4711 = function selected for inlining
#pragma warning(disable:4100 4511 4512 4711)
#include "TCP_Socket.h"
//#include <process.h>
//#include <iostream.h>
//**************************************************************************
// TCP_Socket Implementation
//**************************************************************************
+9 -3
View File
@@ -11,12 +11,17 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/TCP_Socket.h $
* $Revision: 1.6 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 1.7 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.6 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.5 2004/03/09 17:59:01 Kazan
* Disabled multithreaded TCP_Socket in favor of safer single threaded
* FS2NetD doesn't kill the game on connection failure now - just gives warning message and effectively dsiables itself until they try to connect again
@@ -31,6 +36,7 @@
*
*/
#include "PreProcDefines.h"
// Enable Multithread
//#define MT_TCP_Socket
+86 -7
View File
@@ -10,12 +10,23 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/protocol.h $
* $Revision: 1.11 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 1.14 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.13 2004/07/09 22:05:32 Kazan
* fs2netd 1.0 RC5 full support - Rank and Medal updates
*
* Revision 1.12 2004/07/07 21:00:06 Kazan
* FS2NetD: C2S Ping/Pong, C2S Ping/Pong, Global IP Banlist, Global Network Messages
*
* Revision 1.11 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.10 2004/03/07 23:07:20 Kazan
* [Incomplete] Readd of Software renderer so Standalone server works
*
@@ -36,6 +47,7 @@
*
*/
#include "PreProcDefines.h"
#if !defined(__pxo_protocol_h_)
#define __pxo_protocol_h_
@@ -65,6 +77,17 @@
#define PCKT_MISSION_CHECK 0xF
#define PCKT_MCHECK_REPLY 0x10
#define PCKT_BANLIST_RQST 0x11
#define PCKT_BANLIST_RPLY 0x12
// this only goes from the server out
#define PCKT_NETOWRK_WALL 0x13
// more advanced version of this packet
// different ID's for backward compat
#define PCKT_PILOT_UPDATE2 0x14
#define PCKT_PILOT_GET2 0x15
#define FS2OPEN_PXO_PORT 12000
#define FS2OPEN_CLIENT_PORT FS2OPEN_PXO_PORT + 1
@@ -184,6 +207,7 @@ struct fs2open_pxo_missreply
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// ----- Pilot Management -----
@@ -191,6 +215,7 @@ struct fs2open_pxo_missreply
struct fs2open_get_pilot
{
int pid; // 0x9 ( PCKT_PILOT_GET )
// 0x15 (PCKT_PILOT_GET2)
int sid; // session id returned upon login
char pilotname[65];
bool create; // create pilot
@@ -226,7 +251,18 @@ struct fs2open_pilot_reply
unsigned int SecFHits;
unsigned int ship_types;
// if request was a PCKT_PILOT_GET2
int rank;
int num_medals;
// ----------------------
fs2open_ship_typekill *type_kills;
// if request was a PCKT_PILOT_GET2
int *medals;
// ----------------------
};
@@ -234,7 +270,8 @@ struct fs2open_pilot_reply
struct fs2open_pilot_update
{
int pid; // 0x0B (PCKT_PILOT_UPDATE)
int sid; // session id
// 0x14 (PCKT_PILOT_UPDATE2)
int sid; //session id
char name[65];
char user[65];
@@ -253,10 +290,22 @@ struct fs2open_pilot_update
unsigned int SecShots;
unsigned int SecHits;
unsigned int SecFHits;
unsigned int ship_types;
fs2open_ship_typekill *type_kills;
unsigned int ship_types;
// if PCKT_PILOT_UPDATE2
int rank;
int num_medals;
// ----------------------
// added with update2.. but always been there TYVM MSVC
short reserved; // realign to 4-byte boundry --- MSVC does this automagically.. let's force it
fs2open_ship_typekill *type_kills;
// if PCKT_PILOT_UPDATE2
int *medals;
// ----------------------
};
@@ -268,6 +317,7 @@ struct fs2open_pilot_updatereply
};
// ---------------- Generic Ping -----------------
// ping time is in ticks returned by clock()
@@ -283,5 +333,34 @@ struct fs2open_pingreply
int time;
};
// ---------------- Banlist Packets -----------------
struct fs2open_banlist_request
{
int pid; // 0x11 (PCKT_BANLIST_RQST)
int reserved;
};
struct fs2open_banmask
{
char ip_mask[16]; // up to 15 chars (123.123.123.123) and a NULL
};
struct fs2open_banlist_reply
{
int pid; // 0x12 (PCKT_BANLIST_RPLY)
int num_ban_masks;
fs2open_banmask* masks;
};
// ---------------- Global Message Packet -----------------
struct fs2open_network_wall
{
int pid; // 0x13 (PCKT_NETOWRK_WALL)
char message[252];
};
#endif
+14 -3
View File
@@ -10,12 +10,20 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/udpsocket.cpp $
* $Revision: 1.5 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 1.7 $
* $Date: 2004-07-26 20:47:29 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.6 2004/07/12 16:32:46 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 1.5 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.4 2004/02/21 00:59:43 Kazan
* FS2NETD License Comments
*
@@ -36,6 +44,9 @@
#include "udpsocket.h"
#if defined(WIN32)
//*******************************************************************************
// Windows Version
+9 -3
View File
@@ -10,12 +10,17 @@
/*
* $Logfile: /Freespace2/code/fs2open_pxo/udpsocket.h $
* $Revision: 1.4 $
* $Date: 2004-03-31 05:42:26 $
* $Author: Goober5000 $
* $Revision: 1.5 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2004/03/31 05:42:26 Goober5000
* got rid of all those nasty warnings from xlocale and so forth; also added comments
* for #pragma warning disable to indicate the message being disabled
* --Goober5000
*
* Revision 1.3 2004/02/21 00:59:43 Kazan
* FS2NETD License Comments
*
@@ -26,6 +31,7 @@
*
*/
#include "PreProcDefines.h"
#if !defined(__protocol_h_)
#define __protocol_h_
+9 -2
View File
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/GameHelp/ContextHelp.cpp $
* $Revision: 2.4 $
* $Date: 2004-03-08 22:02:38 $
* $Revision: 2.6 $
* $Date: 2004-07-26 20:47:30 $
* $Author: Kazan $
*
* Functions to drive the context-sensitive help
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.4 2004/03/08 22:02:38 Kazan
* Lobby GUI screen restored
*
* Revision 2.3 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -132,6 +138,7 @@
#include "globalincs/systemvars.h"
////////////////////////////////////////////////////////////////////
// private function prototypes / structs
////////////////////////////////////////////////////////////////////
+1
View File
@@ -11,6 +11,7 @@
//
//
#include "PreProcDefines.h"
#ifndef __CONTEXTHELP_H__
#define __CONTEXTHELP_H__
+12 -3
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/GameHelp/GameplayHelp.cpp $
* $Revision: 2.3 $
* $Date: 2004-03-05 09:01:58 $
* $Author: Goober5000 $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:30 $
* $Author: Kazan $
*
* Module for displaying in-game help
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.3 2004/03/05 09:01:58 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.2 2003/03/18 10:07:02 unknownplayer
* The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can.
*
@@ -141,6 +148,8 @@
#include "weapon/beam.h"
#include "sound/audiostr.h"
// text positioning constats
#define TITLE_Y 35
#define Y_START 70
+7 -3
View File
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/GameHelp/GameplayHelp.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:22 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
* Header for displaying in-game help
*
* $Log: not supported by cvs2svn $
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -33,6 +36,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __GAMEPLAY_HELP_H__
#define __GAMEPLAY_HELP_H__
+12 -2
View File
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/GameSequence/GameSequence.cpp $
* $Revision: 2.3 $
* $Date: 2004-05-03 21:22:20 $
* $Revision: 2.5 $
* $Date: 2004-07-26 20:47:30 $
* $Author: Kazan $
*
* File to control Game Sequencing
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.3 2004/05/03 21:22:20 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.2 2004/03/05 09:02:03 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -253,6 +261,8 @@
#include "gamesequence/gamesequence.h"
#include "globalincs/pstypes.h"
// local defines
#define MAX_GAMESEQ_EVENTS 20 // maximum number of events on the game sequencing queue
#define GS_STACK_SIZE 10 // maximum number of stacked states
+8 -2
View File
@@ -9,13 +9,18 @@
/*
* $Logfile: /Freespace2/code/GameSequence/GameSequence.h $
* $Revision: 2.4 $
* $Date: 2004-05-03 21:22:20 $
* $Revision: 2.5 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
* Header file for Game Sequencing items
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/05/03 21:22:20 Kazan
* Abandon strdup() usage for mod list processing - it was acting odd and causing crashing on free()
* Fix condition where alt_tab_pause() would flipout and trigger failed assert if game minimizes during startup (like it does a lot during debug)
* Nav Point / Auto Pilot code (All disabled via #ifdefs)
*
* Revision 2.3 2004/03/08 22:02:38 Kazan
* Lobby GUI screen restored
*
@@ -341,6 +346,7 @@
// defines for game sequencing
#include "PreProcDefines.h"
#ifndef __GAMESEQUENCE_H__
#define __GAMESEQUENCE_H__
+153 -86
View File
@@ -9,13 +9,35 @@
/*
* $Logfile: /Freespace2/code/Gamesnd/EventMusic.cpp $
* $Revision: 2.9 $
* $Date: 2004-03-05 09:02:00 $
* $Author: Goober5000 $
* $Revision: 2.16 $
* $Date: 2004-12-25 16:42:59 $
* $Author: wmcoolmon $
*
* C module for high-level control of event driven music
*
* $Log: not supported by cvs2svn $
* Revision 2.15 2004/12/11 09:03:08 wmcoolmon
* Changed music modular table ending to *-mus.tbm, in case a miscellaneous modular table is needed.
*
* Revision 2.14 2004/07/26 20:47:30 Kazan
* remove MCD complete
*
* Revision 2.13 2004/07/17 09:26:00 taylor
* add CF_SORT_REVERSE to real sort routine, makes CF_SORT_TIME work again
*
* Revision 2.12 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.11 2004/06/18 04:59:54 wmcoolmon
* Only used weapons paged in instead of all, fixed music box in FRED, sound quality settable with SoundSampleRate and SoundSampleBits registry values
*
* Revision 2.10 2004/05/28 23:37:30 wmcoolmon
* Modular music tables
*
* Revision 2.9 2004/03/05 09:02:00 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.8 2004/02/08 03:35:08 Goober5000
* fixed a small bug in FS1-compatible music
* --Goober5000
@@ -160,6 +182,8 @@
#include "localization/localize.h"
#include "parse/parselo.h"
#pragma optimize("", off)
#define DEFAULT_MASTER_EVENT_MUSIC_VOLUME 0.5f
@@ -381,19 +405,40 @@ int maybe_get_next_nrml_no_cycle(int pattern)
//
void event_music_init()
{
if ( snd_is_inited() == FALSE ) {
Event_music_enabled = FALSE;
return;
if(!Fred_running)
{
if ( snd_is_inited() == FALSE ) {
Event_music_enabled = FALSE;
return;
}
if ( Cmdline_freespace_no_music ) {
return;
}
if ( Event_music_inited == TRUE )
return;
}
if ( Cmdline_freespace_no_music ) {
return;
//MUST be called before parsing stuffzors.
Num_music_files = 0;
Num_soundtracks = 0; // Global
event_music_reset_choices();
//Do teh parsing
event_music_parse_musictbl("music.tbl", false);
char tbl_file_arr[MAX_TBL_PARTS][MAX_FILENAME_LEN];
char *tbl_file_names[MAX_TBL_PARTS];
int num_files = cf_get_file_list_preallocated(MAX_TBL_PARTS, tbl_file_arr, tbl_file_names, CF_TYPE_TABLES, "*-mus.tbm", CF_SORT_REVERSE);
for(int i = 0; i < num_files; i++)
{
//HACK HACK HACK
modular_tables_loaded = true;
strcat(tbl_file_names[i], ".tbm");
event_music_parse_musictbl(tbl_file_names[i], true);
}
if ( Event_music_inited == TRUE )
return;
event_music_parse_musictbl();
Event_music_inited = TRUE;
Event_music_begun = FALSE;
}
@@ -1132,18 +1177,78 @@ int event_music_player_respawn_as_observer()
return 0;
}
void parse_soundtrack()
{
char fname[MAX_FILENAME_LEN];
char line_buf[128];
int num_patterns = 0;
required_string("#Soundtrack Start");
required_string("$SoundTrack Name:");
stuff_string(Soundtracks[Num_soundtracks].name, F_NAME, NULL);
while (required_string_either("#SoundTrack End","$Name:")) {
Assert( num_patterns < MAX_PATTERNS );
required_string("$Name:");
stuff_string(line_buf, F_NAME, NULL);
// line_buf holds 3 fields: filename, num measures, bytes per measure
char *token;
int count = 0;
token = strtok( line_buf, NOX(" ,\t"));
strcpy(fname, token);
while ( token != NULL ) {
token = strtok( NULL, NOX(" ,\t") );
if ( token == NULL ) {
Assert(count == 2 );
break;
}
if ( count == 0 ) {
Pattern_num_measures[Num_soundtracks][num_patterns] = (float)atof(token);
} else {
Pattern_bytes_per_measure[Num_soundtracks][num_patterns] = atoi(token);
}
count++;
} // end while
// convert from samples per measure to bytes per measure
Pattern_bytes_per_measure[Num_soundtracks][num_patterns] *= 2;
strcpy(Soundtracks[Num_soundtracks].pattern_fnames[num_patterns], fname);
num_patterns++;
}
required_string("#SoundTrack End");
Soundtracks[Num_soundtracks].num_patterns = num_patterns;
Num_soundtracks++;
}
void parse_menumusic()
{
char fname[MAX_FILENAME_LEN];
required_string("$Name:");
stuff_string(fname, F_PATHNAME, NULL);
Assert( strlen(fname) < (NAME_LENGTH-1) );
strcpy( Spooled_music[Num_music_files].name, fname );
required_string("$Filename:");
stuff_string(fname, F_PATHNAME, NULL);
if ( stricmp(fname, NOX("none.wav")) ) {
Assert( strlen(fname) < (MAX_FILENAME_LEN-1) );
strcpy( Spooled_music[Num_music_files].filename, fname );
}
Num_music_files++;
}
// -------------------------------------------------------------------------------------------------
// event_music_parse_musictbl() will parse the music.tbl file, and set up the Mission_songs[]
// array
//
void event_music_parse_musictbl()
void event_music_parse_musictbl(char* longname, bool is_chunk)
{
char fname[MAX_FILENAME_LEN];
char line_buf[128];
int rval, i, j;
int num_patterns = 0;
// Goober5000 - clear all the filenames, so we're compatible with the extra NRMLs in FS1 music
for (i = 0; i < MAX_SOUNDTRACKS; i++)
{
@@ -1153,89 +1258,51 @@ void event_music_parse_musictbl()
}
}
Num_music_files = 0;
Num_soundtracks = 0; // Global
event_music_reset_choices();
if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Unable to parse music.tbl! Code = %i.\n", rval);
Error(LOCATION, "Unable to parse %sl! Code = %i.\n", longname, rval);
} else {
// open localization
lcl_ext_open();
read_file_text("music.tbl");
read_file_text(longname);
reset_parse();
// Loop through all the sound-tracks
while (required_string_either("#Menu Music Start","#SoundTrack Start")) {
Assert(Num_soundtracks < MAX_SOUNDTRACKS);
required_string("#SoundTrack Start");
required_string("$SoundTrack Name:");
stuff_string(Soundtracks[Num_soundtracks].name, F_NAME, NULL);
while (required_string_either("#SoundTrack End","$Name:")) {
Assert( num_patterns < MAX_PATTERNS );
required_string("$Name:");
stuff_string(line_buf, F_NAME, NULL);
// line_buf holds 3 fields: filename, num measures, bytes per measure
char *token;
int count = 0;
token = strtok( line_buf, NOX(" ,\t"));
strcpy(fname, token);
while ( token != NULL ) {
token = strtok( NULL, NOX(" ,\t") );
if ( token == NULL ) {
Assert(count == 2 );
break;
}
if ( count == 0 ) {
Pattern_num_measures[Num_soundtracks][num_patterns] = (float)atof(token);
} else {
Pattern_bytes_per_measure[Num_soundtracks][num_patterns] = atoi(token);
}
count++;
} // end while
// convert from samples per measure to bytes per measure
Pattern_bytes_per_measure[Num_soundtracks][num_patterns] *= 2;
strcpy(Soundtracks[Num_soundtracks].pattern_fnames[num_patterns], fname);
num_patterns++;
if(!is_chunk)
{
// Loop through all the sound-tracks
while (required_string_either("#Menu Music Start","#SoundTrack Start")) {
Assert(Num_soundtracks < MAX_SOUNDTRACKS);
parse_soundtrack();
}
required_string("#SoundTrack End");
Soundtracks[Num_soundtracks].num_patterns = num_patterns;
Num_soundtracks++;
num_patterns = 0;
// Parse the menu music section
required_string("#Menu Music Start");
while (required_string_either("#Menu Music End","$Name:")) {
Assert( Num_music_files < MAX_SPOOLED_MUSIC );
parse_menumusic();
}
required_string("#Menu Music End");
}
// Parse the menu music section
required_string("#Menu Music Start");
while (required_string_either("#Menu Music End","$Name:")) {
Assert( Num_music_files < MAX_SPOOLED_MUSIC );
required_string("$Name:");
stuff_string(fname, F_PATHNAME, NULL);
Assert( strlen(fname) < (NAME_LENGTH-1) );
strcpy( Spooled_music[Num_music_files].name, fname );
required_string("$Filename:");
stuff_string(fname, F_PATHNAME, NULL);
if ( stricmp(fname, NOX("none.wav")) ) {
Assert( strlen(fname) < (MAX_FILENAME_LEN-1) );
strcpy( Spooled_music[Num_music_files].filename, fname );
else
{
// Loop through all the sound-tracks
while (required_string_either("#Menu Music Start","#SoundTrack Start")) {
Assert(Num_soundtracks < MAX_SOUNDTRACKS);
parse_soundtrack();
}
Num_music_files++;
// Parse the menu music section
if(optional_string("#Menu Music Start"))
{
while (required_string_either("#Menu Music End","$Name:")) {
Assert( Num_music_files < MAX_SPOOLED_MUSIC );
parse_menumusic();
}
required_string("#Menu Music End");
}
}
required_string("#Menu Music End");
// close localization
lcl_ext_close();
}
+12 -4
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/Gamesnd/EventMusic.h $
* $Revision: 2.6 $
* $Date: 2004-03-05 09:02:00 $
* $Author: Goober5000 $
* $Revision: 2.8 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
* Header file for high-level control of event driven music
*
* $Log: not supported by cvs2svn $
* Revision 2.7 2004/05/28 23:37:30 wmcoolmon
* Modular music tables
*
* Revision 2.6 2004/03/05 09:02:00 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.5 2003/08/25 04:46:53 Goober5000
* added extra code to enable playing of FS1 music tracks
* --Goober5000
@@ -144,6 +151,7 @@
*/
#include "PreProcDefines.h"
#ifndef __EVENT_MUSIC_H__
#define __EVENT_MUSIC_H__
@@ -229,7 +237,7 @@ void event_music_enable();
void event_music_pause();
void event_music_unpause();
void event_music_set_volume_all(float volume);
void event_music_parse_musictbl();
void event_music_parse_musictbl(char* longname, bool is_chunk);
void event_music_change_pattern(int new_pattern);
int event_music_return_current_pattern();
void event_music_first_pattern();
+11 -3
View File
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/Gamesnd/GameSnd.cpp $
* $Revision: 2.5 $
* $Date: 2004-04-26 00:25:08 $
* $Author: taylor $
* $Revision: 2.7 $
* $Date: 2004-07-26 20:47:30 $
* $Author: Kazan $
*
* Routines to keep track of which sound files go where
*
* $Log: not supported by cvs2svn $
* Revision 2.6 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.5 2004/04/26 00:25:08 taylor
* don't preload every sound (fixes some slowdowns), snd_preload option support
*
* Revision 2.4 2004/04/03 02:55:49 bobboau
* commiting recent minor bug fixes
*
@@ -188,6 +194,8 @@
#include "species_defs/species_defs.h"
#include "parse/parselo.h"
// Global array that holds data about the gameplay sound effects.
game_snd Snds[MAX_GAME_SOUNDS];
+7 -3
View File
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/Gamesnd/GameSnd.h $
* $Revision: 2.5 $
* $Date: 2004-03-12 16:23:49 $
* $Author: phreak $
* $Revision: 2.6 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
* Routines to keep track of which sound files go where
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2004/03/12 16:23:49 phreak
* bumped MAX_GAME_SOUNDS to 400 if INF_BUILD is defined
*
* Revision 2.4 2003/03/20 22:58:43 Goober5000
* moved ballistic primary reload sounds to indexes 171 and 172
*
@@ -333,6 +336,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __GAMESND_H__
#define __GAMESND_H__
+2
View File
@@ -10,6 +10,8 @@
#include "graphics/2d.h"
#include "globalincs/alphacolors.h"
// -----------------------------------------------------------------------------------
// ALPHA DEFINES/VARS
//
+1
View File
@@ -7,6 +7,7 @@
*
*/
#include "PreProcDefines.h"
#ifndef _GLOBAL_ALPHACOLORS_HEADER_FILE
#define _GLOBAL_ALPHACOLORS_HEADER_FILE
+11 -3
View File
@@ -9,13 +9,19 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/crypt.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $Revision: 2.3 $
* $Date: 2004-07-26 20:47:31 $
* $Author: Kazan $
*
* Files for cypting stuff
*
* $Log: not supported by cvs2svn $
* Revision 2.2 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
@@ -37,6 +43,8 @@
#include <string.h>
#include "globalincs/crypt.h"
char *jcrypt (char *plainstring)
{
int i,t,len;
+7 -3
View File
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/crypt.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:22 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2004-08-11 05:06:23 $
* $Author: Kazan $
*
* Header for crypt stuff
*
* $Log: not supported by cvs2svn $
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -39,6 +42,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CRYPT_H
#define _CRYPT_H
+16 -2
View File
@@ -7,13 +7,21 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/globals.h $
* $Revision: 1.3 $
* $Date: 2004-05-10 10:51:54 $
* $Revision: 1.5 $
* $Date: 2004-12-14 14:46:12 $
* $Author: Goober5000 $
*
* Header for common global #defines, to cut down on #includes
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2004/08/11 05:06:23 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 1.3 2004/05/10 10:51:54 Goober5000
* made primary and secondary banks quite a bit more friendly... added error-checking
* and reorganized a bunch of code
* --Goober5000
*
* Revision 1.2 2004/03/05 09:01:52 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -27,6 +35,7 @@
*
*/
#include "PreProcDefines.h"
#ifndef _GLOBALS_H
#define _GLOBALS_H
@@ -83,6 +92,11 @@
#define MAX_WINGS 25
#endif
#define MAX_SHIPS_PER_WING 6
#define MAX_STARTING_WINGS 3 // number of wings player can start a mission with
#define MAX_SQUADRON_WINGS 5 // number of wings in squadron (displayed on HUD)
#define MAX_TVT_WINGS 2 // number of wings in a TVT game
// from ship.h
#define MAX_PLAYER_PRIMARY_BANKS 2
+7 -3
View File
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/LinkList.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:22 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2004-08-11 05:06:24 $
* $Author: Kazan $
*
* Macros to handle doubly linked lists
*
* $Log: not supported by cvs2svn $
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -38,6 +41,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _LINKLIST_H
#define _LINKLIST_H
+49 -26
View File
@@ -9,16 +9,31 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/PsTypes.h $
* $Revision: 2.17 $
* $Date: 2004-04-03 18:11:20 $
* $Author: Kazan $
* $Revision: 2.17 $
* $Date: 2004-04-03 18:11:20 $
* $Author: Kazan $
* $Revision: 2.21 $
* $Date: 2004-12-15 15:14:03 $
* $Author: Goober5000 $
* $Revision: 2.21 $
* $Date: 2004-12-15 15:14:03 $
* $Author: Goober5000 $
*
* Header file containg global typedefs, constants and macros
*
* $Log: not supported by cvs2svn $
* Revision 2.20 2004/10/31 21:32:27 taylor
* no networking with Inferno builds, basic 64-bit OS support
*
* Revision 2.19 2004/08/11 05:06:24 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.18 2004/07/05 05:09:18 bobboau
* FVF code, only the data that is needed is sent off to the card,,
* OGL can take advantage of this if they want but it won't break
* anything if they don't. also state block code has been implemented,
* that's totaly internal to D3D no high level code is involved.
*
* Revision 2.17 2004/04/03 18:11:20 Kazan
* FRED fixes
*
* Revision 2.16 2004/03/05 09:01:52 Goober5000
* Uber pass at reducing #includes
* --Goober5000
@@ -283,6 +298,7 @@
*
*/
#include "PreProcDefines.h"
#ifndef _PSTYPES_H
#define _PSTYPES_H
@@ -306,6 +322,11 @@
// #define GAME_CD_CHECK
// #endif
// Inferno build break multiplayer to just build without networking
#if defined(INF_BUILD)
#define NO_NETWORKING
#endif
// 4127 is constant conditional (assert)
// 4100 is unreferenced formal parameters,
// 4514 is unreferenced inline function removed,
@@ -344,21 +365,26 @@
#define LOCAL static // make module local varilable static.
#if defined( _WIN32 ) && defined( _MSC_VER )
#ifdef IAM_64BIT
typedef __int32 _fs_time_t; // time_t here is 64-bit and we need 32-bit
typedef __int32 fix;
// PTR compatible sizes
typedef __int64 ptr_s;
typedef unsigned __int64 ptr_u;
#else
typedef long fix;
typedef long _fs_time_t;
typedef int ptr_s;
typedef unsigned int ptr_u;
#endif // 64-bit
typedef __int64 longlong;
typedef unsigned __int64 ulonglong;
#elif defined ( __GNUC__ )
typedef long long longlong;
typedef unsigned long long ulonglong;
#else
#error unknown compiler/architecture
#endif
typedef long fix;
typedef unsigned char ubyte;
typedef unsigned short ushort;
typedef unsigned int uint;
#define HARDWARE_ONLY
//Stucture to store clipping codes in a word
@@ -410,20 +436,11 @@ typedef struct uv_pair {
// Used to store rotated points for mines.
// Has flag to indicate if projected.
typedef struct vertex {
vertex(){
x=0.0f;y=0.0f;z=0.0f;
u=0.0f;v=0.0f;
sx=0.0f;sy=0.0f;sw=0.0f;
env_u=0.0f;env_v=0.0f;
spec_r=0;spec_g=0;spec_b=0;
r=0;g=0;b=0;a=0;
}
float x, y, z; // world space position
float sx, sy, sw; // screen space position (sw == 1/z)
float u, v; // texture position
float u, v, u2, v2, u3, v3, u4, v4; // texture position
vector real_pos; // _real_ world position
ubyte spec_r, spec_b, spec_g; //specular highlights -Bobboau
float env_u, env_v;
ubyte spec_a, spec_r, spec_b, spec_g; //specular highlights -Bobboau
ubyte r, g, b, a; // color. Use b for darkening;
ubyte codes; // what sides of view pyramid this point is on/off. 0 = Inside view pyramid.
ubyte flags; // Projection flags. Indicates whether it is projected or not or if projection overflowed.
@@ -511,6 +528,12 @@ void gr_activate(int);
#endif
/*******************NEVER UNCOMMENT Assert ************************************************/
// Goober5000 - shouldn't the above be never COMMENT (that is, never DISABLE) Assert?
// Goober5000 - define Verify for use in both release and debug mode
#define Verify(x) do { if (!(x)){ Error(LOCATION, "Verify failure: %s\n", #x); } } while(0)
//#define Int3() _asm { int 3 }
#ifdef INTERPLAYQA
+16 -5
View File
@@ -9,13 +9,23 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/SystemVars.cpp $
* $Revision: 2.2 $
* $Date: 2002-11-22 20:56:15 $
* $Author: phreak $
* $Revision: 2.5 $
* $Date: 2004-10-31 21:33:05 $
* $Author: taylor $
*
* Variables and constants common to FreeSpace and Fred.
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2004/07/26 20:47:31 Kazan
* remove MCD complete
*
* Revision 2.3 2004/07/12 16:32:47 Kazan
* MCD - define _MCD_CHECK to use memory tracking
*
* Revision 2.2 2002/11/22 20:56:15 phreak
* added OGL_inited global. Sets to 0 even if OGL isn't defined by preproccessor
* -phreak
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
@@ -202,6 +212,7 @@
#include "io/timer.h"
#include "nebula/neb.h"
fix Missiontime;
fix Frametime;
int Framecount=0;
@@ -237,8 +248,8 @@ int Fred_found_unknown_ship_during_parsing = 0;
// If true, then we are using Direct3D hardware. This is used for game type stuff
// that changes when you're using hardware.
int D3D_enabled = 0;
int OGL_inited=0;
// for OGL
int OGL_enabled = 0;
// Values used for noise for thruster animations
float Noise[NOISE_NUM_FRAMES] = {
+14 -3
View File
@@ -9,13 +9,21 @@
/*
* $Logfile: /Freespace2/code/GlobalIncs/SystemVars.h $
* $Revision: 2.4 $
* $Date: 2004-02-20 04:29:54 $
* $Author: bobboau $
* $Revision: 2.6 $
* $Date: 2004-10-31 21:33:05 $
* $Author: taylor $
*
* Variables and constants common to FreeSpace and Fred.
*
* $Log: not supported by cvs2svn $
* Revision 2.5 2004/08/11 05:06:24 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.4 2004/02/20 04:29:54 bobboau
* pluged memory leaks,
* 3D HTL lasers (they work perfictly)
* and posably fixed Turnsky's shinemap bug
*
* Revision 2.3 2003/09/26 14:37:14 bobboau
* commiting Hardware T&L code, everything is ifdefed out with the compile flag HTL
* still needs a lot of work, ubt the frame rates were getting with it are incredable
@@ -211,6 +219,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _SYSTEMVARS_H
#define _SYSTEMVARS_H
@@ -316,6 +325,8 @@ extern float Noise[NOISE_NUM_FRAMES];
// If true, then we are using Direct3D hardware. This is used for game type stuff
// that changes when you're using hardware.
extern int D3D_enabled;
// for OGL
extern int OGL_enabled;
// game skill levels
#define NUM_SKILL_LEVELS 5
Loaded 100 of 542 files, more files were not shown because too many files have changed in this diff. Show more