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
taylor 4afe186dc4 disable COLOR_MATERIAL, for nvidia drivers 2004-05-13 00:17:20 +00:00
phreak 87c5d993dc got rid of the color material call, nebulas should blind the player 2004-05-12 23:24:35 +00:00
phreak a0666e9591 don't fog the warp model if its being rendered 2004-05-12 22:50:31 +00:00
phreak 593285a975 renamed the warp model variable from 'wm' to 'Warp_model' 2004-05-12 22:49:14 +00:00
taylor 7096ffbc98 do page in unlock but not for gr_preload() stuff 2004-05-11 23:08:55 +00:00
phreak 490678193a fixed an array bounds error that was causing debug builds to crash when
rendering a ship
2004-05-11 19:39:29 +00:00
phreak 3d3c197dc0 fixed the white boxes appearing on unlit bitmaps 2004-05-11 16:48:19 +00:00
Goober5000 7ac03c7835 completed the FRED import conversion stuff that I started ages ago
--Goober5000
2004-05-11 02:52:12 +00:00
Goober5000 887239e1d4 fixed the AWACS help message
--Goober5000
2004-05-10 13:07:22 +00:00
Goober5000 ea415cce97 made primary and secondary banks quite a bit more friendly... added error-checking
and reorganized a bunch of code
--Goober5000
2004-05-10 10:51:54 +00:00
Goober5000 409e068104 fixored the handling of no lasers and no engines... the tests should check the ship,
not the object
--Goober5000
2004-05-10 08:03:31 +00:00
Goober5000 b4ec7e4e34 fixed $quote and $semicolon... it was simply a matter of moving the spot where
the replacement occurred
--Goober5000
2004-05-10 06:14:40 +00:00
Goober5000 7ad5b133ff fixed warp decision
--Goober5000
2004-05-10 06:11:47 +00:00
phreak 01bc1043e4 bumped to 3.6!!!! 2004-05-09 23:32:40 +00:00
taylor dad23b95db prefer ani over pcx for ship textures 2004-05-09 15:02:00 +00:00
Goober5000 23a79af4dc small fix
--Goober5000
2004-05-08 01:08:48 +00:00
Kazan 39bbccebfc Sorry Guys! 2004-05-07 23:50:14 +00:00
Goober5000 b32d1c7fa9 added Righteous1's Y bug hack
--Goober5000
2004-05-07 19:06:45 +00:00
taylor b318f01819 ...missed one... 2004-05-06 22:39:37 +00:00
taylor 7e8ca9a005 DDS mipmap reading, remove unneeded bm_unlock() during page in 2004-05-06 22:35:26 +00:00
taylor 6f657470fe get mipmap count off of DDS textures for later use 2004-05-06 22:31:02 +00:00
taylor dfc59ef087 fix DDS textures 2004-05-06 22:26:52 +00:00
taylor b09c3b3491 make sure JPG and DDS files are added to the file cache for maps and effects 2004-05-06 22:12:14 +00:00
Kazan c63f80dbaf 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)
2004-05-03 21:22:23 +00:00
randomtiger 66556fe514 fl_abs(theta_goal.xyz.z) < 0.001f is reporting using mprintf now instead of assert 2004-05-03 09:27:16 +00:00
randomtiger d4d41d8eff Fixed D3D fogging on R7000 2004-05-03 08:41:24 +00:00
taylor 12d6469ee7 don't use HTL line fix with Fred 2004-05-02 16:01:38 +00:00
Goober5000 d0f604c81a added a comment
--Goober5000
2004-05-02 03:05:23 +00:00
taylor f5f347109c comment out avi free code for now 2004-05-02 01:26:52 +00:00
randomtiger 4195c0e9fa 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.
2004-05-01 22:47:23 +00:00
taylor f87fbdb857 add some error handling to vm_strdup() 2004-05-01 21:53:39 +00:00
Kazan d97912ce37 bah! stupid me "NULL" not "null" - i hate when i do that 2004-05-01 21:47:43 +00:00
Kazan 1b725c3ac4 changed delete[] to free(), checked for null, if null ERROR 2004-05-01 21:45:31 +00:00
Kazan ab23820319 delete[] str_temp
A null check on str_temp is not needed - take a close look at the for loop
2004-05-01 19:49:31 +00:00
taylor 8c7614ac34 add CF_TYPE_MISSIONS to physical check to avoid network transfer problems 2004-05-01 19:33:20 +00:00
Goober5000 63b9d44968 added an assert
--Goober5000
2004-05-01 17:37:09 +00:00
Kazan 8887c8a07e Multiple -mod - "-mod ModA,ModB,ModC" in order of priority
Giving you:
Root: ModA
Root: ModB
Root: ModC
Root: Fs2Default
Root: CDRom
2004-05-01 17:10:37 +00:00
Goober5000 8367ed5943 extra insurance
--Goober5000
2004-04-30 22:20:27 +00:00
Kazan 6ceeeb7239 Lobby screen only shows when PXO_LOBBY is defined 2004-04-30 18:33:22 +00:00
taylor 1e5fe42652 fix create game buttons 2004-04-27 20:43:32 +00:00
taylor b9802a0d6e add NULL check to game_hacked_data() to prevent crash 2004-04-27 20:41:58 +00:00
Goober5000 343423adc2 added back in Kazan's line: now you can slow down in cheat mode
whether you press tilde or not
--Goober5000
2004-04-26 19:50:04 +00:00
Goober5000 961cfbe12e rolled back Kazan's change
--Goober5000
2004-04-26 19:43:07 +00:00
Kazan 1207801f77 -no_fps_capping 2004-04-26 18:23:48 +00:00
Kazan fd816a1a5b Be careful when modifying other peoples changes - make sure they still work, and do things the simple way
DON'T TOUCH THE CUSTOM BUILD PATH
2004-04-26 17:27:17 +00:00
taylor e086613047 forgot to remove some safety checks that aren't needed anymore 2004-04-26 15:51:26 +00:00
taylor c121c18b4f mark view cutscenes ignoring extension and file case 2004-04-26 13:11:11 +00:00
taylor 5e0b6a687f cvs log header, mark cutscenes viewable for later, gr_flip() to fix OGL white flash 2004-04-26 13:09:20 +00:00
taylor 2ccaf8f927 respect -glow and -spec 2004-04-26 13:05:19 +00:00
taylor c94d4bea59 light setup changes, support cmdline ambient value 2004-04-26 13:02:27 +00:00
taylor 7528ef0fef DevIL stuff 2004-04-26 13:00:56 +00:00
taylor 901e565798 convert to dos format, add DevIL stuff 2004-04-26 12:57:47 +00:00
taylor 7323c9e0da 32-bit targa and jpeg loaders, bug fixes, some preload stuff 2004-04-26 12:44:54 +00:00
taylor 054bcf6dec minor fixes, HTL lines, 32-bit texture support 2004-04-26 12:43:58 +00:00
taylor 79a01657a7 gr_preload() pointer for use in bmpman.cpp 2004-04-26 12:41:46 +00:00
taylor ff5ee510a3 correct header to keep cvs log, minor changes 2004-04-26 12:39:49 +00:00
taylor b4f3e252d0 use d3_draw_rod() for lightning arcs (for OGL fix), fix debris making HUD in OGL disappear 2004-04-26 12:38:35 +00:00
taylor c10a141861 don't try to load glow maps if they are disabled 2004-04-26 12:37:10 +00:00
taylor a83e3a6223 add color and HTL support for g3_draw_rod() 2004-04-26 12:36:10 +00:00
taylor 76d820d0f4 32-bit support with DevIL 2004-04-26 02:14:38 +00:00
taylor b0ece8eb3a initial checkin 2004-04-26 02:05:17 +00:00
taylor e5f836df4b initial checkin 2004-04-26 01:58:17 +00:00
taylor e4256a1cd3 s/idex/idx/ for brief_unload_anims() 2004-04-26 01:41:52 +00:00
taylor 06e8db1bf8 better anim free stuff, disable for now to prevent CTD 2004-04-26 01:40:53 +00:00
taylor c84fbacb8b use absolute moddir path, faster cfilesystem searching 2004-04-26 00:26:37 +00:00
taylor cba0190e05 don't preload every sound (fixes some slowdowns), snd_preload option support 2004-04-26 00:25:08 +00:00
taylor 39e9479ac8 novbo and snd_preload cmdline options, fix moddir getting appended space 2004-04-26 00:23:26 +00:00
Goober5000 f8f1ef779e made time dilation only available in cheat mode; also fixed an obscure CTD
--Goober5000
2004-04-25 06:31:53 +00:00
Kazan 9fccd4c2d0 Fixed Lobby screen showing up while exiting from non-tracker games
Time dialiation up to 1/4
2004-04-24 15:44:22 +00:00
randomtiger 8dc2c082c3 Added -2d_poof command which allows access to 2D poof rendering
Added -radar_reduce to launcher flag description structure
2004-04-18 19:39:13 +00:00
taylor 7ec25aa692 let language reg setting override auto detection 2004-04-14 23:17:26 +00:00
taylor 3835d0758b render lightning unlit so that it works in OGL 2004-04-14 10:27:24 +00:00
taylor e4ab7f2254 don't page in neb poofs unless in a neb2 mission, fix OGL whiteout issue 2004-04-14 10:25:50 +00:00
taylor abbd2a260e fix for lines and shaders - shouldn't be textured 2004-04-14 10:24:51 +00:00
taylor 892cf38736 fix extra large model with -ship_choice_3d in OGL 2004-04-14 00:37:36 +00:00
Goober5000 cc9afc7d3e fixed the custom hitpoints subsystem bug
--Goober5000
2004-04-13 05:42:45 +00:00
phreak f210455827 put in the correct fields for the CVS comments to register
fixed a glowmap problem that occured when rendering glowmapped and non-glowmapped ships
2004-04-13 01:55:41 +00:00
randomtiger 55f84acd98 Adding batching functions here and there and into gr_screen for use with OGL when its ready. 2004-04-11 13:56:33 +00:00
randomtiger b6f02b52cb Fixed movie playing code for fresh install. Removed NO_DSHOW_CODE paths. 2004-04-11 13:43:26 +00:00
Goober5000 b21ab3282d quashed the slider bug!
--Goober5000
2004-04-10 16:55:45 +00:00
Goober5000 1f3318524b some formatting 2004-04-10 16:55:23 +00:00
phreak e2e5a24926 moved an assignment statement inside an #ifdef block so dds works in release mode 2004-04-09 20:32:31 +00:00
phreak 1120cdaa03 fixed DDS not working in OpenGL. there was a misplaced Assert() 2004-04-09 20:07:56 +00:00
phreak 25c7c7c8af got rid of some compile warnings 2004-04-08 20:13:17 +00:00
righteous1 07a01628a0 Backing out mainhall audio fix attempt. 2004-04-08 05:00:13 +00:00
phreak edae245b0e changed around the order of some function calls to get the target model
properly rendering in the hud targetbox
2004-04-07 17:20:24 +00:00
righteous1 fdde5a6713 Updated to call alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1 2004-04-07 03:32:45 +00:00
righteous1 28508f0be4 Updated to add alt_tab_pause() function to draw pause screen and discontinue sounds when the game is minimized. -R1 2004-04-07 03:31:53 +00:00
Goober5000 1502269102 code.dsp should definitely have browse info checked
--Goober5000
2004-04-06 16:25:06 +00:00
Goober5000 d496969846 commented out one of Bobboau's hacks because it was messing stuff up
--Goober5000
2004-04-06 16:19:11 +00:00
Goober5000 e7ee4f4ef1 ugh - added back in something that Bobboau removed
-Goober5000
2004-04-06 05:42:49 +00:00
phreak 7f25fcf05f oops, hanging ')' 2004-04-06 05:28:07 +00:00
phreak 4551cda108 properly commented Local SSM code.
put in some estimation code so the Local SSMs warp in closer to moving ships
2004-04-06 05:26:59 +00:00
phreak 105e95a991 Local SSMs now working again after the code for setting the jumpout/jumpin
times for the missile were removed.
2004-04-06 04:53:21 +00:00
phreak 2257b4efde added a control config option for the wireframe hud targetbox i enabled ages ago 2004-04-06 03:09:53 +00:00
phreak d53c6289dc removed gropenglw32x.cpp (obsolete) and gropengl2d.cpp (unused and accidentaly committed) 2004-04-06 01:51:36 +00:00
phreak d5bc0051fb added comments (terms of use, commit history) to the tops of files 2004-04-06 01:37:21 +00:00
Kazan 4477777cd4 make custom build work again 2004-04-06 01:11:41 +00:00
phreak d81cfcbbba OpenGL files spilt up to make developing and finding bugs much easier 2004-04-03 20:29:53 +00:00
Kazan 42e936b6b1 FRED fixes 2004-04-03 18:11:21 +00:00
Goober5000 f6007413de fixed some stub functions and a bunch of compile warnings
--Goober5000
2004-04-03 06:22:33 +00:00
bobboau 12b3ffb6b9 commiting recent minor bug fixes 2004-04-03 02:55:50 +00:00
randomtiger 034f987d38 Changed D3D secondry texture system to be off by default to save mem.
Added some friendly names for parameters.
2004-04-02 18:25:16 +00:00
taylor d3ca761e30 don't use interface anis as ship textures 2004-04-01 15:31:22 +00:00
taylor f8dcf11f99 close out briefing menu bitmaps before entering mission 2004-04-01 15:29:39 +00:00
taylor a780021f7b don't load all starfield bitmaps on level load 2004-04-01 15:28:42 +00:00
Goober5000 f43da62c3e 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
2004-03-31 05:42:29 +00:00
Goober5000 6487bd1ff4 got rid of Bobboau's SAFEPOINTs in hudtarget.cpp
--Goober5000
2004-03-31 04:24:49 +00:00
taylor bb870a6926 handle movie file extensions better 2004-03-30 08:30:38 +00:00
phreak 6216fb09da fixed a minor bug where the version checker
would complain even if the correct version of OpenGL was present
2004-03-29 02:24:20 +00:00
taylor a1751c30ab runtime language selection, mantis:0000133 2004-03-28 17:49:55 +00:00
randomtiger 98e7e86697 Movies now use win32 calls to clear the screen before playback. 2004-03-27 23:23:36 +00:00
randomtiger c488360abc Committed possible fix to cutscene listing problem in techroom, as described in mantis. 2004-03-27 22:27:07 +00:00
randomtiger c38d9601c8 Bug fix for video playback. 2004-03-21 17:38:18 +00:00
bobboau aa60ef5bcc fixed a texture loading bug 2004-03-21 10:34:05 +00:00
randomtiger e611d3d74e Fixed a bug that was causing windowed movie playback and a crash.
Added some batching redirection.
2004-03-21 09:41:54 +00:00
bobboau 24a9694494 fixed -spec comand line option,
probly some other stuf
2004-03-20 21:17:13 +00:00
randomtiger 55671189f0 Added base for a general dynamic batching solution.
Fixed NO_DSHOW_CODE code path bug.
2004-03-20 14:47:14 +00:00
randomtiger 8e595a903c New command line parameter: -d3d_lesstmem causes D3D to bypass V's secondry texture system. 2004-03-19 14:51:55 +00:00
randomtiger 2e49d55faf Further D3D texture system simplification. 2004-03-19 12:35:58 +00:00
randomtiger 08d8e0799a Removed -d3d_notmanaged param.
Tided D3D texture code. Merged remaining section code into the rest of the system.
Prepared for removal of code causing waste of memory for secondry store of textures.
2004-03-19 11:44:04 +00:00
bobboau 5d54009c21 new fighter beam code
fixed old after burner trails
had to bump a few limits, working on some dynamic solutions
a few fixed to background POF rendering
fixing asorted bugs
2004-03-17 04:07:32 +00:00
randomtiger fcc33b856f Added new launcher flag construction code. 2004-03-16 18:37:02 +00:00
phreak b8d48fac23 really fixed opengl shields this time 2004-03-16 17:41:12 +00:00
randomtiger 4c27f96902 Commented out shield fix that broke shield rendering for D3D.
Fix didnt appear to work for OGL so I didnt bother to if(OGL) it.
2004-03-16 11:52:17 +00:00
phreak 9fde027411 bumped MAX_SOUNDS to 450 if INF_BUILD is defined 2004-03-12 16:26:39 +00:00
phreak 2af460314d bumped MAX_GAME_SOUNDS to 400 if INF_BUILD is defined 2004-03-12 16:23:49 +00:00
Kazan a639da2973 irc 2004-03-10 20:51:16 +00:00
Kazan 9cbbb6fd03 generally it helps if i actually add and commit the files i want to modify on a different system 2004-03-10 19:11:40 +00:00
Kazan 20a083c859 partially complete IRC - so i can work on it on my laptop 2004-03-10 18:45:09 +00:00
Kazan 685880a7b6 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
2004-03-09 17:59:01 +00:00
Kazan 9010d21b32 more fs2netd stuff 2004-03-09 00:02:16 +00:00
phreak 841774f69f fugly hack to get skyboxes working in HT&L. please port stars_draw() to use HT&L
so this hack can be removed
2004-03-08 22:16:32 +00:00
Kazan 04e34810e0 Lobby GUI screen restored 2004-03-08 22:02:39 +00:00
phreak dcfc77364e fixed a bug so that shields now render in Opengl HT&L 2004-03-08 22:01:29 +00:00
phreak be2d15fc4f made a minor logical fix to gr_opengl_tmapper_internal
disabled pcx32 and jpgtga flags if they were defined by the user
2004-03-08 21:57:04 +00:00
phreak 014e261af1 split the star and space debris rendering loops into their own separate functions
this makes it easier to edit them if we ever need to and it also increases readability
i also brought some variable declarations outside of the rendering loops
2004-03-08 21:55:20 +00:00
randomtiger f343c2f7b1 Added complete stub system to replace software. 2004-03-08 18:36:21 +00:00
Kazan 30ae2da9cd Did, undo 2004-03-08 15:06:24 +00:00
Kazan 9236bd6d7c *crosses fingers* 2004-03-08 15:03:27 +00:00
Kazan 85f05019b5 [Incomplete] Readd of Software renderer so Standalone server works
Also FS2NetD changes
PS: CVS crashing mid-transaction and leaving stale locks = annoying++
2004-03-08 14:53:11 +00:00
Kazan 6509badc36 [Incomplete] Readd of Software renderer so Standalone server works 2004-03-07 23:07:20 +00:00
randomtiger 21856a78e5 If user has stub ani's dshow code will fail gracefully instead of throwing up an error. 2004-03-07 14:02:22 +00:00
bobboau 6ee175e65d fixed motion debris
animated laser textures
and added a new error check called a safepoint, mostly for tracking the 'Y bug'
2004-03-06 23:28:24 +00:00
Goober5000 2f067ae8aa weapons now display counts up to 9999, instead of just 999
--Goober5000
2004-03-06 00:19:23 +00:00
Goober5000 fcc38162c5 d'oh!
--Goober5000
2004-03-05 23:54:48 +00:00
Goober5000 771e6b2faa made awacs only ask for help in the main fs2 campaign
--Goober5000
2004-03-05 23:41:04 +00:00
Kazan 28cc2957c8 Fixed mission validation (was returning false positives) 2004-03-05 21:24:53 +00:00
Kazan 1e99847291 Fixed mission validation (was returning false positives) 2004-03-05 21:19:39 +00:00
Goober5000 2edd420943 Uber pass at reducing #includes
--Goober5000
2004-03-05 09:02:13 +00:00
phreak 852ec76549 fixed the lack of ships in the hud targetbox
prevented other functions calls to glColor3ub() from messing
with the color of textures in gr_opengl_render_buffer().  this was causing some
minor rendering bugs
2004-03-05 04:33:09 +00:00
phreak 7caf442717 made OpenGl use the matrix api if called by g3_start_**** or g3_done_instance 2004-03-05 04:16:20 +00:00
randomtiger e1ca009d9a Think I have fixed dshow window focus error, will tidy code when confirmed. 2004-03-04 20:56:43 +00:00
Kazan 5b591c2c4c LAN works A1 Supar! 2004-03-04 05:57:45 +00:00
Goober5000 55c7d0e0fc preliminary checking of globals.h
--Goober5000
2004-02-28 20:26:10 +00:00
randomtiger 6a2cadb08f Removed a few uneeded if DIRECT3D's.
Set laser function to only render the effect one sided.
Added some stuff to the credits.
Set D3D fogging to fall back to vertex fog if table fog not supported.
2004-02-28 14:14:57 +00:00
Goober5000 0ccb8a19dc commented a slide_face_ship that I missed before
--Goober5000
2004-02-28 01:36:20 +00:00
bobboau 7d87db1939 fixed a Z buffer error in HTL submodel rendering,
and glow points,
and other stuff
2004-02-27 04:09:56 +00:00
Goober5000 e94733df9c added DONT_SHOW_WARNINGS compile branch
--Goober5000
2004-02-25 05:53:32 +00:00
Goober5000 a69f3bd271 removed an old function
--Goober5000
2004-02-23 07:45:38 +00:00
Kazan d7905cd06a FS2NETD License Comments 2004-02-21 00:59:43 +00:00
randomtiger 244b9718d5 Added * to - conversion for start mission code to allow launcher missions with '-' in them.
Currently the parsing code counts that as a flag and messes it up.
2004-02-20 21:58:07 +00:00
randomtiger 020379cf40 Removed some uneeded code between NO_DIRECT3D and added gr_zbias call, ogl is set to a stub func.
Changed -htl param to -nohtl. Fixed some badly named functions to match convention.
Fixed setup of center_alpha in OGL which was causing crash.
2004-02-20 21:45:41 +00:00
randomtiger 183587f8b4 Changed memory leak detection to happen after atexit all other calls.
This will mean it doesnt report leaks that are cleared by just before the game quits by preset functions.
2004-02-20 18:04:27 +00:00
bobboau a963f3ccc1 pluged memory leaks,
3D HTL lasers (they work perfictly)
and posably fixed Turnsky's shinemap bug
2004-02-20 04:29:57 +00:00
bobboau e540947704 fixing lighting bug I accedently introduced 2004-02-16 21:53:40 +00:00
randomtiger b94f8cddde Use _REPORT_MEM_LEAKS compile flag in code.lib to get a report of memory leaks from malloc calls. 2004-02-16 21:22:15 +00:00
phreak 6fd1ef440b grr fixed a warning message i didn't see 2004-02-16 16:15:04 +00:00
phreak cd2b9d9871 made the window command line tag recognize non-standard resolutions 2004-02-16 16:09:59 +00:00
randomtiger eb1b936ff1 Oops, put two files back in, went a bit too far.
Added NO_DSHOW_CODE as a temp solution to Bobs compiling problem.
2004-02-16 12:53:43 +00:00
randomtiger 8bf7c4076b 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.
2004-02-16 11:47:34 +00:00
bobboau 9a76ae8d12 fixed sevral asorted matrix errors,
OGL people make sure I didn't break anything,
most of what I did was replaceing falses with (if graphicts_mode == D3D)
2004-02-15 06:02:32 +00:00
bobboau a9dc8db3bb fixed bug involving 3d shockwaves, note I wasn't able to compile the directshow file, so I ifdefed everything to an older version,
you shouldn't see anything diferent, as the ifdef should be set to the way it should be, if it isn't you will get a warning mesage during compile telling you how to fix it
2004-02-15 03:04:25 +00:00
Goober5000 b99a6b6af2 hmph... fixed some bugs
--Goober5000
2004-02-14 04:26:58 +00:00
randomtiger 397699ec31 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:
Removal of many files from project.
Removal of meanless Gr_bitmap_poly variable.
Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
Removal of redundant Fred paths that arent needed for Fred OGL.
Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
Fixed many D3D non standard mode bugs and brought OGL up to the same level.
Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
2004-02-14 00:18:37 +00:00
randomtiger 3529db4d37 Turned off fog in OGL for Fred.
Simulated speech doesnt say tags marked by $ now.
The following are fixes to issues that came up testing TBP in fs2_open and fred2_open:
Changed vm_vec_mag and parse_tmap to fail gracefully on bad data.
Error now given on missing briefing icon and bad ship normal data.
Solved more species divide by zero error.
Fixed neb cube crash.
2004-02-13 04:17:14 +00:00
phreak 694d089fe0 fixed a bug where the inferno build would get lower limits for MAX_PERSONAS if INF_BUILD was defined 2004-02-12 22:29:55 +00:00
Goober5000 de560ceb29 fixed the barracks crash bug
--Goober5000
2004-02-10 21:47:47 +00:00
matt 73c417bf70 Fixed issue with ships being rendered off center
in the HUD target box. Much easier than I
thought
-- Sticks
2004-02-10 05:07:38 +00:00
Goober5000 dfc06acfd3 fixed a small bug in FS1-compatible music
--Goober5000
2004-02-08 03:35:08 +00:00
Goober5000 1b0a949dc5 fix for undestroyable subsystems
--Goober5000
2004-02-07 05:11:08 +00:00
Goober5000 4e7667842b hehe, fixed the subsystem compare so it's not destructive :-p
and also fixed the model checking routine
--Goober5000
2004-02-07 01:25:15 +00:00
Goober5000 5129749cb8 made FS2 able to account for subsystem mismatches between ships.tbl and the
model file - e.g. communication vs. communications
--Goober5000
2004-02-07 00:48:53 +00:00
Goober5000 1fe6fa8b06 tweakage
--Goober5000
2004-02-06 23:17:43 +00:00
Goober5000 7034e99aa5 commented my tmap_num Asserts
--Goober5000
2004-02-06 23:00:29 +00:00
Goober5000 47e55fe686 fixed a small HUD bug I introduced
--Goober5000
2004-02-06 22:58:18 +00:00
Goober5000 668ddde68b fixed a small compatibility bug
--Goober5000
2004-02-06 21:26:07 +00:00
Goober5000 ea259b8961 ugh... okay, *really* fixed the head thing this time
--Goober5000
2004-02-06 21:25:43 +00:00
matt 3428289778 Fix for bad ambient lighting in non-htl -Sticks 2004-02-06 05:55:46 +00:00
Goober5000 12c9238f62 fixed a few random bugs
--Goober5000
2004-02-05 14:31:45 +00:00
Goober5000 360060f59d fixed the talking head error
--Goober5000
2004-02-05 14:29:33 +00:00
randomtiger 720b16befb Small changes, deleted old dshow stuff 2004-02-05 01:41:33 +00:00
Goober5000 def739c279 commented a decal function that someone missed
--Goober5000
2004-02-04 10:14:58 +00:00
Goober5000 0e9af797e5 changed spec and glow to be off by default; command lines are now -spec and -glow
--Goober5000
2004-02-04 10:14:25 +00:00
Goober5000 17665a6333 more player ai stuff
--Goober5000
2004-02-04 09:21:36 +00:00
Goober5000 58b82fefd8 got rid of unnecessary double semicolons
--Goober5000
2004-02-04 09:02:45 +00:00
Goober5000 66cb87e18f made code more uniform and simplified some things,
specifically shield percentage and quadrant stuff
--Goober5000
2004-02-04 08:41:04 +00:00
Goober5000 564fb3fd19 fixed Asserts in two places and commented out an unneeded variable
--Goober5000
2004-02-04 04:28:15 +00:00
randomtiger 89fe89775c Fixed OGL fogging in HTL
Changed htl laser function to work in D3D, commented out until function flat bug is fixed
2004-02-03 18:29:30 +00:00
phreak e112deb37a commented out decal references 2004-01-31 04:06:29 +00:00
phreak a6189c4fdd changed "now" to unsigned int 2004-01-31 03:56:46 +00:00
phreak ff7dca2d05 commented out decal references 2004-01-31 03:54:50 +00:00
phreak d83d4098de commented out file pending rewrite 2004-01-31 03:52:41 +00:00
Goober5000 3c2e1de05e whew - I just went through all the code I ever added (or at least, that I could
find that I commented with a Goober5000 tag) and added a bunch of Asserts
and error-checking
--Goober5000
2004-01-30 07:39:09 +00:00
randomtiger 492597e3b2 Added malloc montoring system, use -show_mem_usage, debug exes only to get an ingame list of heap usage.
Also added -d3d_notmanaged flag to activate non managed D3D path, in experimental stage.
2004-01-29 01:34:02 +00:00
phreak 9078d2aea6 bumped MAX_AI_CLASSES to 30 if INF_BUILD is defined 2004-01-26 23:07:43 +00:00
randomtiger c74f634e79 Fix to blurring of interface bitmaps from TGA and JPG.
Changes to the pointsprite system, better but not perfect yet.
2004-01-26 20:03:51 +00:00
randomtiger 72f0a923e0 I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window.
In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from.
2004-01-24 15:52:26 +00:00
randomtiger 23be3b5605 Added the D3D particle code, its not bugfree but works perfectly on my card and helps with the framerate.
Its optional and off by default, use -d3d_particle to activiate.
Also bumped up D3D ambient light setting, it was way too dark.
Its now set to something similar to the original game.
2004-01-24 14:31:27 +00:00
randomtiger 49491fac75 Font and other small changes for Fred 2004-01-24 12:47:48 +00:00
randomtiger 8ebf284993 Fixed serious memory leak causes by use of -pcx32 flag 2004-01-23 00:14:27 +00:00
phreak 0a072d7403 bumped MAX_POLYGON_MODELS to 300 if INF_BUILD is defined. 2004-01-21 17:37:48 +00:00
phreak e862231feb added MAX_DRAW_DISTANCE to the ship selection display. This will only take effect if the ani isn't there 2004-01-21 17:37:04 +00:00
phreak f7df30b549 bumped MAX_PERSONAS to 25 if INF_BUILD is defined. 2004-01-21 17:34:31 +00:00
phreak 3f87bea143 added MAX_DRAW_DISTANCE constant 2004-01-21 17:33:47 +00:00
phreak e1dce56a56 added version string message if build is an inferno build 2004-01-21 17:32:05 +00:00
Goober5000 9ae52aa90a whoops, messed up the speech slightly
--Goober5000
2004-01-20 23:56:28 +00:00
Goober5000 2523a62878 added some initialization to get rid of warnings
--Goober5000
2004-01-20 23:01:52 +00:00
Goober5000 1762e4a6be got rid of some warnings... it actually looks like Gr_gamma_lookup can be changed
from int to ubyte, because everything that accesses it converts to a ubyte  O.o
--Goober5000
2004-01-20 22:59:09 +00:00
Goober5000 e691cbc995 changed the speech stubs to #defines
--Goober5000
2004-01-20 22:50:18 +00:00
Goober5000 f98f7e12be commented the variables in a commented function
--Goober5000
2004-01-20 22:39:06 +00:00
Goober5000 7034b6a0f0 First of all, this should be more readable, second of all, old_fog_color wasn't
initialized and VC++ is complaining.  Someone want to fix this?
--Goober5000
2004-01-20 22:37:44 +00:00
Goober5000 d240e24ef1 bumped MAX_SEXP_NODES to 3000
--Goober5000
2004-01-20 22:20:41 +00:00
Goober5000 8f497bfac7 er... corrected some inexplicable code... Bobboau, mind explaining?
--Goober5000
2004-01-20 22:13:06 +00:00
Goober5000 23601fda0d heat-seekers now home in on hidden ships
--Goober5000
2004-01-20 22:10:01 +00:00
randomtiger 278eedf7ad *** empty log message *** 2004-01-19 00:57:18 +00:00
randomtiger efe43d3466 Some more small changes for Fred OGL 2004-01-19 00:56:10 +00:00
randomtiger e19577e35c Few more small changes for Fred OGL 2004-01-18 14:55:08 +00:00
randomtiger 42568915bd A couple of FRED_OGL changes. 2004-01-18 14:03:23 +00:00
randomtiger 6ca2f86255 Changed the #ifndef FRED I added to #ifndef FRED_OGL so they only effect OGL FRED compile 2004-01-18 13:17:55 +00:00
randomtiger 32b0a71369 Some small changes to the main codebase that allow Fred_open OGL to compile. 2004-01-17 21:59:56 +00:00
Goober5000 2cf3e96a6b I think this will fix the problem of the death head ani sometimes incorrectly playing
--Goober5000
2004-01-14 21:12:24 +00:00
Goober5000 cc187b758d added error checking for an annoying crash when running an out-of-range
sound; also, Phreak misspelled "tertiary"
--Goober5000
2004-01-14 07:07:14 +00:00
Goober5000 ea11ea8a63 fixx0red a bug
--Goober5000
2004-01-14 06:38:41 +00:00
Goober5000 33212b6499 made set-support-ship number align with general FS convention
--Goober5000
2004-01-14 06:34:07 +00:00
randomtiger ef1880b03a Added new D3D particle module, will commit the code that uses it when its bug free. 2004-01-13 02:19:59 +00:00
randomtiger 077d4b2a54 Added fix for fogging debris in D3D htl. 2004-01-12 21:12:42 +00:00
phreak 07b00e2fae fixed a null pointer 2003-12-19 05:58:44 +00:00
phreak 018159b822 oops switched the signs in a comparison. thats what was causing debug builds to go haywire 2003-12-18 15:35:52 +00:00
phreak 7f20e9109f added a MAX_BUFFERS_PER_SUBMODEL define so it can be easily changed if we ever want to change the 16 texture limit 2003-12-17 23:25:10 +00:00
phreak 2cb5a44f3e fixed some logic when dealing with parsing local ssms 2003-12-17 20:38:26 +00:00
phreak 450ac81a1e added ai code for "small only" weapons. works for turrets at the moment 2003-12-17 16:42:20 +00:00
phreak dd840fe227 "small only" weapons flag added. weapon shoots at small ships like fighters 2003-12-17 16:41:25 +00:00
phreak 57772da95b disabled tertiary weapons support pending a rewrite of critical code 2003-12-16 21:06:21 +00:00
phreak e672918122 disabled tertiary weapons support pending a rewrite of critical code 2003-12-16 20:55:13 +00:00
phreak 6b00a67df0 made gr_set_proj_matrix use the MIN/MAX_DRAW_DISTANCE constants 2003-12-16 20:48:41 +00:00
phreak 8e68228c86 created two constants
MAX_DRAW_DISTANCE = 250000
MIN_DRAW_DISTANCE = 1
2003-12-16 20:42:36 +00:00
phreak 0cae377b72 replaced asserts in parse_ship with more descriptive warnings 2003-12-15 21:36:42 +00:00
phreak d343e5b73a made turrets use bob's $shots code 2003-12-15 21:32:59 +00:00
phreak 72cb0142b2 upped MAX_WEAPON_TYPES to 300 when INF_BUILD is defined 2003-12-15 21:30:24 +00:00
randomtiger ffdef38781 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
2003-12-08 22:30:02 +00:00
randomtiger 0578517f3a D3D now supports loading for DXT1-5 into the texture itself, defaults to on same as OGL.
Fixed bug in old ship choice screen that stopped ani repeating.
Changed all builds (demo, OEM) to use retail reg path, this means launcher can set all them up successfully.
2003-12-05 18:17:07 +00:00
randomtiger f994cdac45 Added DDS image support for D3D
Added new command flag '-ship_choice_3d' to activate 3D models instead of ani's in ship choice, feature now off by default
Hopefully have fixed D3D text batching bug that caused old values to appear
Added Hud_target_object_factor variable to control 3D object sizes of zoom in HUD target
Fixed jump nodes not showing
2003-12-04 20:39:10 +00:00
randomtiger 1f16f9dc23 Changed -t32 flag to -jpgtga
Added -query_flag to identify builds with speech not compiled and other problems
Now loads up launcher if videocard reg entry not found
Now offers to go online to download launcher if its not present
Changed target view not to use lower res texture, hi res one is already chached so might as well use it
2003-12-03 19:27:01 +00:00
Goober5000 dbaf87c202 fixed CVS log header so that changes would update more cleanly
--Goober5000
2003-12-02 03:16:16 +00:00
randomtiger 391c18e9e7 Undid my node fix, it introduced a lot of bugs, update again if you have that version. 2003-11-29 17:13:54 +00:00
fryday 026e23d8ed Fixed normal loading in OpenGL HT&L.
Fixed lighting in OpenGL HT&L, hopefully for the last time.
Added a test if a normal is valid during model load, if not, replaced with face normal
2003-11-29 16:11:46 +00:00
randomtiger 8a579733c0 Small changes to D3D setup 2003-11-29 15:48:11 +00:00
randomtiger cfc99c4f23 Rendering jumpnodes in htl via the old system to make them display again, appears to be so cheap it wouldnt be worth the effort to convert it to true htl. 2003-11-29 14:54:35 +00:00
randomtiger dac33aeb71 Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit.
Added stats command for ingame stats on memory usage.
Trys to play intro.mve and intro.avi, just to be safe since its not set by table.
Added fix for fonts wrapping round in non standard hi res modes.
Changed D3D mipmapping to a good value to suit htl mode.
Added new fog colour method which makes use of the bitmap, making this htl feature backcompatible again.
2003-11-29 10:52:10 +00:00
fryday 29af6aefbc Got lasers to work in HT&L OpenGL
Messed a bit with opengl_tmapper_internal3d, draw_laser functions, and added draw_laser_htl
2003-11-25 15:04:46 +00:00
Goober5000 99e6883251 fixed an old omission
--Goober5000
2003-11-25 02:32:16 +00:00
Goober5000 2513b23ad9 fixed bug in tech-reset-to-default
--Goober5000
2003-11-24 18:18:00 +00:00
Goober5000 d64d8ce6e0 fixed a bug introduced by Penguin for running with NO_NETWORK defined
--Goober5000
2003-11-23 00:59:01 +00:00
fryday 2f994399e9 Changed default alpha value for lasers in OpenGL to be like in D3D
Fixed Glowmaps being rendered with GL_NEAREST instead of GL_LINEAR.
Dynamic Lighting almost there. It looks like some normals are fudged or something.
2003-11-22 10:36:32 +00:00
phreak ad100d79dc changed PLAYER_MAX_DIST_WARNING to 700000 (700km)
changed PLAYER_MAX_DIST_END to 750000           (750km)

this makes the playing field much bigger
this way you don't get the "return to the field of battle messages"
in the future we should have the mission designer set this limit
2003-11-21 22:30:45 +00:00
randomtiger c11ed4873b Almost fully working 32 bit pcx, use -pcx32 flag to activate.
Made some commandline variables fit the naming standard.
Changed timerbar system not to run pushes and pops if its not in use.
Put in a note about not uncommenting asserts.
Fixed up a lot of missing POP's on early returns?
Perhaps the motivation for Assert functionality getting commented out?
Fixed up some bad asserts.
Changed nebula poofs to render in 2D in htl, it makes it look how it used to in non htl. (neb.cpp,1248)
Before the poofs were creating a nasty stripe effect where they intersected with ships hulls.
Put in a special check for the signs of that D3D init bug I need to lock down.
2003-11-19 20:37:25 +00:00
bobboau bbc8d83f37 got assert to work again 2003-11-17 06:52:52 +00:00
bobboau 9e0128f705 made the poly list dynamicly alocated,
started work on fixing the node model not rendering,
but most of that got commented out so I wouldn't have to deal with it
while mucking about with the polylist
2003-11-17 04:25:58 +00:00
Goober5000 c90c94b39f clarified and pruned debug spew messages
--Goober5000
2003-11-16 09:42:38 +00:00
Goober5000 9fc627aee5 language 2003-11-16 04:09:27 +00:00
Goober5000 edbc336888 fixed briefing scroll and display of "more"
--Goober5000
2003-11-16 04:08:47 +00:00
randomtiger 70ed9547a7 Put TGA and JPG stuff on -t32 flag
Put 32 bit PCX stuff on -pcx32 (still has bugs)
Added multisample checking on device initialisation
Changed unrecognised parameter message (as requested) to be more user friendly
Speech now chooses voice based on reg value set by launcher v3.1
2003-11-15 18:09:34 +00:00
Kazan 70ae616b0d *WARNING* Multi Compatability with previous versions now in question *WARNING*
[But that's ok, i incremented the multi version number the other day so that it will say "you don't have a compatable version"]

I upped the MAX_PACKET_SIZE from 512 to 4096 -- try and bust multi with more than ?130? ships now :D
2003-11-14 22:47:37 +00:00
Kazan 5801e69441 PXO_SID changed from unsigned to signed 2003-11-13 03:59:54 +00:00
Goober5000 d77dccf068 added Bobboau's real name to the credits, with his permission
--Goober5000
2003-11-12 06:05:00 +00:00
Kazan c157da28f6 (Kazan) /me slaps forehead... make sure things compile before committing.. sorry guys 2003-11-12 00:44:52 +00:00
Kazan a09b61d39e A few multi tweaks - fixed a couple warning-killing collisions between goober and me (kazan) 2003-11-12 00:31:45 +00:00
phreak ecfd1a015f changed g3_done_instance() calls to take a parameter to pop the T&L matrices 2003-11-11 18:12:41 +00:00
phreak 046e438380 made some functions that are there for 2d drawing not modify T&L matrices 2003-11-11 18:06:49 +00:00
phreak 0fd9bdff5e support for GL_ARB_vertex_buffer_object. should run real fast now with _VERY_
high poly ships
2003-11-11 18:05:02 +00:00
phreak 01e93d672c made g3_done_instance take a parameter that decides wether to pop the matrix stack.
without it, underflows would have been caused
2003-11-11 18:04:06 +00:00
phreak cd417c2158 made some g3_start_instance_matrix calls not affect any of the HT&L graphics
calls since they were called for internal calculations for 2D stuff
2003-11-11 17:59:27 +00:00
bobboau 2a522859ad shit load of bug fixing, much of it in nebula and bitmap drawing 2003-11-11 03:56:13 +00:00
Goober5000 1e6803a7fd ubercommit - basically spelling and language fixes with some additional
warnings disabled
--Goober5000
2003-11-11 02:15:47 +00:00
matt 1cf142d5d7 Fixed the projection matrix issues -Sticks 2003-11-10 02:44:36 +00:00
Goober5000 f1c749650c fixed spelling
--Goober5000
2003-11-09 07:36:52 +00:00
Kazan 4356a59467 a couple of htl functions being called in nonhtl (ie NULL functions) problems fixed
conflicts in cmdline and timerbar.h log entries
cvs stopped acting like it was on crack obviously
2003-11-09 06:31:40 +00:00
Goober5000 d3374eaabf edited for language
--Goober5000
2003-11-09 04:09:18 +00:00
Kazan 3ce9785fde Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar"
DONT FUCK WITH OTHER PEOPLES INCLUDE PATHS
DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths!
2003-11-08 22:25:47 +00:00
Kazan 4c6e954a04 yeah.. why didn't this commit last time 2003-11-08 21:55:03 +00:00
Goober5000 84cffa91f2 fixed a bug in my sexp code
--Goober5000
2003-11-08 04:31:02 +00:00
phreak 59bfbd24b1 reenabled timerbar 2003-11-07 20:55:15 +00:00
randomtiger cf61ab2454 Fixed a nohtl call to htl funcs (crash with NULL pointer)
Fixed a bug with 32bit PCX code.
Fixed a bug in the d3d_string batch system that was messing up screen shaking.
Added a couple of checks to try and stop timerbar push and pop overloads, check returns missing pops if you use the system.
Put in a higher res icon until we get something better sorted out.
2003-11-07 18:31:02 +00:00
Goober5000 9cb8408105 added some credit stuff
--Goober5000
2003-11-07 07:12:21 +00:00
phreak 82524891f5 fixed up some of the matrix functions that were causing problems
bob: i there is an important change here. i don't know if its going to cause any d3d problems
2003-11-06 22:49:22 +00:00
phreak 3b43f42ac8 added gr_start_**_matrix() and gr_end_**_matrix() around where 3d stuff is rendered 2003-11-06 22:47:37 +00:00
phreak aa3fe0ae83 added gr_start_**_matrix() and gr_end_**_matrix() around where ships are rendered 2003-11-06 22:47:02 +00:00
phreak 90adfed3f4 bob's stack functions implemented in opengl 2003-11-06 22:36:04 +00:00
randomtiger 694cab8b52 Added my batching solution for more efficient d3d_string.
Its part of the new grd3dbatch module, most of this isnt in use but it might help out later so I've left it in.
2003-11-06 21:10:26 +00:00
Kazan 28d7008b91 slight change to .dsp - leave the damn release target as fs2_open_r.exe already
added myself to credit
killed some of the stupid fscking warnings (including doing some casting and commenting out unused vars in the graphics modules)
Release builds should have warning level set no higher than 2 (default is 1)
Why the hell are we getting warning's about function selected for inline expansion... (killing them with warning disables)
FS2_SPEECH was not defined (source file doesn't appear to capture preproc defines correctly either)
2003-11-06 20:22:18 +00:00
matt baad5ab1a1 Added myself to the credits. -Sticks 2003-11-06 19:35:51 +00:00
randomtiger f0a1351b3d Added -d3d_no_vsync command to make turning off vsync optional.
Removed 32bit command, it doesnt do anything.
Made aa multisample reg check safe.
2003-11-03 18:07:26 +00:00
bobboau ea3b09b621 modified trails to render with tristrips now rather than with stinky old trifans,
MUCH faster now, at least one order of magnatude.
2003-11-02 05:50:08 +00:00
bobboau 0cc2b10c45 new matrix handeling code, and fixed some problems with 3D lit verts,
several other small fixes
2003-11-01 21:59:22 +00:00
Kazan fc0d71bd72 lil update 2003-10-30 15:30:23 +00:00
fryday 76dd81e73b Added code to handle MR_NO_ZBUFFER in d3d VB rendering code. 2003-10-30 08:20:36 +00:00
randomtiger eb1e903fbb D3D particle flicker fix, also fixes explosions and thruster glows 2003-10-29 18:18:52 +00:00
randomtiger 22f7acf0fb Updated timerbar code to work properly, also added support for it in OGL.
In D3D red is general processing (and generic graphics), green is 2D rendering, dark blue is 3D unlit, light blue is HT&L renders and yellow is the presentation of the frame to D3D. OGL is all red for now. Use compile flag TIMERBAR_ON with code lib to activate it.
Also updated some more D3D device stuff that might get a bit more speed out of some cards.
2003-10-29 02:09:18 +00:00
Goober5000 9ccd7a9006 tweakage
--Goober5000
2003-10-28 23:59:02 +00:00
randomtiger 731f460f7d Added -no_set_gamma flags
Fixed up some more non standard res stuff
Improved selection of device type, this includes using a pure device when allowed which means dev should not use Get* functions in D3D
Made fade in credits work
Stopped a call to gr_reser_lighting() in non htl mode when the pointer was NULL, was causing a crash loading a fogged level
Deleted directx8 directory content, has never been needed.
2003-10-27 23:04:23 +00:00
randomtiger 2851362007 Fixed hulls not drawing (with Phreaks advise).
Put my 32bit PCX loading under PCX_32 compile flag until its working.
Fixed a bug with res 640x480 I introduced with my non standard mode code.
Changed JPG and TGA loading command line param to "-t32"
2003-10-26 00:31:59 +00:00
phreak 7fe84d4e7c added an INF_BUILD option to bump max sounds to 400 if INF_BUILD is defined 2003-10-25 20:42:19 +00:00
bobboau a5729efca3 adding FOF stuff,
and fixed a small error in the matrix code,
I told you it was indeed suposed to be gr_start_instance_matrix
in g3_done_instance,
g3_start_instance_angles needs to have an gr_ API abstraction version of it made
2003-10-25 06:56:07 +00:00
phreak 38aa953754 fixed some old bugs that reappeared after RT committed his texture code 2003-10-25 03:27:50 +00:00
randomtiger ad224416de Implemented support for 32bit TGA and JPG for D3D
Also 32 bit PCX, but it still has some bugs to be worked out
Moved convert_24_to_16 out of the bitmap pfunction structures and into packunpack.cpp because thats the only place that uses it.
2003-10-24 17:35:05 +00:00
phreak c2e8ed3074 added code to render the user-defined skybox 2003-10-23 23:49:12 +00:00
phreak f4821c63f2 added code for the mission parser to recognize user defined skyboxes 2003-10-23 23:48:03 +00:00
randomtiger 4c0f6ab31f Bobs changes (take 2) 2003-10-23 18:03:25 +00:00
fryday bbe7d70bb1 Simplified model rendering, and it fixed up a serious bug on my system in which models with submodels didn't get their hull rendered 2003-10-23 13:53:36 +00:00
phreak 112f2cb5c8 commented out some mprintfs that kazan missed 2003-10-22 23:10:14 +00:00
phreak f6bdec81fe added gr_flip_window back in. its used in FRED 2003-10-21 18:23:15 +00:00
phreak 6e93c0772a cleaned up a bunch of repeated code 2003-10-20 22:32:37 +00:00
Goober5000 eeb0bcc3c6 added min, max, and avg sexps
--Goober5000
2003-10-20 11:49:18 +00:00
randomtiger 5132c845b0 Set gamma to 1.0 when quitting, someone was getting it carrying onto the desktop 2003-10-19 17:44:30 +00:00
phreak ea32ed86c9 clipping planes now work 2003-10-19 01:10:05 +00:00
phreak 2488f81b45 changed gr_start_instance_matrix(void) to gr_start_instance_matrix((vector*, matrix*) 2003-10-18 02:46:45 +00:00
phreak c40b01e40e edited gr_d3d_start_instance_matrix to make it take a vector* and a matrix*, but it doesn't do anything yet 2003-10-18 02:45:39 +00:00
phreak 9a4d8e46ef oops! forgot to bracket something off with an if :rolleyes: 2003-10-18 02:43:59 +00:00
phreak c9c0b38de5 switched around positions of gr_start_instance_matrix and gr_end_instance_matrix 2003-10-18 01:59:02 +00:00
phreak 591c5baca0 hardware transformation is working. now lighting needs to be done 2003-10-18 01:22:39 +00:00
randomtiger c9c5bdd7bb Big restructure for D3D and new modules grd3dlight and grd3dsetup 2003-10-17 17:18:43 +00:00
randomtiger 8ab51d480c D3D now has its own gamma system (stored in GammaD3D reg entry) that effects everything.
Put in Bobs specular fog fix.
2003-10-16 17:36:29 +00:00
Kazan cae9cec74b couple more types in species_defs.cpp, also finished up "Da Species Upgrade" 2003-10-16 16:38:17 +00:00
Kazan 16a51d7bf8 fixed typo in fallback code array index 2003-10-16 01:55:26 +00:00
randomtiger a338355f78 Added incomplete code to allow selection of non-standard modes in D3D (requires new launcher).
As well as initialised in a different mode, bitmaps are stretched and for these modes
previously point filtered textures now use linear to keep them smooth.
I also had to shuffle some of the GR_1024 a bit.
Put my HT&L flags in ready for my work to sort out some of the render order issues.
Tided some other stuff up.
2003-10-16 00:17:18 +00:00
Kazan 84cec97f57 Da Species Update :D 2003-10-15 22:03:27 +00:00
randomtiger 79f0e02ec2 Implemented hardware fog for the HT&L code path.
It doesnt use the backgrounds anymore but its still an improvement.
Currently it fogs to a brighter colour than it should because of Bob specular code.
I will fix this after discussing it with Bob.

Also tided up some D3D stuff, a cmdline variable name and changed a small bit of
the htl code to use the existing D3D engine instead of work around it.
And added extra information in version number on bottom left of frontend screen.
2003-10-14 17:39:18 +00:00
Goober5000 08dd57a3f9 tweaked a thingy with FS1-style music to make deciding the style less of a hack
--Goober5000
2003-10-14 16:47:34 +00:00
Goober5000 e30a7913b7 commented back in null vector warning, because any code that flags this
is buggy and should be fixed (and it only pops up in release builds anyway)
--Goober5000
2003-10-14 16:27:01 +00:00
matt 4d337c3fa7 prelim reworking of lighting code, dynamic lights work properly now
albeit at only 8 lights per object, although it looks just as good as
the old software version --Sticks
2003-10-13 19:39:20 +00:00
Kazan 5895ef7a46 Added Log Comment Thingy to these files 2003-10-13 06:02:50 +00:00
Kazan 9e870cd2d1 Removed a bunch of Useless *_printf()s in the rendering pipeline that were just slowing stuff down
Commented out the "warning null vector in vector normalize" crap since we don't give a rats arse
Added "beam no whack" flag for beams - said beams NEVER whack
Some reliability updates in FS2NetD
2003-10-13 05:57:50 +00:00
Kazan f51b8ec8bb #Kazan# FS2NetD client code gone multithreaded, some Fred2 Open -mod stuff [obvious code.lib] including a change in cmdline.cpp, changed Stick's "-nohtl" to "-htl" - HTL is _OFF_ by default here (Bobboau and I decided this was a better idea for now) 2003-10-12 03:46:23 +00:00
matt 773556dd2d Added -nohtl command line param to disable HT&L, nothing is IFDEFd
out now. -Sticks
2003-10-10 03:59:41 +00:00
phreak ae39e8614f grabbed the most current version from: http://oss.sgi.com/projects/ogl-sample/ABI/ 2003-10-08 21:01:21 +00:00
argv 4ffeb7d3db Negative repeat count means repeat indefinitely. A trivial change, it should not break anything. 2003-10-08 06:32:06 +00:00
Goober5000 f58c06b028 fixed some warnings
--Goober5000
2003-10-07 03:43:22 +00:00
Kazan d865f3520c Oopsie! Forgot to commit these with the rest of the fs2netd TCP update 2003-10-06 04:33:11 +00:00
phreak 3c19786ae3 bug squashing.
preliminary tnl work done
2003-10-05 23:40:54 +00:00
Kazan 25939ab572 fs2netd now TCP 2003-10-04 22:42:23 +00:00
phreak a5fcf64a5f shinemapping completed. it works!
-phreak
2003-10-04 00:26:43 +00:00
Goober5000 562f5e7f6a updated FRED to import FS1 default weapons loadouts as well as missions
--Goober5000
2003-09-30 04:05:09 +00:00
Goober5000 3106f14f92 added the option to import FSM missions, added a replace function, spruced
up my $player, $rank, etc. code, and fixed encrypt being misspelled as 'encrpyt'
--Goober5000
2003-09-28 21:22:59 +00:00
Kazan 436276a812 ##Kazan## Quick little update of fs2netd stuff to resolve a few issues 2003-09-26 15:34:26 +00:00
bobboau 1a2be91e2a 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
the biggest problem it still has is a bad lightmanegment system, and the zbuffer
doesn't work well with things still getting rendered useing the sofware pipeline, like thrusters,
and weapons, I think these should be modifyed to be sent through hardware,
it would be slightly faster and it would likely fix the problem

also the thruster glow/particle stuff I did is now in.
2003-09-26 14:37:16 +00:00
Kazan 0b87224e39 ##Kazan## FS2NetD Completed! Just needs some thorough bug checking (i don't think there are any serious bugs)
Also D3D8 Screenshots work now.
2003-09-25 21:12:24 +00:00
Kazan eff6a6efc4 ##KAZAN## FS2 Open PXO --- W00t! Stats Storage, everything but table verification completed! 2003-09-24 19:35:59 +00:00
Kazan edd5287f84 ##KAZAN## - FS2NetD Support! (FS2 Open PXO) -- Game Server Listing, and mission validation completed - stats storing to come - needs fs2open_pxo.cfg file [VP-able] 2003-09-23 02:42:54 +00:00
unknownplayer 71f159840b Minor bugfix to the 3D ship code. There still may be some cases where it will
fail to load the model file it needs, but I'm at present mystified as to why.
2003-09-16 13:30:16 +00:00
unknownplayer 854041749b Changed the ship selection window to load the 3D FS2 ship models instead
of the custom *.ani files. It just does a techroom rotation for now, but I'll add
more features later - tell me of any problems or weirdness caused by it, or if
you don't like it and want it as an option only.
2003-09-16 11:56:46 +00:00
fryday a4a77744d6 Rollback killed my lens-flare. D'oh. 2003-09-15 12:34:09 +00:00
wmcoolmon dac335f3dd Changed "cell" to "Cmdline_cell" -C 2003-09-14 19:02:06 +00:00
wmcoolmon 275ba09a3b Changed "nospec" to "Cmdline_nospec" -C 2003-09-14 19:00:36 +00:00
wmcoolmon 40ab7fc0f3 Changed "nospec" and "cell" to "Cmdline_nospec" and "Cmdline_cell" 2003-09-14 19:00:02 +00:00
wmcoolmon 3b16380936 Added "-safeloading" command line parameter, which uses old fs2_retail-style loading code -C 2003-09-14 18:32:41 +00:00
Goober5000 67e18e30a7 fixed case-sensitivity bugs and possibly that Zeta wing bug
--Goober5000
2003-09-13 20:59:54 +00:00
Goober5000 293e984d60 added some minor things, such as code cleanup and the following:
--turrets will not fire at cargo
--MAX_SHIELD_SECTIONS substituted for the number 4 in many places
--supercaps have their own default message bitfields (distinguished from capships)
--turrets are allowed on fighters
--jump speed capped at 65m/s, to avoid ship travelling too far
--non-huge weapons now scale their damage, instead of arbitrarily cutting off
----Goober5000
2003-09-13 08:27:29 +00:00
Goober5000 35bf641cb7 clean rollback of all of argv's stuff
--Goober5000
2003-09-13 06:02:08 +00:00
Goober5000 c86461fd22 fixed a bunch of compile-time errors and warnings
--Goober5000
2003-09-12 03:57:01 +00:00
Goober5000 498edeb86e grr...fixed more stuff
--Goober5000
2003-09-12 03:17:33 +00:00
Goober5000 e6c7719bf4 clarified stuff and tweaked the damage ratio for big ships
--Goober5000
2003-09-12 02:08:57 +00:00
Goober5000 e907a052e5 why was the bomb commented out?
--Goober5000
2003-09-12 01:43:57 +00:00
Goober5000 6f089c21c5 added XSTR and fixed readability
--Goober5000
2003-09-12 01:38:13 +00:00
Goober5000 3d8ad87da9 rolled back _argv[-1]'s supercilious commit -- fyi, INF_BUILD is used by
the Inferno campaign
--Goober5000
2003-09-12 01:23:53 +00:00
Goober5000 92a0ed3c6d cleaned up some logic
--Goober5000
2003-09-12 01:12:49 +00:00
argv 988b86238f Removed #ifdef INF_BUILD -- this is only referenced once, so what the hell is it for? 2003-09-12 01:02:50 +00:00
argv f2c019adc3 Minor cosmetic fix. 2003-09-12 00:34:05 +00:00
Goober5000 bda256f095 nitpicked the number 4 to the constant MAX_SHIELD_SECTIONS
--Goober5000
2003-09-12 00:12:13 +00:00
Goober5000 77e48b4849 made code a bit more readable
--Goober5000
2003-09-11 23:59:32 +00:00
Goober5000 0ea85483dc minor fix because initialization is done in various routines
--Goober5000
2003-09-11 23:39:01 +00:00
Goober5000 54a034da9a Rolled back _argv[-1]'s changes to the sexp infrastructure, which would
have broken a huge amount of stuff and created some nasty bugs.
Also commented most of _argv[-1]'s new sexps pending consolidation,
and added a placeholder help entry for the one good sexp.
--Goober5000
2003-09-11 23:21:54 +00:00
argv 84d249db18 New weapon table flags, configurable beam whacking, subsystem display names, new energy system, modified the meaning of big damage. 2003-09-11 19:48:00 +00:00
argv 5a1b5233b8 Random beam slash, new energy system, redefinition of what hurts big ships (beams don't), subsystem display names, configurable beam whacking. 2003-09-11 19:45:34 +00:00
argv 3a88ee37ed Made the EMP flash message look a little better. 2003-09-11 19:44:27 +00:00
argv 67464a2ad4 New energy system, fixes, random beam slash, don't slash if targeting a subsystem, surface shields, singular shields, configurable beam whacking, friendly beam fire does full damage. 2003-09-11 19:43:43 +00:00
argv e1775947ec Fix really nasty crash bug when not all stars table entries have a flare. 2003-09-11 19:39:55 +00:00
argv f18771b309 New energy system, fixes, apply skill damage scaling to all ships, new energy system. 2003-09-11 19:39:03 +00:00
argv 1716850f80 Fix fast player ships missing the subspace tunnel when jumping out, increased max simultaneous ship explosions to 16, new energy system. 2003-09-11 19:36:20 +00:00
argv 9ff5945744 New energy system, ship table flag big guns in front, increase max ship types to 400. 2003-09-11 19:34:29 +00:00
argv 13d91d590b New energy system, singular shield support, some new ship table flags, no draw of thrusters when they are off, fixes. 2003-09-11 19:33:07 +00:00
argv 4611c36631 Singular shield support, and a couple of fixes. 2003-09-11 19:28:52 +00:00
argv 0d5eb222a9 All kinds of changes, from AI intelligence to singular shield support. 2003-09-11 19:27:30 +00:00
argv 3508e8d309 Ship flag big guns in front. 2003-09-11 19:26:13 +00:00
argv cafe8965c1 New energy system. 2003-09-11 19:25:00 +00:00
argv 5604bced59 All player ships may now carry turrets, not just bombers. 2003-09-11 19:24:11 +00:00
argv 08e2943edb Lateral movement speed is now affected by engine power. 2003-09-11 19:23:18 +00:00
argv 656623be9c Several new sexps, such as power drain control. Also increased maximum sexp operators to 4096, though there may be another limit at 1024. 2003-09-11 19:18:13 +00:00
argv 3ccc1da630 Singular shield support. 2003-09-11 19:16:45 +00:00
argv 01c12c8010 Surface shields. 2003-09-11 19:15:29 +00:00
argv dbd2ee4f3c New energy system, table subsystem flags including beam free by default, subsystem display name. 2003-09-11 19:14:14 +00:00
argv 84a5ae3268 Ship flag2 beam-free-all. 2003-09-11 19:12:40 +00:00
argv 949d8446f1 Don't restore saved loadouts on scramble missions. 2003-09-11 19:11:36 +00:00
argv f7e17e90a7 Crash avoidance, ship flag2 beam-free-all. 2003-09-11 19:10:33 +00:00
argv f0078cc8fc Singular shield support, beam-free-all ship flag2, negative repeat count means repeat indefinitely. 2003-09-11 19:09:44 +00:00
argv 833164823d Negative repeat count means repeat indefinitely. 2003-09-11 19:08:11 +00:00
argv 77deede2de Turret display names. 2003-09-11 19:07:11 +00:00
argv 085a0aa0d4 Singular shield support, and a couple of other things. 2003-09-11 19:06:27 +00:00
argv 3edcb0a519 New energy system support. 2003-09-11 19:05:10 +00:00
argv c6ba1645a1 New energy system, auto ETS, etc. 2003-09-11 19:04:36 +00:00
argv e1d2dfcf9e Various new command-line options, stuffed into my own Argv_options struct to avoid namespace pollution. 2003-09-11 18:55:23 +00:00
fryday dccaa30202 Added Lens Flares, enabled by optional table entry in stars.tbl on a per-sun basis 2003-09-10 11:38:31 +00:00
fryday e205ab47a2 Fixed specular for dynamic lights, optimized it a bit 2003-09-09 21:26:23 +00:00
matt a2e351779d Broke stars last commit, fixed -Sticks 2003-09-09 17:18:25 +00:00
matt f85ca67666 Added -nospec cmd line param to disable specular -Sticks 2003-09-09 17:10:55 +00:00
Goober5000 e1261c0340 if player has primitive sensors, hud will not display shield icons or message sender brackets
--Goober5000
2003-09-09 05:51:14 +00:00
randomtiger 89e4dc4fd5 Checked in new speech code and calls from relevent modules to make it play.
Should all work now if setup properly with version 2.4 of the launcher.
FS2_SPEECH can be used to make the speech code compile if you have SAPI 5.1 SDK installed.
Otherwise the compile flag should not be set and it should all compile OK.

- RT
2003-09-07 18:14:54 +00:00
drevil fa480451d1 Changed sender to [email protected] instead of just 'fs2source' to
get around member only posts to mailing list requirement
2003-09-07 12:46:59 +00:00
drevil a42cf30bdb Testing commits. 2003-09-07 12:42:46 +00:00
wmcoolmon 225bc96739 Added "+Subsystem Repair Ceiling:" after "+Hull Repair Ceiling:" (formerly "+Support Repair Ceiling:" 2003-09-06 20:41:52 +00:00
wmcoolmon e15beaa7f9 Added ability to limit subsystem repairs 2003-09-06 20:40:01 +00:00
wmcoolmon fcc1ea98c4 Minor bugfix (changed an == to >=) 2003-09-06 19:14:50 +00:00
wmcoolmon afb0e066b0 Added optional mission parameter "+Support Repair Ceiling", which sets what percentage a support ship can repair a ship's hull to. 2003-09-06 19:09:24 +00:00
wmcoolmon 7b5548642a Made it possible to limit how much support ships repair a ship's hull. 2003-09-06 19:07:31 +00:00
matt 5f1898c503 Minor d3d star popping fix 2003-09-05 22:35:33 +00:00
Goober5000 7854fb293f bah - fixed a dumb bug
--Goober5000
2003-09-05 10:41:48 +00:00
Goober5000 1e04df322c merged num-ships-in-battle and num-ships-in-battle-team, making the
team argument optional
--Goober5000
2003-09-05 05:06:32 +00:00
Goober5000 fb12c1df6e merge of Phreak's and my sexp.cpp
--Goober5000
2003-09-05 04:48:03 +00:00
Goober5000 c4fcafccc5 merge of Phreak's and my sexp.h
--Goober5000
2003-09-05 04:39:55 +00:00
Goober5000 cfbc2ebb46 well, let's see here...
* persistent variables
* rotating gun barrels
* positive/negative numbers fixed
* sexps to trigger whether the player is controlled by AI
* sexp for force a subspace jump

I think that's it :)
--Goober5000
2003-09-05 04:25:29 +00:00
phreak 4a85d415e5 fixed a small bug in num-ships-in-battle-team
added an option to loop sounds played by play-sound-from-file
2003-09-05 02:15:34 +00:00
bobboau 94c2fab5b0 an asortment of bugfixes, mostly with the specular code,
HUD flickering should be completly gone now
2003-08-31 06:00:42 +00:00
phreak d6b179d3b5 added num-ships-in-battle and num-ships-in-battle-team sexp 2003-08-30 21:59:48 +00:00
Goober5000 32f7fd2c11 bumped version to 3.5.5
--Goober5000
2003-08-30 20:55:09 +00:00
phreak 5a858562cc fixed some random specular lighting bugs 2003-08-30 14:49:01 +00:00
Goober5000 eb800ebbbc implemented rotating barrels for firing primary weapons
--Goober5000
2003-08-28 20:42:18 +00:00
Goober5000 f3bd46dab2 trying to commit
--Goober5000
2003-08-28 06:17:29 +00:00
Goober5000 b11a8c02a0 trying to commit
--Goober5000
2003-08-28 05:46:52 +00:00
Goober5000 7564ecb19f added percent-ships-disarmed and percent-ships-disabled
--Goober5000
2003-08-27 02:04:54 +00:00
Goober5000 65fd9ef338 added is-ship-type, is-ship-class, lock-rotating-subsystem, and free-rotating-subsystem;
also fixed the argument and return values for various sexps so that they work
properly for negative numbers
--Goober5000
2003-08-27 01:38:00 +00:00
Goober5000 aab49a95db fixed a strange thing that Bobboau inexplicably put in
--Goober5000
2003-08-27 01:36:22 +00:00
Goober5000 f0110fab45 added extra code to enable playing of FS1 music tracks
--Goober5000
2003-08-25 04:46:53 +00:00
Goober5000 3c053feb30 added replacement of $rank with the player's rank in any string that appears
in-game (same as with $callsign); also bumped the limit on the length of text
allowed per entry in species.tbl
--Goober5000
2003-08-25 04:45:57 +00:00
Goober5000 68fde7a8ce fixed unreachable code
--Goober5000
2003-08-25 04:39:17 +00:00
bobboau abf067f708 specular code should be bugless now,
cell shadeing has been added activated via the comand line '-cell',
3D shockwave models, and a transparency method I'm calling edge and center alpha that could be usefull for other things, ask for details
2003-08-22 07:35:09 +00:00
Goober5000 0151279a55 bumped max intel entries to 30
--Goober5000
2003-08-22 07:24:07 +00:00
Goober5000 633c391b4d implemented $callsign to add the player callsign in a briefing, message, or whatever
--Goober5000
2003-08-22 07:01:57 +00:00
phreak fee9ff59ef warp effects and fireballs have their own distinct colors 2003-08-22 03:39:35 +00:00
randomtiger 290da64ffe Fixed switching - RT 2003-08-21 20:54:39 +00:00
phreak 46479ac3a0 added specular highlights. still needs shine mapping 2003-08-21 15:07:45 +00:00
phreak 016e525f62 zeroed out the specular fields since they caused some flickering 2003-08-21 15:04:17 +00:00
Goober5000 58cb8f4a36 yet another attempt to commit dsp files
--Goober5000
2003-08-21 09:00:58 +00:00
Goober5000 240c74da4e fixed set-support-ship sexp
--Goober5000
2003-08-21 09:00:19 +00:00
Goober5000 897d3f8ad5 fixed turret text display for non-laser weapons
--Goober5000
2003-08-21 08:31:24 +00:00
Goober5000 3916653149 ships that have no afterburners will no longer have the afterburner gauge drawn
--Goober5000
2003-08-21 06:31:19 +00:00
Goober5000 0baf2f7bc9 primary weapons will now truncate properly at a '#' symbol, just like secondaries
--Goober5000
2003-08-21 06:18:52 +00:00
Goober5000 ef83ecbc05 removed an extraneous thingy
--Goober5000
2003-08-21 06:11:32 +00:00
Goober5000 53834ee415 Ballistic primaries will now deplete ammo correctly - that is, ammo will be
reduced by the number of firing points, not necessarily 1.
--Goober5000
2003-08-21 06:11:09 +00:00
Goober5000 7dcc40de8a "Fixed" the ballistic primary rearm bug. I have no idea how... I have to assume
it's a bug in MSVC.
--Goober5000
2003-08-21 05:50:00 +00:00
wmcoolmon edfd3fdc85 Modified find_file_location to speed up file loading. 2003-08-20 08:14:50 +00:00
wmcoolmon 39e9cddb5f Made cfile_delete return 0 on failure, 1 on success 2003-08-20 08:12:08 +00:00
wmcoolmon 450ea5c63e Added error screens to the barracks and start screens when a pilot file can't be deleted 2003-08-20 08:11:28 +00:00
bobboau 36668ce6a1 update for the specmapping code includeing
suport for seperate specular levels on lights and
optional strings for the stars table
code has been made more organised,
though there seems to be a bug in the state selecting code
resulting in the HUD being rendered incorectly
and specmapping failing ocasionaly
2003-08-16 03:52:24 +00:00
bobboau 8cacc9b1a0 Specular 'shine' mapping;
useing a phong lighting model I have made specular highlights
that are mapped to the model,
rendering them is still slow, but they look real purdy

also 4 new (untested) comand lines, the XX is a floating point value
-spec_exp XX
the n value, you can set this from 0 to 200 (actualy more than that, but this is the recomended range), it will make the highlights bigger or smaller, defalt is 16.0 so start playing around there
-spec_point XX
-spec_static XX
-spec_tube XX
these are factors for the three diferent types of lights that FS uses, defalt is 1.0,
static is the local stars,
point is weapons/explosions/warp in/outs,
tube is beam weapons,
for thouse of you who think any of these lights are too bright you can configure them you're self for personal satisfaction
2003-08-12 03:18:34 +00:00
bobboau 03dd93b79d slightly better implementation of the new zbuffer thing, it now checks only three diferent formats defalting to the 16 bit if neither the 24 or 32 bit versions are suported 2003-08-09 06:07:24 +00:00
phreak ee79809edc added code to take into account a tertiary reactor pod 2003-08-06 17:50:01 +00:00
phreak 257675bb93 changed the weapon ammo gauges to show additional ammo if a tertiary ammo pod is being used 2003-08-06 17:44:20 +00:00
phreak d9a01620f6 since the launcher has a space between 1024 and 768 for the videocard string, i changed the detection to reflect this
also changed intro.mve to intro.avi since we can't use MVEs
2003-08-06 17:42:47 +00:00
phreak 3b15d779d6 since the afterburners are routed through the physics engine, i needed to route the boost pod through here too 2003-08-06 17:39:49 +00:00
phreak 19796f7538 added a thing to set max thrust when tertiary boost pod is engaged 2003-08-06 17:39:04 +00:00
phreak e594563d00 preliminary work on tertiary weapons. it doesn't really function yet, but i want to get something committed 2003-08-06 17:37:08 +00:00
phreak 15d394edbf changed default texture filtering to GL_LINEAR 2003-08-06 17:26:20 +00:00
phreak b07476fc96 optimized the way cloaking is handled 2003-08-06 17:24:57 +00:00
bobboau d3e4c5c30b glow maps, for some reason they wern't in here, they should be now,
also there is some debug code for changeing the FOV in game,
and I have some changes to the init code to try and get a 32 or 24 bit back buffer
if posable, this may cause problems for people
the changes were all marked and if needed can be undone
2003-08-05 23:45:18 +00:00
phreak 839be403b1 ai now properly uses rapid fire dumbfires 2003-08-03 23:38:08 +00:00
phreak 5c2c0ab09f changed some z-buffer stuff so it doesn't clip as noticably 2003-08-03 23:35:36 +00:00
inquisitor 81f8a9e375 cleanup of old makefile dsws 2003-07-22 14:11:06 +00:00
fryday 4386cab9bc added fsspeech.cpp fsspeech.h speech.cpp speech.h into code/sound
They include RT's speech code. Add the preprocessor definition FS2_SPEECH to enable text-to-speech at compile-time.
Requires the Microsoft speech SDK Version 5.1 (around 55MB download).
2003-07-19 16:10:48 +00:00
phreak 00773de340 fixed a dumb bug 2003-07-16 23:12:44 +00:00
phreak 450bd1e213 lighting in the render functions now work for opengl as they do in d3d 2003-07-15 16:09:46 +00:00
phreak 2092c2705f trails now properly alphablend in ogl as it does in d3d 2003-07-15 16:07:12 +00:00
phreak e592c64d8f higher particle limits for opengl. now matched d3d 2003-07-15 16:06:24 +00:00
phreak 0f275acc12 the game handles colored laser lighting for opengl now.
this used to be exclusive to d3d
2003-07-15 16:05:33 +00:00
phreak af1da198b3 the cutscene section in the techroom does not append *.mve onto a filename 2003-07-15 02:58:08 +00:00
phreak e75e4b5640 opengl now doesn't try to shutdown when its not running.
could cause problems on startup
2003-07-15 02:53:54 +00:00
phreak 9ed49694bf ships now decloak when firing 2003-07-15 02:52:40 +00:00
phreak b0088c67ba cloaked ships will reduce brightness with distance 2003-07-15 02:51:43 +00:00
phreak 3505a530d0 fixed a warning.
previous cvs message should read: cloaked ship will decloak if a turret fires
2003-07-15 02:51:01 +00:00
phreak ec87a1f3ad cloaked ships now are less visible with distance 2003-07-15 02:41:41 +00:00
phreak 0c9c758dbd fixed problem where beams that ignore shields do not fully damage the target
disabled attenuation for beams, pending rework
2003-07-15 02:39:59 +00:00
phreak 17a9178c8b models that are fully cloaked draw front-to-back 2003-07-15 02:37:59 +00:00
phreak 7628e19f26 changed the model_setup_cloak() function to allow an alpha value 2003-07-15 02:36:54 +00:00
phreak 97b506ca15 added a debug key to cloak targeted ship ~+shift+x 2003-07-15 02:35:59 +00:00
phreak 7c1c973917 fun work optimizing the cloak effect 2003-07-15 02:34:59 +00:00
randomtiger e7340e703b Random Tiger 6/7/2003
fs2_open now uses the registry entry 'VideocardFs2open' instead of 'Videocard' to store its video settings. To run fs2_open now you MUST use the launcher I have provided.

Launcher binary:      http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/Launcher.rar
Launcher source code: http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/Launcher_code.rar

I have also taken the opertunity to fix a few bugs in the launcher and add a new feature to make selecting mods a bit easier.

The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher wont compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted.

I have also removed the internal launcher from the D3D8 module.
Please contact me if you have any problems.

When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and cant afford to find out.
2003-07-06 00:19:25 +00:00
phreak 1fa5e2bf54 support for cloaking added. needs a cloakmap.pcx
to cloak the players ship, activate cheats and press tilde + x
some more work can be done to smooth out the animation.
2003-07-04 02:30:54 +00:00
phreak dc12e5dd1e changes for cloaking implemented 2003-07-04 02:28:37 +00:00
phreak 2c62498b62 added support for cloaking.
i will need to contact someone who knows d3d to get this to work
2003-07-04 02:27:48 +00:00
phreak 2eb193101a tilde + x cloaks a ship 2003-07-04 02:26:15 +00:00
phreak 11d8d11b04 ai now properly fires bomber+ missiles at capital ships. 2003-07-02 03:31:27 +00:00
phreak 37b0bd28ce added support for weapons that only fire when tagged
also added limited firing range for local ssms
2003-06-25 03:21:03 +00:00
phreak 13cccac317 added support for weapons that only fire when tagged 2003-06-25 03:19:40 +00:00
phreak 4fce3b9610 changed around ai code to take into account a limited lock range for local ssms 2003-06-25 03:16:32 +00:00
phreak fc22d35695 weapon energy cheat does not carry over from mission to mission 2003-06-25 03:13:48 +00:00
phreak 091c8b4d7e display lock triangle for local ssms only if its in range specified in weapons.tbl 2003-06-25 03:13:02 +00:00
phreak 8d4512a612 added turret-tagged-specific and turret-tagged-clear-specific sexps 2003-06-19 18:12:12 +00:00
phreak c80bab1fcc undefined DBUGFILE_ACTIVE for release builds 2003-06-16 16:39:42 +00:00
phreak ca0683ecfa fixed a small bug where rotating subobjects wouldn't work on a player ship
also changed "+PBank Capacity:" to "$PBank Capacity:" when parsing
ballistic primaries. goob knows about this
2003-06-16 03:36:08 +00:00
phreak 31cfd8011f fixed a bug where local ssms may miss the warphole when entering subspace 2003-06-14 22:56:17 +00:00
phreak 371f2e3869 capital ship turrets that use the "huge" flag will not target bombs
this will prevent large beams from shooting the player if he shoots a bomb at a destroyer
2003-06-14 21:22:42 +00:00
phreak cd48667a38 added a warning that will display if a modder puts in a local ssm that:
is a laser or beam
doesn't home
2003-06-13 15:33:57 +00:00
phreak 45d02246ee local ssms fired without lock will not enter subspace at all 2003-06-12 21:21:26 +00:00
phreak 25e339a4d6 local ssm warpin is now handled better than what i committed earlier 2003-06-12 17:45:54 +00:00
phreak 155f0f1cce fixed a minor bug where local ssms will warpin at 0,0,0 if their target was destroyed while in subspace 2003-06-12 16:54:06 +00:00
phreak 807ee34c9d turrets now properly use local ssms 2003-06-12 16:53:16 +00:00
phreak 123515a33d i hate to update again so soon, but i forgot to mark hostile local ssms that
were in stages 2 or 4 as warping so their blip color would then be blue
2003-06-11 03:15:17 +00:00
phreak cc741f5029 i hate to update again so soon, but there was a compile warning that i accidently passed over 2003-06-11 03:13:39 +00:00
phreak 0fc5f831fc local subspace missiles are now in game. yay 2003-06-11 03:06:07 +00:00
phreak ecf181a2c7 the ai can now use local ssms. they are able to use them at *very* long range 2003-06-11 03:03:16 +00:00
phreak 000257bd8e the radar will not show stage 3 local ssms 2003-06-11 03:01:27 +00:00
phreak 30cbbfedf3 changed around collision code to handle the possible variance in speeds when using local ssms 2003-06-11 03:00:50 +00:00
phreak 47cd793262 local ssm stuff for hud.
they are always in lock range due to the subspace drive on them
they also can't be targeted when in stage 3.
2003-06-11 02:59:48 +00:00
phreak ed6be03aa0 the real position is now copied in g3_rotate_vertex 2003-06-08 17:39:35 +00:00
phreak afd83a21fb added a vector in the vertex struct that stores the real world position
the x,y,z variables do not accurately reflect the real position
this is for opengl fogging
2003-06-08 17:38:21 +00:00
phreak 4a030dfb73 debris is now properly fogged 2003-06-08 17:31:37 +00:00
phreak e4b6bc70bc fixed a compile error that was accidently committed 2003-06-08 17:29:51 +00:00
phreak fcaa985c2d bmp_gfx_get_components now works with 32 bit opengl 2003-06-07 21:08:09 +00:00
phreak 3574628259 fixed minor fogging bug 2003-06-07 20:51:06 +00:00
phreak be71b9f6b5 final fix (hopefully) to zero mass value bug 2003-06-04 15:32:54 +00:00
phreak 5f5fe2b8cc fixed a small bug
ai_select_primary_weapon may have a null pointer passed to it.
2003-06-04 15:31:49 +00:00
phreak 5ff5467673 added some code that took advantage of opengl fogging stuff 2003-06-04 15:28:24 +00:00
phreak 809b0155df added Sesquipedalian's kamikaze and not-kamikaze sexps 2003-05-24 16:47:58 +00:00
phreak 1e6670c1b7 defined USE_OPENGL
should eliminate the "unable to init 104" warnings
2003-05-22 19:41:52 +00:00
drevil bda9f63f59 Updated cvs administrative files. 2003-05-22 15:14:39 +00:00
phreak ea966211b5 fixed *minor* problem where ships that were disabled during warpout were not
registering on sensors
2003-05-21 21:07:31 +00:00
phreak 1771fd2d3b fixed disappearing ship bug when a ship is disabled during warpout 2003-05-21 20:28:53 +00:00
phreak 7dd22631a9 hud is drawn when in chase camera for player 2003-05-21 20:27:07 +00:00
phreak 7146c9f90c improved chase camera code.. you can now fight using this camera 2003-05-21 20:26:07 +00:00
phreak 63a90da345 improved glowmap rendering speed 2003-05-21 20:23:00 +00:00
phreak 29a0e77753 clarified an error message in subsys_set 2003-05-15 19:08:24 +00:00
phreak 1760554305 game_loading_callback_init() now displays a user-defined loading screen 2003-05-09 23:54:59 +00:00
phreak 3f391d36b2 possible fix to ships with no mass values 2003-05-09 23:53:32 +00:00
phreak fee9efe1db changed around code in parse_mission_info() to support user-defined loading screens 2003-05-09 23:52:01 +00:00
phreak c8a2551a6e added fields to the "mission" struct to allow for user-specified loading screens 2003-05-09 23:51:04 +00:00
phreak 9e5a3781b7 fixed old bug that created "mouse trails" during a popup screen
a result of doing something a long time ago that i thought was right, but wasn't
2003-05-07 00:52:36 +00:00
phreak fa960dc625 if "Show Background" is not set it FRED,
it used to show background bitmaps and suns
not anymore
2003-05-05 21:27:46 +00:00
Goober5000 364767a0b4 fixed small bug inadvertently added by Phreak affecting the custom hitpoints
mod; also fixed a small bug in the new disruption mod (disrupting all subsystems,
as opposed to only those within the weapon radius)
--Goober5000
2003-05-05 20:55:44 +00:00
phreak abdd8a6a79 minor fred bug fixed 2003-05-05 20:13:07 +00:00
phreak 15be002888 added my real name 2003-05-05 19:29:24 +00:00
phreak af9f703302 added additional error info incase gr_opengl_flip() fails for some unknown reason 2003-05-04 23:52:40 +00:00
phreak 944981b835 ABtrails are only processed if they are using a bitmap.
this should be the end of the "missiles without trails" bug
2003-05-04 20:51:14 +00:00
phreak f7760d69c0 bumped MAX_TRAILS to 500 because of afterburner trails 2003-05-04 20:50:06 +00:00
phreak b63c14fcb7 minor fix in gr_opengl_flip()
should be end of the "unable to swap buffer" error
2003-05-04 20:49:18 +00:00
phreak 7ec2608d58 beams can't fire when disrupted.
cycle ends if the beam is firing and shooting ship is disrupted
2003-05-04 20:21:00 +00:00
phreak 881b31f7fa ships that are disrupted now have arcs around them much like the emp effect 2003-05-04 20:08:04 +00:00
phreak 6be53b57e1 fixed mispelling 2003-05-04 19:51:28 +00:00
phreak 13338a1c76 added multipliers for beam turrets and sensors for disruptor missiles 2003-05-03 23:47:04 +00:00
phreak f843302d16 background stars are now somewhat colored, just here as a sort of useless feature test 2003-05-03 16:58:40 +00:00
phreak f4fe757d5d changed around the way disruptor weapons work 2003-05-03 16:48:08 +00:00
Goober5000 1a410e1f09 implemented the custom hitpoints mod
--Goober5000
2003-04-29 01:03:24 +00:00
Goober5000 79fff22d2e fixed some scrolling issues; added scroll bar to mission select
--Goober5000
2003-04-06 03:56:54 +00:00
Goober5000 e6536f612a gotta love those compiler errors ;)
fixed those and cleaned up conflicts with the missile-locked sexp
--Goober5000
2003-04-05 20:47:58 +00:00
sesquipedalian 031c50768a Recommit of is-missile-locked.
I changed the sexp's category from non-campaign to training, so you may get a conflict with that.
2003-04-05 20:17:23 +00:00
Goober5000 a805b8e293 fixed some fiddly bits with scrolling and ui stuff
--Goober5000
2003-04-05 11:09:22 +00:00
Goober5000 7145251058 arg - forgot something
--Goober5000
2003-04-05 08:51:04 +00:00
Goober5000 5a5e364bee command briefing scroll buttons implemented :)
--Goober5000
2003-04-05 08:46:51 +00:00
Goober5000 6351a06b68 commit to fix the FRED compile error
--Goober5000
2003-04-04 22:11:06 +00:00
Goober5000 4dd27db603 fixed stupid spelling mistake
--Goober5000
2003-03-30 21:16:21 +00:00
Goober5000 d01ed806b9 preliminary work on adding scroll buttons to command briefings
--Goober5000
2003-03-30 21:08:42 +00:00
Goober5000 2b6c194af7 resolved a nasty bug that caused some missions to crash
--Goober5000
2003-03-30 07:27:34 +00:00
Goober5000 87409846f0 preliminary work on ai facing sexp
--Goober5000
2003-03-30 04:34:38 +00:00
sesquipedalian 88dca1dbea Aaaand nevermind... 2003-03-29 11:23:46 +00:00
Goober5000 4bf29edec3 made beams default shield piercing again
also added a beam no pierce command line flag
and fixed something else which I forgot :P
--Goober5000
2003-03-29 09:42:05 +00:00
sesquipedalian d1abacf7ae Added is-missile-locked sexp 2003-03-29 08:52:59 +00:00
Goober5000 9d6126086c yay for limit bumping!
bumped number of battle tracks and briefing/mainhall/credits tracks, both to 30
--Goober5000
2003-03-29 05:18:17 +00:00
Goober5000 4c74af0b4a got rid of an annoying compile warning
--Goober5000
2003-03-28 19:56:02 +00:00
Goober5000 fb738a9319 added beginning functionality for $Texture Replace implementation in FRED
--Goober5000
2003-03-25 07:03:30 +00:00
Goober5000 c470ecc598 argh - lol
--Goober5000
2003-03-22 08:17:34 +00:00
Goober5000 47302dd5ad bleah
--Goober5000
2003-03-22 07:24:53 +00:00
Goober5000 431b588cef bugs are bad, mmkay?
--Goober5000
2003-03-22 06:35:37 +00:00
Goober5000 0f931f0275 added play-sound-from-table, play-sound-from-file, and close-sound-from-file
--Goober5000
2003-03-22 06:11:51 +00:00
Goober5000 0a3a0c525f changed event_sexp_change_music to event_change_sexp_soundtrack
--Goober5000
2003-03-22 06:06:22 +00:00
Goober5000 c818bd61d5 yuck - fixed a nasty error when FRED provides a default value for warp-effect
and explosion-effect
--Goober5000
2003-03-21 08:33:33 +00:00
Goober5000 3e220d87f0 added get-relative-object-*, where * = x, y, and z; these sexps return the
world coordinates of a set of relative coordinates to an object; also, fixed many
places in sexp.cpp so that now sexps can accept other sexps as parameters,
wherease before they weren't able to
--Goober5000
2003-03-21 04:51:33 +00:00
Goober5000 58691c0d15 comments
--Goober500
2003-03-20 23:30:03 +00:00
Goober5000 a59a1bbaad comments
--Goober500
2003-03-20 23:20:46 +00:00
Goober5000 1d84bd94ea moved ballistic primary reload sounds to indexes 171 and 172 2003-03-20 22:58:43 +00:00
unknownplayer e777b3806e Fixed the bug with shields where it would consistently display the low detail
shield regardless of what the setting was. Turns out some OGL person was
quite thoughtless in their use of || instead of the correct && for the situation
so the game would always go for low detail shields because OGL and D3D
can't both be active at the same time!
2003-03-20 09:48:25 +00:00
Goober5000 74afd2522f implemented EMP as part of weapon-effect sexp
--Goober5000
2003-03-20 09:17:16 +00:00
unknownplayer da831bf833 Modified the command line options so they are all in lower-case characters.
Made a slight AI adjustment to how ships choose to attack turrets (they now have a 25% chance of attacking a beam turret which has fired at them from another ship)
2003-03-20 08:24:45 +00:00
Goober5000 d21190d765 implemented mission flags for no briefing or no debriefing - yay!
--Goober5000
2003-03-20 07:15:37 +00:00
Goober5000 ae2eefeb92 extended sexps
--Goober5000
2003-03-20 04:27:10 +00:00
Goober5000 c0968ba348 making sexps better
--Goober5000
2003-03-20 00:08:08 +00:00
Goober5000 d469a505c4 bit o' housecleaning
--Goober5000
2003-03-19 23:06:40 +00:00
Goober5000 34244e313b added some mission flags
--Goober5000
2003-03-19 22:49:32 +00:00
unknownplayer d77c3feef5 Woohoo! Killed two birds with one stone!
Fixed the 'black screen around dialog boxes' problem and also the much more serious freezing problem experienced by Goober5000. It wasn't a crash, just an infinite loop. DX8 merge is GO! once again :)
2003-03-19 12:29:02 +00:00
Goober5000 0fa9b99445 more housecleaning, this time for debug warnings
--Goober5000
2003-03-19 09:05:26 +00:00
unknownplayer 433688cc92 Updated the DX8 code to allow it to be run in 640x480 windowed mode. The game will only procede to do so if your registry settings are set to 640x480 to begin with, but this is accomplished simply enough. 2003-03-19 07:17:05 +00:00
Goober5000 790af7d332 added warp-effect sexp
--Goober5000
2003-03-19 06:23:28 +00:00
Goober5000 4fb733df43 added typecasting to get rid of some build warnings
--Goober5000
2003-03-19 06:22:58 +00:00
unknownplayer 0794d14a7a Fixed up a bug in the code which was causing all mission loads to crash.
As of this update, the DX merge is officially functional and complete within the CVS main branch. Tell Inquisitor we won't need to roll back at all, but Goober5000 needs to go and look at his SEXP code since he messed up a bunch of checking functions with it
2003-03-18 13:38:07 +00:00
unknownplayer 324747af39 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. 2003-03-18 10:07:06 +00:00
Goober5000 5377b50e53 added explosion-effect sexp and did some other minor housekeeping
--Goober5000
2003-03-18 08:44:06 +00:00
Goober5000 b745b8e545 fixed a subtle bug with EMP parsing which probably never happened and never will,
but it's nice to know it's solved :)
--Goober5000
2003-03-18 06:10:14 +00:00
Goober5000 cfa65cfe5c fixed some misspellings
--Goober5000
2003-03-18 01:44:31 +00:00
Goober5000 7d52af37fa pressing Q no longer makes a sound if the player's ship doesn't have shields
--Goober5000
2003-03-17 10:37:32 +00:00
penguin d8f9376d55 Got autoconf to build w/ dx8 libs (for cutscenes). DX8 files must be in C:/dx8 dir for now, will fix later.
Also got rid of the fs2- prefix on the object files.
penguin
2003-03-11 19:00:05 +00:00
phreak 2c95fa52f8 worked a hack to fix opengl support with dx8show movies 2003-03-07 01:00:37 +00:00
phreak 993740e06f added some hacks that shutdown and restore opengl because of cutscenes 2003-03-07 00:15:45 +00:00
Goober5000 da67b2b53c fixed what should be the last bug with bank-specific loadouts
--Goober5000
2003-03-06 09:13:43 +00:00
Goober5000 7d08fec7cc rewrote the restricted bank loadout code; it should work now
--Goober5000
2003-03-05 12:38:01 +00:00
Goober5000 6ec2c31678 cleaned out Bobboau's buggy code - about to rewrite with new, bug-free code :)
--Goober5000
2003-03-05 09:17:15 +00:00
Goober5000 e469a54429 fixed misspelling of "attenuation"
--Goober5000
2003-03-04 04:41:03 +00:00
Goober5000 2352055d98 made error message appear if EMP used without necessary parameters
--Goober5000
2003-03-04 02:25:25 +00:00
Goober5000 7892625474 fixed custom banks so that they no longer need the ":" between each entry
--Goober5000
2003-03-03 17:15:16 +00:00
bobboau 58a1497614 forgot something 2003-03-03 16:50:14 +00:00
bobboau 76d94278a8 forgot something 2003-03-03 10:29:39 +00:00
bobboau 47b2c3cd88 fixed a bug in the bank specific loadout relaiting to secondaries 2003-03-03 10:21:08 +00:00
Goober5000 1f55e87876 fixed the warp effect from always being the knossos type
--Goober5000
2003-03-03 09:53:32 +00:00
Goober5000 cdd1a0b743 changed "Subspace node activated" message to "Subspace drive activated"
--Goober5000
2003-03-03 09:31:59 +00:00
Goober5000 f864a28bb3 fixed the tech room bug! yay!
--Goober5000
2003-03-03 04:28:37 +00:00
inquisitor 993a176572 Readme word doc
-Inquisitor
2003-03-02 18:25:49 +00:00
Goober5000 414a344f33 commented an unneeded variable
-- Goober5000
2003-03-02 17:19:45 +00:00
penguin 28848dcbc8 Added type for static var
- penguin
2003-03-02 07:39:34 +00:00
penguin ea32341410 file needed by automake 2003-03-02 06:58:45 +00:00
penguin ad53507f1c file generated by autoconf 2003-03-02 06:49:23 +00:00
penguin 8f9e7cf941 Use multimedia headers in local dir, not system's (headers are not present in MinGW distribution)
- penguin
2003-03-02 06:37:24 +00:00
penguin 1f1339cb01 Added multimedia headers not present in MinGW distribution
- penguin
2003-03-02 06:28:12 +00:00
penguin e5eafea546 Tweaked for gcc
- penguin
2003-03-02 06:25:31 +00:00
penguin 373d2c201c Made a debug error message less confusing
- penguin
2003-03-02 06:10:58 +00:00
penguin ec63b64b1f Added versions of _outp() and _inp() for gcc.
- penguin
2003-03-02 06:04:00 +00:00
penguin e6da9a6d68 Added newline at end of file to keep gcc from complaining.
- penguin
2003-03-02 06:03:01 +00:00
penguin 4fac9708ec Added #ifdef WIN32 and #ifdef MSC_VER
- penguin
2003-03-02 06:01:55 +00:00
penguin 71d4bd62b2 Added #ifdef WIN32 around non-standard header file io.h
- penguin
2003-03-02 05:56:56 +00:00
penguin 3e96899ace Moved Gr_scaler_zbuffering definition to top of file
- penguin
2003-03-02 05:55:51 +00:00
penguin 51c590c6a6 ANSI C++ - namespace clash on ai_rotation; renamed type to ai_rotation_t
- penguin
2003-03-02 05:54:23 +00:00
penguin e7d1452827 Added gcc-compatible asm blocks
- penguin
2003-03-02 05:46:28 +00:00
penguin 137e7a8cdd 1. Added gcc-compatible asm code.
2. Added #ifndef NO_SOFTWARE_RENDERING
 - penguin
2003-03-02 05:45:04 +00:00
penguin 77f769b328 ANSI C++ - fixed non-compliant casts to unsigned short and unsigned char
- penguin
2003-03-02 05:43:49 +00:00
penguin c85cb1377b Added some #ifndef NO_SOFTWARE_RENDERING
- penguin
2003-03-02 05:41:52 +00:00
penguin f3362d6a2f Abort if unimplemented asm section is called
- penguin
2003-03-02 05:40:28 +00:00
penguin 043310f88a Added #ifdef _MSC_VER to MSVC-specific code
- penguin
2003-03-02 05:30:26 +00:00
penguin 46f524706c only define min() and max() if they're not already defined
- penguin
2003-03-02 05:27:44 +00:00
penguin 7b7df3caba defined FX_ENTRY and FX_CALL for gcc
- penguin
2003-03-02 05:26:23 +00:00
penguin a47ff4d7a5 1. Renamed or, og, ob vars to o_r, o_g, o_b ("or" caused gcc to choke).
2. Added #ifndef NO_SOFTWARE_RENDERING around software rendering code
3. Added #ifdef _MSC_VER around MSVC-specific exception handing code
 - penguin
2003-03-02 05:23:34 +00:00
penguin 70fc3119e7 Moved "extern int wm" declaration inside the header #ifdef block
- penguin
2003-03-02 05:12:39 +00:00
penguin 830be35c58 Added #ifdef _MSC_VER around strange exception-handling code
- penguin
2003-03-02 05:10:42 +00:00
penguin 2fff39194f ANSI C++ changes
- penguin
2003-03-02 05:07:12 +00:00
penguin fffa377d2f Removed -- this was the old Linux makefile. GNU-style makefiles are now generated by autoconf/automake
- penguin
2003-03-02 05:03:11 +00:00
penguin a819e73388 New files for autoconf/automake support.
- penguin
2003-03-02 04:53:46 +00:00
Goober5000 0562965e69 bumped alternate names from 10 to 25
--Goober5000
2003-03-02 02:10:11 +00:00
Goober5000 7928823b96 fixed the initial status bug 2003-03-01 01:15:38 +00:00
bobboau 3b92333b16 fixed the bug with fighter beams not giveing you kills 2003-02-26 02:56:55 +00:00
bobboau 7238ae9025 fixing my bug fix for the warp model, and not being able to find it 2003-02-25 16:46:01 +00:00
bobboau f6634e882c doh... forgot something in the beam rendering code 2003-02-25 07:15:07 +00:00
bobboau f99a3916de fixed a bunch of fighter beam bugs,
most notabley the sound now works corectly,
and they have limeted range with atenuated damage (table option)
added bank specific compatabilities
2003-02-25 06:22:50 +00:00
inquisitor cc9f972e80 added dxguid, ddraw, and strmiids.lib 2003-02-24 02:01:49 +00:00
inquisitor 609da60af3 added dxguid, ddraw, and strmiids.lib 2003-02-24 01:25:11 +00:00
wmcoolmon 7b794ea056 Refixed the splash screen loading code so that it still works with the demo VPs (Loading "2_PreLoad" and "PreLoad") and put logo support back in. Logo support does nothing unless "PreLoadLogo" and/or"2_PreLoadLogo" exist within the search path. 2003-02-23 20:55:57 +00:00
wmcoolmon 3f66617c68 Uncommented the sections of code that actually played a movie for a given mission. (Removed when daveb cleaned out the movie code for the release) 2003-02-23 03:13:03 +00:00
wmcoolmon f8f60965a9 Added cutscenes/movie.cpp(.h) and directx/dx8show.cpp(.h), which contain movie playing code. Don't compile these if you don't have the DX8 SDK. 2003-02-22 04:24:59 +00:00
wmcoolmon 6f0832c6d8 DirectX-specific code for movie-playing functions in cutscenes/movie.cpp. Ask RT if you have any questions about it; I just commited it :). 2003-02-22 04:20:47 +00:00
wmcoolmon 33c321d328 Movie playing code; use movie_play and movie_play_two to play movies using Directshow. Depends on directx/dx8show.cpp 2003-02-22 04:17:58 +00:00
wmcoolmon 16fdb53870 Added "os_app_activate_set" 2003-02-22 04:14:21 +00:00
wmcoolmon b5ab80797d Added "-dshowvid" command-line option, which must be set in order for movies to play. 2003-02-22 04:13:17 +00:00
phreak 1385a9c6ac stupid typo -- my bad 2003-02-16 19:00:56 +00:00
phreak a11c390fd5 fixed typecasting warnings 2003-02-16 18:55:59 +00:00
phreak a498b79b2d fixed around splash screen
2_splash.pcx is loaded in 1024x768
splash.pcx is loaded in 640x480 or 2_splash.pcx isn't found
2003-02-16 18:53:59 +00:00
phreak 6a22f2443e tweaked some more stuff 2003-02-16 18:43:13 +00:00
bobboau cd2597f3a2 added glow map nebula bug fix for d3d, someone should add a fix for glide too
more importantly I (think I) have fixed all major bugs with fighter beams, and added a bit of new functionality
2003-02-16 05:14:29 +00:00
Goober5000 d32a38c267 fixed version bumpage... the version is 3.5.0, not 3.50.0 ;)
--Goober5000
2003-02-05 07:04:31 +00:00
Goober5000 64bcc9942e made my fighterbay code more forgiving of eccentric modeling hacks...
ships can now use the Faustus hangar again :)
--Goober5000
2003-02-05 06:57:56 +00:00
phreak cf750429cb started to finalize before 3.50 release.
added support for GL_EXT_texture_filter_ansiotropic
2003-02-01 02:57:42 +00:00
phreak 32843f18f8 bumped to 3.50 2003-01-30 23:24:34 +00:00
phreak d7bd110ffe cleaned up debug output 2003-01-30 23:19:33 +00:00
phreak 36176b8eb4 enabled RGB lighting for OpenGL 2003-01-30 23:19:14 +00:00
Goober5000 8c94fbd199 finished up my fighterbay code - ships will not be able to arrive from or depart into
fighterbays that have been destroyed (but you have to explicitly say in the tables
that the fighterbay takes damage in order to enable this)
--Goober5000
2003-01-27 07:46:33 +00:00
DTP d9e1e01afc Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. 2003-01-27 01:12:15 +00:00
DTP 8edec19426 Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. 2003-01-27 00:51:46 +00:00
DTP 5419f3b5de temporary fix, added some // so that we can do debug builds. i expect Goober5000 will fix it soon. 2003-01-26 23:30:53 +00:00
wmcoolmon 6df0403964 Minor mod to preload screen code, added separate 1024x768 logo
-C
2003-01-26 20:04:32 +00:00
Goober5000 2bef522bfc changed change-music to change-soundtrack
--Goober5000
2003-01-26 18:37:19 +00:00
wmcoolmon 4e86a928b3 Added title screen support to retail version. When FS2 loads, it will build a list of PCX files in the current directory, then attempt to display one. If no PCX files exist, it will try to display one of the title screens defined in the code. Freespace 2 will then attempt to superimpose a logo in the upper-left hand corner of the screen. If neither can be displayed, FS2 will function normally. 2003-01-26 02:58:33 +00:00
Goober5000 254b4f6603 oops - fixed the nebula bug that wasn't completely fixed :)
--Goober5000
2003-01-26 00:20:01 +00:00
Goober5000 7373203236 added preloader to change-ship-model and change-ship-class so that the game
doesn't hesitate when switching models in the middle of missions
--Goober5000
2003-01-25 04:54:36 +00:00
Goober5000 55a4c34bab added change-music sexp and bumped MAX_SOUNDTRACKS from 10 to 25
--Ian Warfield
2003-01-25 04:17:39 +00:00
Goober5000 b060ac5928 aw, nuts - fixed a dumb bug with my new don't-collide-invisible code :p
--Goober5000
2003-01-24 03:48:11 +00:00
Goober5000 ab27958761 fixed a small nebula ship trail bug
--Goober5000
2003-01-24 03:15:11 +00:00
Goober5000 dca1600f46 fixed a few bugs in Bobboau's implementation of the glow sexps; also added
help for the sexps in sexp_tree
--Goober5000
2003-01-21 17:24:16 +00:00
bobboau 218ac8a0d7 added several sExps for turning glow points and glow maps on and off 2003-01-20 05:40:50 +00:00
Goober5000 cac96f1a44 cleaned up build output a bit
--Goober5000
2003-01-19 22:45:35 +00:00
Goober5000 55948f0db1 removed unreferenced variable
--Goober5000
2003-01-19 22:25:10 +00:00
Goober5000 c80033de55 fixed a bunch of bugs -- the support ship sexp, the "no-subspace-drive" flag,
and departure into hangars should now all work properly
--Goober5000
2003-01-19 22:20:23 +00:00
Goober5000 dd378506ee fixed fiddly code
--Goober5000
2003-01-19 09:14:05 +00:00
Goober5000 9e890d8df5 more tweaky bug fixes
--Goober5000
2003-01-19 09:10:40 +00:00
Goober5000 f4030700dc fixed two dumb bugs in the set-support-ship code
--Goober5000
2003-01-19 08:37:52 +00:00
Goober5000 b7f924ea6b actually added the set-support-ship sexp; much of the other commit was
groundwork (data types and stuff)
--Goober5000
2003-01-19 07:45:38 +00:00
Goober5000 c5c4fd08e9 oops - forgot a bit of departure code :)
--Goober5000
2003-01-19 07:13:05 +00:00
Goober5000 bf7871905e fixed a bunch of bugs - "no-subspace-drive" should now work properly for
all ships, and all ships who have their departure anchor set to a capital ship
should exit to that ship when told to depart
--Goober5000
2003-01-19 07:02:16 +00:00
Goober5000 28ef47c26f got rid of nameplate stuff (superceded by texture replacement)
--Goober5000
2003-01-19 06:44:39 +00:00
bobboau 7a6e12df06 redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it 2003-01-19 01:07:43 +00:00
Goober5000 97130623dc made "no-subspace-drive" applicable to all ships and fixed a really *STUPID*
bug that made FRED keep crashing (missing comma, bleagh!)
--Goober5000
2003-01-18 23:25:39 +00:00
phreak a1ad295557 added 'ddsutils' folder to project 2003-01-18 20:00:49 +00:00
phreak ecc552eda8 fixed around the bmpman system to now accept compressed textures 2003-01-18 19:55:16 +00:00
phreak 56d7afd8a0 texture mapper now supports DXTC compressed textures 2003-01-18 19:49:45 +00:00
phreak 46e465b1d2 added tcache flag TCACHE_FLAG_COMPRESSED 2003-01-18 19:49:02 +00:00
phreak 4c52cb0441 added some defines that deal with mages using DXTC 2003-01-18 19:48:19 +00:00
phreak 4da09ccefc these files deal with reading .dds files which use DXTC texture compression 2003-01-18 19:45:20 +00:00
Goober5000 389921bd48 added "no-subspace-drive" flag for ships
--Goober5000
2003-01-18 10:00:43 +00:00
Goober5000 e9f6827211 fixed bug I inadvertently introduced by modifying SIF_ flags with sexps rather
than SF_ flags
--Goober5000
2003-01-18 09:25:42 +00:00
Goober5000 042d935a80 fixed some really strange behavior with strings not being truncated at the
# symbol
--Goober5000
2003-01-17 07:59:09 +00:00
Goober5000 1f7fee5baa Allowed selection of either $Texture Replace, which keeps track of individual
replacement textures for a ship, or $Duplicate Model Texture Replace, which
duplicates a model and reskins it.  Use $Duplicate Model Texture Replace
if you want to substitute an animated texture or a transparent texture.
--Goober5000
2003-01-17 04:57:17 +00:00
Goober5000 ff33077291 added capability to the $Texture replace code to substitute the textures
without needing and extra model, however, this way you can't substitute
transparent or animated textures
--Goober5000
2003-01-17 01:48:50 +00:00
Goober5000 70c909302c yay! got texture replacement to work!!!
--Goober5000
2003-01-16 06:49:11 +00:00
Goober5000 900f57bc94 NOW the model duplicates work! :p
still gotta do the textures, but it shouldn't be hard now
--Goober5000
2003-01-15 23:23:30 +00:00
anonymous 41fabe25bd fixed the demo compilation. Define FS2_DEMO globally to compile as a demo. Make sure warp.pof is in your data/models directory. 2003-01-15 21:29:05 +00:00
inquisitor 1e634da6dd Test commit, ignore 2003-01-15 20:49:50 +00:00
Goober5000 a4386862f5 did the XSTR for the turret thing
--Goober5000
2003-01-15 20:49:10 +00:00
Goober5000 7435ddd89b oops, that'll introduce a bug - naming it just plain "Turret" instead
--Goober5000
2003-01-15 16:52:27 +00:00
Goober5000 f1e5508023 capship ballistic weapon displays "Cannon" on HUD instead of "Laser Turret"
--Goober5000
2003-01-15 16:48:59 +00:00
Goober5000 0fd8e46ea2 assigning duplicate models to ships now works; committing so I have a base
to fall back to as I work on texture replacement
--Goober5000
2003-01-15 08:57:23 +00:00
Goober5000 cb4764e8d0 changed most references to modelnum to use ship instead of ship_info --
this will help with the change-model sexp and any other instances of model
changing
--Goober5000
2003-01-15 07:09:09 +00:00
Goober5000 0c55ff682b added texture replacement parse - will be implemented later
--Goober5000
2003-01-15 05:24:23 +00:00
Goober5000 8659222b82 bumped main halls down to 10
--Goober5000
2003-01-15 05:19:07 +00:00
Goober5000 64b2332534 moved texture loading around a bit; added Texture_replace in preparation
for some cool stuff
--Goober5000
2003-01-15 05:18:13 +00:00
Goober5000 303278228a argh - fixed the stupid message persona bug with <any wingman>
Bobboau, please check your code!
--Goober5000
2003-01-14 06:13:23 +00:00
Goober5000 16baec8877 commented out some mprintfs that were clogging up the debug spew
--Goober5000
2003-01-14 05:53:58 +00:00
Goober5000 0b7cc9aa9d fixed minor potential bug
--Goober5000
2003-01-14 04:01:33 +00:00
Goober5000 77bc1ed93b allowed for up to 256 main halls
--Goober5000
2003-01-14 04:00:16 +00:00
Goober5000 d2969046d4 bug hunting; fixed the beam whack effect bug
--Goober5000
2003-01-13 23:20:01 +00:00
wmcoolmon b3c67343e5 Added MISSION_FLAG_NO_NEB_TRAILS and removed MISSION_FLAG_ST_OVERRIDE_NEB. Also changed code to set flags as necessary 2003-01-13 02:09:12 +00:00
wmcoolmon f26624902f Very slightly optimized code 2003-01-12 03:26:41 +00:00
wmcoolmon f96196c271 It turns out the version in the CVS did not toggle the ship trails with the flag...fixed this. 2003-01-12 00:19:55 +00:00
wmcoolmon f47b3c0fd0 Added code for "Ship Trails override Nebula" 2003-01-11 01:00:25 +00:00
Goober5000 170ac43ebe I found these two beautiful functions in ship.cpp - ship_change_model
and change_ship_type - so I made them into sexps :)
--Goober5000
2003-01-10 04:14:19 +00:00
inquisitor 93e0b43b03 Rollback to 2.7 to fix glow code issue that phreak noticed.
-Quiz
2003-01-09 22:23:38 +00:00
phreak b9c9069c5a fixed a small error in bob's glowmap code 2003-01-09 21:22:36 +00:00
phreak fdc9b42d14 fixed a small error in bob's code 2003-01-09 21:20:21 +00:00
phreak 6cb690996d glowmaps in OpenGL, yay! 2003-01-09 21:19:54 +00:00
phreak eb63396934 glowmaps unloaded if their parent is 2003-01-09 21:19:25 +00:00
Goober5000 f1aa394d29 fixed the giant thruster glow bug
--Goober5000
2003-01-09 05:55:55 +00:00
Goober5000 415969fca0 snagged a potential bug
--Goober5000
2003-01-09 05:52:25 +00:00
Goober5000 dfbd9ad9d0 fixed debriefing music in non-campaign missions
--Goober5000
2003-01-08 19:49:15 +00:00
Goober5000 a50424930b added ai-chase-any-except sexp
--Goober5000
2003-01-07 20:06:44 +00:00
phreak 9843ff7b49 fixed problem in win32_create_window() that disabled OpenGL from running in windowed mode 2003-01-07 00:02:08 +00:00
Goober5000 7ea79b3ed4 implemented keep-safe-distance
--Goober5000
2003-01-06 22:57:23 +00:00
Goober5000 b783b7e364 allowed fighters and bombers to accept the stay-near-ship and
keep-safe-distance orders
--Goober5000
2003-01-06 21:52:58 +00:00
Goober5000 60d0011159 nasssty bugs, we hates them, yesss we do, preciousssss
:)
--Goober5000
2003-01-06 20:29:28 +00:00
Goober5000 e730044cc1 cleaned up some stuff with model_set_thrust and a commented Assert that
shouldn't have been
--Goober5000
2003-01-06 19:33:22 +00:00
Goober5000 60ea566ecc a wee failsafe added
--Goober5000
2003-01-06 18:50:37 +00:00
Goober5000 fd797419dd hmm... moved +Squad Logo to immediately beneath $Name
--Goober5000
2003-01-06 17:19:14 +00:00
Goober5000 3a5a785f51 added wing configurable squad logos - put +Squad Logo: filename.pcx as
the last entry in each wing that you want (but the player's squad logo will
still be the squad logo for the player's wing)
--Goober5000
2003-01-06 17:14:52 +00:00
bobboau 65564198ef disabled decals (for now), removed the warp ray thingys,
made some better error mesages while parseing weapons and ships tbls,
and... oh ya, added glow mapping
2003-01-05 23:41:51 +00:00
Goober5000 def0b0ceb0 added capability of is-iff and change-iff to have wings as well as ships
as their arguments; also allowed a bunch of sexps to accept the player
as an argument where they would previously display a parse error
--Goober5000
2003-01-05 01:26:35 +00:00
Goober5000 01776721ab fixed the order sexp
--Goober5000
2003-01-04 23:15:39 +00:00
Goober5000 6f7d012184 Fixed some minor bugs, and added a primitive-sensors flag, where if a ship
has primitive sensors it can't target anything and objects don't appear
on radar if they're outside a certain range.  This range can be modified
via the sexp primitive-sensors-set-range.
--Goober5000
2003-01-03 21:58:08 +00:00
Goober5000 7d4d468e58 this is the way we squash the bugs, squash the bugs, squash the bugs
this is the way we squash the bugs, so early in the morning :p
--Goober5000
2003-01-02 03:09:01 +00:00
Goober5000 d1a870b372 added don't-collide-invisible and collide-invisible sexps
--Goober5000
2003-01-02 00:35:21 +00:00
Goober5000 680e55e493 added ship-vaporize and ship-no-vaporize sexps
--Goober5000
2003-01-01 23:33:34 +00:00
Goober5000 c779bae39a bumped to 3.4
--Goober5000
2002-12-31 20:09:14 +00:00
Goober5000 5a4fafec31 tweaked stuff
--Goober5000
2002-12-31 19:35:14 +00:00
Goober5000 cfcc94c2bb if it ain't broke, don't fix it
--Goober5000
2002-12-31 19:18:41 +00:00
Goober5000 8d1c8fad7c if it ain't broke, don't fix it
--Goober5000
2002-12-31 18:59:43 +00:00
Goober5000 c6cc437092 simplified end-user implementation of ballistic primaries
--Goober5000
2002-12-31 08:20:31 +00:00
Goober5000 6a30e96439 added damaged-escort-priority-all sexp
--Goober5000
2002-12-31 07:26:40 +00:00
Goober5000 95d7869aa6 fixed escort list behavior for stealthy ships
--Goober5000
2002-12-31 05:17:13 +00:00
Goober5000 95a26b87ce made force feedback stronger when firing ballistic primaries
--Goober5000
2002-12-30 06:16:09 +00:00
phreak 6c0bfdd0b7 added damage-escort-list as a new sexp 2002-12-27 20:16:18 +00:00
Goober5000 0e19a3a614 the insidious beam bug is now squashed AND committed!
--Goober5000
2002-12-27 17:58:11 +00:00
Goober5000 35350315b7 removed the existing stealth sexps and replaced them with the following...
ship-stealthy
ship-unstealthy
is-ship-stealthy
friendly-stealth-invisible
friendly-stealth-visible
is-friendly-stealth-visible
--Goober5000
2002-12-27 02:57:51 +00:00
Goober5000 8f97380d75 meh - changed is-cargo-x to is-cargo
--Goober5000
2002-12-25 01:22:23 +00:00
Goober5000 fe6bac98c7 added change-ai-class and is-ai-class, and I think I may also have nailed the
is-iff bug; did some other bug hunting as well
--Goober5000
2002-12-24 07:42:29 +00:00
Goober5000 77c5502b19 added a wee cautionary note
--Goober5000
2002-12-24 07:38:59 +00:00
Goober5000 065eb6f1d5 added set-cargo and is-cargo-x sexps
--Goober5000
2002-12-23 23:01:27 +00:00
phreak 103e4b2b22 defined USE_OPENGL for debug and release builds 2002-12-23 21:13:41 +00:00
phreak cb4e5b551f dumb typo 2002-12-23 19:25:39 +00:00
phreak c22d9a7e99 added code that displays an error if user's OGL version is less than 1.2 2002-12-23 17:52:51 +00:00
Goober5000 2b52cf3896 Bah - Andsager is a moron. :) I see no reason why rand shouldn't work
multiple times.  It's been fixed thus.
--Goober5000
2002-12-23 05:41:08 +00:00
Goober5000 5b16bd3748 Squashed some Volition bugs! :O Some of the sexps for dealing with more than
one ship would return after only dealing with the first ship.

Also added the following sexps:
is-ship-stealthed
ship-force-stealth
ship-force-nostealth
ship-remove-stealth-forcing

They toggle the stealth flag on and off.  If a ship is forced stealthy, it won't even
show up for friendly ships.
--Goober5000
2002-12-23 05:18:52 +00:00
Goober5000 40bbe0cd39 removed stipulation that "Instructor" be present for training-msg sexp to work
--Goober5000

(This is fun! :))
2002-12-23 01:47:17 +00:00
Goober5000 661dc39d9c hack: turn on ship trails if in nebula - restores backward compatibility
--Goober5000
2002-12-22 22:59:04 +00:00
Goober5000 07c240e9a1 tweaked positioning of the new HUD graphics
--Goober5000
2002-12-22 21:31:01 +00:00
Goober5000 93f20cb8e4 added primaries-depleted and primary-ammo-pct sexps -- useful for ships with
ballistic primaries
--Goober5000
2002-12-22 21:12:22 +00:00
Goober5000 e512f60386 Subcategories implemented. :) So far all that's been done is the Change menu, but other
subcategorizations are possible.  Here are the instructions from sexp.h...
"Adding more subcategories is possible with the new code.  All that needs to be done is
to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it
goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that
will return the subcategory for each sexp that uses it, and the submenu name in the
op_submenu[] array in sexp_tree.cpp."

Please note that I rearranged a whole bunch of sexps in the Operators[] array in sexp.cpp
in order to make the subcategories work better, so if you get a whole bunch of differences
or even conflicts, just ignore them. :)
--Goober5000
2002-12-22 17:22:47 +00:00
Goober5000 59442ea786 commented out the warning if you don't have the new ballistic HUD graphics - it would probably get annoying (just use the old ones without comment)
--Goober5000
2002-12-21 18:03:49 +00:00
Goober5000 ee8a7f67a7 rearranged the sexp list and got the preliminary subcategories working - still need to work on the actual submenu
--Goober5000
2002-12-21 17:58:11 +00:00
DTP c2c24787da did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe 2002-12-21 13:39:25 +00:00
Goober5000 60f69cb79b Updated the cargo-known-delay and cap-subsys-cargo-known-delay sexps to work correctly if set-scanned and set-unscanned are used repeatedly with the same ship or ship subsystem. In most cases, this functionality will never be needed, but it's nice to know that it's here. :) However, I should point out that cap-subsys-cargo-known-delay will recognize only the first instance of a subsystem being revealed once the ship is no longer in the mission. Here is the relevant bit I put into the sexp handling routine...
"Since there is no way to keep track of subsystem status once a ship has departed or has been destroyed, check the mission log.  This will work in 99.9999999% of all cases; however, if the mission designer repeatedly sets and resets the scanned status of the subsystem, the mission log will only return the first occurrence of the subsystem cargo being revealed (regardless of whether it was first hidden using set-unscanned).  Normally, ships keep track of cargo data in the subsystem struct, but once/ the ship has left the mission, the subsystem linked list is purged, causing the loss of this information.  I judged the significant rework of the subsystem code not worth the rare instance that this sexp may be required to work in this way, especially since this problem only occurs after the ship departs.  If the mission designer really needs this functionality, he or she can achieve the same result with creative combinations of event chaining and is-event-true."

Please note that this problem only occurs with cap-subsys-cargo-known-delay, only if the subsystem scanned status is revealed more than once, and then only after the ship is no longer in the mission.  Sufficiently rare, I figured, that I could afford to not worry about it.
--Goober5000
2002-12-20 07:17:23 +00:00
Goober5000 3bc70fc2c2 added capability of storing time_subsys_cargo_revealed
--Goober5000
2002-12-20 07:09:03 +00:00
DTP f09a3c0a09 DTP FIX, fast fix to the beam/shield bug problem. will maybe commit later when i find out why this is getting triggered when it should not 2002-12-20 00:50:41 +00:00
Goober5000 f15a879898 oops - squashed a bug :)
--Goober5000
2002-12-19 10:54:37 +00:00
Goober5000 984f3f0aa7 implemented the revised HUD weapon display for ballistic primaries
--Goober5000
2002-12-19 10:46:14 +00:00
phreak 1559d18757 tidied up game_init() a bit.. took out a bunch of unneeded ifdefs like E3_BUILD
Added option to access OpenGL from the registry keys.  searches for "OpenGL-"
whoever is in charge of the launcher might want to know this.
2002-12-18 22:21:23 +00:00
Goober5000 c2c0ca0eeb added set-scanned and set-unscanned sexps
PLEASE NOTE: These sexps will cause cargo-known-delay and cap-subsys-cargo-known-delay to not work correctly if set-scanned and set-unscanned are used more than once.  I'll fix this later.

--Goober5000
2002-12-17 03:25:30 +00:00
DTP 754c35f2f5 fix to Show_framerate. seems it will call an unresolved external error during fred builds. modified my ifndefs a bit, dsw modified to include preprocessor tag FRED. 2002-12-17 03:08:18 +00:00
DTP 2bbd5a806b wrong name :) 2002-12-17 02:22:34 +00:00
Goober5000 5891192fda cosmetic fixed; also OP_SET_SCANNED and OP_SET_UNSCANNED added in preparation for the set-scanned and set-unscanned sexp commit
--Goober5000
2002-12-17 02:21:42 +00:00
DTP 5effb36530 cleaned up after Goober5000 :). it will make a mess in debug builds. added a couple of ifndef _debugs. 2002-12-17 02:21:06 +00:00
Goober5000 bc72cea911 added functionality and fixed a few things with cargo being revealed and hidden in preparation for the set-scanned and set-unscanned sexp commit
--Goober5000
2002-12-17 02:18:40 +00:00
DTP ec8886cf09 Bumped MAX JUMP-nodes to 50. if anybody wants a Jump-node forest 2002-12-17 01:56:36 +00:00
phreak bce0cc4ca0 optimized fullscreen/minimized functions.. alot faster 2002-12-16 23:28:52 +00:00
DTP 66eaf28ac8 fixed a minor glitch, replaced <> with ", so that it takes project glXXX.h, and not compilers glXXX.h 2002-12-15 18:59:57 +00:00
phreak d728b3d745 opengl headers 2002-12-15 16:57:15 +00:00
DTP 11426ed5a2 FIX; player can now have all ships set in FRED2 as allowed playerships in singleplayer 2002-12-15 06:50:49 +00:00
DTP 386abb7000 Bumped fire_dealy on_empty_secondary to 1000 2002-12-15 06:29:24 +00:00
Goober5000 476fb7bbfc removed mission flag for fighterbay damage; instead made damage display contingent on whether the fighterbay subsystem is assigned a damage percentage in ships.tbl
--Goober5000
2002-12-14 17:09:28 +00:00
phreak c825720ae0 added a command line that displays frames per second when enabled.
use "-fps"
2002-12-14 17:09:08 +00:00
phreak 6e407fff7b copied from grgpenglw32x.cpp. 2002-12-14 16:14:52 +00:00
Goober5000 11b24d23aa added mission flag to show subsystem damage for fighterbays
~Goober5000~
2002-12-14 01:55:04 +00:00
Goober5000 2135e20299 small tweaks and bug fixes for the ballistic primary conversion
~Goober5000~
2002-12-13 08:13:30 +00:00
Goober5000 123277167b added distance-ship-subsystem sexp
~Goober5000~
2002-12-12 08:01:57 +00:00
Goober5000 4a9f85674f Full-fledged ballistic primary support added! Try it and see! :) 2002-12-10 05:43:35 +00:00
Goober5000 719579177e Full-fledged ballistic primary support added! Try it and see! :)
Fixed lead indicator behavior; Phreak's version didn't work properly.
2002-12-10 05:42:42 +00:00
Goober5000 3f6a1f33d4 Full-fledged ballistic primary support added! Try it and see! :)
Preliminary support added for selecting additional primaries (more than 2) and secondaries (more than 3) if this is implemented later.
Transports can now dock with fighters, bombers, & stealth ships.
2002-12-10 05:41:38 +00:00
DTP 688dee73c2 DTP; added decals.h and decals.cpp to the project, aswell as the directory 2002-12-10 00:44:38 +00:00
Goober5000 5fa10d82f4 fixed misspelling 2002-12-09 08:37:31 +00:00
Goober5000 4cde77929f fixed misspelling 2002-12-09 08:26:24 +00:00
bobboau 41f66ee2f3 inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
it needs a better renderer, but is in prety good shape for now,
I also (think) I squashed a bug in the warpmodel code
2002-12-07 01:37:43 +00:00
phreak 2ee9db9479 extension framework implemented(no extensions work YET) -phreak 2002-12-05 00:49:25 +00:00
DTP f87883712e lowered MAX_POLYGON_MODELS FROM 198 to 128 for safety reasons since we bumped back MAX_SHIP_TYPES to 130 2002-12-04 09:44:34 +00:00
Goober5000 ea22ebfe09 implemented beam-free-all-by-default mission flag 2002-12-03 23:05:13 +00:00
Goober5000 0edd905be5 added myself to the credits list :)
~Goober5000
2002-12-03 22:14:06 +00:00
Goober5000 47e2ff7500 fixed player-entry-delay bug 2002-12-03 00:00:52 +00:00
Goober5000 c011621363 fixed misspelling 2002-12-02 23:56:12 +00:00
Goober5000 8c47d95901 fixed misspelling 2002-12-02 23:26:08 +00:00
Goober5000 e08be40462 fixed misspelling of "category" as "catagory" 2002-12-02 23:24:35 +00:00
Goober5000 d7022ad67b commented out an unneeded variable (int ret) in psnet_socket_options 2002-12-02 23:18:53 +00:00
Goober5000 38f435eba8 commented out an unneeded variable (ship *shipp) in model_really_render 2002-12-02 23:16:45 +00:00
Goober5000 6f429c16ee fixed mispelling of "category" as "catagory" 2002-12-02 23:14:17 +00:00
Goober5000 dfaebd0908 fixed mispelling of "category" as "catagory" 2002-12-02 20:49:14 +00:00
Goober5000 d6abb06544 fixed mispelling of "category" as "catagory" 2002-12-02 20:37:26 +00:00
sesquipedalian d950369202 end-mission sexp added 2002-11-28 00:00:37 +00:00
sesquipedalian 745fc385e9 Added Phreak's fix for the weapons room bug. Can now view a modified weapons.tbl in the tech room without crashing 2002-11-27 01:20:51 +00:00
phreak f02a1caced added OGL_inited global. Sets to 0 even if OGL isn't defined by preproccessor
-phreak
2002-11-22 20:56:15 +00:00
phreak e547962d31 changed around some page-in functions to work with opengl
changed bm_set_components_opengl
-phreak
2002-11-22 20:55:27 +00:00
phreak 31fe8e2a4c finished off all remaining problems with 32 bit mode, fullscreen mode
and colors.  Still needs some tweaking, but works near perfect
2002-11-22 20:54:16 +00:00
phreak 1b1dc86fb6 added some opengl defines for shield detail -phreak 2002-11-22 20:52:29 +00:00
DTP 7539390fc3 DTP; fix at line 6785 in parse/SEXP.cpp, a forgotten "{", when the is tagged thing was Fixed 2002-11-20 21:22:31 +00:00
sesquipedalian ad7b508184 Adding in EdrickV's fix to the is-tagged sexp. 2002-11-19 02:15:50 +00:00
phreak 0fa37a5b62 made ogl be used if "NDEBUG" is not defined and "USE_OPENGL" is defined - phreak 2002-11-18 21:34:16 +00:00
phreak 1cbfc73384 added some lines that makes ogl work in windowed mode for fullneb - phreak 2002-11-18 21:32:48 +00:00
phreak c58ae29dd5 added some ogl functionality - phreak 2002-11-18 21:32:11 +00:00
phreak 96e442b564 complete overhaul, works in 16 bit mode -phreak 2002-11-18 21:31:36 +00:00
phreak e817f867af added bm_select_components functions for OpenGL -phreak 2002-11-18 21:27:13 +00:00
bobboau 8c8c96bb89 added nameplate code 2002-11-14 06:15:03 +00:00
bobboau f0e7af10bb added warp model and type 1 glow points
and well as made the new glow file type,
some general improvement to fighter beams,
2002-11-14 04:18:17 +00:00
phreak 4e44bcfdef updated parse_weapon to parse custom corkscrew missiles 2002-11-11 20:18:30 +00:00
phreak d4cea3a9ff changed around the 'weapon_info' struct to allow for custom corkscrew missiles 2002-11-11 20:11:02 +00:00
phreak f06b7dfd20 changed cscrew_create and cscrew_process_post
to allow for custom corkscrew properties
2002-11-11 20:09:12 +00:00
phreak 6dd4f692e2 changed a line in ship_fire_secondary to allow for custom
amounts of corkscrew missiles fired
2002-11-11 20:05:52 +00:00
inquisitor d860dc0011 Bumped to 3.3 2002-11-10 20:40:02 +00:00
DTP d5d8e66dee DTP bumped back MAX_SHIP_TYPES to 130 2002-11-10 19:57:36 +00:00
DTP ad4843b8ea -DTP reworked mod support, 2002-11-10 16:32:42 +00:00
DTP 3162ede091 -DTP reworked mod support, 2002-11-10 16:30:53 +00:00
phreak f9e3871b3e Parser error handling for fighter flak, it didn't want flak on player weapons, now it doesn't care 2002-11-06 23:22:05 +00:00
phreak 53abc32182 Fighter flak code, it doesn't blow up in your face anymore! 2002-11-06 23:21:06 +00:00
DTP 39267bcb05 Made sure, that VP and Plain files dont get added twice to the search order. Side-effect of Mod support. 2002-11-04 08:32:38 +00:00
DTP 7398df34ec DOh,uhmm, define error again, this is getting to me. 2002-11-02 23:06:59 +00:00
DTP 62c8792c2a DOh, fixed that define, learn to count DTP :) 2002-11-02 23:04:46 +00:00
inquisitor e561a547a7 Cleaned up the presentation a little, added HLP and VW, and, no offense to Kazan, removed Kazan. 2002-11-02 22:25:26 +00:00
DTP 5128907c07 DOH forgot \n 2002-11-02 22:11:35 +00:00
DTP 5ddef96ccc shameless self promotion 2002-11-02 22:10:48 +00:00
DTP e75251141a DTP Bumped Max_exited_ships from 200 to double that of MAX_SHIPS = 800 . make sense ehh. for logging effect. 2002-10-31 21:56:44 +00:00
DTP 4f419025fe DTP Quickly added something needed to cmdline.h, since otherwise we can not compile the code as it misses some externals. Thought a rollback rolled all back. 2002-10-31 21:14:16 +00:00
penguin c6cf69e4a3 Hopelessly out of date, and only applied to Linux anyhow 2002-10-31 03:49:35 +00:00
penguin 10e444df95 updated 2002-10-31 03:46:27 +00:00
inquisitor eeab39d62d Bad Committ, Rolling back 2002-10-30 20:22:30 +00:00
DTP 28e46d411b doh!, used upper case in include, dont know how much it matters for *nix systems, but here it is 2002-10-30 06:31:05 +00:00
DTP 1195eb3ada DTP Implemented basic VP files handling. mission and campaign files inside VP files found in mod dir still not supported, cheking / creating directories not implented either 2002-10-30 06:26:11 +00:00
sesquipedalian 5f779fae4c no message 2002-10-29 22:41:48 +00:00
DTP cdb274654e Crap, somebody may restore cmdline.h to 2 version before this. 2002-10-28 02:28:52 +00:00
DTP b486c02ac8 DTP; started basic implementation of mod-support
plain files only for now. fs2_open.exe -mod X will look for files in fs2/ X /all-legal-subdirectories. no checking/creating dirs yet. directories must be there.
2002-10-27 23:59:28 +00:00
randomtiger 9bcb08776c Made Phreaks alternative scanning style optional under the command line tag "-phreak"
Fixed bug that changes HUD colour when targetting debris in a full nebula. - RT
2002-10-22 23:02:40 +00:00
randomtiger d36c788e00 Fixed lighting bug that caused special pause to crash on debug build.
Also added TAB functionality for special pause that toggles HUD. - RT
2002-10-22 17:42:09 +00:00
bobboau 00bbac6ae1 inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam sheild hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry 2002-10-19 19:29:29 +00:00
randomtiger 40db1ce831 Added special pause mode for easier action screenshots.
Added new command line parameter for accessing all single missions in tech room. - RT
2002-10-19 03:50:29 +00:00
randomtiger bbf18d5667 Added ability to remove HUD ingame on keypress shift O
So I've added a new key to the bind list and made use of already existing hud removal code.
2002-10-17 20:40:51 +00:00
phreak 377f78db0f screenshots, yay! 2002-10-14 19:49:08 +00:00
phreak ad96da3537 further optimizations 2002-10-13 21:43:24 +00:00
phreak db8cf9134f fixed text 2002-10-12 17:48:11 +00:00
phreak 0d65873a0b dont use this one 2002-10-11 21:35:51 +00:00
phreak c38ff6302d first run at opengl for w32, only useful in main hall, barracks and campaign room 2002-10-11 21:31:17 +00:00
randomtiger abc9a3ddb1 Added us fs2_open people to the credits. Worth looking at just for that.
Added timer bar code, by default its not compiled in.
Use TIMEBAR_ACTIVE in project and dependancy code settings to activate.
Added the new timebar files with the new code.
2002-10-05 16:46:10 +00:00
phreak 650c4dea46 did glare stuff in game_sunspot_process() 2002-09-20 20:09:01 +00:00
phreak a2d1cf8f37 glare parser stuff in stars_init() 2002-09-20 20:05:29 +00:00
phreak 23c449af6c added glare variable for ambient suns
if glare is 0 then the sun glare whiteout is not shown when looking at the sun
2002-09-20 20:04:54 +00:00
phreak 2d548f46bf lead indicator for dumbfire missiles 2002-09-20 20:02:00 +00:00
phreak c3c4ce064c extra effects during cargo scan 2002-09-20 20:01:30 +00:00
randomtiger fb7a0d5257 Tiny change to DX branch to keep movie code optional (default off) 2002-08-28 21:47:02 +00:00
randomtiger f8351a9818 Woh! I sure as hell didnt modify all these files it says I did.
I will put this down to the branch! Note: I did start from a fresh checkout!
2002-08-28 10:51:04 +00:00
penguin 5aefddd246 Moved DirectX8 stuff to directx8 branch; reverted to previous 2002-08-27 13:38:58 +00:00
randomtiger facefe5872 Added new lib files: strmiids and ddraw to get dshow working
Added new command line parameter to active direct show movie play: -dshowvid
Uncommented movie_play calls and includes
2002-08-18 19:48:29 +00:00
penguin ef794efbb3 Added #include, needed for FRED 2002-08-15 04:41:17 +00:00
615 changed files with 101824 additions and 56622 deletions

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
#SystemAuth=no
# Put CVS lock files in this directory rather than directly in the repository.
#LockDir=/var/lock/cvs
LockDir=/var/lock/cvs
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
# level of the new working directory when using the `cvs checkout'
+4 -4
View File
@@ -20,13 +20,13 @@
# Script to accumulate log messages for an entire tree and send them along
# with the diffs; deals correctly with all manner of branching (I hope)
#
# $Id: new_log_accum,v 1.1 2002-08-11 23:05:15 drevil Exp $
# $Id: new_log_accum,v 1.3 2003-09-07 12:46:59 drevil Exp $
#
use strict;
use vars qw($MAILER $CVS $debug $boundary);
use MD5;
use Digest::MD5;
# Set this to the full path of a mailer that takes a list
# of email addresses as arguments...
@@ -328,13 +328,13 @@ sub build_header ($@) {
# generate a unique boundary by calculating the md5sum of the
# current time
$digest = new MD5;
$digest = new Digest::MD5;
$digest->reset();
$digest->add(time() . rand());
$boundary = "----=MIME." . unpack("H*", $digest->digest());
# Build the mail header
push(@text, "From: $user");
push(@text, 'From: [email protected]');
push(@text, "To: " . join(' ', @mailto));
push(@text, "Subject: $subject");
push(@text, "MIME-Version: 1.0");
+10
View File
@@ -6,4 +6,14 @@ penguin:Jh.dOjaiO2jHk:fs2source
DTP:f7M92Z/6/uep.:fs2source
unknownplayer:f79BgAn.IzJs6:fs2source
phreak:f7WQyGiT/jzlM:fs2source
randomtiger:f7Way/xL9ic7o:fs2source
righteous1:f7fpcXiE0Ubao:fs2source
bobboau:f7jChSbXOIdWY:fs2source
sesquipedalian:f75AcAOV6TM6Q:fs2source
daveb:f7f2mVbMvbe.6:fs2source
Goober5000:f7Fc.gHzyrOL2:fs2source
dkharrat:f7odljbD5tm5k:fs2source
EdrickV:f7cDahmEbbAlg:fs2source
OldMan:f7N4NyUG5Ommw:fs2source
komet:f7fyoBN5r.m76:fs2source
anonymous:oIKtWP1q6GDt6:fs2source
+14
View File
@@ -1,4 +1,18 @@
drevil
inquisitor
mysterial
DTP
randomtiger
wmcoolmon
unknownplayer
phreak
bobboau
righteous1
sesquipedalian
Goober5000
dkharrat
daveb
EdrickV
OldMan
komet
penguin
+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
+29
View File
@@ -0,0 +1,29 @@
Original source (Freespace 2) by Volition, Inc.; see "credits.tbl"
Modifications by the FreeSpace Source Code Project (FSSCP)
http://fs2source.warpcore.org
FS2_OPEN STAFF:
Project leader:
Edward "Inquisitor" Gardner
Programmers:
"Bobboau"
Dennis "DTP" Pedersen
Ian "Goober5000" Warfield
Joe "Righteous1" Dowd
Mike "penguin" Harris
"Mysterial"
"PhReAk"
Thomas "Random Tiger" Whittaker
Will "Unknown PLayer" Rousnel
"WMCoolmon"
Web support:
Icefire and the staff at Volitionwatch.com
Alex "Thunder" Avery and the staff at Hard Light Productions
Special thanks to:
Volition for making FS2 such a great game
Dave Baranec for giving us the code and keeping us sanity checked
+14
View File
@@ -0,0 +1,14 @@
Volition Copyright (applies to original FreeSpace2 source code
developed and released by Volition):
"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."
Modifications by members of the FreeSpace Source Code Project are
released under whatever terms the individual authors choose, but the
above notice continues to apply to all fs2_open code.
+595 -1
View File
@@ -1,6 +1,600 @@
ChangeLog for fs2_open. All times are UTC.
Updated 2002-08-13 04:31
Updated 2002-10-31 03:46
2002-10-30 22:57 randomtiger
* code/: code.dsp (1.6.2.8), graphics/grd3d.cpp (2.2.2.18),
graphics/grd3dinternal.h (2.1.2.7), graphics/grd3dtexture.cpp
(2.1.2.16), model/modelinterp.cpp (2.3.2.1):
Changed DX8 code to not use set render and texture states if they
are already set to that value. Disabled buffer saving and
restoring code when windowed to stop DX8 debug runs from crashing.
- RT
2002-10-30 20:22 inquisitor
* code/cmdline/cmdline.h (2.10):
Bad Committ, Rolling back
2002-10-30 06:29 DTP
* code/cfile/: cfilesystem.cpp (2.5), cfile.cpp (2.5):
doh!, used upper case in include, dont know how much it matters for
*nix systems, but here it is
2002-10-30 06:26 DTP
* code/cfile/cfilesystem.cpp (2.4):
DTP Implemented basic VP files handling. mission and campaign files
inside VP files found in mod dir still not supported, cheking /
creating directories not implented either
2002-10-29 22:41 sesquipedalian
* code/parse/: sexp.cpp (2.3), sexp.h (2.3):
no message
2002-10-28 02:28 DTP
* code/cmdline/cmdline.h (2.9):
Crap, somebody may restore cmdline.h to 2 version before this.
2002-10-28 00:40 randomtiger
* code/graphics/grd3d.cpp (2.2.2.17):
Implemented screen saving code for restoring when drawing popups, a
bit slow but works. - RT
2002-10-27 23:59 DTP
* code/cfile/: cfile.cpp (2.4), cfile.h (2.3):
DTP; started basic implementation of mod-support plain files only
for now. fs2_open.exe -mod X will look for files in fs2/ X
/all-legal-subdirectories. no checking/creating dirs yet.
directories must be there.
2002-10-27 23:55 DTP
* code/cmdline/: cmdline.cpp (2.9), cmdline.h (2.8):
DTP; started basic implementation of mod-support plain files only
for now. fs2_open.exe -mod X will look for files in fs2/ X
/all-legal-subdirectories. no checking/creating dirs yet.
directories must be there.
2002-10-26 09:55 unknownplayer
* code/: freespace2/freespace.cpp (2.6.2.5), nebula/neb.cpp
(2.1.2.1):
Fixed the nebula flicker bug. Check the NO_DIRECT3D conditional
compile sections in the future for bits of code which may cause
problems due to hacks correcting for DirectX5 that no longer apply.
2002-10-26 01:24 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.10), bmpman/bmpman.h (2.0.2.7),
graphics/grd3d.cpp (2.2.2.16), graphics/grd3drender.cpp (2.3.2.15),
graphics/grd3dtexture.cpp (2.1.2.15):
Fixed debug bitmap compiling bug. Fixed tga bug. - RT
2002-10-22 23:02 randomtiger
* code/: cmdline/cmdline.cpp (2.8), cmdline/cmdline.h (2.7),
debugconsole/timerbar.h (1.2), hud/hudtargetbox.cpp (2.4),
model/modelinterp.cpp (2.5):
Made Phreaks alternative scanning style optional under the command
line tag "-phreak" Fixed bug that changes HUD colour when
targetting debris in a full nebula. - RT
2002-10-22 17:46 randomtiger
* Freespace2.dsp (1.7.2.4), code/bmpman/bmpman.cpp (2.2.2.9),
code/bmpman/bmpman.h (2.0.2.6), code/graphics/grd3dtexture.cpp
(2.1.2.14):
Fixed new TGA code texturing bug. - RT
2002-10-22 17:42 randomtiger
* code/: freespace2/freespace.cpp (2.13),
missionui/missionpause.cpp (2.3):
Fixed lighting bug that caused special pause to crash on debug
build. Also added TAB functionality for special pause that toggles
HUD. - RT
2002-10-21 16:33 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.8), bmpman/bmpman.h (2.0.2.5),
graphics/grd3d.cpp (2.2.2.15), graphics/grd3dinternal.h (2.1.2.6),
graphics/grd3drender.cpp (2.3.2.14), graphics/grd3dtexture.cpp
(2.1.2.13):
Added D3D only 32 bit TGA functionality. Will load a texture as big
as your graphics card allows. Code not finished yet and will forge
the beginnings of the new texture system. - RT
2002-10-20 22:21 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.7), graphics/grd3d.cpp
(2.2.2.14), graphics/grd3drender.cpp (2.3.2.13), palman/palman.cpp
(2.1.2.1):
Some incomplete code to handle background drawing when message
boxes are drawn. It doesnt work but its a good base for someone to
start from. - RT
2002-10-19 23:56 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.6), bmpman/bmpman.h (2.0.2.4),
globalincs/pstypes.h (2.4.2.3), graphics/grd3d.cpp (2.2.2.13),
graphics/grd3dtexture.cpp (2.1.2.12):
Changed generic bitmap code to allow maximum dimensions to be
determined by 3D's engines maximum texture size query. Defaults to
256 as it was before. Also added base code for reworking the
texture code to be more efficient. - RT
2002-10-19 19:29 bobboau
* code/: controlconfig/controlsconfig.h (2.2),
controlconfig/controlsconfigcommon.cpp (2.3), model/model.h (2.5),
model/modelinterp.cpp (2.4), model/modelread.cpp (2.4),
model/modelsinc.h (2.4), object/object.cpp (2.2), osapi/outwnd.cpp
(2.2), physics/physics.cpp (2.2), physics/physics.h (2.2),
playerman/playercontrol.cpp (2.2), ship/ai.h (2.2), ship/aibig.cpp
(2.2), ship/aicode.cpp (2.8), ship/ship.cpp (2.7), ship/ship.h
(2.4), ship/shipcontrails.cpp (2.3), ship/shipcontrails.h (2.1),
ship/shiphit.cpp (2.6), starfield/starfield.cpp (2.3),
weapon/beam.cpp (2.4), weapon/beam.h (2.3), weapon/weapon.h (2.2),
weapon/weapons.cpp (2.2):
inital commit, trying to get most of my stuff into FSO, there
should be most of my fighter beam, beam rendering, beam sheild hit,
ABtrails, and ssm stuff. one thing you should be happy to know is
the beam texture tileing is now set in the beam section section of
the weapon table entry
2002-10-19 03:50 randomtiger
* code/: cmdline/cmdline.cpp (2.7), cmdline/cmdline.h (2.6),
freespace2/freespace.cpp (2.12), io/keycontrol.cpp (2.4),
menuui/readyroom.cpp (2.2), missionui/missionpause.cpp (2.2),
missionui/missionpause.h (2.2):
Added special pause mode for easier action screenshots. Added new
command line parameter for accessing all single missions in tech
room. - RT
2002-10-17 20:40 randomtiger
* code/: controlconfig/controlsconfig.h (2.1),
controlconfig/controlsconfigcommon.cpp (2.2), hud/hud.cpp (2.2),
hud/hud.h (2.2), io/keycontrol.cpp (2.3),
mission/missionmessage.cpp (2.2):
Added ability to remove HUD ingame on keypress shift O So I've
added a new key to the bind list and made use of already existing
hud removal code.
2002-10-16 00:41 randomtiger
* code/graphics/: 2d.cpp (2.3.2.8), 2d.h (2.1.2.2), grd3d.cpp
(2.2.2.12), grd3d.h (2.0.2.4), grd3drender.cpp (2.3.2.12):
Fixed small bug that was stopping unactive text from displaying
greyed out Also added ability to run FS2 DX8 in 640x480, however I
needed to make a small change to 2d.cpp which invloved calling the
resolution processing code after initialising the device for D3D
only. This is because D3D8 for the moment has its own internal
launcher. Also I added a fair bit of documentation and tidied some
stuff up. - RT
2002-10-14 21:52 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.5), graphics/grd3d.cpp
(2.2.2.11), graphics/grd3drender.cpp (2.3.2.11),
graphics/grd3dtexture.cpp (2.1.2.11):
Finally tracked down and killed off that 8 bit alpha bug. So the
font, HUD and 8 bit ani's now work fine. - RT
2002-10-14 19:49 phreak
* code/graphics/gropenglw32x.cpp (1.4):
screenshots, yay!
2002-10-13 21:43 phreak
* code/graphics/gropenglw32x.cpp (1.3):
further optimizations
2002-10-12 17:48 phreak
* code/graphics/gropenglw32x.cpp (1.2):
fixed text
2002-10-11 21:35 phreak
* code/graphics/gropenglw32.cpp (1.2):
dont use this one
2002-10-11 21:30 phreak
* code/graphics/: gropenglw32.cpp (1.1), gropenglw32x.cpp (1.1):
first run at opengl for w32, only useful in main hall, barracks and
campaign room
2002-10-11 18:50 randomtiger
* code/graphics/: 2d.cpp (2.3.2.7), 2d.h (2.1.2.1), grd3d.cpp
(2.2.2.10), grd3d.h (2.0.2.3), grd3dinternal.h (2.1.2.5),
grd3drender.cpp (2.3.2.10), grd3dtexture.cpp (2.1.2.10):
Checked in fix for 16 bit problem, thanks to Righteous1 Removed a
fair bit of code that was used by the 16 bit code path which no
longer exists. 32 bit and 16 bit should now work in exactly the
same way. - RT
2002-10-08 14:33 randomtiger
* code/: graphics/grd3d.cpp (2.2.2.9), graphics/grd3drender.cpp
(2.3.2.9), graphics/grd3dtexture.cpp (2.1.2.9), osapi/outwnd.cpp
(2.1.2.1):
OK, I've fixed the z-buffer problem. However I have abandoned
using w-buffer for now because of problems. I think I know how to
solve it but Im not sure it would make much difference given the
way FS2 engine works. I have left code in there of use if anyone
wants to turn their hand to it. However for now we just need to
crack of the alpha problem then we will have FS2 fully wokring in
DX8 on GF4 in 32 bit.
2002-10-05 16:46 randomtiger
* code/: code.dsp (1.10), debugconsole/timerbar.cpp (1.1),
debugconsole/timerbar.h (1.1), freespace2/freespace.cpp (2.11),
globalincs/systemvars.h (2.2), graphics/grd3d.cpp (2.3),
graphics/grd3dinternal.h (2.2), graphics/grd3drender.cpp (2.4),
menuui/credits.cpp (2.3):
Added us fs2_open people to the credits. Worth looking at just for
that. Added timer bar code, by default its not compiled in. Use
TIMEBAR_ACTIVE in project and dependancy code settings to activate.
Added the new timebar files with the new code.
2002-10-04 00:48 randomtiger
* code/graphics/: grd3d.cpp (2.2.2.8), grd3dinternal.h (2.1.2.4),
grd3drender.cpp (2.3.2.8), grd3dtexture.cpp (2.1.2.8):
Fixed video memory leaks Added code to cope with lost device, not
tested Got rid of some DX5 stuff we definately dont need Moved some
enum's into internal,h because gr_d3d_set_state should be able to
be called from any dx file Cleaned up some stuff - RT
2002-10-03 08:32 unknownplayer
* code/: graphics/grd3d.cpp (2.2.2.7), graphics/grd3dtexture.cpp
(2.1.2.7), osapi/osapi.cpp (2.2.2.2):
Hacked in a windowed mode so we can properly debug this without
using monitors (although I drool at the concept of having that!)
2002-10-02 17:52 randomtiger
* code/: debugconsole/dbugfile.cpp (2.1.2.3),
debugconsole/dbugfile.h (2.1.2.3), graphics/grd3d.cpp (2.2.2.6),
graphics/grd3drender.cpp (2.3.2.7), graphics/grd3dtexture.cpp
(2.1.2.6):
Fixed blue lighting bug. Put filtering flag set back in that I
accidentally removed Added some new functionality to my debuging
system - RT
2002-10-02 11:40 randomtiger
* code/: code.dsp (1.6.2.7), bmpman/bmpman.cpp (2.2.2.4),
bmpman/bmpman.h (2.0.2.3), graphics/2d.cpp (2.3.2.6),
graphics/grd3d.cpp (2.2.2.5), graphics/grd3d.h (2.0.2.2),
graphics/grd3dinternal.h (2.1.2.3), graphics/grd3drender.cpp
(2.3.2.6), graphics/grd3dtexture.cpp (2.1.2.5),
pcxutils/pcxutils.cpp (2.1.2.2):
Bmpmap has been reverted to an old non d3d8 version. All d3d8 code
is now in the proper place. PCX code is now working to an extent.
Problems with alpha though. Ani's work slowly with alpha problems.
Also I have done a bit of tidying - RT
2002-09-28 22:13 randomtiger
* code/: anim/animplay.cpp (2.1.2.2), bmpman/bmpman.cpp (2.2.2.3),
graphics/grd3d.cpp (2.2.2.4), graphics/grd3dinternal.h (2.1.2.2),
graphics/grd3drender.cpp (2.3.2.5), graphics/grd3dtexture.cpp
(2.1.2.4), weapon/weapons.cpp (2.1.2.2):
Sorted out some bits and pieces. The background nebula blends now
which is nice. – RT
2002-09-28 12:20 randomtiger
* code/graphics/: grd3d.cpp (2.2.2.3), grd3drender.cpp (2.3.2.4),
grd3dtexture.cpp (2.1.2.3):
Just a tiny code change that lets stuff work in 16 bit. For some
reason 16 bit code was taking a different code path for displaying
textures. So until I unstand why, Im cutting off that codepath
because it isnt easy to convert into DX8.
2002-09-28 00:18 randomtiger
* code/: bmpman/bmpman.cpp (2.2.2.2), bmpman/bmpman.h (2.0.2.2),
graphics/grd3drender.cpp (2.3.2.3), graphics/grd3dtexture.cpp
(2.1.2.2):
Did some work on trying to get textures to load from pcx, define
TX_ATTEMPT for access to it. Converted some DX7 blending calls to
DX8 which a fair difference to ingame visuals.
- RT
2002-09-24 18:56 randomtiger
* Freespace2.dsp (1.7.2.3), code/code.dsp (1.6.2.6),
code/anim/animplay.cpp (2.1.2.1), code/bmpman/bmpman.cpp (2.2.2.1),
code/bmpman/bmpman.h (2.0.2.1), code/cfile/cfile.cpp (2.3.2.1),
code/cmeasure/cmeasure.cpp (2.1.2.1),
code/controlconfig/controlsconfig.cpp (2.1.2.1),
code/cutscene/cutscenes.cpp (2.2.2.4), code/cutscene/movie.cpp
(2.1.2.4), code/cutscene/movie.h (2.1.2.2),
code/debugconsole/console.cpp (2.1.2.1),
code/debugconsole/dbugfile.cpp (2.1.2.2),
code/debugconsole/dbugfile.h (2.1.2.2),
code/freespace2/freespace.cpp (2.6.2.4),
code/freespace2/freespace.rc (2.0.2.1),
code/freespace2/freespaceresource.h (2.0.2.1),
code/gamehelp/gameplayhelp.cpp (2.1.2.1), code/globalincs/pstypes.h
(2.4.2.2), code/graphics/2d.cpp (2.3.2.5), code/graphics/bitblt.cpp
(2.1.2.1), code/graphics/grd3d.cpp (2.2.2.2), code/graphics/grd3d.h
(2.0.2.1), code/graphics/grd3dinternal.h (2.1.2.1),
code/graphics/grd3drender.cpp (2.3.2.2),
code/graphics/grd3dtexture.cpp (2.1.2.1),
code/graphics/grdirectdraw.cpp (2.1.2.2), code/hud/hudconfig.cpp
(2.2.2.1), code/hud/hudmessage.cpp (2.1.2.1),
code/menuui/barracks.cpp (2.2.2.1), code/menuui/credits.cpp
(2.2.2.1), code/menuui/mainhallmenu.cpp (2.3.2.4),
code/menuui/mainhalltemp.cpp (2.1.2.1), code/menuui/optionsmenu.cpp
(2.1.2.1), code/menuui/playermenu.cpp (2.2.2.1),
code/menuui/readyroom.cpp (2.1.2.1), code/menuui/techmenu.cpp
(2.1.2.1), code/menuui/trainingmenu.cpp (2.1.2.1),
code/mission/missioncampaign.cpp (2.3.2.3),
code/mission/missiongoals.cpp (2.1.2.1),
code/mission/missionhotkey.cpp (2.1.2.1),
code/mission/missionload.cpp (2.1.2.1),
code/missionui/missionbrief.cpp (2.1.2.1),
code/missionui/missioncmdbrief.cpp (2.1.2.1),
code/missionui/missiondebrief.cpp (2.2.2.1),
code/missionui/missionloopbrief.cpp (2.1.2.1),
code/missionui/missionpause.cpp (2.1.2.1),
code/missionui/missionshipchoice.cpp (2.1.2.1),
code/missionui/missionweaponchoice.cpp (2.1.2.1),
code/missionui/redalert.cpp (2.1.2.1),
code/network/multi_dogfight.cpp (2.1.2.1),
code/network/multi_ingame.cpp (2.1.2.1),
code/network/multi_pinfo.cpp (2.1.2.1),
code/network/multiteamselect.cpp (2.2.2.1),
code/network/multiui.cpp (2.4.2.1), code/pcxutils/pcxutils.cpp
(2.1.2.1), code/popup/popup.cpp (2.1.2.1), code/render/3ddraw.cpp
(2.2.2.1), code/ship/ship.cpp (2.6.2.1), code/stats/medals.cpp
(2.2.2.1), code/ui/gadget.cpp (2.1.2.1), code/weapon/weapons.cpp
(2.1.2.1):
DX8 branch commit
This is the scub of UP's previous code with the more up to date RT
code. For full details check previous dev e-mails
2002-09-20 20:09 phreak
* code/freespace2/freespace.cpp (2.10):
did glare stuff in game_sunspot_process()
2002-09-20 20:05 phreak
* code/starfield/starfield.cpp (2.2):
glare parser stuff in stars_init()
2002-09-20 20:04 phreak
* code/starfield/starfield.h (2.2):
added glare variable for ambient suns if glare is 0 then the sun
glare whiteout is not shown when looking at the sun
2002-09-20 20:02 phreak
* code/hud/hudtarget.cpp (2.2):
lead indicator for dumbfire missiles
2002-09-20 20:01 phreak
* code/hud/hudtargetbox.cpp (2.3):
extra effects during cargo scan
2002-09-10 21:58 unknownplayer
* code/graphics/directx8/GrD3d81Stubs.cpp (1.1):
file GrD3d81Stubs.cpp was initially added on branch directx8.
2002-09-10 21:58 unknownplayer
* code/: freespace2/freespace.cpp (2.6.2.3), graphics/2d.cpp
(2.3.2.4), graphics/grdirectdraw.cpp (2.1.2.1),
graphics/directx8/GrD3D81.cpp (1.2.2.4),
graphics/directx8/GrD3D81.h (1.1.2.4),
graphics/directx8/GrD3d81Stubs.cpp (1.1.2.1):
Added the DX8 stub file, plus new CODE!
2002-09-08 02:36 unknownplayer
* code/: code.dsp (1.6.2.5), graphics/2d.cpp (2.3.2.3),
graphics/grd3d.cpp (2.2.2.1), graphics/grd3drender.cpp (2.3.2.1),
graphics/directx8/GrD3D81.cpp (1.2.2.3),
graphics/directx8/GrD3D81.h (1.1.2.3):
Framework for the new D3DRENDER class is in place, and gr_screen
function structures are now there too. The way it's done is
probably kind of inefficient, but until we're further along
actually drawing polygons we should keep it that way for
consistency's sake.
2002-09-01 08:18 unknownplayer
* Freespace2.dsp (1.7.2.2), code/code.dsp (1.6.2.4),
code/globalincs/pstypes.h (2.4.2.1), code/graphics/2d.cpp
(2.3.2.2), code/graphics/directx8/GrD3D81.cpp (1.2.2.2),
code/graphics/directx8/GrD3D81.h (1.1.2.2),
code/menuui/mainhallmenu.cpp (2.3.2.3):
Started writing some code for the new DX8.1 class and hit a serious
snag to do with window handling and DirectDraw (and possibly my
unfamiliarity with DX). It seems we may need to make some changes
further up the code because we no longer use DX through DD in 8.1
and the V code did that a lot (to go fullscreen and such check out
the device creation code)
2002-08-31 04:50 unknownplayer
* code/: code.dsp (1.6.2.3), graphics/2d.cpp (2.3.2.1),
graphics/directx8/GrD3D81.cpp (1.2.2.1),
graphics/directx8/GrD3D81.h (1.1.2.1):
Removed some older DX81 stuff I added before and changed some other
things. I'm currently thinking that I'm going to run with putting
everything into a specialized class with the d3d_init and
d3d_cleanup functions as gods. (Creation / Destruction functions -
i.e. gods :)
2002-08-31 04:48 unknownplayer
* code/graphics/directx8/grd3d81internal.h (1.2.2.1):
These are all officially now out of FS2 unless you have a specific
reason to need them. I'm running with the idea that we make a C++
class and use that as an effective way to control the code.
Rewriting V's stuff is just insanely difficult.
2002-08-28 21:47 randomtiger
* Freespace2.dsp (1.10), code/cutscene/cutscenes.cpp (2.2.2.3),
code/cutscene/movie.cpp (2.1.2.3):
Tiny change to DX branch to keep movie code optional (default off)
2002-08-28 12:39 randomtiger
* code/: code.dsp (1.6.2.2), cutscene/cutscenes.cpp (2.2.2.2),
cutscene/movie.cpp (2.1.2.2), debugconsole/dbugfile.cpp (2.1.2.1),
debugconsole/dbugfile.h (2.1.2.1), directx/dx8show.cpp (1.1.2.2),
directx/dx8show.h (1.1.2.2), freespace2/freespace.cpp (2.6.2.2),
menuui/mainhallmenu.cpp (2.3.2.2), mission/missioncampaign.cpp
(2.3.2.2), osapi/osapi.cpp (2.2.2.1), osapi/osapi.h (2.2.2.1):
OK, this should be a commit to the DX branch or Im going to be in a
lot of trouble. The movie and dx8show files have been cleaned up
big time. My debug system is in but has NO EFFECT at all unless a
compiler flag is turned on, check h file for details. Aside from
that a few changes to help the movie code work properly. Works on
most things including GF4 and Voodoo 3. However may not work
properly on a voodoo 2. Im going to leave this as a bug for now,
serves you right for buying voodoo!
2002-08-28 10:51 randomtiger
* code/: code.dsp (1.9), debugconsole/dbugfile.cpp (2.1),
debugconsole/dbugfile.h (2.1), freespace2/freespace.cpp (2.9):
Woh! I sure as hell didnt modify all these files it says I did. I
will put this down to the branch! Note: I did start from a fresh
checkout!
2002-08-27 13:38 penguin
* Freespace2.dsp (1.9), code/code.dsp (1.8),
code/cmdline/cmdline.cpp (2.6), code/cmdline/cmdline.h (2.5),
code/cutscene/cutscenes.cpp (2.4), code/cutscene/movie.cpp (2.2),
code/cutscene/movie.h (2.2), code/directx/DShow.h (1.2),
code/directx/ddraw.lib (1.2), code/directx/dx8show.cpp (1.2),
code/directx/dx8show.h (1.2), code/directx/dxguid.lib (1.2),
code/directx/strmiids.lib (1.2), code/freespace2/freespace.cpp
(2.8), code/menuui/mainhallmenu.cpp (2.5),
code/mission/missioncampaign.cpp (2.5):
Moved DirectX8 stuff to directx8 branch; reverted to previous
2002-08-27 13:25 penguin
* code/directx/: DShow.h (1.1.2.1), ddraw.lib (1.1.2.1),
dx8show.cpp (1.1.2.1), dx8show.h (1.1.2.1), dxguid.lib (1.1.2.1),
strmiids.lib (1.1.2.1):
Moved to directx8 branch
2002-08-27 13:21 penguin
* code/: freespace2/freespace.cpp (2.6.2.1),
menuui/mainhallmenu.cpp (2.3.2.1), mission/missioncampaign.cpp
(2.3.2.1), code.dsp (1.6.2.1), cmdline/cmdline.cpp (2.4.2.1),
cmdline/cmdline.h (2.3.2.1), cutscene/cutscenes.cpp (2.2.2.1),
cutscene/movie.cpp (2.1.2.1), cutscene/movie.h (2.1.2.1),
Freespace2.dsp (1.7.2.1):
Moved to directx8 branch
2002-08-18 19:48 randomtiger
* Freespace2.dsp (1.8), code/code.dsp (1.7),
code/cmdline/cmdline.cpp (2.5), code/cmdline/cmdline.h (2.4),
code/cutscene/cutscenes.cpp (2.3), code/cutscene/movie.cpp (2.1),
code/cutscene/movie.h (2.1), code/directx/DShow.h (1.1),
code/directx/ddraw.lib (1.1), code/directx/dx8show.cpp (1.1),
code/directx/dx8show.h (1.1), code/directx/dxguid.lib (1.1),
code/directx/strmiids.lib (1.1), code/freespace2/freespace.cpp
(2.7), code/menuui/mainhallmenu.cpp (2.4),
code/mission/missioncampaign.cpp (2.4):
Added new lib files: strmiids and ddraw to get dshow working Added
new command line parameter to active direct show movie play:
-dshowvid Uncommented movie_play calls and includes
2002-08-15 04:41 penguin
* code/globalincs/systemvars.h (2.1):
Added #include, needed for FRED
2002-08-13 03:40 penguin
Binary file not shown.
+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=
+24 -11
View File
@@ -43,17 +43,26 @@ 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 /W4 /GX /Zi /Ot /Ow /Og /Oi /Oy /I "code" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "WIN32" /U "_DEBUG" /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 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.exe" /libpath:"release"
# 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
SOURCE="$(InputPath)"
"d:\games\freespace2\fs2_open_r.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) d:\games\freespace2\fs2_open_r.exe
# End Custom Build
!ELSEIF "$(CFG)" == "Freespace2 - Win32 Debug"
@@ -69,24 +78,24 @@ LINK32=link.exe
# 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" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "NO_CD_CHECK" /D "USE_DX81" /U "NDEBUG" /Fr /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" /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 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:"Debug/fs2_open.exe" /libpath:"debug"
# SUBTRACT LINK32 /pdb:none /incremental:no /map
# Begin Custom Build - Copying $(InputPath) to c:\games\freespace2
InputPath=.\Debug\fs2_open.exe
# 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)"
"c:\games\freespace2\fs2_open.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) c:\games\freespace2
"d:\games\freespace2\fs2_open_d.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) d:\games\freespace2\fs2_open_d.exe
# End Custom Build
@@ -138,6 +147,10 @@ SOURCE=.\code\freespace2\goal_ord.bmp
# End Source File
# Begin Source File
SOURCE=.\code\graphics\grstub.h
# End Source File
# Begin Source File
SOURCE=.\code\FREESPACE2\LevelPaging.cpp
# End Source File
# Begin Source File
+44 -44
View File
@@ -1,44 +1,44 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Freespace2"=".\Freespace2.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name code
End Project Dependency
}}}
###############################################################################
Project: "code"=".\code\code.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Freespace2"=".\Freespace2.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name code
End Project Dependency
}}}
###############################################################################
Project: "code"=".\code\code.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
+27
View File
@@ -0,0 +1,27 @@
This is still in pretty rough form.
=== for people building fs2_open:
Win32-MSVC:
Use the Freespace2.dsw workspace and build within the IDE.
Win32-MinGW:
make
Linux and other unix variants (NOT YET COMPLETE)
./configure [options] (options tbd)
make -f makefile.linux
=== for the project maintainers (people who need to
=== keep the makefiles up to date):
aclocal
autoconf
automake
./configure
make
+5
View File
@@ -0,0 +1,5 @@
# Makefile.am for fs2_open (top level)
#
# This file uses GNU Automake to generate makefiles
SUBDIRS = code
+3
View File
@@ -0,0 +1,3 @@
This file is required to keep autoconf/automake from complaining.
See the ChangeLog for what's new.
+3 -80
View File
@@ -1,81 +1,4 @@
README for fs2_open, Release 0.1
WARNINGS:
========
This is very much an pre-alpha build. Don't expect too much from it!
In particular, do not run this in the same directory as existing pilot
files or anything else that you don't want to get destroyed...
I have tried to modify as little code as possible to keep the existing
Windows code from breaking, but I have not verified that this code
will still work on Windows. Some changes may be necessary.
There are occasional crashes and segfaults from time to time.
All of this was tested on my system only. I don't know if any
assumptions about my hardware have crept into the code. I guess it
goes without saying that this will only work on x86-based Linux
systems :-)
STATUS:
=======
Most 2D graphics appear to be working, although very slowly.
Improving the performance of the 2D graphic system is a high priority.
3D graphics are in a very primitive state right now. No texturing is
done, so all objects (ships, lasers, explosions, etc.) look "ghostly."
Nebula missions do not work at all.
Sound, joystick, and network are all disabled.
REQUIREMENTS:
=============
The only "non-standard" package that you will need (as far as I can
tell) is the SDL library, available at http://www.libsdl.org I think
SDL requires XFree86 release 4 or higher.
INSTALLING:
===========
There is no configure script, no options, etc. -- just a Makefile. It
is likely that you will need to adjust it to match your configuration,
in particular the location of the SDL files.
If everything is right, you should be able to run 'make' from the
fs2_open/code directory and create an 'fs2' executable.
RUNNING:
========
The fs2 executable should be copied (or symlinked) to the same
directory as the *.VP files. All the *.VP files that you need should
be here -- the code isn't smart enough to look in your CD for command
brief ANIs, etc.
It only runs in windowed mode, no full screen.
I have never run it in high-resolution mode (1024x768), so all bets
are off if you try it.
There seems to be a bug in some of the 'glob' routines that scan for
files in the 'data' directory, so you will have better results if you:
1. Keep everything in the *.VP file (i.e., no mods)
2. Only have one player file
I recommend that background graphics be turned off via the "Options"
screen or it will look very odd. Your in-game framerate will be
significantly higher if you turn off (or set to 'popup') as many HUD
gauges as possible.
Due to the painful slowness of the 2D UI, you might need to hold the
mouse button down a little longer to get buttons to activate.
===
Mike Harris (HLP penguin)
02 June 2002
This file is required to keep autoconf/automake from complaining.
See the ChangeLog to see what's new.
See the INSTALL file for instructions on how to build fs2_open.
+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
-700
View File
@@ -1,700 +0,0 @@
TARGET = fs2
ifeq ($(USE_SOUND), 1)
SOUND_DEF=
SOUND_OBJS= \
gamesnd/eventmusic.o \
gamesnd/gamesnd.o \
object/objectsnd.o \
sound/acm.o \
sound/audiostr.o \
sound/ds.o \
sound/ds3d.o \
sound/dscap.o \
sound/midifile.o \
sound/rbaudio.o \
sound/rtvoice.o \
sound/sound.o \
sound/winmidi.o \
sound/winmidi_base.o \
vcodec/codec1.o
else
SOUND_DEF=-DNO_SOUND
SOUND_OBJS=
endif # USE_SOUND
ifeq ($(USE_JOYSTICK), 1)
JOYSTICK_DEF=
JOYSTICK_OBJS= \
io/joy.o \
io/joy_ff.o \
io/swff_lib.o
else
JOYSTICK_DEF=-DNO_JOYSTICK
JOYSTICK_OBJS=
endif # USE_JOYSTICK
ifeq ($(USE_NETWORK), 1)
# no support for standalone server yet... (UI is Win32 specific)
NETWORK_DEF=-DNO_STANDALONE
NETWORK_OBJS= \
hud/hudobserver.o \
network/multi.o \
network/multimsgs.o \
network/multiteamselect.o \
network/multiui.o \
network/multiutil.o \
network/multi_campaign.o \
network/multi_data.o \
network/multi_dogfight.o \
network/multi_endgame.o \
network/multi_ingame.o \
network/multi_kick.o \
network/multi_log.o \
network/multi_obj.o \
network/multi_observer.o \
network/multi_options.o \
network/multi_pause.o \
network/multi_pinfo.o \
network/multi_ping.o \
network/multi_pmsg.o \
network/multi_rate.o \
network/multi_respawn.o \
network/multi_team.o \
network/multi_voice.o \
network/multi_xfer.o \
network/psnet.o \
network/psnet2.o \
menuui/optionsmenumulti.o \
missionui/chatbox.o
#
# Network/stand_gui.o
#
else
NETWORK_DEF=-DNO_NETWORK -DNO_STANDALONE
NETWORK_OBJS=
endif # USE_NETWORK
ifeq ($(USE_OPENGL), 0)
OPENGL_DEF=
else
OPENGL_DEF=-DUSE_OPENGL
endif # USE_OPENGL
LDFLAGS = -g
LDLIBS = -L/usr/X11R6/lib -lSDL -lGL -lGLU -lpthread
CXXFLAGS = \
-g \
-I/usr/local/include/SDL \
-I. \
-fno-exceptions \
-D_DEBUG -DNO_CD_CHECK -UNDEBUG \
-DNO_DIRECT3D $(SOUND_DEF) $(JOYSTICK_DEF) $(NETWORK_DEF) $(OPENGL_DEF)
ANIM_OBJFILES = \
anim/animplay.o \
anim/packunpack.o
ASTEROID_OBJFILES = \
asteroid/asteroid.o
BMPMAN_OBJFILES = \
bmpman/bmpman.o
CFILE_OBJFILES = \
cfile/cfile.o \
cfile/cfilearchive.o \
cfile/cfilelist.o \
cfile/cfilesystem.o
CMDLINE_OBJFILES = \
cmdline/cmdline.o
CMEASURE_OBJFILES = \
cmeasure/cmeasure.o
CONTROLCONFIG_OBJFILES = \
controlconfig/controlsconfig.o \
controlconfig/controlsconfigcommon.o
CUTSCENE_OBJFILES = \
cutscene/cutscenes.o
DEBRIS_OBJFILES = \
debris/debris.o
DEBUGCONSOLE_OBJFILES = \
debugconsole/console.o
DEMO_OBJFILES = \
demo/demo.o
EXCEPTIONHANDLER_OBJFILES = \
exceptionhandler/exceptionhandler.o
FIREBALL_OBJFILES = \
fireball/fireballs.o \
fireball/warpineffect.o
GAMEHELP_OBJFILES = \
gamehelp/contexthelp.o \
gamehelp/gameplayhelp.o
GAMESEQUENCE_OBJFILES = \
gamesequence/gamesequence.o
# gamesnd/eventmusic.o
# gamesnd/gamesnd.o
GAMESND_OBJFILES =
# glide/glide.o
GLIDE_OBJFILES =
# globalincs/windebug.o
GLOBALINCS_OBJFILES = \
globalincs/alphacolors.o \
globalincs/crypt.o \
globalincs/systemvars.o \
globalincs/version.o
# graphics/grd3d.o
# graphics/grd3drender.o
# graphics/grd3dtexture.o
# graphics/grdirectdraw.o
# graphics/grglide.o
# graphics/grglidetexture.o
# graphics/grsoft.o
# graphics/scaler.o
# graphics/tmapgenericscans.o
# graphics/tmapscantiled128x128.o
# graphics/tmapscantiled16x16.o
# graphics/tmapscantiled256x256.o
# graphics/tmapscantiled32x32.o
# graphics/tmapscantiled64x64.o
# graphics/tmapscanline.o
# graphics/tmapper.o
GRAPHICS_OBJFILES = \
graphics/2d.o \
graphics/aaline.o \
graphics/bitblt.o \
graphics/circle.o \
graphics/colors.o \
graphics/font.o \
graphics/gradient.o \
graphics/gropengl.o \
graphics/grzbuffer.o \
graphics/line.o \
graphics/pixel.o \
graphics/rect.o \
graphics/shade.o
# hud/hudobserver.o
HUD_OBJFILES = \
hud/hud.o \
hud/hudartillery.o \
hud/hudbrackets.o \
hud/hudconfig.o \
hud/hudescort.o \
hud/hudets.o \
hud/hudlock.o \
hud/hudmessage.o \
hud/hudreticle.o \
hud/hudshield.o \
hud/hudsquadmsg.o \
hud/hudtarget.o \
hud/hudtargetbox.o \
hud/hudwingmanstatus.o
INETFILE_OBJFILES = \
inetfile/cftp.o \
inetfile/chttpget.o \
inetfile/inetgetfile.o
# io/joy.o
# io/joy_ff.o
# io/swff_lib.o
IO_OBJFILES = \
io/key.o \
io/keycontrol.o \
io/mouse.o \
io/timer.o \
io/xmouse.o
JUMPNODE_OBJFILES = \
jumpnode/jumpnode.o
LIGHTING_OBJFILES = \
lighting/lighting.o
LOCALIZATION_OBJFILES = \
localization/fhash.o \
localization/localize.o
MATH_OBJFILES = \
math/fix.o \
math/floating.o \
math/fvi.o \
math/spline.o \
math/staticrand.o \
math/vecmat.o
# menuui/optionsmenumulti.o
MENUUI_OBJFILES = \
menuui/barracks.o \
menuui/credits.o \
menuui/fishtank.o \
menuui/mainhallmenu.o \
menuui/mainhalltemp.o \
menuui/optionsmenu.o \
menuui/playermenu.o \
menuui/readyroom.o \
menuui/snazzyui.o \
menuui/techmenu.o \
menuui/trainingmenu.o
MISSION_OBJFILES = \
mission/missionbriefcommon.o \
mission/missioncampaign.o \
mission/missiongoals.o \
mission/missiongrid.o \
mission/missionhotkey.o \
mission/missionload.o \
mission/missionlog.o \
mission/missionmessage.o \
mission/missionparse.o \
mission/missiontraining.o
# missionui/chatbox.o
MISSIONUI_OBJFILES = \
missionui/missionbrief.o \
missionui/missioncmdbrief.o \
missionui/missiondebrief.o \
missionui/missionloopbrief.o \
missionui/missionpause.o \
missionui/missionrecommend.o \
missionui/missionscreencommon.o \
missionui/missionshipchoice.o \
missionui/missionstats.o \
missionui/missionweaponchoice.o \
missionui/redalert.o
MODEL_OBJFILES = \
model/modelcollide.o \
model/modelinterp.o \
model/modeloctant.o \
model/modelread.o
NEBULA_OBJFILES = \
nebula/neb.o \
nebula/neblightning.o
# network/multi.o
# network/multi_campaign.o
# network/multi_data.o
# network/multi_dogfight.o
# network/multi_endgame.o
# network/multi_ingame.o
# network/multi_kick.o
# network/multi_log.o
# network/multimsgs.o
# network/multi_obj.o
# network/multi_observer.o
# network/multi_oo.o
# network/multi_options.o
# network/multi_pause.o
# network/multi_pinfo.o
# network/multi_ping.o
# network/multi_pmsg.o
# network/multi_rate.o
# network/multi_respawn.o
# network/multi_team.o
# network/multi_update.o
# network/multi_voice.o
# network/multi_xfer.o
# network/multilag.o
# network/multiteamselect.o
# network/multiui.o
# network/psnet.o
# network/psnet2.o
# network/stand_gui.o
NETWORK_OBJFILES = \
network/multiutil.o
# object/objectsnd.o
OBJECT_OBJFILES = \
object/collidedebrisship.o \
object/collidedebrisweapon.o \
object/collideshipship.o \
object/collideshipweapon.o \
object/collideweaponweapon.o \
object/objcollide.o \
object/object.o \
object/objectsort.o
OBSERVER_OBJFILES = \
observer/observer.o
OSAPI_OBJFILES = \
osapi/osapi_unix.o \
osapi/osregistry_unix.o \
osapi/outwnd_unix.o
PALMAN_OBJFILES = \
palman/palman.o
PARSE_OBJFILES = \
parse/encrypt.o \
parse/parselo.o \
parse/sexp.o
PARTICLE_OBJFILES = \
particle/particle.o
PCXUTILS_OBJFILES = \
pcxutils/pcxutils.o
PHYSICS_OBJFILES = \
physics/physics.o
PLAYERMAN_OBJFILES = \
playerman/managepilot.o \
playerman/playercontrol.o
POPUP_OBJFILES = \
popup/popup.o \
popup/popupdead.o
RADAR_OBJFILES = \
radar/radar.o
RENDER_OBJFILES = \
render/3dclipper.o \
render/3ddraw.o \
render/3dlaser.o \
render/3dmath.o \
render/3dsetup.o
SHIP_OBJFILES = \
ship/afterburner.o \
ship/ai.o \
ship/aibig.o \
ship/aicode.o \
ship/aigoals.o \
ship/awacs.o \
ship/shield.o \
ship/ship.o \
ship/shipcontrails.o \
ship/shipfx.o \
ship/shiphit.o
SOUND_OBJFILES = \
sound/acm.o \
sound/audiostr.o \
sound/ds.o \
sound/ds3d.o \
sound/dscap.o \
sound/midifile.o \
sound/rbaudio.o \
sound/rtvoice.o \
sound/sound.o \
sound/winmidi.o \
sound/winmidi_base.o
STARFIELD_OBJFILES = \
starfield/nebula.o \
starfield/starfield.o \
starfield/supernova.o
STATS_OBJFILES = \
stats/medals.o \
stats/scoring.o \
stats/stats.o
TGAUTILS_OBJFILES = \
tgautils/tgautils.o
UI_OBJFILES = \
ui/button.o \
ui/checkbox.o \
ui/gadget.o \
ui/icon.o \
ui/inputbox.o \
ui/keytrap.o \
ui/listbox.o \
ui/radio.o \
ui/scroll.o \
ui/slider.o \
ui/slider2.o \
ui/uidraw.o \
ui/uimouse.o \
ui/window.o
VCODEC_OBJFILES = \
vcodec/codec1.o
WEAPON_OBJFILES = \
weapon/beam.o \
weapon/corkscrew.o \
weapon/emp.o \
weapon/flak.o \
weapon/muzzleflash.o \
weapon/shockwave.o \
weapon/swarm.o \
weapon/trails.o \
weapon/weapons.o
# SOUND_OBJFILES
# INETFILE_OBJFILES
# EXCEPTIONHANDLER_OBJFILES
OBJFILES = \
ANIM_OBJFILES \
ASTEROID_OBJFILES \
BMPMAN_OBJFILES \
CFILE_OBJFILES \
CMDLINE_OBJFILES \
CMEASURE_OBJFILES \
CONTROLCONFIG_OBJFILES \
CUTSCENE_OBJFILES \
DEBRIS_OBJFILES \
DEBUGCONSOLE_OBJFILES \
FIREBALL_OBJFILES \
GAMEHELP_OBJFILES \
GAMESEQUENCE_OBJFILES \
GAMESND_OBJFILES \
GLIDE_OBJFILES \
GLOBALINCS_OBJFILES \
GRAPHICS_OBJFILES \
HUD_OBJFILES \
IO_OBJFILES \
JUMPNODE_OBJFILES \
LIGHTING_OBJFILES \
MATH_OBJFILES \
MENUUI_OBJFILES \
MISSION_OBJFILES \
MISSIONUI_OBJFILES \
MODEL_OBJFILES \
NETWORK_OBJFILES \
OBJECT_OBJFILES \
OBSERVER_OBJFILES \
OSAPI_OBJFILES \
PALMAN_OBJFILES \
PARSE_OBJFILES \
PARTICLE_OBJFILES \
PCXUTILS_OBJFILES \
PHYSICS_OBJFILES \
PLAYERMAN_OBJFILES \
POPUP_OBJFILES \
RADAR_OBJFILES \
RENDER_OBJFILES \
SHIP_OBJFILES \
STARFIELD_OBJFILES \
STATS_OBJFILES \
UI_OBJFILES \
VCODEC_OBJFILES \
WEAPON_OBJFILES \
NEBULA_OBJFILES \
LOCALIZATION_OBJFILES \
TGAUTILS_OBJFILES \
DEMO_OBJFILES
# SOUND_OBJFILES
# INETFILE_OBJFILES
# EXCEPTIONHANDLER_OBJFILES
LIB_OBJFILES = \
$(ANIM_OBJFILES) \
$(ASTEROID_OBJFILES) \
$(BMPMAN_OBJFILES) \
$(CFILE_OBJFILES) \
$(CMDLINE_OBJFILES) \
$(CMEASURE_OBJFILES) \
$(CONTROLCONFIG_OBJFILES) \
$(CUTSCENE_OBJFILES) \
$(DEBRIS_OBJFILES) \
$(DEBUGCONSOLE_OBJFILES) \
$(FIREBALL_OBJFILES) \
$(GAMEHELP_OBJFILES) \
$(GAMESEQUENCE_OBJFILES) \
$(GAMESND_OBJFILES) \
$(GLIDE_OBJFILES) \
$(GLOBALINCS_OBJFILES) \
$(GRAPHICS_OBJFILES) \
$(HUD_OBJFILES) \
$(IO_OBJFILES) \
$(JUMPNODE_OBJFILES) \
$(LIGHTING_OBJFILES) \
$(MATH_OBJFILES) \
$(MENUUI_OBJFILES) \
$(MISSION_OBJFILES) \
$(MISSIONUI_OBJFILES) \
$(MODEL_OBJFILES) \
$(NETWORK_OBJFILES) \
$(OBJECT_OBJFILES) \
$(OBSERVER_OBJFILES) \
$(OSAPI_OBJFILES) \
$(PALMAN_OBJFILES) \
$(PARSE_OBJFILES) \
$(PARTICLE_OBJFILES) \
$(PCXUTILS_OBJFILES) \
$(PHYSICS_OBJFILES) \
$(PLAYERMAN_OBJFILES) \
$(POPUP_OBJFILES) \
$(RADAR_OBJFILES) \
$(RENDER_OBJFILES) \
$(SHIP_OBJFILES) \
$(STARFIELD_OBJFILES) \
$(STATS_OBJFILES) \
$(UI_OBJFILES) \
$(VCODEC_OBJFILES) \
$(WEAPON_OBJFILES) \
$(NEBULA_OBJFILES) \
$(LOCALIZATION_OBJFILES) \
$(TGAUTILS_OBJFILES) \
$(DEMO_OBJFILES) \
$(SOUND_OBJS) \
$(JOYSTICK_OBJS) \
$(NETWORK_OBJS)
FREESPACE2_OBJFILES = \
freespace2/freespace.o \
freespace2/levelpaging.o
STUB_OBJFILES = \
windows_stub/stubs.o
# ==============================
.PHONY: all clean code \
ANIM_OBJFILES \
ASTEROID_OBJFILES \
BMPMAN_OBJFILES \
CMDLINE_OBJFILES \
CMEASURE_OBJFILES \
CONTROLCONFIG_OBJFILES \
CUTSCENE_OBJFILES \
DEBRIS_OBJFILES \
DEBUGCONSOLE_OBJFILES \
FIREBALL_OBJFILES \
GAMEHELP_OBJFILES \
GAMESEQUENCE_OBJFILES \
GAMESND_OBJFILES \
GLIDE_OBJFILES \
GLOBALINCS_OBJFILES \
GRAPHICS_OBJFILES \
HUD_OBJFILES \
IO_OBJFILES \
JUMPNODE_OBJFILES \
LIGHTING_OBJFILES \
MATH_OBJFILES \
MENUUI_OBJFILES \
MISSION_OBJFILES \
MISSIONUI_OBJFILES \
MODEL_OBJFILES \
OBJECT_OBJFILES \
OBSERVER_OBJFILES \
OSAPI_OBJFILES \
PALMAN_OBJFILES \
PARSE_OBJFILES \
PARTICLE_OBJFILES \
PCXUTILS_OBJFILES \
PHYSICS_OBJFILES \
PLAYERMAN_OBJFILES \
POPUP_OBJFILES \
RADAR_OBJFILES \
RENDER_OBJFILES \
SHIP_OBJFILES \
SOUND_OBJFILES \
STARFIELD_OBJFILES \
STATS_OBJFILES \
UI_OBJFILES \
VCODEC_OBJFILES \
WEAPON_OBJFILES \
NEBULA_OBJFILES \
LOCALIZATION_OBJFILES \
TGAUTILS_OBJFILES \
DEMO_OBJFILES \
INETFILE_OBJFILES \
EXCEPTIONHANDLER_OBJFILES \
NETWORK_OBJFILES
.cpp.o:
$(CXX) $(CXXFLAGS) -c -o $@ $<
all: $(TARGET)
clean:
rm -f $(TARGET) libcode.a core *.o *~
find -name *.o -exec rm {} \;
find -name *~ -exec rm {} \;
code: libcode.a
# ==============================
libcode.a: $(LIB_OBJFILES)
$(AR) -r $@ $(LIB_OBJFILES)
# $(CXX) -o $@ $(LIB_OBJFILES)
fs2: libcode.a $(FREESPACE2_OBJFILES) $(STUB_OBJFILES)
$(CXX) $(LDFLAGS) -o $@ $(FREESPACE2_OBJFILES) $(STUB_OBJFILES) $(LDLIBS) -L. -lcode
# exceptions to the rule...
freespace2/freespace.o: freespace2/freespace.cpp
$(CXX) $(CXXFLAGS) -fexceptions -c -o $@ $<
ANIM_OBJFILES: $(ANIM_OBJFILES)
ASTEROID_OBJFILES: $(ASTEROID_OBJFILES)
BMPMAN_OBJFILES: $(BMPMAN_OBJFILES)
CMDLINE_OBJFILES: $(CMDLINE_OBJFILES)
CMEASURE_OBJFILES: $(CMEASURE_OBJFILES)
CONTROLCONFIG_OBJFILES: $(CONTROLCONFIG_OBJFILES)
CUTSCENE_OBJFILES: $(CUTSCENE_OBJFILES)
DEBRIS_OBJFILES: $(DEBRIS_OBJFILES)
DEBUGCONSOLE_OBJFILES: $(DEBUGCONSOLE_OBJFILES)
FIREBALL_OBJFILES: $(FIREBALL_OBJFILES)
GAMEHELP_OBJFILES: $(GAMEHELP_OBJFILES)
GAMESEQUENCE_OBJFILES: $(GAMESEQUENCE_OBJFILES)
GAMESND_OBJFILES: $(GAMESND_OBJFILES)
GLIDE_OBJFILES: $(GLIDE_OBJFILES)
GLOBALINCS_OBJFILES: $(GLOBALINCS_OBJFILES)
GRAPHICS_OBJFILES: $(GRAPHICS_OBJFILES)
HUD_OBJFILES: $(HUD_OBJFILES)
IO_OBJFILES: $(IO_OBJFILES)
JUMPNODE_OBJFILES: $(JUMPNODE_OBJFILES)
LIGHTING_OBJFILES: $(LIGHTING_OBJFILES)
MATH_OBJFILES: $(MATH_OBJFILES)
MENUUI_OBJFILES: $(MENUUI_OBJFILES)
MISSION_OBJFILES: $(MISSION_OBJFILES)
MISSIONUI_OBJFILES: $(MISSIONUI_OBJFILES)
MODEL_OBJFILES: $(MODEL_OBJFILES)
OBJECT_OBJFILES: $(OBJECT_OBJFILES)
OBSERVER_OBJFILES: $(OBSERVER_OBJFILES)
OSAPI_OBJFILES: $(OSAPI_OBJFILES)
PALMAN_OBJFILES: $(PALMAN_OBJFILES)
PARSE_OBJFILES: $(PARSE_OBJFILES)
PARTICLE_OBJFILES: $(PARTICLE_OBJFILES)
PCXUTILS_OBJFILES: $(PCXUTILS_OBJFILES)
PHYSICS_OBJFILES: $(PHYSICS_OBJFILES)
PLAYERMAN_OBJFILES: $(PLAYERMAN_OBJFILES)
POPUP_OBJFILES: $(POPUP_OBJFILES)
RADAR_OBJFILES: $(RADAR_OBJFILES)
RENDER_OBJFILES: $(RENDER_OBJFILES)
SHIP_OBJFILES: $(SHIP_OBJFILES)
SOUND_OBJFILES: $(SOUND_OBJFILES)
STARFIELD_OBJFILES: $(STARFIELD_OBJFILES)
STATS_OBJFILES: $(STATS_OBJFILES)
UI_OBJFILES: $(UI_OBJFILES)
VCODEC_OBJFILES: $(VCODEC_OBJFILES)
WEAPON_OBJFILES: $(WEAPON_OBJFILES)
NEBULA_OBJFILES: $(NEBULA_OBJFILES)
LOCALIZATION_OBJFILES: $(LOCALIZATION_OBJFILES)
TGAUTILS_OBJFILES: $(TGAUTILS_OBJFILES)
DEMO_OBJFILES: $(DEMO_OBJFILES)
INETFILE_OBJFILES: $(INETFILE_OBJFILES)
EXCEPTIONHANDLER_OBJFILES: $(EXCEPTIONHANDLER_OBJFILES)
NETWORK_OBJFILES: $(NETWORK_OBJFILES)
+374
View File
@@ -0,0 +1,374 @@
# code/Makefile.am for fs2_open
#
# $Id: Makefile.am,v 1.3 2004-05-24 04:10:03 taylor Exp $
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
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
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
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
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
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
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
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
#if FS2_SPEECH
#LDADD += \
# -lFestival -lestools -lestbase -leststring -lncurses
#endif
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
endif
if FS2_OS_UNIX
## 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
+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_
+96 -15
View File
@@ -9,13 +9,86 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
* 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 2.6 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:
* Removal of many files from project.
* Removal of meanless Gr_bitmap_poly variable.
* Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
* Removal of redundant Fred paths that arent needed for Fred OGL.
* Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
* Fixed many D3D non standard mode bugs and brought OGL up to the same level.
* Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
*
* Revision 2.5 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.4 2003/11/29 10:52:08 randomtiger
* Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit.
* Added stats command for ingame stats on memory usage.
* Trys to play intro.mve and intro.avi, just to be safe since its not set by table.
* Added fix for fonts wrapping round in non standard hi res modes.
* Changed D3D mipmapping to a good value to suit htl mode.
* Added new fog colour method which makes use of the bitmap, making this htl feature backcompatible again.
*
* Revision 2.3 2003/11/11 02:15:41 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
* --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.
*
* Revision 2.1.2.3 2002/11/04 21:24:59 randomtiger
*
* When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates.
* Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory.
* Cleaned up some more texture stuff enabled console debug for D3D.
*
* Revision 2.1.2.2 2002/09/28 22:13:42 randomtiger
* Sorted out some bits and pieces. The background nebula blends now which is nice. – RT
*
* Revision 2.1.2.1 2002/09/24 18:56:40 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -66,7 +139,7 @@
* 34 4/27/98 3:36p Dave
*
* 33 3/25/98 8:43p Hoffoss
* Changed anim_play() to not be so damn complex when you try and call it.
* Changed anim_play() to not be so complex when you try and call it.
*
* 32 2/05/98 9:21p John
* Some new Direct3D code. Added code to monitor a ton of stuff in the
@@ -187,10 +260,12 @@
#include "bmpman/bmpman.h"
#include "graphics/2d.h"
#include "render/3d.h"
#include "graphics/grinternal.h"
#include "pcxutils/pcxutils.h"
#include "anim/packunpack.h"
#include "cfile/cfile.h"
#include "cmdline/cmdline.h"
static color Color_xparent;
@@ -448,6 +523,7 @@ anim_instance *anim_play(anim_play_struct *aps)
// input: instance => pointer to animation instance
// frametime => time elapsed since last call, in seconds
//
int anim_show_next_frame(anim_instance *instance, float frametime)
{
int bitmap_id, bitmap_flags=0, new_frame_num, frame_diff=0, i, n_frames=0,frame_save;
@@ -465,6 +541,7 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
n_frames = instance->stop_at - instance->start_at + 1;
else if(instance->direction == ANIM_DIRECT_REVERSE)
n_frames = instance->start_at - instance->stop_at + 1;
time = n_frames / i2fl(instance->parent->fps);
percent_through = instance->time_elapsed / time;
@@ -612,9 +689,7 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
int temp_file_offset = 0;
// if we're using bitmap polys
if(Gr_bitmap_poly){
BM_SELECT_TEX_FORMAT();
}
BM_SELECT_TEX_FORMAT();
if ( anim_instance_is_streamed(instance) ) {
if ( instance->xlate_pal ){
@@ -693,9 +768,9 @@ int anim_show_next_frame(anim_instance *instance, float frametime)
else {
g3_rotate_vertex(&image_vertex,instance->world_pos);
Assert(instance->radius != 0.0f);
g3_draw_bitmap(&image_vertex, 0, instance->radius*1.5f, TMAP_FLAG_TEXTURED );
g3_draw_bitmap(&image_vertex, 0, instance->radius*1.5f, TMAP_FLAG_TEXTURED | TMAP_HTL_2D);
}
//bm_release(bitmap_id);
instance->last_bitmap = bitmap_id;
}
@@ -844,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);
@@ -891,7 +966,9 @@ anim *anim_load(char *real_filename, int file_mapped)
int count,idx;
char name[_MAX_PATH];
// file_mapped = 0;
if(Cmdline_cache_ani) {
file_mapped = PAGE_FROM_MEM;
}
Assert ( real_filename != NULL );
@@ -962,7 +1039,7 @@ anim *anim_load(char *real_filename, int file_mapped)
ptr->cfile_ptr = NULL;
if ( file_mapped ) {
if ( file_mapped == PAGE_FROM_MEM) {
// Try mapping the file to memory
ptr->flags |= ANF_MEM_MAPPED;
ptr->cfile_ptr = cfopen(name, "rb", CFILE_MEMORY_MAPPED);
@@ -1036,7 +1113,7 @@ int anim_free(anim *ptr)
}
if ( !list )
return -1;
return -2;
// only free when ref_count is 0
ptr->ref_count--;
@@ -1056,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;
+26 -5
View File
@@ -9,13 +9,26 @@
/*
* $Logfile: /Freespace2/code/Anim/AnimPlay.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -41,7 +54,7 @@
* 10 4/27/98 3:36p Dave
*
* 9 3/25/98 8:43p Hoffoss
* Changed anim_play() to not be so damn complex when you try and call it.
* Changed anim_play() to not be so complex when you try and call it.
*
* 8 12/24/97 8:57p Lawrance
* Added anim_ignore_next_frametime()
@@ -99,6 +112,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __ANIMPLAY_H__
#define __ANIMPLAY_H__
@@ -126,6 +140,13 @@ typedef struct {
int ping_pong;
} anim_play_struct;
enum
{
PAGE_FROM_MEM = 0,
PAGE_FROM_DISK = 1,
PAGE_FROM_DISK_FORCED = 2,
};
extern int Anim_paused;
void anim_init();
@@ -140,7 +161,7 @@ int anim_stop_playing(anim_instance* anim_instance);
int anim_show_next_frame(anim_instance *instance, float frametime);
void anim_release_all_instances(int screen_id = 0);
void anim_release_render_instance(anim_instance* instance);
anim *anim_load(char *name, int file_mapped = 0);
anim *anim_load(char *name, int file_mapped = PAGE_FROM_MEM);
int anim_free(anim *ptr);
int anim_playing(anim_instance *ai);
int anim_write_frames_out(char *filename);
+63 -12
View File
@@ -9,15 +9,59 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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:
* Removal of many files from project.
* Removal of meanless Gr_bitmap_poly variable.
* Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
* Removal of redundant Fred paths that arent needed for Fred OGL.
* Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
* Fixed many D3D non standard mode bugs and brought OGL up to the same level.
* Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
*
* Revision 2.3 2003/10/24 17:35:04 randomtiger
* Implemented support for 32bit TGA and JPG for D3D
* Also 32 bit PCX, but it still has some bugs to be worked out
* Moved convert_24_to_16 out of the bitmap pfunction structures and into packunpack.cpp because thats the only place that uses it.
*
* 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.
*
* Revision 2.1.2.1 2002/11/04 03:02:27 randomtiger
*
* I have made some fairly drastic changes to the bumpman system. Now functionality can be engine dependant.
* This is so D3D8 can call its own loading code that will allow good efficient loading and use of textures that it desparately needs without
* turning bumpman.cpp into a total hook infested nightmare. Note the new bumpman code is still relying on a few of the of the old functions and all of the old bumpman arrays.
*
* I have done this by adding to the gr_screen list of function pointers that are set up by the engines init functions.
* I have named the define calls the same name as the original 'bm_' functions so that I havent had to change names all through the code.
*
* Rolled back to an old version of bumpman and made a few changes.
* Added new files: grd3dbumpman.cpp and .h
* Moved the bitmap init function to after the 3D engine is initialised
* Added includes where needed
* Disabled (for now) the D3D8 TGA loading - RT
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -152,12 +196,13 @@
* $NoKeywords: $
*/
#include "graphics/grinternal.h"
#include "anim/packunpack.h"
#include "bmpman/bmpman.h"
#include "palman/palman.h"
#include "graphics/2d.h"
#include "anim/animplay.h"
#include "anim/packunpack.h"
int packer_code = PACKER_CODE;
int transparent_code = 254;
@@ -260,10 +305,7 @@ int anim_get_next_frame(anim_instance *inst)
anim_check_for_palette_change(inst);
// if we're using bitmap polys
if(Gr_bitmap_poly){
BM_SELECT_TEX_FORMAT();
}
BM_SELECT_TEX_FORMAT();
if ( anim_instance_is_streamed(inst) ) {
inst->file_offset = unpack_frame_from_file(inst, inst->frame, inst->parent->width*inst->parent->height, inst->parent->palette_translation, aabitmap, bpp);
@@ -775,6 +817,15 @@ int pack_frame(ubyte *frame, ubyte *frame2, ubyte *save, long size, long max, in
return packed_size;
}
// convert a 24 bit value to a 16 bit value
void convert_24_to_16(int bit_24, ushort *bit_16)
{
ubyte *pixel = (ubyte*)&bit_24;
ubyte alpha = 1;
bm_set_components((ubyte*)bit_16, (ubyte*)&pixel[0], (ubyte*)&pixel[1], (ubyte*)&pixel[2], &alpha);
}
// unpack a pixel given the passed index and the anim_instance's palette, return bytes stuffed
int unpack_pixel(anim_instance *ai, ubyte *data, ubyte pix, int aabitmap, int bpp)
{
@@ -809,7 +860,7 @@ int unpack_pixel(anim_instance *ai, ubyte *data, ubyte pix, int aabitmap, int bp
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
// convert to 16 bit
bm_24_to_16(bit_24, &bit_16);
convert_24_to_16(bit_24, &bit_16);
}
}
@@ -863,7 +914,7 @@ int unpack_pixel_count(anim_instance *ai, ubyte *data, ubyte pix, int count, int
memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
// convert to 16 bit
bm_24_to_16(bit_24, &bit_16);
convert_24_to_16(bit_24, &bit_16);
}
}
+13 -5
View File
@@ -9,15 +9,22 @@
/*
* $Logfile: /Freespace2/code/Anim/PackUnpack.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -151,6 +158,7 @@
#ifndef __PACKUNPACK_H__
#define __PACKUNPACK_H__
#include "PreProcDefines.h"
#include "globalincs/pstypes.h"
struct CFILE;
@@ -201,7 +209,7 @@ typedef struct anim {
int file_offset; // file offset to start of frame data
int cache_file_offset;
ubyte *cache;
} anim_t;
} anim;
// the direction to play the anim (forwards or backwards)
#define ANIM_DIRECT_FORWARD 0
@@ -233,7 +241,7 @@ typedef struct anim_instance {
int paused; // pause the anim
int file_offset; // current offset into frame (like data, put offset into file)
int loop_count; // starts at 0, and is incremented each time it loops
} anim_instance_t;
} anim_instance;
extern int packer_code;
+157 -23
View File
@@ -9,13 +9,49 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.5 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:
* Removal of many files from project.
* Removal of meanless Gr_bitmap_poly variable.
* Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
* Removal of redundant Fred paths that arent needed for Fred OGL.
* Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
* Fixed many D3D non standard mode bugs and brought OGL up to the same level.
* Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
*
* Revision 2.4 2003/11/17 06:52:51 bobboau
* got assert to work again
*
* Revision 2.3 2003/10/15 22:03:23 Kazan
* Da Species Update :D
*
* Revision 2.2 2003/04/29 01:03:22 Goober5000
* implemented the custom hitpoints mod
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -274,16 +310,22 @@
#include "render/3d.h"
#include "fireball/fireballs.h"
#include "gamesnd/gamesnd.h"
#include "bmpman/bmpman.h"
#include "particle/particle.h"
#include "globalincs/linklist.h"
#include "hud/hud.h"
#include "hud/hudescort.h"
#include "hud/hudgauges.h"
#include "ship/shiphit.h"
#include "math/staticrand.h"
#include "globalincs/systemvars.h"
#include "localization/localize.h"
#include "stats/scoring.h"
#include "hud/hudtarget.h"
#include "weapon/weapon.h"
#include "ship/ship.h"
#include "parse/parselo.h"
#include "math/vecmat.h"
#include "model/model.h"
#ifndef NO_NETWORK
#include "network/multiutil.h"
@@ -291,6 +333,8 @@
#include "network/multi.h"
#endif
#ifndef FS2_DEMO
#define ASTEROID_OBJ_USED (1<<0) // flag used in asteroid_obj struct
@@ -301,22 +345,47 @@ asteroid_obj Asteroid_obj_list; // head of linked list of asteroid_obj stru
// Asteroid editor requires first set of entries to be "None" and then "Asteroid XXX"
// Any changes to this will require changes to the asteroid editor
debris_struct Field_debris_info[] = {
-1, "None",
ASTEROID_TYPE_SMALL, "Asteroid Small",
-1, "None",
ASTEROID_TYPE_SMALL, "Asteroid Small",
ASTEROID_TYPE_MEDIUM, "Asteroid Medium",
ASTEROID_TYPE_BIG, "Asteroid Large",
DEBRIS_TERRAN_SMALL, "Terran Small",
DEBRIS_TERRAN_SMALL, "Terran Small",
DEBRIS_TERRAN_MEDIUM, "Terran Medium",
DEBRIS_TERRAN_LARGE, "Terran Large",
DEBRIS_TERRAN_LARGE, "Terran Large",
DEBRIS_VASUDAN_SMALL, "Vasudan Small",
DEBRIS_VASUDAN_MEDIUM, "Vasudan Medium",
DEBRIS_VASUDAN_LARGE, "Vasudan Large",
DEBRIS_SHIVAN_SMALL, "Shivan Small",
DEBRIS_SHIVAN_SMALL, "Shivan Small",
DEBRIS_SHIVAN_MEDIUM, "Shivan Medium",
DEBRIS_SHIVAN_LARGE, "Shivan Large"
#if !defined(MORE_SPECIES)
DEBRIS_SHIVAN_LARGE, "Shivan Large"
#else
DEBRIS_SHIVAN_LARGE, "Shivan Large",
DEBRIS_ANCIENT_SMALL, "Ancient Small",
DEBRIS_ANCIENT_MEDIUM, "Ancient Medium",
DEBRIS_ANCIENT_LARGE, "Ancient Large",
DEBRIS_USER1_SMALL, "User1 Small",
DEBRIS_USER1_MEDIUM, "User1 Medium",
DEBRIS_USER1_LARGE, "User1 Large",
DEBRIS_USER2_SMALL, "User2 Small",
DEBRIS_USER2_MEDIUM, "User2 Medium",
DEBRIS_USER2_LARGE, "User2 Large",
DEBRIS_USER3_SMALL, "User3 Small",
DEBRIS_USER3_MEDIUM, "User3 Medium",
DEBRIS_USER3_LARGE, "User3 Large",
DEBRIS_USER4_SMALL, "User4 Small",
DEBRIS_USER4_MEDIUM, "User4 Medium",
DEBRIS_USER4_LARGE, "User4 Large",
#endif
};
// used for randomly generating debris type when there are multiple sizes.
@@ -644,7 +713,7 @@ object *asteroid_create(asteroid_field *asfieldp, int asteroid_type, int asteroi
objp->phys_info.I_body_inv.vec.rvec.xyz.x = 1.0f / (objp->phys_info.mass*asip->modelp[asteroid_subtype]->rad);
objp->phys_info.I_body_inv.vec.uvec.xyz.y = objp->phys_info.I_body_inv.vec.rvec.xyz.x;
objp->phys_info.I_body_inv.vec.fvec.xyz.z = objp->phys_info.I_body_inv.vec.rvec.xyz.x;
objp->hull_strength = asip->initial_hull_strength * (0.8f + (float)Game_skill_level/NUM_SKILL_LEVELS)/2.0f;
objp->hull_strength = asip->initial_asteroid_strength * (0.8f + (float)Game_skill_level/NUM_SKILL_LEVELS)/2.0f;
// ensure vel is valid
Assert( !vm_is_vec_nan(&objp->phys_info.vel) );
@@ -745,6 +814,19 @@ int get_debris_from_same_group(int index) {
// the weight is then used to determine the frequencty of different sizes of ship debris
int get_debris_weight(int ship_debris_index)
{
#if defined(MORE_SPECIES)
if (ship_debris_index % 3 == 0)
return SMALL_DEBRIS_WEIGHT;
if (ship_debris_index % 3 == 1)
return MEDIUM_DEBRIS_WEIGHT;
if (ship_debris_index % 3 == 2)
return LARGE_DEBRIS_WEIGHT;
//Int3();
return 1;
#else
switch (ship_debris_index) {
case DEBRIS_TERRAN_SMALL:
case DEBRIS_VASUDAN_SMALL:
@@ -769,6 +851,7 @@ int get_debris_weight(int ship_debris_index)
return 1;
break;
}
#endif
}
// Create all the asteroids for the mission, called from
@@ -1153,7 +1236,7 @@ void asteroid_process_pre( object *objp, float frame_time)
}
#pragma warning ( push )
#pragma warning ( disable : 4701 )
#pragma warning ( disable : 4701 ) // possible use of variable without initialization
int asteroid_check_collision(object *pasteroid, object *other_obj, vector *hitpos, collision_info_struct *asteroid_hit_info)
{
if (!Asteroids_enabled) {
@@ -1498,6 +1581,18 @@ void asteriod_explode_sound(object *objp, int type, int play_loud)
int sound_index = -1;
float range_factor = 1.0f; // how many times sound should traver farther than normal
#if defined(MORE_SPECIES)
if (type % 3 <= 1)
{
sound_index = SND_ASTEROID_EXPLODE_SMALL;
range_factor = 5.0;
}
else
{
sound_index = SND_ASTEROID_EXPLODE_BIG;
range_factor = 10.0f;
}
#else
switch (type) {
case ASTEROID_TYPE_SMALL:
case ASTEROID_TYPE_MEDIUM:
@@ -1523,7 +1618,7 @@ void asteriod_explode_sound(object *objp, int type, int play_loud)
Int3();
return;
}
#endif
Assert(sound_index != -1);
if ( !play_loud ) {
@@ -1728,6 +1823,46 @@ void asteroid_maybe_break_up(object *asteroid_obj)
#ifndef NO_NETWORK
if ( !MULTIPLAYER_CLIENT ) {
#endif
#if defined(MORE_SPECIES)
if (asp->type <= ASTEROID_TYPE_BIG) // 3
// if this isn't true it's just debris, and debris doesn't break up
{
switch (asp->type) {
case ASTEROID_TYPE_SMALL:
break;
case ASTEROID_TYPE_MEDIUM:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &relvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec);
break;
case ASTEROID_TYPE_BIG:
asc_get_relvec(&relvec, asteroid_obj, &asp->death_hit_pos);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &relvec);
vm_vec_normalized_dir(&vfh, &asteroid_obj->pos, &asp->death_hit_pos);
vm_vec_copy_scale(&tvec, &vfh, 2.0f);
vm_vec_sub2(&tvec, &relvec);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_MEDIUM, &tvec);
while (frand() > 0.6f) {
vector rvec, tvec2;
vm_vec_rand_vec_quick(&rvec);
vm_vec_scale_add(&tvec2, &vfh, &rvec, 0.75f);
asteroid_sub_create(asteroid_obj, ASTEROID_TYPE_SMALL, &tvec2);
}
break;
default: // this isn't going to happen.. really
break;
}
}
#else
switch (asp->type) {
case ASTEROID_TYPE_SMALL:
break;
@@ -1774,6 +1909,7 @@ void asteroid_maybe_break_up(object *asteroid_obj)
default:
Int3();
}
#endif
#ifndef NO_NETWORK
}
#endif
@@ -2004,7 +2140,7 @@ void asteroid_parse_section()
asip->num_detail_levels = 0;
required_string("$Detail distance:");
asip->num_detail_levels = stuff_int_list(asip->detail_distance, MAX_SHIP_DETAIL_LEVELS, RAW_INTEGER_TYPE);
asip->num_detail_levels = stuff_int_list(asip->detail_distance, MAX_ASTEROID_DETAIL_LEVELS, RAW_INTEGER_TYPE);
required_string("$Max Speed:");
stuff_float(&asip->max_speed);
@@ -2022,9 +2158,9 @@ void asteroid_parse_section()
stuff_float(&asip->blast);
required_string("$Hitpoints:");
stuff_float(&asip->initial_hull_strength);
stuff_float(&asip->initial_asteroid_strength);
}
extern int True_NumSpecies;
// read in data from asteroid.tbl into Asteroid_info[] array
void asteroid_parse_tbl()
{
@@ -2049,7 +2185,11 @@ void asteroid_parse_tbl()
required_string("#End");
// check all read in
#if defined(MORE_SPECIES)
Assert(Num_asteroid_types == (True_NumSpecies + 1) * 3);//the species + normal asteroids
#else
Assert(Num_asteroid_types == MAX_DEBRIS_TYPES);
#endif
Asteroid_impact_explosion_ani = -1;
required_string("$Impact Explosion:");
@@ -2263,14 +2403,8 @@ void asteroid_page_in()
for (j=0; j<asip->modelp[k]->n_textures; j++ ) {
int bitmap_num = asip->modelp[k]->original_textures[j];
// if we're in Glide (and maybe later with D3D), use nondarkening textures
if ( bitmap_num > -1 ) {
if(gr_screen.mode == GR_GLIDE){
bm_page_in_nondarkening_texture( bitmap_num );
} else {
bm_page_in_texture( bitmap_num );
}
bm_page_in_texture( bitmap_num );
}
}
+88 -15
View File
@@ -9,13 +9,27 @@
/*
* $Logfile: /Freespace2/code/Asteroid/Asteroid.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.2 2003/04/29 01:03:22 Goober5000
* implemented the custom hitpoints mod
* --Goober5000
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -122,11 +136,12 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __ASTEROID_H__
#define __ASTEROID_H__
#include "ship/ship.h"
#include "parse/parselo.h" // for NAME_LENGTH
#include "globalincs/pstypes.h"
#include "globalincs/globals.h" // for NAME_LENGTH
struct object;
struct polymodel;
@@ -135,23 +150,73 @@ struct collision_info_struct;
#define MAX_ASTEROIDS 256
// DEBRIS TYPES
#define MAX_DEBRIS_TYPES 12
#if defined(MORE_SPECIES)
#define DEBRIS_NAME_MASK 0x000f
// -----------------------------------
// Kazan Extended Species version
// -----------------------------------
#define MAX_DEBRIS_TYPES 27
#define ASTEROID_TYPE_SMALL 0
#define ASTEROID_TYPE_MEDIUM 1
#define ASTEROID_TYPE_BIG 2
#define ASTEROID_TYPE_MEDIUM 1
#define ASTEROID_TYPE_BIG 2
// terran
#define DEBRIS_TERRAN_SMALL 3
#define DEBRIS_TERRAN_MEDIUM 4
#define DEBRIS_TERRAN_LARGE 5
// vasudan
#define DEBRIS_VASUDAN_SMALL 6
#define DEBRIS_VASUDAN_MEDIUM 7
#define DEBRIS_VASUDAN_LARGE 8
// shivan
#define DEBRIS_SHIVAN_SMALL 9
#define DEBRIS_SHIVAN_MEDIUM 10
#define DEBRIS_SHIVAN_LARGE 11
// ancient
#define DEBRIS_ANCIENT_SMALL 12
#define DEBRIS_ANCIENT_MEDIUM 13
#define DEBRIS_ANCIENT_LARGE 14
// user1
#define DEBRIS_USER1_SMALL 15
#define DEBRIS_USER1_MEDIUM 16
#define DEBRIS_USER1_LARGE 17
// user2
#define DEBRIS_USER2_SMALL 18
#define DEBRIS_USER2_MEDIUM 19
#define DEBRIS_USER2_LARGE 20
// user3
#define DEBRIS_USER3_SMALL 21
#define DEBRIS_USER3_MEDIUM 22
#define DEBRIS_USER3_LARGE 23
// user4
#define DEBRIS_USER4_SMALL 24
#define DEBRIS_USER4_MEDIUM 25
#define DEBRIS_USER4_LARGE 26
#else
// -----------------------------------
// Old Volition Version
// -----------------------------------
#define MAX_DEBRIS_TYPES 12
//
#define ASTEROID_TYPE_SMALL 0
#define ASTEROID_TYPE_MEDIUM 1
#define ASTEROID_TYPE_BIG 2
//
#define DEBRIS_TERRAN_SMALL 3
#define DEBRIS_TERRAN_MEDIUM 4
#define DEBRIS_TERRAN_MEDIUM 4
#define DEBRIS_TERRAN_LARGE 5
//
#define DEBRIS_VASUDAN_SMALL 6
#define DEBRIS_VASUDAN_SMALL 6
#define DEBRIS_VASUDAN_MEDIUM 7
#define DEBRIS_VASUDAN_LARGE 8
#define DEBRIS_VASUDAN_LARGE 8
//
#define DEBRIS_SHIVAN_SMALL 9
#define DEBRIS_SHIVAN_MEDIUM 10
#define DEBRIS_SHIVAN_MEDIUM 10
#define DEBRIS_SHIVAN_LARGE 11
// END DEBRIS TYPES
#endif
typedef struct debris_struct {
int index;
@@ -172,17 +237,20 @@ extern debris_struct Field_debris_info[];
#define AF_USED (1<<0) // Set means used.
// Goober5000 - currently same as MAX_SHIP_DETAIL_LEVELS (put here to avoid an #include)
#define MAX_ASTEROID_DETAIL_LEVELS 5
typedef struct asteroid_info {
char name[NAME_LENGTH]; // name for the asteroid
char pof_files[MAX_ASTEROID_POFS][NAME_LENGTH]; // POF files to load/associate with ship
int num_detail_levels; // number of detail levels for this ship
int detail_distance[MAX_SHIP_DETAIL_LEVELS]; // distance to change detail levels at
int detail_distance[MAX_ASTEROID_DETAIL_LEVELS]; // distance to change detail levels at
float max_speed; // cap on speed for asteroid
float inner_rad; // radius within which maximum area effect damage is applied
float outer_rad; // radius at which no area effect damage is applied
float damage; // maximum damage applied from area effect explosion
float blast; // maximum blast impulse from area effect explosion
float initial_hull_strength; // starting strength of asteroid
float initial_asteroid_strength; // starting strength of asteroid
polymodel *modelp[MAX_ASTEROID_POFS];
int model_num[MAX_ASTEROID_POFS];
} asteroid_info;
@@ -203,8 +271,13 @@ typedef struct asteroid {
// TYPEDEF FOR SPECIES OF DEBRIS - BITFIELD
#define DS_TERRAN 0x01
#define DS_VASUDAN 0x02
#define DS_VASUDAN 0x02
#define DS_SHIVAN 0x04
#define DS_ANCIENT 0x08
#define DS_USER1 0x10
#define DS_USER2 0x20
#define DS_USER3 0x40
#define DS_USER4 0x80
// TYPEDEF FOR DEBRIS TYPE
typedef enum {
+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
+196 -15
View File
@@ -9,13 +9,157 @@
/*
* $Logfile: /Freespace2/code/Bmpman/BmpMan.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
*
* $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
*
* Revision 2.11 2004/03/05 09:01:54 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.10 2003/12/04 20:39:08 randomtiger
* Added DDS image support for D3D
* Added new command flag '-ship_choice_3d' to activate 3D models instead of ani's in ship choice, feature now off by default
* Hopefully have fixed D3D text batching bug that caused old values to appear
* Added Hud_target_object_factor variable to control 3D object sizes of zoom in HUD target
* Fixed jump nodes not showing
*
* Revision 2.9 2003/11/19 20:37:22 randomtiger
* Almost fully working 32 bit pcx, use -pcx32 flag to activate.
* Made some commandline variables fit the naming standard.
* Changed timerbar system not to run pushes and pops if its not in use.
* Put in a note about not uncommenting asserts.
* Fixed up a lot of missing POP's on early returns?
* Perhaps the motivation for Assert functionality getting commented out?
* Fixed up some bad asserts.
* Changed nebula poofs to render in 2D in htl, it makes it look how it used to in non htl. (neb.cpp,1248)
* Before the poofs were creating a nasty stripe effect where they intersected with ships hulls.
* Put in a special check for the signs of that D3D init bug I need to lock down.
*
* Revision 2.8 2003/11/07 18:31:01 randomtiger
* Fixed a nohtl call to htl funcs (crash with NULL pointer)
* Fixed a bug with 32bit PCX code.
* Fixed a bug in the d3d_string batch system that was messing up screen shaking.
* Added a couple of checks to try and stop timerbar push and pop overloads, check returns missing pops if you use the system.
* Put in a higher res icon until we get something better sorted out.
*
* Revision 2.7 2003/10/24 17:35:04 randomtiger
* Implemented support for 32bit TGA and JPG for D3D
* Also 32 bit PCX, but it still has some bugs to be worked out
* Moved convert_24_to_16 out of the bitmap pfunction structures and into packunpack.cpp because thats the only place that uses it.
*
* Revision 2.6 2003/08/16 03:52:22 bobboau
* update for the specmapping code includeing
* suport for seperate specular levels on lights and
* optional strings for the stars table
* code has been made more organised,
* though there seems to be a bug in the state selecting code
* resulting in the HUD being rendered incorectly
* and specmapping failing ocasionaly
*
* Revision 2.5 2003/08/12 03:18:32 bobboau
* Specular 'shine' mapping;
* useing a phong lighting model I have made specular highlights
* that are mapped to the model,
* rendering them is still slow, but they look real purdy
*
* also 4 new (untested) comand lines, the XX is a floating point value
* -spec_exp XX
* the n value, you can set this from 0 to 200 (actualy more than that, but this is the recomended range), it will make the highlights bigger or smaller, defalt is 16.0 so start playing around there
* -spec_point XX
* -spec_static XX
* -spec_tube XX
* these are factors for the three diferent types of lights that FS uses, defalt is 1.0,
* static is the local stars,
* point is weapons/explosions/warp in/outs,
* tube is beam weapons,
* for thouse of you who think any of these lights are too bright you can configure them you're self for personal satisfaction
*
* Revision 2.4 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.
*
* Revision 2.3 2003/01/19 01:07:41 bobboau
* redid the way glowmaps are handeled, you now must set the global int GLOWMAP (no longer an array) before you render a poly that uses a glow map then set GLOWMAP to -1 when you're done with, fixed a few other misc bugs it
*
* Revision 2.2 2003/01/18 19:55:16 phreak
* fixed around the bmpman system to now accept compressed textures
*
* Revision 2.1 2003/01/05 23:41:50 bobboau
* disabled decals (for now), removed the warp ray thingys,
* made some better error mesages while parseing weapons and ships tbls,
* and... oh ya, added glow mapping
*
* Revision 2.0.2.10 2002/11/04 21:24:59 randomtiger
*
* When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates.
* Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory.
* Cleaned up some more texture stuff enabled console debug for D3D.
*
* Revision 2.0.2.9 2002/11/04 16:04:20 randomtiger
*
* Tided up some bumpman stuff and added a few function points to gr_screen. - RT
*
* Revision 2.0.2.8 2002/11/04 03:02:28 randomtiger
*
* I have made some fairly drastic changes to the bumpman system. Now functionality can be engine dependant.
* This is so D3D8 can call its own loading code that will allow good efficient loading and use of textures that it desparately needs without
* turning bumpman.cpp into a total hook infested nightmare. Note the new bumpman code is still relying on a few of the of the old functions and all of the old bumpman arrays.
*
* I have done this by adding to the gr_screen list of function pointers that are set up by the engines init functions.
* I have named the define calls the same name as the original 'bm_' functions so that I havent had to change names all through the code.
*
* Rolled back to an old version of bumpman and made a few changes.
* Added new files: grd3dbumpman.cpp and .h
* Moved the bitmap init function to after the 3D engine is initialised
* Added includes where needed
* Disabled (for now) the D3D8 TGA loading - RT
*
* Revision 2.0.2.7 2002/10/26 01:24:22 randomtiger
* Fixed debug bitmap compiling bug.
* Fixed tga bug. - RT
*
* Revision 2.0.2.6 2002/10/22 17:46:17 randomtiger
* Fixed new TGA code texturing bug. - RT
*
* Revision 2.0.2.5 2002/10/21 16:33:40 randomtiger
* Added D3D only 32 bit TGA functionality. Will load a texture as big as your graphics card allows. Code not finished yet and will forge the beginnings of the new texture system. - RT
*
* Revision 2.0.2.4 2002/10/19 23:56:39 randomtiger
* Changed generic bitmap code to allow maximum dimensions to be determined by 3D's engines maximum texture size query.
* Defaults to 256 as it was before. Also added base code for reworking the texture code to be more efficient. - RT
*
* Revision 2.0.2.3 2002/10/02 11:40:19 randomtiger
* Bmpmap has been reverted to an old non d3d8 version.
* All d3d8 code is now in the proper place.
* PCX code is now working to an extent. Problems with alpha though.
* Ani's work slowly with alpha problems.
* Also I have done a bit of tidying - RT
*
* 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
*
@@ -151,20 +295,46 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _BMPMAN_H
#define _BMPMAN_H
#ifdef FS2_DEMO
#define MAX_BITMAPS 3500
#else
#define MAX_BITMAPS 3500 // How many bitmaps the game can handle
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#ifndef NDEBUG
#define BMPMAN_NDEBUG
#endif
// 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!
extern int bm_inited;
extern int Bm_paging;
void bm_init();
void bm_close();
int bm_get_cache_slot( int bitmap_id, int separate_ani_frames );
int bm_get_next_handle();
void *bm_malloc(int n, int size);
void bm_update_memory_used(int n, int size);
// 16 bit pixel formats
extern int Bm_pixel_format;
@@ -208,7 +378,7 @@ void bm_release(int n);
// 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_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0 );
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
@@ -228,21 +398,21 @@ extern void bm_unlock( int bitmapnum );
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);
extern void bm_get_filename(int bitmapnum, char *filename);
// resyncs all the bitmap palette
extern void bm_update();
// call to load all data for all bitmaps that have been requested to be loaded
extern void bm_load_all();
extern void bm_gfx_load_all();
extern void bm_unload_all();
// call to get the palette for a bitmap
extern void bm_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.
void bm_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *b );
void bm_gfx_get_pixel( int bitmap, float u, float v, ubyte *r, ubyte *g, ubyte *b );
// Returns number of bytes of bitmaps locked this frame
// ntotal = number of bytes of bitmaps locked this frame
@@ -317,6 +487,9 @@ void bm_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
// If num_frames is passed, assume this is an animation
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
// 1 = Low memory ( every other frame of ani's)
@@ -329,9 +502,6 @@ void BM_SELECT_SCREEN_FORMAT();
void BM_SELECT_TEX_FORMAT();
void BM_SELECT_ALPHA_TEX_FORMAT();
// convert a 24 bit value to a 16 bit value
void bm_24_to_16(int bit_24, ushort *bit_16);
// set the rgba components of a pixel, any of the parameters can be NULL
extern void (*bm_set_components)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
@@ -351,4 +521,15 @@ void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
// given a bitmap and a section, return the size (w, 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
+122 -40
View File
@@ -9,13 +9,90 @@
/*
* $Logfile: /Freespace2/code/CFile/cfile.cpp $
* $Revision: 2.3 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.13 2004/02/04 09:02:45 Goober5000
* got rid of unnecessary double semicolons
* --Goober5000
*
* Revision 2.12 2003/08/27 01:36:22 Goober5000
* fixed a strange thing that Bobboau inexplicably put in
* --Goober5000
*
* Revision 2.11 2003/08/25 04:39:17 Goober5000
* fixed unreachable code
* --Goober5000
*
* Revision 2.10 2003/08/22 07:35:07 bobboau
* specular code should be bugless now,
* cell shadeing has been added activated via the comand line '-cell',
* 3D shockwave models, and a transparency method I'm calling edge and center alpha that could be usefull for other things, ask for details
*
* Revision 2.9 2003/08/20 08:12:08 wmcoolmon
* Made cfile_delete return 0 on failure, 1 on success
*
* Revision 2.8 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.
*
* Revision 2.7 2002/11/10 16:29:53 DTP
* -DTP reworked mod support,
*
* Revision 2.6 2002/11/04 08:32:38 DTP
* Made sure, that VP and Plain files dont get added twice to the search order. Side-effect of Mod support.
*
* Revision 2.5 2002/10/30 06:31:05 DTP
* doh!, used upper case in include, dont know how much it matters for *nix systems, but here it is
*
* Revision 2.4 2002/10/27 23:59:28 DTP
* DTP; started basic implementation of mod-support
* plain files only for now. fs2_open.exe -mod X will look for files in fs2/ X /all-legal-subdirectories. no checking/creating dirs yet. directories must be there.
*
* Revision 2.3.2.1 2002/09/24 18:56:41 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.3 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.2 2002/07/29 19:04:48 penguin
* added #ifdef _WIN32 around windows-specific system headers
*
@@ -206,15 +283,12 @@
#include <sys/mman.h>
#endif
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#include "parse/encrypt.h"
//#include "outwnd.h"
//#include "vecmat.h"
//#include "timer.h"
#include "cfile/cfilesystem.h"
#include "cfile/cfilearchive.h"
#include "osapi/osapi.h"
char Cfile_root_dir[CFILE_ROOT_DIRECTORY_LEN] = "";
@@ -228,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", 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", 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 },
@@ -610,8 +684,8 @@ char *cf_add_ext(char *filename, char *ext)
return path;
}
// Deletes a file.
void cf_delete( char *filename, int dir_type )
// Deletes a file. Returns 0 if an error occurs, 1 on success
int cf_delete( char *filename, int dir_type )
{
char longname[MAX_PATH_LEN];
@@ -623,9 +697,21 @@ void cf_delete( char *filename, int dir_type )
if (fp) {
// delete the file
fclose(fp);
_unlink(longname);
if(_unlink(longname) == -1)
{
//ERROR - file is probably read only
return 0;
}
else
{
return 1;
}
}
else
{
//ERROR - file doesn't exist
return 0;
}
}
@@ -653,8 +739,9 @@ int cf_exist( char *filename, int dir_type )
FILE *fp = fopen(longname, "rb");
if (fp) {
return 1;
// Goober5000 - these were switched, causing the fclose to be unreachable
fclose(fp);
return 1;
}
return 0;
@@ -762,18 +849,12 @@ extern int game_cd_changed();
CFILE *cfopen(char *file_path, char *mode, int type, int dir_type, bool localize)
{
/* Bobboau, what is this doing here? 31 is way too short... - Goober5000
if( strlen(file_path) > 31 )
Error(LOCATION, "file name %s too long, \nmust be less than 31 charicters", file_path);*/
char longname[_MAX_PATH];
// nprintf(("CFILE", "CFILE -- trying to open %s\n", file_path ));
// #if !defined(MULTIPLAYER_BETA_BUILD) && !defined(FS2_DEMO)
// we no longer need to do this, and on machines with crappy-ass drivers it can slow things down horribly.
#if 0
if ( game_cd_changed() ) {
cfile_refresh();
}
#endif
//================================================
// Check that all the parameters make sense
Assert(file_path && strlen(file_path));
@@ -978,7 +1059,7 @@ CFILE *cf_open_fill_cfblock(FILE *fp, int type)
CFILE *cfp;
Cfile_block *cfbp;
cfbp = &Cfile_block_list[cfile_block_index];
cfp = &Cfile_list[cfile_block_index];;
cfp = &Cfile_list[cfile_block_index];
cfp->id = cfile_block_index;
cfp->version = 0;
cfbp->data = NULL;
@@ -1768,3 +1849,4 @@ int cflush(CFILE *cfile)
+56 -31
View File
@@ -9,13 +9,35 @@
/*
* $Logfile: /Freespace2/code/CFile/cfile.h $
* $Revision: 2.2 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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,
*
* Revision 2.5 2002/11/02 23:06:59 DTP
* DOh,uhmm, define error again, this is getting to me.
*
* Revision 2.4 2002/11/02 23:04:46 DTP
* DOh, fixed that define, learn to count DTP :)
*
* Revision 2.3 2002/10/27 23:59:28 DTP
* DTP; started basic implementation of mod-support
* plain files only for now. fs2_open.exe -mod X will look for files in fs2/ X /all-legal-subdirectories. no checking/creating dirs yet. directories must be there.
*
* Revision 2.2 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.1 2002/07/07 19:55:58 penguin
* Back-port to MSVC
*
@@ -340,6 +362,7 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef __CFILE_H__
#define __CFILE_H__
@@ -378,44 +401,45 @@ typedef struct {
#define CF_TYPE_ANY -1 // Used to check in any directory
#define CF_TYPE_INVALID 0
#define CF_TYPE_ROOT 1 // Root must be 1!!
#define CF_TYPE_DATA 2
#define CF_TYPE_MAPS 3
#define CF_TYPE_TEXT 4
#define CF_TYPE_MISSIONS 5
#define CF_TYPE_MODELS 6
#define CF_TYPE_TABLES 7
#define CF_TYPE_SOUNDS 8
#define CF_TYPE_SOUNDS_8B22K 9
#define CF_TYPE_SOUNDS_16B11K 10
#define CF_TYPE_VOICE 11
#define CF_TYPE_INVALID 0
#define CF_TYPE_ROOT 1 // Root must be 1!!
#define CF_TYPE_DATA 2
#define CF_TYPE_MAPS 3
#define CF_TYPE_TEXT 4
#define CF_TYPE_MISSIONS 5
#define CF_TYPE_MODELS 6
#define CF_TYPE_TABLES 7
#define CF_TYPE_SOUNDS 8
#define CF_TYPE_SOUNDS_8B22K 9
#define CF_TYPE_SOUNDS_16B11K 10
#define CF_TYPE_VOICE 11
#define CF_TYPE_VOICE_BRIEFINGS 12
#define CF_TYPE_VOICE_CMD_BRIEF 13
#define CF_TYPE_VOICE_DEBRIEFINGS 14
#define CF_TYPE_VOICE_PERSONAS 15
#define CF_TYPE_VOICE_SPECIAL 16
#define CF_TYPE_VOICE_SPECIAL 16
#define CF_TYPE_VOICE_TRAINING 17
#define CF_TYPE_MUSIC 18
#define CF_TYPE_MOVIES 19
#define CF_TYPE_INTERFACE 20
#define CF_TYPE_FONT 21
#define CF_TYPE_EFFECTS 22
#define CF_TYPE_HUD 23
#define CF_TYPE_MUSIC 18
#define CF_TYPE_MOVIES 19
#define CF_TYPE_INTERFACE 20
#define CF_TYPE_FONT 21
#define CF_TYPE_EFFECTS 22
#define CF_TYPE_HUD 23
#define CF_TYPE_PLAYER_MAIN 24
#define CF_TYPE_PLAYER_IMAGES_MAIN 25
#define CF_TYPE_CACHE 26
#define CF_TYPE_PLAYERS 27
#define CF_TYPE_CACHE 26
#define CF_TYPE_PLAYERS 27
#define CF_TYPE_SINGLE_PLAYERS 28
#define CF_TYPE_MULTI_PLAYERS 29
#define CF_TYPE_MULTI_PLAYERS 29
#define CF_TYPE_MULTI_CACHE 30
#define CF_TYPE_CONFIG 31
#define CF_TYPE_CONFIG 31
#define CF_TYPE_SQUAD_IMAGES_MAIN 32
#define CF_TYPE_DEMOS 33
#define CF_TYPE_CBANIMS 34
#define CF_TYPE_DEMOS 33
#define CF_TYPE_CBANIMS 34
#define CF_TYPE_INTEL_ANIMS 35
#define CF_MAX_PATH_TYPES 36 // Can be as high as you'd like
#define CF_MAX_PATH_TYPES 36 // Can be as high as you'd like //DTP; yeah but beware alot of things uses CF_MAX_PATH_TYPES
// TRUE if type is specified and valid
#define CF_TYPE_SPECIFIED(path_type) (((path_type)>CF_TYPE_INVALID) && ((path_type)<CF_MAX_PATH_TYPES))
@@ -427,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)
@@ -465,8 +490,8 @@ int cflush(CFILE *cfile);
// open a file. Once set, you can use minimum version numbers with the read functions.
void cf_set_version( CFILE * cfile, int version );
// Deletes a file.
void cf_delete( char *filename, int dir_type );
// Deletes a file. Returns 0 on error, 1 if successful
int cf_delete( char *filename, int dir_type );
// Same as _access function to read a file's access bits
int cf_access( char *filename, int dir_type, int mode );
+31 -11
View File
@@ -9,14 +9,28 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileArchive.cpp $
* $Revision: 2.2 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.2 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.1 2002/07/29 19:17:21 penguin
* added #ifdef _WIN32 around windows-specific system headers
*
@@ -93,10 +107,11 @@
#include <winbase.h> /* needed for memory mapping of file functions */
#endif
#include "globalincs/pstypes.h"
#include "cfile/cfile.h"
#include "cfile/cfilearchive.h"
#define CHECK_POSITION
// Called once to setup the low-level reading code.
@@ -119,7 +134,8 @@ void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size )
}
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int raw_position = ftell(cb->fp) - cb->lib_offset;
int raw_position;
raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
#endif
}
@@ -151,8 +167,9 @@ int cfeof(CFILE *cfile)
Assert(cb->fp != NULL);
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
int raw_position;
raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
#endif
if (cb->raw_position >= cb->size ) {
@@ -182,8 +199,9 @@ int cftell( CFILE * cfile )
Assert(cb->fp != NULL);
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
int raw_position;
raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
#endif
return cb->raw_position;
@@ -231,7 +249,8 @@ int cfseek( CFILE *cfile, int offset, int where )
cb->raw_position = goal_position - cb->lib_offset;
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int tmp_offset = ftell(cb->fp) - cb->lib_offset;
int tmp_offset;
tmp_offset = ftell(cb->fp) - cb->lib_offset;
Assert(tmp_offset==cb->raw_position);
#endif
@@ -277,7 +296,8 @@ int cfread(void *buf, int elsize, int nelem, CFILE *cfile)
}
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int tmp_offset = ftell(cb->fp) - cb->lib_offset;
int tmp_offset;
tmp_offset = ftell(cb->fp) - cb->lib_offset;
Assert(tmp_offset==cb->raw_position);
#endif
+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;
}
File diff suppressed because it is too large. Load diff
+13 -3
View File
@@ -9,9 +9,9 @@
/*
* $Logfile: /Freespace2/code/CFile/CfileSystem.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
* $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,13 @@
* 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
*
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -43,9 +50,12 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CFILESYSTEM_H
#define _CFILESYSTEM_H
#include "cfile/cfile.h"
// Builds a list of all the files
void cf_build_secondary_filelist( char *cdrom_path );
void cf_free_secondary_filelist();
@@ -9,13 +9,16 @@
/*
* $Logfile: /Freespace2/code/Cfilearchiver/CfileArchiver.cpp $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
* $Revision: 2.1 $
* $Date: 2003-11-16 09:42:37 $
* $Author: Goober5000 $
*
* Program to create an archive file for use with cfile stuff
*
* $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
*
@@ -245,7 +248,7 @@ int main(int argc, char *argv[] )
fp_out = fopen( archive_dat, "wb" );
if ( !fp_out ) {
printf( "Couldn't open '%s'!\n", archive_dat );
printf( "out1: Couldn't open '%s'!\n", archive_dat );
printf( "Press any key to exit...\n" );
getch();
return 1;
@@ -253,7 +256,7 @@ int main(int argc, char *argv[] )
fp_out_hdr = fopen( archive_hdr, "wb" );
if ( !fp_out_hdr ) {
printf( "Couldn't open '%s'!\n", archive_hdr );
printf( "out2: Couldn't open '%s'!\n", archive_hdr );
printf( "Press any key to exit...\n" );
getch();
return 1;
File diff suppressed because it is too large. Load diff
+357 -5
View File
@@ -5,15 +5,302 @@
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/Cmdline/cmdline.h $
* $Revision: 2.3 $
* $Date: 2002-08-07 00:44:13 $
* $Author: DTP $
* $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
*
* Revision 2.52 2004/04/18 19:39:12 randomtiger
* Added -2d_poof command which allows access to 2D poof rendering
* Added -radar_reduce to launcher flag description structure
*
* Revision 2.51 2004/04/03 18:11:20 Kazan
* FRED fixes
*
* Revision 2.50 2004/03/20 14:47:12 randomtiger
* Added base for a general dynamic batching solution.
* Fixed NO_DSHOW_CODE code path bug.
*
* Revision 2.49 2004/03/19 14:51:54 randomtiger
* New command line parameter: -d3d_lesstmem causes D3D to bypass V's secondry texture system.
*
* Revision 2.48 2004/03/19 11:44:04 randomtiger
* Removed -d3d_notmanaged param.
* Tided D3D texture code. Merged remaining section code into the rest of the system.
* Prepared for removal of code causing waste of memory for secondry store of textures.
*
* Revision 2.47 2004/02/27 04:09:55 bobboau
* fixed a Z buffer error in HTL submodel rendering,
* and glow points,
* and other stuff
*
* Revision 2.46 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 2.45 2004/01/29 01:34:00 randomtiger
* Added malloc montoring system, use -show_mem_usage, debug exes only to get an ingame list of heap usage.
* Also added -d3d_notmanaged flag to activate non managed D3D path, in experimental stage.
*
* Revision 2.44 2004/01/24 14:31:27 randomtiger
* Added the D3D particle code, its not bugfree but works perfectly on my card and helps with the framerate.
* Its optional and off by default, use -d3d_particle to activiate.
* Also bumped up D3D ambient light setting, it was way too dark.
* Its now set to something similar to the original game.
*
* Revision 2.43 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.42 2003/12/04 20:39:09 randomtiger
* Added DDS image support for D3D
* Added new command flag '-ship_choice_3d' to activate 3D models instead of ani's in ship choice, feature now off by default
* Hopefully have fixed D3D text batching bug that caused old values to appear
* Added Hud_target_object_factor variable to control 3D object sizes of zoom in HUD target
* Fixed jump nodes not showing
*
* Revision 2.41 2003/12/03 19:27:00 randomtiger
* Changed -t32 flag to -jpgtga
* Added -query_flag to identify builds with speech not compiled and other problems
* Now loads up launcher if videocard reg entry not found
* Now offers to go online to download launcher if its not present
* Changed target view not to use lower res texture, hi res one is already chached so might as well use it
*
* Revision 2.40 2003/11/29 10:52:09 randomtiger
* Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit.
* Added stats command for ingame stats on memory usage.
* Trys to play intro.mve and intro.avi, just to be safe since its not set by table.
* Added fix for fonts wrapping round in non standard hi res modes.
* Changed D3D mipmapping to a good value to suit htl mode.
* Added new fog colour method which makes use of the bitmap, making this htl feature backcompatible again.
*
* Revision 2.39 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.
* Changed timerbar system not to run pushes and pops if its not in use.
* Put in a note about not uncommenting asserts.
* Fixed up a lot of missing POP's on early returns?
* Perhaps the motivation for Assert functionality getting commented out?
* Fixed up some bad asserts.
* Changed nebula poofs to render in 2D in htl, it makes it look how it used to in non htl. (neb.cpp,1248)
* Before the poofs were creating a nasty stripe effect where they intersected with ships hulls.
* Put in a special check for the signs of that D3D init bug I need to lock down.
*
* Revision 2.38 2003/11/15 18:09:33 randomtiger
* Put TGA and JPG stuff on -t32 flag
* Put 32 bit PCX stuff on -pcx32 (still has bugs)
* Added multisample checking on device initialisation
* Changed unrecognised parameter message (as requested) to be more user friendly
* Speech now chooses voice based on reg value set by launcher v3.1
*
* Revision 2.37 2003/11/09 06:31:38 Kazan
* a couple of htl functions being called in nonhtl (ie NULL functions) problems fixed
* conflicts in cmdline and timerbar.h log entries
* cvs stopped acting like it was on crack obviously
*
* Revision 2.36 2003/11/09 04:09:18 Goober5000
* edited for language
* --Goober5000
*
* Revision 2.35 2003/11/08 22:25:47 Kazan
* Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar"
* DONT MESS WITH OTHER PEOPLES INCLUDE PATHS
* DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths!
*
* Revision 2.34 2003/11/03 18:07:26 randomtiger
* Added -d3d_no_vsync command to make turning off vsync optional.
* Removed 32bit command, it doesnt do anything.
* Made aa multisample reg check safe.
*
* Revision 2.33 2003/10/27 23:04:20 randomtiger
* Added -no_set_gamma flags
* Fixed up some more non standard res stuff
* Improved selection of device type, this includes using a pure device when allowed which means dev should not use Get* functions in D3D
* Made fade in credits work
* Stopped a call to gr_reser_lighting() in non htl mode when the pointer was NULL, was causing a crash loading a fogged level
* Deleted directx8 directory content, has never been needed.
*
* Revision 2.32 2003/10/24 17:35:04 randomtiger
* Implemented support for 32bit TGA and JPG for D3D
* Also 32 bit PCX, but it still has some bugs to be worked out
* Moved convert_24_to_16 out of the bitmap pfunction structures and into packunpack.cpp because thats the only place that uses it.
*
* Revision 2.31 2003/10/17 17:18:42 randomtiger
* Big restructure for D3D and new modules grd3dlight and grd3dsetup
*
* Revision 2.30 2003/10/12 03:41:37 Kazan
* #Kazan# FS2NetD client code gone multithreaded, some Fred2 Open -mod stuff [obvious code.lib] including a change in cmdline.cpp, changed Stick's "-nohtl" to "-htl" - HTL is _OFF_ by default here (Bobboau and I decided this was a better idea for now)
*
* Revision 2.29 2003/09/25 21:12:22 Kazan
* ##Kazan## FS2NetD Completed! Just needs some thorough bug checking (i don't think there are any serious bugs)
* Also D3D8 Screenshots work now.
*
* Revision 2.28 2003/09/23 02:42:52 Kazan
* ##KAZAN## - FS2NetD Support! (FS2 Open PXO) -- Game Server Listing, and mission validation completed - stats storing to come - needs fs2open_pxo.cfg file [VP-able]
*
* Revision 2.27 2003/09/14 19:00:02 wmcoolmon
* Changed "nospec" and "cell" to "Cmdline_nospec" and "Cmdline_cell"
*
* Revision 2.26 2003/09/14 18:32:24 wmcoolmon
* Added "-safeloading" command line parameter, which uses old fs2_retail-style loading code -C
*
* Revision 2.25 2003/09/13 06:02:05 Goober5000
* clean rollback of all of argv's stuff
* --Goober5000
*
* Revision 2.23 2003/08/22 07:35:08 bobboau
* specular code should be bugless now,
* cell shadeing has been added activated via the comand line '-cell',
* 3D shockwave models, and a transparency method I'm calling edge and center alpha that could be usefull for other things, ask for details
*
* Revision 2.22 2003/08/21 20:54:37 randomtiger
* Fixed switching - RT
*
* Revision 2.21 2003/08/12 03:18:33 bobboau
* Specular 'shine' mapping;
* useing a phong lighting model I have made specular highlights
* that are mapped to the model,
* rendering them is still slow, but they look real purdy
*
* also 4 new (untested) comand lines, the XX is a floating point value
* -spec_exp XX
* the n value, you can set this from 0 to 200 (actualy more than that, but this is the recomended range), it will make the highlights bigger or smaller, defalt is 16.0 so start playing around there
* -spec_point XX
* -spec_static XX
* -spec_tube XX
* these are factors for the three diferent types of lights that FS uses, defalt is 1.0,
* static is the local stars,
* point is weapons/explosions/warp in/outs,
* tube is beam weapons,
* for thouse of you who think any of these lights are too bright you can configure them you're self for personal satisfaction
*
* Revision 2.20 2003/08/09 06:07:23 bobboau
* slightly better implementation of the new zbuffer thing, it now checks only three diferent formats defalting to the 16 bit if neither the 24 or 32 bit versions are suported
*
* Revision 2.19 2003/03/29 09:42:05 Goober5000
* made beams default shield piercing again
* also added a beam no pierce command line flag
* and fixed something else which I forgot :P
* --Goober5000
*
* Revision 2.18 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.
*
* Revision 2.17 2003/02/22 04:13:17 wmcoolmon
* Added "-dshowvid" command-line option, which must be set in order for movies to play.
*
* Revision 2.16 2002/12/21 13:39:25 DTP
* did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe
*
* Revision 2.15 2002/12/17 03:08:18 DTP
* fix to Show_framerate. seems it will call an unresolved external error during fred builds. modified my ifndefs a bit, dsw modified to include preprocessor tag FRED.
*
* Revision 2.14 2002/12/17 02:22:34 DTP
* wrong name :)
*
* Revision 2.13 2002/12/17 02:21:06 DTP
* cleaned up after phreak :). it will make a mess in debug builds. added a couple of ifndef _debugs.
*
* Revision 2.12 2002/11/10 16:30:53 DTP
* -DTP reworked mod support,
*
* Revision 2.11 2002/10/31 21:14:16 DTP
* DTP Quickly added something needed to cmdline.h, since otherwise we can not compile the code as it misses some externals. Thought a rollback rolled all back.
*
* Revision 2.10 2002/10/30 20:22:30 inquisitor
* Bad Committ, Rolling back
*
* Revision 2.7 2002/10/22 23:02:39 randomtiger
* Made Phreaks alternative scanning style optional under the command line tag "-phreak"
* Fixed bug that changes HUD colour when targetting debris in a full nebula. - RT
*
* Revision 2.6 2002/10/19 03:50:28 randomtiger
* Added special pause mode for easier action screenshots.
* Added new command line parameter for accessing all single missions in tech room. - RT
*
* Revision 2.5 2002/08/27 13:38:57 penguin
* Moved DirectX8 stuff to directx8 branch; reverted to previous
*
* Revision 2.3.2.4 2002/11/10 11:32:29 randomtiger
*
* Made D3D8 mipmapping optional on command line flag -d3dmipmip, off by default.
* When on is now less blury. - RT
*
* Revision 2.3.2.3 2002/11/04 23:53:24 randomtiger
*
* Added new command line parameter -d3dlauncher which brings up the launcher.
* This is needed since FS2 DX8 now stores the last successful details in the registry and
* uses them to choose the adapter and mode to run in unless its windowed or they are not set.
* Added some code for Antialiasing but it messes up the font but hopefully that can be fixed later. - RT
*
* Revision 2.3.2.2 2002/11/04 21:24:59 randomtiger
*
* When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates.
* Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory.
* Cleaned up some more texture stuff enabled console debug for D3D.
*
* Revision 2.3.2.1 2002/08/27 13:19:02 penguin
* Moved to directx8 branch
*
* Revision 2.4 2002/08/18 19:48:28 randomtiger
* Added new lib files: strmiids and ddraw to get dshow working
* Added new command line parameter to active direct show movie play: -dshowvid
* Uncommented movie_play calls and includes
*
* Revision 2.3 2002/08/07 00:44:13 DTP
* Implented -GF4FIX commandline switch
*
* Revision 2.2 2002/07/29 06:35:15 DTP
* added -almission commandline arguement, will autoload mission i.e fs2_open.exe -almission kickass will autoload kickass.fs2 which should be a multiplayer mission.
*
@@ -159,7 +446,7 @@
*
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef FS_CMDLINE_HEADER_FILE
#define FS_CMDLINE_HEADER_FILE
@@ -169,6 +456,7 @@ int parse_cmdline(char *cmdline);
int parse_cmdline(int argc, char *argv[]);
#endif
int fred2_parse_cmdline(int argc, char *argv[]);
// COMMAND LINE SETTINGS
// This section is for reference by all the *_init() functions. For example, the multiplayer init function
// could check to see if (int Cmdline_multi_stream_chat_to_file) has been set by the command line parser.
@@ -195,13 +483,77 @@ extern int Cmdline_multi_log;
extern int Cmdline_server_firing;
extern int Cmdline_client_dodamage;
extern int Cmdline_spew_pof_info;
extern int Cmdline_force_32bit;
extern int Cmdline_mouse_coords;
extern int Cmdline_timeout;
extern int Cmdline_SpewMission_CRCs;
extern int Cmdline_SpewTable_CRCs;
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_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;
extern int Cmdline_beams_no_pierce_shields; // Goober5000
extern float Cmdline_fov;
extern float static_light_factor;
extern float static_tube_factor;
extern float static_point_factor;
extern double specular_exponent_value;
extern int Cmdline_cell;
extern int Cmdline_nohtl;
extern int Cmdline_dxt;
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;
extern int Cmdline_query_speech;
extern int Cmdline_ship_choice_3d;
extern int Cmdline_d3d_particle;
extern int Cmdline_ambient_factor;
extern int Cmdline_show_mem_usage;
extern int Cmdline_rt;
extern char *Cmdline_start_mission;
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_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
+26 -36
View File
@@ -9,13 +9,32 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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.
*
* Revision 2.1.2.1 2002/09/24 18:56:41 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -208,26 +227,15 @@
* $NoKeywords: $
*/
#include "globalincs/pstypes.h"
#include "globalincs/systemvars.h"
#include "cmeasure/cmeasure.h"
#include "freespace2/freespace.h"
#include "math/vecmat.h"
#include "graphics/2d.h"
#include "render/3d.h"
#include "model/model.h"
#include "physics/physics.h"
#include "math/floating.h"
#include "model/model.h"
#include "ship/ship.h"
#include "io/timer.h"
#include "fireball/fireballs.h"
#include "radar/radar.h"
#include "mission/missionparse.h" // For MAX_SPECIES_NAMES
#include "gamesnd/gamesnd.h"
#include "object/objectsnd.h"
#include "sound/sound.h"
#include "math/staticrand.h"
#include "object/object.h"
cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
cmeasure Cmeasures[MAX_CMEASURES];
@@ -243,27 +251,9 @@ void cmeasure_init()
{
int i;
if ( !Cmeasure_inited ) {
if ( !Cmeasure_inited )
Cmeasure_inited = 1;
/* // Do all the processing that happens only once
if ( Debris_model < 0 ) {
if (Debris_model>-1) {
polymodel * pm;
pm = model_get(Debris_model);
Debris_num_submodels = pm->n_models;
}
}
for (i=0; i<MAX_SPECIES_NAMES; i++ ) {
Debris_textures[i] = bm_load( Debris_texture_files[i] );
if ( Debris_textures[i] < 0 ) {
Warning( LOCATION, "Couldn't load species %d debris\ntexture, '%s'\n", i, Debris_texture_files[i] );
}
}
*/
}
// Reset everything between levels
Num_cmeasures = 0;
+15 -5
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/CMeasure/CMeasure.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -112,11 +119,14 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _CMEASURE_H
#define _CMEASURE_H
#include "parse/parselo.h"
#include "object/object.h"
#include "globalincs/globals.h"
struct object;
struct vector;
#define MAX_CMEASURES 64
+362 -230
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 "." /D "_WINDOWS" /D "WIN32" /D "NDEBUG" /U "_DEBUG" /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 /W4 /Gm /Gi /GX /ZI /Od /I "." /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /U "NDEBUG" /FR /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" /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"
@@ -156,18 +160,6 @@ SOURCE=.\CFile\CfileSystem.cpp
SOURCE=.\CFile\CfileSystem.h
# End Source File
# End Group
# Begin Group "Cmdline"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Cmdline\cmdline.cpp
# End Source File
# Begin Source File
SOURCE=.\Cmdline\cmdline.h
# End Source File
# End Group
# Begin Group "CMeasure"
# PROP Default_Filter ""
@@ -207,6 +199,14 @@ SOURCE=.\Cutscene\Cutscenes.cpp
SOURCE=.\Cutscene\Cutscenes.h
# End Source File
# Begin Source File
SOURCE=.\cutscene\movie.cpp
# End Source File
# Begin Source File
SOURCE=.\cutscene\movie.h
# End Source File
# End Group
# Begin Group "Debris"
@@ -227,32 +227,44 @@ SOURCE=.\Debris\Debris.h
SOURCE=.\DebugConsole\Console.cpp
# End Source File
# Begin Source File
SOURCE=.\debugconsole\dbugfile.cpp
# End Source File
# Begin Source File
SOURCE=.\debugconsole\dbugfile.h
# End Source File
# Begin Source File
SOURCE=.\debugconsole\timerbar.cpp
# End Source File
# Begin Source File
SOURCE=.\debugconsole\timerbar.h
# End Source File
# End Group
# Begin Group "DirectX"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\directx\dx8show.cpp
# End Source File
# Begin Source File
SOURCE=.\directx\dx8show.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vasync.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vD3d.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vD3dcaps.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vd3di.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vd3drm.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vd3drmdef.h
# End Source File
# Begin Source File
@@ -265,18 +277,10 @@ SOURCE=.\DirectX\vd3drmwin.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vD3dtypes.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vd3dvec.inl
# End Source File
# Begin Source File
SOURCE=.\DirectX\vDdraw.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vDinput.h
# End Source File
# Begin Source File
@@ -301,10 +305,6 @@ SOURCE=.\DirectX\vdvp.h
# End Source File
# Begin Source File
SOURCE=.\DirectX\vDdraw.lib
# End Source File
# Begin Source File
SOURCE=.\DirectX\vDinput.lib
# End Source File
# Begin Source File
@@ -313,7 +313,11 @@ SOURCE=.\DirectX\vDsound.lib
# End Source File
# Begin Source File
SOURCE=.\DirectX\vDxguid.lib
SOURCE=.\directx\strmiids.lib
# End Source File
# Begin Source File
SOURCE=.\directx\dxguid.lib
# End Source File
# End Group
# Begin Group "Fireball"
@@ -384,46 +388,6 @@ SOURCE=.\Gamesnd\GameSnd.cpp
SOURCE=.\Gamesnd\GameSnd.h
# End Source File
# End Group
# Begin Group "Glide"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Glide\3DFX.H
# End Source File
# Begin Source File
SOURCE=.\Glide\FXDLL.H
# End Source File
# Begin Source File
SOURCE=.\Glide\FXGLOB.H
# End Source File
# Begin Source File
SOURCE=.\Glide\FXOS.H
# End Source File
# Begin Source File
SOURCE=.\Glide\Glide.cpp
# End Source File
# Begin Source File
SOURCE=.\Glide\glide.h
# End Source File
# Begin Source File
SOURCE=.\Glide\glidesys.h
# End Source File
# Begin Source File
SOURCE=.\Glide\glideutl.h
# End Source File
# Begin Source File
SOURCE=.\Glide\SST1VID.H
# End Source File
# End Group
# Begin Group "GlobalIncs"
# PROP Default_Filter ""
@@ -445,6 +409,10 @@ SOURCE=.\GlobalIncs\crypt.h
# End Source File
# Begin Source File
SOURCE=.\globalincs\globals.h
# End Source File
# Begin Source File
SOURCE=.\GlobalIncs\LinkList.h
# End Source File
# Begin Source File
@@ -475,42 +443,9 @@ SOURCE=.\GlobalIncs\WinDebug.cpp
# Begin Group "Graphics"
# PROP Default_Filter ""
# Begin Source File
# Begin Group "SoftwareGr"
SOURCE=.\Graphics\2d.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\2d.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\aaline.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Bitblt.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Bitblt.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Circle.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Circle.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Colors.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Colors.h
# End Source File
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Graphics\Font.cpp
@@ -521,78 +456,6 @@ SOURCE=.\Graphics\Font.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Gradient.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Gradient.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3D.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3D.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3DInternal.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3DRender.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3DTexture.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrDirectDraw.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrDirectDraw.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrGlide.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrGlide.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrGlideInternal.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrGlideTexture.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrInternal.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrOpenGL.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrOpenGL.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrSoft.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrSoft.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrZbuffer.cpp
# End Source File
# Begin Source File
@@ -601,84 +464,165 @@ SOURCE=.\Graphics\GrZbuffer.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Line.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Line.h
# End Source File
# End Group
# Begin Group "D3D8Gr"
# PROP Default_Filter ""
# Begin Group "Headers"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Graphics\Pixel.cpp
SOURCE=.\Graphics\GrD3D.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Pixel.h
SOURCE=.\graphics\grd3dbatch.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Rect.cpp
SOURCE=.\graphics\GrD3DBmpman.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Rect.h
SOURCE=.\Graphics\GrD3DInternal.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Scaler.cpp
SOURCE=.\graphics\grd3dlight.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Scaler.h
SOURCE=.\graphics\GrD3DParticle.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\Shade.cpp
SOURCE=.\graphics\grd3dsetup.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\Graphics\GrD3D.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Shade.h
SOURCE=.\graphics\grd3dbatch.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapGenericScans.cpp
SOURCE=.\graphics\GrD3DBmpman.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\Tmapper.cpp
SOURCE=.\graphics\GrD3DCalls.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\grd3dlight.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrD3DParticle.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3DRender.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\GrD3Dsetup.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrD3DTexture.cpp
# End Source File
# End Group
# Begin Group "OpenGLGr"
# PROP Default_Filter ""
# Begin Group "OpenGL Headers"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\graphics\gropengl.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropenglbmpman.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropenglextension.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengllight.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltexture.h
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltnl.h
# End Source File
# End Group
# Begin Group "OpenGL CPPs"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\graphics\gropengl.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropenglbmpman.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropenglextension.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengllight.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltexture.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\gropengltnl.cpp
# End Source File
# End Group
# End Group
# Begin Source File
SOURCE=.\Graphics\2d.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\2d.h
# End Source File
# Begin Source File
SOURCE=.\graphics\grbatch.cpp
# End Source File
# Begin Source File
SOURCE=.\graphics\grbatch.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\GrInternal.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\TMAPPER.H
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanline.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanline.h
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanTiled128x128.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanTiled16x16.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanTiled256x256.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanTiled32x32.cpp
# End Source File
# Begin Source File
SOURCE=.\Graphics\TmapScanTiled64x64.cpp
# End Source File
# End Group
# Begin Group "Hud"
@@ -753,6 +697,14 @@ SOURCE=.\Hud\HUDmessage.h
# End Source File
# Begin Source File
SOURCE=.\hud\HUDNavigation.cpp
# End Source File
# Begin Source File
SOURCE=.\hud\HUDNavigation.h
# End Source File
# Begin Source File
SOURCE=.\Hud\HUDObserver.cpp
# End Source File
# Begin Source File
@@ -761,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
@@ -1586,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"
@@ -1859,6 +1831,14 @@ SOURCE=.\Sound\dscap.h
# End Source File
# Begin Source File
SOURCE=.\sound\fsspeech.cpp
# End Source File
# Begin Source File
SOURCE=.\sound\fsspeech.h
# End Source File
# Begin Source File
SOURCE=.\Sound\midifile.cpp
# End Source File
# Begin Source File
@@ -1895,6 +1875,14 @@ SOURCE=.\Sound\Sound.h
# End Source File
# Begin Source File
SOURCE=.\sound\speech.cpp
# End Source File
# Begin Source File
SOURCE=.\sound\speech.h
# End Source File
# Begin Source File
SOURCE=.\Sound\WinMIDI.cpp
# End Source File
# Begin Source File
@@ -2236,6 +2224,14 @@ SOURCE=.\ExceptionHandler\ExceptionHandler.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\network\fs2ox.cpp
# End Source File
# Begin Source File
SOURCE=.\network\fs2ox.h
# End Source File
# Begin Source File
SOURCE=.\Network\Multi.cpp
# End Source File
# Begin Source File
@@ -2475,5 +2471,141 @@ SOURCE=.\Network\stand_gui.cpp
SOURCE=.\Network\stand_gui.h
# End Source File
# End Group
# Begin Group "Decals"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\decals\decals.cpp
# End Source File
# Begin Source File
SOURCE=.\decals\decals.h
# End Source File
# End Group
# Begin Group "ddsutils"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ddsutils\ddsutils.cpp
# End Source File
# Begin Source File
SOURCE=.\ddsutils\ddsutils.h
# End Source File
# End Group
# Begin Group "Cmdline"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Cmdline\cmdline.cpp
# End Source File
# Begin Source File
SOURCE=.\Cmdline\cmdline.h
# End Source File
# End Group
# Begin Group "fs2open_pxo"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\fs2open_pxo\Client.cpp
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\Client.h
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\protocol.h
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\TCP_Client.cpp
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\TCP_Socket.cpp
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\TCP_Socket.h
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\udpsocket.cpp
# End Source File
# Begin Source File
SOURCE=.\fs2open_pxo\udpsocket.h
# End Source File
# End Group
# Begin Group "Species_Defs"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\species_defs\species_defs.cpp
# End Source File
# Begin Source File
SOURCE=.\species_defs\species_defs.h
# End Source File
# End Group
# Begin Group "irc"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\irc\irc.cpp
# End Source File
# Begin Source File
SOURCE=.\irc\irc.h
# End Source File
# End Group
# Begin Group "openil"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\openil\il_func.cpp
# End Source File
# Begin Source File
SOURCE=.\openil\il_func.h
# End Source File
# End Group
# Begin Group "jpgutils"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\jpgutils\jpgutils.cpp
# End Source File
# Begin Source File
SOURCE=.\jpgutils\jpgutils.h
# End Source File
# End Group
# Begin Group "Autopilot"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\Autopilot\Autopilot.cpp
# End Source File
# Begin Source File
SOURCE=.\Autopilot\Autopilot.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\PreProcDefines.h
# End Source File
# End Target
# End Project
+58 -14
View File
@@ -9,13 +9,47 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
* --Goober5000
*
* Revision 2.3 2003/04/05 11:09:21 Goober5000
* fixed some fiddly bits with scrolling and ui stuff
* --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.
*
* Revision 2.1.2.1 2002/09/24 18:56:41 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -108,7 +142,7 @@
*
* 51 5/19/98 12:56p Hoffoss
* Added some code to help prevent triple-clicking for binding the mouse
* button to an action (why the hell people triple click is beyond me,
* button to an action (why people triple click is beyond me,
* though).
*
* 50 5/19/98 11:11a Lawrance
@@ -306,21 +340,14 @@
#include "freespace2/freespace.h"
#include "controlconfig/controlsconfig.h"
#include "gamesequence/gamesequence.h"
#include "playerman/player.h"
#include "graphics/2d.h"
#include "hud/hudsquadmsg.h"
#include "io/key.h"
#include "io/timer.h"
#include "math.h"
#include "io/mouse.h"
#include "ui/ui.h"
#include "io/joy.h"
#include "bmpman/bmpman.h"
#include "sound/sound.h"
#include "gamesnd/gamesnd.h"
#include "missionui/missionscreencommon.h"
#include "graphics/font.h"
#include "hud/hud.h"
#include "playerman/managepilot.h"
#include "gamehelp/contexthelp.h"
#include "popup/popup.h"
@@ -332,6 +359,12 @@
#include "network/multiutil.h"
#endif
#ifndef NDEBUG
#include "hud/hud.h"
#endif
#define NUM_SYSTEM_KEYS 14
#define NUM_BUTTONS 19
#define NUM_TABS 4
@@ -415,7 +448,7 @@ int Conflict_warning_coords[GR_NUM_RESOLUTIONS][2] = {
int Conflict_stamp = -1;
int Conflict_bright = 0;
#define LIST_BUTTONS_MAX 40
#define LIST_BUTTONS_MAX 42
#define JOY_AXIS 0x80000
static int Num_cc_lines;
@@ -813,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;
@@ -2176,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);
@@ -2448,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;
}
+92 -42
View File
@@ -9,13 +9,45 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfig.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
* $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
*
* Revision 2.5 2003/11/11 02:15:43 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
* --Goober5000
*
* Revision 2.4 2002/12/02 23:52:02 Goober5000
* fixed misspelling
*
* Revision 2.3 2002/12/02 20:47:28 Goober5000
* fixed misspelling of "category" as "catagory"
*
* Revision 2.2 2002/10/19 19:29:27 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.1 2002/10/17 20:40:50 randomtiger
* Added ability to remove HUD ingame on keypress shift O
* So I've added a new key to the bind list and made use of already existing hud removal code.
*
* 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
*
@@ -262,6 +294,7 @@
*
*/
#include "PreProcDefines.h"
#ifndef CONTROLS_CONFIG_H
#define CONTROLS_CONFIG_H
@@ -292,7 +325,8 @@
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 (catagory) it belongs in
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
@@ -309,28 +343,28 @@ typedef struct config_item {
#define TARGET_NEXT 0
#define TARGET_PREV 1
#define TARGET_NEXT_CLOSEST_HOSTILE 2
#define TARGET_PREV_CLOSEST_HOSTILE 3
#define TARGET_NEXT_CLOSEST_HOSTILE 2
#define TARGET_PREV_CLOSEST_HOSTILE 3
#define TOGGLE_AUTO_TARGETING 4
#define TARGET_NEXT_CLOSEST_FRIENDLY 5
#define TARGET_PREV_CLOSEST_FRIENDLY 6
#define TARGET_SHIP_IN_RETICLE 7
#define TARGET_CLOSEST_SHIP_ATTACKING_TARGET 8
#define TARGET_LAST_TRANMISSION_SENDER 9
#define STOP_TARGETING_SHIP 10
#define TARGET_NEXT_CLOSEST_FRIENDLY 5
#define TARGET_PREV_CLOSEST_FRIENDLY 6
#define TARGET_SHIP_IN_RETICLE 7
#define TARGET_CLOSEST_SHIP_ATTACKING_TARGET 8
#define TARGET_LAST_TRANMISSION_SENDER 9
#define STOP_TARGETING_SHIP 10
// targeting a ship's subsystem
#define TARGET_SUBOBJECT_IN_RETICLE 11
#define TARGET_SUBOBJECT_IN_RETICLE 11
#define TARGET_NEXT_SUBOBJECT 12
#define TARGET_PREV_SUBOBJECT 13
#define STOP_TARGETING_SUBSYSTEM 14
// speed matching
#define MATCH_TARGET_SPEED 15
#define TOGGLE_AUTO_MATCH_TARGET_SPEED 16
#define TOGGLE_AUTO_MATCH_TARGET_SPEED 16
// weapons
#define FIRE_PRIMARY 17
#define FIRE_PRIMARY 17
#define FIRE_SECONDARY 18
#define CYCLE_NEXT_PRIMARY 19
#define CYCLE_PREV_PRIMARY 20
@@ -341,19 +375,19 @@ typedef struct config_item {
// controls
#define FORWARD_THRUST 24
#define REVERSE_THRUST 25
#define BANK_LEFT 26
#define BANK_LEFT 26
#define BANK_RIGHT 27
#define PITCH_FORWARD 28
#define PITCH_BACK 29
#define YAW_LEFT 30
#define YAW_RIGHT 31
#define YAW_LEFT 30
#define YAW_RIGHT 31
// throttle control
#define ZERO_THROTTLE 32
#define MAX_THROTTLE 33
#define MAX_THROTTLE 33
#define ONE_THIRD_THROTTLE 34
#define TWO_THIRDS_THROTTLE 35
#define PLUS_5_PERCENT_THROTTLE 36
#define TWO_THIRDS_THROTTLE 35
#define PLUS_5_PERCENT_THROTTLE 36
#define MINUS_5_PERCENT_THROTTLE 37
// squadmate messaging keys
@@ -363,27 +397,27 @@ typedef struct config_item {
#define ATTACK_SUBSYSTEM_MESSAGE 41
#define CAPTURE_MESSAGE 42
#define ENGAGE_MESSAGE 43
#define FORM_MESSAGE 44
#define FORM_MESSAGE 44
#define IGNORE_MESSAGE 45
#define PROTECT_MESSAGE 46
#define COVER_MESSAGE 47
#define WARP_MESSAGE 48
#define WARP_MESSAGE 48
#define REARM_MESSAGE 49
#define TARGET_CLOSEST_SHIP_ATTACKING_SELF 50
#define TARGET_CLOSEST_SHIP_ATTACKING_SELF 50
// Views
#define VIEW_CHASE 51
#define VIEW_EXTERNAL 52
#define VIEW_EXTERNAL_TOGGLE_CAMERA_LOCK 53
#define VIEW_SLEW 54
#define VIEW_EXTERNAL_TOGGLE_CAMERA_LOCK 53
#define VIEW_SLEW 54
#define VIEW_OTHER_SHIP 55
#define VIEW_DIST_INCREASE 56
#define VIEW_DIST_DECREASE 57
#define VIEW_CENTER 58
#define PADLOCK_UP 59
#define PADLOCK_DOWN 60
#define PADLOCK_LEFT 61
#define PADLOCK_DOWN 60
#define PADLOCK_LEFT 61
#define PADLOCK_RIGHT 62
@@ -400,53 +434,69 @@ typedef struct config_item {
#define DECREASE_SHIELD 72
#define INCREASE_ENGINE 73
#define DECREASE_ENGINE 74
#define ETS_EQUALIZE 75
#define ETS_EQUALIZE 75
#define SHIELD_EQUALIZE 76
#define SHIELD_XFER_TOP 77
#define SHIELD_XFER_BOTTOM 78
#define SHIELD_XFER_LEFT 79
#define SHIELD_XFER_RIGHT 80
#define XFER_SHIELD 81
#define XFER_SHIELD 81
#define XFER_LASER 82
#define SHOW_DAMAGE_POPUP 83 // AL: this binding should be removing next time the controls are reorganized
#define BANK_WHEN_PRESSED 84
#define SHOW_NAVMAP 85
#define ADD_REMOVE_ESCORT 86
#define ESCORT_CLEAR 87
#define TARGET_NEXT_ESCORT_SHIP 88
#define ESCORT_CLEAR 87
#define TARGET_NEXT_ESCORT_SHIP 88
#define TARGET_CLOSEST_REPAIR_SHIP 89
#define TARGET_NEXT_UNINSPECTED_CARGO 90
#define TARGET_PREV_UNINSPECTED_CARGO 91
#define TARGET_CLOSEST_REPAIR_SHIP 89
#define TARGET_NEXT_UNINSPECTED_CARGO 90
#define TARGET_PREV_UNINSPECTED_CARGO 91
#define TARGET_NEWEST_SHIP 92
#define TARGET_NEXT_LIVE_TURRET 93
#define TARGET_PREV_LIVE_TURRET 94
#define TARGET_NEXT_LIVE_TURRET 93
#define TARGET_PREV_LIVE_TURRET 94
#define TARGET_NEXT_BOMB 95
#define TARGET_PREV_BOMB 96
// multiplayer messaging keys
#define MULTI_MESSAGE_ALL 97
#define MULTI_MESSAGE_FRIENDLY 98
#define MULTI_MESSAGE_FRIENDLY 98
#define MULTI_MESSAGE_HOSTILE 99
#define MULTI_MESSAGE_TARGET 100
// multiplayer misc keys
#define MULTI_OBSERVER_ZOOM_TO 101
#define MULTI_OBSERVER_ZOOM_TO 101
#define TIME_SPEED_UP 102
#define TIME_SLOW_DOWN 103
#define TOGGLE_HUD_CONTRAST 104
#define TOGGLE_HUD_CONTRAST 104
#define MULTI_TOGGLE_NETINFO 105
#define MULTI_SELF_DESTRUCT 106
#define MULTI_SELF_DESTRUCT 106
#define TOGGLE_HUD 107
#define RIGHT_SLIDE_THRUST 108
#define LEFT_SLIDE_THRUST 109
#define UP_SLIDE_THRUST 110
#define DOWN_SLIDE_THRUST 111
#define HUD_TARGETBOX_TOGGLE_WIREFRAME 112
#if defined(ENABLE_AUTO_PILOT)
//AutoPilot - Kazan
#define AUTO_PILOT_TOGGLE 113
#define NAV_CYCLE 114
// this should be the total number of control action defines above (or last define + 1)
#define CCFG_MAX 107
#define CCFG_MAX 115
#else
#define CCFG_MAX 113
#endif
extern int Failed_key_index;
extern int Invert_heading;
@@ -9,13 +9,42 @@
/*
* $Logfile: /Freespace2/code/ControlConfig/ControlsConfigCommon.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.4 2003/11/11 02:15:43 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
* --Goober5000
*
* Revision 2.3 2002/10/19 19:29:27 bobboau
* inital commit, trying to get most of my stuff into FSO, there should be most of my fighter beam, beam rendering, beam shield hit, ABtrails, and ssm stuff. one thing you should be happy to know is the beam texture tileing is now set in the beam section section of the weapon table entry
*
* Revision 2.2 2002/10/17 20:40:50 randomtiger
* Added ability to remove HUD ingame on keypress shift O
* So I've added a new key to the bind list and made use of already existing hud removal code.
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -30,7 +59,7 @@
* minor key name change in german
*
* 12 10/29/99 6:10p Jefff
* squashed the damned y/z german issues once and for all
* squashed the y/z german issues once and for all
*
* 11 10/28/99 11:16p Jefff
* Changed some german key names. Made key translations always use the
@@ -380,6 +409,7 @@
#include "io/joy.h"
#include "localization/localize.h"
#define TARGET_TAB 0
#define SHIP_TAB 1
#define WEAPON_TAB 2
@@ -402,141 +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"},
{ -1, -1, -1, "" }
// Misc
{ 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, false, "Toggle Auto Pilot"},
{ KEY_ALTED | KEY_N, -1, COMPUTER_TAB, false, "Cycle Nav Points"},
#endif
{ -1, -1, -1, false, "" }
};
char *Scan_code_text_german[] = {
+102 -15
View File
@@ -9,13 +9,75 @@
/*
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.cpp $
* $Revision: 2.2 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.9 2004/02/20 04:29:53 bobboau
* pluged memory leaks,
* 3D HTL lasers (they work perfictly)
* and posably fixed Turnsky's shinemap bug
*
* Revision 2.8 2004/01/24 15:52:25 randomtiger
* I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window.
* In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from.
*
* Revision 2.7 2003/08/21 20:54:38 randomtiger
* Fixed switching - RT
*
* Revision 2.6 2003/07/15 02:58:08 phreak
* the cutscene section in the techroom does not append *.mve onto a filename
*
* Revision 2.5 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.
*
* Revision 2.4 2002/08/27 13:38:57 penguin
* Moved DirectX8 stuff to directx8 branch; reverted to previous
*
* Revision 2.2.2.4 2002/09/24 18:56:41 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.2.2.3 2002/08/28 21:47:02 randomtiger
* Tiny change to DX branch to keep movie code optional (default off)
*
* Revision 2.2.2.2 2002/08/28 12:39:35 randomtiger
* OK, this should be a commit to the DX branch or Im going to be in a lot of trouble.
* The movie and dx8show files have been cleaned up big time.
* My debug system is in but has NO EFFECT at all unless a compiler flag is turned on, check h file for details.
* Aside from that a few changes to help the movie code work properly.
* Works on most things including GF4 and Voodoo 3. However may not work properly on a voodoo 2.
* Im going to leave this as a bug for now, serves you right for buying voodoo!
*
* Revision 2.2.2.1 2002/08/27 13:19:26 penguin
* Moved to directx8 branch
*
* Revision 2.3 2002/08/18 19:48:29 randomtiger
* Added new lib files: strmiids and ddraw to get dshow working
* Added new command line parameter to active direct show movie play: -dshowvid
* Uncommented movie_play calls and includes
*
* Revision 2.2 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.1 2002/07/07 19:55:58 penguin
* Back-port to MSVC
*
@@ -152,17 +214,17 @@
#include "cutscene/cutscenes.h"
#include "ui/ui.h"
#include "cfile/cfile.h"
#include "gamesnd/gamesnd.h"
#include "gamesequence/gamesequence.h"
#include "freespace2/freespace.h"
#include "io/key.h"
#include "bmpman/bmpman.h"
// #include "movie.h"
#include "movie.h"
#include "popup/popup.h"
#include "menuui/mainhallmenu.h"
#include "globalincs/alphacolors.h"
#include "localization/localize.h"
#include "parse/parselo.h"
char *Cutscene_bitmap_name[GR_NUM_RESOLUTIONS] = {
"ViewFootage",
@@ -179,10 +241,15 @@ int Description_index;
cutscene_info Cutscenes[MAX_CUTSCENES];
//extern int All_movies_enabled; // If set, all movies may be viewed. Keyed off cheat code.
void cutsceen_close(){
for(int i = 0; i<MAX_CUTSCENES; i++)
if(Cutscenes[i].description)free(Cutscenes[i].description);
}
// initialization stuff for cutscenes
void cutscene_init()
{
atexit(cutsceen_close);
char buf[MULTITEXT_LENGTH];
int rval;
@@ -252,9 +319,28 @@ int cutscenes_get_cd_num( char *filename )
void cutscene_mark_viewable(char *filename)
{
int i;
char cut_file[MAX_FILENAME_LEN];
char file[MAX_FILENAME_LEN];
Assert(filename);
// strip off extension
strcpy( file, filename );
char *p = strchr( file, '.' );
if ( p ) {
*p = 0;
}
// change to lower case
strlwr(file);
for (i = 0; i < Num_cutscenes; i++ ) {
if ( !stricmp(Cutscenes[i].filename, filename) ) {
// change the cutscene file name to lower case
strcpy(cut_file, Cutscenes[i].filename);
strlwr(cut_file);
// see if the stripped filename matches the cutscene filename
if ( strstr(cut_file, file) != NULL ) {
Cutscenes_viewable |= (1<<i);
return;
}
@@ -422,7 +508,7 @@ int cutscenes_validate_cd(char *mve_name, int prompt_for_cd)
if ( num_attempts++ > 5 ) {
cd_present = 0;
break;
}
}
#else
cd_present = 0;
break;
@@ -433,30 +519,31 @@ int cutscenes_validate_cd(char *mve_name, int prompt_for_cd)
return cd_present;
#else // !WIN32
return 0;
#endif // ifdef WIN32
#endif // ifdef WIN32
}
void cutscenes_screen_play()
{
char name[MAX_FILENAME_LEN], *full_name;
char name[MAX_FILENAME_LEN]; // *full_name
int which_cutscene;
Assert( (Selected_line >= 0) && (Selected_line < Num_files) );
which_cutscene = Cutscene_list[Selected_line];
strcpy(name, Cutscenes[which_cutscene].filename );
full_name = cf_add_ext(name, NOX(".mve"));
// full_name = cf_add_ext(name, NOX(".mve"));
main_hall_stop_music();
int rval = movie_play(name);
main_hall_start_music();
// no soup for you!
/*
int rval = movie_play(full_name);
if ( !rval ) {
char str[256];
sprintf(str, XSTR( "Unable to play movie %s.", 204), Cutscenes[which_cutscene].name );
popup(0, 1, POPUP_OK, str );
}
*/
}
void cutscenes_screen_scroll_line_up()
+13 -4
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/Cutscene/Cutscenes.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -50,10 +57,12 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
#define _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
#include "parse/parselo.h"
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
#define MAX_CUTSCENES 10
+253
View File
@@ -0,0 +1,253 @@
/*
* 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/cutscene/movie.cpp $
* $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: $
*/
#include <windows.h>
#include "movie.h"
#include "directx/dx8show.h"
#include "osapi/osapi.h"
#include "cmdline/cmdline.h"
#include "debugconsole/dbugfile.h"
#include "cfile/cfile.h"
#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
void process_messages()
{
MSG msg;
while(PeekMessage(&msg, (HWND) os_get_window(), 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
#include "graphics/grd3dinternal.h"
// filename - file to search for
// out_name - output, full path to file
// returns non-zero if file is found
int movie_find(char *filename, char *out_name)
{
char full_path[MAX_PATH];
char tmp_name[MAX_PATH];
char search_name[MAX_PATH];
int i, size, offset = 0;
const int NUM_EXT = 2;
const char *movie_ext[NUM_EXT] = { ".avi", ".mpg" };
if (out_name == NULL) {
return 0;
}
// remove extension
strcpy( tmp_name, filename );
char *p = strchr( tmp_name, '.' );
if ( p ) {
*p = 0;
}
for (i=0; i<NUM_EXT; i++) {
strcpy( search_name, tmp_name );
strcat( search_name, movie_ext[i] );
// try and find the file
if ( cf_find_file_location(search_name, CF_TYPE_ANY, full_path, &size, &offset, 0) ) {
// if it's not in a packfile then we're done
if (offset == 0) {
strcpy( out_name, full_path );
return 1;
}
}
// clear old string
strcpy( search_name, "" );
}
return 0;
}
// Play one movie
bool movie_play(char *name)
{
// mark the movie as viewable to the player when in a campaign
// do this before anything else so that we're sure the movie is available
// to the player even if it's not going to play right now
if (Game_mode & GM_CAMPAIGN_MODE) {
cutscene_mark_viewable(name);
}
extern int Is_standalone;
if(Is_standalone) return false;
if(Cmdline_dnoshowvid) return false;
if(Cmdline_window) return false;
char full_name[MAX_PATH];
int rc = 0;
rc = movie_find(name, full_name);
if (!rc) {
DBUGFILE_OUTPUT_1("MOVIE ERROR: Cant open movie file %s", name);
return false;
} else {
DBUGFILE_OUTPUT_1("About to play: %s", full_name);
}
process_messages();
// This is a bit of a hack but it works nicely
if(gr_screen.mode == GR_DIRECT3D)
{
GlobalD3DVars::D3D_activate = 0;
GlobalD3DVars::lpD3DDevice->EndScene();
GlobalD3DVars::lpD3DDevice->Present(NULL,NULL,NULL,NULL);
// 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;
HDC clear_hdc = BeginPaint((HWND) os_get_window(),&paint_info);
if(clear_hdc)
{
POINT points[4] = {
{0,0},
{gr_screen.max_w,0},
{gr_screen.max_w, gr_screen.max_h},
{0, gr_screen.max_h}};
HBRUSH hBrush = CreateSolidBrush(0x00000000);
HBRUSH hOldBrush = (HBRUSH)SelectObject(clear_hdc, hBrush);
SelectObject(clear_hdc, hBrush);
Polygon(clear_hdc, points, 4);
SelectObject(clear_hdc, hOldBrush);
DeleteObject(hBrush);
EndPaint((HWND) os_get_window(),&paint_info);
}
process_messages();
if(OpenClip((HWND) os_get_window(), full_name))
{
do
{
// Give system threads time to run (and don't sample user input madly)
Sleep(100);
MSG msg;
while(PeekMessage(&msg, (HWND) os_get_window(), 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
if(msg.message == WM_ERASEBKGND)
{
continue;
}
PassMsgToVideoWindow((HWND) os_get_window(), msg.message, msg.wParam, msg.lParam);
if(msg.message == WM_PAINT)
{
}
if(msg.message != WM_KEYDOWN)
{
// DefWindowProc((HWND) os_get_window(), msg.message, msg.wParam, msg.lParam);
DispatchMessage(&msg);
continue;
}
switch(msg.wParam )
{
// Quits movie if escape, space or return is pressed
case VK_ESCAPE:
case VK_SPACE:
case VK_RETURN:
{
// Terminate movie playback early
CloseClip((HWND) os_get_window());
GlobalD3DVars::D3D_activate = 1;
return true;
}
}
}
}
// Stream bit of the movie then handle windows messages
while(dx8show_stream_movie() == false);
}
// We finished playing the movie
CloseClip((HWND) os_get_window());
if (gr_screen.mode == GR_DIRECT3D) {
GlobalD3DVars::D3D_activate = 1;
}
return true;
}
bool movie_play_two(char *name1, char *name2)
{
bool result1 = movie_play(name1);
process_messages();
bool result2 = movie_play(name2);
return result1 && result2;
}
#else
// Stubs, preprocessor calls were making the win32 code more complex for no good reason.
// Using stubs instead.
bool movie_play(char *name) {return true;}
bool movie_play_two(char *name1, char *name2) {return true;}
#endif
+9
View File
@@ -0,0 +1,9 @@
#include "PreProcDefines.h"
#ifndef _MOVIE_HEADER_FILE
#define _MOVIE_HEADER_FILE
bool movie_play(char *name);
bool movie_play_two(char *name1, char *name2);
#endif
+202
View File
@@ -0,0 +1,202 @@
#include "ddsutils/ddsutils.h"
#include "cfile/cfile.h"
int Texture_compression_enabled=0;
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];
int retval = DDS_ERROR_NONE;
int ct = DDS_UNCOMPRESSED;
int bits = 0;
if (img_cfp == NULL) {
// this better not happen.. ever
Assert(filename != NULL);
// make sure there is an extension
strcpy(real_name, filename);
char *p = strchr(real_name, '.');
if (p) { *p=0; }
strcat(real_name, ".dds");
// try to open the file
ddsfile = cfopen(real_name, "rb");
// file not found
if (ddsfile == NULL)
return DDS_ERROR_INVALID_FILENAME;
} else {
ddsfile = img_cfp;
}
memset(code, 0, sizeof(code));
// 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;
}
// stuff important info
if (bpp)
*bpp = bits;
if (compression_type)
*compression_type = ct;
if (width)
*width = dds_header.dwWidth;
if (height)
*height = dds_header.dwHeight;
if (levels)
*levels = dds_header.dwMipMapCount;
if (img_cfp == NULL) {
// close file and return
cfclose(ddsfile);
ddsfile = NULL;
}
return retval;
}
//reads pixel info from a dds file
int dds_read_bitmap(char *filename, ubyte **data, ubyte *bpp)
{
int retval;
int w,h,ct,lvl;
int size = 0, bits = 0;
CFILE *cfp;
char real_name[MAX_FILENAME_LEN];
// this better not happen.. ever
Assert(filename != NULL);
// 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(real_name, "rb");
// 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;
}
cfseek(cfp, DDS_OFFSET, CF_SEEK_SET);
// read in the data
cfread(*data, 1, size, cfp);
if (bpp)
*bpp = (ubyte)bits;
// we look done here
cfclose(cfp);
return DDS_ERROR_NONE;
}
//returns string representation of DDS_** error code
const char *dds_error_string(int code)
{
switch (code)
{
case DDS_ERROR_NONE:
return "No error";
case DDS_ERROR_NO_MEM:
return "Insufficient memory";
case DDS_ERROR_INVALID_FILENAME:
return "File not found";
case DDS_ERROR_BAD_HEADER:
return "Filecode did not equal \"DDS \"";
case DDS_ERROR_INVALID_FORMAT:
return "File was compressed, but it was DXT2 or DXT4";
case DDS_ERROR_UNSUPPORTED:
return "*.DDS files must be uncompressed or use DXT1, DXT3, or DXT5 compression";
default:
return "Abort, retry, fail?";
}
//get a warning otherwise
return "Abort, retry, fail?";
}
+91
View File
@@ -0,0 +1,91 @@
//header file to load .dds files
//these use dxtc texture compression
#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_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
#ifndef MAKEFOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
#endif //defined(MAKEFOURCC)
// FOURCC codes for DX compressed-texture pixel formats
#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
#define DDS_FILECODE "DDS "
#ifndef DUMMYUNIONNAMEN
#if defined(__cplusplus) || !defined(NONAMELESSUNION)
#define DUMMYUNIONNAMEN(n)
#else
#define DUMMYUNIONNAMEN(n) u##n
#endif
#endif
//these structures are the headers for a dds file
typedef struct _DDSCAPS2
{
DWORD dwCaps1;
DWORD dwCaps2;
DWORD Reserved[2];
} DDSCAPS2;
typedef struct _DDSURFACEDESC2
{
DWORD dwSize; // size of the DDSURFACEDESC structure
DWORD dwFlags; // determines what fields are valid
DWORD dwHeight; // height of surface to be created
DWORD dwWidth; // width of input surface
DWORD dwPitchOrLinearSize;
DWORD dwDepth;
DWORD dwMipMapCount;
DWORD dwReserved1[11];
DDPIXELFORMAT ddpfPixelFormat;
DDSCAPS2 ddsCaps; // direct draw surface capabilities
DWORD dwReserved2;
} DDSURFACEDESC2, FAR* LPDDSURFACEDESC2;
#define DDS_OFFSET 4+sizeof(DDSURFACEDESC2) //place where the data starts -- should be 128
//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, 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, ubyte **data, ubyte *bpp);
//returns a string from a DDS error code
const char* dds_error_string(int code);
extern int Texture_compression_enabled;
#endif //__DDS_H
+65 -9
View File
@@ -9,13 +9,43 @@
/*
* $Logfile: /Freespace2/code/Debris/Debris.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.4 2003/10/15 22:03:24 Kazan
* Da Species Update :D
*
* Revision 2.3 2003/04/29 01:03:22 Goober5000
* implemented the custom hitpoints mod
* --Goober5000
*
* Revision 2.2 2003/03/19 12:29:01 unknownplayer
* Woohoo! Killed two birds with one stone!
* Fixed the 'black screen around dialog boxes' problem and also the much more serious freezing problem experienced by Goober5000. It wasn't a crash, just an infinite loop. DX8 merge is GO! once again :)
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -220,21 +250,21 @@
* $NoKeywords: $
*/
#include "render/3d.h"
#include "bmpman/bmpman.h"
#include "object/object.h"
#include "debris/debris.h"
#include "render/3d.h"
#include "fireball/fireballs.h"
#include "radar/radar.h"
#include "mission/missionparse.h" // For MAX_SPECIES_NAMES
#include "gamesnd/gamesnd.h"
#include "object/objectsnd.h"
#include "globalincs/linklist.h"
#include "globalincs/systemvars.h"
#include "particle/particle.h"
#include "freespace2/freespace.h"
#include "object/objcollide.h"
#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"
@@ -242,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
@@ -259,11 +292,30 @@ int Debris_inited = 0;
int Debris_model = -1;
int Debris_vaporize_model = -1;
int Debris_num_submodels = 0;
#if defined(MORE_SPECIES)
char Debris_texture_files[MAX_SPECIES_NAMES][MAX_DEBRIS_TNAME_LEN+1];
/*char * Debris_texture_files[MAX_SPECIES_NAMES] = {
NOX("debris01a"), // Terran
NOX("debris01b"), // Species B
NOX("debris01c"), // Shivan
NOX("debris01a"), // Ancient
NOX("debris01a"), // User1
NOX("debris01a"), // User2
NOX("debris01a"), // User3
NOX("debris01a"), // User4
};*/
#else
char * Debris_texture_files[MAX_SPECIES_NAMES] = {
NOX("debris01a"), // Terran
NOX("debris01b"), // Species B
NOX("debris01c"), // Shivan
};
#endif
int Debris_textures[MAX_SPECIES_NAMES];
@@ -346,7 +398,11 @@ void debris_page_in()
Debris_vaporize_model = model_load( NOX("debris02.pof"), 0, NULL );
#if defined(MORE_SPECIES)
for (i=0; i<MAX_SPECIES_NAMES && i<True_NumSpecies; i++ ) {
#else
for (i=0; i<MAX_SPECIES_NAMES; i++ ) {
#endif
nprintf(( "Paging", "Paging in debris texture '%s'\n", Debris_texture_files[i] ));
Debris_textures[i] = bm_load( Debris_texture_files[i] );
if ( Debris_textures[i] < 0 ) {
@@ -803,7 +859,7 @@ object *debris_create(object *source_obj, int model_num, int submodel_num, vecto
// -- No long need shield: bset_shield_strength(obj, 100.0f); // Hey! Set to some meaningful value!
if (source_obj->type == OBJ_SHIP) {
obj->hull_strength = Ship_info[Ships[source_obj->instance].ship_info_index].initial_hull_strength/8.0f;
obj->hull_strength = Ships[source_obj->instance].ship_initial_hull_strength/8.0f;
} else
obj->hull_strength = 10.0f;
@@ -1006,7 +1062,7 @@ void debris_hit(object *debris_obj, object *other_obj, vector *hitpos, float dam
// Return true if hit, else return false.
//
#pragma warning ( push )
#pragma warning ( disable : 4701 )
#pragma warning ( disable : 4701 ) // possible use of variable without initialization
int debris_check_collision(object *pdebris, object *other_obj, vector *hitpos, collision_info_struct *debris_hit_info)
{
mc_info mc;
+13 -3
View File
@@ -9,13 +9,20 @@
/*
* $Logfile: /Freespace2/code/Debris/Debris.h $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:21 $
* $Author: penguin $
* $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
*
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -138,9 +145,12 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _DEBRIS_H
#define _DEBRIS_H
#include "globalincs/pstypes.h"
struct object;
struct CFILE;
+24 -5
View File
@@ -9,13 +9,32 @@
/*
* $Logfile: /Freespace2/code/DebugConsole/Console.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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.
*
* Revision 2.1.2.1 2002/09/24 18:56:41 randomtiger
* DX8 branch commit
*
* This is the scub of UP's previous code with the more up to date RT code.
* For full details check previous dev e-mails
*
* Revision 2.1 2002/08/01 01:41:04 penguin
* The big include file move
*
* Revision 2.0 2002/06/03 04:02:21 penguin
* Warpcore CVS sync
*
@@ -105,13 +124,13 @@
#include <string.h>
#include "globalincs/pstypes.h"
#include "freespace2/freespace.h"
#include "graphics/font.h"
#include "io/timer.h"
#include "graphics/2d.h"
#include "io/key.h"
#include "globalincs/alphacolors.h"
#include "osapi/osapi.h"
#include "debugconsole/dbugfile.h"
#define MAX_COMMANDS 300
+408
View File
@@ -0,0 +1,408 @@
#ifdef _WIN32
#include <windows.h>
#endif
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include "dbugfile.h"
#pragma warning(disable:4711) // function selected for inlining
int dbugfile_counters[MAX_COUNTERS];
bool dbugfile_init_var = false;
char dbugfile_filename[512];
void dbugfile_output(char *buffer)
{
if(dbugfile_init_var == false)
{
return;
}
FILE *fp = fopen(dbugfile_filename, "a");
if(fp == NULL)
{
return;
}
fwrite(buffer, sizeof(char) * strlen(buffer), 1, fp);
fclose(fp);
}
void dbugfile_init()
{
// Clear the counters
memset(dbugfile_counters, 0, sizeof(int) * MAX_COUNTERS);
char big_buffer[1000];
char temp_buff[512];
dbugfile_filename[0] = '\0';
#ifdef _WIN32
char path[MAX_PATH];
GetCurrentDirectory(MAX_PATH, path);
int path_len = strlen(path);
if(path[path_len - 1] != '\\')
{
path[path_len] = '\\';
path[path_len + 1] = '\0';
}
strcpy(dbugfile_filename, path);
#endif
strcat(dbugfile_filename, "DBUG-");
strcpy(big_buffer, "DBUGFILE Active: ");
#ifdef _WIN32
{
unsigned long len = 512;
GetUserName(temp_buff, &len);
strcat(dbugfile_filename, temp_buff);
strcat(big_buffer, temp_buff);
strcat(dbugfile_filename, "-");
strcat(big_buffer, " ");
}
#endif
_tzset();
// Display operating system-style date and time.
_strdate( temp_buff);
strcat(dbugfile_filename, "D(");
strcat(dbugfile_filename,temp_buff);
strcat(big_buffer,temp_buff);
strcat(dbugfile_filename, ") T(");
strcat(big_buffer, " ");
_strtime( temp_buff);
strcat(dbugfile_filename,temp_buff);
strcat(big_buffer,temp_buff);
strcat(dbugfile_filename, ").txt");
strcat(big_buffer, "\n");
// Remove invalid slash chars
int len = strlen(dbugfile_filename);
while(len >= 2)
{
if(dbugfile_filename[len] == '/' || dbugfile_filename[len] == ':')
{
dbugfile_filename[len] = '-';
}
len--;
}
// open file
// Uncomment this to see where the file is going
//MessageBox(NULL, dbugfile_filename, "das", MB_OK);
FILE *fp = fopen(dbugfile_filename, "w");
if(fp == NULL)
{
return;
}
fwrite(big_buffer, sizeof(char) * strlen(big_buffer), 1, fp);
#ifdef _WIN32
// detect OS type
OSVERSIONINFO version_info;
version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if(GetVersionEx(&version_info) != false)
{
char *error = "Error in detecting OS version";
char *version = error;
switch(version_info.dwMajorVersion)
{
case 4:
{
if(version_info.dwMinorVersion == 0)
{
version = "Windows 95";
}
else if(version_info.dwMinorVersion == 10)
{
version = "Windows 98";
}
else if(version_info.dwMinorVersion == 90)
{
version = "Windows Me";
}
break;
}
case 5:
{
if(version_info.dwMinorVersion == 0)
{
version = "Windows 2000";
}
else if(version_info.dwMinorVersion == 1)
{
version = "Windows XP";
}
break;
}
}
char *release_type = NULL;
#ifdef _DEBUG
release_type = "Debug";
#else
release_type = "Release";
#endif
sprintf(big_buffer, "OS: %s %s, ", version, release_type);
}
fwrite(big_buffer, sizeof(char) * strlen(big_buffer), 1, fp);
char exe_name[MAX_PATH];
GetModuleFileName(NULL, exe_name, MAX_PATH);
strcat(exe_name, "\n");
fwrite(exe_name, sizeof(char) * strlen(exe_name), 1, fp);
#endif
fclose(fp);
dbugfile_init_var = true;
}
void dbugfile_deinit()
{
dbugfile_output("Normal end");
dbugfile_init_var = false;
}
void dbugfile_sprintf(int line, char *file, const char *format, ...)
{
if(dbugfile_init_var == false)
{
return;
}
// find last slash (for PC) to crop file path
char *ptr = strrchr(file, '\\');
if(ptr == NULL)
{
ptr = file;
}
else
{
ptr++;
}
char buffer[1000];
int i = sprintf(buffer, "[%s,%4d] ", ptr, line);
va_list ap;
char *p, *sval;
long ival;
double dval;
// Add each extra parameter to string
va_start(ap, format);
for(p = (char *) format; *p; p++)
{
if(*p != '%')
{
*(buffer + i) = *p;
i++;
continue;
}
p++;
switch(*p)
{
case 'd':
{
ival = va_arg(ap, int);
i += sprintf(buffer+i,"%d", ival);
break;
}
case 'c':
{
ival = va_arg(ap, char);
buffer[i] = (char) ival;
i++;
break;
}
case 'x':
{
ival = va_arg(ap, int);
i += sprintf(buffer+i,"%x", ival);
break;
}
case 'f':
{
dval = va_arg(ap, double);
i += sprintf(buffer+i,"%f", dval);
break;
}
case 's':
{
for(sval = va_arg(ap, char *); *sval; sval++)
{
*(buffer + i++) = *sval;
}
break;
}
default:
{
i += sprintf(buffer+i,"N/A: %%%c", *p);
break;
}
}
}
va_end(ap);
i += sprintf(buffer + i, "\n");
dbugfile_output(buffer);
}
void dbugfile_print_matrix_4x4(int line, char *file, float *matrix, char *text)
{
if(dbugfile_init_var == false)
{
return;
}
if(matrix == NULL)
{
return;
}
// find last slash (for PC) to crop file path
char *ptr = strrchr(file, '\\');
if(ptr == NULL)
{
ptr = file;
}
else
{
ptr++;
}
if(text == NULL)
{
text = "";
}
char buffer[1000];
sprintf(buffer,"[%s,%4d] Matrix %s:\n"
"%f %f %f %f\n"
"%f %f %f %f\n"
"%f %f %f %f\n"
"%f %f %f %f\n",
ptr,line, text,
matrix[0],
matrix[1],
matrix[2],
matrix[3],
matrix[4],
matrix[5],
matrix[6],
matrix[7],
matrix[8],
matrix[9],
matrix[10],
matrix[11],
matrix[12],
matrix[13],
matrix[14],
matrix[15]);
dbugfile_output(buffer);
}
void dbugfile_print_matrix_3x3(int line, char *file, float *matrix, char *text)
{
if(dbugfile_init_var == false)
{
return;
}
if(matrix == NULL)
{
return;
}
// find last slash (for PC) to crop file path
char *ptr = strrchr(file, '\\');
if(ptr == NULL)
{
ptr = file;
}
else
{
ptr++;
}
if(text == NULL)
{
text = "";
}
char buffer[1000];
sprintf(buffer,"[%s,%4d] Matrix %s:\n"
"%f %f %f\n"
"%f %f %f\n"
"%f %f %f\n",
ptr,line, text,
matrix[0],
matrix[1],
matrix[2],
matrix[3],
matrix[4],
matrix[5],
matrix[6],
matrix[7],
matrix[8]);
dbugfile_output(buffer);
}
void dbugfile_print_counter(int line, char *file, int counter_num, char *string)
{
char buffer[1000];
strcpy(buffer, string);
strcat(buffer, " %d");
dbugfile_sprintf(line, file, buffer, dbugfile_counters[counter_num]);
}
+67
View File
@@ -0,0 +1,67 @@
#include "PreProcDefines.h"
#ifndef _DBUGFILE_HEADER_
#define _DBUGFILE_HEADER_
#define MAX_COUNTERS 10
void dbugfile_init();
void dbugfile_deinit();
void dbugfile_sprintf(int line, char *file, const char *format, ...);
void dbugfile_print_matrix_3x3(int line, char *file, float *matrix, char *text);
void dbugfile_print_matrix_4x4(int line, char *file, float *matrix, char *text);
void dbugfile_print_counter(int line, char *file, int counter_num, char *string);
#ifdef DBUGFILE_ACTIVE
#define DBUGFILE_INIT() dbugfile_init();
#define DBUGFILE_DEINIT() dbugfile_deinit();
#define DBUGFILE_OUTPUT_0(t) dbugfile_sprintf(__LINE__, __FILE__, t);
#define DBUGFILE_OUTPUT_1(t,a) dbugfile_sprintf(__LINE__, __FILE__, t,a);
#define DBUGFILE_OUTPUT_2(t,a,b) dbugfile_sprintf(__LINE__, __FILE__, t,a,b);
#define DBUGFILE_OUTPUT_3(t,a,b,c) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c);
#define DBUGFILE_OUTPUT_4(t,a,b,c,d) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d);
#define DBUGFILE_OUTPUT_5(t,a,b,c,d,e) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d,e);
#define DBUGFILE_OUTPUT_6(t,a,b,c,d,e,f) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d,e,f);
#define DBUGFILE_OUTPUT_7(t,a,b,c,d,e,f,g) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d,e,f,g);
#define DBUGFILE_OUTPUT_8(t,a,b,c,d,e,f,g,h) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d,e,f,g,h);
#define DBUGFILE_OUTPUT_9(t,a,b,c,d,e,f,g,h,i) dbugfile_sprintf(__LINE__, __FILE__, t,a,b,c,d,e,f,g,h,i);
#define DBUGFILE_OUTPUT_MATRIX_3X3(m,t) dbugfile_print_matrix_3x3(__LINE__, __FILE__, m,t);
#define DBUGFILE_OUTPUT_MATRIX_4X4(m,t) dbugfile_print_matrix_4x4(__LINE__, __FILE__, m,t);
extern int dbugfile_counters[MAX_COUNTERS];
#define DBUGFILE_INC_COUNTER(n) if(n < MAX_COUNTERS) dbugfile_counters[n]++;
#define DBUGFILE_DEC_COUNTER(n) if(n < MAX_COUNTERS) dbugfile_counters[n]--;
#define DBUGFILE_OUTPUT_COUNTER(n,s) dbugfile_print_counter(__LINE__, __FILE__, n, s);
#else
#define DBUGFILE_INIT() ;
#define DBUGFILE_DEINIT() ;
#define DBUGFILE_OUTPUT_0(t) ;
#define DBUGFILE_OUTPUT_1(t,a) ;
#define DBUGFILE_OUTPUT_2(t,a,b) ;
#define DBUGFILE_OUTPUT_3(t,a,b,c) ;
#define DBUGFILE_OUTPUT_4(t,a,b,c,d) ;
#define DBUGFILE_OUTPUT_5(t,a,b,c,d,e) ;
#define DBUGFILE_OUTPUT_6(t,a,b,c,d,e,f) ;
#define DBUGFILE_OUTPUT_7(t,a,b,c,d,e,f,g) ;
#define DBUGFILE_OUTPUT_8(t,a,b,c,d,e,f,g,h) ;
#define DBUGFILE_OUTPUT_9(t,a,b,c,d,e,f,g,h,i) ;
#define DBUGFILE_OUTPUT_MATRIX_3X3(m,t) ;
#define DBUGFILE_OUTPUT_MATRIX_4X4(m,t) ;
#define DBUGFILE_INC_COUNTER(n) ;
#define DBUGFILE_DEC_COUNTER(n) ;
#define DBUGFILE_OUTPUT_COUNTER(n,s) ;
#endif
#endif
+226
View File
@@ -0,0 +1,226 @@
/*
* Code created by Thomas Whittaker (RT) for a Freespace 2 source code project
*
* You may not sell or otherwise commercially exploit the source or things you
* created based on the source.
*
*/
/*
* This module is intended as a debug tool to measure the speed of blocks of code and display
* that information as coloured bars across the top of the screen.
*
* This allows interactive measuring of components of the code, very useful for optimisztion.
*/
#ifdef _WIN32
#include <windows.h>
#include <winbase.h>
#include "timerbar.h"
#include "globalincs\pstypes.h"
// Internal structure for handling frame data
typedef struct
{
LARGE_INTEGER start_value;
LARGE_INTEGER total_value;
LARGE_INTEGER average;
LARGE_INTEGER frame_total;
} timerbar_profile;
timerbar_profile profiles[MAX_NUM_TIMERBARS];
int timerbar_current_profile = 0;
LARGE_INTEGER timerbar_ultimate_start_value;
LARGE_INTEGER timerbar_last_start_value;
// Data needed for push and pop functionality
const MAX_TB_STACK_SIZE = 100;
int timerbar_stack[MAX_TB_STACK_SIZE];
int timerbar_current_stack_layer = 0;
/*
*
*
*
*/
void timerbar_push(int value)
{
if(timerbar_current_stack_layer >= MAX_TB_STACK_SIZE)
{
// To many pushs, this must be a bug
// Someone is letting code miss the pops, check for early retuns
Assert(!(timerbar_current_stack_layer >= MAX_TB_STACK_SIZE));
return;
}
timerbar_stack[timerbar_current_stack_layer] = timerbar_current_profile;
timerbar_current_stack_layer++;
timerbar_switch_type(value);
}
/*
*
*
*
*/
void timerbar_pop()
{
timerbar_current_stack_layer--;
if(timerbar_current_stack_layer < 0)
{
Assert(!(timerbar_current_stack_layer < 0));
timerbar_current_stack_layer = 0;
return;
}
timerbar_switch_type(timerbar_stack[timerbar_current_stack_layer]);
}
// This pointer holds the draw function to use or NULL
void (*draw_func_ptr)(int colour, float x, float y, float w, float h) = NULL;
void timerbar_start_frame()
{
timerbar_current_stack_layer = 0;
timerbar_current_profile = 0;
if(QueryPerformanceCounter(&timerbar_ultimate_start_value) == FALSE)
{
// DBUGFILE_OUTPUT_0("QueryPerformanceCounter not supported by hardware");
draw_func_ptr = NULL;
}
timerbar_last_start_value = timerbar_ultimate_start_value;
}
// Constants need for timerbar_conv_and_draw calculations
const int WIDTH = 480;
const float WIDTHF = ((float) WIDTH) * 1.01f;
/**
* Internal conversion function to convert draw data into bars for the screen
*
* @param int colour - colour index (>=0)
* @param int xpos - x position to start bar on
* @param int xwidth - width of bar
* @param int yrow - Index of row bar belongs to
*/
void timerbar_conv_and_draw(int colour, int xpos, int xwidth, int yrow)
{
float fxpos = (float) xpos;
float fxwidth = (float) xwidth;
draw_func_ptr(colour,
fxpos / WIDTHF,
yrow * 0.01f,
fxwidth / WIDTHF,
0.005f);
}
void timerbar_end_frame()
{
// Now we want to draw the bars
if(draw_func_ptr == NULL)
{
// we have not been given a draw function so we are going to have to quit
return;
}
timerbar_switch_type(-1);
int last_xpos = 0;
int y_pos = 0;
for(int i = 0; i < MAX_NUM_TIMERBARS; i++)
{
// Nothing to render this frame
if(profiles[i].frame_total.QuadPart == 0)
{
continue;
}
int xsize = (int) profiles[i].frame_total.QuadPart / 90;
// break condition in else
while(1)
{
// if bar runs over
if(last_xpos + xsize > WIDTH)
{
int rem_len = WIDTH - last_xpos;
// Draw from current position to the end of the bar
timerbar_conv_and_draw(i, last_xpos, rem_len, y_pos);
xsize -= rem_len;
last_xpos = 0;
y_pos++;
}
else
{
// Draw whats left and break for the next bar
timerbar_conv_and_draw(i,last_xpos, xsize, y_pos);
last_xpos += xsize;
break;
}
}
// reset for next frame
profiles[i].frame_total.QuadPart = 0;
}
}
void timerbar_switch_type(int num)
{
if(num >= MAX_NUM_TIMERBARS)
{
return;
}
// Calculate old profile's total
LARGE_INTEGER now;
if(QueryPerformanceCounter(&now) == FALSE)
{
// DBUGFILE_OUTPUT_0("QueryPerformanceCounter not supported by hardware");
}
profiles[timerbar_current_profile].frame_total.QuadPart +=
(now.QuadPart - timerbar_last_start_value.QuadPart);
if(num != -1)
{
// Switch to new profile
timerbar_current_profile = num;
}
// Update time to count from
if(QueryPerformanceCounter(&timerbar_last_start_value) == FALSE)
{
// DBUGFILE_OUTPUT_0("QueryPerformanceCounter not supported by hardware");
}
}
/**
* @param void (*new_draw_func_ptr)(int colour, float x, float y, float w, float h) - pointer to draw function
*
* Sets the draw function used to output the timer data, designed to be generic allowing any API
* to take advantage of this module. Set to NULL to disable drawing.
*
* By default the draw function is set to NULL
*/
void timerbar_set_draw_func(void (*new_draw_func_ptr)(int colour, float x, float y, float w, float h))
{
draw_func_ptr = new_draw_func_ptr;
}
#endif
+81
View File
@@ -0,0 +1,81 @@
/*
* Code created by Thomas Whittaker (RT) for a Freespace 2 source code project
*
* You may not sell or otherwise commercially exploit the source or things you
* created based on the source.
*
*/
/*
* $Logfile: /Freespace2/code/debugconsole/timerbar.h $
* $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.
* Changed timerbar system not to run pushes and pops if its not in use.
* Put in a note about not uncommenting asserts.
* Fixed up a lot of missing POP's on early returns?
* Perhaps the motivation for Assert functionality getting commented out?
* Fixed up some bad asserts.
* Changed nebula poofs to render in 2D in htl, it makes it look how it used to in non htl. (neb.cpp,1248)
* Before the poofs were creating a nasty stripe effect where they intersected with ships hulls.
* Put in a special check for the signs of that D3D init bug I need to lock down.
*
* Revision 1.6 2003/11/09 06:31:39 Kazan
* a couple of htl functions being called in nonhtl (ie NULL functions) problems fixed
* conflicts in cmdline and timerbar.h log entries
* cvs stopped acting like it was on crack obviously
*
* Revision 1.5 2003/11/09 04:09:17 Goober5000
* edited for language
* --Goober5000
*
* Revision 1.4 2003/11/08 22:25:47 Kazan
* Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar"
* DONT MESS WITH OTHER PEOPLES INCLUDE PATHS
* DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths!
*
*
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _TIMERBAR_HEADER_
#define _TIMERBAR_HEADER_
const int MAX_NUM_TIMERBARS = 20;
#include "cmdline/cmdline.h"
// These functions should never be used directly, always use macros below
void timerbar_start_frame();
void timerbar_end_frame();
void timerbar_set_draw_func(void (*new_draw_func_ptr)(int colour, float x, float y, float w, float h));
void timerbar_push(int value);
void timerbar_pop();
// This function shouldnt not be used any more or it will break push and pop calls
void timerbar_switch_type(int num);
#define TIMERBAR_SET_DRAW_FUNC(f) if (Cmdline_timerbar) timerbar_set_draw_func(f);
#define TIMERBAR_START_FRAME() if (Cmdline_timerbar) timerbar_start_frame();
#define TIMERBAR_END_FRAME() if (Cmdline_timerbar) timerbar_end_frame();
#define TIMERBAR_SWITCH_TYPE(n) if (Cmdline_timerbar) timerbar_switch_type(n);
#define TIMERBAR_PUSH(v) if (Cmdline_timerbar) timerbar_push(v);
#define TIMERBAR_POP() if (Cmdline_timerbar) timerbar_pop();
#endif
File diff suppressed because it is too large. Load diff
+111
View File
@@ -0,0 +1,111 @@
//header file for making decals-Bobboau
#include "PreProcDefines.h"
#ifndef _DECAL_H
#define _DECAL_H
#include "object/object.h"
//#define DECALS_ENABLED
#define MAX_DECAL_POLY 40
#define MAX_DECAL_POLY_POINT 10
#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
#define DP_FLATPOLY 2
#define DP_TMAPPOLY 3
#define DP_SORTNORM 4
#define DP_BOUNDBOX 5
struct decal;
struct decal_list;
struct decal_list_controle;
struct decal_poly{
vector norm[3];
vertex point[3];
decal_poly *next;
decal* parent;
int idx;
};
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 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_sub(void *model_ptr);
void clear_decals(decal_system *system);
#endif
+17 -7
View File
@@ -9,12 +9,22 @@
/*
* $Logfile: /Freespace2/code/Demo/Demo.cpp $
* $Revision: 2.2 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.1 2002/07/07 19:55:58 penguin
* Back-port to MSVC
*
@@ -47,21 +57,21 @@
* $NoKeywords: $
*/
#include "globalincs/pstypes.h"
#include "demo/demo.h"
#include "mission/missionload.h"
#include "ship/ship.h"
#include "Weapon/weapon.h"
#include "globalincs/linklist.h"
#include "freespace2/freespace.h"
#include "object/object.h"
#include "io/timer.h"
#include "gamesequence/gamesequence.h"
#include "globalincs/systemvars.h"
#include "cfile/cfile.h"
#include "mission/missionmessage.h"
#include "mission/missionparse.h"
#include "ship/shipfx.h"
#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
+326
View File
@@ -0,0 +1,326 @@
#include <dshow.h>
#include <stdio.h>
#include "osapi/osapi.h"
#include "dx8show.h"
#include "debugconsole/dbugfile.h"
#include "graphics/2d.h"
#include <commctrl.h>
#include <commdlg.h>
#include <tchar.h>
//#include <atlbase.h> // No dependecy on ATL!!!
enum PLAYSTATE {Stopped, Paused, Running, Init};
void Msg(TCHAR *szFormat, ...);
// Local
HRESULT InitPlayerWindow(HWND ghApp);
HRESULT InitVideoWindow(HWND ghApp, long w, long h);
bool HandleGraphEvent(void);
void CheckVisibility(void);
void CloseInterfaces(void);
//
// Constants
//
#define VOLUME_FULL 0L
#define VOLUME_SILENCE -10000L
#define WM_GRAPHNOTIFY WM_USER
char error_buffer[512];
char *ParseDShowError(HRESULT hr)
{
#ifndef NDEBUG
AMGetErrorText(hr, error_buffer, 512);
return error_buffer;
#else
return "DShow error";
#endif
}
//
// Macros
//
#define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
#define JIF(x) if (FAILED(hr=(x))) \
{Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) " (%s) " TEXT("\n"), hr, ParseDShowError(hr)); return hr;}
#define LIF(x) if (FAILED(hr=(x))) \
{Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr);}
//
// Global data
//
BOOL g_bAudioOnly=FALSE;
LONG g_lVolume=VOLUME_FULL;
DWORD g_dwGraphRegister=0;
PLAYSTATE g_psCurrent=Stopped;
// DirectShow interfaces
IGraphBuilder *pGB = NULL;
IMediaControl *pMC = NULL;
IMediaEventEx *pME = NULL;
IVideoWindow *pVW = NULL;
IBasicAudio *pBA = NULL;
IBasicVideo *pBV = NULL;
IMediaSeeking *pMS = NULL;
IMediaPosition *pMP = NULL;
void PassMsgToVideoWindow(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (pVW)
pVW->NotifyOwnerMessage((long) hWnd, message, wParam, lParam);
}
void SetCurrentState(PLAYSTATE state)
{
g_psCurrent = state;
}
PLAYSTATE GetCurrentState()
{
return g_psCurrent;
}
BOOL IsAudioOnly()
{
return g_bAudioOnly;
}
HRESULT PlayMovieInWindow(HWND ghApp, LPTSTR szFile)
{
// USES_CONVERSION;
WCHAR wFile[MAX_PATH];
HRESULT hr;
// Clear open dialog remnants before calling RenderFile()
UpdateWindow(ghApp);
// Convert filename to wide character string
// 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,
IID_IGraphBuilder, (void **)&pGB));
if(SUCCEEDED(hr))
{
HRESULT load_attempt = pGB->RenderFile(wFile, NULL);
// Have the graph builder construct its the appropriate graph automatically
if(FAILED(load_attempt))
{
return load_attempt;
}
// QueryInterface for DirectShow interfaces
JIF(pGB->QueryInterface(IID_IMediaControl, (void **)&pMC));
JIF(pGB->QueryInterface(IID_IMediaEventEx, (void **)&pME));
JIF(pGB->QueryInterface(IID_IMediaSeeking, (void **)&pMS));
JIF(pGB->QueryInterface(IID_IMediaPosition, (void **)&pMP));
// Query for video interfaces, which may not be relevant for audio files
JIF(pGB->QueryInterface(IID_IVideoWindow, (void **)&pVW));
JIF(pGB->QueryInterface(IID_IBasicVideo, (void **)&pBV));
// Query for audio interfaces, which may not be relevant for video-only files
JIF(pGB->QueryInterface(IID_IBasicAudio, (void **)&pBA));
// Is this an audio-only file (no video component)?
CheckVisibility();
// Have the graph signal event via window callbacks for performance
JIF(pME->SetNotifyWindow((OAHWND)ghApp, WM_GRAPHNOTIFY, 0));
long width, height;
pBV->get_VideoWidth(&width);
pBV->get_VideoHeight(&height);
JIF(InitVideoWindow(ghApp,width, height));
if (!g_bAudioOnly)
{
JIF(pVW->put_Owner((OAHWND)ghApp));
JIF(pVW->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_VISIBLE));
JIF(pVW->SetWindowForeground(OATRUE));
}
// Run the graph to play the media file
JIF(pMC->Run());
g_psCurrent=Running;
}
return hr;
}
HRESULT InitVideoWindow(HWND ghApp, long video_w, long video_h)
{
HRESULT hr = S_OK;
RECT rect;
GetClientRect(ghApp, &rect);
int screen_w = rect.right;
int screen_h = rect.bottom;
int video_rescale_w = (video_w * screen_w) / video_w;
int video_rescale_h = (video_rescale_w * video_h) / video_w;
int extra_w = (screen_w - video_rescale_w) / 2;
int extra_h = (screen_h - video_rescale_h) / 2;
if(SetWindowPos(ghApp, 0, 0, 0, rect.right, rect.bottom, SWP_NOMOVE | SWP_NOOWNERZORDER) == FALSE) {
MessageBox(ghApp,"Failed SetWindowPos","Error", MB_OK);
}
JIF(pVW->SetWindowPosition(extra_w, extra_h, video_rescale_w, video_rescale_h));
return hr;
}
void CheckVisibility(void)
{
long lVisible;
HRESULT hr;
if ((!pVW) || (!pBV))
{
// Audio-only files have no video interfaces. This might also
// be a file whose video component uses an unknown video codec.
g_bAudioOnly = TRUE;
return;
}
else
{
// Clear the global flag
g_bAudioOnly = FALSE;
}
hr = pVW->get_Visible(&lVisible);
if (FAILED(hr))
{
// If this is an audio-only clip, get_Visible() won't work.
//
// Also, if this video is encoded with an unsupported codec,
// we won't see any video, although the audio will work if it is
// of a supported format.
//
if (hr == E_NOINTERFACE)
{
g_bAudioOnly = TRUE;
}
else
{
Msg(TEXT("Failed(%08lx) in pVW->get_Visible()!\r\n"), hr);
}
}
}
bool OpenClip(HWND ghApp, char *g_szFileName)
{
// Reset status variables
g_psCurrent = Stopped;
g_lVolume = VOLUME_FULL;
// Start playing the media file
HRESULT hr = PlayMovieInWindow(ghApp, g_szFileName);
// If we couldn't play the clip, clean up
if (FAILED(hr)) {
CloseClip(ghApp);
return false;
}
return true;
}
void CloseClip(HWND ghApp)
{
HRESULT hr;
// Stop media playback
if(pMC)
hr = pMC->Stop();
// Clear global flags
g_psCurrent = Stopped;
g_bAudioOnly = TRUE;
// Free DirectShow interfaces
CloseInterfaces();
// No current media state
g_psCurrent = Init;
}
void CloseInterfaces(void)
{
// Relinquish ownership (IMPORTANT!) after hiding video window
if(pVW)
pVW->put_Visible(OAFALSE);
// Disable event callbacks
if (pME)
pME->SetNotifyWindow((OAHWND)NULL, 0, 0);
// Release and zero DirectShow interfaces
SAFE_RELEASE(pME);
SAFE_RELEASE(pMS);
SAFE_RELEASE(pMP);
SAFE_RELEASE(pMC);
SAFE_RELEASE(pBA);
SAFE_RELEASE(pBV);
SAFE_RELEASE(pVW);
SAFE_RELEASE(pGB);
}
void Msg(TCHAR *szFormat, ...)
{
TCHAR szBuffer[512]; // Large buffer for very long filenames (like HTTP)
// Format the input string
va_list pArgs;
va_start(pArgs, szFormat);
_vstprintf(szBuffer, szFormat, pArgs);
va_end(pArgs);
// Display a message box with the formatted string
MessageBox(NULL, szBuffer, TEXT("PlayWnd Sample"), MB_OK);
}
// returns true when finished
bool dx8show_stream_movie(void)
{
LONG evCode, evParam1, evParam2;
HRESULT hr=S_OK;
// Make sure that we don't access the media event interface
// after it has already been released.
if (!pME) {
return S_OK;
}
// Process all queued events
while(SUCCEEDED(pME->GetEvent(&evCode, &evParam1,&evParam2, 0))) {
// Free memory associated with callback, since we're not using it
hr = pME->FreeEventParams(evCode, evParam1, evParam2);
// If this is the end of the clip, reset to beginning
if(EC_COMPLETE == evCode)
{
return true;
}
}
return false;
}
+12
View File
@@ -0,0 +1,12 @@
#include "PreProcDefines.h"
#ifndef _DX8SHOW_HEADER_FILE
#define _DX8SHOW_HEADER_FILE
bool OpenClip(HWND ghApp, char *g_szFileName);
void CloseClip(HWND ghApp);
bool dx8show_stream_movie(void);
void PassMsgToVideoWindow(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
#endif
Binary file not shown.
Binary file not shown.
+2
View File
@@ -5,6 +5,8 @@
* File: async.h
* Content: AsyncData object include file
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __ASYNC_INCLUDED__
#define __ASYNC_INCLUDED__
-896
View File
@@ -1,896 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3d.h
* Content: Direct3D include file
*
***************************************************************************/
#ifndef _D3D_H_
#define _D3D_H_
#include <stdlib.h>
#ifdef _WIN32
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#include "d3dcom.h"
#endif
#ifdef _WIN32
#define D3DAPI WINAPI
#else
#define D3DAPI
#endif
/*
* Interface IID's
*/
#if defined( _WIN32 ) && !defined( _NO_COM)
DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
#endif
/*
* Data structures
*/
#ifdef __cplusplus
/* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
struct IDirect3D;
struct IDirect3D2;
struct IDirect3DDevice;
struct IDirect3DDevice2;
struct IDirect3DExecuteBuffer;
struct IDirect3DLight;
struct IDirect3DMaterial;
struct IDirect3DMaterial2;
struct IDirect3DTexture;
struct IDirect3DTexture2;
struct IDirect3DViewport;
struct IDirect3DViewport2;
typedef struct IDirect3D *LPDIRECT3D;
typedef struct IDirect3D2 *LPDIRECT3D2;
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
#else
typedef struct IDirect3D *LPDIRECT3D;
typedef struct IDirect3D2 *LPDIRECT3D2;
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
#endif
#include "directx/vd3dtypes.h"
#include "directx/vd3dcaps.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* IDirect3D
*/
#undef INTERFACE
#define INTERFACE IDirect3D
DECLARE_INTERFACE_(IDirect3D, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3D methods ***/
STDMETHOD(Initialize) (THIS_ REFIID) PURE;
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL*, IUnknown*) PURE;
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT*, IUnknown*) PURE;
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirect3D_EnumDevices(p, a, b) (p)->lpVtbl->EnumDevices(p, a, b)
#define IDirect3D_CreateLight(p, a, b) (p)->lpVtbl->CreateLight(p, a, b)
#define IDirect3D_CreateMaterial(p, a, b) (p)->lpVtbl->CreateMaterial(p, a, b)
#define IDirect3D_CreateViewport(p, a, b) (p)->lpVtbl->CreateViewport(p, a, b)
#define IDirect3D_FindDevice(p, a, b) (p)->lpVtbl->FindDevice(p, a, b)
#else
#define IDirect3D_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3D_AddRef(p) (p)->AddRef()
#define IDirect3D_Release(p) (p)->Release()
#define IDirect3D_Initialize(p, a) (p)->Initialize(a)
#define IDirect3D_EnumDevices(p, a, b) (p)->EnumDevices(a, b)
#define IDirect3D_CreateLight(p, a, b) (p)->CreateLight(a, b)
#define IDirect3D_CreateMaterial(p, a, b) (p)->CreateMaterial(a, b)
#define IDirect3D_CreateViewport(p, a, b) (p)->CreateViewport(a, b)
#define IDirect3D_FindDevice(p, a, b) (p)->FindDevice(a, b)
#endif
/*
* IDirect3D2
*/
#undef INTERFACE
#define INTERFACE IDirect3D2
DECLARE_INTERFACE_(IDirect3D2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3D methods ***/
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL2*, IUnknown*) PURE;
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT2*, IUnknown*) PURE;
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
STDMETHOD(CreateDevice)(THIS_ REFCLSID, LPDIRECTDRAWSURFACE, LPDIRECT3DDEVICE2 *) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D2_EnumDevices(p, a, b) (p)->lpVtbl->EnumDevices(p, a, b)
#define IDirect3D2_CreateLight(p, a, b) (p)->lpVtbl->CreateLight(p, a, b)
#define IDirect3D2_CreateMaterial(p, a, b) (p)->lpVtbl->CreateMaterial(p, a, b)
#define IDirect3D2_CreateViewport(p, a, b) (p)->lpVtbl->CreateViewport(p, a, b)
#define IDirect3D2_FindDevice(p, a, b) (p)->lpVtbl->FindDevice(p, a, b)
#define IDirect3D2_CreateDevice(p, a, b, c) (p)->lpVtbl->CreateDevice(p, a, b, c)
#else
#define IDirect3D2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3D2_AddRef(p) (p)->AddRef()
#define IDirect3D2_Release(p) (p)->Release()
#define IDirect3D2_EnumDevices(p, a, b) (p)->EnumDevices(a, b)
#define IDirect3D2_CreateLight(p, a, b) (p)->CreateLight(a, b)
#define IDirect3D2_CreateMaterial(p, a, b) (p)->CreateMaterial(a, b)
#define IDirect3D2_CreateViewport(p, a, b) (p)->CreateViewport(a, b)
#define IDirect3D2_FindDevice(p, a, b) (p)->FindDevice(a, b)
#define IDirect3D2_CreateDevice(p, a, b, c) (p)->CreateDevice(a, b, c)
#endif
/*
* IDirect3DDevice
*/
#undef INTERFACE
#define INTERFACE IDirect3DDevice
DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DDevice methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3D, LPGUID, LPD3DDEVICEDESC) PURE;
STDMETHOD(GetCaps) (THIS_ LPD3DDEVICEDESC, LPD3DDEVICEDESC) PURE;
STDMETHOD(SwapTextureHandles) (THIS_ LPDIRECT3DTEXTURE, LPDIRECT3DTEXTURE) PURE;
STDMETHOD(CreateExecuteBuffer) (THIS_ LPD3DEXECUTEBUFFERDESC, LPDIRECT3DEXECUTEBUFFER*, IUnknown*) PURE;
STDMETHOD(GetStats) (THIS_ LPD3DSTATS) PURE;
STDMETHOD(Execute) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD) PURE;
STDMETHOD(AddViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
STDMETHOD(DeleteViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
STDMETHOD(NextViewport) (THIS_ LPDIRECT3DVIEWPORT, LPDIRECT3DVIEWPORT*, DWORD) PURE;
STDMETHOD(Pick) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD, LPD3DRECT) PURE;
STDMETHOD(GetPickRecords)(THIS_ LPDWORD, LPD3DPICKRECORD) PURE;
STDMETHOD(EnumTextureFormats) (THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID) PURE;
STDMETHOD(CreateMatrix) (THIS_ LPD3DMATRIXHANDLE) PURE;
STDMETHOD(SetMatrix) (THIS_ D3DMATRIXHANDLE, const LPD3DMATRIX) PURE;
STDMETHOD(GetMatrix) (THIS_ D3DMATRIXHANDLE, LPD3DMATRIX) PURE;
STDMETHOD(DeleteMatrix) (THIS_ D3DMATRIXHANDLE) PURE;
STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D*) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
#define IDirect3DDevice_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirect3DDevice_SwapTextureHandles(p, a, b) (p)->lpVtbl->SwapTextureHandles(p, a, b)
#define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c) (p)->lpVtbl->CreateExecuteBuffer(p, a, b, c)
#define IDirect3DDevice_GetStats(p, a) (p)->lpVtbl->GetStats(p, a)
#define IDirect3DDevice_Execute(p, a, b, c) (p)->lpVtbl->Execute(p, a, b, c)
#define IDirect3DDevice_AddViewport(p, a) (p)->lpVtbl->AddViewport(p, a)
#define IDirect3DDevice_DeleteViewport(p, a) (p)->lpVtbl->DeleteViewport(p, a)
#define IDirect3DDevice_NextViewport(p, a, b) (p)->lpVtbl->NextViewport(p, a, b)
#define IDirect3DDevice_Pick(p, a, b, c, d) (p)->lpVtbl->Pick(p, a, b, c, d)
#define IDirect3DDevice_GetPickRecords(p, a, b) (p)->lpVtbl->GetPickRecords(p, a, b)
#define IDirect3DDevice_EnumTextureFormats(p, a, b) (p)->lpVtbl->EnumTextureFormats(p, a, b)
#define IDirect3DDevice_CreateMatrix(p, a) (p)->lpVtbl->CreateMatrix(p, a)
#define IDirect3DDevice_SetMatrix(p, a, b) (p)->lpVtbl->SetMatrix(p, a, b)
#define IDirect3DDevice_GetMatrix(p, a, b) (p)->lpVtbl->GetMatrix(p, a, b)
#define IDirect3DDevice_DeleteMatrix(p, a) (p)->lpVtbl->DeleteMatrix(p, a)
#define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice_GetDirect3D(p, a) (p)->lpVtbl->GetDirect3D(p, a)
#else
#define IDirect3DDevice_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DDevice_AddRef(p) (p)->AddRef()
#define IDirect3DDevice_Release(p) (p)->Release()
#define IDirect3DDevice_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
#define IDirect3DDevice_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirect3DDevice_SwapTextureHandles(p, a, b) (p)->SwapTextureHandles(a, b)
#define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c) (p)->CreateExecuteBuffer(a, b, c)
#define IDirect3DDevice_GetStats(p, a) (p)->GetStats(a)
#define IDirect3DDevice_Execute(p, a, b, c) (p)->Execute(a, b, c)
#define IDirect3DDevice_AddViewport(p, a) (p)->AddViewport(a)
#define IDirect3DDevice_DeleteViewport(p, a) (p)->DeleteViewport(a)
#define IDirect3DDevice_NextViewport(p, a, b) (p)->NextViewport(a, b)
#define IDirect3DDevice_Pick(p, a, b, c, d) (p)->Pick(a, b, c, d)
#define IDirect3DDevice_GetPickRecords(p, a, b) (p)->GetPickRecords(a, b)
#define IDirect3DDevice_EnumTextureFormats(p, a, b) (p)->EnumTextureFormats(a, b)
#define IDirect3DDevice_CreateMatrix(p, a) (p)->CreateMatrix(a)
#define IDirect3DDevice_SetMatrix(p, a, b) (p)->SetMatrix(a, b)
#define IDirect3DDevice_GetMatrix(p, a, b) (p)->GetMatrix(a, b)
#define IDirect3DDevice_DeleteMatrix(p, a) (p)->DeleteMatrix(a)
#define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice_EndScene(p) (p)->EndScene()
#define IDirect3DDevice_GetDirect3D(p, a) (p)->GetDirect3D(a)
#endif
/*
* IDirect3DDevice2
*/
#undef INTERFACE
#define INTERFACE IDirect3DDevice2
DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DDevice2 methods ***/
STDMETHOD(GetCaps) (THIS_ LPD3DDEVICEDESC, LPD3DDEVICEDESC) PURE;
STDMETHOD(SwapTextureHandles) (THIS_ LPDIRECT3DTEXTURE2, LPDIRECT3DTEXTURE2) PURE;
STDMETHOD(GetStats) (THIS_ LPD3DSTATS) PURE;
STDMETHOD(AddViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(DeleteViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(NextViewport) (THIS_ LPDIRECT3DVIEWPORT2, LPDIRECT3DVIEWPORT2*, DWORD) PURE;
STDMETHOD(EnumTextureFormats) (THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID) PURE;
STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D2*) PURE;
/*** DrawPrimitive API ***/
STDMETHOD(SetCurrentViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(GetCurrentViewport) (THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
STDMETHOD(SetRenderTarget) (THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(GetRenderTarget) (THIS_ LPDIRECTDRAWSURFACE *) PURE;
STDMETHOD(Begin) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, DWORD) PURE;
STDMETHOD(BeginIndexed) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD) PURE;
STDMETHOD(Vertex) (THIS_ LPVOID) PURE;
STDMETHOD(Index) (THIS_ WORD) PURE;
STDMETHOD(End) (THIS_ DWORD) PURE;
STDMETHOD(GetRenderState) (THIS_ D3DRENDERSTATETYPE, LPDWORD) PURE;
STDMETHOD(SetRenderState) (THIS_ D3DRENDERSTATETYPE, DWORD) PURE;
STDMETHOD(GetLightState) (THIS_ D3DLIGHTSTATETYPE, LPDWORD) PURE;
STDMETHOD(SetLightState) (THIS_ D3DLIGHTSTATETYPE, DWORD) PURE;
STDMETHOD(SetTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
STDMETHOD(GetTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
STDMETHOD(MultiplyTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
STDMETHOD(DrawPrimitive) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD) PURE;
STDMETHOD(DrawIndexedPrimitive) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, LPWORD, DWORD, DWORD) PURE;
STDMETHOD(SetClipStatus) (THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(GetClipStatus) (THIS_ LPD3DCLIPSTATUS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirect3DDevice2_SwapTextureHandles(p, a, b) (p)->lpVtbl->SwapTextureHandles(p, a, b)
#define IDirect3DDevice2_GetStats(p, a) (p)->lpVtbl->CreateViewport(p, a)
#define IDirect3DDevice2_AddViewport(p, a) (p)->lpVtbl->AddViewport(p, a)
#define IDirect3DDevice2_DeleteViewport(p, a) (p)->lpVtbl->DeleteViewport(p, a)
#define IDirect3DDevice2_NextViewport(p, a, b) (p)->lpVtbl->NextViewport(p, a, b)
#define IDirect3DDevice2_EnumTextureFormats(p, a, b) (p)->lpVtbl->EnumTextureFormats(p, a, b)
#define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice2_GetDirect3D(p, a) (p)->lpVtbl->GetDirect3D(p, a)
#define IDirect3DDevice2_SetCurrentViewport(p, a) (p)->lpVtbl->SetCurrentViewport(p, a)
#define IDirect3DDevice2_GetCurrentViewport(p, a) (p)->lpVtbl->GetCurrentViewport(p, a)
#define IDirect3DDevice2_SetRenderTarget(p, a, b) (p)->lpVtbl->SetRenderTarget(p, a, b)
#define IDirect3DDevice2_GetRenderTarget(p, a) (p)->lpVtbl->GetRenderTarget(p, a)
#define IDirect3DDevice2_Begin(p, a, b, c) (p)->lpVtbl->Begin(p, a, b, c)
#define IDirect3DDevice2_BeginIndexed(p, a, b, c, d, e) (p)->lpVtbl->Begin(p, a, b, c, d, e)
#define IDirect3DDevice2_Vertex(p, a) (p)->lpVtbl->Vertex(p, a)
#define IDirect3DDevice2_Index(p, a) (p)->lpVtbl->Index(p, a)
#define IDirect3DDevice2_End(p, a) (p)->lpVtbl->End(p, a)
#define IDirect3DDevice2_GetRenderState(p, a, b) (p)->lpVtbl->GetRenderState(p, a, b)
#define IDirect3DDevice2_SetRenderState(p, a, b) (p)->lpVtbl->SetRenderState(p, a, b)
#define IDirect3DDevice2_GetLightState(p, a, b) (p)->lpVtbl->GetLightState(p, a, b)
#define IDirect3DDevice2_SetLightState(p, a, b) (p)->lpVtbl->SetLightState(p, a, b)
#define IDirect3DDevice2_SetTransform(p, a, b) (p)->lpVtbl->SetTransform(p, a, b)
#define IDirect3DDevice2_GetTransform(p, a, b) (p)->lpVtbl->GetTransform(p, a, b)
#define IDirect3DDevice2_MultiplyTransform(p, a, b) (p)->lpVtbl->MultiplyTransform(p, a, b)
#define IDirect3DDevice2_DrawPrimitive(p, a, b, c, d, e) (p)->lpVtbl->DrawPrimitive(p, a, b, c, d, e)
#define IDirect3DDevice2_DrawIndexedPrimitive(p, a, b, c, d, e, f, g) \
(p)->lpVtbl->DrawIndexedPrimitive(p, a, b, c, d, e, f, g)
#define IDirect3DDevice2_SetClipStatus(p, a) (p)->lpVtbl->SetClipStatus(p, a)
#define IDirect3DDevice2_GetClipStatus(p, a) (p)->lpVtbl->GetClipStatus(p, a)
#else
#define IDirect3DDevice2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DDevice2_AddRef(p) (p)->AddRef()
#define IDirect3DDevice2_Release(p) (p)->Release()
#define IDirect3DDevice2_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirect3DDevice2_SwapTextureHandles(p, a, b) (p)->SwapTextureHandles(a, b)
#define IDirect3DDevice2_GetStats(p, a) (p)->CreateViewport(a)
#define IDirect3DDevice2_AddViewport(p, a) (p)->AddViewport(a)
#define IDirect3DDevice2_DeleteViewport(p, a) (p)->DeleteViewport(a)
#define IDirect3DDevice2_NextViewport(p, a, b) (p)->NextViewport(a, b)
#define IDirect3DDevice2_EnumTextureFormats(p, a, b) (p)->EnumTextureFormats(a, b)
#define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice2_EndScene(p) (p)->EndScene()
#define IDirect3DDevice2_GetDirect3D(p, a) (p)->GetDirect3D(a)
#define IDirect3DDevice2_SetCurrentViewport(p, a) (p)->SetCurrentViewport(a)
#define IDirect3DDevice2_GetCurrentViewport(p, a) (p)->GetCurrentViewport(a)
#define IDirect3DDevice2_SetRenderTarget(p, a, b) (p)->SetRenderTarget(a, b)
#define IDirect3DDevice2_GetRenderTarget(p, a) (p)->GetRenderTarget(a)
#define IDirect3DDevice2_Begin(p, a, b, c) (p)->Begin(a, b, c)
#define IDirect3DDevice2_BeginIndexed(p, a, b, c, d, e) (p)->Begin(a, b, c, d, e)
#define IDirect3DDevice2_Vertex(p, a) (p)->Vertex(a)
#define IDirect3DDevice2_Index(p, a) (p)->Index(a)
#define IDirect3DDevice2_End(p, a) (p)->End(a)
#define IDirect3DDevice2_GetRenderState(p, a, b) (p)->GetRenderState(a, b)
#define IDirect3DDevice2_SetRenderState(p, a, b) (p)->SetRenderState(a, b)
#define IDirect3DDevice2_GetLightState(p, a, b) (p)->GetLightState(a, b)
#define IDirect3DDevice2_SetLightState(p, a, b) (p)->SetLightState(a, b)
#define IDirect3DDevice2_SetTransform(p, a, b) (p)->SetTransform(a, b)
#define IDirect3DDevice2_GetTransform(p, a, b) (p)->GetTransform(a, b)
#define IDirect3DDevice2_MultiplyTransform(p, a, b) (p)->MultiplyTransform(a, b)
#define IDirect3DDevice2_DrawPrimitive(p, a, b, c, d, e) (p)->DrawPrimitive(a, b, c, d, e)
#define IDirect3DDevice2_DrawIndexedPrimitive(p, a, b, c, d, e, f, g) \
(p)->DrawIndexedPrimitive(a, b, c, d, e, f, g)
#define IDirect3DDevice2_SetClipStatus(p, a) (p)->SetClipStatus(a)
#define IDirect3DDevice2_GetClipStatus(p, a) (p)->GetClipStatus(a)
#endif
/*
* IDirect3DExecuteBuffer
*/
#undef INTERFACE
#define INTERFACE IDirect3DExecuteBuffer
DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DExecuteBuffer methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPD3DEXECUTEBUFFERDESC) PURE;
STDMETHOD(Lock) (THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
STDMETHOD_(HRESULT, Unlock) (THIS) PURE;
STDMETHOD(SetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
STDMETHOD(GetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
STDMETHOD(Validate) (THIS_ LPDWORD, LPD3DVALIDATECALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(Optimize) (THIS_ DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DExecuteBuffer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DExecuteBuffer_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
#define IDirect3DExecuteBuffer_Lock(p, a) (p)->lpVtbl->Lock(p, a)
#define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
#define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->lpVtbl->SetExecuteData(p, a)
#define IDirect3DExecuteBuffer_GetExecuteData(p, a) (p)->lpVtbl->GetExecuteData(p, a)
#define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->lpVtbl->Validate(p, a, b, c, d)
#define IDirect3DExecuteBuffer_Optimize(p, a) (p)->lpVtbl->Optimize(p, a)
#else
#define IDirect3DExecuteBuffer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
#define IDirect3DExecuteBuffer_Release(p) (p)->Release()
#define IDirect3DExecuteBuffer_Initialize(p, a, b) (p)->Initialize(a, b)
#define IDirect3DExecuteBuffer_Lock(p, a) (p)->Lock(a)
#define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
#define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->SetExecuteData(a)
#define IDirect3DExecuteBuffer_GetExecuteData(p, a) (p)->GetExecuteData(a)
#define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->Validate(a, b, c, d)
#define IDirect3DExecuteBuffer_Optimize(p, a) (p)->Optimize(a)
#endif
/*
* IDirect3DLight
*/
#undef INTERFACE
#define INTERFACE IDirect3DLight
DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DLight methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
STDMETHOD(SetLight) (THIS_ LPD3DLIGHT) PURE;
STDMETHOD(GetLight) (THIS_ LPD3DLIGHT) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DLight_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DLight_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirect3DLight_SetLight(p, a) (p)->lpVtbl->SetLight(p, a)
#define IDirect3DLight_GetLight(p, a) (p)->lpVtbl->GetLight(p, a)
#else
#define IDirect3DLight_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DLight_AddRef(p) (p)->AddRef()
#define IDirect3DLight_Release(p) (p)->Release()
#define IDirect3DLight_Initialize(p, a) (p)->Initialize(a)
#define IDirect3DLight_SetLight(p, a) (p)->SetLight(a)
#define IDirect3DLight_GetLight(p, a) (p)->GetLight(a)
#endif
/*
* IDirect3DMaterial
*/
#undef INTERFACE
#define INTERFACE IDirect3DMaterial
DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DMaterial methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
STDMETHOD(SetMaterial) (THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetMaterial) (THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DMATERIALHANDLE) PURE;
STDMETHOD_(HRESULT, Reserve) (THIS) PURE;
STDMETHOD_(HRESULT, Unreserve) (THIS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DMaterial_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DMaterial_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirect3DMaterial_SetMaterial(p, a) (p)->lpVtbl->SetMaterial(p, a)
#define IDirect3DMaterial_GetMaterial(p, a) (p)->lpVtbl->GetMaterial(p, a)
#define IDirect3DMaterial_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
#define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
#define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
#else
#define IDirect3DMaterial_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DMaterial_AddRef(p) (p)->AddRef()
#define IDirect3DMaterial_Release(p) (p)->Release()
#define IDirect3DMaterial_Initialize(p, a) (p)->Initialize(a)
#define IDirect3DMaterial_SetMaterial(p, a) (p)->SetMaterial(a)
#define IDirect3DMaterial_GetMaterial(p, a) (p)->GetMaterial(a)
#define IDirect3DMaterial_GetHandle(p, a, b) (p)->GetHandle(a, b)
#define IDirect3DMaterial_Reserve(p) (p)->Reserve()
#define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
#endif
/*
* IDirect3DMaterial2
*/
#undef INTERFACE
#define INTERFACE IDirect3DMaterial2
DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DMaterial2 methods ***/
STDMETHOD(SetMaterial) (THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetMaterial) (THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE2, LPD3DMATERIALHANDLE) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DMaterial2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DMaterial2_SetMaterial(p, a) (p)->lpVtbl->SetMaterial(p, a)
#define IDirect3DMaterial2_GetMaterial(p, a) (p)->lpVtbl->GetMaterial(p, a)
#define IDirect3DMaterial2_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
#else
#define IDirect3DMaterial2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
#define IDirect3DMaterial2_Release(p) (p)->Release()
#define IDirect3DMaterial2_SetMaterial(p, a) (p)->SetMaterial(a)
#define IDirect3DMaterial2_GetMaterial(p, a) (p)->GetMaterial(a)
#define IDirect3DMaterial2_GetHandle(p, a, b) (p)->GetHandle(a, b)
#endif
/*
* IDirect3DTexture
*/
#undef INTERFACE
#define INTERFACE IDirect3DTexture
DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DTexture methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DTEXTUREHANDLE) PURE;
STDMETHOD(PaletteChanged) (THIS_ DWORD, DWORD) PURE;
STDMETHOD(Load) (THIS_ LPDIRECT3DTEXTURE) PURE;
STDMETHOD_(HRESULT, Unload) (THIS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DTexture_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DTexture_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
#define IDirect3DTexture_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
#define IDirect3DTexture_PaletteChanged(p, a, b) (p)->lpVtbl->PaletteChanged(p, a, b)
#define IDirect3DTexture_Load(p, a) (p)->lpVtbl->Load(p, a)
#define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
#else
#define IDirect3DTexture_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DTexture_AddRef(p) (p)->AddRef()
#define IDirect3DTexture_Release(p) (p)->Release()
#define IDirect3DTexture_Initialize(p, a, b) (p)->Initialize(a, b)
#define IDirect3DTexture_GetHandle(p, a, b) (p)->GetHandle(a, b)
#define IDirect3DTexture_PaletteChanged(p, a, b) (p)->PaletteChanged(a, b)
#define IDirect3DTexture_Load(p, a) (p)->Load(a)
#define IDirect3DTexture_Unload(p) (p)->Unload()
#endif
/*
* IDirect3DTexture2
*/
#undef INTERFACE
#define INTERFACE IDirect3DTexture2
DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DTexture2 methods ***/
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE2, LPD3DTEXTUREHANDLE) PURE;
STDMETHOD(PaletteChanged) (THIS_ DWORD, DWORD) PURE;
STDMETHOD(Load) (THIS_ LPDIRECT3DTEXTURE2) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DTexture2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DTexture2_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
#define IDirect3DTexture2_PaletteChanged(p, a, b) (p)->lpVtbl->PaletteChanged(p, a, b)
#define IDirect3DTexture2_Load(p, a) (p)->lpVtbl->Load(p, a)
#else
#define IDirect3DTexture2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DTexture2_AddRef(p) (p)->AddRef()
#define IDirect3DTexture2_Release(p) (p)->Release()
#define IDirect3DTexture2_GetHandle(p, a, b) (p)->GetHandle(a, b)
#define IDirect3DTexture2_PaletteChanged(p, a, b) (p)->PaletteChanged(a, b)
#define IDirect3DTexture2_Load(p, a) (p)->Load(a)
#endif
/*
* IDirect3DViewport
*/
#undef INTERFACE
#define INTERFACE IDirect3DViewport
DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DViewport methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DViewport_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirect3DViewport_GetViewport(p, a) (p)->lpVtbl->GetViewport(p, a)
#define IDirect3DViewport_SetViewport(p, a) (p)->lpVtbl->SetViewport(p, a)
#define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
#define IDirect3DViewport_LightElements(p, a, b) (p)->lpVtbl->LightElements(p, a, b)
#define IDirect3DViewport_SetBackground(p, a) (p)->lpVtbl->SetBackground(p, a)
#define IDirect3DViewport_GetBackground(p, a, b) (p)->lpVtbl->GetBackground(p, a, b)
#define IDirect3DViewport_SetBackgroundDepth(p, a) (p)->lpVtbl->SetBackgroundDepth(p, a)
#define IDirect3DViewport_GetBackgroundDepth(p, a, b) (p)->lpVtbl->GetBackgroundDepth(p, a, b)
#define IDirect3DViewport_Clear(p, a, b, c) (p)->lpVtbl->Clear(p, a, b, c)
#define IDirect3DViewport_AddLight(p, a) (p)->lpVtbl->AddLight(p, a)
#define IDirect3DViewport_DeleteLight(p, a) (p)->lpVtbl->DeleteLight(p, a)
#define IDirect3DViewport_NextLight(p, a, b, c) (p)->lpVtbl->NextLight(p, a, b, c)
#else
#define IDirect3DViewport_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DViewport_AddRef(p) (p)->AddRef()
#define IDirect3DViewport_Release(p) (p)->Release()
#define IDirect3DViewport_Initialize(p, a) (p)->Initialize(a)
#define IDirect3DViewport_GetViewport(p, a) (p)->GetViewport(a)
#define IDirect3DViewport_SetViewport(p, a) (p)->SetViewport(a)
#define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
#define IDirect3DViewport_LightElements(p, a, b) (p)->LightElements(a, b)
#define IDirect3DViewport_SetBackground(p, a) (p)->SetBackground(a)
#define IDirect3DViewport_GetBackground(p, a, b) (p)->GetBackground(a, b)
#define IDirect3DViewport_SetBackgroundDepth(p, a) (p)->SetBackgroundDepth(a)
#define IDirect3DViewport_GetBackgroundDepth(p, a, b) (p)->GetBackgroundDepth(a, b)
#define IDirect3DViewport_Clear(p, a, b, c) (p)->Clear(a, b, c)
#define IDirect3DViewport_AddLight(p, a) (p)->AddLight(a)
#define IDirect3DViewport_DeleteLight(p, a) (p)->DeleteLight(a)
#define IDirect3DViewport_NextLight(p, a, b, c) (p)->NextLight(a, b, c)
#endif
/*
* IDirect3DViewport2
*/
#undef INTERFACE
#define INTERFACE IDirect3DViewport2
DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
/*** IDirect3DViewport methods ***/
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
/*** IDirect3DViewport2 methods ***/
STDMETHOD(GetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
STDMETHOD(SetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DViewport2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirect3DViewport2_GetViewport(p, a) (p)->lpVtbl->GetViewport(p, a)
#define IDirect3DViewport2_SetViewport(p, a) (p)->lpVtbl->SetViewport(p, a)
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
#define IDirect3DViewport2_LightElements(p, a, b) (p)->lpVtbl->LightElements(p, a, b)
#define IDirect3DViewport2_SetBackground(p, a) (p)->lpVtbl->SetBackground(p, a)
#define IDirect3DViewport2_GetBackground(p, a, b) (p)->lpVtbl->GetBackground(p, a, b)
#define IDirect3DViewport2_SetBackgroundDepth(p, a) (p)->lpVtbl->SetBackgroundDepth(p, a)
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b) (p)->lpVtbl->GetBackgroundDepth(p, a, b)
#define IDirect3DViewport2_Clear(p, a, b, c) (p)->lpVtbl->Clear(p, a, b, c)
#define IDirect3DViewport2_AddLight(p, a) (p)->lpVtbl->AddLight(p, a)
#define IDirect3DViewport2_DeleteLight(p, a) (p)->lpVtbl->DeleteLight(p, a)
#define IDirect3DViewport2_NextLight(p, a, b, c) (p)->lpVtbl->NextLight(p, a, b, c)
#define IDirect3DViewport2_GetViewport2(p, a) (p)->lpVtbl->GetViewport2(p, a)
#define IDirect3DViewport2_SetViewport2(p, a) (p)->lpVtbl->SetViewport2(p, a)
#else
#define IDirect3DViewport2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirect3DViewport2_AddRef(p) (p)->AddRef()
#define IDirect3DViewport2_Release(p) (p)->Release()
#define IDirect3DViewport2_Initialize(p, a) (p)->Initialize(a)
#define IDirect3DViewport2_GetViewport(p, a) (p)->GetViewport(a)
#define IDirect3DViewport2_SetViewport(p, a) (p)->SetViewport(a)
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
#define IDirect3DViewport2_LightElements(p, a, b) (p)->LightElements(a, b)
#define IDirect3DViewport2_SetBackground(p, a) (p)->SetBackground(a)
#define IDirect3DViewport2_GetBackground(p, a, b) (p)->GetBackground(a, b)
#define IDirect3DViewport2_SetBackgroundDepth(p, a) (p)->SetBackgroundDepth(a)
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b) (p)->GetBackgroundDepth(a, b)
#define IDirect3DViewport2_Clear(p, a, b, c) (p)->Clear(a, b, c)
#define IDirect3DViewport2_AddLight(p, a) (p)->AddLight(a)
#define IDirect3DViewport2_DeleteLight(p, a) (p)->DeleteLight(a)
#define IDirect3DViewport2_NextLight(p, a, b, c) (p)->NextLight(a, b, c)
#define IDirect3DViewport2_GetViewport2(p, a) (p)->GetViewport2(a)
#define IDirect3DViewport2_SetViewport2(p, a) (p)->SetViewport2(a)
#endif
/****************************************************************************
*
* Flags for IDirect3DDevice::NextViewport
*
****************************************************************************/
/*
* Return the next viewport
*/
#define D3DNEXT_NEXT 0x00000001l
/*
* Return the first viewport
*/
#define D3DNEXT_HEAD 0x00000002l
/*
* Return the last viewport
*/
#define D3DNEXT_TAIL 0x00000004l
/****************************************************************************
*
* Flags for DrawPrimitive/DrawIndexedPrimitive
* Also valid for Begin/BeginIndexed
*
****************************************************************************/
/*
* Wait until the device is ready to draw the primitive
* This will cause DP to not return DDERR_WASSTILLDRAWING
*/
#define D3DDP_WAIT 0x00000001l
/*
* Hint that the primitives have been clipped by the application.
*/
#define D3DDP_DONOTCLIP 0x00000004l
/*
* Hint that the extents need not be updated.
*/
#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
/*
* Direct3D Errors
* DirectDraw error codes are used when errors not specified here.
*/
#define D3D_OK DD_OK
#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
/*
* An invalid device was requested by the application.
*/
#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
#define D3DERR_INITFAILED MAKE_DDHRESULT(706)
/*
* SetRenderTarget attempted on a device that was
* QI'd off the render target.
*/
#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
#define D3DERR_INBEGIN MAKE_DDHRESULT(770)
#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
#ifdef __cplusplus
};
#endif
#endif /* _D3D_H_ */
-313
View File
@@ -1,313 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3dcaps.h
* Content: Direct3D capabilities include file
*
***************************************************************************/
#ifndef _D3DCAPS_H
#define _D3DCAPS_H
/*
* Pull in DirectDraw include file automatically:
*/
#include "directx/vddraw.h"
#pragma pack(4)
/* Description of capabilities of transform */
typedef struct _D3DTRANSFORMCAPS {
DWORD dwSize;
DWORD dwCaps;
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
/* Description of capabilities of lighting */
typedef struct _D3DLIGHTINGCAPS {
DWORD dwSize;
DWORD dwCaps; /* Lighting caps */
DWORD dwLightingModel; /* Lighting model - RGB or mono */
DWORD dwNumLights; /* Number of lights that can be handled */
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
#define D3DLIGHTINGMODEL_RGB 0x00000001L
#define D3DLIGHTINGMODEL_MONO 0x00000002L
#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
/* Description of capabilities for each primitive type */
typedef struct _D3DPrimCaps {
DWORD dwSize;
DWORD dwMiscCaps; /* Capability flags */
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth; /* maximum width and height of */
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
/* D3DPRIMCAPS dwMiscCaps */
#define D3DPMISCCAPS_MASKPLANES 0x00000001L
#define D3DPMISCCAPS_MASKZ 0x00000002L
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
#define D3DPMISCCAPS_CONFORMANT 0x00000008L
#define D3DPMISCCAPS_CULLNONE 0x00000010L
#define D3DPMISCCAPS_CULLCW 0x00000020L
#define D3DPMISCCAPS_CULLCCW 0x00000040L
/* D3DPRIMCAPS dwRasterCaps */
#define D3DPRASTERCAPS_DITHER 0x00000001L
#define D3DPRASTERCAPS_ROP2 0x00000002L
#define D3DPRASTERCAPS_XOR 0x00000004L
#define D3DPRASTERCAPS_PAT 0x00000008L
#define D3DPRASTERCAPS_ZTEST 0x00000010L
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
#define D3DPRASTERCAPS_STIPPLE 0x00000200L
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
#define D3DPCMPCAPS_NEVER 0x00000001L
#define D3DPCMPCAPS_LESS 0x00000002L
#define D3DPCMPCAPS_EQUAL 0x00000004L
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
#define D3DPCMPCAPS_GREATER 0x00000010L
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
#define D3DPCMPCAPS_ALWAYS 0x00000080L
/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
#define D3DPBLENDCAPS_ZERO 0x00000001L
#define D3DPBLENDCAPS_ONE 0x00000002L
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
/* D3DPRIMCAPS dwShadeCaps */
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
#define D3DPSHADECAPS_FOGFLAT 0x00040000L
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
#define D3DPSHADECAPS_FOGPHONG 0x00100000L
/* D3DPRIMCAPS dwTextureCaps */
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
#define D3DPTEXTURECAPS_POW2 0x00000002L
#define D3DPTEXTURECAPS_ALPHA 0x00000004L
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
#define D3DPTEXTURECAPS_BORDER 0x00000010L
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
/* D3DPRIMCAPS dwTextureFilterCaps */
#define D3DPTFILTERCAPS_NEAREST 0x00000001L
#define D3DPTFILTERCAPS_LINEAR 0x00000002L
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
/* D3DPRIMCAPS dwTextureBlendCaps */
#define D3DPTBLENDCAPS_DECAL 0x00000001L
#define D3DPTBLENDCAPS_MODULATE 0x00000002L
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
#define D3DPTBLENDCAPS_DECALMASK 0x00000010L
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
#define D3DPTBLENDCAPS_COPY 0x00000040L
#define D3DPTBLENDCAPS_ADD 0x00000080L
/* D3DPRIMCAPS dwTextureAddressCaps */
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
/*
* Description for a device.
* This is used to describe a device that is to be created or to query
* the current device.
*/
typedef struct _D3DDeviceDesc {
DWORD dwSize; /* Size of D3DDEVICEDESC structure */
DWORD dwFlags; /* Indicates which fields have valid data */
D3DCOLORMODEL dcmColorModel; /* Color model of device */
DWORD dwDevCaps; /* Capabilities of device */
D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
BOOL bClipping; /* Device can do 3D clipping */
D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
DWORD dwMaxBufferSize; /* Maximum execute buffer size */
DWORD dwMaxVertexCount; /* Maximum vertex count */
// *** New fields for DX5 *** //
// Width and height caps are 0 for legacy HALs.
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMinStippleWidth, dwMaxStippleWidth;
DWORD dwMinStippleHeight, dwMaxStippleHeight;
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
typedef HRESULT (FAR PASCAL * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
/* D3DDEVICEDESC dwFlags indicating valid fields */
#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
/* D3DDEVICEDESC dwDevCaps flags */
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
/* for post-transform vertex data */
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z*/
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z*/
#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
#define D3DFDS_GUID 0x00000002L /* Match guid */
#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
/*
* FindDevice arguments
*/
typedef struct _D3DFINDDEVICESEARCH {
DWORD dwSize;
DWORD dwFlags;
BOOL bHardware;
D3DCOLORMODEL dcmColorModel;
GUID guid;
DWORD dwCaps;
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
typedef struct _D3DFINDDEVICERESULT {
DWORD dwSize;
GUID guid; /* guid which matched */
D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
/*
* Description of execute buffer.
*/
typedef struct _D3DExecuteBufferDesc {
DWORD dwSize; /* size of this structure */
DWORD dwFlags; /* flags indicating which fields are valid */
DWORD dwCaps; /* capabilities of execute buffer */
DWORD dwBufferSize; /* size of execute buffer data */
LPVOID lpData; /* pointer to actual data */
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
/* D3DEXECUTEBUFFER dwFlags indicating valid fields */
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
#define D3DDEB_CAPS 0x00000002l /* caps valid */
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
/* D3DEXECUTEBUFFER dwCaps */
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
#pragma pack()
#endif /* _D3DCAPS_H_ */
-793
View File
@@ -1,793 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3di.h
* Content: Direct3D internal include file
*@@BEGIN_MSINTERNAL
*
* $Id: vd3di.h,v 2.2 2002-08-01 01:41:04 penguin Exp $
*
* History:
* Date By Reason
* ==== == ======
* 05/11/95 stevela Initial rev with this header.
* 11/11/95 stevela Light code changed.
* 21/11/95 colinmc Made Direct3D aggregatable
* (so it can be QI'd off DirectDraw).
* 23/11/95 colinmc Made Direct3D textures and devices aggregatable
* (QI'd off DirectDrawSurfaces).
* 07/12/95 stevela Merged in Colin's changes.
* 10/12/95 stevela Removed AGGREGATE_D3D.
* Removed Validate macros from here. Now in d3dpr.h
* 02/03/96 colinmc Minor build fix
* 17/04/96 stevela Use ddraw.h externally and ddrawp.h internally
*@@END_MSINTERNAL
*
***************************************************************************/
#ifndef _D3DI_H
#define _D3DI_H
//@@BEGIN_MSINTERNAL
#include "vddrawp.h"
#if 0
//@@END_MSINTERNAL
#include "directx/vddraw.h"
//@@BEGIN_MSINTERNAL
#endif
//@@END_MSINTERNAL
#include "directx/vd3d.h"
// @@BEGIN_MSINTERNAL
#if !defined(BUILD_RLAPI) && !defined(BUILD_DDDDK)
#include "vddrawi.h"
#include "rlreg.h"
#include "lists.h"
#include "object/object.h"
/*
INDEX_BATCH_SCALE is the constant which is used by DrawIndexedPrim
to deterimine if the number of primitives being drawn is small
relative to the number of vertices being passed. If it is then
the prims are dereferenced in batches and sent to DrawPrim.
*/
#define INDEX_BATCH_SCALE 2
/*
typedef D3DCOLORMODEL D3DCOLORMODEL;
#define D3DCOLOR_RAMP D3DCOLOR_RAMP
#define D3DCOLOR_RGB D3DCOLOR_RGB
#define D3D_COLORMODEL D3D_COLORMODEL
*/
#endif /* !BUILD_RLAPI */
// @@END_MSINTERNAL
typedef DWORD D3DI_BUFFERHANDLE, *LPD3DI_BUFFERHANDLE;
/*
* Internal version of executedata
*/
typedef struct _D3DI_ExecuteData {
DWORD dwSize;
D3DI_BUFFERHANDLE dwHandle; /* Handle allocated by driver */
DWORD dwVertexOffset;
DWORD dwVertexCount;
DWORD dwInstructionOffset;
DWORD dwInstructionLength;
DWORD dwHVertexOffset;
D3DSTATUS dsStatus; /* Status after execute */
} D3DI_EXECUTEDATA, *LPD3DI_EXECUTEDATA;
/*
* Internal version of lightdata and constants for flags
*/
#define D3DLIGHTI_ATT0_IS_NONZERO (0x00010000)
#define D3DLIGHTI_ATT1_IS_NONZERO (0x00020000)
#define D3DLIGHTI_ATT2_IS_NONZERO (0x00040000)
#define D3DLIGHTI_LINEAR_FALLOFF (0x00080000)
#define D3DLIGHTI_UNIT_SCALE (0x00100000)
#define D3DLIGHTI_LIGHT_AT_EYE (0x00200000)
typedef struct _D3DI_LIGHT {
D3DLIGHTTYPE type;
DWORD version; /* matches number on D3DLIGHT struct */
BOOL valid;
D3DVALUE red, green, blue, shade;
D3DVECTOR position;
D3DVECTOR model_position;
D3DVECTOR direction;
D3DVECTOR model_direction;
D3DVECTOR halfway;
D3DVECTOR model_eye; /* direction from eye in model space */
D3DVECTOR model_scale; /* model scale for proper range computations */
D3DVALUE range;
D3DVALUE range_squared;
D3DVALUE falloff;
D3DVALUE attenuation0;
D3DVALUE attenuation1;
D3DVALUE attenuation2;
D3DVALUE cos_theta_by_2;
D3DVALUE cos_phi_by_2;
DWORD flags;
} D3DI_LIGHT, *LPD3DI_LIGHT;
// @@BEGIN_MSINTERNAL
#if !defined(BUILD_RLAPI) && !defined(BUILD_DDDDK)
#ifndef BUILD_HEL
#ifdef BUILD_D3D_LAYER
#include "driver.h"
#endif
typedef struct IUnknownVtbl D3DUNKNOWNCALLBACKS, *LPD3DUNKNOWNCALLBACKS;
typedef struct ID3DObjectVtbl D3DOBJECTVTBL, *LPD3DOBJECTVTBL;
typedef struct IDirect3DVtbl DIRECT3DCALLBACKS, *LPDIRECT3DCALLBACKS;
typedef struct IDirect3D2Vtbl DIRECT3D2CALLBACKS, *LPDIRECT3D2CALLBACKS;
typedef struct IDirect3DDeviceVtbl DIRECT3DDEVICECALLBACKS, *LPDIRECT3DDEVICECALLBACKS;
typedef struct IDirect3DDevice2Vtbl DIRECT3DDEVICE2CALLBACKS, *LPDIRECT3DDEVICE2CALLBACKS;
typedef struct IDirect3DExecuteBufferVtbl DIRECT3DEXECUTEBUFFERCALLBACKS, *LPDIRECT3DEXECUTEBUFFERCALLBACKS;
typedef struct IDirect3DLightVtbl DIRECT3DLIGHTCALLBACKS, *LPDIRECT3DLIGHTCALLBACKS;
typedef struct IDirect3DMaterialVtbl DIRECT3DMATERIALCALLBACKS, *LPDIRECT3DMATERIALCALLBACKS;
typedef struct IDirect3DMaterial2Vtbl DIRECT3DMATERIAL2CALLBACKS, *LPDIRECT3DMATERIAL2CALLBACKS;
typedef struct IDirect3DTextureVtbl DIRECT3DTEXTURECALLBACKS, *LPDIRECT3DTEXTURECALLBACKS;
typedef struct IDirect3DTexture2Vtbl DIRECT3DTEXTURE2CALLBACKS, *LPDIRECT3DTEXTURE2CALLBACKS;
typedef struct IDirect3DViewport2Vtbl DIRECT3DVIEWPORT2CALLBACKS, *LPDIRECT3DVIEWPORT2CALLBACKS;
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _DIRECT3DI *LPDIRECT3DI;
typedef struct _DIRECT3DDEVICEI *LPDIRECT3DDEVICEI;
typedef struct _DIRECT3DEXECUTEBUFFERI *LPDIRECT3DEXECUTEBUFFERI;
typedef struct _DIRECT3DLIGHTI *LPDIRECT3DLIGHTI;
typedef struct _DIRECT3DMATERIALI *LPDIRECT3DMATERIALI;
typedef struct _DIRECT3DTEXTUREI *LPDIRECT3DTEXTUREI;
typedef struct _DIRECT3DVIEWPORTI *LPDIRECT3DVIEWPORTI;
/*
* If we have an aggregate Direct3D we need a structure to
* represent an interface distinct from the underlying
* object. This is that structure. None of this would be necessary
* in C++
*/
typedef struct _DIRECT3DUNKNOWNI
{
LPD3DUNKNOWNCALLBACKS lpVtbl;
LPDIRECT3DI lpObj;
} DIRECT3DUNKNOWNI;
typedef struct _DIRECT3DUNKNOWNI *LPDIRECT3DUNKNOWNI;
typedef struct _DIRECT3DOLDI
{
LPDIRECT3DCALLBACKS lpVtbl;
LPDIRECT3DI lpObj;
} DIRECT3DOLDI;
typedef struct _DIRECT3DOLDI *LPDIRECT3DOLDI;
/*
* Internal version of Direct3D object; it has data after the vtable
*/
typedef struct _DIRECT3DI
{
/*** Object Interface ***/
LPDIRECT3D2CALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count object */
/*** Object Relations ***/
/* Devices */
int numDevs;/* Number of devices */
LIST_ROOT(_devices, _DIRECT3DDEVICEI) devices;
/* Associated IDirect3DDevices */
/* Viewports */
int numViewports; /* Number of viewports */
LIST_ROOT(_viewports, _DIRECT3DVIEWPORTI) viewports;
/* Created IDirect3DViewports */
/* Lights */
int numLights; /* Number of lights */
LIST_ROOT(_lights, _DIRECT3DLIGHTI) lights;
/* Created IDirect3DLights */
/* Materials */
int numMaterials; /* Number of materials */
LIST_ROOT(_materials, _DIRECT3DMATERIALI) materials;
/* Created IDirect3DMaterials */
/*** Object Data ***/
unsigned long v_next; /* id of next viewport to be created */
RLDDIRegistry* lpReg; /* Registry */
/*
* DirectDraw Interface
*/
LPDDRAWI_DIRECTDRAW_INT lpDDInt;
/*
* The special IUnknown interface for the aggregate that does
* not punt to the parent object.
*/
LPUNKNOWN lpOwningIUnknown; /* The owning IUnknown */
DIRECT3DUNKNOWNI lpThisIUnknown; /* Our IUnknown interface */
DIRECT3DOLDI lpThisIDirect3D; /* Our IDirect3D interface */
DWORD dwVersion; /* 1 for legacy D3D, 2 for D3D2 */
} DIRECT3DI;
/*
* If we have an aggreate Direct3DDevice we need a structure to
* represent an interface distinct from the underlying
* object. This is that structure.
*/
typedef struct _DIRECT3DDEVICEUNKNOWNI
{
LPDIRECT3DDEVICE2CALLBACKS lpVtbl;
LPDIRECT3DDEVICEI lpObj;
} DIRECT3DDEVICEUNKNOWNI;
typedef struct _DIRECT3DDEVICEUNKNOWNI *LPDIRECT3DDEVICEUNKNOWNI;
typedef struct _DIRECT3DDEVICEOLDI
{
LPDIRECT3DDEVICECALLBACKS lpVtbl;
LPDIRECT3DDEVICEI lpObj;
} DIRECT3DDEVICEOLDI;
typedef struct _DIRECT3DDEVICEOLDI *LPDIRECT3DDEVICEOLDI;
/*
* Internal version of Direct3DDevice object; it has data after the vtable
*/
#include "vd3dhal.h"
typedef RLDDIDriver* (*RLDDIDDrawCreateDriverFn)(
LPDDRAWI_DIRECTDRAW_INT lpDDInt,
LPDIRECTDRAWSURFACE lpDDS,
LPDIRECTDRAWSURFACE lpZ,
LPDIRECTDRAWPALETTE lpPal,
LPDIRECT3DDEVICEI);
typedef HRESULT (*RLDDIGetCapsFn)(LPD3DDEVICEDESC*, LPD3DDEVICEDESC*);
typedef void (*RLDDIInitFn)(RLDDIMallocFn, RLDDIReallocFn, RLDDIFreeFn, RLDDIRaiseFn, RLDDIValue**, int, int);
typedef void (*RLDDIPushDriverFn)(RLDDIDriverStack*, RLDDIDriver*);
typedef void (*RLDDIPopDriverFn)(RLDDIDriverStack*);
struct _RLDDIGenRasDriver;
typedef struct _RLDDIGenRasDriver* LPRLDDIGENRASDRIVER;
struct _RLDDIDDrawDriver;
typedef struct _RLDDIDDrawDriver* LPRLDDIDDRAWDRIVER;
struct _RLDDITransformDriver;
typedef struct _RLDDITransformDriver* LPRLDDITRANSFORMDRIVER;
typedef HRESULT (*PFNLOCKTEXTURE)(LPRLDDIGENRASDRIVER driver);
typedef void (*PFNUNLOCKTEXTURE)(LPRLDDIGENRASDRIVER driver);
typedef int (*PFNSETFILLPARAMS)(LPRLDDIGENRASDRIVER driver, D3DSTATE* in_params,
int count);
typedef HRESULT (*PFNREALLOCALIGNED)(void** p_inout, size_t size);
typedef HRESULT (*PFNMALLOCALIGNED)(void** p_inout, size_t size);
typedef HRESULT (*PFNFREEALIGNED)(void* p_inout);
typedef HRESULT (*PFNDRVSETRENDERTARGET)(LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE,
LPDIRECTDRAWPALETTE, LPDIRECT3DDEVICEI);
typedef HRESULT (*PFNDOFLUSHBEGINEND)(LPDIRECT3DDEVICE2, DWORD);
typedef HRESULT (*PFNDRAWPRIMITIVES)(LPDIRECT3DDEVICEI, LPD3DTLVERTEX, LPVOID, LPD3DINSTRUCTION, DWORD);
typedef struct _D3DI_TEXTUREBLOCK
{
LIST_MEMBER(_D3DI_TEXTUREBLOCK) list;
/* Next block in IDirect3DTexture */
LIST_MEMBER(_D3DI_TEXTUREBLOCK) devList;
/* Next block in IDirect3DDevice */
LPDIRECT3DDEVICEI lpD3DDeviceI;
LPDIRECT3DTEXTUREI lpD3DTextureI;
D3DTEXTUREHANDLE hTex;
/* texture handle */
} D3DI_TEXTUREBLOCK;
typedef struct _D3DI_TEXTUREBLOCK *LPD3DI_TEXTUREBLOCK;
typedef struct _D3DI_MATERIALBLOCK
{
LIST_MEMBER(_D3DI_MATERIALBLOCK) list;
/* Next block in IDirect3DMaterial */
LIST_MEMBER(_D3DI_MATERIALBLOCK) devList;
/* Next block in IDirect3DDevice */
LPDIRECT3DDEVICEI lpD3DDeviceI;
LPDIRECT3DMATERIALI lpD3DMaterialI;
D3DMATERIALHANDLE hMat;
/* material handle */
} D3DI_MATERIALBLOCK;
typedef struct _D3DI_MATERIALBLOCK *LPD3DI_MATERIALBLOCK;
#define D3D_RSTATEBUF_SIZE 128
#define D3D_MAX_RSTATES 96 /* Last render state ID + 1 */
#define D3D_MAX_MMX_VERTICES 1024
extern DWORD dwD3DTriBatchSize, dwTriBatchSize, dwLineBatchSize;
extern DWORD dwHWBufferSize, dwHWMaxTris;
extern DWORD dwHWFewVertices;
typedef struct _D3DHAL_DRAWPRIMCOUNTS *LPD3DHAL_DRAWPRIMCOUNTS;
// Legacy HAL batching is done with these structs.
typedef struct _D3DI_HWCOUNTS {
WORD wNumStateChanges; // Number of state changes batched
WORD wNumVertices; // Number of vertices in tri list
WORD wNumTriangles; // Number of triangles in tri list
} D3DI_HWCOUNTS, *LPD3DI_HWCOUNTS;
typedef struct _DIRECT3DDEVICEI
{
/*** Object Interface ***/
LPDIRECT3DDEVICE2CALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations ***/
LPDIRECT3DI lpDirect3DI; /* parent */
LIST_MEMBER(_DIRECT3DDEVICEI)list; /* Next device IDirect3D */
/* Textures */
LIST_ROOT(_textures, _D3DI_TEXTUREBLOCK) texBlocks;
/* Ref to created IDirect3DTextures */
/* Execute buffers */
LIST_ROOT(_buffers, _DIRECT3DEXECUTEBUFFERI) buffers;
/* Created IDirect3DExecuteBuffers */
/* Viewports */
int numViewports;
CIRCLE_QUEUE_ROOT(_dviewports, _DIRECT3DVIEWPORTI) viewports;
/* Associated IDirect3DViewports */
LPDIRECT3DVIEWPORT2 lpCurrentViewport;
/* Materials */
LIST_ROOT(_dmmaterials, _D3DI_MATERIALBLOCK) matBlocks;
/* Ref to associated IDirect3DMaterials */
/*** Object Data ***/
/* Private interfaces */
LPD3DOBJECTVTBL lpClassVtbl; /* Private Vtbl */
LPD3DOBJECTVTBL lpObjVtbl; /* Private Vtbl */
LPD3DHAL_CALLBACKS lpD3DHALCallbacks; /* HW specific */
LPD3DHAL_GLOBALDRIVERDATA lpD3DHALGlobalDriverData; /* HW specific */
/* Viewports */
unsigned long v_id; /* ID of last viewport rendered */
/* Lights */
int numLights;
/* This indicates the maximum number
of lights that have been set in
the device. */
/* Device characteristics */
int age;
int width;
int height;
int depth;
unsigned long red_mask, green_mask, blue_mask;
int dither;
int ramp_size; /* SW specific */
D3DCOLORMODEL color_model;
int wireframe_options;
D3DTEXTUREFILTER texture_quality;
D3DVALUE gamma;
unsigned char gamma_table[256];
int aspectx, aspecty;
D3DVALUE perspective_tolerance;
/* Library information */
#ifdef _WIN32
HINSTANCE hDrvDll;
char dllname[MAXPATH];
char base[256];
#endif
#ifdef SHLIB
void* so;
#endif
/* Are we in a scene? */
BOOL bInScene;
/* Our Device type */
GUID guid;
/* GetCaps function from the library */
RLDDIGetCapsFn GetCapsFn;
/* Functions required to build driver */
RLDDIInitFn RLDDIInit;
RLDDIPushDriverFn RLDDIPushDriver;
RLDDIPopDriverFn RLDDIPopDriver;
RLDDIDDrawCreateDriverFn RLDDIDDrawCreateDriver;
/* Device description */
D3DDEVICEDESC d3dHWDevDesc;
D3DDEVICEDESC d3dHELDevDesc;
/* Driver stack */
RLDDIDriverStack* stack;
/*
* The special IUnknown interface for the aggregate that does
* not punt to the parent object.
*/
LPUNKNOWN lpOwningIUnknown; /* The owning IUnknown */
DIRECT3DDEVICEUNKNOWNI lpThisIUnknown; /* Our IUnknown interface */
DIRECT3DDEVICEOLDI lpThisID3DDev; /* Our IDirect3DDevice interface */
LPD3DHAL_CALLBACKS2 lpD3DHALCallbacks2; /* HW specific */
/*
* Renderstate cache for DrawPrimitive
*/
WORD wRStateBufLevel;
D3DSTATE renStateBuf[D3D_RSTATEBUF_SIZE];
/* Pointers to drivers used by DrawPrimitive */
LPRLDDIGENRASDRIVER rasDriver; /* SW specific */
LPRLDDITRANSFORMDRIVER xfmDriver; /* Assumed to be NULL for HW */
LPRLDDIDDRAWDRIVER drawDriver; /* Assumed to be NULL for HW */
/*
* Pointers to functions used by DrawPrim&Begin/End
*/
PFNLOCKTEXTURE pfnLockTexture; /* SW specific */
PFNUNLOCKTEXTURE pfnUnlockTexture; /* SW specific */
PFNSETFILLPARAMS pfnSetFillParams; /* SW specific */
PFNREALLOCALIGNED pfnReallocAligned; /* SW specific */
PFNDRVSETRENDERTARGET pfnDrvSetRenderTarget; /* SW specific */
HRESULT (*pfnFlushStates)(struct _DIRECT3DDEVICEI*);
PFNDOFLUSHBEGINEND pfnDoFlushBeginEnd;
PFNDRAWPRIMITIVES pfnDrawPrimitives;
/* Are we between Begin/End? */
BOOL bInBegin;
D3DVERTEXTYPE vtVertexType;
D3DPRIMITIVETYPE ptPrimitiveType;
CRITICAL_SECTION BeginEndCSect;
// max number of vertices
#define BEGIN_DATA_BLOCK_SIZE 256
LPVOID lpvVertexBatch;
WORD *lpIndexBatch;
// lpvVertexData is non-NULL if we are InBegin and indexed.
LPVOID lpvVertexData;
DWORD dwNumVertices;
DWORD dwMaxVertexCount; // current number of vertices there is space for
WORD *lpVertexIndices;
DWORD dwNumIndices;
DWORD dwMaxIndexCount; // current number of indices there is space for
DWORD dwFlags;
WORD wFlushed;
/*
* DrawPrimitives batching
*/
// Buffer to put DrawPrimitives stuff into
// Used for both legacy and DrawPrimitive HALs
WORD *lpwDPBuffer;
WORD *lpwDPBufferAlloced;
/* Legacy HALs */
// pointer to current prim counts struct
LPD3DHAL_DRAWPRIMCOUNTS lpDPPrimCounts;
// Buffer of counts structures that keep track of the
// number of render states and vertices buffered
LPD3DI_HWCOUNTS lpHWCounts;
// Buffer of triangle structures.
LPD3DTRIANGLE lpHWTris;
// Buffer of interleaved render states and primitives.
LPD3DTLVERTEX lpHWVertices;
// Byte offset into lpHWVertices. This gets incremented
// by 8 when a render state is batched and by 32*dwNumVertices
// when a primitive is batched.
DWORD dwHWOffset;
// Max value of dwHWOffset. Used to decide whether to flush.
DWORD dwHWMaxOffset;
// Index into lpHWTris.
DWORD dwHWTriIndex;
// Number of counts structures used so far. This actually
// gives the number of primitives batched and the index of
// the counts structure to batch render states into.
DWORD dwHWNumCounts;
/* DrawPrimitive-aware HALs */
// Byte offset into buffer (we are currently
// using the device's wTriIndex)
DWORD dwDPOffset;
// Maximum offset. If dwDPOffset exceeds this, it is
// time to flush.
DWORD dwDPMaxOffset;
WORD *wTriIndex;
// buffers for TL and H vertices
LPD3DTLVERTEX lpTLVbuf;
LPD3DHVERTEX lpHVbuf;
DWORD dwVbufSize;
LPD3DHAL_D3DEXTENDEDCAPS lpD3DExtendedCaps; /* HW specific */
} DIRECT3DDEVICEI;
/*
* Internal version of Direct3DExecuteBuffer object;
* it has data after the vtable
*/
typedef struct _DIRECT3DEXECUTEBUFFERI
{
/*** Object Interface ***/
LPDIRECT3DEXECUTEBUFFERCALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations ***/
LPDIRECT3DDEVICEI lpD3DDeviceI; /* Parent */
LIST_MEMBER(_DIRECT3DEXECUTEBUFFERI)list;
/* Next buffer in IDirect3D */
/*** Object Data ***/
DWORD pid; /* Process locking execute buffer */
D3DEXECUTEBUFFERDESC debDesc;
/* Description of the buffer */
D3DEXECUTEDATA exData; /* Execute Data */
BOOL locked; /* Is the buffer locked */
D3DI_BUFFERHANDLE hBuf;
/* Execute buffer handle */
} DIRECT3DEXECUTEBUFFERI;
/*
* Internal version of Direct3DLight object;
* it has data after the vtable
*/
typedef struct _DIRECT3DLIGHTI
{
/*** Object Interface ***/
LPDIRECT3DLIGHTCALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations ***/
LPDIRECT3DI lpDirect3DI; /* Parent */
LIST_MEMBER(_DIRECT3DLIGHTI)list;
/* Next light in IDirect3D */
LPDIRECT3DVIEWPORTI lpD3DViewportI; /* Guardian */
CIRCLE_QUEUE_MEMBER(_DIRECT3DLIGHTI)light_list;
/* Next light in IDirect3DViewport */
/*** Object Data ***/
D3DLIGHT2 dlLight;/* Data describing light */
D3DI_LIGHT diLightData;
/* Internal representation of light */
} DIRECT3DLIGHTI;
typedef struct _DIRECT3DMATERIALOLDI
{
LPDIRECT3DMATERIALCALLBACKS lpVtbl;
LPDIRECT3DMATERIALI lpObj;
} DIRECT3DMATERIALOLDI, *LPDIRECT3DMATERIALOLDI;
/*
* Internal version of Direct3DMaterial object;
* it has data after the vtable
*/
typedef struct _DIRECT3DMATERIALI
{
/*** Object Interface ***/
LPDIRECT3DMATERIAL2CALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations ***/
LPDIRECT3DI lpDirect3DI; /* Parent */
DIRECT3DMATERIALOLDI lpThisID3DMat; /* Our IDirect3DMaterial interface */
LIST_MEMBER(_DIRECT3DMATERIALI)list;
/* Next MATERIAL in IDirect3D */
LIST_ROOT(_mblocks, _D3DI_MATERIALBLOCK)blocks;
/* devices we're associated with */
/*** Object Data ***/
D3DMATERIAL dmMaterial; /* Data describing material */
BOOL bRes; /* Is this material reserved in the driver */
} DIRECT3DMATERIALI;
/*
* If we have an aggreate Direct3DTexture we need a structure
* to represent an unknown interface distinct from the underlying
* object. This is that structure.
*/
typedef struct _DIRECT3DTEXTUREUNKNOWNI
{
LPDIRECT3DTEXTURECALLBACKS lpVtbl;
LPDIRECT3DTEXTUREI lpObj;
} DIRECT3DTEXTUREUNKNOWNI;
typedef struct _DIRECT3DTEXTUREUNKNOWNI *LPDIRECT3DTEXTUREUNKNOWNI;
typedef struct _DIRECT3DTEXTUREOLDI
{
LPDIRECT3DTEXTURECALLBACKS lpVtbl;
LPDIRECT3DTEXTUREI lpObj;
} DIRECT3DTEXTUREOLDI, *LPDIRECT3DTEXTUREOLDI;
/*
* Internal version of Direct3DTexture object; it has data after the vtable
*/
typedef struct _DIRECT3DTEXTUREI
{
/*** Object Interface ***/
LPDIRECT3DTEXTURE2CALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations ***/
LIST_ROOT(_blocks, _D3DI_TEXTUREBLOCK) blocks;
/* Devices we're associated with */
/*** Object Data ***/
LPDIRECTDRAWSURFACE lpDDS;
/*
* The special IUnknown interface for the aggregate that does
* not punt to the parent object.
*/
LPUNKNOWN lpOwningIUnknown; /* The owning IUnknown */
DIRECT3DTEXTUREUNKNOWNI lpThisIUnknown; /* Our IUnknown interface */
DIRECT3DTEXTUREOLDI lpThisID3DTex; /* Our IDirect3DTexture interface */
BOOL bIsPalettized;
} DIRECT3DTEXTUREI;
/*
* Internal version of Direct3DViewport object; it has data after the vtable
*/
typedef struct _DIRECT3DVIEWPORTI
{
/*** Object Interface ***/
LPDIRECT3DVIEWPORT2CALLBACKS lpVtbl; /* Pointer to callbacks */
int refCnt; /* Reference count */
/*** Object Relations */
LPDIRECT3DI lpDirect3DI; /* Parent */
LIST_MEMBER(_DIRECT3DVIEWPORTI)list;
/* Next viewport in IDirect3D */
LPDIRECT3DDEVICEI lpD3DDeviceI; /* Guardian */
CIRCLE_QUEUE_MEMBER(_DIRECT3DVIEWPORTI)vw_list;
/* Next viewport in IDirect3DDevice */
/* Lights */
int numLights;
CIRCLE_QUEUE_ROOT(_dlights, _DIRECT3DLIGHTI) lights;
/* Associated IDirect3DLights */
/*** Object Data ***/
unsigned long v_id; /* Id for this viewport */
D3DVIEWPORT2 v_data;
BOOL v_data_is_set;
BOOL have_background;
D3DMATERIALHANDLE background;
/* Background material */
BOOL have_depth;
LPDIRECTDRAWSURFACE depth; /* Background depth */
BOOL bLightsChanged;
/* Have the lights changed since they
were last collected? */
DWORD clrCount; /* Number of rects allocated */
LPD3DRECT clrRects; /* Rects used for clearing */
} DIRECT3DVIEWPORTI;
/*
* Picking stuff.
*/
typedef struct _D3DI_PICKDATA {
D3DI_EXECUTEDATA* exe;
D3DPICKRECORD* records;
int pick_count;
D3DRECT pick;
} D3DI_PICKDATA, *LPD3DI_PICKDATA;
/*
* Direct3D memory allocation
*/
/*
* Register a set of functions to be used in place of malloc, realloc
* and free for memory allocation. The functions D3DMalloc, D3DRealloc
* and D3DFree will use these functions. The default is to use the
* ANSI C library routines malloc, realloc and free.
*/
typedef LPVOID (*D3DMALLOCFUNCTION)(size_t);
typedef LPVOID (*D3DREALLOCFUNCTION)(LPVOID, size_t);
typedef VOID (*D3DFREEFUNCTION)(LPVOID);
/*
* Allocate size bytes of memory and return a pointer to it in *p_return.
* Returns D3DERR_BADALLOC with *p_return unchanged if the allocation fails.
*/
extern __declspec (dllexport) HRESULT D3DAPI D3DMalloc(LPVOID* p_return, size_t size);
/*
* Change the size of an allocated block of memory. A pointer to the
* block is passed in in *p_inout. If *p_inout is NULL then a new
* block is allocated. If the reallocation is successful, *p_inout is
* changed to point to the new block. If the allocation fails,
* *p_inout is unchanged and D3DERR_BADALLOC is returned.
*/
HRESULT D3DAPI D3DRealloc(LPVOID* p_inout, size_t size);
/*
* Free a block of memory previously allocated with D3DMalloc or
* D3DRealloc.
*/
extern __declspec (dllexport) VOID D3DAPI D3DFree(LPVOID p);
/*
* Used for raising errors from the driver.
*/
HRESULT D3DAPI D3DRaise(HRESULT);
/*
* Convert RLDDI error codes to D3D error codes
*/
#define RLDDITOD3DERR(_errcode) (RLDDIToD3DErrors[_errcode])
extern HRESULT RLDDIToD3DErrors[];
/*
* maths
*/
#if 1 /* defined(STACK_CALL) && defined(__WATCOMC__) */
D3DVALUE D3DIPow(D3DVALUE, D3DVALUE);
#else
#define D3DIPow(v,p) DTOVAL(pow(VALTOD(v), VALTOD(p)))
#endif
/*
* Light utils
*/
void D3DI_DeviceMarkLightEnd(LPDIRECT3DDEVICEI, int);
void D3DI_UpdateLightInternal(LPDIRECT3DLIGHTI);
void D3DI_VectorNormalise12(LPD3DVECTOR v);
D3DTEXTUREHANDLE D3DI_FindTextureHandle(LPDIRECT3DTEXTUREI, LPDIRECT3DDEVICEI);
void D3DI_SetTextureHandle(LPDIRECT3DTEXTUREI, LPDIRECT3DDEVICEI, D3DTEXTUREHANDLE);
void D3DI_RemoveTextureBlock(LPD3DI_TEXTUREBLOCK);
void D3DI_RemoveMaterialBlock(LPD3DI_MATERIALBLOCK);
extern BOOL D3DI_isHALValid(LPD3DHAL_CALLBACKS);
#ifdef BUILD_D3D_LAYER
extern RLDDIValue* RLDDIFInvSqrtTable;
#endif
#ifdef __cplusplus
};
#endif
#endif /* BUILD_HEL */
#endif /* !BUILD_RLAPI */
// @@END_MSINTERNAL
#endif /* _D3DI_H */
-229
View File
@@ -1,229 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRM_H__
#define __D3DRM_H__
#include "directx/vddraw.h"
#include "directx/vd3drmobj.h"
#ifdef __cplusplus
extern "C" {
struct IDirect3DRM;
#endif
DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
WIN_TYPES(IDirect3DRM, DIRECT3DRM);
WIN_TYPES(IDirect3DRM2, DIRECT3DRM2);
/* Create a Direct3DRM API */
STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
#undef INTERFACE
#define INTERFACE IDirect3DRM
DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateObject)
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
/* Create a Windows Device using DirectDraw surfaces */
STDMETHOD(CreateDeviceFromSurface)
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
) PURE;
/* Create a Windows Device using D3D objects */
STDMETHOD(CreateDeviceFromD3D)
( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
LPDIRECT3DRMDEVICE *
) PURE;
STDMETHOD(CreateDeviceFromClipper)
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
int width, int height, LPDIRECT3DRMDEVICE *) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(CreateShadow)
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMVISUAL *
) PURE;
STDMETHOD(CreateViewport)
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
) PURE;
STDMETHOD(CreateWrap)
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
D3DVALUE ou, D3DVALUE ov,
D3DVALUE su, D3DVALUE sv,
LPDIRECT3DRMWRAP *
) PURE;
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
STDMETHOD(Load)
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
LPDIRECT3DRMFRAME
) PURE;
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
};
#undef INTERFACE
#define INTERFACE IDirect3DRM2
DECLARE_INTERFACE_(IDirect3DRM2, IUnknown)
{
IUNKNOWN_METHODS(PURE);
STDMETHOD(CreateObject)
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE;
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE;
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateLightRGB)
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE;
/* Create a Windows Device using DirectDraw surfaces */
STDMETHOD(CreateDeviceFromSurface)
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 *
) PURE;
/* Create a Windows Device using D3D objects */
STDMETHOD(CreateDeviceFromD3D)
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
LPDIRECT3DRMDEVICE2 *
) PURE;
STDMETHOD(CreateDeviceFromClipper)
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
int width, int height, LPDIRECT3DRMDEVICE2 *) PURE;
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(CreateShadow)
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
LPDIRECT3DRMVISUAL *
) PURE;
STDMETHOD(CreateViewport)
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
) PURE;
STDMETHOD(CreateWrap)
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
D3DVALUE ou, D3DVALUE ov,
D3DVALUE su, D3DVALUE sv,
LPDIRECT3DRMWRAP *
) PURE;
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE;
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
STDMETHOD(Load)
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
LPDIRECT3DRMFRAME
) PURE;
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
};
#define D3DRM_OK DD_OK
#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
#define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
#define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
#define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
#define D3DRMERR_PENDING MAKE_DDHRESULT(796)
#define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
#define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
#define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
#define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
#define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
#define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
#define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
#define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
#define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
#ifdef __cplusplus
};
#endif
#endif /* _D3DRMAPI_H_ */
-472
View File
@@ -1,472 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRMDEFS_H__
#define __D3DRMDEFS_H__
#include <stddef.h>
#include "directx/vd3dtypes.h"
#ifdef _WIN32
#define D3DRMAPI __stdcall
#else
#define D3DRMAPI
#endif
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
typedef struct _D3DRMVECTOR4D
{ D3DVALUE x, y, z, w;
} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
typedef D3DVALUE D3DRMMATRIX4D[4][4];
typedef struct _D3DRMQUATERNION
{ D3DVALUE s;
D3DVECTOR v;
} D3DRMQUATERNION, *LPD3DRMQUATERNION;
typedef struct _D3DRMRAY
{ D3DVECTOR dvDir;
D3DVECTOR dvPos;
} D3DRMRAY, *LPD3DRMRAY;
typedef struct _D3DRMBOX
{ D3DVECTOR min, max;
} D3DRMBOX, *LPD3DRMBOX;
typedef void (*D3DRMWRAPCALLBACK)
(LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
typedef enum _D3DRMLIGHTTYPE
{ D3DRMLIGHT_AMBIENT,
D3DRMLIGHT_POINT,
D3DRMLIGHT_SPOT,
D3DRMLIGHT_DIRECTIONAL,
D3DRMLIGHT_PARALLELPOINT
} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
typedef enum _D3DRMSHADEMODE {
D3DRMSHADE_FLAT = 0,
D3DRMSHADE_GOURAUD = 1,
D3DRMSHADE_PHONG = 2,
D3DRMSHADE_MASK = 7,
D3DRMSHADE_MAX = 8
} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
typedef enum _D3DRMLIGHTMODE {
D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
typedef enum _D3DRMFILLMODE {
D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
} D3DRMFILLMODE, *LPD3DRMFILLMODE;
typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1
#define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2
typedef enum _D3DRMTEXTUREQUALITY
{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */
D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
typedef enum _D3DRMCOMBINETYPE
{ D3DRMCOMBINE_REPLACE,
D3DRMCOMBINE_BEFORE,
D3DRMCOMBINE_AFTER
} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
typedef enum _D3DRMPALETTEFLAGS
{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */
D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
D3DRMPALETTE_RESERVED /* may not be used by renderer */
} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
typedef struct _D3DRMPALETTEENTRY
{ unsigned char red; /* 0 .. 255 */
unsigned char green; /* 0 .. 255 */
unsigned char blue; /* 0 .. 255 */
unsigned char flags; /* one of D3DRMPALETTEFLAGS */
} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
typedef struct _D3DRMIMAGE
{ int width, height; /* width and height in pixels */
int aspectx, aspecty; /* aspect ratio for non-square pixels */
int depth; /* bits per pixel */
int rgb; /* if false, pixels are indices into a
palette otherwise, pixels encode
RGB values. */
int bytes_per_line; /* number of bytes of memory for a
scanline. This must be a multiple
of 4. */
void* buffer1; /* memory to render into (first buffer). */
void* buffer2; /* second rendering buffer for double
buffering, set to NULL for single
buffering. */
unsigned long red_mask;
unsigned long green_mask;
unsigned long blue_mask;
unsigned long alpha_mask; /* if rgb is true, these are masks for
the red, green and blue parts of a
pixel. Otherwise, these are masks
for the significant bits of the
red, green and blue elements in the
palette. For instance, most SVGA
displays use 64 intensities of red,
green and blue, so the masks should
all be set to 0xfc. */
int palette_size; /* number of entries in palette */
D3DRMPALETTEENTRY* palette; /* description of the palette (only if
rgb is false). Must be (1<<depth)
elements. */
} D3DRMIMAGE, *LPD3DRMIMAGE;
typedef enum _D3DRMWRAPTYPE
{ D3DRMWRAP_FLAT,
D3DRMWRAP_CYLINDER,
D3DRMWRAP_SPHERE,
D3DRMWRAP_CHROME
} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
#define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
#define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
typedef enum _D3DRMPROJECTIONTYPE
{ D3DRMPROJECT_PERSPECTIVE,
D3DRMPROJECT_ORTHOGRAPHIC,
D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
typedef enum _D3DRMXOFFORMAT
{ D3DRMXOF_BINARY,
D3DRMXOF_COMPRESSED,
D3DRMXOF_TEXT
} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
typedef DWORD D3DRMSAVEOPTIONS;
#define D3DRMXOFSAVE_NORMALS 1
#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
#define D3DRMXOFSAVE_MATERIALS 4
#define D3DRMXOFSAVE_TEXTURENAMES 8
#define D3DRMXOFSAVE_ALL 15
#define D3DRMXOFSAVE_TEMPLATES 16
#define D3DRMXOFSAVE_TEXTURETOPOLOGY 32
typedef enum _D3DRMCOLORSOURCE
{ D3DRMCOLOR_FROMFACE,
D3DRMCOLOR_FROMVERTEX
} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
typedef enum _D3DRMFRAMECONSTRAINT
{ D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
D3DRMCONSTRAIN_X /* use only Y and Z rotations */
} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
typedef enum _D3DRMMATERIALMODE
{ D3DRMMATERIAL_FROMMESH,
D3DRMMATERIAL_FROMPARENT,
D3DRMMATERIAL_FROMFRAME
} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
typedef enum _D3DRMFOGMODE
{ D3DRMFOG_LINEAR, /* linear between start and end */
D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
} D3DRMFOGMODE, *LPD3DRMFOGMODE;
typedef enum _D3DRMZBUFFERMODE {
D3DRMZBUFFER_FROMPARENT, /* default */
D3DRMZBUFFER_ENABLE, /* enable zbuffering */
D3DRMZBUFFER_DISABLE /* disable zbuffering */
} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
typedef enum _D3DRMSORTMODE {
D3DRMSORT_FROMPARENT, /* default */
D3DRMSORT_NONE, /* don't sort child frames */
D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
} D3DRMSORTMODE, *LPD3DRMSORTMODE;
/*
* Values for flags in Frame2::AddMoveCallback.
*/
#define D3DRMCALLBACK_PREORDER 0
#define D3DRMCALLBACK_POSTORDER 1
/*
* Values for flags in MeshBuilder2::RayPick.
*/
#define D3DRMRAYPICK_ONLYBOUNDINGBOXES 1
#define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES 2
#define D3DRMRAYPICK_INTERPOLATEUV 4
#define D3DRMRAYPICK_INTERPOLATECOLOR 8
#define D3DRMRAYPICK_INTERPOLATENORMAL 0x10
/*
* Values for flags in MeshBuilder2::GenerateNormals.
*/
#define D3DRMGENERATENORMALS_PRECOMPACT 1
#define D3DRMGENERATENORMALS_USECREASEANGLE 2
typedef DWORD D3DRMANIMATIONOPTIONS;
#define D3DRMANIMATION_OPEN 0x01L
#define D3DRMANIMATION_CLOSED 0x02L
#define D3DRMANIMATION_LINEARPOSITION 0x04L
#define D3DRMANIMATION_SPLINEPOSITION 0x08L
#define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
#define D3DRMANIMATION_POSITION 0x00000020L
typedef DWORD D3DRMINTERPOLATIONOPTIONS;
#define D3DRMINTERPOLATION_OPEN 0x01L
#define D3DRMINTERPOLATION_CLOSED 0x02L
#define D3DRMINTERPOLATION_NEAREST 0x0100L
#define D3DRMINTERPOLATION_LINEAR 0x04L
#define D3DRMINTERPOLATION_SPLINE 0x08L
#define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
#define D3DRMINTERPOLATION_SLERPNORMALS 0x80L
typedef DWORD D3DRMLOADOPTIONS;
#define D3DRMLOAD_FROMFILE 0x00L
#define D3DRMLOAD_FROMRESOURCE 0x01L
#define D3DRMLOAD_FROMMEMORY 0x02L
#define D3DRMLOAD_FROMSTREAM 0x04L
#define D3DRMLOAD_FROMURL 0x08L
#define D3DRMLOAD_BYNAME 0x10L
#define D3DRMLOAD_BYPOSITION 0x20L
#define D3DRMLOAD_BYGUID 0x40L
#define D3DRMLOAD_FIRST 0x80L
#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
#define D3DRMLOAD_ASYNCHRONOUS 0x400L
typedef struct _D3DRMLOADRESOURCE {
HMODULE hModule;
LPCTSTR lpName;
LPCTSTR lpType;
} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
typedef struct _D3DRMLOADMEMORY {
LPVOID lpMemory;
DWORD dSize;
} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
#define D3DRMPMESHSTATUS_VALID 0x01L
#define D3DRMPMESHSTATUS_INTERRUPTED 0x02L
#define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04L
#define D3DRMPMESHSTATUS_COMPLETE 0x08L
#define D3DRMPMESHSTATUS_RENDERABLE 0x10L
#define D3DRMPMESHEVENT_BASEMESH 0x01L
#define D3DRMPMESHEVENT_COMPLETE 0x02L
typedef struct _D3DRMPMESHLOADSTATUS {
DWORD dwSize; // Size of this structure
DWORD dwPMeshSize; // Total Size (bytes)
DWORD dwBaseMeshSize; // Total Size of the Base Mesh
DWORD dwBytesLoaded; // Total bytes loaded
DWORD dwVerticesLoaded; // Number of vertices loaded
DWORD dwFacesLoaded; // Number of faces loaded
HRESULT dwLoadResult; // Result of the load operation
DWORD dwFlags;
} D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
typedef enum _D3DRMUSERVISUALREASON {
D3DRMUSERVISUAL_CANSEE,
D3DRMUSERVISUAL_RENDER
} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
typedef struct _D3DRMVERTEX
{ D3DVECTOR position;
D3DVECTOR normal;
D3DVALUE tu, tv;
D3DCOLOR color;
} D3DRMVERTEX, *LPD3DRMVERTEX;
typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
/*
* Create a color from three components in the range 0-1 inclusive.
*/
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
D3DVALUE green,
D3DVALUE blue);
/*
* Create a color from four components in the range 0-1 inclusive.
*/
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
D3DVALUE green,
D3DVALUE blue,
D3DVALUE alpha);
/*
* Get the red component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
/*
* Get the green component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
/*
* Get the blue component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
/*
* Get the alpha component of a color.
*/
extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
/*
* Add two vectors. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Subtract two vectors. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Reflect a ray about a given normal. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
LPD3DVECTOR ray,
LPD3DVECTOR norm);
/*
* Calculate the vector cross product. Returns its first argument.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Return the vector dot product.
*/
extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
LPD3DVECTOR s2);
/*
* Scale a vector so that its modulus is 1. Returns its argument or
* NULL if there was an error (e.g. a zero vector was passed).
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
#define D3DRMVectorNormalise D3DRMVectorNormalize
/*
* Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
*/
extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
/*
* Set the rotation part of a matrix to be a rotation of theta radians
* around the given axis.
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
/*
* Scale a vector uniformly in all three axes
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
/*
* Return a random unit vector
*/
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
/*
* Returns a unit quaternion that represents a rotation of theta radians
* around the given axis.
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
LPD3DVECTOR v,
D3DVALUE theta);
/*
* Calculate the product of two quaternions
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
LPD3DRMQUATERNION a,
LPD3DRMQUATERNION b);
/*
* Interpolate between two quaternions
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
LPD3DRMQUATERNION a,
LPD3DRMQUATERNION b,
D3DVALUE alpha);
/*
* Calculate the matrix for the rotation that a unit quaternion represents
*/
extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
/*
* Calculate the quaternion that corresponds to a rotation matrix
*/
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromMatrix(LPD3DRMQUATERNION, D3DRMMATRIX4D);
#if defined(__cplusplus)
};
#endif
#endif
File diff suppressed because it is too large. Load diff
-51
View File
@@ -1,51 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRMWIN_H__
#define __D3DRMWIN_H__
#ifdef _WIN32
#ifndef WIN32
#define WIN32
#endif
#endif
#include "directx/vd3drm.h"
#include "directx/vddraw.h"
#include "directx/vd3d.h"
/*
* GUIDS used by Direct3DRM Windows interface
*/
DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE);
#undef INTERFACE
#define INTERFACE IDirect3DRMWinDevice
DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject)
{
IUNKNOWN_METHODS(PURE);
IDIRECT3DRMOBJECT_METHODS(PURE);
/*
* IDirect3DRMWinDevice methods
*/
/* Repaint the window with the last frame which was rendered. */
STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE;
/* Respond to a WM_ACTIVATE message. */
STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE;
};
#endif
+20 -1
View File
@@ -7,6 +7,7 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef _D3DTYPES_H_
#define _D3DTYPES_H_
@@ -305,6 +306,14 @@ typedef struct _D3DTLVERTEX {
D3DVALUE tv;
D3DVALUE dvTV;
};
union {
D3DVALUE env_u; /* Texture coordinates */
D3DVALUE dvenv_U;
};
union {
D3DVALUE env_v;
D3DVALUE dvenv_V;
};
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
_D3DTLVERTEX() { }
_D3DTLVERTEX(const D3DVECTOR& v, float _rhw,
@@ -320,6 +329,7 @@ typedef struct _D3DTLVERTEX {
/*
* Untransformed/lit vertices
*/
//(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1)
typedef struct _D3DLVERTEX {
union {
D3DVALUE x; /* Homogeneous coordinates */
@@ -399,12 +409,21 @@ typedef struct _D3DVERTEX {
D3DVALUE tv;
D3DVALUE dvTV;
};
union {
D3DVALUE tu2; /* Texture coordinates */
D3DVALUE dvTU2;
};
union {
D3DVALUE tv2;
D3DVALUE dvTV2;
};
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
_D3DVERTEX() { }
_D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv)
_D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv, float _tu2=_tu, float _tv2=_tv)
{ x = v.x; y = v.y; z = v.z;
nx = n.x; ny = n.y; nz = n.z;
tu = _tu; tv = _tv;
tu2 = _tu2; tv2 = _tv2;
}
#endif
} D3DVERTEX, *LPD3DVERTEX;
-240
View File
@@ -1,240 +0,0 @@
/******************************************************************
* *
* D3DVec.inl *
* *
* Float-valued 3D vector class for Direct3D. *
* *
* Copyright (c) 1996-1997 Microsoft Corp. All rights reserved. *
* *
******************************************************************/
#include <math.h>
// =====================================
// Constructors
// =====================================
inline
_D3DVECTOR::_D3DVECTOR(D3DVALUE f)
{
x = y = z = f;
}
inline
_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z)
{
x = _x; y = _y; z = _z;
}
inline
_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3])
{
x = f[0]; y = f[1]; z = f[2];
}
// =====================================
// Access grants
// =====================================
inline const D3DVALUE&
_D3DVECTOR::operator[](int i) const
{
return (&x)[i];
}
inline D3DVALUE&
_D3DVECTOR::operator[](int i)
{
return (&x)[i];
}
// =====================================
// Assignment operators
// =====================================
inline _D3DVECTOR&
_D3DVECTOR::operator += (const _D3DVECTOR& v)
{
x += v.x; y += v.y; z += v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator -= (const _D3DVECTOR& v)
{
x -= v.x; y -= v.y; z -= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator *= (const _D3DVECTOR& v)
{
x *= v.x; y *= v.y; z *= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator /= (const _D3DVECTOR& v)
{
x /= v.x; y /= v.y; z /= v.z;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator *= (D3DVALUE s)
{
x *= s; y *= s; z *= s;
return *this;
}
inline _D3DVECTOR&
_D3DVECTOR::operator /= (D3DVALUE s)
{
x /= s; y /= s; z /= s;
return *this;
}
inline _D3DVECTOR
operator + (const _D3DVECTOR& v)
{
return v;
}
inline _D3DVECTOR
operator - (const _D3DVECTOR& v)
{
return _D3DVECTOR(-v.x, -v.y, -v.z);
}
inline _D3DVECTOR
operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z);
}
inline _D3DVECTOR
operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z);
}
inline _D3DVECTOR
operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);
}
inline _D3DVECTOR
operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z);
}
inline int
operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2];
}
inline int
operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2];
}
inline _D3DVECTOR
operator * (const _D3DVECTOR& v, D3DVALUE s)
{
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
}
inline _D3DVECTOR
operator * (D3DVALUE s, const _D3DVECTOR& v)
{
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
}
inline _D3DVECTOR
operator / (const _D3DVECTOR& v, D3DVALUE s)
{
return _D3DVECTOR(v.x/s, v.y/s, v.z/s);
}
inline int
operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z;
}
inline D3DVALUE
Magnitude (const _D3DVECTOR& v)
{
return (D3DVALUE) sqrt(SquareMagnitude(v));
}
inline D3DVALUE
SquareMagnitude (const _D3DVECTOR& v)
{
return v.x*v.x + v.y*v.y + v.z*v.z;
}
inline _D3DVECTOR
Normalize (const _D3DVECTOR& v)
{
return v / Magnitude(v);
}
inline D3DVALUE
Min (const _D3DVECTOR& v)
{
D3DVALUE ret = v.x;
if (v.y < ret) ret = v.y;
if (v.z < ret) ret = v.z;
return ret;
}
inline D3DVALUE
Max (const _D3DVECTOR& v)
{
D3DVALUE ret = v.x;
if (ret < v.y) ret = v.y;
if (ret < v.z) ret = v.z;
return ret;
}
inline _D3DVECTOR
Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0],
v1[1] < v2[1] ? v1[1] : v2[1],
v1[2] < v2[2] ? v1[2] : v2[2]);
}
inline _D3DVECTOR
Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0],
v1[1] > v2[1] ? v1[1] : v2[1],
v1[2] > v2[2] ? v1[2] : v2[2]);
}
inline D3DVALUE
DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;
}
inline _D3DVECTOR
CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
_D3DVECTOR result;
result[0] = v1[1] * v2[2] - v1[2] * v2[1];
result[1] = v1[2] * v2[0] - v1[0] * v2[2];
result[2] = v1[0] * v2[1] - v1[1] * v2[0];
return result;
}
+1
View File
@@ -7,6 +7,7 @@
*
***************************************************************************/
#include "PreProcDefines.h"
#ifndef __DDRAW_INCLUDED__
#define __DDRAW_INCLUDED__
Binary file not shown.
+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 )
Binary file not shown.
@@ -9,13 +9,46 @@
/*
* $Logfile: /Freespace2/code/ExceptionHandler/ExceptionHandler.cpp $
* $Revision: 2.0 $
* $Date: 2002-06-03 04:02:22 $
* $Author: penguin $
* $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
* and added a new error check called a safepoint, mostly for tracking the 'Y bug'
*
* Revision 2.3 2003/11/11 02:15:43 Goober5000
* ubercommit - basically spelling and language fixes with some additional
* warnings disabled
* --Goober5000
*
* Revision 2.2 2003/11/06 20:22:03 Kazan
* slight change to .dsp - leave the release target as fs2_open_r.exe already
* added myself to credit
* killed some of the stupid warnings (including doing some casting and commenting out unused vars in the graphics modules)
* Release builds should have warning level set no higher than 2 (default is 1)
* Why are we getting warning's about function selected for inline expansion... (killing them with warning disables)
* FS2_SPEECH was not defined (source file doesn't appear to capture preproc defines correctly either)
*
* Revision 2.1 2003/03/02 05:10:42 penguin
* Added #ifdef _MSC_VER around strange exception-handling code
* - penguin
*
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:05 mharris
* Initial checkin - converted filenames and includes to lower case
*
@@ -43,6 +76,10 @@ on how to hook it in.
#include <windows.h>
#pragma warning(disable:4711) // function selected for inlining
// --------------------
//
// Defines
@@ -139,7 +176,9 @@ static void PrintTime(char *output, FILETIME TimeToPrint)
static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle)
{
char ModName[MAX_PATH];
#ifdef _MSC_VER
__try {
#endif
if (GetModuleFileName(ModuleHandle, ModName, sizeof(ModName)) > 0) {
// If GetModuleFileName returns greater than zero then this must
// be a valid code module address. Therefore we can try to walk
@@ -174,11 +213,13 @@ static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle)
ModName, ModuleHandle, FileSize,
NTHeader->FileHeader.TimeDateStamp, TimeBuffer);
}
#ifdef _MSC_VER
}
// Handle any exceptions by continuing from this point.
__except(EXCEPTION_EXECUTE_HANDLER)
{
}
#endif
}
// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used
@@ -322,6 +363,7 @@ static char* GetFilePart(char *source)
//
// --------------------
extern char safe_string[512];
// Entry point into the main exception handling routine. This routine is put into an except()
// statment at the beginning of a thread and is called anytime that there is a program exception
@@ -436,15 +478,19 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
// exception handler will print '??'.
unsigned char *code = (unsigned char*)Context->Eip;
for (int codebyte = 0; codebyte < NumCodeBytes; codebyte++) {
#ifdef _MSC_VER
__try {
#endif
hprintf(LogFile, "%02x ", code[codebyte]);
#ifdef _MSC_VER
}
__except(EXCEPTION_EXECUTE_HANDLER) {
hprintf(LogFile, "?? ");
}
#endif
}
#ifdef _MSC_VER
// Time to print part or all of the stack to the error log. This allows
// us to figure out the call stack, parameters, local variables, etc.
hprintf(LogFile, "\r\n"
@@ -500,6 +546,9 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
__except(EXCEPTION_EXECUTE_HANDLER) {
hprintf(LogFile, "Exception encountered during stack dump.\r\n");
}
#endif
RecordModuleList(LogFile);
@@ -507,5 +556,7 @@ int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
// Return the magic value which tells Win32 that this handler didn't
// actually handle the exception - so that things will proceed as per
// normal.
if(safe_string[0])hprintf(LogFile, "\nlast safe point \n%s\n",safe_string);
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -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
+132 -74
View File
@@ -9,13 +9,91 @@
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
* had to bump a few limits, working on some dynamic solutions
* a few fixed to background POF rendering
* fixing asorted bugs
*
* Revision 2.10 2004/03/05 09:02:00 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.9 2004/02/14 00:18:30 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:
* Removal of many files from project.
* Removal of meanless Gr_bitmap_poly variable.
* Removal of glide, directdraw, software modules all links to them, and all code specific to those paths.
* Removal of redundant Fred paths that arent needed for Fred OGL.
* Have seriously tidied the graphics initialisation code and added generic non standard mode functionality.
* Fixed many D3D non standard mode bugs and brought OGL up to the same level.
* Removed texture section support for D3D8, voodoo 2 and 3 cards will no longer run under fs2_open in D3D, same goes for any card with a maximum texture size less than 1024.
*
* Revision 2.8 2003/11/16 04:09:19 Goober5000
* language
*
* Revision 2.7 2003/11/11 03:56:10 bobboau
* lots of bug fixing, much of it in nebula and bitmap drawing
*
* Revision 2.6 2003/10/23 18:03:23 randomtiger
* Bobs changes (take 2)
*
* Revision 2.5 2003/03/19 06:23:27 Goober5000
* added warp-effect sexp
* --Goober5000
*
* Revision 2.4 2003/03/18 01:44:30 Goober5000
* fixed some misspellings
* --Goober5000
*
* Revision 2.3 2002/12/07 01:37:41 bobboau
* inital decals code, if you are worried a bug is being caused by the decals code it's only references are in,
* collideshipweapon.cpp line 262, beam.cpp line 2771, and modelinterp.cpp line 2949.
* it needs a better renderer, but is in prety good shape for now,
* I also (think) I squashed a bug in the warpmodel code
*
* Revision 2.2 2002/11/14 04:18:16 bobboau
* added warp model and type 1 glow points
* and well as made the new glow file type,
* some general improvement to fighter beams,
*
* 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
*
@@ -118,7 +196,7 @@
* Made warp in glow page in
*
* 67 3/27/98 2:17p Lawrance
* Don't play warphole closing for non-captial sized warp effects
* Don't play warphole closing for non-capital sized warp effects
*
* 66 3/26/98 5:44p Lawrance
* take out debug comments for warphole sounds playing
@@ -324,57 +402,25 @@
#include <stdlib.h>
#include "math/vecmat.h"
#include "fireball/fireballs.h"
#include "graphics/tmapper.h"
#include "graphics/2d.h"
#include "render/3d.h"
#include "bmpman/bmpman.h"
#include "model/model.h"
#include "io/key.h"
#include "physics/physics.h"
#include "math/floating.h"
#include "model/model.h"
#include "lighting/lighting.h"
#include "object/object.h"
#include "ship/ship.h"
#include "globalincs/systemvars.h"
#include "fireball/fireballs.h"
#include "globalincs/linklist.h"
#include "gamesnd/gamesnd.h"
#include "localization/localize.h"
#include "cmdline/cmdline.h"
#include "parse/parselo.h"
#define WARPHOLE_GROW_TIME (1.5f) // time for warphole to reach max size (also time to shrink to nothing once it begins to shrink)
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)
#define MAX_FIREBALL_LOD 4
typedef struct fireball_lod {
char filename[MAX_FILENAME_LEN];
int bitmap_id;
int num_frames;
int fps;
} fireball_lod;
typedef struct fireball_info {
int lod_count;
fireball_lod lod[4];
} fireball_info;
// flag values for fireball struct flags member
#define FBF_WARP_CLOSE_SOUND_PLAYED (1<<0)
#define FBF_WARP_CAPTIAL_SIZE (1<<1)
#define FBF_WARP_CRUISER_SIZE (1<<2)
typedef struct fireball {
int objnum; // If -1 this object is unused
int fireball_info_index; // Index into Fireball_info array
int current_bitmap;
int orient; // For fireballs, which orientation. For warps, 0 is warpin, 1 is warpout
int flags; // see #define FBF_*
char lod; // current LOD
float time_elapsed; // in seconds
float total_time; // total lifetime of animation in seconds
} fireball;
#define MAX_FIREBALLS 200
fireball Fireballs[MAX_FIREBALLS];
@@ -407,12 +453,16 @@ void fireball_play_warphole_open_sound(int ship_class, fireball *fb)
if((ship_class >= 0) && (ship_class < Num_ship_types)){
if ( Ship_info[ship_class].flags & SIF_HUGE_SHIP ) {
sound_index = SND_CAPITAL_WARP_IN;
fb->flags |= FBF_WARP_CAPTIAL_SIZE;
fb->flags |= FBF_WARP_CAPITAL_SIZE;
} else if ( Ship_info[ship_class].flags & SIF_BIG_SHIP ) {
range_multiplier = 6.0f;
fb->flags |= FBF_WARP_CRUISER_SIZE;
}
}
else
{
sound_index = fb->warp_open_sound_index;
}
snd_play_3d(&Snds[sound_index], &fireball_objp->pos, &Eye_position, fireball_objp->radius, NULL, 0, 1.0f, SND_PRIORITY_DOUBLE_INSTANCE, NULL, range_multiplier); // play warp sound effect
}
@@ -428,10 +478,12 @@ void fireball_play_warphole_close_sound(fireball *fb)
sound_index = SND_WARP_OUT;
if ( fb->flags & FBF_WARP_CAPTIAL_SIZE ) {
if ( fb->flags & FBF_WARP_CAPITAL_SIZE ) {
sound_index = SND_CAPITAL_WARP_OUT;
} else if ( fb->flags & FBF_WARP_VIA_SEXP ) {
sound_index = fb->warp_close_sound_index;
} else {
// AL 27-3-98: Decided that warphole closing is only required for captial ship sized warp effects.
// AL 27-3-98: Decided that warphole closing is only required for capital ship sized warp effects.
return;
}
@@ -508,7 +560,9 @@ void fireball_load_data()
if ( Warp_glow_bitmap == -1 ) {
Warp_glow_bitmap = bm_load( NOX("warpglow01") );
}
}
// polymodel Warp_pm;
}
@@ -537,17 +591,23 @@ 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);
mprintf((" %d\n", Warp_model));
}
MONITOR( NumFireballsRend );
//extern int tcache_hit(int);
//extern int Glide_expl_textures_in_frame;
//extern float Glide_avg_exp_text_per_sec;
void fireball_render(object * obj)
{
// if(!Cmdline_nohtl)gr_set_lighting(false,false);
int num;
vertex p;
fireball *fb;
@@ -571,13 +631,17 @@ void fireball_render(object * obj)
gr_fog_set(GR_FOGMODE_NONE, 0, 0, 0);
}
g3_rotate_vertex(&p, &obj->pos );
if(Cmdline_nohtl) {
g3_rotate_vertex(&p, &obj->pos );
}else{
g3_transfer_vertex(&p, &obj->pos);
}
switch( fb->fireball_info_index ) {
case FIREBALL_EXPLOSION_MEDIUM:
gr_set_bitmap(Fireballs[num].current_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.3f );
g3_draw_bitmap(&p, fb->orient, obj->radius, TMAP_FLAG_TEXTURED );
g3_draw_bitmap(&p, fb->orient, obj->radius, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT );
break;
case FIREBALL_EXPLOSION_LARGE1:
@@ -586,27 +650,12 @@ void fireball_render(object * obj)
/*
if (!tcache_hit(Fireballs[num].current_bitmap)) {
// if we're over 200k exp vram upload this frame, change to lower lod
if (Glide_expl_textures_in_frame > 1024 * 200) {
// change fireball instance to lower LOD or don't draw
// get current LOD and number of LODs
int cur_lod = Fireballs[num].lod;
int num_lods = Fireball_info[Fireballs[num].fireball_info_index].lod_count;
if (num_lods > cur_lod+1) {
// bump lod
int frame = Fireballs[num].current_bitmap - Fireball_info[Fireballs[num].fireball_info_index].lod[cur_lod].bitmap_id;
Fireballs[num].lod++;
Fireballs[num].current_bitmap = Fireball_info[Fireballs[num].fireball_info_index].lod[cur_lod+1].bitmap_id + frame;
mprintf(("bumping down lod for fireball %s, frame %d\n", Fireball_info[Fireballs[num].fireball_info_index].lod[cur_lod].filename, frame));
}
}
}*/
case FIREBALL_ASTEROID:
// Make the big explosions rotate with the viewer.
gr_set_bitmap(Fireballs[num].current_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.3f );
g3_draw_rotated_bitmap(&p, (i2fl(fb->orient)*PI)/180.0f, obj->radius, TMAP_FLAG_TEXTURED );
g3_draw_rotated_bitmap(&p, (i2fl(fb->orient)*PI)/180.0f, obj->radius, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT);
break;
case FIREBALL_WARP_EFFECT:
@@ -630,9 +679,10 @@ void fireball_render(object * obj)
//rad = (fb->total_time - t )*obj->radius/WARPHOLE_GROW_TIME;
}
//rad = obj->radius;
// obj->alt_rad = rad;
warpin_render(&obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius );
warpin_render(obj, &obj->orient, &obj->pos, Fireballs[num].current_bitmap, rad, percent_life, obj->radius, (Fireballs[num].flags & FBF_WARP_3D) );
}
break;
@@ -977,7 +1027,7 @@ int fireball_get_lod(vector *pos, fireball_info *fd, float size)
}
// Create a fireball, return object index.
int fireball_create( vector * pos, int fireball_type, int parent_obj, float size, int reverse, vector *velocity, float warp_lifetime, int ship_class, matrix *orient_override, int low_res)
int fireball_create( vector * pos, int fireball_type, int parent_obj, float size, int reverse, vector *velocity, float warp_lifetime, int ship_class, matrix *orient_override, int low_res, int extra_flags, int warp_open_sound, int warp_close_sound)
{
int n, objnum, fb_lod;
object *obj;
@@ -1046,7 +1096,11 @@ int fireball_create( vector * pos, int fireball_type, int parent_obj, float size
fl = &fd->lod[fb_lod];
fb->lod = (char)fb_lod;
fb->flags = 0;
fb->flags = extra_flags;
fb->warp_open_sound_index = warp_open_sound;
fb->warp_close_sound_index = warp_close_sound;
matrix orient;
if(orient_override != NULL){
orient = *orient_override;
@@ -1167,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 );
}
}
+90 -8
View File
@@ -5,17 +5,58 @@
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
*/
/*
* $Logfile: /Freespace2/code/Fireball/FireBalls.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
* had to bump a few limits, working on some dynamic solutions
* a few fixed to background POF rendering
* fixing asorted bugs
*
* Revision 2.5 2004/03/05 09:02:00 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.4 2003/03/19 06:23:27 Goober5000
* added warp-effect sexp
* --Goober5000
*
* Revision 2.3 2003/03/02 05:12:39 penguin
* Moved "extern int wm" declaration inside the header #ifdef block
* - penguin
*
* Revision 2.2 2002/11/14 04:18:16 bobboau
* added warp model and type 1 glow points
* and well as made the new glow file type,
* some general improvement to fighter beams,
*
* 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
*
@@ -157,11 +198,13 @@
* $NoKeywords: $
*/
#include "PreProcDefines.h"
#ifndef _FIREBALLS_H
#define _FIREBALLS_H
#include "object/object.h"
#include "cfile/cfile.h"
#include "globalincs/pstypes.h"
struct object;
// these values correspond to the fireball.tbl entries
#define FIREBALL_EXPLOSION_MEDIUM 0 // Used for the 4 little explosions before a ship explodes
@@ -175,6 +218,40 @@
#define FIREBALL_NUM_LARGE_EXPLOSIONS 2
// all this moved here by Goober5000 because it makes more sense in the H file
typedef struct fireball_lod {
char filename[MAX_FILENAME_LEN];
int bitmap_id;
int num_frames;
int fps;
} fireball_lod;
typedef struct fireball_info {
int lod_count;
fireball_lod lod[4];
} fireball_info;
// flag values for fireball struct flags member
#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_3D (1<<3) // Goober5000
#define FBF_WARP_VIA_SEXP (1<<4) // Goober5000
typedef struct fireball {
int objnum; // If -1 this object is unused
int fireball_info_index; // Index into Fireball_info array
int current_bitmap;
int orient; // For fireballs, which orientation. For warps, 0 is warpin, 1 is warpout
int flags; // see #define FBF_*
char lod; // current LOD
float time_elapsed; // in seconds
float total_time; // total lifetime of animation in seconds
int warp_open_sound_index; // for warp-effect - Goober5000
int warp_close_sound_index; // for warp-effect - Goober5000
} fireball;
// end move
void fireball_init();
void fireball_render(object * obj);
void fireball_delete( object * obj );
@@ -184,7 +261,7 @@ void fireball_process_post(object * obj, float frame_time);
// reversed is for warp_in/out effects
// Velocity: If not NULL, the fireball will move at a constant velocity.
// warp_lifetime: If warp_lifetime > 0.0f then makes the explosion loop so it lasts this long. Only works for warp effect
int fireball_create(vector *pos, int fireball_type, int parent_obj, float size, int reversed=0, vector *velocity=NULL, float warp_lifetime=0.0f, int ship_class=-1, matrix *orient=NULL, int low_res=0);
int fireball_create(vector *pos, int fireball_type, int parent_obj, float size, int reversed=0, vector *velocity=NULL, float warp_lifetime=0.0f, int ship_class=-1, matrix *orient=NULL, int low_res=0, int extra_flags=0, int warp_open_sound=0, int warp_close_sound=0);
void fireball_render_plane(int plane);
void fireball_close();
void fireball_level_close();
@@ -203,7 +280,12 @@ float fireball_lifeleft( object *obj );
float fireball_lifeleft_percent( object *obj );
// internal function to draw warp grid.
extern void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius );
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 */
+222 -59
View File
@@ -7,15 +7,105 @@
*
*/
/*
/*
* $Logfile: /Freespace2/code/Fireball/WarpInEffect.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.13 2004/03/17 04:07:29 bobboau
* new fighter beam code
* fixed old after burner trails
* had to bump a few limits, working on some dynamic solutions
* a few fixed to background POF rendering
* fixing asorted bugs
*
* Revision 2.12 2004/03/05 09:02:00 Goober5000
* Uber pass at reducing #includes
* --Goober5000
*
* Revision 2.11 2003/11/16 04:09:19 Goober5000
* language
*
* Revision 2.10 2003/11/11 03:56:10 bobboau
* lots of bug fixing, much of it in nebula and bitmap drawing
*
* Revision 2.9 2003/09/26 14:37:13 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
* the biggest problem it still has is a bad lightmanegment system, and the zbuffer
* doesn't work well with things still getting rendered useing the sofware pipeline, like thrusters,
* and weapons, I think these should be modifyed to be sent through hardware,
* it would be slightly faster and it would likely fix the problem
*
* also the thruster glow/particle stuff I did is now in.
*
* Revision 2.8 2003/08/31 06:00:41 bobboau
* an asortment of bugfixes, mostly with the specular code,
* HUD flickering should be completly gone now
*
* Revision 2.7 2003/03/19 23:06:40 Goober5000
* bit o' housecleaning
* --Goober5000
*
* Revision 2.6 2003/03/19 22:49:32 Goober5000
* added some mission flags
* --Goober5000
*
* Revision 2.5 2003/03/19 06:23:27 Goober5000
* added warp-effect sexp
* --Goober5000
*
* Revision 2.4 2003/03/18 01:44:30 Goober5000
* fixed some misspellings
* --Goober5000
*
* Revision 2.3 2003/01/05 23:41:50 bobboau
* disabled decals (for now), removed the warp ray thingys,
* made some better error mesages while parseing weapons and ships tbls,
* and... oh ya, added glow mapping
*
* Revision 2.2 2002/11/14 04:18:16 bobboau
* added warp model and type 1 glow points
* and well as made the new glow file type,
* some general improvement to fighter beams,
*
* 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
*
@@ -119,22 +209,16 @@
#include "math/vecmat.h"
#include "graphics/tmapper.h"
#include "graphics/2d.h"
#include "render/3d.h"
#include "bmpman/bmpman.h"
#include "model/model.h"
#include "io/key.h"
#include "physics/physics.h"
#include "math/floating.h"
#include "model/model.h"
#include "lighting/lighting.h"
#include "object/object.h"
#include "ship/ship.h"
#include "globalincs/systemvars.h"
#include "anim/animplay.h"
#include "fireball/fireballs.h"
#include "globalincs/linklist.h"
#include "io/timer.h"
#include "mission/missionparse.h"
#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")
{
@@ -160,11 +244,15 @@ 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 );
}
void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius )
#define wSTUFF_VERTICES() do { verts[0]->u = 0.5f; verts[0]->v = 0.0f; verts[1]->u = 1.0f; verts[1]->v = 0.0f; verts[2]->u = 1.0f; verts[2]->v = 1.0f; verts[3]->u = 0.5f; verts[3]->v = 1.0f; } while(0);
#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 warp_3d)
{
int i;
@@ -172,7 +260,6 @@ void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float ra
// gr_zbuffering = 0;
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
float Grid_depth = radius/2.5f;
@@ -180,45 +267,21 @@ void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float ra
vm_vec_scale_add( &center, pos, &orient->vec.fvec, -(max_radius/2.5f)/3.0f );
// Warp_Map = texture_bitmap_num;//sets the warp map, and thus sets the interp flag for this being a warpin effect
vector vecs[5];
vertex verts[5];
vm_vec_scale_add( &vecs[0], &center, &orient->vec.uvec, radius );
vm_vec_scale_add2( &vecs[0], &orient->vec.rvec, -radius );
vm_vec_scale_add2( &vecs[0], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[1], &center, &orient->vec.uvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->vec.rvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[2], &center, &orient->vec.uvec, -radius );
vm_vec_scale_add2( &vecs[2], &orient->vec.rvec, radius );
vm_vec_scale_add2( &vecs[2], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[3], &center, &orient->vec.uvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->vec.rvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->vec.fvec, Grid_depth );
// vm_vec_scale_add( &vecs[4], &center, &orient->vec.fvec, -Grid_depth );
vecs[4] = center;
verts[0].u = 0.01f; verts[0].v = 0.01f;
verts[1].u = 0.99f; verts[1].v = 0.01f;
verts[2].u = 0.99f; verts[2].v = 0.99f;
verts[3].u = 0.01f; verts[3].v = 0.99f;
vecs[4] = center; //this is for the warp glow-Bobboau
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[4], &vecs[4] );
} else {
g3_transfer_vertex( &verts[4], &vecs[4] );
}
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] );
if ( Warp_glow_bitmap != -1 ) {
gr_set_bitmap( Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
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;
@@ -257,17 +320,117 @@ void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float ra
r *= (0.40f + Noise[noise_frame]*0.30f);
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED );
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;
set_warp_globals(model_Interp_scale_x, model_Interp_scale_y, model_Interp_scale_z, texture_bitmap_num, (radius/max_radius) );
float dist = vm_vec_dist_quick( pos, &Eye_position );
model_set_detail_level((int)(dist / (radius * 10.0f)));
gr_set_cull(0);
model_render( Warp_model, orient, pos, MR_NO_LIGHTING | MR_NORMAL);
gr_set_cull(1);
// Warp_Map = -1;//un sets the warp map
model_Interp_scale_x = 1.0f;
model_Interp_scale_y = 1.0f;
model_Interp_scale_z = 1.0f;
set_warp_globals(model_Interp_scale_x, model_Interp_scale_y, model_Interp_scale_z, -1, -1.0f);
/*
//this is that half done effect that was pissing people off-Bobboau
gr_set_cull(0);
matrix m;
vector ray_dir;
vm_vector_2_matrix(&m, &orient->vec.fvec, NULL, NULL);//this is the beam things that will come outof the point-Bobboau
float angle = ANG_TO_RAD(135.0f);
if(life_percent < 0.2f){
angle = ANG_TO_RAD(135.0f * (life_percent * 5.0f));
}
for(int idx=0; idx<1; idx++){
vm_vec_random_cone(&ray_dir, &orient->vec.fvec, angle, &m);
mprintf(( "ray direction %f %f %f, orentation %f %f %f, angle %f\n",ray_dir.xyz.x, ray_dir.xyz.y, ray_dir.xyz.z, orient->vec.fvec.xyz.x, orient->vec.fvec.xyz.y, orient->vec.fvec.xyz.z, angle));
vector p_temp = *pos;
vm_vec_scale_add(&p_temp, pos, &ray_dir, (max_radius * 10 * frand_range(0.75f, 0.9f)));
mprintf(( "end %f %f %f",p_temp.xyz.x, p_temp.xyz.y, p_temp.xyz.z));
vertex h1[4]; // halves of a beam section
vertex *verts[4] = { &h1[0], &h1[1], &h1[2], &h1[3] };
vector top1, bottom1, top2, bottom2;
beam_calc_facing_pts(&top1, &bottom1, &ray_dir, pos, 1.0f, 1.0f);
beam_calc_facing_pts(&top2, &bottom2, &ray_dir, &p_temp, 1.0f, 1.0f);
mprintf(( "top1 %f %f %f, botom1 %f %f %f, \n",top1.xyz.x, top1.xyz.y, top1.xyz.z, bottom1.xyz.x, bottom1.xyz.y, bottom1.xyz.z));
mprintf(( "top2 %f %f %f, botom2 %f %f %f, \n",top2.xyz.x, top2.xyz.y, top2.xyz.z, bottom2.xyz.x, bottom2.xyz.y, bottom2.xyz.z));
wR_VERTICES(); // rotate and project the vertices
wP_VERTICES();
wSTUFF_VERTICES(); // stuff the beam with creamy goodness (texture coords)
gr_set_bitmap(Warp_glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 0.9999f);
g3_draw_poly( 4, verts, TMAP_FLAG_TILED | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT); // added TMAP_FLAG_TILED flag for beam texture tileing -Bobboau
}
gr_set_cull(1);
*/
}else{
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
vm_vec_scale_add( &vecs[0], &center, &orient->vec.uvec, radius );
vm_vec_scale_add2( &vecs[0], &orient->vec.rvec, -radius );
vm_vec_scale_add2( &vecs[0], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[1], &center, &orient->vec.uvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->vec.rvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[2], &center, &orient->vec.uvec, -radius );
vm_vec_scale_add2( &vecs[2], &orient->vec.rvec, radius );
vm_vec_scale_add2( &vecs[2], &orient->vec.fvec, Grid_depth );
vm_vec_scale_add( &vecs[3], &center, &orient->vec.uvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->vec.rvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->vec.fvec, Grid_depth );
// vm_vec_scale_add( &vecs[4], ¢er, &orient->vec.fvec, -Grid_depth );
vecs[4] = center;
verts[0].u = 0.01f; verts[0].v = 0.01f;
verts[1].u = 0.99f; verts[1].v = 0.01f;
verts[2].u = 0.99f; verts[2].v = 0.99f;
verts[3].u = 0.01f; verts[3].v = 0.99f;
verts[4].u = 0.5f; verts[4].v = 0.5f;
for (i=0; i<5; 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);
}
gr_zbuffer_set( saved_gr_zbuffering );
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

File diff suppressed because it is too large. Load diff
+20 -3
View File
@@ -9,13 +9,22 @@
/*
* $Logfile: /Freespace2/code/FREESPACE2/FreeSpace.h $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
@@ -146,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
@@ -341,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);
@@ -353,5 +366,9 @@ int game_hacked_data();
// show the oem upsell screens (end of campaign, or close of game
void oem_upsell_show_screens();
// function to handle pausing the game when the game is minimized
// called from osapi.cpp
void alt_tab_pause();
#endif // endif of #ifndef STAMPER_PROGRAM
#endif
+18 -1
View File
@@ -1,6 +1,6 @@
//Microsoft Developer Studio generated resource script.
//
#include "freespaceresource.h"
#include "FreespaceResource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@@ -222,6 +222,15 @@ BEGIN
CTEXT "",IDC_FIELD3,27,49,138,8
END
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
@@ -294,6 +303,14 @@ BEGIN
TOPMARGIN, 5
BOTTOMMARGIN, 88
END
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
+9 -2
View File
@@ -17,6 +17,8 @@
#define IDB_GOAL_FAIL 122
#define IDI_APP_ICON 124
#define IDD_GEN 127
#define IDD_RT_VSELECT 128
#define IDD_DIALOG1 129
#define IDC_LIST_DEBUG 1000
#define IDC_DEBUG_TEXT1 1001
#define IDC_DEBUG_TEXT2 1002
@@ -73,6 +75,11 @@
#define IDC_FIELD2 1065
#define IDC_FIELD3 1066
#define IDC_PXO_REFRESH 1067
#define IDC_COMBO_VCARD 1069
#define IDC_COMBO_VMODE 1070
#define IDC_COMBO_AATYPE 1071
#define ID_CANCEL 1072
#define ID_OK 1073
#define IDC_CON_COUNT 2000
#define IDC_FRAMECAP_STATIC 2001
#define IDC_GODSTUFF_FPS 2002
@@ -85,9 +92,9 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 128
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1068
#define _APS_NEXT_CONTROL_VALUE 1074
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+23 -5
View File
@@ -9,13 +9,30 @@
/*
* $Logfile: /Freespace2/code/Freespace2/LevelPaging.cpp $
* $Revision: 2.1 $
* $Date: 2002-08-01 01:41:04 $
* $Author: penguin $
* $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
*
* Revision 2.0 2002/06/03 04:02:22 penguin
* Warpcore CVS sync
*
@@ -57,16 +74,16 @@
*/
#include "freespace2/freespace.h"
#include "bmpman/bmpman.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();
@@ -89,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();
Loaded 100 of 615 files, more files were not shown because too many files have changed in this diff. Show more