Compare commits

...
Author SHA1 Message Date
taylor 43f715b401 move stable branch to the primary under trunk 2008-03-16 16:25:19 +00:00
WMCoolmon 55217fbc78 Fix bug with drawImage and drawMonochromeImage as reported by Wanderer 2008-03-16 06:41:34 +00:00
WMCoolmon 506e2389ef Update to optimize code and to enable proper use of standard bracket style. :P 2008-03-16 04:25:58 +00:00
WMCoolmon 2d1f34047f Allow warpout with Homeworld or other 0-warpout-speed effects. 2008-03-16 04:20:28 +00:00
WMCoolmon efe2bcd48a New warp code. See thread on the internal for details. 2008-03-15 09:24:57 +00:00
WMCoolmon 4e1bef60ed g3_draw_polygon, general purpose function that was really needed. Comes in matrix or normal direction variants. 2008-03-15 09:19:13 +00:00
WMCoolmon d57a2487ca Commit of bm_load_either, a function that automagically loads an animation or image, whichever exists, in that order. FPS etc. are filled in properly by the function. 2008-03-15 09:18:09 +00:00
WMCoolmon c37dbc318d Use change_ship_class rather than straight variable set (this is the proper way) 2008-03-15 09:16:34 +00:00
WMCoolmon db462d66b1 Initial commit of new files for main codebase. 2008-03-15 09:01:46 +00:00
WMCoolmon aff9382167 Commit of new files for the SDK 2008-03-15 09:01:23 +00:00
WMCoolmon a26e293923 *Drumroll* The official scripting system commit to the stable branch! 2008-03-15 08:56:43 +00:00
WMCoolmon c9682ff092 Lua SDK update commit (Not newest version, just the one I've been testing with) 2008-03-15 08:54:40 +00:00
WMCoolmon 23ecdbe685 Updated MSVC2003 Project files (TrackIR stuff) 2008-03-15 08:53:36 +00:00
Goober5000 97a1d86311 fix flag setting in modular tables 2008-03-14 23:00:04 +00:00
karajorma f383e0b1d1 Ensure that the chatbox is closed when going to debriefing.
Some general clean up.
2008-03-14 20:27:41 +00:00
karajorma 03164ce8c1 Quiet's traitor message changes. Should get rid of queued messages from send-message-list when a player turns traitor. 2008-03-14 20:21:43 +00:00
Backslash f15007e18c View slew, Target padlock and TrackIR patch by Swifty. Very nice!
Don't forget to add code/io/trackir.* to your projects!
2008-03-14 08:55:47 +00:00
karajorma 49027e4b14 Minor change for if we ever allow more than two TvT wings 2008-03-12 19:28:26 +00:00
Goober5000 0459435713 add ship-copy-damage, which clones damage stats (hitpoints and subsystem damage) from an existing ship onto another existing ship or a ship on the arrival list 2008-03-11 06:11:26 +00:00
Goober5000 324a096a46 Gah! Squash a nasty bug that was just waiting to happen. This only made sense before the docking conversion, when many objects were created as they were parsed. It was intended to free only the subsystem slots that were used by the most recently parsed object. Now that all objects are parsed before any are created, this line must be removed in order to prevent "memory leaks". 2008-03-11 05:38:43 +00:00
karajorma cbd712bea4 Fix Mantis 1612 2008-03-08 18:45:43 +00:00
karajorma 3353515c4a Fix Mantis 1621 2008-03-08 15:42:55 +00:00
karajorma c8f6ff3a49 Use iff_defs in dogfight mode rather than a hack which doesn't quite work anyway. 2008-03-08 15:40:13 +00:00
karajorma 850a0e976b Don't output the password in the multi.log 2008-03-08 15:32:10 +00:00
karajorma 4b58938b27 Fix Mantis 1621 2008-03-08 15:29:46 +00:00
karajorma b887bcf967 Fix Mantis 1618 2008-03-01 20:31:59 +00:00
karajorma 43eb524bf5 EaterOfPies fix to allow Windows speech to read out multiplayer in-game chat. 2008-03-01 20:27:31 +00:00
karajorma 8add719772 Fix ships remaining targeted after they are made invisible. 2008-03-01 20:25:02 +00:00
karajorma 5fc8a6a2fb Only blow up ships that have the traitor IFF at the start of a dogfight mission. 2008-03-01 20:19:33 +00:00
karajorma 59bb3acfc3 Fix a targeting bug when ships are disabled. 2008-03-01 20:17:22 +00:00
karajorma 240cffb41d Fix Mantis 1608 2008-02-25 11:17:41 +00:00
karajorma 7ac27089b9 Fix Mantis 1611 2008-02-24 20:39:55 +00:00
taylor ab6d5fa704 re-enable support for multi.cfg options
fix bug where a ping/pong issue would create a bad state loop due to static vars not getting reset
clean up ADD/GET_STRING to work a bit better/safer
2008-02-23 20:16:18 +00:00
taylor b000c7758f fix timeout that messed up Linux build chat connects
disable banners for now since it messes up Windows builds
various bits of cleanup and old debug code removal
2008-02-23 20:11:37 +00:00
taylor d22aed3a18 fix malloc/free/strdup to use vm_* versions 2008-02-23 20:09:50 +00:00
taylor 40b63230f0 enable PXO lobby by default 2008-02-23 19:59:33 +00:00
taylor 066bdab8ab shouldn't be able to target ourselves with target-last-message-sender (Mantis #1534) 2008-02-22 06:21:59 +00:00
taylor 484f827696 make sure that we always respect path restrictions on graphics file loads (prevents stupid load order bug) 2008-02-22 02:50:04 +00:00
taylor 20a32f238a deal with AI goals better with autopilot, particularly so that we don't wipe out AI goals at end of AP run (Mantis #1521) 2008-02-22 02:42:32 +00:00
taylor db6d996f09 this should allow a more graceful handling of 0-byte VP files so that they don't cause hangs/crashes 2008-02-22 02:40:30 +00:00
taylor 663a002314 add Murleen's prospective fix and revert r4421 (should cover Mantis #83, #1248, and everything loosely based on them) 2008-02-22 02:35:22 +00:00
taylor 22080b9f51 fix fighter beam weapon energy draw to work correctly (Mantis #1170)
setup fighter beams to work a bit better for players, with a good timestamp and a fail sound
2008-02-22 02:18:20 +00:00
taylor 046d5dd06a remove the error check for movies larger than 640x480 as the code was fixed the handle that a while back 2008-02-22 02:05:07 +00:00
taylor b97c49ec39 be sure to clean up if a mission load fails (Mantis #1576) 2008-02-22 02:03:16 +00:00
Goober5000 6cd100c5b9 fix Mantis #1592 and remove obsolete no-bank flag 2008-02-20 07:47:33 +00:00
Kazan 9c6cf0d42b better way of doing the SLDC endianity swapping according to taylor 2008-02-12 00:49:22 +00:00
Kazan 3b3badb3fb Endian-gender safety for SLDC, 1st part of $no_collide (need to make it not obscure objects behind such chunks) 2008-02-12 00:41:21 +00:00
Kazan ba442d4f52 Shield Collision Tree Support (POF Chunk SLDC) 2008-02-11 22:33:43 +00:00
WMCoolmon cd0b5eb2eb Added bm_is_valid() 2008-02-11 05:13:50 +00:00
Goober5000 65635433a8 revert the directory move 2008-02-09 21:33:46 +00:00
Goober5000 7525e1cd3a remove extraneous fs2_open folder from all branches and tags 2008-02-09 19:21:05 +00:00
karajorma 0dc2d8b137 Add some descriptions for a few multiplayer options. 2008-02-09 17:58:29 +00:00
karajorma d90e81f76c Fix a scoping issue with wingman names. 2008-02-09 17:51:11 +00:00
WMCoolmon 60bf328e4a Added -res command line; fix un/signed warning; fix bool warning. 2008-02-09 07:35:58 +00:00
Backslash 15cc4ee2af Ok, committing this patch again now that the EOL thing is cleared up. 2008-02-09 07:00:49 +00:00
Kazan 4f5c3ff034 commit my latest version after the update conflict 2008-02-09 03:18:54 +00:00
taylor b2f5c82b39 set eol-style to LF for all code
set eol-style to CRLF for MSVC6 project files (since Windows needs it this way to load them)
2008-02-09 03:07:56 +00:00
Kazan 030c694bbc back out Backslash's commit of Keldor's patch - busted line endings again 2008-02-08 21:41:11 +00:00
Kazan f3dea71c52 back out keldor's dynamic messages again, Goober said it was bad in ways i didn't catch 2008-02-08 21:38:33 +00:00
Kazan a7e1c11a19 Autopilot fixes: wing formation placement, capship formation creation 2008-02-08 17:44:35 +00:00
WMCoolmon 0001b8f8b4 Updated the MSVC 2003 project files to use a more sensible intermediate file structure than the MS default 2008-02-08 10:52:11 +00:00
Backslash 707447d4e6 Mantis #0001488. The cases are depreciated, wouldn't compile using newest SDK. 2008-02-08 07:30:18 +00:00
Kazan b25cf7bf6e recommiting Keldor's Dynamic Message Limit patch - this time with 100% less line ending busting 2008-02-08 04:37:17 +00:00
Kazan 9da9c3d12b forgot this fix again :D 2008-02-08 04:35:18 +00:00
Kazan 22b630020c recommiting keldor's javelin_hs patch without busting line endings 2008-02-08 04:34:18 +00:00
Kazan 46758c8e5c recommiting keldor's cutscene bars fix without busting line endings 2008-02-08 04:33:07 +00:00
Kazan 12a4c37ebf Recommit the autoaiming patch.. looks clean now 2008-02-08 03:04:41 +00:00
Kazan f70ddc7a8c oops 2008-02-08 03:04:12 +00:00
Kazan e734fb3f1f restore changeset 4411.. didn't actually need to revert it and i need those changes 2008-02-08 02:34:50 +00:00
Kazan ba58eedaab revert all my commits from today [revert codebase back to r4410] 2008-02-08 02:29:47 +00:00
Kazan 4f14925bd2 Keldor's Dynamic Message Limit fix - Approved by Kazan 2008-02-07 19:14:07 +00:00
Kazan ad06d48462 Fix small error in a function from Keldor's Javelin HS diff 2008-02-07 17:01:42 +00:00
Kazan 9ccc59685b Keldor's Javelin HS (new homing missile type) patch - approved by Kazan 2008-02-07 16:55:00 +00:00
Kazan 9784ad93c9 Keldor's Cutscene Bars temporary fix (until 3.7) - Approved by Kazan and Taylor 2008-02-07 16:46:33 +00:00
Kazan e405ef832c Keldor's Autoaiming patch - approved by Kazan 2008-02-07 16:45:16 +00:00
Kazan 9c6f152792 small autopilot fix 2008-02-07 16:44:28 +00:00
taylor b4d3c3d15a remove old ignore files from CVS conversion 2008-02-06 13:35:19 +00:00
kazan 0f914f73a3 flip these around the right way finally.. almost forgot 2008-02-03 21:16:25 +00:00
kazan 0bace98953 Fix autopilot sliding around finally i think :D Change how external camera is automatically determined by AP as well 2008-02-03 20:04:46 +00:00
Backslash 8890a1c704 Bump MAX_MISSION_EVENTS and MAX_WINGS limits.
Ideally someone can make this dynamic later... maybe me when I have time to learn how.
2008-02-01 08:02:50 +00:00
Goober5000 5d3458a796 allow FS1 hud to be displayed in FS2
(many thanks to the icculus project for blazing the way)
2008-01-24 03:53:36 +00:00
karajorma 1702405598 Fix for Mantis 1150 2008-01-20 17:18:06 +00:00
Goober5000 ecdf735282 implement the targeting cutoff properly (Mantis #1468) 2008-01-19 01:23:41 +00:00
Goober5000 eb79ba53d1 we all got led down the garden path there! revert all radar range modifications 2008-01-19 00:27:43 +00:00
karajorma eb8504e43b Fix Mantis 1516 2008-01-18 23:00:16 +00:00
Goober5000 1e282b84ee back out the MOI fix 2008-01-18 17:59:53 +00:00
Goober5000 188c449ca6 warn users when they run a campaign under the wrong mod 2008-01-17 07:44:43 +00:00
Backslash e8be84cd6f Fixed set-object-speed sexps. Thanks for the inspiration, Keldor! 2008-01-16 10:15:21 +00:00
karajorma c2ec85d312 Add SEXPs for determining the players score and how many respawns they've used. Add num-assists to this branch too. 2008-01-12 08:44:34 +00:00
Kazan 9854fea01b Apply KeldorKatarn's no autopilot mission flag patch (And a sexp to toggle it as it is a flag that can be dynamically toggled safely) "use-autopilot" is the SEXP [Applied KK's patch by hand]
Had to move things around and resize the mission specs editor - lots of MSVC2005 autogenerated garbage changes in this diff.
2008-01-08 17:24:24 +00:00
Kazan 1d9cacc995 helps to check the right value for the flag 2008-01-08 16:43:37 +00:00
Kazan 06018dc208 add chat/pxo files to MSVC 2005 project
Fix the autopilot cinematic wiggle, hopefully once and for all (every tick force all nav carry ship orientation and wing'ed-ship positions)
2008-01-08 01:41:13 +00:00
wmcoolmon 52e838fa9a Fix lighting and possibly clipping issues with separate-model cockpits 2007-12-31 06:44:23 +00:00
wmcoolmon 2d00070b2c Move cockpit model rendering to prevent unneeded projection matrix switching 2007-12-31 01:29:40 +00:00
wmcoolmon e420348cd5 Separate cockpit model support 2007-12-30 15:29:24 +00:00
wmcoolmon a3d87d2509 player.IsMulti 2007-12-30 13:44:40 +00:00
karajorma 0e4718236a Since you can't actually save a mission without this entry and FS2 crashes without it this probably shouldn't be optional. 2007-12-29 21:03:46 +00:00
Backslash fbf74f0d49 Backslash's "let's get this stuff into 3_6_9 as well" commit.
-gliding with thruster adjustments and speed cap
-glide_when_pressed control (right above bank_when_pressed)
-fixes to the thrusters sound and visuals while gliding
-don't show muzzle flashes in 1st person
-quick reticle for multitarget and asteroids
2007-12-28 02:10:38 +00:00
turey 7b2f9e4829 Bunch of stuff already in HEAD. Shouldn't break anything. 2007-12-20 01:57:45 +00:00
karajorma a7bc5d1318 FRED Changes to support alt name as callsign 2007-12-08 20:35:27 +00:00
karajorma 2ae027de6d Add the use alt as callsign option.
Add a few typo and comment fixes while I'm at it
2007-12-08 20:07:55 +00:00
Goober5000 f365d82080 patch hole in the state machine fix 2007-12-08 04:07:00 +00:00
Goober5000 4977bc3b03 catch invalid bounding boxes caused by buggy POF editors ;) 2007-12-03 04:47:02 +00:00
Goober5000 ce9c1b1fac watch out for bad MOI values 2007-12-02 08:21:50 +00:00
karajorma 75b75dae69 Turn a couple of things on by default. That's two less questions for FRED newbies to bother me with. 2007-11-29 11:29:14 +00:00
karajorma 9cd0a9006d Make the Run Freespace menu option work again 2007-11-29 11:26:51 +00:00
karajorma b44940de0e Change the way that score is parsed from mission files to make it easier on developers. 2007-11-28 21:00:34 +00:00
karajorma c410c5298f Fix Mantis 0397 2007-11-26 18:43:52 +00:00
wmcoolmon bb8e701822 Various minor sign/casting fixes 2007-11-24 04:33:50 +00:00
wmcoolmon c625bf559d Update MSVC2003 Project files 2007-11-24 04:33:29 +00:00
phreak b7be02d4e5 Change the device context variable name. 2007-11-22 17:51:35 +00:00
taylor 6b68884892 oops! not ready to commit that part just yet :D 2007-11-22 05:49:36 +00:00
taylor 2c33c746fb bump node allocation increment (when you are regularly realloc'ing 20-30 times, the increment is too low :)) 2007-11-22 05:36:06 +00:00
taylor dc4567b191 make sure that a missing ship anim doesn't lead us to a horrible death
minor cleanup
2007-11-22 05:31:39 +00:00
taylor 7c0b0950fb fix some missing cleanup 2007-11-22 05:25:22 +00:00
taylor ef94b0d067 fix campaign is missing then give player choice to switch campaigns, switch pilots, or exit 2007-11-22 05:23:44 +00:00
taylor 1adf9cf301 no reason to if-else the hud multiplier if it simply defaults to 1.0
add a little sanity checking for hud mutiplier tbl value
add missing multiplier for off-screen indicator
2007-11-22 05:19:47 +00:00
taylor e7adff269b try to deal better with gamma setting/resetting when minimizing/restoring the game (Mantis #1210) 2007-11-22 05:11:38 +00:00
taylor 41eb45c796 use the less dumb method 2007-11-22 05:04:07 +00:00
taylor bd660329bd minor fixes and cleanup for the warp effect
change scale of 3D warp effect to better match up with size of 2D effect
2007-11-22 05:02:44 +00:00
taylor 757fd455a9 add/remove some old, forgotten, and new files 2007-11-22 04:52:30 +00:00
taylor 904ff7b30e initial support for cursors that are larger than 32x32
fix bug where animated cursors would be constantly loaded/unloaded
2007-11-22 04:49:58 +00:00
taylor 9bd30c1199 cleanup/fixage for fade in/out function (Mantis #1186) 2007-11-22 04:43:47 +00:00
taylor a305007e79 be sure that we hide the game's mouse cursor (Mantis #1401) 2007-11-22 04:31:12 +00:00
Goober5000 a17c8eb39f add Wing Commander Saga's fiction viewer 2007-11-21 07:28:50 +00:00
Goober5000 3449d9c91a fix ship-type-destroyed 2007-11-20 04:58:25 +00:00
Goober5000 d04196a97d recognize a Vasudan main hall even when it isn't the second one; play the appropriate music as soon as the main hall switches 2007-11-20 01:11:13 +00:00
Goober5000 bffcd81423 clean up the state machine logic for starting games 2007-11-19 20:24:40 +00:00
Goober5000 1f12564d47 some minor enhancements to the skip mission cheat 2007-11-19 19:50:15 +00:00
Goober5000 d79a0f5cd7 remove warning... properly this time 2007-11-19 18:11:03 +00:00
Goober5000 16888b09cc clarify what this flag is actually for 2007-11-19 06:22:35 +00:00
Goober5000 1564096c3a use relative paths 2007-11-19 02:28:26 +00:00
Goober5000 abe749c89a fix for Mantis #1503 2007-11-18 07:43:15 +00:00
Goober5000 5966d5df96 gak -- stupid mistake 2007-11-18 06:57:40 +00:00
karajorma 3e1f7a3017 Fix peristent variables in missions played from the techroom 2007-11-14 13:49:31 +00:00
taylor 0af2fddddc fix out-of-bounds issue from retail (Mantis #1518) 2007-11-09 01:32:54 +00:00
taylor 933b4daebc make sound_buffers[] dynamic (part 1 of trying to better handle mods with lots of voice acting, like BtRL)
re-enable DirectSoundCapture for OpenAL builds, at least until I write the OpenAL version of capture (Mantis #1378)
2007-10-29 15:32:19 +00:00
karajorma c1fbc1734b This is better than the other way. 2007-10-29 11:32:22 +00:00
karajorma a4fc52d929 Add the hits-left-singe-subsystem SEXP 2007-10-28 18:10:45 +00:00
taylor 8385cc7e44 bump the buffer size used for Warning() and Error() messages 2007-10-28 16:46:36 +00:00
taylor d00ac67b8e fix volume-setting bug for menu music 2007-10-28 16:45:56 +00:00
taylor da04a2c8f2 fix anothing something that Valgrind complained about 2007-10-28 16:45:05 +00:00
taylor badfb2e5d3 cleanup and bug fixes for ship-guardian-threshold and ship-subsys-guardian-threshold (Mantis #1473) 2007-10-28 16:44:33 +00:00
taylor ab904f48ef always return the default value of osreg isn't initted yet 2007-10-28 16:42:54 +00:00
taylor f34949c84c slighly cleaner/faster version of object secondary fire control 2007-10-28 16:42:16 +00:00
taylor 8db0a4f862 minor code cleanup and better error handling 2007-10-28 16:39:58 +00:00
taylor 0cd2c7f064 fix a loadout bug where the current mission name would get substituted for the previous one by mistake 2007-10-28 16:39:17 +00:00
taylor 055ae2dfaa fix a bug that would crash after hitting ESC and trying to load a pilot (Mantis #1513)
some minor formatting cleanup
2007-10-28 16:38:13 +00:00
taylor 27a5f9b075 make sure that Warning()'s are sent to the debug log too, regardless of whether warning popup is enabled 2007-10-28 16:36:34 +00:00
taylor 428cb3f7cf add "2D Mission" checkbox to mission specs window (Mantis #1387) 2007-10-28 16:35:13 +00:00
taylor ed8321e3b0 freakish hack to allow FRED to run properly when executed from a terminal (and Wine under Linux) 2007-10-28 16:34:11 +00:00
taylor a0ebbfdf6d tisk tisk 2007-10-28 16:33:05 +00:00
taylor 571f8ce645 Valgrind was endlessly complaining about this 2007-10-28 16:32:06 +00:00
taylor 2aced7e9b9 reset Perspective_locked at the start of each mission so that view controls don't get locked until exit 2007-10-23 20:07:42 +00:00
Goober5000 80cf1bf437 fix a minor bug in the dockpoint system (affects sm2-07a in the Port) 2007-10-21 22:11:17 +00:00
taylor a6bd86a157 fix bug with +remove that made a beam section still appear partially valid
fix temp-var snaffu that hendered debugging
2007-10-21 03:40:41 +00:00
Kazan 6b70b0cdfa Enemy cargo containers should not prevent autopilot.
Fix build problem in parselo (strrchr returns const char* not char*, need to explicitly cast - raises error in MSVC2005)
Update MSVC2005 "code" project to reflect removal/addition of fs2netd related files
2007-10-20 23:28:49 +00:00
taylor 3ec5e05f75 change Warning() and Error() to use const format variables (can't remember who said to do this)
fix memory error when zero'ing buffers for error messages on non-Windows platforms
2007-10-17 21:03:06 +00:00
taylor 8142ec3254 since we are polling, "0" is a valid return and we need to wait until we actually get data (screwed up login packet order) 2007-10-17 21:01:33 +00:00
taylor 3f50a7685a sometimes the thread header needs to be specifically included since SDL.h doesn't always do it 2007-10-17 20:59:30 +00:00
taylor d80194ee19 fix mismatched parameters (Mantis #1470) 2007-10-17 20:58:25 +00:00
taylor e67400effa Oops, forgot that the v.2 daemon is still on the secondary IP :) 2007-10-15 08:18:33 +00:00
taylor ef326fd452 FS2NetD v.2 (still a work in progress, but is ~98% complete) 2007-10-15 06:43:23 +00:00
karajorma fef0f71612 Partial (?) fix for Mantis 1084. At least it shouldn't Int3() when the server exits any more. 2007-10-12 19:10:07 +00:00
karajorma 5ee909c583 I meant to remove this ages ago! 2007-10-12 18:57:16 +00:00
taylor e62899077f fix bugs in beam-*-all and turret-*-all that made them always trigger an Int3() 2007-10-04 16:26:43 +00:00
taylor 57848e4ff1 get rid of some old/obsolete items (Mantis #1489 and #1497) 2007-10-04 16:18:46 +00:00
Goober5000 159c82f029 another fix by razorjack... parent is -1 when created by sexp 2007-09-30 22:37:08 +00:00
Goober5000 044486f48f another patch by razorjack -- remove something that never worked 2007-09-30 22:28:29 +00:00
Goober5000 91423f4b63 a bugfix by razorjack 2007-09-30 19:01:18 +00:00
karajorma d50113a8f4 Fix x-builtin-messages so that the Any Wingman option works 2007-09-29 21:51:31 +00:00
karajorma 61a16f38d5 Upgrade the beam-x-all and turret-x-all SEXPs to accept more than one ship. 2007-09-29 15:21:33 +00:00
karajorma 3f4da2c205 Fix the double respawn bug (Mantis 788) and hopefully the corresponding server Int3 (Mantis 1213) 2007-09-29 13:58:45 +00:00
Goober5000 7c1f024ec7 fix the factoring on the shudder parameters (Mantis #1419) 2007-09-04 00:08:51 +00:00
Goober5000 29b8fbcc7e re-add the code to disable the Windows key... this time, without slowing the system to a crawl when FSO is in the background 2007-09-03 22:19:56 +00:00
Goober5000 d24a1714f1 roll back the windows key hook for now 2007-09-03 21:00:24 +00:00
Goober5000 508e8d3fca fix for 1471 2007-09-02 20:07:47 +00:00
Goober5000 00d4376b4e Shade's fix for #1329 (approximately) 2007-09-02 19:06:02 +00:00
Goober5000 71227a0d52 fix for #1455 plus a bit of cleanup 2007-09-02 18:53:24 +00:00
Backslash 22ce524056 2005 Project file cleanup. Changed a lot of paths to compiler macros.
Also gave Freespace2 project the inherited property sheet CoreWin.vsprops -- this lets Express Edition compile!
2007-09-02 12:02:28 +00:00
Goober5000 46fc91d26b that wasn't supposed to happen 2007-09-02 02:17:56 +00:00
Goober5000 a3ba239d97 added fixes for #1415 and #1483, made sure every read_file_text had a corresponding setjmp, and sync'd the parse error messages between HEAD and stable 2007-09-02 02:10:29 +00:00
Backslash a3298ac5cd The long-awaited HUD $Length Unit Multiplier setting! (With lots of help from KeldorKatarn)
Multiplies all speeds and distances displayed by the HUD by a given constant multiplier. The value is declared in hud_gauges.tbl (right after $Max Escort Ships) as
$Length Unit Multiplier: 5
2007-08-30 04:52:30 +00:00
phreak 99d12291ca destroyed-or-departed-delay needs to check for ships that have self destructed 2007-08-26 16:01:59 +00:00
phreak 7901fb12c4 Add WINVER define to the VC2005 project file so it shouldn't affect users of other compilers. 2007-08-25 15:37:43 +00:00
Goober5000 2dde884940 tweaky move 2007-08-20 02:55:12 +00:00
karajorma 3bb74b232e Fix for Mantis 1234 2007-08-19 22:15:41 +00:00
Goober5000 37dc07cf9b bring wxFRED project files up to date 2007-08-18 02:23:13 +00:00
Goober5000 a2fb4b52d8 generalize the way radar ranges are handled (inspired by Shade's fix) 2007-08-17 03:29:51 +00:00
phreak 2295ad112d Local SSMs shouldn't jump into subspace if they're not homing. 2007-08-16 00:45:54 +00:00
Goober5000 dc34695517 okay... let's not redefine the Windows version 2007-08-15 07:16:35 +00:00
Goober5000 fce9cdda46 fix problems with the mini help box
(interestingly this feature was committed to stable but not HEAD)
2007-08-15 06:57:00 +00:00
Kazan ba8e33324e forgot to cvs add these project files 2007-08-14 15:42:44 +00:00
Goober5000 bf839fa838 disable the Windows key while FreeSpace is running (thanks to jr2)
c.f. http://www.hard-light.net/forums/index.php/topic,48838.0.html
2007-08-13 23:07:35 +00:00
Goober5000 429486b26c some improvements to the pirate ship 2007-08-13 04:54:41 +00:00
Goober5000 4afd910bb2 some tweaks for a field that's mostly unused anyway 2007-08-11 16:52:02 +00:00
Goober5000 61bd2ab443 fix case-sensitive #include (Linux) 2007-08-04 22:30:02 +00:00
karajorma 4c68f9c96d Reinforcements Editor bug fixed Sucka! 2007-08-03 19:10:06 +00:00
Goober5000 af608534fd fix warning 2007-08-03 01:35:48 +00:00
Goober5000 5185800672 fix compilation issue 2007-08-03 01:17:10 +00:00
Goober5000 b67396b081 allow embedded dashes in command-line options 2007-07-29 03:11:01 +00:00
Goober5000 7302923cd7 apply some of Turey's changes to stable branch 2007-07-28 22:04:14 +00:00
Goober5000 7f46d67f46 this should really be capitalized 2007-07-28 21:31:11 +00:00
Goober5000 9219250d45 make the parse object array dynamic; also made the docking bitstrings dynamic 2007-07-28 21:17:56 +00:00
Goober5000 7abde24fd8 a couple of tweaks 2007-07-28 04:43:43 +00:00
Goober5000 b2f7eea91a AAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!! 2007-07-28 00:37:38 +00:00
Goober5000 09ca41f26d dork 2007-07-27 21:57:15 +00:00
Kazan 06fc0fcc29 I <3 making stupid bugs (return camera to normal when not using cutscene bars) 2007-07-25 20:45:16 +00:00
Kazan 33ab67c281 two-part autopilot warp, add +No_Cutscene_Bars optional flag to autopilot.tbl 2007-07-25 14:51:14 +00:00
Kazan a3e41b1c67 small tweak 2007-07-25 00:33:31 +00:00
Kazan 00338ff1fd oops 2007-07-24 20:31:00 +00:00
Kazan e9a394a42b Make asteroid/debris fields interrupt autopilot, add "hazards near" message to autopilot.tbl, add use-nav-cinematics sexp, fix mantis #1441 2007-07-24 20:08:31 +00:00
Kazan 3f7163c4be Resolve Mantis 1281 2007-07-24 13:04:11 +00:00
Goober5000 2a7ae53748 allow mission messages in dogfights (Mantis #1436) 2007-07-24 05:08:13 +00:00
Kazan 7f36f00f31 Autopilot updates, minor misc fixes, working MSVC2005 project files 2007-07-23 16:08:36 +00:00
Goober5000 ef429f53c7 Kazan's autopilot fix 2007-07-15 18:00:55 +00:00
Goober5000 8826356cfa fix and clean up the warpout conditions 2007-07-15 08:20:05 +00:00
Goober5000 e878123b13 restore WMC's ship flag 2007-07-15 06:29:56 +00:00
Goober5000 d32a5ac688 fix extremely minor bug 2007-07-15 04:45:42 +00:00
Goober5000 952ae3e813 partial commit of aldo's eyepoint feature
it will need a keystroke to be complete
2007-07-15 04:19:34 +00:00
Goober5000 80b5e9bbe6 fixed a small bug in the lab
moved WMC's no damage scaling flag to ai_profiles and made it work correctly
removed my old supercap damage scaling change
moved Turey's truefire flag to ai_profiles
2007-07-15 02:45:51 +00:00
Goober5000 cdbc4374ed fix a newline bug in the voice acting manager 2007-07-14 23:22:47 +00:00
Goober5000 59ee8da2d4 fix an off-by-one error 2007-06-30 23:32:25 +00:00
taylor 4f81c3e8da convert to LF EOL 2007-06-25 19:17:56 +00:00
Backslash 33c9552464 Cutscene subtitle positioning fix for resolutions other than 1024x768. Code by MikeStar. 2007-06-24 23:32:16 +00:00
karajorma 22440bbc4b Fix an issue with single character command line arguments 2007-06-24 17:59:17 +00:00
wmcoolmon 94d092566b Remove MSVC_7 directory from 3.6.9 branch 2007-06-09 00:57:36 +00:00
wmcoolmon 0bdf1a1697 Update MSVC_2003 directory with MSVC_7 files 2007-06-09 00:56:10 +00:00
Backslash e5c36022be Another Gliding fix for 3_6_9: Makes it so switching gliding back off doesn't make your ship instantly switch direction. 2007-06-04 03:09:51 +00:00
Backslash 0d568cf7b1 Here's the Gliding gauge for 3_6_9 as well. Simple but useful especially for mods that use it, like BtRL 2007-06-02 21:40:59 +00:00
taylor aebbd9b320 more resilient checking of stars.tbl and it's modular versions 2007-05-28 20:05:06 +00:00
taylor 3eef49ed1e various bits of clean up
make stats printing a bit more sane
printf out game version info to debug log (not very helpful, but might prove some use)
2007-05-28 20:00:17 +00:00
taylor fd6905b4a1 this is a bit cleaner way to do it :) 2007-05-28 19:47:46 +00:00
taylor 619fc376fa oops! the exit() was supposed to come /after/ the last printf() :) 2007-05-28 19:46:30 +00:00
taylor eeebd05daa make the chcksum spew in logs always have a full 8-set of values
skip over files found on system which are over the max filename length, prevents several crashes (partial for Mantis #1182)
2007-05-28 19:45:14 +00:00
taylor 544667ad2b various bits of cleanup
don't draw beam impact effect if we are hitting a shield
updated hit shield quadrant properly for player when a beam hits
set shield quadrant and exit_flag properly for collision info so that we don't count damage twice and handle no_pierce_shields properly
2007-05-28 19:41:47 +00:00
taylor fab10cf66d fix armor index bug for shockwaves 2007-05-28 19:38:10 +00:00
taylor 5882e1fec4 bump version to 3.6.10 2007-05-28 19:36:26 +00:00
wmcoolmon 7783406c92 Project file commit. These aren't specifically set up for CVS, but they will at least compile. 2007-05-28 18:28:32 +00:00
wmcoolmon 48cdd1e88c Added armor support for asteroid, debris, ship, and beam damage 2007-05-28 18:27:36 +00:00
Backslash aa09ac254a Now that I've figured out how to commit to the 3_6_9 branch, here's a cleanup and update to bring physics as close to HEAD as possible without breaking anything or adding my uberglide changes yet. This fixes:
-the reverse-thusters-not-working-at-full-throttle bug
-the fishtail-way-too-fast-sideslip at high Damp values problem
-the slide accel/decel damp inconsistency
Some of these fixes will be particularly noticable to the BtRL people, hopefully all in good ways.
Also fixed a bunch of typos and whitespace just to get it consistent with HEAD.
2007-05-26 15:36:38 +00:00
Goober5000 e7aac846ad add placeholder stuff for parsing ship-class texture replacements 2007-05-26 15:12:07 +00:00
Goober5000 7a6fef3897 that was weird 2007-05-26 15:11:15 +00:00
Goober5000 b91ff71edb when importing FS1 missions, account for the shuffled Head-TP4 2007-05-26 12:08:26 +00:00
Goober5000 edfbc7af3f the reinforcement comm menu will now correctly display according to whether or not reinforcements are available 2007-05-26 00:56:11 +00:00
taylor e812667660 add the rest of the texture page-in code changes that I skipped before (should fix Mantis #1389) 2007-05-25 13:49:39 +00:00
taylor 0911b85e31 make Linux just verbally ignore invalid cmdline options rather than it being fatal 2007-05-25 13:47:10 +00:00
wmcoolmon 4375309895 . 2007-05-20 21:24:09 +00:00
wmcoolmon f50c9fe2f5 FRED2 support for numbered SEXP operator arguments, minihelp box, fixed "Insert Event" when no events are present. 2007-05-20 21:21:35 +00:00
taylor e678132d09 fix stupid bugs in CF_SORT_REVERSE (should be as originally intended now) 2007-05-20 02:51:26 +00:00
taylor cf9509633e fix armor_parse_table() so that it will parse multiple entries properly
fix bug introduced from not closing down lcl_ext after parsing armor.tbl
2007-05-17 14:58:40 +00:00
Goober5000 496c9929d4 --grouped the shake/shudder code together a bit better
--added a sexp to generate shudder
--fixed a minor bug in lock-perspective
2007-05-14 23:13:51 +00:00
taylor 34824f224d add session open/close times to debug log 2007-05-11 03:16:01 +00:00
taylor 851a21ff57 properly handle invalid sound index case, fixes div-by-0 error 2007-05-11 03:14:02 +00:00
taylor 06bbb98a50 very minor optimization (mul is much faster than div) 2007-05-11 03:12:28 +00:00
taylor 29cc9a4186 fix debug message (using wrong name, spit out a bunch of garbage on Windows boxes) 2007-05-11 03:10:48 +00:00
taylor 0a1885e09f delete the .hdr file once we are done with it, since it's no longer useful 2007-05-11 03:09:21 +00:00
karajorma 59d5013b5b Doh! Missed the return type. 2007-04-26 18:59:36 +00:00
karajorma 408f785611 Fix a number of places where the player of a dogfight game could end up in the standard debrief. 2007-04-24 12:07:35 +00:00
karajorma 838738fc46 Add the knock feature from Tom's build. 2007-04-24 09:52:26 +00:00
karajorma 780b92a8f0 Remove the -fredhtl command line. 2007-04-17 17:15:31 +00:00
taylor 13d3da67be add Linux friendly icon 2007-04-15 12:46:43 +00:00
taylor 234aaf9be3 only add player-allowed flag on #Weak weapons when their non-weak versions also have the flag (Goober #73) 2007-04-14 23:44:08 +00:00
taylor 9da63c5c7e little cleanup
fix memory size fubar on trail vlist ptr
2007-04-14 23:42:20 +00:00
Goober5000 aeb8a5ed84 fixed a silly speech bug (Mantis #1238) 2007-04-13 03:23:12 +00:00
taylor a2ab858272 cleanup and initialize persona_index properly for general safety reasons
slight change to karajorma's NO_BUILTIN_MESSAGES check, now it will be properly compiled away in release builds rather than an empty function
2007-04-13 00:36:43 +00:00
taylor c524db4e45 use qsort() instead of insertion_sort() for light sorting, it should be better optimized and quicker in general for this use 2007-04-13 00:33:41 +00:00
taylor 969291cc24 some basic cleanup for the extension code
fix the old bug that didn't report a missing extension name properly
get rid of the message that says to use D3D, that's not normally going to be an option anyway
add ARB_point_sprite support, mostly for fun since no code will actually use it until after 3.6.10
2007-04-13 00:31:58 +00:00
taylor 10b28b5e2a clean out some old code we no longer use/need
change warning messages to not print out current tbl name, since at the point those messages show the tbl has long since been parsed
add an extra quick-check to ship_get_subsystem_strength() to avoid div if we don't need it
make Ship_subsystems[] dynamic (sort of), it's allocated in sized sets now, so we can easily change size while still working with the existing linked-list code
2007-04-13 00:28:00 +00:00
taylor a3a4a05cad this got chopped off of the previous commit for some reason 2007-04-11 18:23:01 +00:00
taylor 2526b893cf cleanup of chcksum stuff (works properly on 64-bit systems now)
add chksum support for VPs, both a startup in debug builds, and via cmdline option (-verify_vps)
little cleanup in cmdline.cpp (get rid of the remaining "fix bugs" crap)
2007-04-11 18:21:23 +00:00
taylor 472d4d7a09 cleanup error message
allow launch_snd from tbl to be used for beam weapon shot sound (Mantis #1263)
2007-04-11 18:17:26 +00:00
taylor 04b6094be1 add modular version of strings.tbl (*-lcl.tbm) (provides for Mantis #924) 2007-04-11 18:11:21 +00:00
taylor 875fc6de9f bm_unload_fast() should only unload the bitmap passed for animations, not the entire animation (fixes several issues) 2007-04-11 18:05:18 +00:00
taylor 0db9092fea get rid of stale NO_JOYSTICK define 2007-04-11 14:59:35 +00:00
taylor 053b335cd7 add extra safety check to make sure that we are going to do a wildcard search for modular tables 2007-04-11 14:58:07 +00:00
taylor fae4fa70ff get rid of (now) unused variables 2007-04-11 14:44:32 +00:00
taylor dd1020447f update to 3.6.9 release 2007-04-09 21:03:57 +00:00
taylor 4ce0241ef7 basic update to current frameworks (adding Theora) 2007-04-09 21:01:46 +00:00
taylor 086fbbe363 new icon from Foxer 2007-04-09 21:00:44 +00:00
taylor 9707877617 update to current settings/files 2007-04-09 20:59:25 +00:00
karajorma fa5d07d82a Fix for Mantis 1312 2007-04-09 18:25:31 +00:00
karajorma ac3a47c5b6 Make .wavs work again in the briefing editors. .ogg appears to be a bit harder. 2007-04-08 08:28:20 +00:00
karajorma 73042978a5 Add the -cap_object_update command line to force multiplayer clients to a more server friendly object update setting. 2007-04-06 12:55:57 +00:00
karajorma 72afd1326c Fix bug whereby clients who were gliding can't jump out at the end of the mission. Remove a couple of magic numbers that looked at me the wrong way. 2007-04-05 16:49:21 +00:00
karajorma c58ad4e0b3 A few minor fixes 2007-04-05 16:43:44 +00:00
karajorma 6e3056a679 What was I thinking? Fixed 2007-04-05 16:33:25 +00:00
karajorma 36dca50f20 Fail warpout if the player is in glide mode (They'd never get up to warp speed anyway half the time) 2007-04-05 16:29:25 +00:00
karajorma 9a7078e879 Remove message source boxes on friendly stealthed ships 2007-04-05 16:25:58 +00:00
karajorma 74e0ecf4b2 Makes little difference but I suppose I should zero that 2007-04-05 16:20:36 +00:00
karajorma 5df3f0b1e9 I could have sworn I committed this! Anyway, make the wingman complain when you shoot them instead of command. Send traitor messages from wingmen if command is silenced. 2007-04-05 15:59:44 +00:00
Goober5000 efaf783bf1 meh, space 2007-04-03 02:19:26 +00:00
Goober5000 64faed5160 fixed up some error messages 2007-04-03 01:39:31 +00:00
karajorma 0e0975b65c *** empty log message *** 2007-03-23 06:25:31 +00:00
taylor 038f28d04a forgot to remove -jpgtga from Launcher options previously
get rid of -fixbugs and -nocrash crap
2007-03-22 20:55:53 +00:00
taylor 9bc268c2b4 give a better msg when movies can't play because they are user-disabled with the cmdline option 2007-03-22 20:54:00 +00:00
taylor 2f0b6e9243 bump version to 3.6.10, it will be needed for new texture replacement stuff (tbl version commenting) 2007-03-22 20:52:38 +00:00
taylor d393e69364 some generic code cleanup 2007-03-22 20:50:28 +00:00
taylor a1a79ebefa make sure that we set/reset the red alert data properly (Mantis #1255) 2007-03-22 20:47:49 +00:00
taylor 6ea3ff64d3 cleanup and fix for weapon cycling (Mantis #1298) 2007-03-22 20:45:22 +00:00
taylor 185fdeb1c4 be sure to page in textures for change ship class sexp preload
add a ASF_MENUMUSIC type for things that aren't mission-based event music (since that is handled differently now)
make event music keep extension if it exists, so that the special data will be accurate
bits of cleanup from old MS code that we don't need
2007-03-22 20:35:45 +00:00
taylor 213abaa02c fix stupidness that screwed up RGB values (Mantis #1307) 2007-03-22 20:23:58 +00:00
taylor 7332293df0 a little better error handling for cf_exists_full()
add a cf_exists_full_ext() which can find a series of extensions and returns true if any of them exist
use cf_exists_full_ext() for eventmusic file checks (to check for ogg and wav)
get rid of SPM hack, it's wrong (just commented out for now though)
fix a bunch of bugs in cf_find_file_location_ext():
 - try to handle files with multiple periods a bit better (for the wav files like: blah_1.5.wav)
 - load issue with finding incorrect files by mistake
 - prevent finding different file types in various paths/roots
2007-03-22 20:22:45 +00:00
taylor c1921bfb6f various bits of bmpman cleanup
be sure to clean all three possible buffers with OGL init
fix a couple of bmpman loading bugs that messed up animations
fix bmpman bug that didn't properly account for free'd texture ram count with unload_fast
2007-03-22 20:14:17 +00:00
taylor 30306e9a7f old ✌️ snafu 2007-03-22 20:09:05 +00:00
taylor 5fcc713d64 when parsing a modular tbl, allow a duplicate sun entry to overwrite an existing one 2007-03-22 20:07:16 +00:00
taylor 5a93e4562a little bit of cleanup
set "#Weak" weapons to always get the "player allowed" flag (Mantis #1301)
2007-03-22 19:31:25 +00:00
taylor ab02eefab2 fix strange bug where a beams parent will die and the object reset before the beam gets the chance to fire 2007-03-22 19:30:00 +00:00
karajorma 905e16f825 Bump the number of debriefing stages.
Fix an annoying (and erroneous) warning in the campaign editor.
2007-03-21 20:54:25 +00:00
karajorma ce856d94c5 Turn off afterburner controls when player isn't in control 2007-03-11 22:55:32 +00:00
karajorma 9365ab68d6 Make .ogg selectable in FRED. 2007-03-07 22:36:52 +00:00
karajorma f77e27b606 It's perfectly legal to press the Target Target's Attacker key with no target. We should just play a failed sound instead. 2007-03-07 17:51:15 +00:00
Goober5000 ef3b4b29b3 add two features for WCS: specifyable shield/weapon recharge rates, and removal of linked fire penalty 2007-02-27 01:44:48 +00:00
Goober5000 d1719ac139 added vm_matrix_same() 2007-02-26 01:47:23 +00:00
Goober5000 72bdc71ec5 use dynamic memory instead of a static buffer for ship-specific replacement textures 2007-02-25 03:58:07 +00:00
Goober5000 69a5e72cd0 remove duplicate model texture replacement 2007-02-21 01:44:02 +00:00
Goober5000 67e673b810 wups 2007-02-20 04:53:11 +00:00
Goober5000 c9a16f9eb5 revert to retail behavior 2007-02-20 04:27:23 +00:00
Goober5000 ddf19cb2a1 the great big duplicate model removal commit 2007-02-20 04:20:38 +00:00
Goober5000 491c5f3e55 *** empty log message *** 2007-02-20 01:41:07 +00:00
taylor 1ff86bc6f0 forgot that too (like Bobboau did the first time :)) 2007-02-18 21:57:30 +00:00
Goober5000 774d4fd091 magic word 2007-02-18 21:26:52 +00:00
taylor 0406978de1 fix super-stupid bug :) 2007-02-18 08:59:03 +00:00
Goober5000 153fc41243 remove obsolete and misleading comments which should have been edited when the code was upgraded 2007-02-16 22:09:05 +00:00
karajorma 9a052f877a Thought I'd caught all of these months ago! Thanks to Wanderer for the heads up. 2007-02-16 18:48:42 +00:00
Goober5000 8fcc333dfe uhh... wrong? 2007-02-16 07:06:46 +00:00
Goober5000 df69c06b42 fix a hideous bug with the knossos special warp stuff
(how did this ever actually work correctly?)
2007-02-13 01:46:03 +00:00
taylor 7abcde7fa5 disable D3D by default for stable tree 2007-02-12 07:32:03 +00:00
taylor bf1757b2fe a little cleanup
handle issue where we don't deal with an error condition properly and hit a NULL ptr
2007-02-12 07:31:03 +00:00
taylor b9643a6e95 fix stupid bug (Mantis #1275) 2007-02-12 07:29:51 +00:00
taylor 4c46062338 fix a couple of things that I missed earlier 2007-02-12 02:19:45 +00:00
taylor a434918be5 make gr_create_shader() use ubyte's instead of float's, saves us the more expensive conversions since we already convert to ubyte anyway 2007-02-12 01:04:50 +00:00
taylor 8a7e865e30 make use of generic_anim and generic_bitmap where possible
bunch of cleanup and little optimizations
add "+remove" tbl option to completely get rid of particular beam sections
delayed loading of bitmaps, will only do it after all tbl/tbm have been parsed
if we are using a POF missile which isn't loaded yet, try and load it before going crazy
bug fix and optimization for laser color setting
2007-02-12 00:54:31 +00:00
taylor 18c778a8bb oops, forgot this bit 2007-02-12 00:48:43 +00:00
taylor b02f41b3bd bit of cleanup and minor performance tweaks
sync up with new generic_anim/bitmap and weapon delayed loading changes
with generic_anim, use Goober's animation timing for beam section and glow animations
make trail render list dynamic (as well as it can be)
2007-02-12 00:45:24 +00:00
taylor c77b979fbc bit of cleanup and minor performance tweaks
render ship insignia with a bit of alpha to help with blending/lighting
dynamic thruster particle limits
update for generic_bitmap/anim changes
make use of flag_def_list for ship flags rather than a ton of if-else statements
use generic_bitmap and generic_anim where possible to faciliate delayed graphics loading (after all ship related tbls are parsed)
use VALID_FNAME()
2007-02-12 00:41:38 +00:00
taylor eb2aecdf36 add back special "var" setting for flag_def_list and convert some of the lists to use it (more on the way) 2007-02-12 00:24:33 +00:00
taylor 78afc89e6c get rid of non-standard itoa(), make use of the proper sprintf() instead 2007-02-12 00:23:40 +00:00
taylor 991cf0ee52 some generic_bitmap fixes to go with new changes (not in CVS just yet, don't freak out)
make use of VALID_FNAME() where possible
fix an animation time issue (sub-second animation playback caused div-by-0)
2007-02-12 00:22:05 +00:00
taylor fbc5ad02c4 IBX version 2 support (includes Bobboau's earlier D3D fixes for it) 2007-02-12 00:19:48 +00:00
taylor b430fd4899 fix breakage (hehehe ;)) 2007-02-12 00:17:07 +00:00
Goober5000 1f82fd3589 fixage 2007-02-11 22:46:39 +00:00
Goober5000 de456e2fc1 change a number to a constant 2007-02-11 21:42:41 +00:00
Goober5000 daee540734 fix some breakage ;) 2007-02-11 20:26:00 +00:00
taylor 4fbc9380c9 fix a break from an earlier partial commit 2007-02-11 18:46:30 +00:00
taylor ab9d839402 cleanup and minor performance improvements
add support for new fireball specific lighting values from tbl
remove NO_SOUND
2007-02-11 10:04:46 +00:00
taylor ff56f00c12 remove some dead code
general cleanup
fix issues with texture state changes not affecting things properly
fix stupid texture addressing thing that I had done a long time ago
deal with -img2dds error issue
2007-02-11 10:03:29 +00:00
taylor c20f5996e4 remove cloakmap stuff, we'll need to redo this later on anyway
don't need the AVI movie hacks any longer, so remove it
deal better with a strange Windows buffer swap issue
various bits of cleanup and performance improvements
fix for gr_opengl_flash() that I had screwed up earlier
2007-02-11 10:01:11 +00:00
taylor 1defedc8b4 remove -pcx32 and -jpgtga
support for a couple of recent bmpman changes
2007-02-11 09:58:20 +00:00
taylor 93c253dcea support for new finding/loading of sound files
add support for automatically figuring out samples-per-measure based on Goober's explanation in the Wiki (not sure if it's actually right though)
remove NO_SOUND
2007-02-11 09:56:25 +00:00
taylor b0a2cffc36 support for tbl specified fireball explosion color ("$Light color:") 2007-02-11 09:53:33 +00:00
taylor 960b46b683 remove some dead code
better texture memory handling (a work in-progress)
new image finding/loading
get rid of -pcx32 and -jpgtga
change the game_busy() reporting during bitmap page-in to only catch one frame of an animation
fix numerous little bugs in gropenglbmpman relating to -img2dds
2007-02-11 09:51:21 +00:00
taylor c83c606e1e some minor performance improvements
remove NO_SOUND
2007-02-11 09:39:09 +00:00
taylor bffe468e45 add VALID_FNAME() macro and put it around a few places (more to come)
clean out some old variables
move CLAMP() macro from opengl header to global header
update COUNT_ESTIMATE to match new bmpman changes
2007-02-11 09:35:11 +00:00
taylor cd5e2d8da8 forgot to remove .avi and .mpg from CF_TYPE_ROOT 2007-02-11 09:32:19 +00:00
taylor 71337da2aa some CFILE cleanup and slight directory order reorg
add cfopen_special() for quickly opening files that have already been found with cf_find_file_location_ext()
remove NO_SOUND
2007-02-11 09:25:42 +00:00
taylor 4c9df346c4 remove -pcx32 and -jpgtga 2007-02-11 09:24:08 +00:00
taylor 164075331d remove AVI/MPG support, we now rely just on MVE/OGG 2007-02-11 09:23:14 +00:00
taylor 0d5718d3fc remove NO_SOUND
fix debris recycling
2007-02-11 09:22:29 +00:00
taylor bd3b2ecc35 little bit of cleanup
more fixage for hidden jumpnodes (Mantis #1149)
2007-02-11 09:12:12 +00:00
taylor 7bbc7ace68 fix simroom crash bug from Goober's rencent change
add NULL handling to make sure we don't crap out on sorting
2007-02-11 09:10:14 +00:00
taylor dd281588e9 little bit of debug message cleanup
don't bother dealing with message wav file if sound is disabled
2007-02-11 09:07:33 +00:00
taylor 011490349e if we are a dying ship then don't do collision detection against our own debris (slight performance boost to exploding ships) 2007-02-11 09:06:30 +00:00
taylor 793a69504e add WMC's strextcmp() from HEAD 2007-02-11 09:05:02 +00:00
Goober5000 6f62aac45b we probably don't need to play a sound when we equalize already-equalized shields, since we don't play one when we augment already-augmented quadrants 2007-02-11 07:36:43 +00:00
Goober5000 d6f1c9f937 when alphabetizing campaigns, ignore "the" at the beginning of a title 2007-02-11 06:38:56 +00:00
Goober5000 09681fcfe3 invert the do-collision flag into a don't-do-collision flag, plus fixed a wee lab bug 2007-02-11 06:19:08 +00:00
taylor abe216721b make sure that we don't set the 2d view matrix and then not reset it (Mantis #1269)
clean up some of the fullneb mess that was causing some initial setup issues (colors wrong, etc.)
2007-02-10 20:23:51 +00:00
Goober5000 61aacb38e9 sort campaigns by title, not by file name 2007-02-10 06:55:58 +00:00
Goober5000 8905f709c7 take all subsystems into account when displaying repair gauge 2007-02-10 05:01:11 +00:00
Goober5000 25f9cea088 prevent the AI from falling into the black hole of disarming a turretless ship 2007-02-10 04:49:23 +00:00
Goober5000 7b7013e16f small tweak 2007-02-10 03:20:43 +00:00
taylor ad204d2bef remove NO_SOUND 2007-02-10 00:18:22 +00:00
taylor 7f22a46272 phreak missed fixing this here when he fixed it in unstable 2007-02-10 00:16:57 +00:00
taylor 1a1b210017 remove NO_SOUND
fix glow bank sexp bug (Mantis #1250)
2007-02-10 00:15:32 +00:00
taylor 0f10a1b1df fix a mouse button issue (just an issue with newer SDL versions?) 2007-02-10 00:12:35 +00:00
taylor 9903df7e6c a quick debug test to catch an error and FRED doesn't catch on it's own yet 2007-02-10 00:10:31 +00:00
taylor 67cb35a2d2 performance optimizations:
- fvi_ray_boundingbox() is faster and should be less prone to compiler/optimization/platform specific issues
 - clean up or obj_check_all_collisions() which is a good bit faster now
2007-02-10 00:08:59 +00:00
taylor f5ed718e1a obsolete gluLookAt() in favor of doing it manually, should be slight faster and more precise 2007-02-10 00:05:48 +00:00
taylor 9cbe1a4b2b performance/accuracy optimization for the (un)size functions 2007-02-10 00:04:03 +00:00
taylor 22a3e0f710 make sure that our color is getting set properly (should properly fix the red/green tint problem, Mantis #1041)
slight optimization for Theora YUV->RGB converter
2007-02-10 00:02:18 +00:00
taylor 561efe84b4 add the "show all" hotkey to the cutscene viewer 2007-02-09 23:58:52 +00:00
taylor 436af79187 add the number of files that CFILE is going to try and use in each root to the debug info
optimizations for cf_find_file_location_ext()
2007-02-09 23:57:24 +00:00
taylor d597ba2b40 add better support for Ogg, Vorbis and Theora libs/includes 2007-02-09 23:54:00 +00:00
Goober5000 33f13744a2 merge the voice acting manager into the 3.6.9 (3.6.10?) branch 2007-02-09 05:40:40 +00:00
Goober5000 b04ce2c099 merge the WCS screaming feature into the 3.6.9 (3.6.10?) branch 2007-02-09 04:53:28 +00:00
Goober5000 93bcf9fe29 add a few ship flags that weren't on the dialog 2007-02-08 18:34:05 +00:00
Goober5000 77142be1e8 fix two bugs:
--default ship flags in the iff_defs table were not correctly translated from parse flags to ship/object flags
--ships were created with default allowed comm orders regardless of which team they were on
2007-02-08 07:39:35 +00:00
Goober5000 e30280306f Clean up the ship-weapon collision code for both conventional weapons and beams. Improved readability and clarity; untangled program flow; cleaned up sloppy enhancements. Fixed a few bugs too. 2007-02-07 07:35:01 +00:00
Goober5000 c88f10c883 remove obsolete and unused shield flag 2007-02-06 01:27:34 +00:00
Goober5000 bceb9a64be fix an old subtle bug 2007-02-03 23:16:41 +00:00
karajorma 7904cf3ebf Fix add-remove-escort to actually use a priority. 2007-01-27 18:39:09 +00:00
karajorma f2cab2c8c0 Add the reset-orders SEXP
Some general houskeeping to keep 3.6.9 and HEAD throwing up lots of annoying diffs that are just spacing issues.
2007-01-15 11:57:02 +00:00
Goober5000 3e9ff0e03d thanks to WMC for catching this -- it was a goof from back in 2003! 2007-01-15 01:55:46 +00:00
karajorma da685b067b Fix bug where orders you gve last mission are sill accessible to the Order SEXP. 2007-01-14 20:55:20 +00:00
Goober5000 e515d9c5b6 hmm... I guess when I fixed this back in 2004, I fixed it the wrong way :D 2007-01-12 04:33:50 +00:00
taylor c5353e61e5 fix escort positioning issue (Mantis #1179) 2007-01-07 13:18:32 +00:00
taylor 7b6575aeda safety check to make sure that we don't end up with non-player-usable weapons in the weaponselect pool (Mantis bug #1196) 2007-01-07 12:18:09 +00:00
taylor e755ddf376 fix a couple of memory leaks with modular tables 2007-01-07 12:16:31 +00:00
taylor 5935506685 be sure to page in skybox textures properly 2007-01-07 12:16:01 +00:00
taylor dd4b939f23 allow loading of ogg or wav based on which is found first rather than tbl filename (fixes crash when Theora movies end up in wav code by mistake) 2007-01-07 12:15:09 +00:00
taylor 959335c061 fix model vertex normal data that was being read/written incorrectly under OS X (still don't know why this was a problem, but this fixes it) 2007-01-07 12:13:57 +00:00
taylor 56e0f790ce fix NULL ptr reference when a weapon doesn't have a tech description 2007-01-07 12:12:46 +00:00
taylor a5418b848a rest of the weapon switch out-of-bounds/Assert() fix 2007-01-07 12:11:51 +00:00
taylor baa90ae0a4 we are only supposed to init 5 slots here, not 6 ;) (Mantis bug #1195) 2007-01-07 12:11:05 +00:00
taylor 6e5d03518c remove D3D support for Theora movies, make sure that it doesn't try to play them (since it wouldn't work properly anyway)
fix triple-buffer problem with page flipping (Mantis #1190)
2007-01-07 12:10:18 +00:00
taylor bde14dae68 fix bm_page_in_texture() so that it will load all frames of an animation (caused slowdowns in-game with it) 2007-01-07 12:07:40 +00:00
Goober5000 062c3f0490 don't display any error messages when there are no background bitmaps to load 2007-01-07 03:44:50 +00:00
Goober5000 c004068db2 fix bug where built-in lament messages were never played 2007-01-07 03:10:05 +00:00
Goober5000 505111ae75 taylor's bugfix 2007-01-06 23:56:43 +00:00
Goober5000 f8ec47089d gah, not this again 2007-01-04 04:51:57 +00:00
Goober5000 0eb1ddd6c5 fix spelling... *twitch* 2006-12-28 22:47:16 +00:00
Goober5000 521ec98a33 assume ships-with-bays which haven't yet entered the mission are valid for syntax checking 2006-12-28 02:07:49 +00:00
Goober5000 b14a884535 removed obsolete limits 2006-12-28 01:22:04 +00:00
karajorma 0079065ffd Altered the Warpin and Warpout types flag to match those in HEAD. 2006-12-27 10:27:10 +00:00
taylor b31d2ea5d9 fix OpenGL envmap "issues" (ie, stupid taylor stuff)
get rid of that RCS_Name thing, CVS kept changing it automatically and it was getting /really/ annoying
2006-12-27 09:26:21 +00:00
taylor e461e50eb2 wurrps, someone besides me might actually want to use that ;) 2006-12-27 09:24:31 +00:00
Goober5000 25afacc59b allow parsing of similar ship copy names properly (Mantis #1178) 2006-12-26 18:14:42 +00:00
taylor cf010a46f8 add Theora files/libs
add mapinfo stuff so that .map files are actually useful (wasn't this here before?)
add /y to the copy command, since it wasn't always copying over existing builds for me
2006-12-26 05:35:07 +00:00
taylor c055184c86 make weapon_expl info dynamic 2006-12-26 05:32:59 +00:00
taylor 582e5d2165 be sure to reset our skybox model properly, it can lead to a bad model unload bug on level load otherwise 2006-12-26 05:32:18 +00:00
taylor 0f43abd42a fix some sound state stuff that was leading to crashes in OS X and undefined behavior in Windows (this isn't all that pretty, but will handled properly in post-3.6.9 revised code) 2006-12-26 05:31:22 +00:00
taylor 2e1696e7c1 minor spelling fixage
make depreciated subsystem flag syntax be a debug log warning instead a popup warning (FOR 3.6.9 ONLY!)
2006-12-26 05:30:00 +00:00
taylor c0c2f9b552 remove unneeded header 2006-12-26 05:27:54 +00:00
taylor 75a0330a08 make sure that we don't target a hidden jumpnode, and if we do be sure to only detarget it rather than turning off auto-targetting 2006-12-26 05:27:15 +00:00
taylor 1bcd371184 remove some old stuff that we either don't use or don't need any longer 2006-12-26 05:26:12 +00:00
taylor 94089db6db lots of little cleanup, stale code removal, and small performance adjustments
get rid of the default combine texture state, we don't need it in general, and it can screw up fonts
get rid of the secondary color support, it doesn't do much in non-HTL mode, screws up various things, and has long since been obsolete but material setup
get rid of the old gamma setup, it actually conflicts with newer gamma support
default texture wrapping to edge clamp
do second gr_clear() on init to be sure and catch double-buffer
make sure that our active texture will always get reset to 0, rather than leaving it at whatever was used last
fixed that damn FBO bug from it hanging on textures and causing some rendering errors for various people
only lock verts once in HTL model rendering
2006-12-26 05:25:18 +00:00
taylor d884b96ec5 comment out some extensions that we either don't use or don't need to use 2006-12-26 05:18:14 +00:00
taylor 44647b0000 tweak emission light a little bit
various bits of cleanup that I've been meaning to do
2006-12-26 05:17:28 +00:00
taylor f5b043c42e support both "none" and "<none>" on filenames to skip (will do this better later, ran out of time) 2006-12-26 05:15:40 +00:00
taylor e58c1fd05d get rid of some stale vars that we don't use any longer
a little at-exit cleanup
handle rounding error on X/Y placement locations under Windows
2006-12-26 05:14:52 +00:00
taylor 846e355928 add support for Theora movies (the default format)
some little bits of cleanup
add second gr_clear() so that double-buffer'd visuals will work properly (ie, not flicker when playing MVE/OGG)
2006-12-26 05:13:29 +00:00
taylor d68d66c97d add .ogg files to movie locations 2006-12-26 05:11:57 +00:00
taylor 53592b24c9 add OGG Theora player to build list 2006-12-26 05:11:30 +00:00
taylor b36ac1779d add Theora libs 2006-12-26 05:11:01 +00:00
taylor 41d2475b7a initial OGG Theora movie support (likely to be rewritten at least in large part) 2006-12-25 21:44:11 +00:00
Goober5000 b6164cdb2e make chase view and external view toggles independent (Mantis #1087) 2006-12-25 18:54:15 +00:00
karajorma b50635bc81 Move the voice recognition init to stop Windows complaining and failing to init it. 2006-12-20 11:27:06 +00:00
Goober5000 8fbb51d8a3 fix Mantis #1163 2006-12-08 19:18:54 +00:00
taylor 905f8c669b cleanup shockwave code a bit
make Shockwave_info dynamic
lot of fixage to allow 2D and 3D shockwaves to work better
fix for Mantis bug #1148
properly handle both "none" and "<none>" for 2D and 3D shockwave names
better handling, preloading wise, of 3D shockwaves and their textures
2006-12-07 18:30:20 +00:00
taylor b2407d7d2f fix for new GCC versions (Fedora Core 6) 2006-12-07 18:26:48 +00:00
taylor 00257285e6 stupid of me to use a case-sensitive comparison there, but then it wasn't really a problem until Goober's bitmap list support ;) 2006-12-07 18:26:03 +00:00
taylor 53e2d33dce various sound fixes/changes, mainly for OS X fixage 2006-12-07 18:24:43 +00:00
taylor b9cf75b3f9 fix secondary thruster length stuff
- change thruster_glow_len_factor to thruster02_glow_len_factor so it's a bit more obvious
 - fix tbl entry so that it makes sense what you are setting :)
2006-12-07 18:23:38 +00:00
taylor af082e866c unbreak the breakage that I broke when I tried to fix breakage that wasn't broken the second time but initialy broke instead
(yeah, this one confused me ;))  (Mantis bug #1165)
2006-12-07 18:21:25 +00:00
taylor 9baca9bffa try and keep angles within PI2 (Bobboau's advice, since he knows more than I do about this stuff :)) 2006-12-07 18:19:23 +00:00
taylor 302c9c9dd7 add "$Weapons Energy Text:" to hud_gauges.tbl so that the low energy text can be positioned as well (Mantis bug #1166) 2006-12-07 18:17:19 +00:00
taylor afe1af5980 minor cleanups and speedups
when using lighting falloff, be sure to drop emissive light when falloff gets low enough (otherwise we still se everything fine)
2006-12-07 18:16:11 +00:00
taylor 372ea8b793 get rid of "vram_full", it can never actually be full the way the code works, so having this is redundant
comment out APPLE_client_storage extension usage, I think this was messing some stuff up on OS X and causing memory errors
fix handling of cubemap data so that they can be read properly (can't believe it took so long to notice to an obvious and stupid bug)
be sure to un-bind textures during preload to avoid freaky little errors later
ifdef an error message from the framebuffer error code, Apple doesn't have this one define in their headers for some reason
2006-12-07 18:14:49 +00:00
taylor 18e46db629 restore default ambient light values to retail-like settings (I based the previous values on default D3D, which was rather dumb of me)
restore lighting falloff capability from retail and non-HTL modes (only used for asteroids as far as I know)
various cleanups and speedups for dealing with lights
2006-12-07 18:10:16 +00:00
taylor 279ffdde01 get rid of GL_activate and GL_deactivate, it was just Glide ported stuff that we never used and never needed
handle window/fullscreen/minimize changes better, fixes cursor handling mostly (Mantis bug #1146)
don't flush on gamma change, we don't really need to any more
2006-12-07 18:07:51 +00:00
taylor 978e77213f remove now-dead code 2006-12-07 18:04:42 +00:00
taylor a69e9c7017 clean up warning code for Windows
handle messagebox popups better (until I done with even cooler code for handling that)
cleanup window state code a bit, and deal with activation and cursor handling better
handle WM_ERASEBKGND msg ourselves, prevents some flickering issues and gets rid of the need to self-paint the window to clear it
slightly better Win9x/WinME compatibility for the main window
2006-12-07 18:04:03 +00:00
taylor 70d70e3d3f these defines are all the same value, so it's safer to just have one set 2006-12-07 17:59:37 +00:00
taylor 99fd20aff4 comment out some stuff that isn't used
fix cleanup code which didn't really let go of things all the way
2006-12-07 17:58:37 +00:00
taylor 6addcd836d cleanup for movie init stuff (this will be even cleaner once the rest of the Theora code finally gets in)
get rid of the clear screen hack for Windows, we can handle that better now
2006-12-07 17:57:25 +00:00
taylor 0b6542af5a port over some Theora player stuff:
- support for GL_ARB_texture_rectangle
 - fix GL tear-down on movie exit
 - fix sound tear-down order issue on OS X
 - some speed increases, and get rid of the extra gr_clear() per-frame now that it's handled properly
 - proper support for widescreen resolutions
2006-12-07 17:55:51 +00:00
taylor 09481793cf a little clean up for bits of code that isn't used 2006-12-07 17:53:08 +00:00
taylor b794192c70 make fire-on-normal return value a little more obvious
fix the "infinite genius" move I made by breaking turret movements ;)
2006-12-07 17:51:39 +00:00
karajorma 6912ecc04d Fix for Stream weapons not appearing for clients when fired by AI ships in multiplayer. Actual work mostly done by Juke not me 2006-12-01 18:53:55 +00:00
Goober5000 54831f9237 make an error message more descriptive, and allow the new method of parsing subsystem flags 2006-11-28 05:51:03 +00:00
Goober5000 18337f6796 the grammar nazi strikes again!
(and sneaks an extra #define in there while he's at it!)
2006-11-28 05:48:21 +00:00
Goober5000 59bb6494fc prevent false positive while error checking 2006-11-26 03:22:45 +00:00
Goober5000 47337a7b5b if a wing of ships is docked to something, that entire wing must have an arrival cue of false 2006-11-25 07:07:52 +00:00
Goober5000 f317c6906b holy crap, this had the potential to mark the locked-true sexp as known-false, which would seriously screw a lot of stuff up 2006-11-25 06:37:06 +00:00
Goober5000 04e09700b3 this may have been an oversight 2006-11-25 06:33:22 +00:00
Goober5000 5b2d2d9f9d FRED again updates backgrounds while the user is editing them 2006-11-24 22:40:16 +00:00
karajorma 29eb05b140 Fix ammo and weapon SEXP changes not being passed on to the clients 2006-11-21 23:07:27 +00:00
taylor 629b729c2c handle knossos warp effect flip in a slightly better, slighter safer way (Mantis bug #1048, plus a couple that weren't filed) 2006-11-16 01:11:28 +00:00
taylor 1b417cf37a do no culling on the warp effect model_render call properly (doesn't appear to break anything now that it actually set to not cull) 2006-11-16 01:10:47 +00:00
Goober5000 558231662d a much better fix for built-in arrival messages... it needs a new feature to fully work for custom wings though 2006-11-15 04:02:31 +00:00
taylor 579e99c0aa updated outwnd code for both Windows and non-Windows:
- make print filters dynamic
 - fix various little bugs and issues
 - cleanup some non-used variables (non-Windows)
 - put everything under NDEBUG like it was, or should be
 - change to using data/fs2_open.log for log file (Windows)
 - change to using data/debug_filter.cfg (Windows)
 - make the extra debug window optional, and disabled by default (Windows)
 - fix some possible NULL references
 - clean up the SAFEPOINT() crap
2006-11-15 00:54:33 +00:00
taylor 5a99bdc469 handle the video registry entry better
support for new Windows window creation code
various bits of minor cleanup
2006-11-15 00:49:41 +00:00
taylor 015f631591 properly support the updated window create code (all told: should take of of Mantis bugs #542, #624, #1140, and possibly #962 and #1124) 2006-11-15 00:47:57 +00:00
taylor c18fd582b1 new window creation code for Windows (gets rid of some stupid :V: voodoo for the software/glide stuff)
use detect_home() on Windows too (needed for now outwnd code)
some bits of minor cleanup
2006-11-15 00:44:44 +00:00
taylor 3bf7a3f05e fix some "stupid-windows-coder-mistakes" (otherwise known as "putting-more-than-you-should-into-header-files")
(gets rid of some/many compiler warnings, C++ language violations, and strange little bugs/errors)
2006-11-15 00:40:59 +00:00
taylor 3629f70ae8 various bits of little cleanup
add the debug cmdline printer to FRED, so that we can make use of that info in the FRED-debug case too
2006-11-15 00:38:02 +00:00
taylor 44852556c8 various bits of little cleanup
get rid of some more compiler warnings
2006-11-15 00:36:08 +00:00
taylor d673cf06a8 add some needed wing leader checks to prevent Assert()'s and out-of-bounds problems when the leader is dead/dying (Mantis bug #1134) 2006-11-15 00:33:16 +00:00
taylor 5561878d97 clean up skybox model selection and usage to work better with FRED
make sure to go ahead and set the skybox model when it's set/changed in FRED
go ahead and load/set the envmap  when it's set/changed in FRED
get rid of extra envmap image types, only DDS is actually supported (not sure what the hell I was thinking there)
2006-11-15 00:30:10 +00:00
taylor 9f92a1cfee fix the stupid safe_string thing ("LogFile" was already closed by the time it tried to write) 2006-11-15 00:26:03 +00:00
taylor e58edf3358 clean up AVI movie stuff a bit:
- use the default black brush for clearing the screen, it's a little less stupid this way
 - have the AVI player send messages back to the game rather than trying to poll for that extra crap
 - remove the only DivX6 fix, there is better addressed by newer window handling code
2006-11-15 00:24:47 +00:00
taylor b387a086b1 clean up some cmdline options which were/weren't FSO only
add back the "-32bit" option, for retail compatibility (doesn't do anything, it's just there to avoid the unknown option message)
add "-debug_window" to turn on the Windows-only extra debug output window (it's off by default now, only logging to file instead)
2006-11-15 00:21:40 +00:00
taylor 08e6dc4420 fix stupid bay depart object animation bug (Mantis bug #1133, part 2) 2006-11-15 00:19:33 +00:00
phreak 8394c3bc48 two fixes:
1) Fix for mantis #1099, part 2.

2) when changing the player's ship using debug_cycle_player_ship(), initialize the
 primary bank starting capacity so the support ship will rearm it.
2006-11-13 23:29:11 +00:00
phreak 93fc329030 Don't copy parentheses to parse buffers if outside of quotation marks. Otherwise
the parsing syntax will be copied to said buffer and some warnings/errors would occur.
2006-11-13 23:23:26 +00:00
karajorma ad17c71fbe Dragoniz3r's fix for builtin messages not being sent when custom named wings arrive. 2006-11-13 23:09:59 +00:00
karajorma 4578e0feb3 Doh! 2006-11-12 17:52:21 +00:00
taylor 7b2ee718ae fix some of the envmap issues
- use proper hand-ness for OGL
 - fix distortion
 - get rid of extra index buffer requirement
change starfield bitmaps to use an instance matrix rather than going through all the trouble of resetting the view matrix
basic cleanup and get rid of a couple of struct/variable naming issues (compiler sanity)
make double sure that we aren't using culling of z-buffering when rendering starfield bitmaps
2006-11-06 05:26:38 +00:00
taylor 2f4d442616 enable/disable alpha test based on blend mode (found this hidden in an old tree, may help with blending the newer alphablend mode) 2006-11-06 05:21:32 +00:00
taylor 93cee5443e if a submodel anim fails to start then move directly to ready position flag (set it up to do this, just forgot to do it ;)) (fix for Mantis bug #1133) 2006-11-06 05:19:59 +00:00
Goober5000 17c8fa9cbf --prevent the ai from "forgetting" that it's attacking a wing (fix for Mantis #1131)
--move AI_CHASE_WING goal check so that it will properly short-circuit when appropriate (discussed in the same bug)
2006-11-06 03:38:32 +00:00
Goober5000 f4894b83e8 minor bugfixes 2006-11-06 02:20:00 +00:00
Goober5000 8183c6f943 fix is-event-x-delay optional argument type 2006-11-05 18:42:25 +00:00
Goober5000 3a93a75803 improve error message 2006-11-05 18:41:40 +00:00
Goober5000 3718ca3c63 improve error message 2006-11-04 17:22:54 +00:00
karajorma 7b0e4f0582 Fix for Mantis 1017. - Hope we've seen the end of that damn persona bug 2006-11-03 21:26:51 +00:00
Kazan e0671b9427 Absolute speed, not forward speed, for hud speed reticle - fixes the guage for gliding 2006-11-03 18:47:43 +00:00
Kazan 26c85cad93 prevent autopilot initialization while player is gliding 2006-11-03 18:45:11 +00:00
taylor 18aec5d529 Ooopps! ;) 2006-11-01 18:46:22 +00:00
taylor d76c5a0786 make glow_point array for thrusters and glow_point_banks dynamic (a proper fix for old Mantis bug #43) 2006-11-01 18:35:58 +00:00
taylor 88637c628e make "TBL Info" button in ships editor handle modular tables (Mantis bug #1130)
fix bugs where ship names with leading '@' or trailing whitespace didn't get compared properly in "TBL Info"
2006-11-01 15:55:25 +00:00
taylor 34d35592a2 remove Assert() on Viewer_obj for supernova sun processing, it's not really needed and a NULL obj is easily dealt with by the code 2006-11-01 06:15:25 +00:00
karajorma 78d518b748 Adding the network-variable option to SEXP variables. This change will revert variables to the same behaviour they displayed in retail (i.e they don't update for clients) unless a variable is set to be a network-variable. 2006-10-28 21:17:04 +00:00
karajorma d40552aacd Adding the network-variable option to SEXP variables. This change will revert variables to the same behaviour they displayed in retail (i.e they don't update for clients) unless a variable is set to be a network-variable. 2006-10-28 20:54:35 +00:00
taylor 084642b875 forgot to reset default value for Interp_warp_alpha when it was changed earlier
be sure that we are using the proper zbuffer setting when rendering thruster glows
2006-10-28 17:58:42 +00:00
taylor 5efc5af65d forgot this part of the render box fix (obviously no one ever really tried to use this feature, since it has never worked) 2006-10-28 04:01:33 +00:00
taylor a7b8823d82 ok, so apparently that did actually do something ;) 2006-10-28 04:00:09 +00:00
taylor d3b467f231 updated/fixed modelanim code 2006-10-27 21:41:22 +00:00
taylor b54365ddfc more cleanup of warp_global crap
scale render/detail box limits with detail level setting
make sure that we reset culling and zbuffer after each model buffer that gets rendered
2006-10-27 21:37:11 +00:00
taylor f35f3e6319 updated/fixed modelanim code
add ships.tbl subsystem flag ("+fire-down-normals") which will force a turret to fire down it's barrel line (Mantis bug #591)
2006-10-27 21:33:06 +00:00
taylor 12c70eeb33 updated/fixed modelanim code 2006-10-27 21:29:26 +00:00
taylor 906e2a414e add the part of the fix which actually did something ;) 2006-10-27 16:31:09 +00:00
Goober5000 1fff30dfff fix error line reporting (Mantis #1120) 2006-10-27 16:01:49 +00:00
taylor a8dc91f6fb grrr ... fix dos EOL chars 2006-10-27 06:44:35 +00:00
taylor ee5fbe7fce rename set_warp_globals() to model_set_warp_globals()
remove two old/unused MR flags (MR_ALWAYS_REDRAW, used for caching that doesn't work; MR_SHOW_DAMAGE, didn't do anything)
add MR_FULL_DETAIL to render an object regardless of render/detail box setting
change "model_current_LOD" to a global "Interp_detail_level" and the static "Interp_detail_level" to "Interp_detail_level_locked", a bit more descriptive
minor bits of cleanup
change a couple of vm_vec_scale_add2() calls to just vm_vec_add2() calls in ship.cpp, since that was the final result anyway
2006-10-27 06:42:30 +00:00
taylor 3fcb9f0973 add "Render full detail" support to the lab as well 2006-10-27 06:35:29 +00:00
taylor 131f455e53 fix compiler problem due to change in parse_init() function
fix dos EOL chars
2006-10-27 06:34:40 +00:00
taylor f139dd75e8 add a "Render full detail" view option to render models at their full detail for the LOD (for render/detail boxes, Mantis bug #1121) 2006-10-27 06:33:38 +00:00
taylor c555bc2ed4 give the standalone chat box a horizontal scroll capability, not terribly accurate but it's good enough for the purpose (Mantis bug #1095) 2006-10-26 15:46:35 +00:00
Goober5000 5017112221 moved some stuff around in the sexp menus 2006-10-25 01:01:55 +00:00
Goober5000 c400771cd2 clarified this; it was confusing before 2006-10-24 23:56:56 +00:00
Goober5000 db82460af8 make sure to only add the sexp callback once 2006-10-24 23:28:56 +00:00
taylor a5d621d866 add envmap selection to background editor
change skybox selection to be a text entry or browse instead of only text entry
allow envmap selected in background editor to be used by FRED
make texture replacement work in FRED for ships (Mantis bug #1068)
2006-10-24 13:44:54 +00:00
taylor 79d6f127a9 fix the cmdbrief editor deleting the wrong stage (Mantis bug #1115) 2006-10-24 13:41:54 +00:00
taylor 602329ae92 fix loading callback issue in standalone 2006-10-24 13:40:31 +00:00
taylor df0441ab8b don't require hardware GL if running FRED (this is mainly for my benefit since I always forget to add that locally) 2006-10-24 13:39:26 +00:00
taylor 56a01e79e6 fix the envmap-getting-rotated-by-turrets bug (though it did make me chuckle a bit when I first saw it ;))
try to reuse old view setup info, if we are using the same settings again (for speed up purposes, will be a bigger deal when bumpmapping gets here)
2006-10-24 13:38:23 +00:00
taylor baef95fac3 fix Personas memory leak (not really an issue, I just got tired of seeing it in the Valgrind reports) 2006-10-24 13:36:05 +00:00
taylor 80b0663e1b remove a basically useless debug message
fix parse_init() so that it doesn't absolutely have to init sexps (doesn't need them when getting basic info, and causes memory fragmentation otherwise)
fix multiplayer mission info getting to just get basic info (fixes a couple of minor multi issues that were already fixed in single)
2006-10-24 13:34:33 +00:00
taylor 9a9f66153e fix a memory leak that Valgrind was complaining about (happens mainly when you have a mission without a briefing) 2006-10-24 13:31:32 +00:00
taylor 46404f62f9 a LOT of cleanup:
* remove a bunch of old/dead code
 * some reformatting to help with readability
 * rearrange/rename some code so that it is a little clearer
 * move thruster glow code to it's own function (model_render_thrusters())
make HTL model buffers dynamic
fix detail boxes so that they actually work for the first time
2006-10-24 13:29:16 +00:00
taylor e932bffa88 various bits of cleanup (slight reformatting to help readability, remove old/dead code bits, etc.)
deal with a index_buffer memory leak that Valgrind has always complained about
make HTL model buffers dynamic (get rid of MAX_BUFFERS_PER_SUBMODEL)
get rid of MAX_BUFFERS
make D3D vertex buffers dynamic, like OGL has already done
2006-10-24 13:24:12 +00:00
taylor 68b3da5f24 fix for Mantis bug #1104 (can't use a ":" in chat) 2006-10-24 13:18:35 +00:00
taylor f341699255 various bits of cleanup (warning messages, things that Valgrind complained about, etc.)
fix an out-of-bounds issue on Sexp_nodes[] which was leading to stack corruption
2006-10-24 13:17:24 +00:00
karajorma 626e99fdd6 Fix Int3() with Set primary and Secondary ammo\weapons 2006-10-21 21:57:08 +00:00
wmcoolmon f9fd96a611 Fixx0r FRED 2006-10-20 20:37:42 +00:00
wmcoolmon 5ddcc40624 Fix extra jumpnode settings not saving. They still don't show up in FRED, unfortunately. 2006-10-15 22:03:16 +00:00
Goober5000 cd5419dff8 better safety check 2006-10-15 00:41:01 +00:00
wmcoolmon 2e6493ecbb Fix Freecamera forcing HUD draw bug. 2006-10-11 03:10:53 +00:00
Goober5000 4b35e5aa21 betterized some things with mission arrivals and departures 2006-10-09 20:50:13 +00:00
Goober5000 033166534f make sexp nodes dynamic 2006-10-09 05:25:18 +00:00
Goober5000 6e9d133cfe preliminary commit of sexp node bump... fred only, just changing some names for clarity 2006-10-09 04:44:58 +00:00
Goober5000 998c04d53f bah! 2006-10-08 05:24:03 +00:00
Goober5000 ff14e80d2b nitpick 2006-10-08 05:21:44 +00:00
Goober5000 412fbee155 fix forum links 2006-10-08 02:05:38 +00:00
Goober5000 f91892c415 bypass annoying warnings for nonexistent bitmaps 2006-10-07 02:43:46 +00:00
karajorma 4930324547 Fix for Mantis 1092 - (Support ships damage hull) 2006-10-06 15:12:55 +00:00
Goober5000 ca72d1b77e <nelson> Ha, ha! </nelson> 2006-10-06 13:41:41 +00:00
taylor 935b02bbfd handle another null vec warning which can happen during a multiplayer respawn or certain death sequences (Mantis bug #1090) 2006-10-06 10:04:03 +00:00
taylor 133b6ce817 clean up some old software rendering stuff that we don't use any longer
remove grzbuffer.*, since all it did was give us 3 variables, which were moved to 2d.*
2006-10-06 09:56:42 +00:00
taylor 93e4868abc For redalert stored data be sure that dead ships don't come back, and departed ships come back just as they left (Mantis bug #810) 2006-10-06 09:47:11 +00:00
taylor a96dfcc458 make sure that the armor stuff gets initted (should fix Mantis bug #1080) 2006-10-06 09:44:32 +00:00
wmcoolmon 960addaaa8 Fix OGG bug where sound files were always allocated 16 seconds of wavedata 2006-10-06 04:58:25 +00:00
taylor 2a19de72ae meant to do this before but forgot about it (just replaced "(4.0/9.0) * PI" with it's result) 2006-10-01 19:31:19 +00:00
taylor 8d55c6c862 if shockwaves weren't loaded then don't try to unload them (fixes standalone crash) 2006-10-01 19:29:35 +00:00
taylor 68f60a7b21 make sure Multi_create_bitmap is initialized properly since it might not be otherwise in standalone 2006-10-01 19:28:28 +00:00
taylor ac04873057 fix for the "branch" bug (still a minor usability issue however, see Mantis bug for details)
add a popup to the loopbrief screen when you press ESC, so that we can either accept or decline the loop offer
2006-10-01 19:27:28 +00:00
taylor 7eb4f0fa02 bit of cleanup (technically the vertex buffer stuff is part of a much larger change slated for post-3.6.9, but this should be a little faster) 2006-10-01 19:24:46 +00:00
taylor 61c9916549 re-fix this crap that I managed to break last time (was Mantis bug 1066 I think) 2006-10-01 19:22:15 +00:00
Goober5000 ddc7105a60 check that targetview model files exist as well 2006-10-01 18:53:59 +00:00
karajorma 71d93ce305 Fixing some ugliness when the popup appears 2006-10-01 08:34:43 +00:00
Goober5000 1b86d4cb62 more accurate message number 2006-10-01 06:18:36 +00:00
Goober5000 6291a459c0 fix crlf 2006-10-01 00:54:29 +00:00
Goober5000 3f2a102c57 more flexible checking of generic messages 2006-09-30 21:58:09 +00:00
Goober5000 2e6a771097 fix for Mantis #1070 2006-09-28 23:47:25 +00:00
taylor ac0dc14418 more standalone server fixes:
- add some basic bmpman functionality to grstub, since it needs to do something at least
 - add missing gr_* function ptrs to grstrub
 - (re-)enable radar and hud setup functions that used to crash (problems are fixed now)
 - deal with default pilot file properly (also caused a bmpman headache)
 - don't bother with Multi_common_icons[] in standalone mode (they don't load, so don't let them unload either)
2006-09-24 22:55:17 +00:00
taylor 364a550e43 clean up the function ptrs so that it's a bit easier to read 2006-09-24 22:54:24 +00:00
taylor f3c98b5780 move FS2NetD connection checks to *after* it tries to connect ;) (Mantis bug #1065) 2006-09-24 13:32:47 +00:00
taylor 2f3e898149 fix for deletion of multiplayer pilots (Mantis bug #1066) 2006-09-24 13:32:11 +00:00
taylor b2df61fb89 minor clean and code optimizations
clean up view/proj matrix fubar that made us need far more matrix levels that actually needed (partial fix for Mantis #563)
add debug safety check to make sure that we don't use more than 2 proj matrices (all that GL is required to support)
set up a texture matrix for the env map to that it doesn't move/look funky
2006-09-24 13:26:01 +00:00
taylor 4d11165168 fix SAFE_STRCAT() so that it can work in an if() statement that doesn't have braces 2006-09-24 13:22:38 +00:00
taylor 2fddb0e9fb small optimizations and code cleanup
use the real frametime for FPS counter stuff, no reason to deal with time compression there (Mantis bug #1058)
2006-09-24 13:21:33 +00:00
Goober5000 28ae8be436 more descriptive warning message for docking paths 2006-09-20 05:19:02 +00:00
taylor dc4ce7a415 add some extra FS2NetD safety checks around to prevent the code from doing stupid crash-happy things 2006-09-20 05:05:28 +00:00
taylor ef898c40c0 have the joystick thread prevent the display and network from going to sleep or activating the screensaver if you use only a joystick to play 2006-09-20 05:05:07 +00:00
taylor 32f199092a the resolution checks needed to be based on the unscaled res since you would have to include correct sizes for every single resolution otherwise (fixes a bug noticed in WCS) 2006-09-20 04:59:29 +00:00
taylor c29bd2128d some gamma ramp fixage, still hasn't gotten a steller review from DaBrain but it does work much better than before, so I'll tweak it later if need be 2006-09-20 04:58:13 +00:00
taylor 26ff7db6d1 neither of these two structs appear to be used anywhere, so lets just comment them out 2006-09-20 04:56:36 +00:00
taylor 6863c44747 some basic error message/handling fixage 2006-09-20 04:55:48 +00:00
taylor 2f30cd99d4 properly support 4gig of RAM, and don't totally freak out if user has more than that 2006-09-20 04:55:12 +00:00
taylor 8d158808a9 properly fix the new_recommendation_text FRED problem, plus some real cleanup for that code in general, and some memory leak fixes 2006-09-20 04:53:53 +00:00
taylor ae6796f8fd add default recommendation text for debriefing, it's either this or making sure that it's nul 2006-09-14 23:29:47 +00:00
taylor 3add53f2ed prevent FRED from hitting an Assert() that it shouldn't have had to hit in the first place 2006-09-14 18:48:17 +00:00
taylor 53ec81e9fe fix for Mantis bug #1006 2006-09-13 17:30:25 +00:00
taylor ed38b12b7b bah! stupid. 2006-09-13 03:50:07 +00:00
taylor 7e697a5780 might as well add this, just to be on the safe side (I haven't hit it anywhere, but it could be made into a warning if it starts getting hit) 2006-09-13 03:12:35 +00:00
taylor c1a80972a1 be sure to setup/reset ship team data too when moving to a red-alert mission (Mantis bug 1042)
(this will hopefully fix Mantis bug 860 as well, which is a separate but related issue)
2006-09-13 03:11:09 +00:00
taylor b3c6dc7618 be sure that we still try to play a movie if we get to the cmd/brief screen right from another mission without debrief (Mantis bug 1043) 2006-09-13 03:08:09 +00:00
taylor f46ac6cbf3 restore MAX_AIFTT_TURRETS to retail level, and add comment as to what it means for the next person that tries to change it 2006-09-13 03:06:46 +00:00
taylor a2dc76abf8 revert to retail behavior for turret_should_pick_new_target()
fix out-of-bounds issue
2006-09-11 09:43:35 +00:00
taylor 52d8b00c04 fixes for stuff_string() bounds checking 2006-09-11 01:17:07 +00:00
taylor cd33d9407a fixes for stuff_string() bounds checking
stict compiler build fixes
2006-09-11 01:12:50 +00:00
taylor ae21e32983 compiler warning fixes 2006-09-11 01:10:00 +00:00
taylor f54f5bd1de fix bug where set-object-speed-* could set speed subjectively if left to default 2006-09-11 01:09:33 +00:00
taylor 506c0da81e fixes for stuff_string() bounds checking
compiler warning and stict compiling fixes
2006-09-11 01:06:20 +00:00
taylor e548b8af47 fixes for stuff_string() bounds checking
compiler warning fixes
2006-09-11 01:04:20 +00:00
taylor 3c8ce6b305 fixes for stuff_string() bounds checking
make sure that default entries always get used in techroom if they don't otherwise have the techroom visibility flag
fix crash bug where the first entry in the various lists wasn't ever initialized if there is no ship/weapon/intel info to show
2006-09-11 01:03:23 +00:00
taylor f0a3f143c6 various small compiler warning and strict compiling fixes 2006-09-11 01:00:28 +00:00
taylor 38de07195b be sure to reset color and clear color before MVE playback (fix for Mantis bug #1041) 2006-09-09 21:28:19 +00:00
taylor 95bb40ca75 fix for vanishing FRED2 cursor (Mantis bug #997), plus a little cleanup 2006-09-09 04:07:57 +00:00
taylor 2399d31c55 fix things that strict compiling balked at (from compiling with -ansi and -pedantic) 2006-09-08 06:14:44 +00:00
taylor 70215ee67a fix for Mantis bug #1038 (glow point bank storage being wrong after changing ships in shipselect)
fix things that strict compiling balked at (from compiling with -ansi and -pedantic)
2006-09-08 06:13:29 +00:00
taylor e2a01035ea small optimization 2006-09-08 06:11:06 +00:00
taylor 5b705ad00c fix for Mantis bug #617 (with a very big assist from Shade who did most of the initial work on this) 2006-09-08 06:10:34 +00:00
taylor 0a837ae868 lower client/server version back to retail level, there was no reason to bump it in the first place 2006-09-08 06:09:05 +00:00
taylor d3828acd3e add support for a server name in fs2open_pxo.cfg, rather than just an IP address for the server 2006-09-08 06:07:59 +00:00
taylor 710be36ddf fix for Mantis bug #687 (at least until better swarming code can be written, post-3.6.9)
a quick speed/sanity check for turrets to be sure that they actually have a weapon to fire before processing them
2006-09-08 06:06:34 +00:00
Goober5000 34151d5f8d fix macros 2006-09-04 18:06:37 +00:00
Goober5000 67a394375d fix waypoint time to goal 2006-09-02 20:24:15 +00:00
Goober5000 dbf57b6464 remove unnecessary warning 2006-09-02 20:07:39 +00:00
taylor 86efe162a9 crap, there was supposed to be a multi check there 2006-08-29 21:32:25 +00:00
taylor 3777e3aca8 allow W32 init fallback if desktop depth is less than requested game depth (it may look like crap, but at least it will work) 2006-08-29 07:27:43 +00:00
taylor b33729d50f stupid, stupid, stupid...
- fix AVI/MPG movie playback
 - fix missing campaign craziness
2006-08-28 17:14:52 +00:00
taylor 1eaf51858f bah! got the post-it sitting in front of me, but still forgot to remove this 2006-08-28 06:19:56 +00:00
taylor 8de3f88319 make Species_info[] and Asteroid_info[] dynamic 2006-08-27 18:12:42 +00:00
taylor d601f0ae2f quite a few fixes to handle missing campaigns better
change load order for campaign loading to a full check: Player-specified -> BUILTIN_CAMPAIGN -> First Avaiable.
clean up the getting of a list of available campaigns
fix simroom issue where single missions, with the [V] icon, would display wrong (this was a retail bug, but it doesn't show normally)
fix bug where, if a campaign failed to load, it would still appear available for savefile useage
fix bug where, when resetting the campaign info, the num_missions var wasn't 0'd and it could cause a sexp Assert() during reset
2006-08-27 18:11:37 +00:00
taylor a8fcfcb58c fix a compiler warning/error on Squadmsg_history[] init 2006-08-27 18:04:24 +00:00
taylor 2b9333be28 forgot an extension check (was this the background corruption bug???) 2006-08-27 18:03:29 +00:00
taylor d2b67e868d switch to using cf_find_file_location_ext() when looking for movies 2006-08-27 18:02:26 +00:00
taylor b7aa349e26 various small cleanup and speedup changes
add a cf_find_file_location_ext() function, which you can pass a filename and a list of extensions and it will search for all of them at once
2006-08-27 18:01:45 +00:00
karajorma 1573a9c10e Fix TvT problem with scores appearing incorrectly.
Fix a CVS issue
2006-08-25 21:15:31 +00:00
karajorma f782577d47 Fix lack of Wingman Status indicator for Zeta wing in TvT games. 2006-08-25 21:09:59 +00:00
taylor 5bf20522d9 crap. 2006-08-23 16:15:46 +00:00
taylor 11abf5fe7f make muzzle flash info dynamic
add support for modular mflash tables (*-mfl.tbm)
2006-08-22 05:50:12 +00:00
taylor b4f4cf01be add font.h since the gr_set_font() function is only available from there now 2006-08-22 05:48:46 +00:00
taylor 0e261071e1 don't try to draw beam sections if there is no valid texture for it, or if there is no width 2006-08-22 05:47:51 +00:00
taylor 03ca395f74 make sure that we properly page in textures for 3d shockwave models 2006-08-22 05:47:00 +00:00
taylor 6bce1d5b20 compiler warning fixes 2006-08-22 05:45:39 +00:00
taylor 53ad9891a5 some fixes for the standalone server
- get init order correct for lcl and std init
 - turn off some cmdlines that are just graphics related when Is_standalone
 - skip radar_mission_init() (may need to rethink that though, it's bound to cause problems)
2006-08-22 05:45:15 +00:00
taylor b3512ee533 minor spelling/grammer fixes 2006-08-22 05:42:56 +00:00
taylor 2fdec305ab clean up the grstub mess (for work on standalone server, and just for sanity sake)
move color and shader functions to 2d.cpp since they are exactly the same everywhere
don't bother with the function pointer for gr_set_font(), it's the same everywhere anyway
2006-08-22 05:41:36 +00:00
Goober5000 cadfb87ab5 disable duplicate model texture replace 2006-08-19 21:46:05 +00:00
Goober5000 2109c1da8b if a modular table ship pof cannot be found, use the original one 2006-08-19 21:45:20 +00:00
taylor 302435b9f4 maybe optimize the (PI/2), (PI*2) and (RAND_MAX/2) stuff a little bit 2006-08-19 04:38:47 +00:00
taylor d2cc48b840 slight math optimizations
reduce COUNT_ESTIMATE since I added more game_busy() calls for models and it threw off the loading bar
2006-08-19 04:37:00 +00:00
taylor ea5f4031cc slight optimizations
fix AI shields to not get overly charged or overly drained when AI does equalize (it's closer to player now, but still within retail intent of function, I think)
2006-08-19 04:35:04 +00:00
taylor 04d516eab5 slight optimizations
compiler warning fixes
2006-08-19 04:33:00 +00:00
taylor 121f361e00 clean out some crap that we don't really need 2006-08-19 04:32:11 +00:00
taylor 642cff6cc3 cleanup
bugfixes
error-handling
(lots of crap got fixed to work better, and lets leave it at that, the commit log would be too long otherwise :))
2006-08-19 04:31:24 +00:00
taylor 0442052981 very slight speed optimization to avoid math that we really don't need to do anyway 2006-08-19 04:29:08 +00:00
taylor 8f0f69f677 add custom IP option to maybe help get around NAT issues (I haven't heard whether this actually works or not yet though, but it's been out for testing all week) 2006-08-19 04:28:22 +00:00
taylor bdfc210e99 add render option for no glowmaps
remove render option for fog (why was this even there??)
add tech model view for missiles with special tech models (will hopefully help spur some work towards fixing the currently broken models)
handle Z-buf issue that made the lab interface disappear when the transparent render option was ticked
2006-08-19 04:26:32 +00:00
taylor 276f3e2e5d OMG! MEMLEAK!!!! (maybe no one will notice that it was my fault ;)) 2006-08-19 04:23:56 +00:00
taylor debc5e556a an int wrap-around issue could (and was) make debris not have electrical arcs (or lighting or sounds) since it would always fail this check 2006-08-19 04:22:33 +00:00
taylor 5d18482d1d ever so slight speed up for bm_set_components_* (this crap is slow, and it's called a LOT) 2006-08-19 04:20:22 +00:00
taylor bc99b0ff2c "byte" was the same as "ubyte", but since "byte" has to be an extra #define on everything but Windows, lets just get rid of it 2006-08-19 04:16:49 +00:00
taylor 9abfea9299 add decoder for 8-bit MVEs
a basic fix for finding AVIs over MVEs, for mod dir stuff (this needs some CFILE support added to be a true fix, it's on the TODO list)
little bits of cleanup for old/unused code
make sure MVE filenames are correct in mvelib
2006-08-19 04:14:57 +00:00
karajorma 2cae7d55ca More typos revealed while trying to merge changes to the HEAD branch! 2006-08-18 17:48:39 +00:00
karajorma 08f7a66ae3 More cut & paste errors fixed and removal of the hardcoded warp out animation. Will now actually use the one specified in the table. 2006-08-18 17:21:10 +00:00
Goober5000 f41254ed81 better handling of ballistic rearm sounds
--Goober5000
2006-08-18 04:34:59 +00:00
karajorma d96b5729f0 Doh! Minor fix 2006-08-16 16:47:55 +00:00
karajorma 9d63024586 Another typo 2006-08-15 20:00:51 +00:00
karajorma 688a57f187 Fixed a silly typo which breaks team-score 2006-08-15 19:24:09 +00:00
Goober5000 cf847298b7 nitpick 2006-08-14 22:02:43 +00:00
Goober5000 2288100bb6 extremely minor optimizations 2006-08-14 21:59:14 +00:00
karajorma 3f1022da51 Fix a Multiplayer bug where anything that included the name of a player wing was automatically considered to be a part of that wing. 2006-08-14 19:58:42 +00:00
taylor 3755f79a2f some minor cleanup to anisotropy setting
only use negative lod bias when not using anisotropy to help avoid shimmering
stick lod bias setting in with anisotropy function
2006-08-12 13:14:45 +00:00
taylor 28e753cd53 default to 44100 sound sample rate (OpenAL tends to works much better with this) 2006-08-12 01:17:08 +00:00
karajorma 41c4c94302 Fix Mantis 1009 - A problem with using the Change-ship-model SEXP 2006-08-09 17:39:46 +00:00
taylor 3808d16349 fix for setting of texture lod bias 2006-08-09 14:42:24 +00:00
taylor 08d7b12ff5 very small math optimization 2006-08-09 14:41:44 +00:00
Goober5000 e97af1d7f9 fix spin control association
--Goober5000
2006-08-07 23:25:37 +00:00
karajorma 111116bf19 Fix a small problem with ballistic primary ammo. Forgot to upload this one earlier 2006-08-07 15:11:33 +00:00
Goober5000 c3750ca4f8 deprecate change-ship-model 2006-08-06 19:27:13 +00:00
Goober5000 1986983bbb make these consistent (pitch-bank-heading is the established order)
--Goober5000
2006-08-06 19:06:42 +00:00
Goober5000 21ce8a51cd add the multiple background feature
--Goober5000
2006-08-06 18:47:29 +00:00
karajorma fa020d32ca Hopefully plug the possible memory leaks from not calling common_select_close() in red alerts and when exiting mission briefings 2006-08-05 10:40:22 +00:00
karajorma db5d8f8c79 Remove common_select_close(). This should be handled in freespace.cpp 2006-08-05 10:37:51 +00:00
karajorma 7c6c047af2 Fix a multiplayer crash if the server committed before the 2nd team captain unlocked. 2006-08-04 19:13:38 +00:00
karajorma bfe1fe160a Stop multiplayer campaigns crashing if the campaign lacks a description 2006-08-03 17:55:01 +00:00
karajorma 62d1baedaa Added new packed to deal with a bug in multiplayer where using end-mission would only end the mission for the server and then force the clients to jump out. 2006-08-03 16:24:23 +00:00
karajorma 63c2b241d7 Let's try this again. - Added new packed to deal with a bug in multiplayer where using end-mission would only end the mission for the server and then force the clients to jump out. 2006-08-03 16:22:24 +00:00
karajorma 157ad27238 *** empty log message *** 2006-08-03 16:03:54 +00:00
Goober5000 3b2152daad add a second method for specifying ship copies, plus allow the parser to recognize ship class copy names that aren't consistent with the table
--Goober5000
2006-08-03 01:33:56 +00:00
Goober5000 0f7e26a03f fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:47:40 +00:00
Goober5000 2e5b7e0fbd fix display of ship copy class names in ship loadout screen
--Goober5000
2006-08-02 22:31:15 +00:00
karajorma 69c5de6c55 Fix for Mantis 1020.
ship-subsys-guardian-threshold will now include subsystems without you having to type them in.
2006-07-31 21:09:10 +00:00
Kazan 7db33a3767 resolve 1018 and an interface problem in fred2's ship editor 2006-07-30 20:01:56 +00:00
Goober5000 4533eba002 bah, revert 2006-07-30 02:20:17 +00:00
Goober5000 b6eb8e3934 stage 1 in multiple-background feature
--Goober5000
2006-07-30 00:23:30 +00:00
taylor 574fae25bd check first stage warp arrival against all docked objects so we can not render them all if even one is 1st stage 2006-07-28 02:46:10 +00:00
taylor 2f8109a58d when in external (non-control) view be sure to not include time compression speed in camera movement 2006-07-28 02:45:34 +00:00
taylor 321c9c6866 don't render extra lighting passes when fog is enabled, prevents fog fragment from getting added for each pass
wobble wobble no more!!
2006-07-28 02:45:10 +00:00
taylor 37a16df0b4 switch from Assert() to basic error fixage for end-of-string white space check 2006-07-28 02:44:40 +00:00
taylor 5aec701448 include CF_TYPE_PLAYERS in special pilot path consideration, prevents moddirs from always getting and empty data/players/ 2006-07-28 02:44:17 +00:00
taylor 7283c36acb don't lowercase the dir for chdir on non-Win32 since it could be, and probably is, case sensitive 2006-07-28 02:43:48 +00:00
Kazan bddd8fa81c Lock player primaries during autopilot 2006-07-27 19:17:59 +00:00
karajorma 92360994b3 Fixed an error in ballistic weapons where only the server got the correct number of bullets in multiplayer.
Fixed a rounding up error in get_max_ammo_count_for_primary_bank()
2006-07-27 10:37:43 +00:00
Kazan 8c9f862ff1 resolve SVN 1011 2006-07-26 15:04:04 +00:00
Kazan 6d8f59bf85 small optimization 2006-07-26 15:01:07 +00:00
Kazan 762b2df6fe Resolve Mantis #1010 2006-07-26 14:53:38 +00:00
taylor 1c6b32917c support for cmdline option stacking (a per option setting) so that things like "-mod derelict -mod mediavp" will end up as "-mod derelict,mediavp" to the game
fix bug where white space chars didn't get dropped from the end of a option string like they were supposed to
allow for something like "-ambient_factor 100 -ambient_factor 70" to use the proper value, the last one specified, rather than just accept the first instance
2006-07-25 16:26:24 +00:00
taylor 3bd7455567 minor cleanup/optimization to beam warmup glow rendering function
various lighting code cleanups
 - try to always make sure beam origin lights occur outside of model
 - make Static_lights[] dynamic
 - be sure to reset to first 8 lights when moving on to render spec related texture passes
 - add ambient color to point lights (helps warp effects)
 - sort lights to try and get more important and/or visible lights to always happen in initial render pass
2006-07-24 07:38:00 +00:00
Goober5000 2d4376fca9 fix a subtle and nasty bug
--Goober5000
2006-07-24 02:09:29 +00:00
Goober5000 03853bdbe3 fix for Mantis #1003
--Goober5000
2006-07-23 16:58:28 +00:00
taylor dbbba5a36a minor changes to game_busy() debug text
- don't alloc it for bmpman, and make sure to only call on textures that we are loading
 - add text for model loading, gets rid of the long-wait issue when it appears to not be doing anything early on
2006-07-21 16:08:32 +00:00
taylor f5d0ec735a little cleanup 2006-07-21 16:08:03 +00:00
Goober5000 9a3d8891bd add another method for calculating dimensions of docked objects, plus improve an existing one
--Goober5000
2006-07-21 05:41:10 +00:00
Goober5000 cc9432c556 fix help text
--Goober5000
2006-07-21 05:38:41 +00:00
karajorma c9ceea2a3d Fix for Mantis 996 2006-07-20 21:15:11 +00:00
karajorma 85d6ab8f28 Fix for Mantis 888. 2006-07-20 20:41:31 +00:00
Goober5000 88d1e28879 tweak control text
--Goober5000
2006-07-20 01:51:20 +00:00
Goober5000 a47246a577 add WCS screaming stuff to RC branch
--Goober5000
2006-07-20 00:41:26 +00:00
taylor 6256ddd4ba make glow point banks dynamic 2006-07-17 01:12:52 +00:00
taylor 59ee5a83b1 fix some missile autocentering issues
- use MR_AUTOCENTER and MR_IS_MISSILE flags to generate an autocenter for a missile if one doesn't already exist
 - don't try to autocenter loadout icons when rendered 3d
2006-07-17 01:12:19 +00:00
taylor 6278c4dd24 maybe this will finally shut-up some of the people who have complained about certain mipmap issues 2006-07-17 01:11:32 +00:00
taylor 51b8204608 only do i2fl() on the font bitmap once per string rather than doing it per-letter (basically unnoticable performance boost)
before doing alpha channel check, make sure the bitmap is valid, since it doesn't actually catch that until later in the texture code
2006-07-17 01:10:45 +00:00
Goober5000 8697299d25 move WMC's preload stuff into main preloader routine 2006-07-17 00:50:00 +00:00
Goober5000 4c42104c79 stage 2 of animation fix (add base frame time to each ship)
--Goober5000
2006-07-17 00:10:05 +00:00
taylor 71a113385a missed the extern apparently 2006-07-15 18:16:00 +00:00
taylor d00e5b4a48 we probably need to be processing the number of weapons here rather than the number of ships ;) (Mantis bug #988) 2006-07-15 15:51:19 +00:00
taylor 2ed50f6409 change clamp mode for font/interface graphics, don't want the border factored in for scaling/filtering 2006-07-15 06:11:27 +00:00
taylor e3c0980a8e add missing stub for game_get_overall_frametime() 2006-07-14 03:50:31 +00:00
taylor eed0bec6f7 fix for animated texture map issues (*part one*), this should be faster than before too, and fix inf-loop/div-by-0 issues 2006-07-13 22:11:37 +00:00
taylor e85a0afce3 change compiler optimizations a little for release builds, use "Maximize Speed" setting, since it's basically using debug optimizations otherwise 2006-07-13 22:09:21 +00:00
taylor f75d45cd60 fix for network afterburner support, this one should be compatible with all previous versions 2006-07-13 22:08:10 +00:00
taylor 7a0668b964 handle non-MVE movies a bit better in OpenGL (don't get freaky with the window, don't lose input, etc.)
some cleanup to OpenGL window handling, to fix min/max/full issues, and try to make shutdown a little nicer
2006-07-13 22:06:38 +00:00
Goober5000 e1aea79394 * better formatting for substitute music options
* better handling of all special FSO comment tags
--Goober5000
2006-07-13 06:11:52 +00:00
Goober5000 eb92ba75f1 prevent labels from overlapping widgets 2006-07-13 06:10:22 +00:00
taylor 803bdbbd97 fix the endless-loop fix ;) (this is what broke shield recharging btw) 2006-07-12 04:59:03 +00:00
karajorma f5cd36dbfa Fix afterburner trails in multiplayer (Mantis 895) 2006-07-11 23:17:03 +00:00
taylor 0d32c3eb56 fix undo system
restore the two autosave points that got removed for some reason (yes, these are needed for things to work properly)
2006-07-10 21:48:33 +00:00
Goober5000 7b43ad28d9 bah, make sure we're in the correct mode 2006-07-09 06:12:37 +00:00
Goober5000 85ff6cc9f8 tweak max speed function
--Goober5000
2006-07-09 06:07:20 +00:00
Goober5000 6297d0b9d2 ugh... FS2_VOICER isn't actually defined at this point, for some reason... but it looks like phrases.cfg will always be generated, so it should be okay to take these #ifdefs out
--Goober5000
2006-07-09 03:18:15 +00:00
Goober5000 2860b6c303 this shouldn't actually be in CVS; it's produced during the build process
--Goober5000
2006-07-09 02:36:05 +00:00
Goober5000 be18810cdb iff defs should allow specification of both flag fields
--Goober5000
2006-07-08 19:36:04 +00:00
taylor bd959e9193 remove -allslev
make CTRL-SHIFT-S hotkey work in mission simulator (it's a toggle, so you can turn it on or off while on the screen)
fix a bug where blank lines would show up in the campaign list for branch/alternate type missions that are otherwise marked as not completed
2006-07-08 18:11:33 +00:00
taylor 9d6c618203 require OpenAL 1.1 under Windows, I think it's causing problems for us to mix users with 1.0 and builds for 1.1
(having 1.0 is fatal to sound, but the game should still work, a corresponding Launcher change goes with this too)
clean up some of the error messages to not say "DirectSound" is doing this or that, just say "Audio" instead
2006-07-08 18:10:59 +00:00
taylor 4e1269283a debug-build-only issue, make sure that thrusters are properly enabled if needed for POF based weapons when using cheat keys 2006-07-08 11:30:40 +00:00
taylor 777915a444 hopefully this should get missile viewing working decently again 2006-07-08 11:30:13 +00:00
Goober5000 f329be0003 fix for Mantis #967
--Goober5000
2006-07-08 04:53:29 +00:00
taylor f45c9b51c6 make sure to reset the optional maps after each buffer render (little scary that this wasn't noticed a long time ago) 2006-07-07 16:26:44 +00:00
karajorma d82ddf511c Fix for Mantix #959. Campaign editor shouldn't crash on finding an empty mission list any more. 2006-07-06 23:48:43 +00:00
taylor b637dfe340 some better handling of OpenAL errors during init 2006-07-06 21:56:18 +00:00
taylor db2c7b2722 add some minor error catches for invalid values 2006-07-06 21:55:38 +00:00
taylor fcfac587c3 more big-endian fixage (seriously hope this is the last of it) 2006-07-06 21:54:59 +00:00
taylor 820543adde rest of the map/glow changes
- put glowmap activity back on a per-ship basis (via a SF2_* flag) rather than per-model
 - same for glowpoints, back on a per-ship basis
 - put specmaps and bumpmap back on a LOD0 and LOD1 affect (got changed to LOD0 only recently)
 - fix glowmaps for shockwaves again
 - add support for animated specmaps (mainly for TBP and Starfox mods)
some minor code cleanup and compiler warning fixes
2006-07-06 21:53:59 +00:00
taylor 12eff0ca31 add a render option to make the model not spin around, easier to work with in some cases, and better screenshots 2006-07-06 21:49:12 +00:00
taylor 98c53063bf newline fixage 2006-07-06 21:47:38 +00:00
Goober5000 10bf7f6742 fix ship type bug that Taylor mentioned
--Goober5000
2006-07-06 21:24:36 +00:00
Goober5000 6dcfedfa5e add CVS headers
--Goober5000
2006-07-06 21:23:28 +00:00
Goober5000 22ee5941ae fix dumb endless loop bug
--Goober5000
2006-07-06 18:19:59 +00:00
Goober5000 c90998d45b fix subtle change from retail... dunno if it's a bug, but best to stay on the safe side
--Goober5000
2006-07-06 06:04:51 +00:00
Goober5000 bcf98e9c53 fix for Mantis #856
--Goober5000
2006-07-06 05:35:13 +00:00
Goober5000 2ff42b3f8a commented annoying redundant warnings
--Goober5000
2006-07-06 05:29:57 +00:00
Goober5000 e8ef7b2dd3 GAH - repair a borked commit (plus a couple of typos)
--Goober5000
2006-07-06 04:20:34 +00:00
Goober5000 d6ad99d0a1 1) complete (almost) changeover to reorganized texture mapping system
2) finally fix texture animation; textures now animate at the correct speed
--Goober5000
2006-07-06 04:06:04 +00:00
Goober5000 167e8499ac fix for Mantis #571
--Goober5000/Backslash
2006-07-05 23:48:20 +00:00
Goober5000 65b1fbf5d6 spelling 2006-07-05 23:41:43 +00:00
Goober5000 c6e35651fc cvs comment tweaks 2006-07-05 23:37:13 +00:00
Goober5000 5803ad9715 forgot this yesterday 2006-07-04 22:22:52 +00:00
Goober5000 718558f853 --in preparation for fixing an annoying animated texture bug, reorganize the various texture structs and glow point structs and clarify several parts of the texture code :P
--this breaks animated glow maps, and animated regular maps still aren't fixed, but these will be remedied shortly
--Goober5000
2006-07-04 07:42:50 +00:00
karajorma af6451eedf Restore the Hostile Warning triangles and the "On your Six" warning messages. 2006-07-02 22:53:53 +00:00
Goober5000 8c0574c39e bah 2006-07-02 04:13:43 +00:00
Goober5000 3463f876f0 remove associated AI flags
--Goober5000
2006-07-02 03:39:55 +00:00
Goober5000 7f15c14405 okay, I have no idea what I was doing there
--Goober5000
2006-07-02 03:34:16 +00:00
Goober5000 43b9ada185 fix the "Game of TAG" bug; hopefully this won't unfix something else
--Goober5000
2006-07-01 00:30:51 +00:00
Goober5000 4d1031fb9c restore compatibility with retail ship types
--Goober5000
2006-06-28 00:46:00 +00:00
taylor f8733691bf add in Goober's new files 2006-06-27 04:22:26 +00:00
taylor 7999d2f5af account for some minor floating point error in the undock speed check 2006-06-27 04:22:03 +00:00
Goober5000 1fb53b1a5d add new files to project 2006-06-27 04:12:27 +00:00
Goober5000 9e41f2e4ba bah 2006-06-27 04:10:50 +00:00
Goober5000 da2a5368be cvs header tweak
--Goober5000
2006-06-27 04:10:49 +00:00
Goober5000 7729b09354 handle docked objects during death roll
--Goober5000
2006-06-27 04:10:48 +00:00
Goober5000 6d6689b72a fix comment in preparation for code commit
--Goober5000
2006-06-27 03:55:22 +00:00
taylor 29af4691e7 Repeat after me: "Test build before/after commit.", "Test build before/after commit."
(there's no reason this should have happened for yet a third time in as many weeks)
2006-06-27 03:10:26 +00:00
Goober5000 3fc20520b4 slight optimization
--Goober5000
2006-06-27 02:38:49 +00:00
Goober5000 64c1aa3279 change back to ubyte
--Goober5000
2006-06-26 17:31:49 +00:00
wmcoolmon d0ba556741 New function for scripting 2006-06-24 20:39:57 +00:00
wmcoolmon 657899dd70 Fix loadTexture; fix subsystem indexing; fix getNum() for weaponbanktype; improve missing function error reporting when using LUA_INDEXER 2006-06-24 20:38:36 +00:00
Goober5000 f4fe6a8eee doh! sorry for blaming this on you, WMC
--Goober5000
2006-06-24 18:02:02 +00:00
Goober5000 32e31632a5 cosmetics, plus revert an unnecessary if 2006-06-24 04:48:08 +00:00
Goober5000 85c06cceb8 make ai-chase-any-except revert to ai-chase-any
(since it never really worked properly in the first place)
--Goober5000
2006-06-24 01:53:53 +00:00
karajorma a8835d6273 Was feeling left out :) 2006-06-23 16:08:55 +00:00
Goober5000 0931ad7010 change build names here too
--Goober5000
2006-06-23 13:44:28 +00:00
Goober5000 43a97f9641 make the 3.6.9 branch create appropriately-named builds
--Goober5000
2006-06-23 13:39:48 +00:00
karajorma 30d57b0bf8 Make the ambient light sliders actually save their settings. 2006-06-23 09:17:02 +00:00
taylor 5cf86ef5fc be sure to properly reset fullscreen/minimized state vars as we switch between them 2006-06-23 09:01:07 +00:00
taylor e3c9fe88c6 fix various things that Valgrind has been complaining about 2006-06-22 14:59:45 +00:00
taylor e98b50d64e make sure we only do ship related setup on actual ships 2006-06-20 20:04:42 +00:00
taylor 7518068ec2 as a temporary measure, until I can figure out what is going on here:
- disable depth buffer for RTT, may be causing the ATI issues, should work ok without it for most things
  - disable mipmap generation for RTT, something strange is going on there, it's sometimes making black mipmap levels (even for the same texture)
2006-06-19 22:50:58 +00:00
taylor 411f21658f yeah, I'm not at the top of my game today ;) 2006-06-18 23:38:06 +00:00
taylor 5a6d901e2f address a strange resize error that triggers an Assert() in the texture code with mipmaps 2006-06-18 23:34:55 +00:00
taylor dab2c932f3 32-bit PCX conversion doesn't do a bit swizzle so be sure we get the transparent pixel right in the first place to avoid the green 2006-06-18 23:32:29 +00:00
taylor 2f6a35aa09 fix screenshots on big endian 2006-06-18 20:09:03 +00:00
taylor 09208d536c well, that was actually pretty stupid of me :) 2006-06-18 20:08:27 +00:00
taylor cd35ade32f add a -disable_fbo troubleshooting option for those ATI users having trouble with FBOs, but can still use envmapping otherwise 2006-06-18 17:21:49 +00:00
taylor a9f3431ac6 always try to use a mission specified envmap over the static-generated envmap (missed this commit a while ago) 2006-06-18 17:20:32 +00:00
taylor 8d64d64156 various compiler warning fixes 2006-06-18 16:54:36 +00:00
taylor 47eccc7299 make sure we don't process cmeasure homing more than once (this should also fix the incompatible network packet)
fix flag check to be sure that we properly detonate missiles tracking cmeasures
2006-06-18 16:53:59 +00:00
taylor e6ca865588 make sure we can report both AL and ALC errors
fix for ds_get_free_channel(), it shouldn't return -1 on an AL error
2006-06-18 16:52:04 +00:00
taylor 4b6bf8504a we don't use alc functions here so no real need for the header 2006-06-18 16:50:19 +00:00
taylor af3350e693 fix so that multiple FBOs can be used with different sizes (plus a few other minor adjustments) 2006-06-18 16:49:40 +00:00
taylor a4421ccfb7 bump package version
add/remove files so that 'make dist' works again
2006-06-18 16:48:29 +00:00
taylor df675154c5 apparently missed this commit a month or so ago with the other OS X fixes 2006-06-15 23:33:53 +00:00
Goober5000 4aae03f732 make warpout work properly even if the player is docked to something
--Goober5000
2006-06-15 06:18:43 +00:00
Goober5000 4772f2768d this is kinda superfluous 2006-06-15 01:36:01 +00:00
Goober5000 5e48d6a75e version bumpage 2006-06-15 01:35:11 +00:00
Goober5000 71cb0937e5 tweaked the version string
--Goober5000
2006-06-15 01:29:25 +00:00
Goober5000 094a1e90ee better handling for 'G' key press
--Goober5000
2006-06-15 00:47:21 +00:00
taylor a5780453cc remove previous attempts at the Y bug fix, it's now back to the retail code for that 2006-06-15 00:16:23 +00:00
taylor ff27a3a66f fix Assert() on value of face variable, it should be able to be -1 for non-cubemap images 2006-06-15 00:15:17 +00:00
Goober5000 6cfa10a77c remove /Og switch 2006-06-14 22:33:41 +00:00
wmcoolmon 251fb61efc Hopefully fix compilation 2006-06-14 01:33:37 +00:00
taylor e3eabee785 sync up current OpenAL changes
- "SoundDeviceOAL" reg option for user specified sound device (used instead of "Soundcard" for OpenAL)
 - reset current context when we are leaving, may be leaving drivers in a bad state, and it hasn't hung up in quite a while
 - if sound card (which DS or OAL) is set to "no sound" then be sure to disable both sound and music
2006-06-12 03:40:26 +00:00
taylor 8bbc0ae489 try to allow RAS VPN connects since they probably aren't dial-up and shouldn't be seen as such 2006-06-12 03:38:15 +00:00
taylor 6c1508bb69 sync current OGL changes:
- go back to using minimize mode which non-active, but doin't minimize when Fred_running
 - remove temporary cmdline options (-spec_scale, -env_scale, -alpha_alpha_blend)
 - change FBO renderbuffer link around a little to maybe avoid freaky drivers (or freaky code)
2006-06-12 03:37:24 +00:00
taylor ca86d35af0 bump version to 3.6.9 2006-06-12 03:34:46 +00:00
taylor d7270570ed remove temporary cmdline options (-spec_scale, -env_scale, -alpha_alpha_blend)
tack on an extra byte to the flags.lch file so that the launcher can easily detect if it's an OpenAL build or not
2006-06-12 03:34:18 +00:00
wmcoolmon affbfa2687 Tweak events support; fix a few of Wanderer's bugs; begin model support 2006-06-12 02:33:34 +00:00
Goober5000 a2584a3fbf fix parsing/handling of debriefing persona indexes
--Goober5000
2006-06-10 18:35:05 +00:00
Goober5000 94d149aef4 update credits 2006-06-08 06:48:13 +00:00
karajorma 8962c8f4cb Allow Change-Ship-Class to affect ships which haven't arrived yet (For BHX) 2006-06-07 20:50:56 +00:00
karajorma 87049e3eb4 Allow Change-Ship-Class to work with ships which haven't arrived yet (For BHX) 2006-06-07 20:47:53 +00:00
karajorma 2f798e8223 Fix bug with multiple uses of change-ship-class SEXP 2006-06-07 20:45:11 +00:00
karajorma 39f88c57b7 Limbo flag support; further scripting 3.6.9 update 2006-06-07 20:25:10 +00:00
wmcoolmon 9bebab4979 Fix the getScreenCoords function. 2006-06-07 07:49:43 +00:00
wmcoolmon 26fcce9cae Scripting system prep for 3.6.9 2006-06-07 03:54:29 +00:00
wmcoolmon 4fe0fe418e Scripting system prep for 3.6.9 2006-06-07 03:23:15 +00:00
wmcoolmon 388529b4c2 According to wikipedia, true does not equal false. Hopefully, this doesn't break backwards compatibility :P 2006-06-07 02:28:13 +00:00
taylor 47d61f1775 properly initialize a few entries that were left zero'd by mistake 2006-06-06 00:00:00 +00:00
taylor e0b6fe6482 don't Int3() here, it's actually going to happen in some cases when using -img2dds 2006-06-05 23:59:33 +00:00
taylor be17801664 this should hopefully fix cursor drift on multi-display configs 2006-06-05 23:59:11 +00:00
wmcoolmon 61bd149728 Remove $Collide Ship and $Collide Weapon options from 3.6.9, as these are not finalized 2006-06-04 17:57:00 +00:00
Goober5000 0719b335d3 add fighterbay restriction code
--Goober5000
2006-06-04 01:03:13 +00:00
Goober5000 a7233999d6 add capability for preloading special arguments
NB: it's disabled for now, and it needs to be moved after sexps are parsed to work
--Goober5000
2006-06-04 00:01:48 +00:00
taylor ab449bcc2b remove init_decals declaration, it's in the header now since we build without decal support 2006-06-03 11:57:13 +00:00
taylor 73a0ed832a be sure that we properly apply light to submodels (mainly for debris), looks *really* bad otherwise 2006-06-03 05:06:38 +00:00
Goober5000 ae2bc4b669 add karajorma's multi callback
--Goober5000
2006-06-03 04:46:39 +00:00
(no author) f722910e5f This commit was manufactured by cvs2svn to create branch
'fs2_open_3_6_9'.
2006-06-02 09:17:10 +00:00
taylor 99db7b2b18 some more buffer size strangeness (which I still don't understand) that makes certain sound formats not work properly 2006-06-02 08:05:33 +00:00
taylor c99fdf2c96 flip color/depth values, appears some are initting software GL again and this was the problem previously 2006-06-01 07:33:59 +00:00
taylor 17fd0ef9aa make sure to use software device rather than hardware since we don't currently handle source rotation/reuse properly between ds and audiostr code 2006-06-01 07:33:00 +00:00
taylor a23de790f4 make sure FORM_ON_WING goal is valid since it works for ships other than player now 2006-06-01 04:47:23 +00:00
taylor 46f7e597cb put back listener setup for each sound, doesn't make a difference under Linux but it may be hurting Windows for some reason 2006-06-01 04:46:18 +00:00
taylor 0a377e7f56 a little change to the order here, this should be safer in the long run and avoid some memory issues too 2006-06-01 04:45:19 +00:00
taylor f8d912a4c0 fix the scope issues that someone complained about in the forums 2006-06-01 04:44:19 +00:00
taylor 6c32756521 use vm_vec_normalize_safe(), a bit cheap as a fix, but it's really difficult to trace the VECMAT errors back from here 2006-06-01 04:43:49 +00:00
taylor d8835bdc16 put decals back under an #ifdef, until this is fixed it's just in the way 2006-06-01 04:41:43 +00:00
taylor 50005735a9 be sure to to reset ok_to_fire between weapon checks to make sure we don't count something by mistake 2006-06-01 04:40:41 +00:00
taylor a18ca79093 render strings a string at a time rather than a letter at the time (should be at least 3 times faster from state changes alone) 2006-05-31 04:02:05 +00:00
taylor 8d66781134 bah! this thing is crashing. disable for now until I can figure out what's going on 2006-05-31 04:01:13 +00:00
Goober5000 3fa1ee0451 whoops, didn't mean to commit that 2006-05-31 03:27:19 +00:00
Goober5000 7cdb7814d8 some cosmetic changes in preparation for bay arrival/departure code
--Goober5000
2006-05-31 03:05:43 +00:00
Goober5000 7f24e0f07f fix compiler warning
--Goober5000
2006-05-31 02:08:22 +00:00
karajorma c039805ba0 Got sick of seeing that compiler warning all the time! 2006-05-30 11:20:38 +00:00
Goober5000 20209bc1f6 fix up CVS headers
--Goober5000
2006-05-30 06:01:05 +00:00
Goober5000 19b6d0b52f I should probably add these files too
--Goober5000
2006-05-30 05:58:59 +00:00
Goober5000 4565e6f240 add capability to restrict arrival/departure paths
(FRED only; FS2 implementation to follow)
--Goober5000
2006-05-30 05:37:29 +00:00
taylor c2ea62e833 make sure we are locking those vars down in timer_get() to avoid thread issues (may fix hang on "timer rolled" message) 2006-05-30 03:55:09 +00:00
taylor 52c27a513b z-range for 2D ortho is -1.0 to 1.0, may help avoid some strangeness if we actually get that right. :)
minor cleanup of old code and default settings
try not to bother with depth test unless we are actually going to need it (small performance boost in some cases)
don't clear depth bit in flip(), while technically correct it's also a bit redundant (and comes with a slight performance hit)
2006-05-30 03:53:52 +00:00
Goober5000 fe2a3e03b6 add substitute music boxes to FRED, and reset music properly when mission is cleared
--Goober5000
2006-05-30 02:13:22 +00:00
Goober5000 6ae6742b1e add AI Profile box to FRED
--Goober5000
2006-05-30 01:36:24 +00:00
Goober5000 0e6208e044 add debriefing persona index to fred
--Goober5000
2006-05-30 01:08:10 +00:00
Goober5000 41e061bb92 removed small redundancy
--Goober5000
2006-05-29 19:14:30 +00:00
Goober5000 62df777a19 add Taylor's compile fix
--Goober5000
2006-05-29 02:02:17 +00:00
taylor 12410efb93 fix D3D white screen issue 2006-05-28 18:40:37 +00:00
taylor 969febfbd9 remove DX9 SDK since it's useless to us at this time 2006-05-28 17:57:29 +00:00
taylor 7c28b639b3 minor safety check 2006-05-27 17:22:04 +00:00
taylor 767b33f610 update proj/view matrix calls to use new values 2006-05-27 17:21:37 +00:00
taylor c376148d23 clean up BM_TYPE_* stuff so it's a little easier to tell what is what
bm_load_sub_fast() doesn't need to lowercase filenames, so don't
byte-swap 16-bit DDS on big endian (they still don't look right though)
update bm_has_alpha_channel() to be less dumb
2006-05-27 17:20:48 +00:00
taylor a2cdb99bb6 d'oh! that was supposed to be off by default! 2006-05-27 17:18:56 +00:00
taylor 3c9d4d9c3d few things:
- comment out that -fixbugs and -nocrash crap, that's just stupid
  - move -env off of the experimental list (since it's working pretty well in OGL)
  - remove -nobeampierce
  - remove -max_subdivide (didn't do anything)
  - remove -rt (didn't do anything, and per-coder cmdline options should never be in CVS)
  - move -cache_bitmaps to game speed rather than graphics
  - add options for env and spec map scaling for envmaps (temporary, to be removed before official 3.6.8)
  - add option for new alpha blend mode so that artists can still test with it but not mess up normal users with the bad MediaVPs
  - remove -d3d_particle (it's obsolete now)
2006-05-27 17:17:57 +00:00
taylor 7f1da984b7 add NO_DIRECT3D support 2006-05-27 17:13:22 +00:00
taylor fe22826ef5 NO_DIRECT3D support
clean up video init stuff to use D3D if specified but always OGL otherwise (using NO_DIRECT3D will force always force OGL)
if video card reg entry can't be found just use OGL rather than getting all freaky on people
change for geometry batcher update
2006-05-27 17:12:44 +00:00
taylor 08394a9e8c don't setup all of the sound stuff for a mission if sound is disabled 2006-05-27 17:09:43 +00:00
taylor 2a44b90d16 oops! 2006-05-27 17:08:50 +00:00
taylor f1638de72e remove grd3dparticle.* and grd3dbatch.*, they are obsolete
allow us to build without D3D support under Windows (just define NO_DIRECT3D)
clean up TMAP flags
fix a couple of minor OpenGL state change issues with spec and env map rendering
make sure we build again for OS X (OGL extension functions work a little different there)
render targets always need to be power-of-2 to avoid incomplete buffer issues in the code
when we disable culling in opengl_3dunlit be sure that we re-enable it on exit of function
re-fix screenshots
add true alpha blending support (with cmdline for now since the artwork has the catch up)
draw lines with float positioning, to be more accurate with resizing on non-standard resolutions
don't load cubemaps from file for D3D, not sure how to do it anyway
update geometry batcher code, memory fixes, dynamic stuff, basic fixage, etc.
2006-05-27 17:07:48 +00:00
taylor 312b19926f only display that "no wavefile for voice" message if sound is enabled 2006-05-27 17:00:02 +00:00
taylor 55f1ab1b3b comment out some code which used only if neither D3D nor OGL 2006-05-27 16:59:05 +00:00
taylor 5ee7f1b1ae comment out the model cache stuff, it's old and not actually used anyway
minor cleanup of some modelinterp.cpp code, to make it more readable
fix tertiary thruster batcher which had the radius value swapped
comment out a couple places where we were doing a D3D or OGL check (it's always true so why bother)
add more support for NO_DIRECT3D so that it can be used on Windows to build without D3D
2006-05-27 16:57:13 +00:00
taylor 785593361e lots of little cleanup and minor fixage
make Particles[] dynamic (appears to improve processing speed of two particle functions by about 30%)
move to completely using Bobboau's geometry batcher instead of the stale one that RandomTiger did
little change to PARTICLE_SMOKE to flip UV orient differently, may add some realism, or just look kinda neat
get rid of particle_emit() stuff what was hardcoded for MAX_DETAIL_LEVEL value
2006-05-27 16:52:50 +00:00
taylor e705951cdd comment out some pointless checks which look for not using either D3D or OGL
don't run through ships on level load setting up the sound environment if sound is disabled
minor cleanup
2006-05-27 16:49:05 +00:00
taylor 5131db0c80 remove some of the old batcher functions, nothing is using them now anyway
minor cleanup
add orient UV flipping to HTL drawing functions, like retail/non-HTL has support for
2006-05-27 16:47:12 +00:00
taylor b9c2f1858c some minor cleanup
remove -nobeampierce
update for geometry batcher changes
2006-05-27 16:45:11 +00:00
taylor cd935f2b66 fix slight freakiness with debris vclips (un)loading
comment out some code which was only used if neither D3D or OGL
fix dumb particle_emit() calls
2006-05-27 16:42:16 +00:00
taylor ac449637ff remove non-Windows timeSetEvent() functions
make PDWORD and LPDWORD int instead of long (64-bit issue) (thanks Spike)
fix 64-bit ptr issue with OpenAL audio streaming code (thanks Spike)
add start of device enumberation for OpenAL 1.1 (it just lists available devices now)
make sure we open the default OpenAL 1.1 device under Windows
comment out blank listener stuff, this may have been crashing under OS X
add support for AL_BYTE_OFFSET in OpenAL 1.1 for buffer positioning under Windows
2006-05-27 16:39:40 +00:00
taylor 4967c0fdd4 remove grd3dparticle.* and grd3dbatch.* since they are obsolete
update to current Xcode project file
update frameworks (header problems) used by OS X version
2006-05-27 16:34:57 +00:00
wmcoolmon 66bdc93df2 Fix for Mantis bug #0000922 2006-05-24 05:09:25 +00:00
Goober5000 ea224ed952 fix for Mantis #750
--Goober5000
2006-05-21 22:57:30 +00:00
Goober5000 ecd04a316e fix Mantis #834
--Goober5000
2006-05-21 03:58:58 +00:00
Goober5000 02d8e6fd1c fix for Mantis #827
--Goober5000
2006-05-21 02:12:21 +00:00
Goober5000 43539dfd98 and actually commit the uncorrupted file - grr...
--Goober5000
2006-05-20 03:00:06 +00:00
Goober5000 367dbec7b6 try changing the format again
--Goober5000
2006-05-20 02:56:11 +00:00
Goober5000 eac4702e2c fix for Mantis #755, plus make the missionlog #defines uniform
--Goober5000
2006-05-20 02:03:01 +00:00
Goober5000 b08377cd2c formatting and clarification, plus fix for Mantis #911
--Goober5000
2006-05-19 04:47:40 +00:00
taylor 0836646e80 fix bool compiler warning for MSVC 2006-05-18 14:56:02 +00:00
Goober5000 c7ffc5a00c fix for Mantis #875
--Goober5000
2006-05-16 15:54:39 +00:00
karajorma bb46d019a2 Fix the lack of a background in FRED 2006-05-16 12:45:20 +00:00
Goober5000 912c927c5e fix directory goof
--Goober5000
2006-05-15 17:42:35 +00:00
karajorma f0e16e290c no message 2006-05-14 16:02:02 +00:00
karajorma 141bab42d3 Checkboxes for locking primary and secondary weapons and for disabling builtin messages from command and individual pilots 2006-05-14 15:57:43 +00:00
karajorma d90c9283a7 Fixes for the Targetable-as-bomb error from Mantis 0000910 (amongst others) 2006-05-14 15:54:16 +00:00
karajorma 6ee483f9ac Fixes for the Invulnerability problems from Mantis - 0000910 2006-05-14 15:52:42 +00:00
taylor 15bb5dceed forgot to remove STRICT define before commit, gets rid of a Windows compiler warning 2006-05-14 05:22:43 +00:00
taylor e137882c77 OpenGL envmap support
newer OpenGL extension support
add GL_ARB_texture_rectangle support for non-power-of-2 textures as interface graphics
add cubemap reading and writing support to DDS loader
fix bug in DDS loader that made compressed images with mipmaps use more memory than they really required
add support for a default envmap named "cubemap.dds"
new mission flag "$Environment Map:" to use a pre-existing envmap
minor cleanup of compiler warning messages
get rid of wasteful math from gr_set_proj_matrix()
remove extra gr_set_*_matrix() calls from starfield.cpp as there was no longer a reason for them to be there
clean up bmpman flags in reguards to cubemaps and render targets
disable D3D envmap code until it can be upgraded to current level of code
remove bumpmap code from OpenGL stuff (sorry but it was getting in the way, if it was more than copy-paste it would be worth keeping)
replace gluPerspective() call with glFrustum() call, it's a lot less math this way and saves the extra function call
2006-05-13 07:29:52 +00:00
taylor 7706111156 get rid of some wasteful math for gr_set_proj_matrix() calls
fix check that broke praise of kills for player
fix knossos warpin effect that always seems to get rendered backwards (I couldn't find anything that broke with this but I suppose it's a mod could have an issue)
2006-05-13 07:15:51 +00:00
taylor 7032281eb3 make sure sound buffers are valid before trying to delete them (was causing crash issues on Windows and OS X) 2006-05-13 07:11:46 +00:00
taylor 345b8fef8b some Windows specific OpenAL changes
add MVE files to MSVC6 project
2006-05-13 07:10:37 +00:00
taylor dc422b24a6 minor cleanup and a couple extra error checks
get rid of some wasteful math from the gr_set_proj_matrix() calls
2006-05-13 07:09:25 +00:00
taylor 61bf47af51 Vodka, it's a killer ;) 2006-05-13 07:03:41 +00:00
taylor 2180996dd8 add lazy (ie, faster) checking of asteroid collisions for time-to-impact 2006-05-13 07:02:27 +00:00
taylor 9d11783b3b fix bug where anything that wasn't a ship was considered a non-goal 2006-05-13 07:01:17 +00:00
taylor 02c737e71b MVE player (audio only works with OpenAL builds!) 2006-05-13 06:59:48 +00:00
taylor 2303a827de add newest OpenAL SDK, this makes things easier as OpenAL is now the build default 2006-05-13 06:58:07 +00:00
taylor b87fbfe680 add some missing headers, got tired of doing this myself when I did a build under Windows 2006-05-13 06:55:54 +00:00
Goober5000 36f397948a fixed build bug under WinXP
--Goober5000
2006-05-10 23:49:46 +00:00
taylor f73633677f if in freecamera mode, or the hud is disabled, the don't draw scripted hud elements
(this is almost hackish, but the bug never got a comment from WMC, so he can fix it later if this is wrong)
2006-05-09 09:23:05 +00:00
taylor 3ae297733f fix incorrect button locations, it matches the correct layout of the other techroom screens now
(thought Backslash was going to fix this, but I got tired of waiting. :))
2006-05-09 09:21:15 +00:00
taylor bfd717361b remove SCP Lite build option, the rest of the code for it was long since removed
remove the glBindBufferARB lib check, the soon-to-be-committed extension code upgrade will handle the issue much better
2006-05-09 09:19:38 +00:00
phreak c5e593b5fc the -decal command line doesn't enable decals anymore, just pops up a messagebox in windows saying that decals are disabled from now on. 2006-05-04 21:25:12 +00:00
phreak bfb0763c7d You can now preview sounds again in the event editor. 2006-04-30 16:39:43 +00:00
Goober5000 e13a46012f tweak for yesterday's file name change 2006-04-20 17:38:25 +00:00
taylor 700d2580b8 makefile fixage 2006-04-20 16:24:48 +00:00
Goober5000 67e8f94a93 proper capitalization according to Volition 2006-04-20 06:32:30 +00:00
Goober5000 c0760fe0eb change animation.cpp to modelanim.cpp, add CVS info, and add the file to the VC6 project
--Goober5000
2006-04-20 05:42:05 +00:00
bobboau 1ebf49e128 bugfix for the animation system 2006-04-18 02:33:59 +00:00
bobboau 4148f915f3 bugfix for the animation system 2006-04-18 00:56:28 +00:00
phreak ce6bc0a4a2 fix FRED crashing if the user adds multiple waypoint paths then inserts more ships. 2006-04-18 00:08:23 +00:00
karajorma a45abe3803 Some how managed to fail to commit the primary-locked and secondary-locked ship flags.
No idea how. Oh well here they are.
2006-04-16 11:58:11 +00:00
taylor 6d62bbc1c0 extra safety check when creating a default path string, filename is optional be we need to available if root0 is missing (CFILE not initted yet)
fix that crazy compiler<->constructor<->linker<->server.txt deal caused by some bad code and a freaky link thing in freespace.cpp
2006-04-16 05:28:10 +00:00
taylor 68ef4fba9f compiler warning fix, missed this one previously 2006-04-16 05:24:58 +00:00
taylor f680a2cac7 probably doesn't need to be world readable, but certainly doesn't need to be world writeable
add Assert() to can when we are stupidly trying to allocate 0 or less size bytes in vm_malloc()
2006-04-16 05:24:16 +00:00
taylor 065d73228c some optimizations for *nix 2006-04-16 05:22:21 +00:00
taylor 732ab180fc forgot to add forward declaration for allocate_mission_text() (thanks karajorma ;)) 2006-04-15 19:00:52 +00:00
phreak 2da7ae9abe use gr_flash_alpha() for fade-in/fade-out effect.
just using gr_shade() will not work with the hud off or using an external camera.
2006-04-15 04:17:58 +00:00
phreak 71b7ae9015 gr_flash_alpha(), much like gr_flash(), but allows an alpha value to be passed 2006-04-15 00:13:22 +00:00
taylor e3d03fd212 Grrr! That was still stupid. Just going to revert it to retail and work out that bug it was supposed to fix at a later time. 2006-04-14 21:13:31 +00:00
taylor 52f8465347 that was rather stupid of me, fogetting this would not have been a good thing :) 2006-04-14 18:50:52 +00:00
taylor aeb1c904a1 remove all of the *_ex() parsing functions added for use by EFFs
add a pause/unpause for parsing so that we can safely start parsing something new then continue parsing something old
make Mission_text and Mission_text_raw only use the memory needed, and free it when it doesn't need to parse anymore
  (should work ok with FRED2, but I wasn't able to test it)
2006-04-14 18:44:16 +00:00
taylor 9987ec1d61 make sure that modular star tables actually work without going into an endless loop, or constantly complaining on you 2006-04-14 18:40:44 +00:00
taylor 4fba39d9cf something that Valgrind complained about 2006-04-14 18:39:38 +00:00
taylor cb267605ed giving a tbl name in this warning message is basically useless since there we can't tell which tbl this particular ship is in 2006-04-14 18:39:06 +00:00
taylor 4ff77f28a3 more checking to make sure that the malloc calls are actually needed 2006-04-14 18:37:06 +00:00
taylor d601a98198 I might have blamed this on sleep, if it wasn't a bold faced lie. ;)
- another part of the turret untargetting target bug
2006-04-14 18:36:11 +00:00
taylor a6eb24fa82 make sure we don't allocate any memory for turrets unless there are some, was causing a few various memory issues, mainly for debug builds
(there is more of this same checking on the way for the other malloc() calls during model loading, and vm_malloc() will be set to
   Assert() on a 0 or less size as well)
2006-04-13 12:19:33 +00:00
taylor 96ef2672ea deal with font rendering issue from float precision on non-standard resolutions. this is only about a 97% fix/hack
but I don't want people complaining about the bad issue until I can figure out a more appropriate solution with
  gr_set_clip(), which is the real source of the problem
2006-04-13 12:15:58 +00:00
taylor 5d7c6fb3df bah! forgot to add a blasted = on that check 2006-04-13 12:12:27 +00:00
taylor 7ec2cd5f5c compiler warning fixes to make GCC 4.1 shut the hell up 2006-04-12 22:23:41 +00:00
phreak 3624b1a7ab get jump nodes rendering again..... again. 2006-04-12 05:30:50 +00:00
phreak 7e4e0982a9 obj_delete() needs to be called for jump nodes since the slot the jump node
that used to reside in hasn't been marked as empty.  This leads to the node still appearing in fred
if the user tries to delete the "ghosted" jump node, fred crashes.
2006-04-12 05:07:00 +00:00
taylor d71387ba9b some cleanup and slight reorg
- remove special uv offsets for non-standard res, they were stupid anyway and don't actually fix the problem (which should actually be fixed now)
 - avoid some costly math where possible in the drawing functions
 - add opengl_error_string(), this is part of a later update but there wasn't a reason to not go ahead and commit this peice now
 - minor cleanup to Win32 extension defines
 - make opengl_lights[] allocate only when using OGL
 - cleanup some costly per-frame lighting stuff
 - clamp textures for interface and aabitmap (font) graphics since they shouldn't normally repeat anyway (the default)
   (doing this for D3D, if it doesn't already, may fix the blue-lines problem since a similar issue was seen with OGL)
2006-04-12 01:10:35 +00:00
taylor 8c121c59d8 more s/colour/color/ changes
throw in a couple of safety checks for some neb2 functions
2006-04-12 01:03:00 +00:00
taylor 3750db172a some small optimizations and cleanup
use floats for gr_bitmap() size and positions, mainly for non-standard resolutions since this allows proper resizing and positioning
  (the cast to float was happening later anyway so there should be not additional slowdown from that with standard resolutions)
change g3_draw_2d_poly_bitmap() to use floats instead of ints, gets rid of the extra cast and allows better resize values
2006-04-12 01:00:58 +00:00
taylor 5309150c35 that's a rather expensive function to call twice per frame, we should only need to call it once per mission and not ever have to reset it to some middle value 2006-04-12 00:55:16 +00:00
taylor d89ef03a18 DDS now works well on the interface, but I forgot to every commit the CFILE change so that they are actually usable :) 2006-04-12 00:53:26 +00:00
taylor 935b9bf981 keep forgetting to add this 2006-04-12 00:52:32 +00:00
phreak 743e183c39 undo mission list changes for now while taylor is out of town and unable to commit the rest of the codebase. 2006-04-09 19:50:19 +00:00
karajorma f4cb11fb88 Added SEXPs to lock and unlock the primary and secondary weapons 2006-04-07 20:17:33 +00:00
taylor 92c0c62c8d perhaps this will fix the white splash screen issue on Windows (been sitting on this, might as well commit it) 2006-04-06 23:25:17 +00:00
taylor 2d61680691 bits of cleanup
minor fixes for -img2dds
2006-04-06 23:23:56 +00:00
karajorma 93fdc17fa1 Damn spelling mistakes. And in the only place where it would be visible too! 2006-04-06 20:44:14 +00:00
Goober5000 f7b2ba59e3 small fix 2006-04-06 18:53:28 +00:00
wmcoolmon 7769e8f393 Better scripting team support. (Just a tad) 2006-04-06 05:28:30 +00:00
karajorma 9a17211b9c Bah! Silly error. 2006-04-05 19:59:11 +00:00
karajorma c0d4616aad Support added for the Enable/Disable-BuiltinMessages SEXP 2006-04-05 17:54:25 +00:00
karajorma 66cbc52e27 Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:56:57 +00:00
karajorma 1af353ba41 Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:46:40 +00:00
karajorma 9b945036cc Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:29:53 +00:00
karajorma a22a83f181 Changes to support the new Enable/Disable-Builtin-Messages SEXP 2006-04-05 16:14:04 +00:00
taylor 527f2729ac remove -tga16, it's obsolete now
add a temporary -no_emissive_light option to not use emission type light in OGL
2006-04-05 13:47:01 +00:00
taylor 103149396d correct some coding mistakes 2006-04-05 13:45:08 +00:00
taylor c49e421e76 fix linking, again. 2006-04-05 13:44:30 +00:00
wmcoolmon 7e6bab7efc Maneuvering hruster scaling, gun convergence 2006-04-04 11:38:07 +00:00
wmcoolmon 6b2844c13e Bump this, too 2006-04-03 09:07:34 +00:00
wmcoolmon 601f884ecd show-subtitle's got its groove back 2006-04-03 09:05:37 +00:00
wmcoolmon 1c39fb3916 Maneuvering thruster fixes 2006-04-03 08:09:32 +00:00
wmcoolmon cd6d006019 Miscellaneous minor changes, mostly related to addition of Current_camera variable 2006-04-03 07:48:03 +00:00
wmcoolmon 613e92d84a Scripting support for cameras, as well as for moving model subobjects 2006-04-03 07:47:07 +00:00
wmcoolmon f93d5e2cf9 gamesnd_get_by_name now ignores extensions, mostly for parse_sound reasons. 2006-04-03 07:45:43 +00:00
wmcoolmon 5bef6f400a camera code updates (Translation should be possible now) 2006-04-03 07:45:15 +00:00
wmcoolmon 76890e3683 $Warp time and $Warp speed vars 2006-04-01 01:21:58 +00:00
wmcoolmon c966f042c3 Prelim. BSG warpin effect stuff 2006-03-31 10:20:01 +00:00
Goober5000 acf908dc58 those were some bugs just waiting to happen 2006-03-30 04:18:40 +00:00
Goober5000 e77da0c908 hehe, grammar
--Goober5000
2006-03-30 04:15:20 +00:00
karajorma ec0f94d2f6 Added the set-primary-weapon and the set-secondary-weapon SEXPs. Updated the corresponding
set-x-ammo SEXPs to also accept a rearm limit.
2006-03-28 11:41:57 +00:00
taylor d6257e32df forgot to ever change this stuff
- version bump to 3.6.8 for configure file
 - the Frameworks package for OS X is now a tarball rather than a zip file
2006-03-26 10:31:02 +00:00
taylor 596a94c3ab make sure to only allow on screen save at the time (I don't like having it restricted but since it's not used for anything else there is little point) 2006-03-26 08:26:45 +00:00
taylor 15e691540a the bmpman release issues for the chatbox should be fixed now so we can go back to using bm_release() on the bitmaps
Chatbox_p_coords (the multi-pause background) should be at 0,0 (even though this isn't used I thought it was a good idea to go ahead and fix it)
2006-03-26 08:25:05 +00:00
taylor dffe83c331 split pause_*() and multi_pause_*() functions into individual single and multi versions (why it was hacked up like that I'll never know)
fix screen save in multi pause mode
address some bmpman issues from interface graphics getting released and then still used by something else
2006-03-26 08:23:06 +00:00
Goober5000 e38accf100 this should fix random-of
--Goober5000
2006-03-26 06:42:01 +00:00
taylor 80e294a5b2 fix model_allocate_interp_data() extern for OSX 2006-03-25 22:44:52 +00:00
taylor 21cbe12363 add OGL headers to CFLAGS for OSX 2006-03-25 22:44:04 +00:00
taylor b257727de4 the previous changes should prevent these things from happening, but drop in some more Assert()'s anyway 2006-03-25 22:38:15 +00:00
taylor 10c58da28c modelinterp.cpp: that little bit really isn't needed
popup.cpp:  GCC 4.1 warning fixes
2006-03-25 10:41:44 +00:00
taylor cb3acee35f don't run through game_shade_frame() every frame unless we are in a game-play state 2006-03-25 10:40:38 +00:00
taylor edefe13877 minor cleanup
address numerous out-of-bounds issues
add some better error checking and Assert()'s around
2006-03-25 10:38:44 +00:00
Goober5000 e5da8c3ec6 hopefully fix this :( 2006-03-24 18:40:13 +00:00
wmcoolmon a8a62b6a53 New subobject animation stuff and Lua functions. 2006-03-24 07:38:36 +00:00
Goober5000 2c443660d1 add nav flag to def_files
--Goober5000
2006-03-24 05:08:23 +00:00
Goober5000 897b7c5dff tweak karajorma's fixes... these should work exactly the same but are closer to my original intent 2006-03-24 05:08:19 +00:00
taylor 84637262ec address out-of-bounds issues for Sounds[] when unloading 2006-03-22 21:42:55 +00:00
taylor 252de388d3 minor warning fixage 2006-03-22 18:20:06 +00:00
taylor d288d1a25e if -mipmap is used with -img2dds to then have compressed image also contain mipmaps
use nicest hints for texture compression, should improve quality a little
when reporting compressed sizes to debug log make ani size be total, not per frame
2006-03-22 18:14:52 +00:00
taylor 0c40355fe0 minor cleanup 2006-03-22 18:12:50 +00:00
taylor f63964da82 don't really see the point of the Assert() here, just bail if it's an issue 2006-03-22 18:12:16 +00:00
taylor a950517602 GCC 4.1 barfed on this 2006-03-22 18:11:28 +00:00
karajorma c8a11c7606 Fixed Random-Of so that it finally works properly. and doesn't ignore the last items on the list.
Fixed Rand-Multiple so that when seeded it works the way I originally designed it to. Previously it was
working exactly the same as rand when seeded.
2006-03-22 16:24:20 +00:00
taylor dcc0bbee6f fix text subtitles that I so kindly broke not too long ago 2006-03-22 08:34:17 +00:00
karajorma 1eac27d093 Bah. More errors fixed. This time in in-sequence 2006-03-22 01:36:21 +00:00
karajorma bb8e8276a2 Added the In-Sequence conditional. 2006-03-21 17:19:01 +00:00
taylor 623b944400 add commands to view from and change target in viewer mode pause
also add reset ability to both view mode and hud state to return to pre-pause settings
2006-03-21 14:19:18 +00:00
Goober5000 a420a09f3b fix taylor's fix :p
--Goober5000
2006-03-21 02:50:59 +00:00
taylor f34a4c6035 some minor cleanup 2006-03-21 00:27:27 +00:00
taylor cfb9531877 fix target eval check for weapons so that friendly ships will stop shooting at friendly bombs 2006-03-21 00:08:18 +00:00
taylor f0633adb5b change wording to ease Goober's ulcer. ;) 2006-03-20 06:25:19 +00:00
taylor 4a7d3296c3 add ai_profiles flag to get rid of limit on minimum speed a docked ship can move
(not going to Int3() here from < 0.1 speed by default, a support ship actually hit it)
2006-03-20 06:19:04 +00:00
taylor 3a745df024 fix D3D/OGL test for asteroid rotations (I was far too excited about the result of this :() 2006-03-20 06:16:45 +00:00
taylor 5f29c82949 might as well do star antialiasing for OGL too 2006-03-20 06:13:35 +00:00
taylor 5c5ed650dd make sure the mission log doesn't modify stuff in Cargo_names[], since it shouldn't
have split_str_once() be sure to not split a word in half, it should end up on the second line instead
2006-03-19 05:05:59 +00:00
Goober5000 e010375e02 added set-death-message sexp
--Goober5000
2006-03-18 22:43:16 +00:00
Goober5000 46c934495b blast 2006-03-18 22:18:24 +00:00
Goober5000 14570cb8ff fix comm order initialization bug
--Goober5000
2006-03-18 22:00:43 +00:00
taylor fe21f898b1 add framerate var since it's contained in freespace.cpp and that's not used in a FRED2 compile 2006-03-18 21:23:38 +00:00
wmcoolmon 0f4afd3f04 Nitpicketiness 2006-03-18 20:24:54 +00:00
taylor 213ce40ba4 meh. 2006-03-18 10:28:58 +00:00
taylor d5b2634313 fix out-of-bounds problem in awacs checking (full neb missions may have been a bit freaky from this) 2006-03-18 10:28:25 +00:00
taylor 8d44bdaf4d make sure errors in rand_sexp() and rand_internal() are properly handled 2006-03-18 10:26:42 +00:00
taylor 439cfa5e45 some cleanup to the nebula debug console help messages 2006-03-18 10:25:45 +00:00
taylor 3347889a16 never try and load glow or shine maps if we don't have a base map for it
but WMC's bumpmap block in a BUMPMAPPING define since it useless most of the time
2006-03-18 10:25:05 +00:00
taylor b106442d33 make the main vital TMAP_MAX_VERTS stuff dynamic, should handle the major non-HTL related crashes 2006-03-18 10:23:46 +00:00
taylor ff2518fa25 we already have a variable to show the framerate so lets just use the one 2006-03-18 10:17:59 +00:00
wmcoolmon 9ac38958b0 Allow "none" in $Shockwave Model to disable shockwave 2006-03-18 09:25:55 +00:00
Goober5000 2bc810eaa7 add ship-subsys-targetable and ship-subsys-untargetable
--Goober5000
2006-03-18 07:12:08 +00:00
taylor c196e8c971 this should fix the secondary thruster effect flow direction problem 2006-03-17 18:26:40 +00:00
taylor 14c774ef95 beyond some possible out-of-bounds issues, I think this stuff was messing up non-HTL lighting too 2006-03-16 14:23:35 +00:00
taylor bad5c7caf6 make sure our event state doesn't get filled with things we should poll for (was waiting for the new input code, but really needed to get at least this in) 2006-03-15 17:35:24 +00:00
taylor a6d2bc92d9 couple of nitpicks 2006-03-15 17:33:05 +00:00
taylor 16d05bf4fd bump error msg buffer size a little (I'll probably just go dynamic with this since you hopefully won't get this too much anyway) 2006-03-15 17:32:13 +00:00
taylor d0cd9b7b2a remove alut headers, since we don't use any alut functions anyway (didn't I already do this a couple of months ago??) 2006-03-15 17:30:47 +00:00
taylor 429e6525ab bump sexp nodes to 4000 for TBP, really needs to go dynamic soon 2006-03-12 07:35:33 +00:00
taylor 8d278275c2 when I forget that I'm an idiot little things like this slip through (me == moron) 2006-03-12 07:34:39 +00:00
taylor abded996e4 gah, how stupid could I have been! gotta make sure that the symlinks are preserved (keeps file size down too). 2006-03-12 07:31:20 +00:00
taylor 939d60468f update Makefile.am for all of the project files changes, include Xcode stuff too
update code/Makefile.am with FRED2 stuff, might as well in case someone wants to do a winelib port or something
2006-03-08 05:24:11 +00:00
taylor 40006729ff remove asm from MulDiv() since Intel Mac doesn't like it very much, and it doesn't do exactly what it should anyway 2006-03-08 05:22:14 +00:00
taylor c04664849a add model_allocate_interp_data() extern for PPC machines 2006-03-08 05:15:20 +00:00
taylor 51b6d8b1b9 update project file with a bunch of cleanup and universal binary building support
add a Frameworks.zip which contains pre-made universal binary frameworks for Ogg, Vorbis and SDL
2006-03-08 05:13:10 +00:00
taylor 03fa91edb8 add Frameworks directory to the ignore list 2006-03-08 05:09:53 +00:00
taylor fdef4c6b80 don't need these with new project file and frameworks 2006-03-07 09:21:21 +00:00
taylor 0b161c6ae4 make filename length checks non-fatal 2006-03-06 16:30:06 +00:00
taylor 38da59fa62 various small cleanups, fixes, error checks 2006-03-05 21:45:12 +00:00
taylor dfa3724143 remove WMC's "speed increase" ;) (the math isn't right yet so the collision checks won't be correct, and fixing it to work right wouldn't be any faster) 2006-03-05 18:00:55 +00:00
karajorma 672aba310c Bah. Error in secondary and primary ammo SEXPs fixed 2006-03-04 11:05:47 +00:00
Goober5000 7db3ed83ec fix the random-of sexps to only choose valid arguments 2006-03-03 06:14:41 +00:00
Goober5000 0cddf00e4f took care of (hopefully) the rest of Karajorma's SEXP node handle conflicts, plus merged the random sexps with their multiple variants 2006-03-02 04:05:27 +00:00
karajorma daa8de6441 Fixed a bunch of bugs with Set-x-ammo and Rand SEXPs. 2006-03-01 23:22:25 +00:00
karajorma bf70b733fe Added the random-multiple-of SEXP and fixed random-of to work as designed 2006-03-01 20:54:35 +00:00
karajorma c2ea734c56 Changed text FRED displays for Fade-In and Fade-Out SEXPs 2006-03-01 14:53:15 +00:00
Goober5000 502fba611f fix comm message localization 2006-03-01 04:01:37 +00:00
Goober5000 1f3db839e8 not needed... and just an annoyance with > 2 main halls 2006-03-01 04:01:15 +00:00
Goober5000 8b8c6a2e86 oswpt wing fix 2006-03-01 03:14:22 +00:00
Goober5000 a8a1bfbfdb more FS1 import tweaks 2006-03-01 00:46:11 +00:00
wmcoolmon d87360e6ac Silly mistake 2006-02-28 07:52:04 +00:00
Goober5000 9241fc8043 fix another import bug 2006-02-28 07:37:12 +00:00
Goober5000 73af2a1fec cool stuff with main hall music tracks 2006-02-28 06:59:28 +00:00
Goober5000 22f2be0d3d fix the animation type triggers 2006-02-28 05:16:55 +00:00
Goober5000 0014e5f42b add log entry for jettison-cargo 2006-02-27 04:17:11 +00:00
wmcoolmon c47dbebae2 x != y, surprisingly enough 2006-02-27 01:21:03 +00:00
wmcoolmon 19b59199c3 Bump MAX_TFP to 10 2006-02-27 00:51:03 +00:00
wmcoolmon a6eebda3f9 Consistency in Lua 2D funcs; fix FRED2 loading screen images dialog boxes. 2006-02-27 00:40:34 +00:00
wmcoolmon 756a61f6db Afterburner & meta updates 2006-02-27 00:15:08 +00:00
wmcoolmon 57ef52f6ec Targetable as bomb SEXPs and dialog stuff; made invulnerable an object flag in both FRED and FS2. 2006-02-26 23:23:31 +00:00
Goober5000 3245346c91 wow, over a year later and I'm still finding docking bugs :p 2006-02-26 22:47:11 +00:00
wmcoolmon 91cd167d33 SF2_TARGETABLE_AS_BOMBER flag, Lua gr_bitmap_ex fix 2006-02-26 22:23:01 +00:00
Goober5000 9922355122 some more WCSaga stuff 2006-02-26 18:49:07 +00:00
taylor 71299f6f64 one friggin line, should have been able to notice that sooner 2006-02-26 11:09:31 +00:00
taylor c5d99f8837 another non-linear campaign fix, this one affected PVs 2006-02-26 08:06:57 +00:00
Goober5000 e3f020349e fix stupid bug 2006-02-26 05:32:55 +00:00
Goober5000 71f3acb329 guess this is still needed 2006-02-26 05:32:38 +00:00
Goober5000 32b340d20b bah 2006-02-26 01:32:23 +00:00
Goober5000 627b90b89b fix subsystems for get-object-* 2006-02-26 00:43:10 +00:00
Goober5000 cc7c096d32 some paring down of sexps 2006-02-26 00:22:15 +00:00
Goober5000 b2ad92daa5 import tweak 2006-02-25 22:06:57 +00:00
Goober5000 8747465d38 spelling 2006-02-25 21:47:19 +00:00
Goober5000 f504ecb5da fixes from last commit 2006-02-25 21:42:31 +00:00
Goober5000 584fb2a5b6 added function for retrieving a ship, wing, waypoint, or team from a sexp argument
--Goober5000
2006-02-25 20:18:14 +00:00
Goober5000 7cbc657454 some tweaks to the ignore code 2006-02-25 19:03:39 +00:00
karajorma 9774ddecc1 Added Seeding functions to Rand and Rand-Multiple SEXPs 2006-02-25 17:34:23 +00:00
wmcoolmon 1dc1aed65c Fix no text for splash screen scripting problem 2006-02-25 06:57:58 +00:00
taylor 71085ffcb4 try and make some sense out of that cmdline option mess, maybe it will stay sane for a few days at least :) 2006-02-24 07:36:49 +00:00
taylor 39e45eacb2 add v-sync support for OGL (I skimmped on this a bit but will go back to do something better, "special" extension wise, at a later date) 2006-02-24 07:35:48 +00:00
taylor 326f68ee82 fix custom loading screens that I manage to break yet again
add a "MaxFPS" registry/ini option to specify a FPS cap, useful if you can't make use of v-sync for some reason
2006-02-24 07:34:07 +00:00
taylor 7af3194685 vm_extract_angles_vector() doesn't do the same thing that this code used to so don't use it 2006-02-24 07:32:11 +00:00
taylor 6d121c1c3d clean up some of that FS2OpenPXO crap (can't wait to rip all this out for official PXO :)) 2006-02-24 07:31:18 +00:00
taylor eab464576f compiler warning fixage 2006-02-24 07:30:23 +00:00
wmcoolmon 74468eb153 Maybe fix ships-limit bug 2006-02-24 05:13:26 +00:00
Goober5000 9ab540efa8 remove my old anti-frustration thing since it's not what retail does
--Goober5000
2006-02-24 05:02:34 +00:00
wmcoolmon 6185fe9336 I love it when bugs are this easy to fix. ;) 2006-02-24 04:45:00 +00:00
taylor 69b80ad5b4 attempt to fix bad out-of-bounds (and related) issues when weaponchoice icon is missing
be sure to always initialize frame count and FPS with bm_load_animation() calls in case caller got lazy
2006-02-23 06:21:56 +00:00
karajorma 24a4b142bf Added the String-to-int SEXP. 2006-02-23 01:37:51 +00:00
taylor 4ae489e5d0 fix subsystem distance check from single ship to subsystem (this has been broken since day 1, over 3 years ago, so there could be other Mantis bugs relating to this) 2006-02-22 18:32:18 +00:00
karajorma 25904b40c6 Changed the set-secondary-ammo and set-primary-ammo SEXPs to use the banks
capacity rather than starting ammo.
2006-02-22 00:04:04 +00:00
karajorma 9aae6f74e3 Fixed the problems with set-primary-ammo and set-secondary-ammo SEXPs 2006-02-21 22:20:04 +00:00
karajorma c0bcbd8cd4 Added the get and set-primary-ammo SEXPs. The set-primary-ammo
and set-secondary-ammo SEXPs appear to be broken at the moment though
2006-02-21 21:40:25 +00:00
Goober5000 e6fd50c4a7 more true/false tweaks and redid the get-object-* and set-object-speed-* sexps to be more flexible and extensible
this will break compatibility with certain uses of these sexps in existing missions; I don't think there are any released campaigns
with the old versions so hopefully mission designers can simply update unreleased missions... however if it gets to be a problem
I will code in some reverse compatibility

--Goober5000
2006-02-21 09:08:10 +00:00
Goober5000 49059aaea0 add a bunch of tweaks to hopefully lessen the possibility of misinterpreting special return values (such as nan) as true or false
--Goober5000
2006-02-21 07:58:01 +00:00
taylor c547fd7352 make changed object type debug message a bit more useful 2006-02-21 07:12:59 +00:00
karajorma f56a087069 Added the num-ships-in-wing, get-secondary-ammo and set-secondary-ammo SEXPs 2006-02-20 20:53:11 +00:00
Goober5000 ed0ad344a9 fixed several more things in the new ignore code
--Goober5000
2006-02-20 07:59:26 +00:00
taylor e473e600b9 updated to newest dynamic starfield code
- this mainly is to just better support SEXP based starfield bitmap changes (preloading, better in-mission stuff loading)
 - also fixes index_buffer related double-free()
 - done waste memory for env index buffer if env is not enabled
 - address a couple of bm load/release issues and comment a little to tell why
2006-02-20 07:30:15 +00:00
taylor f9fe94ef49 div-by-0 bug fixage 2006-02-20 07:26:07 +00:00
taylor d3bf2d5b0f handle badly encoded (has short reads due to strange block/data size ratio) ADPCM files a little better in debug builds 2006-02-20 07:25:14 +00:00
taylor 2783f86320 start of some of the newer GL stuff
- initial support for dropping from fullscreen to windowed mode (will get more changes in another day or so, mainly because of FRED2)
 - a little cleanup
 - init change for WGL to be a little safer and to help report what it tried to use and what it got in the way of pixelformat
 - don't use global OGL_enabled to decide if GL is initialized or not (also getting more changes shortly)
 - make sure opengl_close() will always execute properly through atexit() (also getting changed later to not run through atexit())
2006-02-20 07:23:29 +00:00
Goober5000 1425f4774f hmm, remove one form of commenting 2006-02-20 05:54:44 +00:00
Goober5000 93d23f857a added ai-ignore-new which hopefully should fix the ignore bug
--Goober5000
2006-02-20 02:13:08 +00:00
Goober5000 acbd81cebe reduce confusion in naming
--Goober5000
2006-02-19 23:14:22 +00:00
Goober5000 c5b832dea2 restore original ignore behavior and remove soon-to-be-obsolete ai-chase-any-except
--Goober5000
2006-02-19 22:00:10 +00:00
Goober5000 197960047d rearrange some turret code to be more like retail
--Goober5000
2006-02-19 07:20:43 +00:00
Goober5000 0c25c442e2 fix stealth
--Goober5000
2006-02-19 03:17:01 +00:00
wmcoolmon 74306d9663 Oops 2006-02-19 02:04:40 +00:00
wmcoolmon 74ed40d63a Documentation consistency; remove unneeded check. 2006-02-19 02:01:24 +00:00
Goober5000 17773591a3 breathalyzer for WMC, stat!
--Goober5000
2006-02-19 00:59:49 +00:00
Goober5000 8278e0f44e fixed saving of special tags
--Goober5000
2006-02-19 00:49:41 +00:00
Goober5000 c3b3a75d19 additional error checking
--Goober5000
2006-02-19 00:32:47 +00:00
Goober5000 062aa69b38 center cbanis
--Goober5000
2006-02-19 00:29:39 +00:00
wmcoolmon 312cc178b6 Introducing draw_model_rotating; many improvements to weapon selection missile rendering 2006-02-18 00:42:51 +00:00
wmcoolmon 496395d498 Fix a silly bug 2006-02-17 21:47:47 +00:00
Goober5000 ba967dee96 bother those variables 2006-02-17 08:36:16 +00:00
Goober5000 6df44ceaa6 fix subtle bug
--Goober5000
2006-02-17 08:13:53 +00:00
wmcoolmon d4a7ff97bb Various updates for consistency in documentation 2006-02-16 06:00:49 +00:00
taylor 6be29e0fdf keep weapon model refcount correct (this is admittedly strange, but safer than before) 2006-02-16 05:48:48 +00:00
taylor 75727a19df I never did really like the old audiostr OpenAL change here, this just seems safer
initialize si->data and si->size before loading sound buffer (fixes OGG issue for plats that don't zero-initialize <vector>, this will be handled differently in the new code)
2006-02-16 05:47:32 +00:00
taylor 1b2721b088 remove reset of modelnums on level start (more properly moved to model_unload())
minor change ship class fixage to clear out old model
take better care to make sure that a ship model has the proper refcount (this needs further work, I don't like :V:'s crap here)
add <string> to includes in ship.h, fixes a compile issue that I forgot to fix properly before (thanks Jens)
2006-02-16 05:44:53 +00:00
taylor bf0eeb27b5 please stop modifying the passed node value in sexp functions, it makes it very difficult to debug problems 2006-02-16 05:40:58 +00:00
taylor d04ee2f2e0 some FS2NetD fixes
- timer/timeout issues
 - keep server heartbeats to a minimum in order to save some bandwidth
 - clean up some debug message a little
2006-02-16 05:39:13 +00:00
taylor c1f9b7efcf NULL vec warning fix (basically just setup as if it were NULL and skip the extra work if needed)
more bmpman related fixes, mainly addresses the condition where it would try to render textures that have been released
have model_unload() run through Ship_info[] and clear out modelnum's when they are free'd (makes more sense here than doing it on level load to keep counts right)
fix missing subsystem warning messages
2006-02-16 05:31:00 +00:00
taylor 4bd1a26311 should fix some of the model/bmpman errors off of the weaponchoice screen 2006-02-16 05:24:35 +00:00
taylor 146e2c192d I would say this is another selling point for the boozer-svn plugin, but I would have needed it too as I've missed this stuff several times 2006-02-16 05:19:46 +00:00
taylor 7e133609d3 all just getting basic info in parse_mission_info(), this fixes several parsing/warning issues that can show up
from going in the techroom and some similar FRED2 issues as this stuff doesn't get reset between get_mission_info() calls.
  this also should make the mission simulator screen load a bit faster
2006-02-16 05:18:48 +00:00
taylor 79050b101f fix strangeness with persona index thingy (ubyte can't be -1, this needs to be left like this or make an int)
address some pilot file corruption using non-linear campaigns, rather simple fix for something that took quite a while to track down
2006-02-16 05:15:48 +00:00
taylor d9752473af NULL vec warning fix (I don't really like this one that much so it may get replaced later) 2006-02-16 05:09:26 +00:00
taylor f1b2d2af86 minor 64-bit related fixage 2006-02-16 05:07:50 +00:00
taylor 6e8aab4827 various camera fixes (did this ever work properly?)
- handle basic init properly for those platforms that do/don't zero-initialize STL vector
 - allow text images without witten text
 - don't try to process text if it's NULL or of 0 length
 - don't get freaky with image handling
 - add clone/assignment operator so that push_back() will not screw up bmpman stuff
2006-02-16 05:07:08 +00:00
taylor 11830f47b7 various bmpman related fixes
- some new error checking (and fixes related to that) and cleanup
 - fix EFFs not getting released/unloaded properly (was in a local tree but apparently missed CVS)
 - minor fixes for bm_release() to produce a more properly cleaned slot
 - use fast unloading for page_in stuff since we don't actually want really want the load count changing for texture maps
   and to make sure that we free the memory usage regardless of load count
2006-02-16 05:00:01 +00:00
taylor 1e0c0f2235 couple more lighting value tweaks 2006-02-16 04:55:53 +00:00
taylor 1cd7e8f606 newline fixage 2006-02-16 04:55:14 +00:00
wmcoolmon 2981450fa2 Dodge an Assert 2006-02-15 07:30:54 +00:00
wmcoolmon 4d02e1217e Blah, pulled a Goober. 2006-02-15 07:26:52 +00:00
wmcoolmon f606fe7a5c Various weapon and team related scripting functions; $Collide Ship and $Collide Weapon hooks 2006-02-15 07:19:50 +00:00
Goober5000 01ecd46ee6 enabled modular tables for ai_profiles and added the default table to def_files
--Goober5000
2006-02-13 04:56:58 +00:00
Goober5000 fa4a39a8c7 nitpick 2006-02-13 03:11:19 +00:00
Goober5000 31bb6acc9d more tweaks, plus clarification of checks for the existence of files
--Goober5000
2006-02-13 00:20:46 +00:00
wmcoolmon 3d4295ca95 Remove initial corkscrew values from parse_weapon 2006-02-12 17:54:35 +00:00
Goober5000 7b31df805b allow specification of debriefing personas
--Goober5000
2006-02-12 10:42:25 +00:00
Goober5000 c5b61babeb whoops, forgot this 2006-02-12 08:39:32 +00:00
Goober5000 f5ba1e19b0 additional fixes and enhancements for substitute music
--Goober5000
2006-02-12 05:23:16 +00:00
Goober5000 2a061c3fdc more cool work on importing, music handling, etc.
--Goober5000
2006-02-12 01:27:47 +00:00
Goober5000 ca4e256101 bumped to 3.6.8 because of version-specific commenting
--Goober5000
2006-02-11 22:10:11 +00:00
Goober5000 cd26bde8e9 removed the FS1-specific music hack
--Goober5000
2006-02-11 22:08:56 +00:00
Goober5000 a986c1e2a2 this isn't needed now
--Goober5000
2006-02-11 21:24:05 +00:00
Goober5000 3405ad64de reworked how comments are parsed and added version-specific commenting
--Goober5000
2006-02-11 21:23:42 +00:00
wmcoolmon 606708f0e0 getWeaponClass->getWeaponClassByName, Linked/DualFire variables 2006-02-11 19:24:17 +00:00
Goober5000 6651e9f32d RT's bugfix 2006-02-11 07:34:25 +00:00
Goober5000 41f95a7f5e two things I missed before
--Goober5000
2006-02-11 07:31:55 +00:00
Goober5000 b99f6819c4 yet more various and sundry fixes
--Goober5000
2006-02-11 02:58:23 +00:00
Goober5000 c833458e9a more fixage
--Goober5000
2006-02-11 01:02:28 +00:00
Goober5000 4ee85f2ea7 more FS1 import goodness
--Goober5000
2006-02-11 00:13:55 +00:00
Goober5000 5d4852df2e fixed an old Volition bug unmasked by my parse changes
--Goober5000
2006-02-10 23:33:39 +00:00
wmcoolmon fc54469c0a Removed resize fields; fixed silly bug with RunBytecode 2006-02-09 05:07:02 +00:00
wmcoolmon ce8ec37de8 Maybe fix gliding insta-turn problem 2006-02-08 02:10:39 +00:00
wmcoolmon a956ebf70f WMC-Since we're abusing species_defs.tbl anyways, remove $NumSpecies 2006-02-06 02:29:17 +00:00
wmcoolmon 02eb2a16a1 Various fixes; very beginnings of Directives scripting support 2006-02-06 02:06:02 +00:00
Goober5000 ca1e2ae810 fixed several IFF bugs in FRED (plus one or two other bugs)
--Goober5000
2006-02-04 07:05:03 +00:00
taylor 41448cf7b0 fix sun flares that I had broken previously 2006-02-03 22:29:01 +00:00
taylor 3f2b3cb49f a couple of mvalid.cfg and tvalid.cfg file format changes to give them at least some readability
some cleanup, extra logging, and very slight speedup with mission and table validation checking
fix memory leak from mission and table validation checking
2006-02-03 22:28:10 +00:00
taylor 31a1c0b81f I don't like this being considered a fix without retail compatibility testing, but it should at the very least compile... 2006-02-03 22:25:18 +00:00
Goober5000 68f0190dc0 ugh, more ship/wing fixage
--Goober5000
2006-02-02 08:12:47 +00:00
Goober5000 d5de7aefec bah and double bah 2006-02-02 07:13:42 +00:00
Goober5000 8d5f3eb959 fixed what I broke for ship types :p
--Goober5000
2006-02-02 07:01:16 +00:00
Goober5000 e3ae13d7dd consolidated comm order stuff
--Goober5000
2006-02-02 07:00:29 +00:00
Goober5000 69e2beb10a replaced Fred_comm_orders with proper Comm_orders, just for WMC ;)
--Goober5000
2006-02-02 06:22:58 +00:00
Goober5000 a53e6c7b74 restore retail compatibility with comm orders: one logic bugfix, one cosmetic bugfix
--Goober5000
2006-02-02 06:04:02 +00:00
Goober5000 6338c13bae fixed a FRED problem brought on by the parse reordering
--Goober5000
2006-02-02 05:48:17 +00:00
phreak b976ebc8b9 Allow weapons to home in on countermeasures as well. The multiplayer code was only allowing bombs to be homed in on. 2006-02-01 23:43:34 +00:00
phreak fbaeb10cd2 -ingame should be -ingame_join 2006-02-01 23:35:31 +00:00
taylor c2c2b69a9d add local lua dir to includes 2006-02-01 13:30:12 +00:00
Goober5000 19dd7af5a4 now all the project files are working :)
--Goober5000
2006-02-01 08:05:47 +00:00
Goober5000 0e734baf44 try fixing this again 2006-02-01 05:40:44 +00:00
Goober5000 c5f879d372 bettered the ballistic primary check
--Goober5000
2006-02-01 05:11:25 +00:00
Goober5000 5e7b8e14d0 fixed project folder settings 2006-02-01 04:29:30 +00:00
taylor 47b8515aee oh the shame (/me imagines the big grin on Goober's face right now :p) 2006-01-31 17:19:20 +00:00
taylor 4e7473d94e remove USE_LUA 2006-01-31 15:44:55 +00:00
taylor 5a2cecb05e we need to skip to the start of the string, not the end 2006-01-31 15:44:29 +00:00
wmcoolmon fb23f6d361 Removed USE_LUA; Simulation hook; better debug messages for Lua; swapped out mounted weapon functions for variables 2006-01-31 06:46:14 +00:00
wmcoolmon 45760b32bf Compiler warning fix 2006-01-31 06:44:48 +00:00
wmcoolmon 65694ccf6e Debug warning; compiler warning fix. 2006-01-31 06:43:21 +00:00
wmcoolmon 1106a7af9a Removed USE_LUA 2006-01-31 06:42:28 +00:00
wmcoolmon 26c9b9c22d Scripting simulation hook; removed USE_LUA 2006-01-31 06:42:00 +00:00
wmcoolmon 90cf8fc7ef Fix hack for checking for ballistic primary ammo 2006-01-31 06:32:42 +00:00
Goober5000 a6ba03c9f4 stuff 2006-01-31 04:24:25 +00:00
Goober5000 dd0b86e564 oh noes! :( 2006-01-31 04:13:00 +00:00
Goober5000 f437c999a9 fix a potential problem with replacement range
--Goober5000
2006-01-31 02:02:33 +00:00
Goober5000 b00090cd29 update FSM import for FSPort v3.0
--Goober5000
2006-01-31 01:53:37 +00:00
taylor 985d861732 fix problem that made briefing voice repeat first second or two in OpenAL 2006-01-30 22:09:52 +00:00
taylor 4f28325994 some minor fixage 2006-01-30 22:08:59 +00:00
taylor de01dc405d and after all of my recent work fixing div-by-0 zero bugs, ya had to know this was coming :) 2006-01-30 19:37:33 +00:00
taylor 87a8b123a9 fix parsing of reinforcements 2006-01-30 19:35:41 +00:00
taylor d02d542fac make sure to init dest and dest_size for any calling functions that don't 2006-01-30 07:14:32 +00:00
taylor 3f599bcf26 fix endless loop when we've got too many weapons 2006-01-30 07:00:14 +00:00
taylor 2ecc191857 try and handle things like $$ and ## a bit better (this worked for what I threw at it but please double-check me here Goober) 2006-01-30 06:58:10 +00:00
taylor 96c6bdacec better lighting for OpenGL
remove some extra stuff that was from sectional bitmaps since we don't need it anymore
2006-01-30 06:52:15 +00:00
taylor 42c4cdd754 make MAX_LIGHTS global 2006-01-30 06:41:34 +00:00
taylor 25569bebcf better lighting for OpenGL
remove some extra stuff that was from sectional bitmaps since we don't need it anymore
some basic lighting code cleanup
2006-01-30 06:40:49 +00:00
taylor 5da0a66ddd clean up lighting stuff a little 2006-01-30 06:38:34 +00:00
taylor 4d63cf4769 account for a freaky wing issue (saw this in Derelict, or somewhere) 2006-01-30 06:37:49 +00:00
taylor cfd3d70987 handle Interp data allocation a little better 2006-01-30 06:36:35 +00:00
taylor b9c7b01ff6 minor warning fixage 2006-01-30 06:36:01 +00:00
taylor 60dd6b6ab3 minor fixage 2006-01-30 06:35:29 +00:00
taylor cade5bfea9 (possibly) better fix for some static/stuttering in certain wav files 2006-01-30 06:35:02 +00:00
taylor 4a34a158b0 try and detect some bad path info 2006-01-30 06:34:06 +00:00
taylor db36f73445 add transparent, cycling alpha, and no-light options for weapons 2006-01-30 06:33:19 +00:00
taylor 2e82436028 dynamic starfield bitmaps (if the thought it was freaky before, just take a look at the new and "improved" version ;)) 2006-01-30 06:31:30 +00:00
taylor 6965a6a84a dynamic starfield bitmaps 2006-01-30 06:30:03 +00:00
wmcoolmon bcad5469b8 Apologies, don't know how I missed this... 2006-01-29 18:01:04 +00:00
wmcoolmon 82b02677dc Make sure stuff is set up properly for ship kills 2006-01-29 07:42:49 +00:00
wmcoolmon fef970a13d Minor warning update 2006-01-29 07:41:57 +00:00
Goober5000 a6a7372c97 fix all teams at war IFF behavior
--Goober5000
2006-01-28 04:33:06 +00:00
Goober5000 fdbbc56725 fixed the bug where wings couldn't be initially docked to stuff
--Goober5000
2006-01-28 02:59:55 +00:00
Goober5000 532809a656 fixed a small incompatibility
--Goober5000
2006-01-28 00:23:36 +00:00
Goober5000 c0cd19b0a2 some tweaks for insertion sort
--Goober5000
2006-01-27 20:29:30 +00:00
Goober5000 ab1a0eeedf replace quick sort with insertion sort in many places
--Goober5000
2006-01-27 06:21:10 +00:00
Goober5000 411be31efc add an insertion sort function for small or almost-sorted arrays; it has the same prototype as stdlib's quick sort
--Goober5000
2006-01-27 06:03:41 +00:00
Goober5000 b388c2a9da a few project file fixes
--Goober5000
2006-01-27 04:06:31 +00:00
phreak 9d38626cb4 Grid zbuffering issue fix moved to the new fred project folder 2006-01-26 23:04:45 +00:00
Goober5000 fe552db39e spelling 2006-01-26 04:01:58 +00:00
taylor 01b5c513e8 first version of this sucked, this should be a bit better while working with both new and retail data
- get an average color from the palette rather than picking first (unoptimized palettes could have unused pixels in first entry)
  - slight cleanup, and s/colour/color/ (yeah, stupid American, deal with it! :))
2006-01-26 03:59:59 +00:00
Goober5000 1e2f2296e8 added variable replacement to command briefings, briefings, and debriefings
--Goober5000
2006-01-26 03:58:14 +00:00
Goober5000 2f9af7b19c pare down the pragmas some more
--Goober5000
2006-01-26 03:23:30 +00:00
Goober5000 48b4f603ac ugh; these scripting #defines really need to be kept up-to-date 2006-01-26 02:26:17 +00:00
taylor 3c9494535c quick and ugly hack to get aigoal sorting working on Windows again (temporary, should be replaced by better and permanent sorting function) 2006-01-25 22:51:07 +00:00
wmcoolmon 196e612ea1 Maybe fix G3_count error 2006-01-25 07:46:13 +00:00
phreak a762accd17 htl_lines should follow zbuffering rules 2006-01-25 03:11:52 +00:00
taylor 71a15f1b21 break out of error check loop after the first check in FRED since it doesn't like this for some reason 2006-01-24 13:38:30 +00:00
taylor b408734f17 another NaN/div-by-0 bug 2006-01-23 13:51:11 +00:00
taylor 75471226d5 fix d3d_bitmap_ex coloring (thanks Alpha0!) 2006-01-23 09:39:30 +00:00
taylor 867ab841c0 add fixes for capships that hit waypoints and just spin around
try and fix a big ship guard NaN error that is the result of an incredibly small forward speed value
2006-01-22 22:41:16 +00:00
wmcoolmon 3922659ee8 0...1...2...4? 2006-01-22 19:57:35 +00:00
taylor d71cd89d5f more class type name fixage (maybe an AltName: line for objettypes.tbl in the future?)
if a ship has no class_type in ai_chase() then assume it's ok to chase, but log it in debug
  (uncomment Int3() here after this has been tested a little more)
2006-01-22 14:09:01 +00:00
taylor 9d16c71b18 oops, didn't notice that was out of the wrong diff 2006-01-22 01:35:23 +00:00
taylor c691641dcf warning fixage
don't Int3() when trying to set ship speed via sexp if ship is not in mission yet, this shouldn't be fatal
2006-01-22 01:33:39 +00:00
taylor 073a792c67 newline fixage 2006-01-22 01:32:07 +00:00
taylor 5944464e20 no real need to cast these so just get it right in the first place 2006-01-22 01:31:44 +00:00
taylor 72c15efe38 clear depth buffer on each page flip (may give a slight speed increase)
change error check handling again, FRED may like this better but if it starts hanging again I have another fix
little safety checks for opengl_close()
fix atexit() call for OGL closeout
2006-01-22 01:30:33 +00:00
taylor 195b8688e1 handle NULL ptr ref in debug message (needs to be reconsidered as to whether the function should actually return here or not) 2006-01-22 01:28:06 +00:00
taylor 0d810f08d2 fix temp ptr warning, untested but could possibly be less error prone in some situations 2006-01-22 01:26:15 +00:00
wmcoolmon 8d0031dcd6 Texture replacement stuff 2006-01-21 09:36:58 +00:00
taylor bc89f95379 long way to go for a simple div-by-0 fix 2006-01-21 02:43:23 +00:00
wmcoolmon 7a40fe7cdc Scripting updates; Special scripting image list; Better operator meta; Orientation type; Wing type; Texture type. Fix for MSVC7 compiling. 2006-01-21 02:22:05 +00:00
taylor 53f2b228d0 that wasn't too smart of me, move extra anim filename size check to *after* we have found an anim 2006-01-21 01:56:58 +00:00
taylor 07807a9417 don't forcefully disable multisample still (part of an old ATI fix that didn't actually fix anything) 2006-01-21 00:14:25 +00:00
taylor d0ec8435f1 fix for LuaError change, *again* ;) 2006-01-21 00:11:51 +00:00
taylor 9b299e520b fix anim filename length check, they need at least 5 extra characters for the frame number on the filenames 2006-01-20 23:47:51 +00:00
wmcoolmon 3d8e063072 Lua unloadMission() 2006-01-20 17:37:38 +00:00
taylor 7ac46baa04 gr_*_bitmap_ex() stuff, D3D side is 100% untested to even compile
several other very minor changes as well
2006-01-20 17:15:16 +00:00
Goober5000 e59ea2686b remove unreferenced variable 2006-01-20 07:50:25 +00:00
Goober5000 672d33567c fix warning message
--Goober5000
2006-01-20 07:21:33 +00:00
Goober5000 5f61c6698c reordered #include files to quash Microsoft warnings
--Goober5000
2006-01-20 07:10:34 +00:00
Goober5000 392140a3d7 sorted the #include listing again
--Goober5000
2006-01-20 06:26:41 +00:00
Goober5000 05051081d1 added a missing file
--Goober5000
2006-01-20 06:24:28 +00:00
Goober5000 b8fb4ebf0b hopefully fix the Microsoft warnings
--Goober5000
2006-01-20 06:24:01 +00:00
wmcoolmon 6a50a28799 Updated FREDStubs.cpp to most current version 2006-01-20 05:35:59 +00:00
wmcoolmon 53f33c6529 Added FRED2 project file to CVS for MSVC7 2006-01-20 05:34:42 +00:00
Goober5000 2f7f66b429 fixed a sexp help message
--Goober5000
2006-01-20 04:33:21 +00:00
wmcoolmon 6032276576 GCC compile fixes 2006-01-20 03:48:35 +00:00
wmcoolmon 6f99c4e3f1 Faster object handles 2006-01-19 22:25:01 +00:00
wmcoolmon f4f8d28209 More Lua checks; added Lua vector object; better operator support. 2006-01-19 20:18:12 +00:00
wmcoolmon d5425998f9 Lua debugging stuff; gr_bitmap_ex stuff for taylor 2006-01-19 16:00:04 +00:00
taylor c954cf4088 don't attempt to draw glowpoints or engine glows when in wireframe mode (this may need to be a flag or something, but I'm not sure) 2006-01-19 14:06:33 +00:00
taylor 34bf938f98 better error handling for OGG Voris files 2006-01-19 11:49:12 +00:00
wmcoolmon 4c5e6bae52 Possible overflow check 2006-01-19 05:40:19 +00:00
phreak fc5414c2fc gr_render_buffer shouldn't be returning values if it's supposed to return void 2006-01-19 03:20:49 +00:00
phreak ddd208201e give repair-subsystem and set-subsystem-strength a fourth optional parameter used to possibly regenerate the submodel of a given subsystem
sabotage-subsystem should make the subsystems explode
2006-01-19 03:17:12 +00:00
phreak a09468be15 obj_script_set_global() should have an #ifdef/#endif USE_LUA pair in the function body. 2006-01-19 03:15:31 +00:00
Goober5000 4bbf5da5ba whoops, messed up the paths
--Goober5000
2006-01-19 02:51:00 +00:00
Goober5000 8645d371dc import FRED2 back into fs2_open module
--Goober5000
2006-01-19 02:27:38 +00:00
Goober5000 ffd76acd92 add lowercase .ico file 2006-01-19 02:00:39 +00:00
Goober5000 d6b7619ad1 remove uppercase .ico file 2006-01-19 02:00:00 +00:00
taylor 261ec77c66 this is probably going to end up doing something bad again when switching mods, hopefully it's not still necessary though 2006-01-18 17:45:01 +00:00
taylor 945d2e0f99 oops! :) 2006-01-18 16:36:32 +00:00
taylor 3228a365bb use HTL wireframe view if in HTL mode 2006-01-18 16:17:33 +00:00
taylor bf6ecae647 allow gr_render_buffer() to take TMAP flags
let gr_render_buffer() render untextured polys (OGL only until some D3D people fix it on their side)
add MR_SHOW_OUTLINE_HTL flag so we easily render using HTL mode for wireframe views
make Interp_verts/Interp_norms/etc. dynamic and get rid of the extra htl_* versions
2006-01-18 16:14:04 +00:00
taylor bc115d988e if a weapon model isn't loaded then be sure to load it in weapon_create() (catches a few weird weapon setups) 2006-01-18 16:02:26 +00:00
taylor b7832b7730 support only PCX for the nebula background graphics (given how it works that's the fastest and easiest way to get it done) 2006-01-18 16:01:14 +00:00
taylor 3ade8b5d0e show poly flag setting was reversed 2006-01-18 15:59:33 +00:00
wmcoolmon 5c51bb7c9e Various scripting updates 2006-01-18 06:13:18 +00:00
wmcoolmon c8c7be9b3f Switch ballistic weapon hudgauge to show "Energy" field in place of pure-energy weapons 2006-01-17 17:41:05 +00:00
wmcoolmon c451e89322 Better state handling; added GameInit hook 2006-01-17 07:28:39 +00:00
wmcoolmon 540cfa86c1 Various minor improvements 2006-01-17 07:10:01 +00:00
wmcoolmon c91c1d14e5 Removed #ifdef around Object_type_names extern 2006-01-17 04:11:26 +00:00
phreak 3d12a5038f Make sure the rearm eta isn't recalcuated until the player docks again with a support ship 2006-01-17 03:48:25 +00:00
phreak 70c843a92d Modified the formatting for the rearm countdown timer once docked. 2006-01-17 03:46:56 +00:00
phreak ffef71b0e0 Rearranged the rearming code so it doesn't potentially take 2 minutes to reload a single bomb. 2006-01-17 03:45:32 +00:00
wmcoolmon 1fba6643ff data/scripts directory 2006-01-17 02:33:20 +00:00
taylor 61513eda31 well that was super smart of me 2006-01-17 01:31:43 +00:00
wmcoolmon 1fd2e6183a Fix scripting; Tidy up scripting.html; Replace various functions with virtual variables 2006-01-17 01:31:20 +00:00
wmcoolmon 7152f462ac drawText => drawString 2006-01-16 23:29:06 +00:00
wmcoolmon 84509ecb1b Added support for setting handle variables with LUA_VAR; added support for array indexing with LUA_INDEXER; use LUA_SETTING_VAR to check whether in setting mode for both. Cleaned out older code 2006-01-16 21:26:19 +00:00
taylor d12146c399 some minor changes to model_should_render_engine_glow(), better safety checks, support for disrupted engines
check to see if a particular engine is disabled/destroyed/disrupted before making engine wash for it
2006-01-16 20:57:03 +00:00
taylor 788346132d compile fix 2006-01-16 20:54:58 +00:00
wmcoolmon 61b0961b1b Use obj_script_set_global for "plr" and "slf"; remove Lua variable if variable goes to NULL 2006-01-16 11:16:07 +00:00
wmcoolmon 76b72c21a1 Changed object's "getType" to "getBreed" to avoid confusion 2006-01-16 11:12:46 +00:00
wmcoolmon 566683d944 Can't forget #End! 2006-01-16 11:07:37 +00:00
wmcoolmon a532dfe749 Various warning fixes, scripting globals fix; added "plr" and "slf" global variables for in-game hooks; various lua functions; GCC fixes for scripting. 2006-01-16 11:02:23 +00:00
phreak 725f48d83f Only display the capped normal message in debug builds 2006-01-16 07:46:03 +00:00
Goober5000 22a6ee7e4b use IFF colors in escort list 2006-01-16 05:54:21 +00:00
taylor cb56528cd5 correct get/set sample math, it expects 8-bit sizes so we have to convert to/from actual 2006-01-15 21:22:22 +00:00
taylor f199e105d6 another NULL VEC3D warning fix 2006-01-15 18:56:45 +00:00
taylor 6822ac268e fix compile issues from bad constructor
make sure ai_actively_pursues gets filled for modular tables too
fix NULL ptr reference when parsing ship type which doesn't exist and is set to not create
2006-01-15 18:55:27 +00:00
taylor 2c49f2319e fix stuff_boolean() debug spew 2006-01-15 18:53:19 +00:00
Goober5000 6e32da638d fix some tweaky thing that isn't even used :p
--Goober5000
2006-01-15 01:02:01 +00:00
wmcoolmon 26cc1a7742 Special shockwave and moving capship bugfix, (even more) scripting stuff, slight rearrangement of level management functions to facilitate scripting access. 2006-01-14 19:54:55 +00:00
taylor 9d85cfe870 minor OGL lighting fix 2006-01-14 19:25:55 +00:00
wmcoolmon a05865d418 Allow RunByteCode to return an argument 2006-01-14 10:35:41 +00:00
wmcoolmon a113b16c2b New Lua feature - globals control. 2006-01-14 09:21:27 +00:00
taylor a8528fac46 make sure rship gets initialized before use 2006-01-14 06:25:11 +00:00
taylor 83f75aae47 get object vars correct 2006-01-14 06:24:27 +00:00
taylor b18cf46162 be sure to account for skipped mipmap levels in calculation of textures in VRAM 2006-01-14 06:23:39 +00:00
Goober5000 aa3218101d tweaky tweak
--Goober5000
2006-01-14 05:36:06 +00:00
phreak 01cacc1109 Tried to make the sphere size more uniform on opposite ends of the orb
Modified the radar disruption angle scale a bit.  Went from 200 degree to 20 degree disruption.  Otherwise, it was very confusing to find hidden objects.
2006-01-14 04:44:29 +00:00
phreak 0b6c4a0811 Make orb radar mode drawing again.
Clarify "fudge" variable used for viewing transformations
2006-01-14 03:28:29 +00:00
wmcoolmon a432a38e83 Grr...fix out-of-sync game states 2006-01-14 01:51:49 +00:00
wmcoolmon 22fa83c886 Added a few more functions 2006-01-14 01:20:16 +00:00
wmcoolmon bb2b1919f3 Oops 2006-01-14 01:15:11 +00:00
wmcoolmon 3523f2a381 Campaign scripting functions 2006-01-14 01:12:35 +00:00
taylor e2ce25bd66 move SDL autoconf checks up so we get the defines earlier
fix some Lua build problems on Linux (enabled by default now, but with configure option)
newline fixage
comment fixage
2006-01-13 14:19:34 +00:00
taylor 9a1462c758 hmm, didn't put much thought in that the first time, this should work closer to the original but still be cleaner 2006-01-13 13:06:15 +00:00
taylor 2f0bc312ea fix hud comm message screwups (missing support ship, no coverme, etc) that was part :V: bug and (bigger) part Ship_types related bug 2006-01-13 11:09:45 +00:00
taylor e8e2af7762 swap order of pilot read and reset-to-defaults so that the various entries in the pilot file don't get clobbered needlessly 2006-01-13 08:27:43 +00:00
wmcoolmon 8a8811b346 More scripting stuff 2006-01-13 04:46:17 +00:00
Goober5000 daedc76eba add a necessary #ifdef
--Goober5000
2006-01-13 04:36:21 +00:00
Goober5000 6070ee973e oops
--Goober5000
2006-01-13 04:12:23 +00:00
Goober5000 ce7cb583d8 remove FS2_VOICER define by default; this should really be kept in local copies
--Goober5000
2006-01-13 04:11:49 +00:00
Goober5000 af29186ae5 übercommit of custom IFF stuff :) 2006-01-13 03:31:20 +00:00
Goober5000 ad4da02782 formatting, meh
--Goober5000
2006-01-13 02:56:01 +00:00
wmcoolmon d6a9bc8b97 Even more scripting stuff. 2006-01-12 17:42:56 +00:00
wmcoolmon e348177e06 Finished committing codebase 2006-01-12 04:18:10 +00:00
wmcoolmon 0d61ee4b41 Oops, missed a file 2006-01-12 04:16:27 +00:00
wmcoolmon a579001520 Fix bug with float return; update scripting.html format 2006-01-11 22:09:41 +00:00
wmcoolmon a7f066cad7 More scripting functions, various scripting enhancements 2006-01-11 21:24:37 +00:00
wmcoolmon 92e7163230 Made turret handling code more descriptive 2006-01-11 21:23:43 +00:00
wmcoolmon 71b6357623 Somewhat better turret comments 2006-01-11 21:15:15 +00:00
taylor cc47681a4b allow for an equals value in qsort() comparison function, will hopefully fix Enif station bug and not cause any new problems 2006-01-11 05:42:17 +00:00
taylor c7b527fd64 use cf_find_file_location() check instead of cfopen() for is_spary_hi check 2006-01-11 05:40:59 +00:00
taylor 60ad956c3e newline fixage 2006-01-11 05:40:09 +00:00
taylor 2a0ff30b8e skip ourselves in hostile check, this isn't really needed since it's handled by the next check but for clarity sake it's here now 2006-01-11 05:39:49 +00:00
wmcoolmon 58df873315 Complete the HUD scripting hook. (Eight lines of code, and I still miss three of them. :P 2006-01-11 01:35:53 +00:00
randomtiger 0146194f66 Took demo compile flag off. 2006-01-10 18:39:40 +00:00
randomtiger 94503d5da6 Improvements to voice recognition system.
Also function put on -voicer launcher option.
2006-01-10 18:37:46 +00:00
phreak c7ed7640e1 Fixed a logic error when dealing with non-targetable subsystems 2006-01-10 01:23:09 +00:00
phreak dfd3306f4f Add the argument for alpha color when using set-jumpnode-color. This was defaulting to some junk value and making the jumpnode disappear. 2006-01-10 00:12:08 +00:00
phreak 9ef6ca64d1 Argument checking when setting jumpnode color. 2006-01-10 00:11:03 +00:00
phreak 9782a6b52e Remove tertiary weapons in their current form, I want something more flexable instead of what I had there. 2006-01-09 04:54:51 +00:00
phreak 69b36d1824 fix compile warnings. 2006-01-09 04:52:34 +00:00
taylor 89e4543401 newline fixage 2006-01-08 13:05:41 +00:00
taylor f8af83a132 make sure that thrusters will still render with a missing primary bitmap if they have a primary glow 2006-01-07 12:48:04 +00:00
taylor 38514b3511 I refuse to comment on my own stupidity! (fixes music interruption) 2006-01-06 11:25:29 +00:00
wmcoolmon 51f843c9ca turret-target-order SEXPs, ship thrusters 2006-01-06 04:18:55 +00:00
taylor 3ff670c687 make Split_ships[] dynamic (wouldn't have been a big deal to just bump the limit, but what the hell) 2006-01-05 11:34:44 +00:00
taylor 0be24fea31 add a .cvsignore file for lua so there isn't a worry of commiting something bad 2006-01-05 08:06:03 +00:00
wmcoolmon 01236d638f Fix supercap 2006-01-05 05:54:16 +00:00
taylor ea4659474f allow both +Pri style and original style (+Normal, etc) for species_defs TBMs
allow for "<none>" as a bitmap/anim name, to have no effect
fix ship/weapon thruster rendering to handle missing primary animation and/or glow graphics
2006-01-05 05:12:11 +00:00
wmcoolmon f3c13f173a Flak weapons only use detonation range if targets are further away than $Det range 2006-01-04 21:48:36 +00:00
taylor de4dadf744 fixes for regular texture replacement 2006-01-04 08:19:22 +00:00
taylor 3a90aac9aa fix files corrupted by RTs commit 2006-01-03 23:24:54 +00:00
taylor 6a6101a250 oops, should have been checking my logs on that one, fixes minor GL error 2006-01-03 22:46:52 +00:00
randomtiger b04f429d2b Fixed bad phrases path 2006-01-03 20:13:23 +00:00
randomtiger a150b020e2 Removed bad phrases.cfg reference 2006-01-03 18:09:31 +00:00
randomtiger 2ed66e92a0 Added voice recognition functionality for Visual C6 project only.
Currently still a work in progress.
2006-01-03 17:07:11 +00:00
taylor be24147515 weapon precedence wasn't getting read in on normal weapon.tbl parse, should fix the missing primary weapons in early retail missions 2006-01-03 06:02:59 +00:00
taylor 1081bfb4b1 fix freaky nan error on line drawing where model would get loaded on second entry into WS screen when it should be animation 2006-01-03 06:02:00 +00:00
taylor 5b2fc86332 fix a couple of minor mipmap problems
add resizing with mipmaps rather than a physical change in memory when detail levels dictate scaling (maybe this won't blow up)
2006-01-03 02:59:14 +00:00
taylor 277994cc42 can't overwrite node var here, it's original value is needed later and was throwing out NULL chars in the Warning()s 2006-01-02 21:28:52 +00:00
taylor e6fc6e112d remove ALUT headers, we don't it anyway and it's not included with OpenAL anymore 2006-01-02 07:26:43 +00:00
taylor f4eb204370 don't specify a read buffer, something with this is screwing up ATI cards, a debug string should satisfy a hunch
ifdef out the bumpmap stuff, it's very wrong anyway :)
2006-01-02 07:25:11 +00:00
taylor 6546209fca use cf_find_file_location() for objecttypes.tbl rather than a cfopen()
fix a few compiler warning messages
2006-01-02 07:16:43 +00:00
taylor cc0539bd2f make sure we clear out the vertex used to render a sun (just to be on the safe side)
use parse_modular_table() for -str.tbm
2006-01-02 07:13:38 +00:00
taylor 8937061e7c those blasted Windows programmers! ;) 2006-01-02 07:12:24 +00:00
taylor 24a51079f3 start of DDS volume/cube map support (rest of this needs code not ready for CVS but this will be needed later) 2006-01-02 07:11:41 +00:00
phreak bf8e759daf add def_files.h and def_files.cpp to code project. 2006-01-02 03:55:28 +00:00
phreak f763434e89 this should have an ifdef/define/endif block 2006-01-02 03:54:27 +00:00
wmcoolmon 29cea0d232 Changed num-within-box wing function 2005-12-31 01:49:53 +00:00
wmcoolmon bfd966dc45 num-within-box 2005-12-31 01:47:35 +00:00
taylor 4bfa879248 forgot to include autoconf/automake versions 2005-12-30 10:12:53 +00:00
taylor edd4729029 update Linux build steps 2005-12-30 10:11:02 +00:00
taylor 00531000b1 add def_files 2005-12-30 09:57:53 +00:00
wmcoolmon f9410e1ea3 Assert -> parse warning 2005-12-30 05:40:19 +00:00
wmcoolmon b6bf0aaba0 Updated MSVC projects 2005-12-30 00:53:00 +00:00
taylor d3e8f3a35e we are using gouraud lighting here so be sure to set the proper tmap flag (fixes D3D, corrects OGL) 2005-12-29 20:12:51 +00:00
wmcoolmon 2e77457f49 Fix(?) shiptypes.tbl crash on startup 2005-12-29 12:44:45 +00:00
wmcoolmon 0b858ba513 Codebase commit, most notably including objecttypes.tbl 2005-12-29 08:08:42 +00:00
taylor 1c1c50e39f add <gamedir>/screenshots support and save screenshot images in TGA rather than BMP format 2005-12-29 07:58:02 +00:00
taylor dbb52132e4 put texture filter debug message back (was commented out for some reason in phreak's commit) 2005-12-29 04:33:15 +00:00
phreak aa8c7e0331 loading code for flipped briefing icons. 2005-12-29 00:56:45 +00:00
phreak 460524986d mirror parameter in hud_anim_render(). only used when briefing icons are fading in. 2005-12-29 00:54:08 +00:00
phreak 40e4c92b1d changed around aabitmap calls to accept a "mirror" parameter. defaults to false, and is only true for mirrored briefing icons.
If the mirror param is true, then the picture is mirrored about the y-axis so left becomes right and vice versa.
2005-12-29 00:52:57 +00:00
phreak bd3320579e Briefing icons can now be mirrored so one can point them in the opposite direction. 2005-12-29 00:49:43 +00:00
taylor d04fe382b0 add support for a species_defs modular table with XMT support (*-sdf.tbm) 2005-12-29 00:01:29 +00:00
taylor 6e6ed4cd76 handle case where we make an atexit (on failure) flush call before the texture system is initted 2005-12-29 00:00:18 +00:00
taylor 17be7fd87e getting tired of having to ifdef the snprintf/_snprintf thing that Microsoft can't do right 2005-12-28 22:34:01 +00:00
taylor 97a4b4d4e8 properly deal with post-89 TGA images which have extra extension and developer info in the file 2005-12-28 22:32:37 +00:00
taylor 00452e781b unused variable (to make GCC shut up) 2005-12-28 22:31:03 +00:00
taylor 7b67285676 add fl_tan() for getting the tangent of a float since it's terribly inaccurate to just use tan() on a float 2005-12-28 22:30:24 +00:00
taylor f5bb9d1092 add support for glCompressedTexSubImage2D(), we don't use it yet but there is nothing wrong with adding it already
better support for mipmaps and mipmap filtering
add reg option "TextureFilter" to set bilinear or trilinear filter
clean up bitmap_id/bitmap_handle/texture_handle madness that made things difficult to understand
small fix for using 24-bit images on 16-bit bpp visual (untested)
2005-12-28 22:28:44 +00:00
taylor a44ddee6ad save screenshots into <gamedir>/screenshots/
another attempt at fixing popups with single colors (saves memory too, hope it doesn't blow up)
add a debug msg about mipmap filter in use
2005-12-28 22:24:48 +00:00
taylor 7e8f6f8643 clean up the EVENT and STATE names so we don't have to manually backtrack the number during debugging 2005-12-28 22:22:34 +00:00
taylor b93e2dfc4e Oops, bit of debug stuff I didn't mean to commit (but something similar is needed so you'll it again) 2005-12-28 22:21:04 +00:00
taylor d7b35bcd30 deal with cf_find_file_location() changes
add a central parse_modular_table() function which anything can use
fix up weapon_expl so that it can properly handle modular tables and LOD count changes
add support for for a fireball TBM (handled a little different than a normal TBM is since it only changes rather than adds)
2005-12-28 22:17:02 +00:00
taylor 07fd2703b8 properly deal with non-compressed images with mipmaps (image size didn't include mipmaps before 2005-12-28 22:07:46 +00:00
taylor bfdce36d7a fix up cf_find_file_location() and related elements so that it's safer (based on WMC's work, but actually safe this time ;)) 2005-12-28 22:06:48 +00:00
taylor 9cc0ca14f8 allow for 24-bit user created bitmap images
make sure we have proper memory size requirements for non-DDS EFFs
2005-12-28 22:04:00 +00:00
taylor ce66dd2a79 fix a couple of beam section issues when using modular tables 2005-12-24 04:18:57 +00:00
taylor 3dab81ffd6 one more attempt to fix screenshots on Radeons. 2005-12-22 19:15:20 +00:00
taylor 38c055f375 changes to add Lua
don't use compatibility SDKs
2005-12-22 04:36:03 +00:00
taylor 06cc47cb8e more big-endian fixes
fix the totally retarded check I made for multi fighter beams (they really don't work right yet anyway) since it broke normal beams for clients
2005-12-22 04:35:04 +00:00
taylor c36a750528 MSVC6 was being a pain about this 2005-12-22 04:33:12 +00:00
taylor 9f5120bce0 GCC knows that fix == int so it hates the utility functions here, for sanity sake just rename them to type specific to avoid rampant casting 2005-12-22 04:32:44 +00:00
taylor 510e73bc4d add the name of the modular table about to be parsed to the debug log
a missing weapon_expl table should just be a note in the debug log rather than a popup warning
2005-12-21 08:27:37 +00:00
taylor 0fa789719a allow the show-all hotkey to work on all techroom tabs
address a couple of possible memory leak issues that could have come up in the future
2005-12-21 08:24:51 +00:00
wmcoolmon 6f7789c15f Swap beam fixed/animation image loading order 2005-12-18 20:13:26 +00:00
wmcoolmon 5708960152 Added +nocreate and more verbose index handling for beam sections 2005-12-17 00:59:48 +00:00
wmcoolmon 2df70ccbcc Better handling of beam overrides (bm_unload textures as they are replaced) 2005-12-17 00:50:55 +00:00
taylor a5ea507b3c ehh, didn't ever fix that to my satisfaction, bastardize it until more work can be done (so people don't start filing bug reports) 2005-12-16 16:34:35 +00:00
taylor 184f09346e apply at least some lighting to ship insignias rather than them being full bright 2005-12-16 06:54:10 +00:00
taylor 62f3fc0791 fix a NULL pointer crash from shipselect screen
make sure to reset "display_type" for weapon select since it would only render one ship correctly
  (still something wrong here WMC, try using models without -ship_choice_3d, everything is positioned too high on screen)
2005-12-16 06:51:31 +00:00
taylor ed324d0c54 "House Keeping!!"
- minor cleanup of things that have bothered me at one time or another
  - slight speedup from state switching
  - slightly better specmap handling, fixes a couple of (not frequent) strange and sorta random issues
  - make sure to only disable HTL arb stuff when in HTL mode
  - handle any extra lighting pass before spec pass so the light can be applied properly
2005-12-16 06:48:28 +00:00
wmcoolmon b4de1efa92 Keep a crash from happening if POF file isn't initially specified 2005-12-16 03:36:21 +00:00
taylor 2880736beb fix limits checking messages to actually be useful and hit sooner (wireframe view of some hi-poly models was going out-of-bounds from normals) 2005-12-15 16:31:03 +00:00
taylor 1d81f99bb8 make sure we always disable all VBO related elements to avoid crashing (new that was a problem, did it anyway, me == stupid) 2005-12-15 16:27:45 +00:00
taylor 79a49487a3 didn't mean for that to hit CVS, it makes neb missions work a little strange 2005-12-15 16:26:35 +00:00
phreak aba39cfc32 Countermeasres parameters. Lets users specify how easily missiles are spoofed by countermeasures
A missile is given a seeker strength.  Aspect default of 2.  Heat default of 3.  This is a missile's resistance to spoofage
A countermesaure is given an effectiveness for each type.  The defaults for countermeasure heat and aspect effectiveness are both 1.
Also gave the countermeasure an effective range.  Default is 300 meters.

A missiles chance of being spoofed is calculated by <cm type effectiveness>/<seeker strength>
So by default, 1/2 of aspect seekers will be fooled by a countermeasures, while 1/3 of heat seekers would be spoofed by default.

Also i gave the option of aspect missiles having a view cone different from 180 degrees.  This parameter is optional and doesn't effect anything already there.
2005-12-15 06:03:50 +00:00
phreak b39b8288e9 [V] can't spell 'turret' 2005-12-15 04:31:05 +00:00
wmcoolmon 5511b65084 Added script_lua_callback 2005-12-14 20:31:18 +00:00
taylor 105460ddf0 should have tested that better, it was still finding or ignoring options that it shouldn't if they were in the wrong order on
the same source (source being the two possible cmdline_fso.cfg files and the actual args passed on the cmdline)
2005-12-14 17:58:26 +00:00
phreak e29ef7266b Handling of exit explosions for beams when a ship is about to get destroyed, or according to the code: "tooled".
Bumped beam frame collisions to 10 to compensate.
2005-12-14 08:07:33 +00:00
wmcoolmon 3fbb2aa032 Ability to disable damage particle spew on ships 2005-12-13 22:32:30 +00:00
wmcoolmon 87131bd78a Grr, how did I miss this? 2005-12-13 21:50:20 +00:00
wmcoolmon 4d0f5fbc34 Music TBL to proper XMT file (-mus) 2005-12-13 21:48:39 +00:00
wmcoolmon 1ce86ebf14 Minor XMT-engine wash fix 2005-12-13 20:20:20 +00:00
taylor b6cf54c25c Hmm, .triggers isn't ever malloc'd for the Ships[] copy so don't try to free it since it's actully trying to free the Ship_info[] memory instead, which is bad :)
(newer glibc just starting going monkey over this, not sure why it didn't screw up before)
2005-12-13 18:15:26 +00:00
phreak bd8ee6108d various countermeasures related fixes. Special cases needed to be handled. 2005-12-13 05:27:36 +00:00
taylor b64ed1d334 make sure that the value of model_current_LOD stays with the detail_level value so that it's properly capped when used latter
undo the locked detail level change, all of the LOD textures are cached (or should be) so that really only hurt speed rather than helping
2005-12-12 22:04:19 +00:00
taylor 7a5f8a4169 allow use of a specific LOD for ship and weapon rendering in the hud targetbox 2005-12-12 21:32:14 +00:00
taylor ab2c7112fe double free and invalid ptr reference fixage 2005-12-12 05:29:59 +00:00
taylor 66e1060a5e switch the shockwave pof and normal names back to the correct spots, this was probably causing some
3-D shockwave usage issues since they wouldn't have rendered
2005-12-08 15:33:39 +00:00
taylor d3087989cd fix several bad crash related problems from WMC's commits on the 4th 2005-12-08 15:17:35 +00:00
taylor 4fbf8b61da a few game_busy() changes 2005-12-08 15:11:29 +00:00
taylor 3a1132516a add APPLE_client_storage support to improve texture performance and reduce memory usage a tiny bit on OS X 2005-12-08 15:10:07 +00:00
taylor 1f1d561250 signed->unsigned compiler warning fix 2005-12-08 15:08:39 +00:00
taylor 20f7523e73 remove GL_NO_HTL define since it's basically useless at this point and can produced non-functioning builds
minor cleanup and readability changes
get Apple GL version change in CVS finally, the capabilities of an Apple GL version don't neccessarily correspond to it's features
2005-12-08 15:07:57 +00:00
taylor 55659b0063 fix last bit of recent spec issue 2005-12-07 12:40:51 +00:00
taylor 9562408f1a partial spec fix, can't mass kill the pointers when they are still needed for the second pass (still something else wrong though)
forgot that the extra rangeelement optimization check isn't needed anymore, just look at indices since that's all we're using
2005-12-07 05:42:50 +00:00
taylor ba06d03663 bah, X sucks. I need to beef up error handling there in order to make all of the platforms happy. 2005-12-07 05:39:50 +00:00
taylor 30c4fc86f8 make sure with cmdline option check that it's the actual option (-spec was getting picked out of the -spec_* options by mistake) 2005-12-07 05:38:32 +00:00
taylor 63c52d70f9 15 individual commits, ya had know I was going to miss something :) 2005-12-06 17:53:25 +00:00
taylor efeb7bddf5 cleanup some debug log messages:
note that a nprintf() with "Warning" or "General" is basically the same thing as mprintf()
  make sure that OpenAL init failures always get to the debug log
2005-12-06 03:17:48 +00:00
taylor a2ff4d7ff5 add a couple of Assert()'s that it doesn't otherwise check for 2005-12-06 03:15:47 +00:00
taylor fb8cd02a10 fix for string overwrites with get_version_string() 2005-12-06 03:14:45 +00:00
taylor 0fd5616000 fix quite a few CFILE issues:
use #define's for path lengths when possible so it's easier to move between functions
  fix huge Cfile_stack[] issue (how the hell did that get through ✌️ QA?)
  add Int3() check on cfopen() so it's easier to know if it get's called before cfile is ready to use
  move path separators to pstypes.h
  fix possible string overruns when setting up CFILE roots
  make sure we don't try to init current directory again thinking it's a CD-ROM
  add the list of VP roots to debug log, this will undoubtedly be useful
when -nosound is use go ahead and set -nomusic too to both checks are correct
add list of cmdline options to debug log
fix possible overwrite issues with get_version_string() and remove '(fs2_open)' from string plus change OGL->OpenGL, D3D->Direct3D
2005-12-06 03:13:49 +00:00
taylor 6824ba9f02 add base support for 8-bit DDS images
clean up some DDS error messages and other minor bug/comment fixes
move bitmap stuff from pstypes.h, it makes more sense here anyway
start of 8-bit palette conversion, needs work but is here for WMCoolmon to look at and play with
2005-12-06 03:05:53 +00:00
taylor 8d84e56b7b move the pragma warnings here from pstypes.h for Windows
add indexed palette support for DDS images
2005-12-06 03:02:28 +00:00
taylor 2052e60d4f add a nomusic check to not get an error when eval on the change soundtrack sexp 2005-12-06 03:01:25 +00:00
taylor e68bc63754 get away from using CFILE here, needed this to change cfile init order 2005-12-06 03:00:09 +00:00
taylor 25a5ddc5bd sorry but the extra messages are somewhat annoying and already exist in another log anyway, disable by default 2005-12-06 02:59:10 +00:00
taylor d40b1fafed just to be on the safe side 2005-12-06 02:57:57 +00:00
taylor dcf437010a if for some reason we don't end up using a joystick then shut down the subsystem, saves a few cycles 2005-12-06 02:56:15 +00:00
taylor 06af0f80f8 little consolidation:
move path separator stuff here from cfile.h
  move the pragma warnings to config.h, since they produce warnings on anything that's not MSVC
  move the bmpman related stuff to bmpman.h, if you need this stuff you have to include bmpman.h anyway
2005-12-06 02:55:22 +00:00
taylor b912223f92 clean up some D3D debug messages to better match new OGL messages (for easier debugging)
remove D3D_32bit variable since it's basically useless and the same thing can be done another way
2005-12-06 02:53:02 +00:00
taylor 269675a79f clean up some init stuff and fix a minor SDL annoyance
make debug messages a bit more readable
clean up the debug console commands for minimize and anisotropic filter setting
make anisotropic filter actually work correctly and have it settable with a reg option
give opengl_set_arb() the ability to disable all features on all arbs at once so I don't have to everywhere
2005-12-06 02:50:41 +00:00
wmcoolmon e7ca24e86a Oops, arand should only be generated if it isn't passed to the function as well. 2005-12-05 09:09:53 +00:00
wmcoolmon b741ac411a "laser" and "missile" to "primary" and "secondary" 2005-12-05 01:54:16 +00:00
Goober5000 a31aff0d0a fix compiler error
--Goober5000
2005-12-04 22:44:00 +00:00
wmcoolmon 6e639560f3 Post-final commit 2005-12-04 19:12:53 +00:00
wmcoolmon 99cbbd5eee Final commit of codebase 2005-12-04 19:07:49 +00:00
wmcoolmon 0432da0970 Slightly better main hall error handling 2005-12-04 19:06:01 +00:00
wmcoolmon 34cb8f1554 Better weapon handling for techroom (more dynamic-limits friendly) 2005-12-04 19:05:06 +00:00
wmcoolmon fa4172c966 Better XMT beam section handling ("+Index:"); weapon shockwave armor support; countermeasures as weapons 2005-12-04 19:02:36 +00:00
wmcoolmon aae6ac2ff8 Attempt to fix OpenGL crash-on-debug-exit 2005-12-04 18:59:18 +00:00
wmcoolmon e945847322 subsystem + shockwave armor support; countermeasures as weapons 2005-12-04 18:58:07 +00:00
wmcoolmon 5328927b9b Better overhead-view handling 2005-12-04 18:55:42 +00:00
Goober5000 cbf6545219 bypass annoying warnings when loading optional models
--Goober5000
2005-12-01 07:45:21 +00:00
phreak fccd4a4a64 texturing shouldn't be on when drawing lines. 2005-11-30 03:07:54 +00:00
wmcoolmon 2a9c1bfd0f no message 2005-11-27 23:54:13 +00:00
Goober5000 9cfa585ba6 bah, forgot a colon
--Goober5000
2005-11-24 09:08:44 +00:00
Goober5000 46e1d51c6b * cleaned up mission_do_departure
* fixed a hidden crash (array index being -1; would only
be triggered for ships w/o subspace drives under certain conditions)
  * removed finding a new fighterbay target because it might screw up missions
  * improved clarity, code flow, and readability :)
* added custom AI flag for disabling warpouts if navigation subsystem fails
--Goober5000
2005-11-24 08:46:11 +00:00
taylor a2e607327a fix fred2 startup crash (we probably need to Assert() this case so it doesn't easily happen again) 2005-11-24 07:27:14 +00:00
phreak 887e1155b0 Added wiki help for -rearm_timer and -missile_lighting 2005-11-24 06:46:39 +00:00
phreak 17db6de95e Added -missile_lighting command line 2005-11-24 06:37:47 +00:00
phreak 3f9f76ca47 Apply lighting to missiles if -missile_lighting command line is set. 2005-11-24 06:37:17 +00:00
phreak cd38a1528a Forgot to add in the part where the rearm timer actually counts down. Minor oversight 2005-11-24 03:07:35 +00:00
taylor c7c3287184 yeah I know, I should have noticed that little jewel *before* the commit 2005-11-23 06:59:09 +00:00
taylor 2b6464dd6e make sure all weapons that will get used later in a mission get preloaded 2005-11-23 06:55:47 +00:00
taylor 67578d39df crash fix for using flak without having something targetted 2005-11-23 06:54:28 +00:00
taylor 35cb43c38a when using cheats be sure to properly load up all weapons that aren't already paged in 2005-11-23 06:53:22 +00:00
phreak a7013311e7 whoops i should test my code sometimes 2005-11-23 04:05:23 +00:00
phreak 91eccb9262 Added the function to estimate rearm and repair time. 2005-11-23 01:06:58 +00:00
phreak cff54cf6c9 Player repair rearm completion timer display added. 2005-11-23 00:49:51 +00:00
phreak 3073135022 Calculate player repair timer when the support ship docks to him. 2005-11-23 00:46:26 +00:00
phreak 9ddcfc01ea Command lines for rearm countdown timer. 2005-11-23 00:43:20 +00:00
taylor 2c8bd98cf8 yuck, ugly mistake on my part (thanks Goober!) 2005-11-22 04:50:52 +00:00
taylor ff90e21eca combine weapon_info_close() and weapon_close()
changes to allow use of weapon_expl.tbl and the modular table versions once more
 - the tables aren't required (but a warning will be produced if weapon_expl.tbl doesn't exist)
 - don't back load LODs, if it's not there then don't use it
 - handle a couple of error conditions a bit better
2005-11-22 00:01:11 +00:00
taylor 846ec383d7 some minor thruster cleanup, if you could actually use the term "clean" 2005-11-21 23:57:26 +00:00
taylor 10123cf66c move generic_* functions to their own file 2005-11-21 23:55:57 +00:00
taylor ec65c19f10 add generic.cpp and generic.h 2005-11-21 23:55:00 +00:00
taylor ac90d7c2ee little cleaner, lot more friendly to 64-bit archs (long type is usually 64-bit there) 2005-11-21 15:01:18 +00:00
taylor 06de274c17 add ai_profiles.cpp/.h 2005-11-21 14:57:08 +00:00
taylor 41c0baed84 i minus u ;) (should fix overzealous directives list) 2005-11-21 13:04:08 +00:00
Goober5000 85b947e158 remove old files
--Goober5000
2005-11-21 03:51:03 +00:00
Goober5000 163d3b715b bah and double bah
--Goober5000
2005-11-21 03:47:51 +00:00
Goober5000 4798d73423 and the project file
--Goober5000
2005-11-21 02:46:36 +00:00
Goober5000 c6acc068ff change from "setting" to "profile"; this way makes more sense
--Goober5000
2005-11-21 02:43:37 +00:00
Goober5000 367141fa5a add a flag to re-enable shockwaves damaging subsystems (from FS1)
--Goober5000
2005-11-21 01:53:57 +00:00
Goober5000 7ad17cb439 whoops
--Goober5000
2005-11-21 00:52:19 +00:00
Goober5000 8a66799d66 add ai_settings.tbl
--Goober5000
2005-11-21 00:50:02 +00:00
taylor 4105f02814 get rid of the while() loop, OGL doesn't stack errors (this killed FRED2 for some reason even though no error was present) 2005-11-18 13:13:47 +00:00
Goober5000 a16c0a96ec Wiki links updated; many thanks to StratComm :)
--Goober5000
2005-11-18 08:03:23 +00:00
Goober5000 5504a6a99e made arrival invalidation more efficient
(probably only a small speedup, but meh)
--Goober5000
2005-11-18 07:53:27 +00:00
taylor dbeca4632d fix for thruster glows (affecting TBP mainly but OC as well):
- thruster glows should always come from ship entry rather than species (it will be initted by the species entry at first)
 - this obviously needs some work done on it but that gets dangerously close to a rewrite and that isn't something I have time for
2005-11-17 20:52:02 +00:00
wmcoolmon df8100e85a Small fix for XMTs 2005-11-17 05:12:42 +00:00
taylor 5a949b253b fix crash on kamikaze deaths 2005-11-17 02:31:36 +00:00
taylor 9ed6849224 correct a little EFF fubar from my -img2dds commit
vocalize EFF loading errors so that they get noticed and fixed sooner
2005-11-17 02:30:49 +00:00
taylor 1220b2fa4c pretty sure my brain wasn't working that day 2005-11-17 02:29:21 +00:00
taylor 989e19c06a don't try to apply a shockwave force if there is no actual force to apply, avoids needless math and fixes a NULL vec3d warning 2005-11-16 21:27:31 +00:00
taylor 5ecaf658f4 switch from strchr() to strrchr() for extension checks in order to allow for multiple periods in a filename 2005-11-16 21:25:34 +00:00
taylor 8817a12cab allow for badly encoded ADPCM files if it was otherwise decoded properly 2005-11-16 09:16:24 +00:00
taylor 0a7c13004c umm, no one saw that, right? :) 2005-11-16 07:45:35 +00:00
taylor 232901ac61 bunch of error checking and code cleanup for the team stuff in ship/weapon select 2005-11-16 05:46:27 +00:00
taylor 41fec4840e didn't mean for that to hit CVS, stops FRED2 from crashing on exit 2005-11-14 08:39:00 +00:00
taylor 25bb1cf68c now able to build with OpenAL 1.0 and 1.1 thanks to newer OpenAL CVS changes (patch from icculus.org FS2 mailing list) 2005-11-14 05:12:01 +00:00
Goober5000 1fb4f808bc fix the icons.tbl bug
--Goober5000
2005-11-13 23:02:04 +00:00
Goober5000 4aab3c2c04 this should fix the no-warp-effect bug
--Goober5000
2005-11-13 22:27:17 +00:00
taylor 416eec60a0 cmdline option cleanup:
remove from launcher -pcx32, -cell, -UseNewAI
remove from game -loadonlyused, -dxt, -pcx2dds
rename -d3dmipmap, -d3d_no_vsync, -dnoshowvid to non API specific sounding names
add -nograb into help output under Linux/OSX
add -loadallweps and -img2dds
2005-11-13 06:55:38 +00:00
taylor da42be1b24 minor cleanup and comment cleanup about bpp usage 2005-11-13 06:52:06 +00:00
taylor ff5b2e3453 don't fail if not a starfield pof to load, regular starfield bitmaps don't hard fail so this shouldn't either 2005-11-13 06:50:57 +00:00
taylor 11c2f28b23 small big-endian fix 2005-11-13 06:49:32 +00:00
taylor 034170c1fa -loadonlyused in on by default now, can be turned off with -loadallweps 2005-11-13 06:49:05 +00:00
taylor 8d44e11441 make sure that we don't get "-transport" in with the transparent filename check (TBP bug) 2005-11-13 06:47:26 +00:00
taylor 4c720500fd some minor movie cleanup, not what I would like but enough for now 2005-11-13 06:46:10 +00:00
taylor 16c4614476 minor cleanup of old code and consolidate the texture compression checks into this one place 2005-11-13 06:45:24 +00:00
taylor 940b77cfc2 small bit of EFF cleanup
add -img2dds support
cleanup some D3D stuff (missing a lot since the old code is so unstable I couldn't get it working like I wanted)
some minor OGL cleanup and small performance changes
converge the various pcx_read_bitmap* functions into one
cleanup/rename/remove some cmdline options
2005-11-13 06:44:18 +00:00
taylor dfb2ca06fe add support for 8/16/24/32 bit output from ani frame decoder 2005-11-13 06:40:19 +00:00
taylor 7537edc256 remove Cmdline_cache_ani support, it only worked if not in a VP and only on streaming ani so it was pretty much useless 2005-11-13 06:39:38 +00:00
taylor 0b91ca7664 never did port this stupid thing to PPC 2005-11-13 06:38:04 +00:00
taylor 3c1271a338 always produce BGR ordered images rather than RGB 2005-11-13 06:37:24 +00:00
taylor f2d6ad844c add LUA building for MSVC6 2005-11-13 06:36:52 +00:00
phreak ec909ec855 LuaError() body should not be compiled into the code unless USE_LUA was defined in the project file. 2005-11-13 05:25:59 +00:00
wmcoolmon c8b032291d More warnings instead of Int3s/Asserts, better Lua scripting, weapons_expl.tbl is no longer needed nor read, added "$Disarmed ImpactSnd:", fire-beam fix 2005-11-08 01:04:02 +00:00
wmcoolmon e5eef67d24 Fixed capitalization 2005-11-05 11:00:50 +00:00
wmcoolmon a34135e05c Int3() --> Warning 2005-11-05 10:26:09 +00:00
unknownplayer 81a45606a3 Committed the DX9 December 2004 SDK. None of the DX9 changes have been committed however. This might break the MSVC 2003 build since DX9 and DX8 share the DX8 include files. Just eliminate one from the library paths if you have any problems. 2005-11-05 09:31:45 +00:00
wmcoolmon 982c662da0 Forgot the breathalyzer 2005-11-05 08:39:10 +00:00
wmcoolmon 74d081fd2f Fix for this old and silly bug. 2005-11-05 08:38:36 +00:00
phreak 32bd17ae17 add/remove-sun-bitmap. Also changed "Ship_arrival_list" to "ship_arrival_list" since the former technically doesn't exist due to the capital 'S'. 2005-11-05 07:42:09 +00:00
wmcoolmon 4a81216e3b Support for using Lua files for hooks 2005-11-05 05:13:05 +00:00
wmcoolmon 95dddca667 Fix(?) for checking whether a weapon is armed or not 2005-11-05 05:12:21 +00:00
wmcoolmon d961eb935a Slight optimization 2005-11-05 05:11:29 +00:00
wmcoolmon 24e9cd45ed Removed unneccessary casts 2005-11-05 05:08:58 +00:00
wmcoolmon 698a80d45a turret-change-weapon 2005-11-05 05:06:13 +00:00
Goober5000 f5b9a8636c remove unused commented stuff
--Goober5000
2005-10-31 09:12:16 +00:00
Goober5000 21fbc6eb9a bit of tweakage
--Goober5000
2005-10-31 09:09:41 +00:00
wmcoolmon 82b8c1cb49 Support for passing C pointers w/ LUA 2005-10-31 08:57:40 +00:00
wmcoolmon d098b84a0c Support for custom operators in Lua 2005-10-31 06:37:17 +00:00
Goober5000 791d40be45 stuff for comparing ship classes
--Goober5000
2005-10-30 23:45:45 +00:00
Goober5000 5628d1aabb added scripting stuff to MSVC project
--Goober5000
2005-10-30 21:05:24 +00:00
Goober5000 be3f085c96 fix the support ship spawning bug
--Goober5000
2005-10-30 20:42:45 +00:00
Goober5000 c5fa1e6a0b comment fixage 2005-10-30 20:20:44 +00:00
taylor d5de67114e add a bunch of Assert()'s and NULL checks to either help debug or avoid errors
fix Mantis bug #381
fix a small issue with the starfield bitmap removal sexp since it would read one past the array size
2005-10-30 20:03:40 +00:00
taylor 5c36f7b421 same basic cleanup and self-sanity changes
split up WinMain() and main() so it doesn't resemble ifdef hell
rename WinMainSub() to game_main() and move anything that should have been in WinMain() to WinMain()
2005-10-30 20:00:22 +00:00
wmcoolmon ab67577322 Display a special dialog if the player tries to continue a campaign with no missions 2005-10-30 19:22:31 +00:00
wmcoolmon 9bffa8b8dc Return an error if mission_campaign_next_mission() is called when the campaign has no missions 2005-10-30 19:21:45 +00:00
wmcoolmon ec299d0437 Fix scripting.html 2005-10-30 18:19:58 +00:00
taylor 1d53405076 add Lua support for automake/autoconf 2005-10-30 10:46:23 +00:00
taylor ef4203311c fix a couple of campaign savefile bugs for WMC 2005-10-30 10:45:19 +00:00
wmcoolmon 7dece4af61 Codebase commit - nebula.tbl, scripting, new dinky explosion/shockwave stuff, moving muzzle flashes 2005-10-30 07:10:20 +00:00
wmcoolmon c9b872df9f Codebase commit - nebula.tbl, scripting, new dinky explosion/shockwave stuff, moving muzzle flashes 2005-10-30 06:45:00 +00:00
Goober5000 643a4b15c4 multiple ship docking implemented for initially docked ships
--Goober5000
2005-10-29 22:09:31 +00:00
taylor 8151f7d80e Add some error checking and handling to better deal with possible problems, and to let us know what/where they are 2005-10-29 12:26:58 +00:00
taylor 07678a8f6e bullet-proof the loadout read a little bit (did this before and had it locally, must have missed CVS) 2005-10-29 12:25:49 +00:00
wmcoolmon 461332483d Safeguard against saved loadout and loadout changes. 2005-10-29 09:06:52 +00:00
wmcoolmon afb235d9cc Better alloc_block function 2005-10-29 09:02:13 +00:00
wmcoolmon 2a61be8fe8 Minor change to an assert 2005-10-29 09:00:41 +00:00
taylor f6c3b17374 hmm, didn't even notice that earlier 2005-10-28 14:52:26 +00:00
taylor 7f7cf7728a some minor cleanup and compiler warning fixes 2005-10-28 14:49:35 +00:00
taylor 2475a73098 don't do any decal processing if decals are not enabled 2005-10-28 14:48:26 +00:00
taylor e6988155c3 fix issue where GR_640 based non-standard resolutions (ie. 800x600) would use GR_1024 screen coordinates/sizes 2005-10-28 14:47:16 +00:00
taylor 8679d340f1 more TMAP_MAX_VERTS overflow protection for non-HTL usage (these are the things that need to be addressed to fix non-HTL)
fix some compiler warning messages
don't do any decal processing if decals are disabled, the math was a waste of CPU cycles in that case
2005-10-28 14:45:55 +00:00
Goober5000 78dd2bcaca nitpicked a rather dumb non-bug
--Goober5000
2005-10-28 06:10:07 +00:00
phreak e86478e0bf Added extra documentation for add-background-bitmap and add-sun-bitmap 2005-10-28 05:48:55 +00:00
phreak 976694a83b added implementation for add-background-bitmap and remove-background-bitmap 2005-10-28 05:25:27 +00:00
taylor 881eec7288 some minor fixes to message_translate_tokens(), fixes a bug and adds some out-of-bounds checks 2005-10-27 16:24:24 +00:00
taylor 1ae7853fdc go back to using abort() over exit() for Assert's and Int3's but close out SDL first this time, makes debugging much easier 2005-10-27 16:23:03 +00:00
taylor a4d405357f fix some automake errors with OSX 10.4's crappy AutoMake and a couple of other OS X related terminal compile fixage 2005-10-27 16:21:19 +00:00
taylor d60afee14d D3D missed the non-standard resolution updates for aabitmaps, should fix briefing icon positioning 2005-10-26 20:54:18 +00:00
taylor fb6be02afc convert Jpegs from RGB to BGR after read, OpenGL had a problem with this, D3D still works fine 2005-10-26 20:53:02 +00:00
taylor e541fc13ad update Xcode project with IFF stuff 2005-10-26 20:51:55 +00:00
taylor 94e211e84e make sure that XMTs don't try to still create an invalid entry when +nocreate is used 2005-10-26 00:43:06 +00:00
wmcoolmon ea0d07ea2f Bumped MAX_HOTKEY_TARGET_ITEMS 2005-10-25 01:21:52 +00:00
phreak 2cbfa525d4 implementation for nebula-change-storm and nebula-toggle-poof. looks like they're working 2005-10-24 23:28:37 +00:00
taylor 1000fd5527 init thruster stuff properly so that bmpman doesn't have a fit 2005-10-24 12:42:14 +00:00
Goober5000 c7d967b52d merge Bobboau's thruster code back in; hopefully this covers everything
--Goober5000
2005-10-24 07:13:05 +00:00
taylor 8190f89912 not sure what I was smoking there, max shininess value is 128, not 180 2005-10-24 04:48:14 +00:00
phreak 11254c3ecc Get the new nebula argument types working in fred. 2005-10-24 02:53:48 +00:00
wmcoolmon 1564e913c4 Removed max_overclock restriction related to warpout 2005-10-24 02:15:41 +00:00
taylor ee0a8f762b some cleanup, fix some general memory leaks, safety stuff and whatever else Valgrind complained about 2005-10-23 20:34:30 +00:00
taylor f0f41a4f4f fix crashes and minor slowdowns when sound is disabled (-nosound) 2005-10-23 19:08:01 +00:00
taylor 5f1e2e9f83 make AABITMAP use GL_ALPHA rather than GL_LUMINANCE_ALPHA (now 8-bit instead of 16-bit, fixes several minor rendering issues) 2005-10-23 19:07:18 +00:00
taylor d08479de39 minor cleanup to screenshot code
force front buffer reads for relevant glReadPixels() calls
2005-10-23 14:12:35 +00:00
taylor ec757ab001 add -ogl_shine to adjust the OGL shininess value so that people can play around and find the best value to use 2005-10-23 11:45:06 +00:00
taylor 636bc06e5b fix memory errors from new[]/delete[] mismatch 2005-10-23 11:44:07 +00:00
wmcoolmon a0f0735de9 Ack, missed testing compile under an Inferno build 2005-10-23 05:37:59 +00:00
wmcoolmon 55e36de866 *Fix* 2005-10-23 05:01:49 +00:00
phreak 5a329c572a add-background-bitmap and add-sun-bitmap needed scale values added
also their sexp functions should not return integers.
2005-10-23 04:48:26 +00:00
phreak 3ba27cb1e7 various background and nebula sexps
add-background-bitmap
add-sun-bitmap
remove-background-bitmap
remove-sun-bitmap
nebula-change-storm
nebula-toggle-poofs

All of these sexps are just stubs for now.
Just want to get in the commit before someone
else commits and i'll make a mess trying to merge.
Everything is compiling fine, so it shouldn't mess up anything.  But you know that murphy guy....

I've put these sexps in a new fred subcategory called "Backgrounds and Nebula"
along with the sexps "change-skybox-model" and "mission-set-nebula"
2005-10-23 04:18:23 +00:00
Goober5000 fee22cf735 made Cmdline_UseNewAI toggle the mission flag, plus fixed a few other flag-related potential bugs
--Goober5000
2005-10-22 22:25:23 +00:00
Goober5000 afde24171d rolled back UnknownPlayer's commit
--Goober5000
2005-10-22 22:22:41 +00:00
wmcoolmon 51cc626041 mission-set-nebula fixage; remainder of python code 2005-10-22 20:17:19 +00:00
taylor 172bf5db01 couple of changes to NULL vec fixes which better match what Volition would have done (makes both Goober and myself happier :))
keep track of what was an error (even if erroneous) and why with "VECMAT-ERROR" comment
2005-10-22 06:26:30 +00:00
unknownplayer b8822ebe66 Added -UseNewAI command line option to force the game to always use
the SCP AI changes. As of now there's some problem in gr_d3d_set_render_target
that crashes the game when it gets to a mission.
2005-10-22 04:28:17 +00:00
taylor a8e1459022 fix main NULL vec errors, still at least one left but these were those that happened most often:
modelinterp.cpp:parse_tmap() -> first IS_VEC_NULL() check would fail, wasn't a second on reassign
  aicode.cpp:ai_path() -> when (Pl_objp->pos == gcvp), fixed globally in vecmat.cpp:vm_vec_dot_to_point()
2005-10-21 11:32:15 +00:00
taylor b8beecfd70 fix player warpout
basic code cleanup (that previous braces change did nothing for readability)
spell "plyr" correctly
tweak warp shrink time to better match WMC's other changes and avoid the skipping during shrink
2005-10-20 17:50:03 +00:00
taylor bff09ca775 minor readability fix
plug a memmory leak and possible Polygon_models[] madness if a POF can't be found or is otherwise invalid
2005-10-20 15:33:44 +00:00
wmcoolmon 9bbe0ef033 More player warpout speed stuff 2005-10-20 06:38:18 +00:00
wmcoolmon 56b2035866 Oops, guess I didn't commit this stuff 2005-10-20 06:37:34 +00:00
taylor 57bc110209 fix some bugs with spawn type weapon assignments, particularly with TBMs 2005-10-19 20:54:06 +00:00
wmcoolmon ada07e972d Don't need this anymore 2005-10-19 04:23:05 +00:00
taylor 4e44ad6cbc make sure gamesnd_parse_soundstbl() doesn't inf-loop because of species problems
if we have missing species then report that before the end of table section check so we're sure to know what's missing
2005-10-18 14:57:32 +00:00
taylor 2cb97774ae lowercase filenames in model_load_textures()
turn texture loading debug messages back on but under "Maps" so they are easy to turn off if not wanted
2005-10-17 14:23:21 +00:00
unknownplayer 795b779779 Final update to the project files - all compile correctly on MSVC_2003
from the sources on the CVS.
2005-10-17 08:43:03 +00:00
unknownplayer 220d98fe1d Updated the files from the MSVC 6 projects - they seem to work better. 2005-10-17 08:38:17 +00:00
taylor d80d29981d dynamically allocate object collision pairs 2005-10-17 05:48:18 +00:00
unknownplayer 70eb3414b1 Added project files for MSVC_2003 - these are made from the MSVC_7 files. 2005-10-17 02:17:26 +00:00
wmcoolmon 6c1e1c13e5 Fix redmenace's compile problem 2005-10-17 02:09:29 +00:00
wmcoolmon 95bf16615a Make weapons clip less 2005-10-17 01:54:15 +00:00
wmcoolmon a9e8dc0665 Weapon models now shown in lab 2005-10-17 01:51:01 +00:00
wmcoolmon 5fb1ece53e Some cfile changes that slipped by 2005-10-17 00:13:28 +00:00
wmcoolmon 7037744bfd USE_OPENAL 2005-10-17 00:03:13 +00:00
wmcoolmon e4e606ae5c Change this back for MSVC.NET? 2005-10-17 00:02:46 +00:00
wmcoolmon 83ae7c42e9 CFile stuff 2005-10-17 00:02:09 +00:00
wmcoolmon 2b88dda60c Updated & fixed project files 2005-10-16 23:31:58 +00:00
wmcoolmon 4d6db9104b Hardened cfile against array overflows 2005-10-16 23:15:47 +00:00
wmcoolmon 67f9f87f6c Small fix for amor code 2005-10-16 23:15:13 +00:00
Goober5000 3904706464 I need to bone up on my bulletproofing
--Goober5000
2005-10-16 18:54:12 +00:00
taylor 0d948a3aae use unsigned index buffers 2005-10-16 11:20:43 +00:00
taylor 966335ce31 (NULL != (int)0); the size and type of NULL is platform and implementation dependant and should only be used for pointers!
fix naughty bug that would set the flyby sound filenames to NULL
2005-10-16 11:19:57 +00:00
taylor cc48b49fcf clean up a couple of things 2005-10-16 10:12:14 +00:00
Goober5000 6a479838f8 ship-create now generates a default name if you specify "<none>" for the ship name
--Goober5000
2005-10-16 00:32:30 +00:00
taylor e44735a96d properly handle cases where bm_make_render_target() might have failed 2005-10-15 20:53:29 +00:00
taylor 435514e90f make sure that bm_make_render_target will handle failure 2005-10-15 20:42:40 +00:00
taylor 9cfc9fc643 add error message in case the number of verts on a submodel is in excess of SHRT_MAX 2005-10-15 20:28:26 +00:00
taylor e04261ceb4 make some code a bit more readable
speed up index buffer generation just a tad (maybe 1/3rd)
2005-10-15 20:27:32 +00:00
Goober5000 d55bff80cc add weapon-create sexp
--Goober5000
2005-10-14 09:29:56 +00:00
Goober5000 730fd8491a removed an unneeded parameter and renamed some stuff
--Goober5000
2005-10-14 07:22:24 +00:00
Goober5000 f0d7b9de4c stuff for WMC: fix sexp description and three warnings; plus add some
bulletproofing to name-specified ship_create
--Goober5000
2005-10-14 07:06:59 +00:00
wmcoolmon b05a37bef0 armor.tbl work 2005-10-14 02:13:52 +00:00
wmcoolmon 86777d3528 Make ship_create not return a value 2005-10-13 23:23:32 +00:00
wmcoolmon 46804f90b7 Fixage for ship_create 2005-10-13 18:47:45 +00:00
taylor 7318a3750a new timer code that shouldn't suffer from multi-cpu (or dual core) systems
clean out all old Windows timer code since that was just a mess at this point
2005-10-12 05:45:35 +00:00
taylor 68fde5dcd5 temporary cmdline option, -y_bug_fix, to switch between original code (default) and previous attempt at the Y-bug fix 2005-10-12 05:43:40 +00:00
taylor 5c71e497e7 little cleaner since the two sets weren't needed 2005-10-11 12:24:04 +00:00
taylor 8bdf7224e6 fix memory freakage from dynamic spawn weapon types 2005-10-11 08:30:38 +00:00
wmcoolmon 3101fb61a7 Topdown updates 2005-10-11 07:43:10 +00:00
wmcoolmon 9c2e5dd3f4 Gliding 2005-10-11 05:24:34 +00:00
taylor 89621393c4 actual cmeasure fix, don't know why the hell it didn't end up other commit 2005-10-10 17:32:59 +00:00
taylor 95e056f6fd remove NO_NETWORK 2005-10-10 17:21:11 +00:00
taylor 229e448fed remove NO_NETWORK
little sanity on model_load() calls
fix cmeasure bug where a blank entry was getting added
2005-10-10 17:19:07 +00:00
taylor 24e8fa9416 remove NO_NETWORK
clean out some old debug messages that were littered about
2005-10-10 17:17:45 +00:00
taylor b256ad2aef remove NO_NETWORK
whether multi is disabled or not is now determined at runtime
clean out some crap and old debug messages that were littered about
2005-10-10 17:16:22 +00:00
taylor f56551d51b remove NO_NETWORK
fix controlconfig so that axes can be set to joystick/mouse using the mouse (required when no joystick attached)
2005-10-10 17:14:31 +00:00
wmcoolmon cb2912867e Tidied up code a bit 2005-10-10 01:14:11 +00:00
Kazan b29b104272 some weird character was on the head of weapons.cpp 2005-10-09 23:56:22 +00:00
wmcoolmon bc4c92b78f Added names to the 'limits reached' dialogs in ship/weapons.tbl 2005-10-09 17:38:49 +00:00
wmcoolmon a6e283db70 Added warpin/warpout speed values to the lab 2005-10-09 09:18:10 +00:00
wmcoolmon 0e16ea57cc Added warpin/warpout speed override values to ships.tbl 2005-10-09 09:13:29 +00:00
wmcoolmon 61a109dcb1 Minor update to ship-create description 2005-10-09 08:10:03 +00:00
wmcoolmon 3d57aefef6 New SEXP stuff 2005-10-09 08:03:21 +00:00
wmcoolmon 1e2783906d Added sexps set-object-speed-x, set-object-speed-y, set-object-speed-z,
and ship-create
2005-10-09 06:10:59 +00:00
wmcoolmon b0912a1082 Much better laser weapon/pof handling, removed a couple unneccessary
warnings (used to try and track down a bug)
2005-10-09 03:13:13 +00:00
wmcoolmon b686df2e87 Bumped MAX_PAIRS to prevent objects flying through other objects 2005-10-09 01:50:04 +00:00
wmcoolmon 0beedfa677 Extendable modular tables (XMTs); added weapon dialogs to the Lab 2005-10-09 00:43:09 +00:00
wmcoolmon d40bc8a817 Attempt to fix crash bug on 'Mystery of the Trinity' 2005-10-08 19:29:08 +00:00
wmcoolmon 4438ce571e Error checking for dock error 2005-10-08 18:46:38 +00:00
wmcoolmon 28041d497a Better readability for parse errors 2005-10-08 18:26:40 +00:00
wmcoolmon e473be185e These are no longer needed... 2005-10-08 18:25:41 +00:00
taylor f4d95bc9bb fix several asteroid problems, little code duplication but this actually works and is less error prone than the previous method 2005-10-08 15:37:26 +00:00
wmcoolmon e384b8ee28 Fix Int3() from ship-vanish 2005-10-08 05:41:09 +00:00
taylor 0c38c21ac1 make sure player death message works when using a NO_NETWORK build 2005-10-06 07:53:01 +00:00
Goober5000 a1e18b212d fixed the CTD when support is called for a ship lacking a rearming dockpoint
--Goober5000
2005-10-02 23:12:44 +00:00
Goober5000 f3f52618b7 removed a redundant action
--Goober5000
2005-10-02 23:01:17 +00:00
Goober5000 663994c0f7 juxtaposition for clarity
--Goober5000
2005-10-02 23:00:39 +00:00
taylor a71bf31824 remove -rlm, it's always on now since there was never a complaint and pretty much everyone uses it
add -cache_bitmaps and have bitmap caching between levels off by default
when -cache_bitmaps is used then use C-BMP for top-right memory listing, and just BMP otherwise
2005-09-30 09:47:06 +00:00
taylor f11038667a add iff stuff to makefile 2005-09-30 09:44:19 +00:00
Goober5000 2956626467 hooray for more work on the iff code
--Goober5000
2005-09-30 03:40:40 +00:00
Goober5000 89ba5a2e33 parsing stuff
--Goober5000
2005-09-30 03:19:57 +00:00
Goober5000 2b4a16ee61 parse fixage
--Goober5000
2005-09-29 04:26:09 +00:00
Goober5000 ed7ea880f9 fix debug warning
--Goober5000
2005-09-27 08:09:13 +00:00
Goober5000 8a3a2169e9 small fix, bah
--Goober5000
2005-09-27 06:39:23 +00:00
Goober5000 4f2b0db7ac added iff_defs to project
--Goober5000
2005-09-27 06:39:04 +00:00
Goober5000 7bb3e2fc44 initial commit of basic IFF code
--Goober5000
2005-09-27 05:25:19 +00:00
Goober5000 3423d8b641 betterizing
--Goober5000
2005-09-27 05:01:52 +00:00
Goober5000 0ed86295bb clarification
--Goober5000
2005-09-27 02:36:58 +00:00
Goober5000 ad411a41df this should fix the rest of the briefing icon bugs
--Goober5000
2005-09-26 06:00:59 +00:00
Goober5000 c90b03a218 small fix
--Goober5000
2005-09-26 05:24:25 +00:00
Goober5000 ab99d4877f moved these per taylor's recommendation
--Goober5000
2005-09-26 04:53:19 +00:00
Goober5000 887d687e09 some more cleanup
--Goober5000
2005-09-26 04:51:00 +00:00
Goober5000 633954fdf1 some more cleanup
--Goober5000
2005-09-26 04:08:54 +00:00
Goober5000 9a25153e9a okay, this should all be working :)
--Goober5000
2005-09-26 02:15:03 +00:00
Goober5000 fa303129e6 and again, gah
--Goober5000
2005-09-25 23:02:29 +00:00
Kazan 8c918ef816 my bad 2005-09-25 22:29:35 +00:00
Goober5000 dd63695d6a more fiddly stuff
--Goober5000
2005-09-25 22:24:22 +00:00
Kazan f560aff0c5 correct an error 2005-09-25 22:23:39 +00:00
taylor 08e1f23065 gah. 2005-09-25 21:00:40 +00:00
Goober5000 e52a9ae599 oh noes!
--Goober5000
2005-09-25 20:55:28 +00:00
Goober5000 c31f5ab505 taylor forgot something ;)
--Goober5000
2005-09-25 20:42:57 +00:00
Goober5000 a2e6884321 okay; everything should be good to go
--Goober5000
2005-09-25 20:31:42 +00:00
taylor 077b97f304 GCC fixage, my Whiffle Bat that was saved for Bobboau's constant breaking is currently getting "Goober5000" etched into it :) 2005-09-25 18:48:25 +00:00
taylor 37a7e70d39 fix Subsys_status leak, wasn't a problem in game but can be touchy on exit 2005-09-25 18:44:51 +00:00
Goober5000 29dda0a324 Okay, everything should now work again. :p Still have to do a little more with the asteroids.
--Goober5000
2005-09-25 08:25:16 +00:00
Goober5000 7adba91866 remove unneeded #include
--Goober5000
2005-09-25 08:23:38 +00:00
Goober5000 4ffb56ecb1 remove duplicate #include
--Goober5000
2005-09-25 08:21:54 +00:00
Goober5000 f7b61e5666 and again
--Goober5000
2005-09-25 07:27:33 +00:00
Goober5000 b56688e720 try to fix the headers
--Goober5000
2005-09-25 07:26:05 +00:00
Goober5000 0749cebaa1 partial commit; hang on
--Goober5000
2005-09-25 07:07:34 +00:00
Goober5000 d16a2f95e2 bah
--Goober5000
2005-09-25 05:26:13 +00:00
Goober5000 b23de6a2e2 hopefully complete species upgrade
--Goober5000
2005-09-25 05:13:07 +00:00
Goober5000 ff652edbd5 meh for consistency
--Goober5000
2005-09-25 02:15:02 +00:00
Goober5000 35188a2b9e cleaned up some more thruster stuff; honestly, the thruster code is such a
mess that it should probably be reverted to the retail version
--Goober5000
2005-09-24 07:45:31 +00:00
Goober5000 6e7756b455 fixage
--Goober5000
2005-09-24 07:18:15 +00:00
Goober5000 a2a5b2e952 another species overhaul
--Goober5000
2005-09-24 07:07:17 +00:00
Goober5000 30495588fa a fix
--Goober5000
2005-09-24 02:57:12 +00:00
Goober5000 47953947cf whoops
--Goober5000
2005-09-24 02:43:33 +00:00
Goober5000 058aa3b940 get rid of a whole bunch of Microsoft warnings
--Goober5000
2005-09-24 02:40:10 +00:00
Goober5000 6dfe488f6f bah
--Goober5000
2005-09-24 02:24:29 +00:00
Goober5000 a906f582f3 a bunch of support ship bulletproofing
--Goober5000
2005-09-24 01:50:10 +00:00
Goober5000 831dbe1e6a this isn't needed because of is_support_allowed
--Goober5000
2005-09-24 01:41:21 +00:00
Goober5000 19487cb111 bettered the web cursor bitmap error message
--Goober5000
2005-09-23 23:07:11 +00:00
Goober5000 b9090328d0 something for WCS
--Goober5000
2005-09-23 22:48:56 +00:00
taylor 714e71f51a fix screen update of pilot list when you delete one of them 2005-09-22 19:16:48 +00:00
taylor c10b06d937 entries for icon file
some general cleanup of the project file
use "Release" and "Debug" for the builds since that's the terminology we use
2005-09-22 11:22:52 +00:00
taylor 2543fdd5f7 delay for fox OS X, SDL messes up for some reason and though I don't like this, even Apple does it 2005-09-22 11:21:22 +00:00
taylor 5f16edd112 byte-swap for 32-bit uncompressed DDS images on big endian 2005-09-22 11:20:11 +00:00
taylor 113d67d6c0 ignore .DS_Store from OS X
add .cvsignore for Xcode project stuff
temporary placeholder for real FS2_Open icon file
2005-09-22 11:18:30 +00:00
Goober5000 e801840cac add option for warp flash; mess with the cmdlines a bit
--Goober5000
2005-09-21 03:55:32 +00:00
wmcoolmon 2f0ad1c35c New parsing functions that I'll be using for XMTs once I get them
working
2005-09-20 04:51:45 +00:00
wmcoolmon 791c7c39ea Oops. Breathalyzer standing by... 2005-09-20 04:51:01 +00:00
wmcoolmon 86539f252f Some work I did on the camera code 2005-09-20 04:48:52 +00:00
wmcoolmon c2c44c86b7 Fixed techroom crash if there are no entries to display; removed
unneeded MULTIPLAYER_BETA_BUILD define that disallowed supercaps
2005-09-20 04:37:01 +00:00
taylor b2937b2e08 fix a couple of things that Valgrind complained about 2005-09-20 02:48:37 +00:00
taylor b3f2c96435 make sure that any extra ship textures get loaded on a class change (that Ares bug which wasn't actually Ares specific) 2005-09-20 02:48:06 +00:00
taylor 4da393e6ce slight speedup for font rendering
fix a couple of things that Valgrind complained about
2005-09-20 02:46:53 +00:00
taylor ebfa7423fc bump version to 0.6
add a specified directory to output files to
2005-09-20 02:45:47 +00:00
taylor fe88ab1396 gah, revert that since it was never going to work (not sure what I was drinking that day) 2005-09-18 23:06:17 +00:00
wmcoolmon 4179e85caf Fixed silly i variable placement mistake 2005-09-18 20:41:10 +00:00
Goober5000 b73dcd739b a small fix
--Goober5000
2005-09-18 02:28:18 +00:00
phreak c1a82b09d6 radar bitmap should render the correct color using -orbradar 2005-09-17 19:12:37 +00:00
Goober5000 75e8b56828 better tweak 2005-09-17 01:41:49 +00:00
Goober5000 205fc23b91 tweak 2005-09-17 01:37:02 +00:00
Goober5000 49a65b4ea8 It is a strange fate that we should suffer so much fear and doubt over so small a thing.
Such a little thing...
2005-09-17 01:36:29 +00:00
Goober5000 d8351b5cb9 roll back taylor's loadout fix and do it this way: it saves memory
(but thanks to taylor for drawing attention to the difference between wing slots and wss slots!)
--Goober5000
2005-09-16 17:02:50 +00:00
taylor 50306334bc fix afterburner bug 2005-09-16 08:11:39 +00:00
taylor 7e3012fec1 when a wing is departing to a bay have ships break formation when playing follow-the-leader 2005-09-16 02:59:55 +00:00
taylor 28b190122d when changing a campaign in the campaign room make sure that the mainhall is properly set without having to play a mission first 2005-09-16 02:51:54 +00:00
taylor caa37d9b86 didn't mean to leave that in there 2005-09-16 00:03:51 +00:00
Kazan 8a36ebd73e comment out superfluous debug message 2005-09-15 23:54:58 +00:00
taylor 8890cec34b gah, I still messed that up. Add a NULL check and have register_malloc() actually handle the correct pointer 2005-09-15 05:19:25 +00:00
taylor d2bcd90e9e some vm_* fixage for Windows 2005-09-14 20:38:12 +00:00
taylor 017d7b1cb8 fix ace badges not getting displayed in debriefing 2005-09-14 20:03:40 +00:00
phreak fccb7eaf69 fix to a minor annoyance where the hud weapons gauge wouldnt render properly if there were no secondary weapons. 2005-09-14 02:55:04 +00:00
taylor 6b94ed3308 fix out-of-bounds crash when apply_to_all button is hit 2005-09-13 04:32:11 +00:00
phreak cee0940c17 sort_weapons_by_type() now also subsorts primaries by whether its supposed to only
be used on big ships or not.
2005-09-11 03:50:42 +00:00
taylor 5663c4933a make sure smart shields can't send the strength of a quadrant over the max 2005-09-10 21:10:19 +00:00
Goober5000 1292005d71 "no briefing" flag now works for red-alert missions too
--Goober5000
2005-09-09 05:12:44 +00:00
Goober5000 598598d26c braces for clarity 2005-09-09 05:11:20 +00:00
phreak 4d6d45dd76 sort_weapons_by_type() now subsorts missiles and places fighter-sized weapons ahead of capital weapons and child weapons
its also alot less memory intensive too.
2005-09-08 23:20:54 +00:00
taylor efe030c058 make it actually compile under WIN32
bump version to 0.5 since little else is going to be done to this thing
2005-09-08 05:04:15 +00:00
taylor 8b4b35be0a fix building/linking of command line tools under Linux/OSX
add tools as targets to OSX project file
2005-09-08 00:09:32 +00:00
taylor f51a10c546 fix mouse position setting in non-standard resolutions 2005-09-06 17:26:39 +00:00
taylor c1acb96dc6 use exit(EXIT_FAILURE) rather than abort() so that all atexit() calls will actually get executed 2005-09-06 05:32:12 +00:00
taylor 0952771b72 fix for -pcx32 on big-endian 2005-09-06 02:40:24 +00:00
Kazan f116ff4f58 fixed a bug related to multiplayer table validation and modular tables 2005-09-06 00:32:20 +00:00
taylor f6c794bd85 merge of OSX tree
a lot of byte swaps were still missing, will hopefully be fully network compatible now
2005-09-05 09:38:19 +00:00
taylor cc72eb1d2a merge of OSX tree
fix OGL fullscreen switch for SDL since the old way only worked under Linux and not OSX or Windows
fix OGL version check, it would allow a required major version to be higher if the required minor version was lower than current
2005-09-05 09:36:41 +00:00
taylor 68265ecfc9 a little more cross-platform friendly this way 2005-09-05 09:34:06 +00:00
taylor adb71b42b6 merge of OSX tree
update cmdline stuff for Linux to be less stupid and provide better feedback to the user
2005-09-05 09:33:08 +00:00
taylor bd372c46ec merging of project files for OSX 2005-09-05 09:23:26 +00:00
taylor a62183fd64 merging of new files from OSX tree 2005-09-05 09:21:15 +00:00
wmcoolmon 74f451ab2e Fix the ship vanishing in TOPDOWN mode error 2005-09-05 09:02:08 +00:00
phreak f98a3ba721 don't wrap the U_offset variable since it causes the beam to jump once it gets reset. 2005-09-03 17:48:21 +00:00
taylor 33e28ed71e various weapon_range cap fixes for primary, secondary weapons and hud targetting info 2005-09-01 04:14:04 +00:00
Goober5000 2518d7d7a9 hm, typo
--Goober5000
2005-08-31 08:11:58 +00:00
Goober5000 391ae75979 All wings will now form on their respective leaders, not just certain starting wings.
If this breaks anything, the old code is commented out.  You know who to yell at. ;)
--Goober5000
2005-08-31 08:09:51 +00:00
Goober5000 fa1270f62d Wings will now form on their leader, not necessarily the player. This is to
account for cases where the player is not the leader of his wing.  It has the
side effect of causing wings that arrive later in the mission to form on *their*
leader rather than the player, but this is probably the preferred behavior (at
least judging from Mike Kulas's comment of 5/9/98).  This does create a
difference from retail AI, but it should be only cosmetic, since ships only form
on a wing until they are ordered (via comm or sexp) to do something else.
--Goober5000
2005-08-31 07:54:33 +00:00
Goober5000 7e583ad5d6 removed two unused functions
--Goober5000
2005-08-31 07:17:43 +00:00
Goober5000 46386e5ee0 remove a redundant function
--Goober5000
2005-08-31 07:01:40 +00:00
Goober5000 40442a6cc4 fix a function prototype to match its counterpart in vecmat.h
--Goober5000
2005-08-31 06:25:27 +00:00
Goober5000 b783360750 roll back and recommit the minimally invasive version of phreak's fix...
this removes a bit of redundant code
--Goober5000
2005-08-31 06:12:41 +00:00
phreak 5507bf9c95 real spawn angle fix. The problem stemmed from the matrix argument in vm_vec_random_cone()
being objp->orient and should have been the matrix formed by vm_vector_2_matrix(&m, &objp->orient.vec.fvec, NULL, NULL);
2005-08-31 05:47:02 +00:00
Goober5000 dcb66b4ce6 fixed yet another docking bug, based on taylor's original fix :p
--Goober5000
2005-08-31 00:59:35 +00:00
Goober5000 d13386b02b made spawning missiles work like retail when appropriate
--Goober5000
2005-08-31 00:48:22 +00:00
phreak 9f64817f7d Get rid of alpha blending when using the htl drawing fuctions for lines and spheres.
Right now, gr_opengl_draw_htl_line and gr_opengl_draw_htl_sphere are only used in fred, so
it shouldn't change anything critical
2005-08-29 02:23:04 +00:00
phreak 80a248e214 Record state changes in gr_opengl_set_state() 2005-08-29 02:20:56 +00:00
Kazan 6e816fc2d3 potential fix for mantis bug 237 2005-08-27 00:21:27 +00:00
taylor 0357abd27d fix strange static issue experienced with TBP briefing voices 2005-08-26 17:05:13 +00:00
taylor 98ab82451e send out multi pings during level load to prevent timeouts on slower computers (does not break network compatibility with older, or retail, clients/servers) 2005-08-26 00:56:17 +00:00
taylor ae0211df31 basic cleaning, removing old/useless code, sanity stuff, etc:
- very minor performance boost from not doing stupid things :)
 - minor change to 3d shockwave sizing to better approximate 2d effect movements
 - for shields, Gobal_tris was only holding half as many as the game can/will use, buffer is now set to full size to avoid possible rendering issues
 - removed extra tcache_set on OGL spec map code, not sure how that slipped in
2005-08-25 22:40:04 +00:00
taylor a71dd6e5c5 fix crash from oversized buffer data requests with OGGs 2005-08-25 22:33:48 +00:00
taylor f3d6636fb9 since the geomtry_batcher can send more verts than non-HTL code can handle, avoid drawing in that case to avoid crashing 2005-08-25 22:32:55 +00:00
taylor 499bfccdf3 fix Int3() when we are an OGG and need silence data 2005-08-25 06:32:42 +00:00
taylor 10b4d8ef73 don't let ai keep firing primary and secondary weapons for fighters and bombers if they are dying (fixes player deathroll too) 2005-08-25 00:48:19 +00:00
Goober5000 f7db8ee7d1 tweaky optimization based on the current version of stristr and
the current version of the expanded music.tbl
--Goober5000
2005-08-24 07:20:36 +00:00
Goober5000 20de684fcd faster version of stristr
--Goober5000
2005-08-24 07:14:52 +00:00
matt 0b285d1ce5 Changed rect_size_y - 1 to rect_size_y. Not really that important, but much more correct. I'll stop barraging cvs now :) 2005-08-23 17:06:28 +00:00
matt 85e806405c Fixed another screen save bug relating to having your window positioned offscreen. Still isn't great for when the window is offscreen top left 2005-08-23 16:57:28 +00:00
matt 94d2d6da1d Fixed screen save crash when a popup is called 2005-08-23 15:59:51 +00:00
Goober5000 6d83162a72 ensure init/reset of goals works cleanly
--Goober5000
2005-08-23 09:18:08 +00:00
Goober5000 995961bd93 fix for bug 519
--Goober5000
2005-08-23 09:03:56 +00:00
Goober5000 f9e97e03dc removed a thing I apparently forgot to remove on 2005/07/12
--Goober5000
2005-08-23 07:49:24 +00:00
taylor 87363eba75 fix navpoint hud brackets and text display in non-standard resolutions 2005-08-23 07:37:14 +00:00
Goober5000 9f2bf811be some tweaks to parselo, plus ensure that Unicode files don't crash
--Goober5000
2005-08-22 22:24:22 +00:00
Goober5000 49735a9631 one more change
--Goober5000
2005-08-22 04:59:13 +00:00
Goober5000 7d7d365d9c final changes to projects and workspace; everything should work now
(in MSVC 6 anyway)
--Goober5000
2005-08-22 04:58:38 +00:00
Goober5000 eff4e44151 these ogg libs are needed also
--Goober5000
2005-08-22 04:55:38 +00:00
Goober5000 ce5aa8edfb add dx8 libs and headers missing in the dx9 sdk
--Goober5000
2005-08-22 04:53:41 +00:00
Goober5000 e28c203461 add ogg libs and headers
--Goober5000
2005-08-22 03:11:32 +00:00
taylor 87d2843cfc fix stats display in debriefing with non-standard resolutions 2005-08-21 21:05:53 +00:00
Goober5000 09e9dbec4d clarified the comment on my original move of the wing departure information assignment
--Goober5000
2005-08-21 06:19:31 +00:00
taylor 35309cc15a more unix->SCP_UNIX define fixing 2005-08-20 20:38:08 +00:00
taylor f851a3190b some bmpman and render_target function name changes so that they make sense
always use bm_set_render_target() rather than the gr_ version so that the graphics state is set properly
save the original gamma ramp on OGL init so that it can be restored on exit
2005-08-20 20:34:51 +00:00
taylor a646e617ff Make sure to always use world pos for shockwaves in HTL mode, avoids the distance check Error()
(if someone can find a better explanation of why this one thing was different please make a better fix)
2005-08-20 20:32:28 +00:00
taylor 9872bd0bc3 Fix an old unix define, should be SCP_UNIX 2005-08-20 20:29:47 +00:00
Goober5000 e01b990494 made AwacsMultiplier more user-friendly
--Goober5000
2005-08-20 18:23:02 +00:00
matt 1000c46fe9 Fix for D3D white squares issue 2005-08-20 16:00:03 +00:00
taylor 73c9b0e749 Address a couple of pilot code issues
- make the same MAX_PILOTS in the barracks that the playerselect screen has since it's a problem here too
 - add a -1 check for ship/weapon name lookups to avoid bounds issues.  NOTE: this can empty the techroom of entries if ithits this check, but it won't crash :)
2005-08-18 01:15:41 +00:00
Kazan 421fc46b42 # FEATURE BREAK # This breaks a feature in pilot files temporarily to correct a [reproducable] crash - it is merely commenting out the trouble lines - bug report in mantis and assigned to taylor 2005-08-18 00:19:53 +00:00
Kazan 66fd939231 [hopefully] Fix the bug i introduced in the show memory usage code, and the convergence bug during autopilot [also saves cpu cycles - MANY of them] 2005-08-16 20:06:24 +00:00
Kazan 725bfc17df i introduced a bug in _vm_realloc.. fixed it 2005-08-14 23:05:27 +00:00
Kazan 2cde2c8e46 I'm stupid, sorry - fixed release-build-crash 2005-08-14 21:01:59 +00:00
Kazan 9e9b151960 diabled NEW_MALLOC on windows - it was causing crashing - must have been corrupting it's own heap 2005-08-14 17:20:56 +00:00
taylor 5c563c5cb8 don't do any ambient sound or music stuff in game_pause()/unpause() on options screens when in mission so we can
avoid having mainhall ambient sounds and music start playing and then not stop until you exit the mission
2005-08-11 12:22:26 +00:00
taylor b8818d6cfc handle rare cases where anims would get freaky if one happened to still be playing or otherwise queued 2005-08-11 12:18:53 +00:00
taylor a081773563 little safety check, a couple of strange cases allow this to happen so we should look for it 2005-08-11 12:16:23 +00:00
taylor cb3401e03a well that was rather stupid of me, this would crash if old + new pilots went over MAX_PILOTS 2005-08-09 10:06:47 +00:00
taylor 222b984cc3 be sure to remove ships from a wing when that ship gets vanished 2005-08-08 03:13:53 +00:00
taylor 0fda3d1fbd hopefully fix the problem that was causing geometry issues in just OGL when using VBOs 2005-08-08 01:19:50 +00:00
taylor 4e3fb69600 some minor cleanup
don't load the default 2d shockwave graphics if we have a default 3d shockwave, they won't get used and only take up memory
2005-08-07 09:25:55 +00:00
taylor 0ee8aac766 forgot to commit this before, did this gui code actually compile for anyone? 2005-08-07 09:24:22 +00:00
taylor ca91178cbe fix 3-D shockwave frame detection so that it will use the proper number of frames for the animation (not less, not more) 2005-08-05 15:33:45 +00:00
Goober5000 c619247b02 made "stealth" tag more user-friendly, and fixed a bit of punctuation
--Goober5000
2005-08-03 22:02:38 +00:00
taylor 3708fb1de7 allow for both gamedir and userdir cmdline config files 2005-08-01 10:00:39 +00:00
taylor 4602e63dc1 never could get Ai_class_names to realloc properly but this does the job just as well 2005-08-01 09:57:52 +00:00
wmcoolmon d9cf3916f4 MR_NO_FOGGING for shockwaves 2005-07-31 20:31:41 +00:00
taylor 2c6bc53193 we only care about fmt and data tags so once we have them bail out, fixes some really bad seek errors in crappy wav files 2005-07-31 01:35:43 +00:00
taylor 61ccec1abd fix a NULL pointer reference if there are no secondary banks on a ship 2005-07-31 01:34:03 +00:00
taylor c8bc719c4c few data type fixes, was only a problem for big-endian systems as little-endian doesn't really care about this 2005-07-31 01:32:21 +00:00
taylor 3817a704ff print file and line info for Int3() calls to the logfile so that they are easier to debug with basic error reports 2005-07-31 01:30:48 +00:00
taylor 1a62ef0b68 Temporarily add an empty AIM_GET_BEHIND case to ai_execute_behavior() to avoid hitting Int3() in TBP 2005-07-31 01:29:21 +00:00
wmcoolmon d37906f041 Removed turret thing, added some more armor type calculations 2005-07-30 22:34:42 +00:00
taylor d77c090eaf safety check for TYPE_D beam weapons, the +Shots: count needs to be at least 1 to avoid various errors 2005-07-29 10:18:26 +00:00
Goober5000 8a5dc41e2e verified that submode_start_time is updated whenever submode is changed
--Goober5000
2005-07-27 18:27:49 +00:00
Goober5000 2dd43251ec more tweaks to the dock code
--Goober5000
2005-07-27 17:22:22 +00:00
taylor 9719b83766 Add ability to use specific refresh rate, needs a soon to be updated Launcher to have set via GUI
but this can go in already.  Defaults to, and falls back on, previous behavior and adds some
  error checking that wasn't there previously.
2005-07-26 08:46:48 +00:00
Goober5000 9fb769900b more bugs and tweaks
--Goober5000
2005-07-25 08:22:00 +00:00
Goober5000 9b12500fe1 forgot this
--Goober5000
2005-07-25 05:55:40 +00:00
Goober5000 2d0bde22e4 cleaned up some command line and mission flag stuff
--Goober5000
2005-07-25 05:24:17 +00:00
Goober5000 f0b3d37762 whoops
--Goober5000
2005-07-25 05:23:33 +00:00
Goober5000 2f1745b9c8 various code cleanups, tweaks, and fixes; most notably the MISSION_FLAG_USE_NEW_AI
should now be added to all places where it is needed (except the turret code, which I still
have to to review)
--Goober5000
2005-07-25 03:13:26 +00:00
Goober5000 db06ce05c1 cleaned up some rotating submodel code
--Goober5000
2005-07-24 20:12:55 +00:00
Goober5000 9e830fd82d fixed a minor docking bug
--Goober5000
2005-07-24 19:59:24 +00:00
taylor e4dfa534f6 proper multi support for fighter beams, already has code to break protocol commented out if we need it,
decided to skip and beam type checks and let beam_fire() reassign it (should work ok)
2005-07-24 18:35:44 +00:00
taylor 9ad5b3686f hehehe, fix the check to allow fighter beams to count for kills 2005-07-24 18:33:47 +00:00
taylor 2bb5300132 various incarnations of freaky and stupid, need to do this everywhere eventually 2005-07-24 18:32:58 +00:00
taylor ed4f880369 address possible div-by-0 problem 2005-07-24 18:31:59 +00:00
taylor 01f6ac2148 little 64-bit strangeness (longs are 64-bit here rather than 32) 2005-07-24 18:31:17 +00:00
wmcoolmon 253e12878c Multiple shockwaves support. 2005-07-24 06:01:37 +00:00
wmcoolmon 7b18d839ca Synced 3D shockwaves' glowmaps with the model, tossed in some medals.tbl
support for the demo/FS1
2005-07-24 00:32:45 +00:00
wmcoolmon b1f5390f90 Fixed formatting FTW 2005-07-23 22:52:44 +00:00
wmcoolmon c85ed21a50 Fixx0red description for show-subtitle 2005-07-23 22:48:28 +00:00
Goober5000 a8daa191bf bah - fixed subsystem comparison
--Goober5000
2005-07-23 21:47:46 +00:00
Goober5000 95f0ce016e fixed ai issue where some ships would never call for rearm
--Goober5000
2005-07-23 21:06:24 +00:00
Goober5000 6328625e63 fixed a rare but ugly (though amusing) bug
--Goober5000
2005-07-23 18:38:47 +00:00
wmcoolmon 2f84efb076 Fixed bug where camera reset when rotation complete 2005-07-23 18:25:42 +00:00
Goober5000 1c19a2bfa5 remove Bobboau's extra warp thing
--Goober5000
2005-07-23 17:27:50 +00:00
Goober5000 9a494bb545 remove an extraneous extern
--Goober5000
2005-07-23 16:25:32 +00:00
Goober5000 f7cc6399c4 fix the support ship bug; taylor should be happy now ;)
--Goober5000
2005-07-23 11:42:54 +00:00
wmcoolmon f996cbb2c0 Another try at fixing gun turrets sticking straight up 2005-07-23 08:17:04 +00:00
Goober5000 d4e507ad41 CVS header tweaks
--Goober5000
2005-07-22 10:18:41 +00:00
Goober5000 25d1addbed unhide null vector bug
--Goober5000
2005-07-22 09:59:30 +00:00
wmcoolmon 295a57cc65 Dynamic AI Class number commit. KNOWN BUG: When AI_CLASS_INCREMENT is hit and vm_realloc is called, memory corruption seems to
result. Not at all sure what causes this; if this can't be resolved soon, we can always treat _INCREMENT like _MAX
2005-07-22 09:19:40 +00:00
Goober5000 c54410f177 fixed another bug when changing ship classes
--Goober5000
2005-07-22 04:31:12 +00:00
taylor 1ffb472245 better error checking/handling for when you fire primary/beam weapons without a target selected 2005-07-22 03:54:46 +00:00
taylor db538a19d7 fix crash on commit in the multi ship selection screen
mask_data in the UI code is always cast to ubyte so why it was a ushort type I'll never know
fix unsized text in input boxes (fixed the real problem earlier but forgot to remove this old fix)
2005-07-22 03:53:32 +00:00
taylor ba26e4690f forgot to remove PreProcDefines.h from here too 2005-07-22 03:51:13 +00:00
wmcoolmon 478543cd73 Changed $Hull Repair Rate and $Subsystem Repair Rate to be percentages,
as well as making them accept all values between -1 and 1
2005-07-21 07:53:14 +00:00
taylor e21deb998a fix problem loading compressed DDS created by DX9 utils 2005-07-20 14:55:12 +00:00
taylor 7cc52df168 move the "none.wav" init to event_music_init() so it only runs through once (fixes no mission music when modular tbls are used) 2005-07-20 02:37:32 +00:00
taylor 32304b128a better UV offsets when using non-standard resolutions (for text mostly), copied from D3D code 2005-07-20 02:35:51 +00:00
taylor fe0b2855ee fix resize fixes 2005-07-19 04:52:56 +00:00
taylor 5398dc8206 better "is_640x480" detection, 800x600 res was using GR_1024 where it should have used GR_640 2005-07-18 14:09:03 +00:00
taylor f0b509911a errant unsize was still messing up h-sliders in non-standard resolutions 2005-07-18 12:42:10 +00:00
taylor a13064936a more non-standard res fixing
- I think everything should default to resize now (much easier than having to figure that crap out)
 - new mouse_get_pos_unscaled() function to return 1024x768/640x480 relative values so we don't have to do it later
 - lots of little cleanups which fix several strange offset/size problems
 - fix gr_resize/unsize_screen_pos() so that it won't wrap on int (took too long to track this down)
2005-07-18 03:45:10 +00:00
taylor a14b57d6f5 cleanup hudtargetbox rendering from that total hack job that had been done on it (fixes wireframe view as well)
more non-standard res fixing
 - I think everything should default to resize now (much easier than having to figure that crap out)
 - new mouse_get_pos_unscaled() function to return 1024x768/640x480 relative values so we don't have to do it later
 - lots of little cleanups which fix several strange offset/size problems
 - fix gr_resize/unsize_screen_pos() so that it won't wrap on int (took too long to track this down)
2005-07-18 03:44:01 +00:00
taylor 23d5e01508 PreProcDefines.h has to be removed from here as well so that "make dist" will work 2005-07-18 03:37:35 +00:00
wmcoolmon b48172ce1b Unlike my previous commit, this one does not cause a segmentation
fault. :)
2005-07-16 07:03:49 +00:00
wmcoolmon 64721e4407 Commented out lines 554 and 555 so the code would compile 2005-07-16 06:33:16 +00:00
Goober5000 6a2a61287d cleanup and clarification of phreak's fix of a bug propagated by me and penguin
--Goober5000
2005-07-16 04:41:04 +00:00
wmcoolmon 08db59549f I can't compile the source to test this, but this should switch the
hi-res check to "2_ChoosePilot-m" rather than sparky_hi_fs2.
2005-07-15 23:19:10 +00:00
Goober5000 6a02b099da fixed a typo of Kazan's dating all the way back to October 15, 2003 (!!) that
created a nasty stealth bug
--Goober5000
2005-07-15 03:48:40 +00:00
Goober5000 e49cd4edb8 remove PreProcDefines.h from project file; tweak #define's
--Goober5000
2005-07-14 23:46:57 +00:00
mrduckman 919bd0d434 Restored messages to on-focus channel. If it doesn't work, we'll work around with a pseudo-cmd. 2005-07-14 13:25:03 +00:00
phreak d9c643bb41 If the web cursor bitmap isn't found, tell the user to move the executable to the main FS2 directory. 2005-07-13 15:15:54 +00:00
Goober5000 1004ffcb54 remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:35:36 +00:00
Goober5000 d62d659bf4 remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:26:00 +00:00
Goober5000 81833122b8 remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 03:15:53 +00:00
Goober5000 a3ee32e28d remove PreProcDefine #includes in FS2
--Goober5000
2005-07-13 02:50:53 +00:00
Goober5000 851732e3e1 remove preprocdefines, yay!
--Goober5000
2005-07-13 02:39:17 +00:00
Goober5000 485e7fcf7e this seems like it should be handled by the code already...
let's remove it and see what happens :p
--Goober5000
2005-07-13 02:32:22 +00:00
Goober5000 c14a21e332 removed autopilot #define
--Goober5000
2005-07-13 02:30:54 +00:00
Goober5000 55e04969c9 move inferno vs. network check here for the time being
--Goober5000
2005-07-13 02:08:26 +00:00
Goober5000 b8db2eb59f fixed a bunch of "issues" caused by me with the species stuff
--Goober5000
2005-07-13 02:01:30 +00:00
Goober5000 47edc76b69 rolled this back because it causes a syntax error in MSVC
--Goober5000
2005-07-13 02:00:44 +00:00
Goober5000 84b8fe77d7 improved species support and removed need for #define
--Goober5000
2005-07-13 00:44:24 +00:00
Goober5000 28fdeb4a28 removed DECALS_ENABLED
--Goober5000
2005-07-12 22:14:40 +00:00
Goober5000 197a041da5 removed NO_LINKED_PRIMARY_PENALTY as it's better suited for difficulty.tbl or something similar
--Goober5000
2005-07-12 21:58:45 +00:00
Goober5000 9b657a529b fixed "warpout sequence aborted" bug
--Goober5000
2005-07-12 21:10:57 +00:00
Goober5000 3008602982 properly fixed beam_apply_whack()
--Goober5000
2005-07-12 21:01:40 +00:00
mrduckman 1259c46d3c Better SDL Headers checking for MacOSX 2005-07-12 18:14:53 +00:00
Goober5000 67a5183ad6 remove all restrictions on which ship types can dock with each other
--Goober5000
2005-07-12 07:03:18 +00:00
mrduckman 61162cfd67 Fixed SDL linking for MacOSX 2005-07-11 14:26:30 +00:00
wmcoolmon 6a2b0110b9 Bumped Fs2_open version to 3.6.7 2005-07-11 10:13:09 +00:00
wmcoolmon 43d061d4f3 Bumped version for Linux makefile to 3.6.7 2005-07-11 10:12:06 +00:00
wmcoolmon 344c50572a Fixed the bug where sending an ignore command to "All fighters" would
apply to all ships
2005-07-11 10:01:06 +00:00
taylor 2175a959db make sure to tack on a / on the dot dir so that recursive directory making will work properly (code thought it was a file rather than a dir) 2005-07-09 04:34:43 +00:00
wmcoolmon ccd760994b Added fixes for custom gauges discussed in the recent thread 2005-07-09 03:02:07 +00:00
taylor 775c86a894 various compiler warning fixes (some of these from dizzy) 2005-07-07 16:36:58 +00:00
taylor 449f1e2fe5 make double sure that we actually need to render thruster glows instead of doing it regardless 2005-07-07 16:35:11 +00:00
taylor dc7a2d08db add value of GL_vertex_data_in to OGL card memory usage 2005-07-07 16:33:39 +00:00
taylor 88d08df966 compiler warning fixes
add -noibx troubleshooting cmdline option to disable use of IBX files
don't try to set thuster object number is only one thruster bank is specified (default method should go into affect)
2005-07-07 16:32:33 +00:00
phreak 5e8c31dadd fixed an afterburner bug where AI ships would have infinite AB fuel if NO_NETWORK
was defined.
2005-07-05 17:04:08 +00:00
taylor ea7c3255fc bah, forgot to ever check debriefings 2005-07-02 20:57:48 +00:00
taylor e2bc4ff920 ton of non-standard resolution fixes 2005-07-02 19:45:02 +00:00
taylor 7500378696 ton of non-standard resolution fixes
make gr_cross_fade() work properly in OGL
2005-07-02 19:40:48 +00:00
taylor 3921b2b079 fix compiler warnings introduced by recent stub changes (defining an empty stub as something is wrong, it should be nothing)
assuming that GetStatus thing wasn't tested since it would never have worked
2005-07-02 19:39:23 +00:00
taylor 15c5c06c7f some supernova fixing 2005-07-02 19:36:04 +00:00
taylor 0270ac2c0b compiler warning fixes 2005-07-02 19:33:18 +00:00
phreak 8842fb64db remove the BEAM_NO_WHACK flag in beam_apply_whack() 2005-07-01 17:19:43 +00:00
Goober5000 578d70b7cd the message queue now waits for simulated speech to finish
--Goober5000
2005-06-30 02:36:16 +00:00
Goober5000 ea73c417ff added functions to check if speech is playing
--Goober5000
2005-06-30 02:35:17 +00:00
Goober5000 cbf7b33393 * NOX'd none.wav
* changed comparisons on none.wav to only look at the first four letters in case
  we don't have an extension or in case some weirdo decides to put none.ogg
* simulated speech pre-empts "beeps" in in-game messages
--Goober5000
2005-06-30 01:48:52 +00:00
Goober5000 84e6492488 tweaked the stubs and added a function
--Goober5000
2005-06-30 01:35:52 +00:00
Goober5000 d24b80f395 if game_busy() is in gamesnd_preload_common_sounds() then it should
also be in gamesnd_load_gameplay_sounds() I would expect
--Goober5000
2005-06-30 00:48:02 +00:00
Goober5000 ef175e9271 Removed "beam no whack" as setting the beam's mass to 0 achieves the same effect.
--Goober5000
2005-06-30 00:36:10 +00:00
taylor 304a1f77a1 set-skybox-model only takes one argument so don't advertise more
add set-skybox-model help text for FRED2
2005-06-29 18:54:59 +00:00
taylor 83012fe0e9 should fix perpetually damaged subsystems on ships for multi clients 2005-06-29 18:54:02 +00:00
taylor 4df1fd48c4 FRED2 does special stuff for jumpnode handling so don't try and delete the obj ourselves when FRED is running 2005-06-29 18:53:07 +00:00
taylor 81480ebcbc extra checks to make sure we don't end up targetting a sensor-invisible ship 2005-06-29 18:52:02 +00:00
taylor 15628c5f8b revert OGL init changes since ATI drivers suck and don't like it 2005-06-29 18:51:05 +00:00
taylor 5427e73ffa little cleanup and error checking 2005-06-29 18:50:13 +00:00
taylor 97982c52d7 various FS2NetD fixes:
- replace timer stuff with something that more accurately works cross-platform and without being affected by load
 - better sanity checking for the server list
 - working Linux compatibility that's not dog slow
 - when calling DataReady() make sure that the data is properly valid
 - fix messed up cvs merge cleanup from the Linux merge which did nasty things
2005-06-29 18:49:37 +00:00
taylor 892fb2ea93 add option to not scale up movies to fit window/screen, default is to scale
(arguably not a bug but I said I would get it in before 3.6.5 and forgot)
2005-06-29 18:46:13 +00:00
taylor 4de6d09b64 we only want to have m_data_offset be 0 for oggs since the seeking callback will account for the true offset
only extern the one int we need for the -nosound speech fix rather than including the entire header
2005-06-24 19:36:49 +00:00
taylor 52d9eccb72 compiler warning fix (dizzy) and make sure that it's safe to continue after that switch statement 2005-06-22 15:25:41 +00:00
taylor abed73b3c6 make sure that _mkdir() will return an error if the path is invalid 2005-06-22 15:18:58 +00:00
taylor 5f9b7064c9 objnum check when targetinfo is used, fixes message brackets having random text as info 2005-06-22 15:17:53 +00:00
taylor 148ba14b56 make sure we only have one extension on mission names 2005-06-22 15:16:40 +00:00
taylor 3abc9fc0f8 probably be a good idea to make the valid objnum check here too 2005-06-21 00:25:34 +00:00
taylor 0de8af2602 in the model _render functions change "light_ignore_id" to "objnum" since that's what it really is
and this makes it so much easier to realize that
properly deal with the fact that objnum can be -1 in  model_really_render()
add NULL check to neb2_get_fog_values() so that it can just send back defaults if objp is NULL
small compiler warning fix for neb code
2005-06-21 00:20:24 +00:00
taylor 7f48891579 unbreak network compatibility with 3.6.5 and earlier builds
fix crashing with turret weapons
2005-06-21 00:15:06 +00:00
taylor 375bad91e6 add some better error checking/handling for when GetServerList messes up 2005-06-21 00:13:47 +00:00
taylor 887aa98e05 add virtual destructor so that GCC4 can shut up 2005-06-21 00:12:11 +00:00
phreak 8862debae8 added cmdline.h include so the compiler would see the no sound command line option
also added CVS header information.
2005-06-20 15:54:58 +00:00
taylor d1b28d6c7e little cleaner ship_get_random_targetable_ship(), for Goober's sake ;) 2005-06-20 04:10:35 +00:00
taylor b4cf700de6 arch and GCC4 compatibility 2005-06-20 04:09:46 +00:00
taylor cb9c2520bd make sure to reset size to 0 on texture free 2005-06-19 09:04:40 +00:00
taylor e2c5b17775 check_values() shouldn't be inline anymore
remove useless neb2_get_fog_intensity() call
s/alocate/allocate/g
2005-06-19 09:03:05 +00:00
taylor 4a1fa4ce38 minor sanity checking for geometry_batcher
make particle batchers allocate dynamically
handle cases where a particle graphic couldn't be loaded
2005-06-19 09:00:09 +00:00
taylor ad6698346f disable speech when -nosound is used 2005-06-19 08:56:23 +00:00
taylor 5db635395d woorps! 2005-06-19 04:59:04 +00:00
taylor 960d41a0d5 remove xmouse.cpp since it's pretty much useless 2005-06-19 02:48:14 +00:00
taylor 457f351954 never "promote" to a lower rank than current 2005-06-19 02:47:00 +00:00
taylor ed3eeb59e4 OGG streaming fixes to get data reading right and avoid skipping
properly handle seeking in OGG streams
compiler warning fix in OpenAL builds
2005-06-19 02:45:56 +00:00
taylor 7bb2d44d29 WMC's build fix, part deux 2005-06-19 02:43:49 +00:00
taylor c774be5da9 jumpnodes can get deleted outside of FRED now so allow for that 2005-06-19 02:43:14 +00:00
taylor b213b72e04 really needed to mention those two things as well given the types of changes those are 2005-06-19 02:42:21 +00:00
taylor 1f3ed28920 fix possible crash from popups, especially in multi 2005-06-19 02:38:33 +00:00
taylor 7df06d9b99 model_free_all() will unload textures so don't bother doing it twice 2005-06-19 02:37:43 +00:00
taylor 2b4dd24535 general cleanup, remove some old code
speed up gr_opengl_flip() just a tad
inverted gamma slider fix that Sticks made to D3D
possible fix for ATI green screens
move opengl_check_for_errors() out of gropentnl so we can use it everywhere
fix logged OGL info from debug builds to be a little more readable
if an extension is found but required function is not then fail
try to optimize glDrawRangeElements so we are not rendering more than the card is optimized for
some 2d matrix usage checks
2005-06-19 02:37:02 +00:00
taylor 2807196e1e allow screenshots and backsaves in windowed mode
account for D3D_textures_in size so that it doesn't hit negative values
2005-06-19 02:31:51 +00:00
taylor 1665521590 MIN Num_iface_sounds fix 2005-06-19 02:29:54 +00:00
taylor 0051f2b19f add a _fast version of bm_unload() to be used in modelinterp and future graphics API code
clean up some modelinterp code to not use memcpy() everywhere so it's more platform compatible and matches old code (Jens Granseuer)
NaN check to catch shards-of-death and prevent hitting an Assert() (Jens Granseuer)
fix jumpnode code to catch model errors and close a memory leak
make the call to bm_unload_all() after model_free_all() since we will get bmpman screwups otherwise
don't show hardware sound RAM when using OpenAL build, it will always be 0
print top-right memory figures in debug builds slighly further over when 1024+ res
2005-06-19 02:28:56 +00:00
Goober5000 8f0d5d7024 fixed a CVS log spelling error, plus fixed a tricky sexp allocation bug
--Goober5000
2005-06-16 05:17:32 +00:00
mrduckman e3883f2426 Added LIST command and added comment about PRIVMSG for Channels 2005-06-09 14:57:38 +00:00
wmcoolmon f006692c72 Hopefully this fixes something :) 2005-06-07 06:34:30 +00:00
wmcoolmon 98870cab35 This may stop targeting not-targetable ships in EMP 2005-06-07 06:10:51 +00:00
taylor 7ffbec56f3 add wxwidgets macro so that the dev package doesn't have to be installed to compile regular builds 2005-06-04 20:03:37 +00:00
wmcoolmon 28979a738d I *think* this should fix bool lists 2005-06-03 22:36:57 +00:00
taylor 5977a382dd some IBX debugging info to help determine if an IBX is corrupt post-mortem 2005-06-03 18:18:02 +00:00
matt 125f341f10 D3D gamma now no longer works backwards --Sticks 2005-06-03 16:42:30 +00:00
taylor 597668dd88 the problem this tried to fix should be properly fixed now but I keep forgetting to remove this block 2005-06-03 06:51:50 +00:00
taylor 7b1cf8dd59 cleanup of gr_bitmap since it's the same for D3D and OGL, skip if GR_STUB though
fix resize/rendering issue when detail culling is used with optimized opengl_create_texture_sub()
2005-06-03 06:44:17 +00:00
taylor c71c1ab1f9 eek... fix wrong description of changes 2005-06-03 06:41:37 +00:00
taylor 85a0250f11 better audio pause/unpause support when game window loses focus or is minimized 2005-06-03 06:39:27 +00:00
wmcoolmon dc0d63e1c0 Small extern fix 2005-06-03 02:28:54 +00:00
Goober5000 1c229c15d0 ugh... reverting taylor's change for now; I'll have to take another look at this
--Goober5000
2005-06-02 03:20:20 +00:00
wmcoolmon 32dd6aafd5 Protected ships are safe from spawning weapons. :) 2005-06-02 02:41:52 +00:00
wmcoolmon 1500870bfa Removed OF_DESTROYED, replacing it with a deletion cache 2005-06-02 02:09:43 +00:00
wmcoolmon 063342c36b Cast to quiet error 2005-06-02 01:56:32 +00:00
wmcoolmon f034cb48a1 Better missing model handling Pt. 2 2005-06-01 22:54:23 +00:00
wmcoolmon 12fc5a9a32 Better missing model handling 2005-06-01 22:52:56 +00:00
phreak 2db4db928e clarified error messages to say that the files listed on asserts/warnings/errors
are located on the computers that built the exe.
2005-06-01 15:10:26 +00:00
taylor e03d62eeb7 bit of cleanup for audiostr-openal and fix a Windows-only enum error
bunch of OGG related fixes for Linux and Windows (DirectSound and OpenAL), fixes audio related TBP 3.2 crashes
gracefully handle OGG logical bitstream changes, shouldn't even load if there is more than 1
2005-06-01 09:41:14 +00:00
taylor 59c1d7a01e little cleanup
optimize opengl_create_texture_sub() by not doing any extra image processing if we don't have to
  if an image is already power-of-2 or we don't need power-of-2 then avoid the extra time and memory usage
2005-06-01 09:37:44 +00:00
taylor e24d75cf94 make sure that newly created entries are properly initialized 2005-06-01 09:35:42 +00:00
taylor 8d1c0cd5b2 newline fix 2005-06-01 09:34:59 +00:00
taylor bb89ede9a2 well that previous docking fix wasn't quite enough, this makes sure that code will actually get exec'd
(Goober: might want to double check that this isn't stupid, does appear abort properly though)
2005-06-01 09:34:36 +00:00
wmcoolmon 8ffc7d031f This should fix redmenace's Assert...I'm not sure why it hasn't been triggering every time a shield is at full strength. 2005-05-30 23:41:36 +00:00
taylor 49318711ab if a briefing does have any stages (no text) then don't carry over text from a previous mission
some generic cleanup to V code that isn't a real problem now but could easily have been a memleak
2005-05-30 05:33:11 +00:00
taylor 5e415f7bd4 make sure we don't show various offscreen indicators and info when hud-disabled-except-messages is used 2005-05-30 05:31:19 +00:00
taylor abb7c260b4 make sure we stop mission in the redalert case too 2005-05-30 05:30:02 +00:00
taylor 622f835598 as soon as the first frame gets released the rest are unreachable in the loop
this was basically became a memory leak as additional frames never got released
2005-05-30 05:29:17 +00:00
taylor 039f3a26af me is a moron, this broke audio streaming 2005-05-30 05:27:30 +00:00
Goober5000 7cfdb91770 Taylor's the real SCP leader; I just play one on the Internet
--Goober5000
2005-05-30 04:38:33 +00:00
taylor f0b9910163 haven't got a clue what I was thinking with that crap 2005-05-28 19:44:17 +00:00
taylor 1f730b9284 debug message fixing
a little bit of code clarity
2005-05-28 19:43:28 +00:00
taylor 90005e98fe add a NULL check to model_get() for better error detection over an outright CTD 2005-05-28 19:41:56 +00:00
taylor 28fbeef528 fix ani corruption detection so that certain streaming anis don't hit it (check was wrong anyway) 2005-05-28 19:40:59 +00:00
Goober5000 ba24fb1aee moved some prototypes that WMC put in the header file back to the implementation file
--Goober5000
2005-05-27 03:37:53 +00:00
Goober5000 a4f4184fe0 hmm, rolled back to 2.3
--Goober5000
2005-05-27 03:36:20 +00:00
Goober5000 17b8798fbe removed some old unnecessary prototypes WMC had added
--Goober5000
2005-05-27 02:37:29 +00:00
tbird 133e98a434 no message 2005-05-26 20:59:59 +00:00
tbird 583024a8fa no message 2005-05-26 20:59:58 +00:00
tbird 9bea5c63e6 Removed due to problems with getting the correct file in place 2005-05-26 20:57:33 +00:00
tbird 437733a98e Updated based on VC6 projects 2005-05-26 20:56:10 +00:00
taylor 366980ab4a forgot to take into account F1_0 on timer_get_fixed_seconds(), remove those stupid CRs too 2005-05-26 09:21:28 +00:00
Goober5000 8fa5d63cb0 some bracket happiness, plus fixed the traning message version of the crazy semicolon bug
(thanks to taylor for fixing the regular message version)
--Goober500
2005-05-26 05:07:19 +00:00
taylor 82d7c503d8 the Loki extensions are Linux only so don't even bother checking under Windows, the
new spec has a cross-platform way of getting the same thing so this isn't a big deal
2005-05-26 04:32:31 +00:00
taylor 7aec8d2a42 don't page out textures in ship_delete() since it causes some slowdown which can make
the explosion effects skip/stutter
2005-05-26 04:30:48 +00:00
taylor edc7a3da00 those crazy semi-colons 2005-05-26 04:29:23 +00:00
taylor e722d89389 if we switch to a pilot who has a campaign that isn't available then abort the read and
deselect all pilots, should prevent data loss or crashes due to the missing safety check
2005-05-26 04:28:45 +00:00
taylor 6f481a3472 timer changes to fix game_busy() on the loading screen and 100% incorrect values on some machines,
don't know if this is going to work that great but it's more like the Linux SDL code now which
  has worked for years without major problems
2005-05-26 04:27:11 +00:00
taylor 7c5d87a506 make sure batch rendering of lasers happens after fog is disabled in nebula missions 2005-05-24 20:55:21 +00:00
taylor ae398ffe8b couple of extra checks to make sure that we can't enter the barracks or the techroom
if the currently selected campaign isn't available, fixes several pilot crash bugs
2005-05-24 20:54:06 +00:00
taylor 644f1120ed make sure that we recursively create directories for Linux/OSX
replace older recursive mkdir method in cfileextractor with new method
2005-05-24 20:52:10 +00:00
wmcoolmon edc4c33208 Commented out -fixbugs and -nocrash in preparation for 3.6.7 2005-05-24 07:05:49 +00:00
taylor 1c55a120b8 extra check to make sure that RLE reading never goes over frame size in new ANI formats 2005-05-24 03:13:36 +00:00
taylor 49f283f030 get command sanity check right, fixes lowercase on extract too 2005-05-24 03:12:27 +00:00
taylor c96527a320 an extra bounds check in sound.cpp
fix audiostr error when filename is !NULL but 0 in len might hit on SDL debug code
2005-05-24 03:11:38 +00:00
taylor d363f55686 quick catch for some corrupted anis, only a partial fix but it will do until something
a bit more heavy duty comes along in the near future
2005-05-23 05:58:31 +00:00
taylor 0610b5e051 Jens, again:
- compiler warning fixes
 - sanity and readability fixes for bmpman
2005-05-23 05:56:26 +00:00
taylor e02157b394 more from Jens...
- make sure that a frame number doesn't get carried over to non-animated weapon glows
 - move the line splitting code in missiontraining.cpp so that we don't have to worry about EOS chars
2005-05-23 05:55:13 +00:00
phreak 1aafce7240 fix out of bounds error 2005-05-23 04:58:43 +00:00
phreak a73e6686d0 compile warning fixage. 2005-05-22 22:47:19 +00:00
taylor 75ecd13e2c a medals crash fix that isn't influenced by the evil Java empire (Jens Granseuer) 2005-05-18 14:03:27 +00:00
taylor b3235d9998 some basic Polish language support from the icculus.org version (Janusz Dziemidowicz) 2005-05-18 14:01:31 +00:00
taylor 71cb920cab a few help text adjustments and fix some compiler warnings 2005-05-18 01:57:54 +00:00
taylor f0f3990738 Initial import of cfileextractor, still needs some work but does what it needs to 2005-05-17 21:00:57 +00:00
taylor a432fd8699 add building for cfileextractor 2005-05-17 20:59:23 +00:00
taylor f66759eac1 more autogen goodness from Jens
- remove old/unneeded checks (ie. we don't use libtool so don't check for it)
 - use --foreign rather than --gnu on automake so we can get rid of things like NEWS, etc.
2005-05-17 20:58:46 +00:00
taylor 4c8003fb8c more missed stuff from the vm_* macro change (thanks Alpha0) 2005-05-17 20:57:05 +00:00
phreak 4a8d5d19d3 reverted a tagged only commit, it wasn't needed 2005-05-16 15:40:43 +00:00
phreak 97778bd8ce custom loading screen fixage. 2005-05-15 21:40:31 +00:00
taylor 560ee745ea don't let the ogg callbacks close the file handle on us, let us do it ourselves to keep things straight 2005-05-15 06:47:57 +00:00
phreak c44cb63459 another tagged only turret fix 2005-05-14 21:48:22 +00:00
phreak f9cad9acb4 stop turrets from targeting non-bombs. also some tagged-only fixes. 2005-05-14 21:35:04 +00:00
phreak c225d664a2 fixed an out-of-bounds array bug 2005-05-14 21:34:17 +00:00
phreak 78d4b21830 medal_stuff needed a copy constructor and an overloaded assignment operator. 2005-05-14 16:16:48 +00:00
taylor 349a0cda5f unbreak joining (when forming, not in-game) (Jens Granseuer) 2005-05-13 23:10:17 +00:00
taylor ff36b6aa7b Ooops! Added the wrong version of the streaming patch from Jens 2005-05-13 23:09:28 +00:00
taylor fdb372e5a3 properly support multiple versions of automake (Jens Granseuer) 2005-05-13 23:08:39 +00:00
phreak 7089596664 possible fix for seeing suns through ships. shouldn't break anything. 2005-05-13 20:55:19 +00:00
taylor 9ff37eb37e more malloc->vm_malloc, free->vm_free, strdup->vm_strdup fixage 2005-05-13 02:56:34 +00:00
phreak dca9ba1202 fixed another minimum range bug that prevented the Colossus and the Beast from
properly engaging one another in the mission: Their Finest Hour (SM3-08)
2005-05-13 02:50:47 +00:00
taylor 359485654f missed a strdup to vm_strdup conversion 2005-05-13 02:47:58 +00:00
phreak 0a858b7b05 forgot a vm_strdup in place of a strdup 2005-05-13 02:41:24 +00:00
taylor e4131e25e4 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
2005-05-12 17:49:18 +00:00
taylor b4cc142d08 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
fix a few streaming errors in OpenAL code (Jens Granseuer)
temporary change to help deal with missing music in OpenAL Windows builds
don't assert when si->data is NULL unless we really need to check (OpenAL only)
2005-05-12 17:47:57 +00:00
taylor 7dbcf77914 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
reallocate sp->triggers with the real vm_realloc() rather than that manual method
2005-05-12 17:45:53 +00:00
taylor 23176b03dd use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
fix crash with Warning() message getting the wrong string
2005-05-12 17:44:02 +00:00
taylor ff31561484 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
try and keep up with how much VBO data is in memory too since that takes away from texture memory
2005-05-12 17:43:20 +00:00
taylor 6f55648495 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
set byte_mult to 2 for TCACHE_TYPE_AABITMAP to get the memory size right for Debug builds
2005-05-12 17:42:13 +00:00
taylor 122ddc2134 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
use correct GL VRAM texture number in OGL mode rather than the D3D number
2005-05-12 17:40:48 +00:00
taylor a110e19177 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
change system->decals allocation to use real vm_realloc() rather than that manual method
2005-05-12 17:39:13 +00:00
taylor c2700b4b9e add an extra gr_flip() after gr_clear() to make sure the change is made active 2005-05-12 17:37:48 +00:00
taylor 6a9f82eac5 use vm_malloc(), vm_free(), vm_realloc(), vm_strdup() rather than system named macros
fixes various problems and is past time to make the switch
for the game_busy() text during page in add a "BmpMan" so we know better what's going on
2005-05-12 17:36:59 +00:00
Goober5000 ee91e844ef added dialogs to the project file
--Goober5000
2005-05-12 14:02:57 +00:00
Goober5000 5fbc8f7e23 added a bunch of dialogs to wxFRED... thanks, taylor, for the GUI development :)
--Goober5000
2005-05-12 14:00:15 +00:00
Goober5000 62cfe8b61b whoops
--Goober5000
2005-05-12 03:51:17 +00:00
Goober5000 ef6b1a12f4 repeating messages with variables should work properly now
--Goober5000
2005-05-12 03:50:10 +00:00
Goober5000 f2d38d2f13 removed variables in messages for now
--Goober5000
2005-05-12 01:34:50 +00:00
phreak 76d763cd8e added mission flag that will not show enemy wing names, just the ship class. 2005-05-11 22:15:49 +00:00
Goober5000 35c25efdc7 fixed a docking bug
--Goober5000
2005-05-11 11:38:03 +00:00
Goober5000 8eea5e3446 grr
--Goober5000
2005-05-11 09:32:03 +00:00
Goober5000 1563378777 fixed a few of karajorma's bugs
--Goober5000
2005-05-11 09:28:32 +00:00
Goober5000 03137abad6 changed an Assert() to an Error()
--Goober5000
2005-05-11 09:27:35 +00:00
Goober5000 48af4d28a9 variables should now work properly in messages that are sent multiple times
--Goober5000
2005-05-11 08:10:20 +00:00
phreak bc45b7c1d8 clean out some old code 2005-05-11 02:16:17 +00:00
phreak 8f8afd10ff fix the problem where the fade in/out doesn't work if looking at a sun. 2005-05-11 02:15:07 +00:00
phreak 428dde26e4 reverted a change that WMC made. It made Goober mad and delayed the release of
3.6.6 by two months.
2005-05-11 00:25:42 +00:00
phreak 2b8b24f78a fixed a minimum weapon range bug that was causing turrets to fire at ships beyond
the actual range of a weapon.
2005-05-10 15:49:04 +00:00
phreak 33b64ccd98 if you're using all_turret_weapons_have_flags() with a WIF2_** flag, use
all_turret_weapons_have_flags_wif2().

Corrected some logic that would dump a valid target for turrets if its objnum is 0, as
opposed to -1.
2005-05-10 02:44:40 +00:00
phreak 7fa4c0f215 when finding valid weapons, set i to MAX_SHIP_PRIMARY_BANKS - 1 since i
is incremented at the top of the loop.  otherwise, we would pass over the first secondary
weapon in the bank.
2005-05-10 01:47:34 +00:00
wmcoolmon ee3624ccdb Code betterness 2005-05-08 20:39:10 +00:00
wmcoolmon 4631e6f31a Dynamically allocated medals 2005-05-08 20:38:32 +00:00
wmcoolmon 3232327c9d Various turret code changes in a vain attempt to make things more readable/work properly 2005-05-08 20:35:26 +00:00
wmcoolmon f3bc4e0425 Turret debugging code; Medals stuff; GUI_system change 2005-05-08 20:33:42 +00:00
wmcoolmon 790810ada9 Dynamically allocated medals 2005-05-08 20:28:57 +00:00
wmcoolmon 994f25cdf0 Change to GUI_system; this will probably break the lab, but is necessary for things to compile properly. 2005-05-08 20:27:51 +00:00
wmcoolmon c70c6005b3 Change to GUI_system (to prevent memory leaks and allow for auto-deconstruction) 2005-05-08 20:26:46 +00:00
wmcoolmon 63d1922367 "backspace" function 2005-05-08 20:23:28 +00:00
wmcoolmon 0c7adec15c armor.tbl revamp 2005-05-08 20:21:48 +00:00
tbird 3230a9eca9 Added project files for VC.NET 7.0 (the 2005 project files do not work in 7.0) 2005-05-04 00:30:56 +00:00
wmcoolmon 313d75276e Added variables to permanent location 2005-05-03 07:55:44 +00:00
wmcoolmon 045e29ae29 Removed variables files 2005-05-03 07:54:49 +00:00
wmcoolmon d0bace2c57 Added Bobb's variable system (with some minor compiler-warning fixes) 2005-05-03 06:33:07 +00:00
wmcoolmon aa61590ad3 Bah, stupid externs. :P 2005-05-02 22:36:54 +00:00
mrduckman a1569ff1c2 Added /NAMES command (Very needed to know who's in a channel :P) 2005-05-02 15:33:17 +00:00
phreak 39ea734595 bumped MAX_SPAWN_WEAPONS to 30 for inferno builds 2005-05-01 23:40:44 +00:00
phreak 471ed14f14 added CVS info to top of file. 2005-05-01 23:23:18 +00:00
phreak 2ce65069fb when creating the window take into account the top border 2005-05-01 23:17:46 +00:00
phreak 1270b04c97 fix the window from shrinking if a cutscene is played in windowed mode 2005-05-01 23:16:12 +00:00
phreak 0b959888c7 don't confine the cursor in d3d 2005-05-01 23:13:19 +00:00
wmcoolmon bd620e76dd -output_sexps command line 2005-05-01 07:13:59 +00:00
wmcoolmon 6f2fc71a7c Added (up-to-date) SEXP description info. 2005-05-01 06:18:58 +00:00
phreak 24774cf9cc buckets in sort_weapons_by_type() allocated on the heap instead of the stack. 2005-04-30 18:20:57 +00:00
phreak 79d41f9a59 ABbitmap should default to -1 2005-04-30 18:18:46 +00:00
phreak 6e69f08e65 bm_page_in_textures() should return if bitmap_num is any negative value, instead of just -1 2005-04-30 18:17:17 +00:00
wmcoolmon 529e3c47bd Removed FS2_DEMO defines that looked like they wouldn't cause the universe to collapse 2005-04-28 05:29:30 +00:00
wmcoolmon e01a6293d5 Cleared up some ambiguity that made MSVC 2003 go on strike 2005-04-28 05:12:26 +00:00
wmcoolmon e63b108e61 stuff_byte to stuff_ubyte 2005-04-28 01:39:14 +00:00
wmcoolmon 744a53ddf0 parse_ship uses stuff_bool_list; stuff_byte to stuff_ubyte 2005-04-28 01:38:32 +00:00
wmcoolmon ff0d52b1a4 More parsing flexibility 2005-04-28 01:36:46 +00:00
wmcoolmon fbc24176cd stuff_byte to stuff_ubyte; does the same thing, but with a better name. 2005-04-28 01:36:09 +00:00
wmcoolmon a7987b89be Switch stuff_string_white to stuff_string (I don't see why _white was used in the first place) 2005-04-28 01:32:57 +00:00
wmcoolmon 448027d119 Added stuff_bool_list; Internationalized stuff_boolean. 2005-04-28 01:12:19 +00:00
Goober5000 ec269425fd -made the XRC file parsed on load instead of embedded
-migrated wxFRED to wxWidgets 2.6.0
--Goober5000
2005-04-25 12:14:21 +00:00
taylor 7543e00581 newline fix 2005-04-25 06:36:25 +00:00
taylor 593ff86eeb use full size of Campaign_missions[] for simroom filtering, fixes the problem of campaign
missions still showing up in the single list even after filtering
2005-04-25 06:36:01 +00:00
taylor 46acd73b0b little cleanup so that debug and release build files don't have to be listed twice
add newer wxFRED2 files
2005-04-25 06:33:56 +00:00
wmcoolmon 7ed4e8985d Use parse_sound instead of code chunks 2005-04-25 00:34:00 +00:00
wmcoolmon 151c188018 Dynamically allocated engine washes; subsystem sounds; armor fixes. Line 4268 of ship.cpp, apparently, works properly; bears further looking into. 2005-04-25 00:31:14 +00:00
wmcoolmon 97cb2f5933 subsystem sounds 2005-04-25 00:28:58 +00:00
wmcoolmon a4d6350db0 MAX_SHIP_TYPES > Num_ship_types 2005-04-25 00:28:17 +00:00
wmcoolmon d0d7f35c76 Commented out unneeded array (Glide) 2005-04-25 00:27:32 +00:00
wmcoolmon 44f837acf8 Dynamically allocated engine washes; subsystem sounds 2005-04-25 00:26:53 +00:00
wmcoolmon 68ded37681 Windows have minimum size according to caption; made lab use another tree level so all ships can be seen 2005-04-25 00:24:34 +00:00
wmcoolmon f959265a74 Added parse_sound; replaced Assert() with an if() (The latter may not be a good idea, but it keeps missions from being un-debuggable) 2005-04-25 00:22:34 +00:00
wmcoolmon 01791870bc Center title screen, removal of unnecessary #ifdefs 2005-04-25 00:21:30 +00:00
wmcoolmon 365c12e99f Bumped console printing buffer size so people can play with the neb2 command 2005-04-25 00:07:22 +00:00
wmcoolmon d2eaea9a85 MAX_SHIP_TYPES -> Num_ship_types 2005-04-25 00:04:30 +00:00
Goober5000 18606cfb46 updated the project file
--Goober5000
2005-04-24 14:45:17 +00:00
Goober5000 658730bb4b wxFRED now uses XRC-based resources
--Goober5000
2005-04-24 14:42:27 +00:00
taylor 732d7f5561 really are too many changes here:
- remove all bitmap section support and fix problems with previous attempt
 ( code/bmpman/bmpman.cpp, code/bmpman/bmpman.h, code/globalincs/pstypes.h,
   code/graphics/2d.cpp, code/graphics/2d.h code/graphics/grd3dbmpman.cpp,
   code/graphics/grd3dinternal.h, code/graphics/grd3drender.cpp, code/graphics/grd3dtexture.cpp,
   code/graphics/grinternal.h, code/graphics/gropengl.cpp, code/graphics/gropengl.h,
   code/graphics/gropengllight.cpp, code/graphics/gropengltexture.cpp, code/graphics/gropengltexture.h,
   code/graphics/tmapper.h, code/network/multi_pinfo.cpp, code/radar/radarorb.cpp
   code/render/3ddraw.cpp )
 - use CLAMP() define in gropengl.h for gropengllight instead of single clamp() function
 - remove some old/outdated code from gropengl.cpp and gropengltexture.cpp
2005-04-24 12:56:43 +00:00
taylor 592899a5f5 little cleanup of laser rendering
- fix animated glows
 - proper alpha modification (still messed up somewhere though, shows in neb missions)
 - remove excess batch_render()
2005-04-24 12:47:36 +00:00
taylor a99518e88d possible dev/0 bug fix (Jens Granseuer) 2005-04-24 12:45:14 +00:00
taylor e3c8004429 make sure we don't build with speech support under Linux unless we specify it as a configure option 2005-04-24 12:44:25 +00:00
Goober5000 343e2537de fix0red the CVS log
--Goober5000
2005-04-24 08:27:17 +00:00
Goober5000 995ce3e17f made swarm/corkscrew/flak conflict more friendly
--Goober5000
2005-04-24 07:31:34 +00:00
wmcoolmon f630e1799e Enabled movies in windowed mode; if this causes problems for people, they can always use -dnoshowvid 2005-04-24 06:52:23 +00:00
Goober5000 ae8c507d37 eh, stupid quotes
--Goober5000
2005-04-24 05:53:15 +00:00
Goober5000 605b490d17 actually, I think this way works better
--Goober5000
2005-04-24 05:15:24 +00:00
Goober5000 ea491e3bed added FS2PATH environment variable and removed custom build stuff
--Goober5000
2005-04-24 04:47:58 +00:00
phreak 159c0affaf centered the window on the desktop if the -window command line is used. 2005-04-24 03:06:29 +00:00
wmcoolmon 2d7f231f47 Added resizing option to gr_shade. We can probably merge gr_shade and gr_rect; they do the same thing. 2005-04-24 03:02:43 +00:00
wmcoolmon 1417a0236a Might as well fix trainer messages too. 2005-04-24 03:01:56 +00:00
wmcoolmon f7e389eec4 Lowlevel (ie vertex buffer-mapping) functions for _rect and _shade 2005-04-24 02:40:40 +00:00
wmcoolmon 4f94da464d Context help fixing goodness 2005-04-24 02:39:36 +00:00
wmcoolmon 2e35d7571c Moved gr_rect and gr_shade to be API-nonspecific as the OGL/D3D functions were virtually identical 2005-04-24 02:38:31 +00:00
Goober5000 3575982079 subsystem fix
--Goober5000
2005-04-24 02:10:53 +00:00
wmcoolmon 6f93eb7ca8 Removed GL_SECTIONS 2005-04-23 01:17:09 +00:00
taylor 4dc7881df8 wurrps 2005-04-22 02:32:18 +00:00
wmcoolmon 131bac2b53 Minor updates to the GUI, and added some code that will (hopefully) resize HUD images in nonstandard resolutions. I couldn't test it; got an out of memory error. 2005-04-22 00:34:55 +00:00
taylor e030989f59 sexp to swap the skybox in mission, not tested in FRED, hopefully I didn't mess this up too much 2005-04-21 15:59:42 +00:00
taylor 51cc8377d2 initial changes to mission loading and status in debug builds
- move bmpman page in init to an earlier stage to avoid unloading sexp loaded images
 - small changes to progress reports in debug builds so that it's easier to tell what's slow
 - initialize the loading screen before mission_parse() so that we'll be about to get a more accurate load time
fix memory leak in gamesnd (yes, I made a mistake ;))
make sure we unload models on game shutdown too
2005-04-21 15:58:08 +00:00
taylor 5a75bba686 make sure we don't try to process chatbox_close() more than once 2005-04-21 15:53:24 +00:00
taylor d0ad20c79d stupid little comment fix, no big deal 2005-04-21 15:52:24 +00:00
taylor 1fe7c55885 fix source/dest memory overwrite that Valgrind was complaining about 2005-04-21 15:51:40 +00:00
taylor f63d3a01f1 we can't resize compressed textures so... don't, fixes rendering problems when not at max texture detail 2005-04-21 15:50:47 +00:00
taylor 981c2e4601 update of bmpman and model bitmap management, well tested but things may get a bit bumpy
- use VM_* macros for bmpman since it didn't seem to register the memory correctly (temporary)
 - a little "stupid" fix for dds bitmap reading
 - fix it so that memory is released properly on bitmap read errors
 - some cleanup to model texture loading
 - allow model textures to get released rather than just unloaded, saves bitmap slots
 - bump MAX_BITMAPS to 4750, should be able to decrease after public testing of new code
2005-04-21 15:49:21 +00:00
wmcoolmon fe81f39299 Nonstandard res fix. 2005-04-20 08:32:01 +00:00
wmcoolmon 3460e06701 Fix silly armor.tbl parse error. 2005-04-20 08:26:49 +00:00
phreak dd41824dc5 NMONO should not interfere with the debug window 2005-04-20 04:34:42 +00:00
phreak 72f1bb21ab get the cheat keys for "force weapon" working again 2005-04-20 04:34:01 +00:00
phreak 95db195410 CVS file header. take 1 2005-04-20 04:29:50 +00:00
phreak dc2e5a8ef9 fix for the slow firing turret problem 2005-04-20 04:27:56 +00:00
wmcoolmon 31f7d6dd34 Lock time compression when autopilot is engaged 2005-04-19 23:03:42 +00:00
taylor 904a63b7e5 try not to buffer output to the speech dev so that the text doesn't just show up some time in the future 2005-04-19 06:29:28 +00:00
taylor a8713687ae we might actually be needing to load a model here ;) 2005-04-19 06:27:54 +00:00
taylor 5f7ce77177 small compiler warning fixes, more 'always true' stuff 2005-04-19 06:26:56 +00:00
taylor 75f276cff4 don't try to allocate 0 bytes of memory when there are no shield tris, weird memory stuff frightens me 2005-04-19 06:25:23 +00:00
taylor a35470e783 8 months I've been meaning to put this in the Linux tree, me == moron 2005-04-19 06:22:20 +00:00
Goober5000 48959c177c model and class changes should be all set now
--Goober5000
2005-04-18 08:35:28 +00:00
Goober5000 a0e945bf21 better subsystem comparison
--Goober5000
2005-04-18 06:59:16 +00:00
Goober5000 a0305a1fc6 removed ship->alt_modelnum as it was essentially duplicates of ship->modelnum; changed the alt modelnum stuff accordingly
fixes for ship_model_change and change_ship_type
--Goober5000
2005-04-18 05:27:26 +00:00
taylor 78f22aea2f some extra checks to make sure we don't act on invalid gamesnds (fix for WCS) 2005-04-18 03:31:27 +00:00
taylor 777a5dbab0 more accurate play position for OpenAL when AL_BYTE_LOKI is used (Jens Granseuer) 2005-04-18 03:30:05 +00:00
Goober5000 0a72f49270 more sexp goodness
--Goober5000
2005-04-18 03:16:57 +00:00
taylor d4799821f8 updated Linux joystick code that's a bit less insane speed wise
remove ability to build without joystick support, no reason to keep it around
fix unusable warning flag with libjpeg building
2005-04-17 05:38:29 +00:00
phreak b87907a3be fixed lasers drawing backwards 2005-04-16 18:43:17 +00:00
wmcoolmon d950a6d8da Fixed the lab; Made the storybook look less grotesque without skins. 2005-04-16 08:13:34 +00:00
wmcoolmon af4ce5c886 Eh, what the hey. Maybe I should've taken the breathalyzer test. :) 2005-04-16 04:19:21 +00:00
wmcoolmon 7fd2b592b4 More optional tag-making for ships.tbl 2005-04-16 04:16:57 +00:00
wmcoolmon 1e4e53bf80 Minor changes; made even more fields in ships.tbl optional. 2005-04-16 03:36:13 +00:00
wmcoolmon 1745959ed7 Removed an unneeded semicolon 2005-04-16 03:05:05 +00:00
wmcoolmon 255570da57 Added type "exponential base"; equation is 'final_damage = (x^damage)' 2005-04-15 23:19:13 +00:00
taylor b24cd07398 fix ambient light 2005-04-15 11:42:27 +00:00
taylor 085db31507 stupid <expletive-delete> terminal, I <expletive-deleted> <expletive-deleted>!!! 2005-04-15 11:41:28 +00:00
taylor 092315362e new GCC = new warning messages, yippeeeecvs commit code/parse/encrypt.h code/parse/encrypt.cpp code/scramble/scramble.cpp 2005-04-15 11:36:55 +00:00
taylor 6a655dc469 add scramble port
support both FS1 (8bit and 7bit) and FS2 style encryption
2005-04-15 11:35:18 +00:00
taylor b217d73a44 proposes that WMC be subject to a breathalyzer test before commit ;) 2005-04-15 11:32:26 +00:00
taylor d78b715166 div-by-zero fix for snd_time_remaining() 2005-04-15 11:28:41 +00:00
taylor d55e7cc900 some cleanup to prevent utilities linking all game libs 2005-04-15 11:27:53 +00:00
wmcoolmon 443c49cbf9 It's amazing how many possible bugs you can catch simply by doing something completely different than coding 2005-04-15 07:19:29 +00:00
wmcoolmon 0cbd23c615 One final oops (hopefully). 2005-04-15 06:59:05 +00:00
wmcoolmon 55f7fdc264 Another oops. 2005-04-15 06:56:02 +00:00
wmcoolmon 7241244f70 Er, oops 2005-04-15 06:40:54 +00:00
wmcoolmon d0ed305d43 Local codebase commit; adds armor system. 2005-04-15 06:23:18 +00:00
Goober5000 b3e0314930 bumped sexp limit
--Goober5000
2005-04-14 20:03:16 +00:00
phreak 41fdb1da08 Updated the message of a required extension that hasn't been found.
It was referencing the old Glide engine.
2005-04-13 23:24:21 +00:00
Goober5000 3b2eee464a fixed the compile errors (thanks Phreak)
--Goober5000
2005-04-13 22:31:53 +00:00
Goober5000 b6980737f0 removed spurious folder
--Goober5000
2005-04-13 22:17:27 +00:00
taylor 039e34ffaa I totally blame that on the keyboard 2005-04-12 19:53:44 +00:00
taylor 99136873c0 more demo support (Jens Granseuer) 2005-04-12 19:22:48 +00:00
taylor 7516eae124 not sure what that file was doing there... 2005-04-12 19:22:00 +00:00
taylor 84a3455035 many, many compiler warning and header fixes (Jens Granseuer)
fix free on possible NULL in modelinterp.cpp (Jens Granseuer)
2005-04-12 05:26:38 +00:00
taylor 9b86e6966b more support for 'make dist' (Jens Granseuer) 2005-04-12 05:24:48 +00:00
phreak 8388a394c1 ambient light is set in mission 2005-04-12 02:10:09 +00:00
phreak 120c01f735 ambient_light_level added to the mission structure 2005-04-12 02:07:00 +00:00
phreak 189e5fe678 gr_set_ambient_light() function for the ambient light sliders in FRED 2005-04-12 02:04:56 +00:00
taylor fc35ceeffc changes to facilitate 'make dist' 2005-04-11 10:16:26 +00:00
taylor 8698cece32 un-revert previous revert since it does apparently affect MinGW (Alpha0) 2005-04-11 10:15:11 +00:00
taylor 30fc4cc19f some limits.h fixes to make GCC happier
revert timer asm change since it doesn't even get used with Linux and couldn't have been the slowdown problem
2005-04-11 05:50:36 +00:00
taylor 17ac979ae7 make sure use an insensitive case check for Messages[] names (Jens Granseuer)
little clarification of if-else block in message_training_que()
2005-04-11 05:48:34 +00:00
taylor e37bdddb71 _endthread() doesn't take an argument so do support one (Jens Granseuer)
debug variable fixes in freespace.cpp (Jens Granseuer)
as a safety catch we should Assert() on future usage of things we don't yet support in *nix _splitpath()
2005-04-11 05:45:38 +00:00
taylor be7f62118c some demo related fixes (Jens Granseuer) 2005-04-11 05:42:02 +00:00
taylor 7079b22535 add version checks for autoconf and automake
fix wacky wxFRED2 check (Jens Granseuer)
2005-04-11 05:40:21 +00:00
wmcoolmon 8b414664c5 Fixed some paths stuff. 2005-04-09 07:50:41 +00:00
wmcoolmon 0b89fec44c *crosses fingers* 2005-04-08 20:03:59 +00:00
wmcoolmon fb90a4caaf Did things in a somewhat less hackish manner; note that 'Update project' will only update the anjuta directory; you will have to update file, and then manually select the fs2_open/ directory to update *everything* 2005-04-06 18:47:02 +00:00
wmcoolmon 3e633a7021 Presumeably, I fixed building in anjuta for anyone who can run
autogen.sh
2005-04-06 18:22:49 +00:00
wmcoolmon 4f7a1a73c7 Fixed anjuta project file so it would run from projects subdirectory. 2005-04-06 18:12:17 +00:00
wmcoolmon 4dd746e46d Added some comments to the new turret helper functions. 2005-04-06 18:10:40 +00:00
taylor a89a6f6186 add audio files for OpenAL, build with USE_OPENAL define to use OpenAL 2005-04-05 12:03:03 +00:00
taylor 6c822c7993 fix memory error from GL extension list that occurs in certain circumstances 2005-04-05 11:50:57 +00:00
taylor 67eb07aae2 update what sound files get used 2005-04-05 11:49:37 +00:00
taylor 5a34ecf947 remove acm-unix.cpp, replaced by acm-openal.cpp since it's properly cross-platform now
better error handling for OpenAL functions
Windows can now build properly with OpenAL
extra check to make sure we don't try and use too many hardware bases sources
fix memory error from OpenAL extension list in certain instances
2005-04-05 11:48:23 +00:00
taylor 4df7becbea handle iostream problems on GCC pre-3.x
fix spacing on wxFRED stuff (yes, I'm that anal)
2005-04-05 11:41:33 +00:00
taylor 586190fb8e s/vector/vec3d/g, better support for different compilers (Jens Granseuer) 2005-04-05 05:53:25 +00:00
Goober5000 2059ed3528 tweaks
--Goober5000
2005-04-03 11:47:01 +00:00
Goober5000 fc42a097eb brought weapon loadout banks into agreement with ship info banks
improved error reporting on apply-to-all
--Goober5000
2005-04-03 08:48:31 +00:00
phreak ba27712ccd put First_secondary_index back in so FRED can compile.
The weapons list is also sorted whenever all loading is done so lasers and beams always
come before missiles.  FRED's loadout code needs this behavior to stick.
2005-04-02 21:34:08 +00:00
Goober5000 02fb161187 fixed a few errors in apply-to-all
--Goober5000
2005-04-01 08:50:25 +00:00
taylor 826be871bc fix hanging on exit with OpenAL
some better error handling on OpenAL init and make it more Windows friendly too
basic 3d sound stuff for OpenAL, not working right yet
2005-04-01 07:33:08 +00:00
taylor 6958a3be52 *that blasted Enter key*, just fixing the log... nothing to see here... 2005-04-01 07:31:10 +00:00
taylor 6576b9bf69 some minor Linux fixage 2005-04-01 07:29:40 +00:00
taylor 77a4348695 code/ship 2005-04-01 07:27:32 +00:00
taylor f1f9396d4f go back to 24-bit depth, 32 didn't help any with ATI bugs 2005-04-01 07:25:54 +00:00
mrduckman a550f19877 Made a change for wxWidget checks, checking for 2.4.2 version. 2005-03-31 21:12:23 +00:00
Goober5000 aea447768f whoops
--Goober5000
2005-03-31 12:45:22 +00:00
Goober5000 68c7b774e6 implemented the apply-to-all wing loadout button
--Goober5000
2005-03-31 12:43:51 +00:00
Goober5000 ce89e0d560 fix type mismatch
--Goober5000
2005-03-31 12:38:24 +00:00
Goober5000 111fa9a728 changed a bunch of literal constants to their #define'd keywords
--Goober5000
2005-03-31 11:11:56 +00:00
taylor 001f85c695 forget the swaps for OSX 2005-03-30 16:06:52 +00:00
taylor 23ab20680a a little Linux happiness 2005-03-30 16:06:26 +00:00
taylor aff41f6382 basic wxFRED2 building, only works on Linux for now 2005-03-30 16:05:42 +00:00
wmcoolmon cdfbe82f07 Whoops. 2005-03-30 05:37:22 +00:00
wmcoolmon 8316e86843 Made it so *Snd fields in ships.tbl and weapons.tbl take the sound name
as well as its index (ie "L_sidearm.wav" instead of "76")
2005-03-30 02:32:41 +00:00
Goober5000 591a76e0bd fixed version log
--Goober5000
2005-03-30 01:27:49 +00:00
Goober5000 a9ba9ccea8 added header back in, with a small tweak for the .cpp
--Goober5000
2005-03-30 01:23:32 +00:00
Goober5000 9d30ba0210 removed mixed-case header file
--Goober5000
2005-03-30 01:20:05 +00:00
Goober5000 5f32fc582f set up the main menu options
--Goober5000
2005-03-29 13:35:53 +00:00
Goober5000 c519d635f1 fixed browse info error
--Goober5000
2005-03-29 09:57:02 +00:00
Goober5000 272627527b wxFRED is now dependent on code.lib
--Goober5000
2005-03-29 08:15:44 +00:00
Goober5000 1406ef90ec whew... bare-bones "hello world" wxFRED base finally implemented!
--Goober5000
2005-03-29 07:55:19 +00:00
wmcoolmon fbad2dcdc0 Removed some warnings under Linux/GCC 2005-03-29 07:03:16 +00:00
wmcoolmon b24d6815bc Added some comments to #defines to make reading easier 2005-03-29 06:36:37 +00:00
wmcoolmon a28a052ac6 Fixed extern to compile under Linux 2005-03-29 06:28:52 +00:00
phreak 71c2ae7fca global variable "Jump_nodes" needs external linkage for FRED 2005-03-29 03:42:07 +00:00
phreak fb1d118622 get_num_elements() method, probably coded incorrectly, but its needed for FRED 2005-03-29 03:40:15 +00:00
Goober5000 1dbfce5ea7 added storybook to the MSVC6 project
--Goober5000
2005-03-29 02:50:48 +00:00
mrduckman b4e502737c Added OpenGL include dir parameters 2005-03-28 13:25:18 +00:00
taylor bbefc0b90e fix to snd_time_remaining() to make sure we are getting the correct index into Sounds[] 2005-03-28 00:40:09 +00:00
mrduckman fe8a8cc8e7 Syntax correction 2005-03-27 21:13:05 +00:00
mrduckman dbacdf939b Added /kill IRC Command 2005-03-27 21:06:31 +00:00
wmcoolmon 728ee7e21f Forgot to replace 'ship' with 'ai' after copy-paste 2005-03-27 17:33:51 +00:00
Goober5000 0f94de5dd8 bah 2005-03-27 13:37:15 +00:00
Goober5000 6351a5becf rewrote the weapon cheat cycle functions to avoid recursion
--Goober5000
2005-03-27 13:23:05 +00:00
Goober5000 881f1c6077 two new sexps
--Goober5000
2005-03-27 13:00:40 +00:00
Goober5000 2dfa5cdd45 clarified max hull/shield strength names and added ship guardian thresholds
--Goober5000
2005-03-27 12:28:35 +00:00
taylor 413cdab6b7 will hopefully fix the slowdown from mission to mission (thanks Alpha0) 2005-03-27 08:57:52 +00:00
taylor e4827d8110 this is what coding on an empty stomach will get you 2005-03-27 08:51:25 +00:00
wmcoolmon 7fe64c20b0 Bizarre combo of fopen() and close() 2005-03-27 08:12:53 +00:00
taylor 4dfb7611ed fill in some stuff for timer and mmio calls, not 100% but it works ok 2005-03-27 06:17:54 +00:00
taylor 233a8c3134 don't use a platform specific ifdef since the OpenAL code may work under Windows now too 2005-03-27 06:16:46 +00:00
taylor 885ab83dba mmio callbacks work on Linux now and fix problem where system ogg.h would get used rather than the local one 2005-03-27 06:15:31 +00:00
taylor 4df106d0e6 update for streaming support and platform independance 2005-03-27 06:14:30 +00:00
taylor 54707bc916 some pilot file fixing when going between multi and single (partial fix) 2005-03-27 06:12:38 +00:00
taylor 0d4ab080a9 make use of new OpenAL define since it's not platform specific anymore 2005-03-27 06:08:42 +00:00
taylor 3b3aafd920 weapon_num can be 0 so let that through 2005-03-27 06:07:54 +00:00
taylor a1509554e7 update with current files 2005-03-27 06:07:00 +00:00
taylor 3dd13913da initial import of OpenAL streaming (many thanks to Pierre Willenbrock for the missing parts) 2005-03-27 05:48:58 +00:00
taylor 6581a79466 unix specific version is obsolete 2005-03-27 05:47:31 +00:00
wmcoolmon f8b4ba66bc Fixed possible infinite loop problem
----------------------------------------------------------------------
2005-03-27 04:16:19 +00:00
wmcoolmon ab323f6b2a Fixed missing/invalid variables 2005-03-27 03:04:09 +00:00
wmcoolmon 535f8fc3d6 Forgot to define 'i' outside of for scope...ironically, in the OGL code. 2005-03-27 02:59:27 +00:00
wmcoolmon 8cba1f3939 Some fixes 2005-03-26 07:53:32 +00:00
wmcoolmon 18ddb1f6ad Cleaned out old code + fixed min problem 2005-03-26 01:49:46 +00:00
wmcoolmon dc3d359393 Added the storybook 2005-03-26 00:26:06 +00:00
Goober5000 31b5327765 removed unreferenced variable
--Goober5000
2005-03-25 22:36:01 +00:00
wmcoolmon 622ac05c63 Small change now that the storybook is in CVS 2005-03-25 07:35:22 +00:00
wmcoolmon 6319d41ab6 Updated MSVC6 project file for AI move 2005-03-25 07:12:05 +00:00
wmcoolmon 19ea0c5b11 Removed old AI files from CVS 2005-03-25 07:03:12 +00:00
wmcoolmon 9471ebced4 Added taylor's old-weapon code fix 2005-03-25 07:01:53 +00:00
wmcoolmon fbf776164b Big, massive, codebase commit. I have not removed the old ai files as the ones I uploaded aren't up-to-date (But should work with the rest of the codebase) 2005-03-25 06:57:38 +00:00
wmcoolmon feee088277 Initial AI code move commit - note that aigoals.cpp has some escape characters in it, I'm not sure if this is really a problem. 2005-03-25 06:45:13 +00:00
taylor 1630965ce8 I think I deserve a medal or something for that one :) 2005-03-25 01:10:51 +00:00
taylor bb556e9c7f s/gr_ogl_/gr_opengl_/g
add empty gr_opengl_draw_line_list() so that it's not a NULL pointer
make gr_opengl_draw_htl_sphere() just use GLU so we don't need yet another friggin API
2005-03-24 23:42:21 +00:00
taylor b0ec8041de make sure we don't go one over the number of message avis 2005-03-24 23:38:49 +00:00
taylor 9e329634b3 fix GCC building 2005-03-24 23:37:25 +00:00
taylor 7843ed8770 fix compiler warnings with mismatched types and unused variables
cleanup some debug messages so they can be turned off if needed
get rid of extra strstr() check for thrusters since it should never get that far anyway
page_in/page_out of model glows should be better now
removed a bunch of unneeded casts and get type specific math functions right
2005-03-24 23:36:14 +00:00
taylor 008582fce5 make sounds.tbl dynamic
"filename" will never be larger than 33 chars so having it 260 is a waste (freespace.cpp)
2005-03-24 23:31:46 +00:00
taylor 8ecfbed208 (re)move some uneeded variables to fix compiler warnings 2005-03-24 23:29:33 +00:00
taylor 851fc877d0 make sounds.tbl dynamic
have snd_time_remaining() be less stupid
some OpenAL error fixerage
be able to turn off some typically useless debug messages
2005-03-24 23:27:26 +00:00
taylor 3ff8fff6af use SWARM_MISSILE_DELAY again so that it's easier to keep up with
fix compiler warnings
2005-03-24 23:24:01 +00:00
taylor 74ae69a49b make sure we will get the right error message 2005-03-24 23:22:59 +00:00
wmcoolmon 3df75bed77 no more MSVC compiler warning 2005-03-24 05:50:07 +00:00
phreak 37034092d4 Starfield bitmaps should now draw in non-htl mode 2005-03-23 20:09:23 +00:00
phreak 8e98e16796 Some specular values in g3_draw_perspective_bitmap() were being incorrectly set. fixed that 2005-03-23 20:08:33 +00:00
taylor 1c2d7163c1 fix version check for drivers that support OpenGL 2.0+ 2005-03-22 00:36:48 +00:00
phreak 0e2d83529b Orb correctly displays in 640x480 2005-03-21 23:19:55 +00:00
phreak c1bc6871c3 Add a function to check whether any duplicate jumpnode names exist 2005-03-20 21:07:10 +00:00
phreak 12c6e04b17 export the functions that deal with the creation and destruction of the starfield buffer.
FRED needs them
2005-03-20 20:02:29 +00:00
phreak d2912daaac draw paths and docking points using HTL 2005-03-20 20:01:15 +00:00
phreak 983881e398 lol forgot to commit the function pointer stuff 2005-03-20 18:05:04 +00:00
phreak 822b4d9c01 high-level implementation for gr_draw_htl_line and gr_draw_htl_sphere 2005-03-20 00:11:27 +00:00
phreak 8074a129cd Added gr_draw_htl_line and gr_draw_htl sphere
There still needs to be D3D versions implemented, but OGL is done.
Follow that or ask phreak about how its implemented/
2005-03-20 00:09:07 +00:00
wmcoolmon 844ac565ef OpenGL display lists 2005-03-19 21:03:54 +00:00
Goober5000 40eeea76d8 corrected misinformation in comment about surface shields (implicit surface
shields were removed for meshed ships)
--Goober5000
2005-03-19 20:45:23 +00:00
wmcoolmon c7b5a70830 small bool fix 2005-03-19 20:35:45 +00:00
bobboau 4972df4cdf adding d3d state block files 2005-03-19 18:18:04 +00:00
bobboau 028fd5c930 added new graphic functions for state blocks
also added a class formanageing a new effect
2005-03-19 18:02:35 +00:00
bobboau 1397a84db7 added a geometry batcher and implemented it in sevral places
namely: lasers, thrusters, and particles,
these have been the primary botle necks for some time,
and this seems to have smoothed them out quite a bit.
2005-03-16 01:35:59 +00:00
phreak 9523481fe2 properly handle using the old method of selecting primary weapons.
i forgot a return statement so the new method was used instead
2005-03-16 00:37:42 +00:00
wmcoolmon 00a413d3b0 Commited placeholder turret funcs. 2005-03-16 00:18:31 +00:00
taylor dd6d061488 make sure w,h,bpp are useable before trying to assign values to them 2005-03-15 17:10:58 +00:00
Goober5000 038cb865be *fixed some sexp declaration formatting
*implemented string comparison sexps
*simplified numeric comparison sexps
*fixed numeric comparison (especially equals) sexps to actually work on all their arguments like they were designed to
--Goober5000
2005-03-15 07:26:52 +00:00
phreak f46914eab9 Awesome 2-for-1 deal!!!
Firstly, the Colossus should now warp out correctly.  No more warphole forming inside of it
Secondly, muzzleflashes now are generated at the gunmounts of the firing ship.
2005-03-15 01:40:07 +00:00
Goober5000 a71305bdc3 properly fixed the out-of-bounds error, as well as a few other errors of the same kind
--Goober5000
2005-03-14 23:34:59 +00:00
Goober5000 9ef30029aa rolled back Phreak's commit
--Goober5000
2005-03-14 23:33:22 +00:00
wmcoolmon 69231d79ff Hopefully this will fixx0r Num_sounds 2005-03-14 23:31:54 +00:00
wmcoolmon 22a4cfc835 Whoops, this isn't needed. 2005-03-14 06:38:31 +00:00
wmcoolmon db1c760a3c Commented out now-unneccessary Int3() 2005-03-14 06:38:06 +00:00
wmcoolmon 70f831bc22 Added memory display thingy to loading screen, if command line is specified and build is a debug build. Also made screenshots go up to 9999 2005-03-14 06:36:30 +00:00
wmcoolmon c20117ef22 Made sounds dynamically allocated 2005-03-14 06:33:38 +00:00
taylor 0e92b61ebf fix for mouse cursor problem when running in a window 2005-03-14 03:38:54 +00:00
taylor f36b06ee40 speedup grow/shrink time for the warp to avoid the big size skips 2005-03-14 03:24:25 +00:00
phreak 5739cfb2d0 Got rid of the stealth check that only applied to cloaked ships. This should
fix some errorneous behavior that caused the ai to target the player
2005-03-14 02:52:58 +00:00
taylor 7b8ff3d087 enable 32-bit to 16-bit TGA conversion with -tga16 cmdline option (experimental)
fix crash when upgrading from original campaign stats file to current
2005-03-13 23:07:36 +00:00
wmcoolmon 087c0be980 Squashed compiler warnings 2005-03-13 08:44:10 +00:00
wmcoolmon 1f1153bc57 Commented out unneeded variables 2005-03-13 08:38:05 +00:00
wmcoolmon c54e4875bd Might as well sync this 2005-03-13 08:37:01 +00:00
taylor 06dc37d064 gotta use MIN/MAX and not min/max now 2005-03-13 08:33:55 +00:00
wmcoolmon c32522129b Hud fixing goodness. I also removed some obsolete code for displaying HUD weapons. 2005-03-13 08:32:28 +00:00
taylor 0f50203063 fix various compiler warning messages
make sure screenshot count doesn't get too high
fix movies playing twice in redalert missions
reset time compression for redalert missions and cmdbriefings, just in case
2005-03-13 08:04:43 +00:00
phreak 50b2cd65fa extra checks in find_parent_rotating_submodel() 2005-03-12 23:53:27 +00:00
phreak a036fc3bea doubled default spawn angle from 180 to 360 since it seems to track better 2005-03-12 21:08:01 +00:00
phreak b2c098ee44 the code for the damaged-escort-priority-all sexp started
overwriting outside ofarray bounds.  goodbye call stack... erm goodbye bug.
2005-03-12 20:48:33 +00:00
taylor 1f92bafc8f helps to get the stupid check right 2005-03-12 19:28:47 +00:00
taylor 50baf2c401 forgot this one, jpeg stuff 2005-03-12 07:42:05 +00:00
phreak 440b39a3ee Fixed a bug where the orb would incorrectly render under alternate FOVs.
Updated the functions that scramble the contacts so the blips show up
somewhat near where they should be.
2005-03-12 06:03:07 +00:00
wmcoolmon ed45cfb078 whee! 2005-03-12 05:21:36 +00:00
taylor 249bfeb9fe absolute header location for jpeglib.h in jpgutils.cpp (thanks WMC)
update VC6 project files to correct versions that work properly with internal libjpeg
2005-03-12 04:59:15 +00:00
wmcoolmon 68ec71efad Fixx0red odd drag problems 2005-03-12 04:44:24 +00:00
wmcoolmon a42a4ec0f0 New commandline option "-noparseerrors" 2005-03-12 03:09:55 +00:00
taylor 4504bea340 was causing strange hangs due to really large values, don't know if this will help but SDL should take care of error checking this way 2005-03-11 14:16:02 +00:00
taylor d395341b1c forgot to remove this with the MIN/MAX change 2005-03-11 14:14:05 +00:00
taylor a3f509766a apparently this change never got in 2005-03-11 14:11:53 +00:00
taylor 69130eb9fe ignore the typical build specific files 2005-03-11 14:00:01 +00:00
wmcoolmon bac63f2faf Isn't the extern needed too? causes linking errors on my system w/o it, although it compiles fine. 2005-03-11 01:37:35 +00:00
wmcoolmon bedf8a6157 Not really. I've got lib files in my main VC.NET libs directory, and include files in grouped subdirectories under my VC.NET include directory. it keeps my HD free of scattered SDK directories and helps keep conflicts down. 2005-03-11 01:34:19 +00:00
wmcoolmon 947e8b16fb Oops, gotta remember to commit main codebase stuff when fixing FRED 2005-03-11 01:28:23 +00:00
wmcoolmon fd9f14053a I like comments 2005-03-11 01:27:17 +00:00
taylor 4821082a53 fix screwed up stars coloring in OGL 2005-03-10 21:16:16 +00:00
taylor 56774f66d0 maybe WMC can leave the include alone now ;) 2005-03-10 16:16:52 +00:00
taylor 76b12d5465 build file updates to use the internal jpeglib now 2005-03-10 16:15:18 +00:00
taylor fcac6d58c2 internal libjpeg files 2005-03-10 16:13:54 +00:00
taylor f3dcea6db1 initial libjpeg project file 2005-03-10 16:10:47 +00:00
bobboau 030267adf3 fixed a local/global conflict 2005-03-10 15:35:21 +00:00
taylor 119a28190f change min/max to MIN/MAX to fix GCC problems
add lab stuff to Makefile
build unbreakage for everything that's not MSVC++ 6
lots of warning fixes
fix OpenGL rendering problem with ship insignias
no Warnings() in non-debug mode for Linux (like Windows)
some campaign savefile fixage to stop reverting everyones data
2005-03-10 08:00:18 +00:00
wmcoolmon dfcf412627 Commit for Bobboau. This causes the lab to crash in some circumstances. 2005-03-09 23:45:18 +00:00
bobboau 386efe7325 added a new interface render funtion 2005-03-09 03:23:32 +00:00
Goober5000 d63f7075a9 whoops 2005-03-08 04:41:39 +00:00
Goober5000 a24fde6280 edited for language ;)
--Goober5000
2005-03-08 03:50:25 +00:00
bobboau c78c8c0a43 minor change to high level render target code 2005-03-08 02:31:51 +00:00
Goober5000 1fdfc4bca8 rolled back my original code on the support ship CTD; thanks taylor :)
--Goober5000
2005-03-07 20:12:36 +00:00
bobboau bf878a6322 commit of render target code, d3d should be totaly functional,
OGL still needs implementation.
2005-03-07 13:10:22 +00:00
taylor a77e725968 can't believe I missed something that obvious. *hides in shame* 2005-03-06 17:16:08 +00:00
taylor e69a6f945b don't Assert() when repair_objp is NULL (support ship object is invalid until it's done with warpin) 2005-03-06 16:43:40 +00:00
wmcoolmon c6e589c31a Whoops! 2005-03-06 11:32:40 +00:00
wmcoolmon cc62873cb3 RE-fixed stuff. Ogg support. Briefings. 2005-03-06 11:23:45 +00:00
wmcoolmon e27299e03b Switched out model_unload with model_page_out_textures, as it was causing crashes in release mode. 2005-03-06 08:30:22 +00:00
wmcoolmon c2d671deac fix0r for negative values in textboxes, and ubytes 2005-03-05 20:46:12 +00:00
taylor 70d2885e0b make sure we don't scale the restore_screen bitmap, it's already the correct size 2005-03-05 19:11:07 +00:00
taylor ff7451ccc0 don't let hud messages walk off screen when res is GR_640 2005-03-05 18:59:28 +00:00
bobboau a09aba049c made all the gr_d3d_tmapper variants use dynamic a vertex buffer rather
than drawprimitiveup, this also means that these functions can now
handle as much poly data as you might want to through at them
2005-03-04 03:24:44 +00:00
taylor 6be13dc50b animated beam muzzle glows 2005-03-03 16:40:29 +00:00
taylor 6b54aa9784 lockup fixes, and it's Linux friendly too :) 2005-03-03 16:18:19 +00:00
taylor b5381eb23e support for TMAP_FLAG_TRILIST
extra check to make sure OGL closes down right under Windows
increased depth buffer, it was too small to compare when 32bpp was used
2005-03-03 16:16:55 +00:00
bobboau a600ceca96 fixed a small error from my earlier commit. 2005-03-03 14:29:39 +00:00
Kazan f4296903ce !Om_tracker_flag = non-pxo 2005-03-03 12:58:25 +00:00
Goober5000 abeaab1602 AUGH! Stupid hidden bugs... this one is V's fault
--Goober5000
2005-03-03 08:41:53 +00:00
wmcoolmon 00211ea1f0 Added new files to the project. Hopefully this works; I have no way to test it. 2005-03-03 08:16:26 +00:00
wmcoolmon ca97992985 Oops 2005-03-03 07:32:55 +00:00
wmcoolmon 8850cbcb38 Removed my Assert(true)s :p 2005-03-03 07:30:15 +00:00
wmcoolmon 382e540086 Made HUD shield icon auto-generation off unless "generate icon" ship flag is specified for the ship. 2005-03-03 07:13:17 +00:00
Goober5000 b9d5898908 removed the "error" in the new docking code
--Goober5000
2005-03-03 06:41:40 +00:00
wmcoolmon 20c60b021f Merge of WMC's codebase. "Features and bugs, making Goober say "Grr!", as release would be stalled now for two months for sure" 2005-03-03 06:05:32 +00:00
taylor f81a818afa well that was good and wrong 2005-03-03 05:32:11 +00:00
wmcoolmon 58b5bae0cb Turret AI code optimizations. If freaky stuff happens, call WMC() 2005-03-03 03:55:03 +00:00
wmcoolmon 69e5efdd91 This should really be like this to prevent crashing 2005-03-03 03:53:18 +00:00
bobboau 811c572cf8 added trilist suport to the poly rendering functions
and a gr_bitmap_list function that uses it
2005-03-03 02:39:14 +00:00
taylor 0c6f8bbefd use the back buffer for screen saves, this didn't work on Windows at one
point but I'm out of things to try and it may be ok after other fixes
2005-03-03 00:33:41 +00:00
taylor a58856e0d5 more NO_NETWORK/INF_BUILD goodness for Windows, takes care of a few warnings too 2005-03-02 21:24:48 +00:00
taylor 9ce18ac6e5 better support for Inferno builds (in PreProcDefines.h now, no networking support)
make sure NO_NETWORK builds are as friendly on Windows as it is on Linux/OSX
revert a timeout in Client.h back to the original value before Linux merge
2005-03-02 21:18:20 +00:00
taylor 5bdb318371 that one should never have slipped passed me (Linux specific) 2005-03-02 03:13:00 +00:00
taylor 3659d10464 make sure starfield bitmaps render when not in HTL mode
slight header fix for osapi.h
add some string overflow protection to modelread and bmpman
s/NO_NETWORKING/NO_NETWORK/g  (Inferno builds)
2005-03-01 23:08:24 +00:00
taylor bf26a96691 unbreak Linux build (not valid C/C++ anyway, block scope) 2005-03-01 23:05:38 +00:00
bobboau 4625702437 oh, hey look I've commited something :D
animation system, weapon models detail box alt-tab bug, probly other stuff
2005-03-01 06:55:45 +00:00
taylor 438f9360e1 uugh, missed the initial tree move (WMC: probable locking problem) 2005-02-28 01:24:02 +00:00
wmcoolmon d54288be7f Removed unneccessary variable 2005-02-28 00:29:52 +00:00
wmcoolmon 3f2266581c Added a white component to lightning so it isn't just a big blue block 2005-02-27 23:42:07 +00:00
wmcoolmon 5085b17246 Some HUD work 2005-02-27 23:27:50 +00:00
Goober5000 ecd3f09e74 First stage of "apply to all ships in this wing" weapon loadout button code.
Button hooks only, pending interface art.  The "apply-to-all" code itself
still has to be written.
--Goober5000
2005-02-27 14:09:27 +00:00
wmcoolmon aa8a4447ef Nonstandard res stuff 2005-02-27 10:38:06 +00:00
wmcoolmon 0ea465d45f More nonstandard res stuff 2005-02-27 07:08:22 +00:00
wmcoolmon 6c1468d59d nonstandard res HUD stuff 2005-02-27 07:07:47 +00:00
taylor 345a4b396d few more compiler warning fixes (didn't mean to commit iostream.h change)
lower warning level to 3 to stop MSVC6 from complaining about C++ headers
2005-02-23 13:17:05 +00:00
taylor ed21106256 more consolidation of various graphics variables
some header cleaning
only one tmapper_internal for OGL, don't use more than two tex/pass now
seperate out 2d matrix mode to allow -2d_poof in OGL and maybe fix missing
   interface when set 3d matrix stuff doesn't have corresponding end
add dump_frame stuff for OGL, mostly useless but allows trailer recording
2005-02-23 05:11:13 +00:00
taylor 5b28717fec compiler warning fixes (for MSVC++ 6)
have the warp effect only load as many LODs as will get used
head off strange bug in release when corrupt soundtrack number gets used
   (will still Assert in debug)
don't ever try and save a campaign savefile in multi or standalone modes
first try at 32bit->16bit color conversion for TGA code (for TGA only ship textures)
2005-02-23 05:05:39 +00:00
taylor 85ff0f7030 even more bm_unload() -> bm_release() changes 2005-02-23 04:57:29 +00:00
taylor df2d335539 more bm_unload() -> bm_release() changes 2005-02-23 04:55:09 +00:00
taylor 144429e984 some bm_unload() -> bm_release() changes to save bmpman slots 2005-02-23 04:51:56 +00:00
wmcoolmon 9cf34e208c Multi-res support 2005-02-21 09:00:58 +00:00
Goober5000 f64849dc72 restored release version of some cheat codes; removed a cheat for cloaking
--Goober5000
2005-02-21 05:40:16 +00:00
wmcoolmon 853b8e79f3 Camera code updates (subtitles) 2005-02-20 23:14:00 +00:00
wmcoolmon 6a6069354d Trails stuff, moved ship docking func declaration so FRED could get to it. 2005-02-20 23:13:01 +00:00
wmcoolmon d66b99c9f4 Fix0r3d trails 2005-02-20 23:11:51 +00:00
wmcoolmon c195c0aaf2 More trails updating goodness 2005-02-20 08:24:19 +00:00
wmcoolmon d7f483708a Smartified shipcontrails 2005-02-20 08:22:48 +00:00
wmcoolmon 333c370d71 Trails update: Better, faster, stronger, but not much more reliable 2005-02-20 07:39:34 +00:00
Goober5000 c5222f828c restored original behavior for cheat code time dilation
--Goober5000
2005-02-20 05:22:44 +00:00
wmcoolmon a828e0e934 Removed trails limit 2005-02-19 07:57:03 +00:00
wmcoolmon 9c87d92c91 linklist isn't needed for this 2005-02-19 07:52:56 +00:00
wmcoolmon 833e99e6a7 OpenGL gradient fix for nonstandard resolutions 2005-02-19 07:50:15 +00:00
wmcoolmon af3332d595 Fixes for debriefing window in nonstandard res 2005-02-18 21:14:03 +00:00
wmcoolmon 97119e182a Fixed line misalignment at nonstandard res in the campaign room 2005-02-18 20:50:40 +00:00
wmcoolmon a504a33138 More nonstandard res fixing 2005-02-18 09:58:40 +00:00
wmcoolmon cd741318d3 Since the screen can be wider than 1200 px now, don't auto-cull brackets if they're that big. 2005-02-18 09:54:41 +00:00
wmcoolmon d0f50e30e4 Updates for better nonstandard res support, as well as a fix to the Perseus crash bug I've been experiencing. Bobb, you might want to take a look at my change to grd3d.cpp 2005-02-18 09:51:07 +00:00
Goober5000 2ab0a4a032 really fixed the build warning
--Goober5000
2005-02-18 09:03:34 +00:00
wmcoolmon f73d8075c6 If a vertex buffer fails to be made, don't crash. 2005-02-18 08:05:16 +00:00
wmcoolmon fc8e4a077e Attempt to get rid of compiler warnings 2005-02-18 05:24:26 +00:00
wmcoolmon 83272bbd2f Added $Tech Model (after +Tech Description) 2005-02-18 04:54:44 +00:00
wmcoolmon 153526208d "-ingame" command line option 2005-02-16 10:00:40 +00:00
taylor d553a0d2c5 fix cleanup to avoid breaking the slider when it's still needed 2005-02-15 02:15:04 +00:00
taylor 5732d2f126 clean up some model related globals
code to disable individual thruster glows
fix issue where 1 extra OGL light pass didn't render
2005-02-15 00:06:27 +00:00
taylor 88950ad717 don't try and draw starfield bitmaps if they aren't valid
make AB thruster stuff in ship_create() a little less weird
replace an Int3() with debug warning and fix crash in docking code
make D3D Textures[] allocate on use like OGL does, can only use one anyway
2005-02-15 00:03:36 +00:00
taylor 60d1234579 make hudparse GCC 3.4 friendly (WMCoolmon way want to check this with tbl)
fix OSX compile problem
debug message in weapons_page_in() should have been real debug message
2005-02-14 23:59:23 +00:00
taylor 74f77cf920 fix mouse click issues in weapon/ship select screen
skip real VCR controls for Closeup check rather than using hardcoded values
2005-02-14 23:56:51 +00:00
taylor 7192f32409 make loading screen shader a bit taller
add i.o to credits for Linux and OSX code
add libjpeg and ogg stuff to credits for license compliance
replace an Int3() with a debug message in the hud code
2005-02-14 23:54:11 +00:00
wmcoolmon b1d397e91b More explicit calculation handling 2005-02-13 08:42:41 +00:00
wmcoolmon 42cbf081d0 3D models in weapons selection screen and nonstandard resolution fixes for ship selection screen. 2005-02-13 08:41:25 +00:00
wmcoolmon ddc47ef2f2 nonstandard resolution-friendly function updates 2005-02-13 08:38:54 +00:00
wmcoolmon 931f4f2df6 Made messages display properly in nonstandard resolutions 2005-02-13 08:37:57 +00:00
wmcoolmon 97c87a6bf8 Lockon should now work properly in nonstandard resolutions 2005-02-13 08:36:51 +00:00
wmcoolmon 85386190d2 while loops are dangerous things... 2005-02-12 22:49:24 +00:00
taylor 0ffcef0fc8 fix Error() check so that it doesn't hit on MAX_BUFFERS_PER_SUBMODEL-1 2005-02-12 12:17:54 +00:00
taylor 96645bff74 fix possible crash in bm_get_section_size()
get jpeg_read_header() working properly
VBO fixes and minor optimizations
2005-02-12 10:44:11 +00:00
taylor 9bd125e1de fix an issue with bm_set_components()
abs is for ints fabsf is for floats (camera.cpp)
make the in-cockpit stuff OGL friendly
2005-02-10 14:38:50 +00:00
wmcoolmon 5b549c7d4a Got rid of a couple annoying compiler warnings 2005-02-10 04:05:42 +00:00
wmcoolmon 550ef67140 Addition of the -clipdist argument. 2005-02-10 04:02:37 +00:00
wmcoolmon 7be677573e Low-level code for better hi-res support; better error reporting for vertex errors on model load. 2005-02-10 04:01:43 +00:00
taylor 65bea0960c update/add .cvsignore files for project file changes
silence warning about depreciated strings.h stuff for MSVC 2005
final model_unload() stuff for WMCoolmon, put in missionweaponchoice.cpp
remove really old project files
2005-02-08 23:49:59 +00:00
taylor 0ddb694d5c moved to projects 2005-02-08 05:19:34 +00:00
taylor de6cadea7d moved to projects directory 2005-02-08 05:18:02 +00:00
taylor fd8c41243e add something to the README about projects 2005-02-08 05:14:17 +00:00
taylor 40193dcfa7 new projects directory and files 2005-02-08 05:11:19 +00:00
taylor 75d63a8bb5 should fix linker error in libjpeg 2005-02-07 08:33:14 +00:00
wmcoolmon 5d1ca5e7c6 Updated camera code 2005-02-06 22:21:25 +00:00
taylor a685b68033 more post merge happiness 2005-02-05 04:15:36 +00:00
taylor 36da5e1a16 add libjpeg and ogg stuff 2005-02-05 00:52:51 +00:00
taylor ab78ba209c fix a few things post merge 2005-02-05 00:30:49 +00:00
taylor 4ae7263242 merge with Linux/OSX tree - p0204-3 2005-02-04 23:29:32 +00:00
taylor b1128630e4 merge with Linux/OSX tree - p0204-2 2005-02-04 20:06:10 +00:00
taylor b906b0fcce merge with Linux/OSX tree - p0204 2005-02-04 10:12:33 +00:00
phreak b723200206 revert to default d-missile behavior if the electroinics parameters aren't specified.
added an option to customize the old-style disruption calculation as well.
2005-02-03 01:26:45 +00:00
taylor 81d967eab5 only model_load() if we using a ship other than the current one 2005-02-02 15:09:06 +00:00
taylor 2673720ce8 merge with Linux/OSX tree - p0202 2005-02-02 10:36:23 +00:00
taylor 03bb0c45a4 OGG fix for streams 2005-02-01 06:54:20 +00:00
taylor 8eef49b990 merge with Linux/OSX tree - p0131-2 2005-01-31 23:27:55 +00:00
taylor 40516e52a4 merge with Linux/OSX tree - p0131 2005-01-31 10:34:40 +00:00
taylor 7a31d39759 merge with Linux/OSX tree - p0130
remove extra brace in cfile.cpp
2005-01-30 18:32:42 +00:00
taylor 2407f4f0d9 it's -nosound not -noaudio 2005-01-30 14:09:29 +00:00
taylor fa0172afb0 merge with Linux/OSX tree - p0130 2005-01-30 12:50:08 +00:00
Goober5000 2952838d64 bah - rolled back the HTL fix that doesn't really work
--Goober5000
2005-01-30 10:49:26 +00:00
Goober5000 f9db9a5810 optional flags default to false I should think
--Goober5000
2005-01-30 09:36:19 +00:00
Goober5000 a26e7a0a49 nitpicked some boolean tests, and fixed two small bugs
--Goober5000
2005-01-30 09:27:41 +00:00
wmcoolmon 8400768e9a Make sure hudnavigation uses the correct draw_brackets_Square 2005-01-30 03:28:17 +00:00
wmcoolmon a51ff7379b This isn't needed anymore 2005-01-30 03:27:09 +00:00
wmcoolmon be4fa8cef9 HUD updates 2005-01-30 03:26:11 +00:00
wmcoolmon 8b4df0aaff Don't try and create a vertex buffer with no vertices (Seems to cause CTD) and fix to brackets in nonstandard res 2005-01-30 03:24:39 +00:00
wmcoolmon 85bd57fb74 Improved user-friendliness - give an Error instead of a CTD 2005-01-30 03:23:22 +00:00
wmcoolmon 3dba61c334 If a required string doesn't exist, give an error instead of a warning...doi. 2005-01-30 01:38:26 +00:00
wmcoolmon 84d991e191 Made a bunch of ship.tbl variables optional 2005-01-30 01:34:39 +00:00
phreak e4fd785fbd smart shield stuff. enabled by command line for now, but this will be changed in the future, i just want people to test it.
-phreak
2005-01-29 16:31:55 +00:00
phreak 54a3a76774 smart shield command line stuff. this will be changed in the future, but i want people to test it.
-phreak
2005-01-29 16:30:47 +00:00
phreak 8a20ab1088 fixed error message again :)
-p
2005-01-29 15:40:22 +00:00
argv 2d41918dae Fixed compile errors due to several source files not having been updated to
reference "Min/Max_draw_distance" instead of "MIN/MAX_DRAW_DISTANCE".

-- _argv[-1]
2005-01-29 09:19:45 +00:00
wmcoolmon dae81d157b Clipping stuff 2005-01-29 08:12:20 +00:00
wmcoolmon a014e5227c When drawing the viewer_obj, temporarily clip less close up for in-cockpit models. 2005-01-29 08:11:41 +00:00
wmcoolmon 633bca17d9 Various updates; shader, clipping 2005-01-29 08:09:47 +00:00
wmcoolmon e19e89b20f Various updates; shader, assert, and clipping 2005-01-29 08:08:24 +00:00
wmcoolmon 9eba78035a Update to work with optimized shader func 2005-01-29 08:06:54 +00:00
wmcoolmon 68a26cf7d5 Ahh, the sweet smell of optimized code 2005-01-29 08:04:15 +00:00
Goober5000 e3077951ca docking fixes for FRED
--Goober5000
2005-01-29 05:34:30 +00:00
Goober5000 9d79b2e8d5 updated Freespace2 project
--Goober5000
2005-01-29 00:58:01 +00:00
Goober5000 ecd3cddeca added bitarray.h to the code project
--Goober5000
2005-01-29 00:37:10 +00:00
wmcoolmon 38de54f03a Added better too-many-textures error message 2005-01-28 23:45:23 +00:00
taylor 49d25dce7c less hacky and faster version... *hopes no one noticed the stupid mistake* 2005-01-28 13:26:14 +00:00
Goober5000 e4d74ff3cb fixed Bobboau's spelling of 'relative'
--Goober5000
2005-01-28 11:57:36 +00:00
Goober5000 c789bf7509 cleaned up some build warnings
--Goober5000
2005-01-28 11:39:18 +00:00
Goober5000 ee26a8a8f6 changed a bunch of transpose-rotate sequences to use unrotate instead
--Goober5000
2005-01-28 11:06:23 +00:00
taylor 06540c61b3 little cleanup to get rid of compiler warnings
add some memory management to help keep size of techroom down
new hotkey Ctrl-Shift-S to show all ships rather than just viewable
make Weapon_list allocate on load just like Ship_list
unload all textures and models on techroom_close()
2005-01-28 10:00:59 +00:00
taylor 72a5f1fa53 add model_page_out_textures() for use in techroom
make model_page_in_textures() load more textures
2005-01-28 09:56:44 +00:00
Goober5000 ba13b76ffe finished implementing docking to a rotating submodel
--Goober5000
2005-01-28 09:01:04 +00:00
phreak a70d0b3144 shockwave weapons now work properly with the electronics (d-missible) tag
added in a "randomness factor" for electronics parameters.  This adds or subtracts
a random value between 0 and this factor to the disruption time.  This was hard coded
to be 4 seconds in retail.
2005-01-28 04:05:05 +00:00
wmcoolmon a853432699 Better debrief memory handling 2005-01-28 03:00:56 +00:00
wmcoolmon afa8c96236 Fixed crash bug in techroom 2005-01-28 02:57:59 +00:00
Goober5000 88c4e9880b dock points on rotating submodels is *almost* working
--Goober5000
2005-01-27 11:26:23 +00:00
Goober5000 4ffaf24ab8 added a useful bit of information to vm_vec_rotate and vm_vec_unrotate
--Goober5000
2005-01-27 05:26:07 +00:00
wmcoolmon c2c4c1a4ea Ship autorepair, requested by TBP 2005-01-27 04:23:18 +00:00
wmcoolmon c09b89127b Camera code 2005-01-27 04:16:28 +00:00
Goober5000 291215d6a9 important bugfix
--Goober5000
2005-01-26 21:42:19 +00:00
phreak 23e73f2b0d added ogg and objectdock files to project 2005-01-26 14:57:19 +00:00
Goober5000 6f7f3296e0 hm... added a necessary bugfix for something very badly designed
--Goober5000
2005-01-26 06:58:37 +00:00
Goober5000 6c89a3310c whoops... need to free variable blocks for special hitpoints
--Goober5000
2005-01-26 06:49:50 +00:00
Goober5000 579972dd62 AHA... squashed another bug
--Goober5000
2005-01-26 05:44:10 +00:00
Goober5000 c7916f4483 fixed a nitpicky thing
--Goober5000
2005-01-26 05:42:37 +00:00
argv 3dff6606f2 Removed the implicit surface shield on mesh-shielded ships.
-- _argv[-1]
2005-01-26 03:40:43 +00:00
Goober5000 69ab027ecf Bah - I am a moron. :) I see the reason why rand shouldn't work
multiple times.  It's been fixed thus.

I also added a rand-multiple sexp for any times when people do
want multiple random numbers.

--Goober5000
2005-01-26 01:52:21 +00:00
Goober5000 ee175fcfd3 dockpoints now rotate with rotating subobjects
--Goober5000
2005-01-26 01:26:09 +00:00
Goober5000 bf2a2cf7cc species will now load from a default table instead of being initialized via code
--Goober5000
2005-01-25 23:32:46 +00:00
Goober5000 0094f97f3c more cool parsing stuff
--Goober5000
2005-01-25 22:47:37 +00:00
Goober5000 77cc78e5e7 separated one parsing function into two
--Goober5000
2005-01-25 22:21:45 +00:00
Goober5000 6f1eed006f streamlined some redundant stuff
--Goober5000
2005-01-25 21:28:58 +00:00
wmcoolmon 5b09ed5b78 Instead of trying to allocate a ridiculously large buffer if the file is defined but doesn't exist, give a warning. Someone with nebula-code experience should probably double-check this; also added jpg and TGA support. 2005-01-22 22:53:07 +00:00
wmcoolmon 86ad73d71b Nitpick - can be NULL by default 2005-01-22 22:02:28 +00:00
wmcoolmon 5017882299 Fix0red the ext error. Always make sure you have room for the string terminator. :) 2005-01-22 20:29:05 +00:00
taylor 7d6f0afc73 crap 2005-01-21 21:12:52 +00:00
taylor 8989ee4abf cleanup debug messages for texture loading making the output more readable and useful 2005-01-21 08:58:32 +00:00
taylor c85f1bfa4e make Subsys_status dynamic but allocate in blocks for speed and to help prevent memory fragmentation 2005-01-21 08:56:50 +00:00
taylor 0fe03690f8 slightly better memory management 2005-01-21 08:54:53 +00:00
taylor 227298f10b add -rlm cmdline option to switch to local viewpoint lighting calculations (OGL only for now) 2005-01-21 08:29:04 +00:00
taylor 388fa7ac45 fill in gr_opengl_set_texture_addressing()
add support for non-power-of-two textures for cards that have it
temporary crash fix from multiple mipmap levels in uncompressed formats
2005-01-21 08:25:15 +00:00
taylor 926c12c560 make sure we can still use TGAs (16-bit) when Cmdline_jpgtga is not set, PCX still takes precedence per retail 2005-01-21 08:20:44 +00:00
Goober5000 8cafc52ff3 fixed a crazy error
--Goober5000
2005-01-18 06:15:33 +00:00
Goober5000 6483947732 fixed a silly error
--Goober5000
2005-01-18 06:14:29 +00:00
Goober5000 8b6dab73be variables can be specified in training messages too now
--Goober5000
2005-01-18 01:20:03 +00:00
wmcoolmon 0d8d459deb OGG fixes, ship selection fixes 2005-01-18 01:14:17 +00:00
Goober5000 5f9778d505 clarified a bunch of sexp stuff and fixed a bug
--Goober5000
2005-01-18 00:14:37 +00:00
argv a023302cbb Surface shields.
See forum thread:
http://dynamic4.gamespy.com/~freespace/forums/showthread.php?s=&threadid=29643

-- _argv[-1]
2005-01-17 23:35:45 +00:00
Goober5000 5937327c44 variables can now be displayed in messages
--Goober5000
2005-01-17 22:46:32 +00:00
wmcoolmon f29529494c Attempt to fix the crash when a player ship's subsystems receives damage, and it has a lot (ie player ship is a capital ship).This seems to be controlled by SUBSYSTEM_MAX, which also controls the number of subsystems saved in red alert missions. 2005-01-17 06:35:35 +00:00
wmcoolmon a1d0a19ec5 Added "show ship" ship flag 2005-01-16 23:18:04 +00:00
wmcoolmon 55635a499e Added VM_TOPDOWN view; Added 2D mission mode, add 16384 to mission +Flags to use. 2005-01-16 22:39:10 +00:00
wmcoolmon 582b4ea365 Current version of the new techroom code -C 2005-01-15 05:53:18 +00:00
argv 718e2a71ec Revision 2.42 (Goober's fixes) broke "no pierce shields". Fixed.
-- _argv[-1]
2005-01-14 23:08:17 +00:00
wmcoolmon 97c909de30 gr_curve 2005-01-14 05:28:58 +00:00
taylor 0a49604e83 plug leak from VBO crash fix 2005-01-13 04:55:57 +00:00
Goober5000 7a2c197144 hmm, rolled back one of my clarifications since it caused things to get messed up
--Goober5000
2005-01-13 03:33:07 +00:00
phreak 82a82b2bae difficulty table changes. this lets modders specify how the difficulty level affect
how the AI behaves and controls advantages given to the player based on the
skill level.

--phreak
2005-01-13 02:25:52 +00:00
Goober5000 9aa9bfaaf1 forgot to remove a comment
--Goober5000
2005-01-13 01:10:33 +00:00
Goober5000 134a3668ae fixed another nasty bug
--Goober5000
2005-01-12 23:38:42 +00:00
Goober5000 00b0a8d148 fixed a nasty bug where dock pointers would run off a cliff and crash
--Goober5000
2005-01-12 04:45:33 +00:00
Goober5000 6111162808 two minor but important bugfixes to the multiple ship docking
--Goober5000
2005-01-12 00:52:42 +00:00
phreak 63d43fbfb0 new hud is deault off now. this should fix the disappearing gauges problem. 2005-01-12 00:20:27 +00:00
phreak 6f2275c4ab nude hud? was this some kind of freudian slip of a sort or what? 2005-01-12 00:18:00 +00:00
phreak 55b3af43e8 fixed hud offsets bug 2005-01-12 00:17:09 +00:00
Goober5000 144f8f3a4b multiple ship docking :)
don't tell anyone yet... check the SCP internal
--Goober500
2005-01-11 21:38:51 +00:00
Goober5000 0b5a25446a made a capitalization thing consistent
--Goober500
2005-01-11 21:28:24 +00:00
Goober5000 1ddc459df6 fixed two small things with physics
--Goober500
2005-01-11 21:25:58 +00:00
taylor cfe8a03ff3 fully working (??) -loadonlyused, allocate used_weapons[] and ship_class_used[] only when needed 2005-01-11 04:05:23 +00:00
wmcoolmon 3e4f71fe29 Bug-guard 2005-01-10 06:58:12 +00:00
wmcoolmon f236be7241 Debriefing screen updated to only use memory while open 2005-01-10 04:45:09 +00:00
wmcoolmon 18ac53bb5d Small fix, so we don't try to delete the same thing twice 2005-01-10 04:44:03 +00:00
wmcoolmon ebd866660e Techroom and Barracks now allocate memory only when open, and only for the number of ships currently loaded 2005-01-09 22:27:38 +00:00
wmcoolmon 4a4e834199 Fix for music directory parent 2005-01-09 21:40:07 +00:00
wmcoolmon eee1d07cf5 Sound quality in Freespace 2 is now controlled by SoundSampleBits, and SoundSampleRate. Also, some sounds will use hardware rather than software buffers if available. 2005-01-08 10:00:59 +00:00
wmcoolmon 6539724237 Function pointers to inline functions is a no-no... 2005-01-08 09:57:27 +00:00
phreak 21bb39d102 fixed the bug where the player couldn't use the target hud in reticle key. 2005-01-07 23:15:44 +00:00
argv 4a93077ddf Added missing #include.
-- _argv[-1]
2005-01-07 14:00:04 +00:00
Goober5000 30c6e6582b gah
--Goober5000
2005-01-06 00:39:34 +00:00
Goober5000 b8e4e24434 changed argument from dist to dist_squared
--Goober5000
2005-01-06 00:37:32 +00:00
Goober5000 926b788fc9 added vm_vec_dist_squared_to_line
--Goober5000
2005-01-06 00:27:34 +00:00
Goober5000 c425a9c12b small speedup in shpere_tri_edge (spelling should be fixed...); now distance is only calculated once
--Goober5000
2005-01-06 00:22:01 +00:00
taylor 15e395f6a4 make sure we're not loading weapons that are left over from larger missions 2005-01-05 23:17:38 +00:00
taylor cf35f79402 more -loadonlyused fixes 2005-01-03 18:47:06 +00:00
taylor 431812cd6d stupid mistake 2005-01-03 18:46:03 +00:00
taylor d0cf0ced4a dynamic allocation of num supported OpenGL lights
add config option for more realistic light settings
don't render spec maps in nebula to address lighting issue
2005-01-03 18:45:22 +00:00
phreak a6dbf2facd made custom loading screens work if only one resolution has been specified. 2005-01-03 01:05:08 +00:00
Goober5000 56da3a6bf6 got rid of a nasty nasty bug in the beam collision function, and cleaned up some of Bobboau's old comments
--Goober5000
2005-01-02 23:22:22 +00:00
taylor 55323b32f1 make use of MR_NO_FOGGING to render models without fog 2005-01-01 19:47:26 +00:00
taylor 49c005525e add MR_NO_FOGGING flag to easily render models without fog (warp model, targetbox models) 2005-01-01 19:45:32 +00:00
wmcoolmon fafb5bd1e8 Erg, always make sure CVS is completely up-to-date. 2005-01-01 19:37:05 +00:00
argv 075fdeaa5c Since Taylor's asteroid targeting code does not use the
TURRETS_SHOOT_ASTEROIDS #define, remove it from preprocdefines.h. We can
put it back from an old rev if people decide to use my code instead of his,
which seems unlikely.

-- _argv[-1]
2005-01-01 13:14:19 +00:00
taylor 065ec54a46 good OpenGL spec mapping
fix VBO crash with multitexture using same uv coord data
little speedup of opengl_tcache_frame()
error message to make sure hardware supports the minimum texture size
move OpenGL version check out of the extention printout code
disable 2d_poof with OpenGL
2005-01-01 11:24:23 +00:00
taylor e7eb31a0df asteroid targetting code for capships, enabled by default, matches FS1 behavior 2005-01-01 10:38:23 +00:00
wmcoolmon d340b8da04 NEW_HUD stuff, turned off this time. :) It's in a state of disrepair at the moment, doesn't show anything. 2005-01-01 07:18:48 +00:00
Goober5000 a17eca915c CVS checkin of bitarray.h; use this for large arrays of boolean values
--Goober5000
2004-12-31 03:48:12 +00:00
argv 149629e1e2 I've just been informed that turrets do not shoot asteroids in the retail
game, and that this implementation causes them to shoot at the parent ship,
too. I'll deal with this later; in the mean time, use
"#define TURRETS_SHOOT_ASTEROIDS" to cause turrets to shoot asteroids.

-- _argv[-1]
2004-12-31 03:13:08 +00:00
Goober5000 05948719b1 stupid parenthesis fix
--Goober5000
2004-12-30 21:41:24 +00:00
taylor c2e4c526d0 don't use cfopen() for upgrade check, it was giving strange results 2004-12-30 16:25:22 +00:00
taylor 4da2a92335 make sure swprintf() doesn't think szFile is already a wide-character string 2004-12-30 16:23:39 +00:00
argv 65b1250353 * For some reason, turret AI wasn't shooting at asteroids. It never has,
but it did in the retail game, and it should. The code to target asteroids
  was apparently missing, so I reimplemented it, and turrets shoot at
  asteroids again.
2004-12-30 08:07:52 +00:00
argv 562cf1e47a Quick hack to remove the 50% rate-of-fire penalty when primary weapons are
linked. "#define NO_LINKED_PRIMARY_PENALTY" to enable this change; it's
disabled by default.

-- _argv[-1]
2004-12-30 07:26:21 +00:00
taylor 7ae710ace6 make sure the file gets closed in pilot_file_upgrade_check() 2004-12-28 16:20:33 +00:00
taylor 611ce79893 fix some hud stuff getting drawn multiple times, don't show target data if HUD_disabled_except_messages is set 2004-12-26 22:45:58 +00:00
Goober5000 5ceb4a2291 hud-disable-except-messages now resets after each mission
--Goober5000
2004-12-26 20:46:34 +00:00
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
penguin 573a1f2fa3 updated 2002-08-13 04:31:25 +00:00
penguin a763d84b56 1. Disable CD checking
2. Add CVS tag to version string
2002-08-13 03:34:00 +00:00
penguin c06ccbb602 Bumped to version 3.2 2002-08-13 03:32:25 +00:00
drevil ffd8a5ae2a Rebuilding admin files 2002-08-11 23:08:20 +00:00
drevil aa753d5d6e Trash syncmail, it's worthless, use logaccum stuff instead 2002-08-11 23:05:15 +00:00
drevil 1cf042064f Yet more updates for syncmail 2002-08-11 22:36:01 +00:00
drevil a4e14a94d2 Correct arguments to syncmail 2002-08-11 22:22:35 +00:00
drevil 5871d644cc Change which module syncinfo "hooks" to 2002-08-11 22:20:56 +00:00
drevil 145a149873 Updated syncmail to current CVS version 2002-08-11 22:17:16 +00:00
drevil 7492c51ee6 corrected path to syncmail 2002-08-11 22:04:47 +00:00
drevil be4954a69e Adding syncmail cvs commit notification 2002-08-11 22:02:45 +00:00
DTP 875a95b82e Implented -GF4FIX commandline switch & #include "cmdline/cmdline.h" 2002-08-07 00:45:25 +00:00
DTP f6b129577b Implented -GF4FIX commandline switch 2002-08-07 00:44:13 +00:00
penguin 4d30bbba3e Updated 2002-08-06 21:21:42 +00:00
phreak 8823dc67eb added wireframe targetbox feature 2002-08-06 16:50:44 +00:00
phreak 8690c9d7f6 added Targetbox_wire variable to check what mode the
hud targetbox uses
2002-08-06 16:50:13 +00:00
phreak f70d242903 added keybing for wireframe hud,
fixed previous missile cheat
2002-08-06 16:49:22 +00:00
penguin 5b4306dbd6 Use text strings for wingmen names instead of ANI 2002-08-06 04:39:26 +00:00
penguin 013870fc6a inserted "class" keyword on "friend" definitions (ANSI C++ ) 2002-08-06 03:50:48 +00:00
penguin 0e3d4e562f Fixed problem w/ compile options for Debug mode 2002-08-06 02:43:02 +00:00
penguin 48d1ec4575 Removed a couple more include dirs I missed 2002-08-06 01:49:47 +00:00
penguin 32ad077676 Renamed ccode members to cc_or and cc_and 2002-08-06 01:49:08 +00:00
penguin 9942308fc8 Moved ChangeLog to top-level directory 2002-08-04 05:43:13 +00:00
penguin af3b97aae5 Change version display 2002-08-04 05:13:00 +00:00
penguin c3c0b0e1f4 Display fs2_open version instead of "Freespace 2" 2002-08-04 05:12:42 +00:00
penguin 9d5863bc76 Change version display location 2002-08-04 05:12:10 +00:00
penguin 4b2d436b04 Update version number to 3.1 2002-08-04 05:11:36 +00:00
penguin 404195d389 Don't write version to registry; change way version string is formatted 2002-08-04 05:11:05 +00:00
randomtiger df29aad213 Fixed Geforce 4 bug that caused font and hall video distortion.
Very small change in 'gr_d3d_aabitmap_ex_internal'

Tested and works on the following systems

OUTSIDER Voodoo 3 win98
OUTSIDER Geforce 2 win2000
Me Geforce 4 PNY 4600 XP
JBX-Phoenix Geforce 4 PNY XP
Mehrunes GeForce 3 XP
WMCoolmon nVidia TNT2 M64 win2000
Orange GeForce 4 4200 XP
ShadowWolf_IH Monster2 win98
ShadowWolf_IH voodoo 2 win98
2002-08-03 19:42:17 +00:00
wmcoolmon 026601e350 Fixed Win32 debug configuration 2002-08-03 18:35:21 +00:00
wmcoolmon 05a48addc6 Sync with makefile 1.4 2002-08-03 17:42:40 +00:00
penguin a1e9e62b6e updated 2002-08-01 04:04:01 +00:00
penguin 64ea61c93a The big include file move 2002-08-01 02:00:46 +00:00
penguin a0bbf8fd54 The big include file move 2002-08-01 01:41:11 +00:00
wmcoolmon 15e9872bb5 Fixed a bug I added in ship_do_rearm_frame 2002-07-30 18:11:25 +00:00
wmcoolmon a1f592ffef Modified to add hull repair capabilities and toggling of them via a mission flag, MISSION_FLAG_SUPPORT_REPAIRS_HULL 2002-07-30 17:57:40 +00:00
wmcoolmon 07de43ffc4 Added mission flag "MISSION_FLAG_SUPPORT_REPAIRS_HULL" for toggling Support Ship hull repair on and off 2002-07-30 17:35:22 +00:00
unknownplayer 522fa4c906 Started work on DX8.1 implementation. Updated the project files to encompass
the new files. Disable the compiler tag to use old DX code (THERE IS NO
NEW CODE YET!)
2002-07-30 14:29:15 +00:00
penguin 7611e0a2d2 Added Network/fs2ox.cpp 2002-07-29 22:24:57 +00:00
penguin 9290659edf First attempt at "fs2_open exchange" (PXO substitute) screen 2002-07-29 22:24:26 +00:00
penguin 3a88c2f9e3 We finally have a ChangeLog 2002-07-29 22:14:48 +00:00
penguin a732686bf6 Moved extern declaration of ssm_create outside of block (it wouldn't compile w/ gcc) 2002-07-29 20:48:51 +00:00
penguin 2ede27a557 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 20:12:31 +00:00
penguin 8300b018f0 removed bogus #include windows.h 2002-07-29 20:12:02 +00:00
penguin 93aed25251 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:52:48 +00:00
penguin 591563118c added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:37:21 +00:00
penguin b59b5dd5d8 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:17:21 +00:00
penguin bb0bde6409 added #ifdef _WIN32 around windows-specific system headers 2002-07-29 19:04:48 +00:00
DTP 66a392ddae Forgot to Bump MAX_MODEL_SUBSYSTEMS from 128 to 200 2002-07-29 08:31:52 +00:00
DTP 8bfc9fa709 BUMPED MAX_POLYGON_MODELS TO 198 , MAX_SHIP_TYPES - 2 = 198 2002-07-29 08:28:00 +00:00
DTP ccbdeeff67 Bumped all MAX_SHIPS, and SHIP_LIMIT to 400.(let the mission designers decide what is good, and what is bad 2002-07-29 08:24:42 +00:00
DTP 0f1176adaf Bumped MAX_SHIP_SUBOBJECTS to 2100(2100 /(average fighter has 7 subsystems) = 400 fighters 2002-07-29 08:22:42 +00:00
DTP b75fce3d5c Bumped MAX_SUBSYS_LIST from 32 to 200 2002-07-29 08:19:41 +00:00
DTP ab68ad4855 -almission(autoload mission) commandline arguement handling implemented 2002-07-29 08:05:20 +00:00
DTP 426cf0b969 FIX; Startgame arguement dont go ahead when a singleplayer pilot is selected 2002-07-29 07:56:10 +00:00
DTP 2d1f7ba50f added -almission commandline arguement, will autoload mission i.e fs2_open.exe -almission kickass will autoload kickass.fs2 which should be a multiplayer mission. 2002-07-29 06:35:15 +00:00
DTP 69145e65f1 FIX -stargame commandline arguement will now let you quit, a thing not possible before when using the startgame arguement 2002-07-28 15:07:43 +00:00
penguin 3dcb4b380a Testing commit as penguin 2002-07-26 18:02:33 +00:00
drevil 8e996fdf67 Updated password file 2002-07-26 17:59:31 +00:00
penguin 7367d8a31f renamed 'big' and 'small' (conflict w/ MS include file) 2002-07-26 16:17:46 +00:00
penguin d5fcfc773c fixed bug where winsock.h wasn't defined 2002-07-26 16:12:05 +00:00
wmcoolmon 5cdd3a676d Added Bobboau's beam tiling code 2002-07-26 03:11:24 +00:00
wmcoolmon fd95da4c0a Added Bobboau's fighter-beam code. 2002-07-25 04:50:48 +00:00
penguin 1aa613e0f5 Added ifndef NO_STANDALONE 2002-07-22 01:39:24 +00:00
penguin 7d91a35878 Stub defines for NO_SOUND 2002-07-22 01:37:24 +00:00
penguin fa2c566b3f Linux port -- added NO_STANDALONE ifdefs 2002-07-22 01:22:26 +00:00
penguin f2b7f9718a Made more compatible w/ Win32; defines for NO_SOUND, NO_JOYSTICK, NO_NETWORK 2002-07-22 01:14:09 +00:00
penguin 08c0bd3aee Moved the dummy "sound" definitions to main program (freespace.cpp) 2002-07-22 01:10:10 +00:00
penguin 3a39133e04 More defines for winsock compatibility 2002-07-22 01:06:04 +00:00
penguin c3ec5825a4 took out GAME_CD_CHECK define 2002-07-22 01:04:37 +00:00
DTP baddd6703d Bumped Max Shield Icons to 80 2002-07-20 23:51:59 +00:00
DTP 0c3733d2cd Fixed multiplayer music. succes music on all Primary goals complete, fail music
if otherwise
2002-07-20 23:50:53 +00:00
DTP c536d49afd Fixed Secondary bank bug, where next valid secondary bank inherits current
valid banks FULL fire delay
2002-07-20 23:49:46 +00:00
DTP b031aee73a bumped MAX_MISSION_TEXT to 1000000 in code/parse/parselo.h 2002-07-20 19:21:13 +00:00
penguin c480e2c944 Fixed bug (potential access of unitialized pointer) in hud_config_render_gauges() -- thanks to DTP for finding it! 2002-07-18 20:07:49 +00:00
unknownplayer c7cd913df4 no message 2002-07-18 14:36:53 +00:00
unknownplayer 58a465e805 Revised AI primary selection code again to be more intelligent. 2002-07-18 09:55:26 +00:00
unknownplayer cf08ff0cd5 Rewrote my original algorithm to search by proportional hull damage.
Does the same thing a little better.
2002-07-18 05:38:28 +00:00
unknownplayer c839e8168a Fixed AI problems with using the maxim on fighters. 2002-07-18 03:27:38 +00:00
unknownplayer 3257777c18 Added some commentry to the low detail shield function. 2002-07-18 03:26:35 +00:00
unknownplayer 1028e14398 no message 2002-07-18 03:25:10 +00:00
unknownplayer b733679875 Altered project files to properly build debug info. Should save you all some time. 2002-07-17 23:59:56 +00:00
unknownplayer 723cbd5938 Minor commenting added to two functions. 2002-07-17 23:58:46 +00:00
wmcoolmon 0e48ea11ac Added SSM code for Tag C from Bobboau. Note that strings.tbl may need to be updated. 2002-07-17 20:04:00 +00:00
unknownplayer 57ab92645c Added a custom build step to copy to c:\games\freespace2\fs2_open.exe
when you build.
2002-07-17 12:52:01 +00:00
unknownplayer 2431f5db2c Updated to enable compilation under MSVC++ - all changes are marked
with my name ##UnknownPlayer##
2002-07-16 14:39:16 +00:00
unknownplayer 34d960638a This is the code project file. Use the workspace file I included to get at this. 2002-07-16 14:37:51 +00:00
unknownplayer 3bb26b10a3 This is the workspace for freespace2.dsp - it contains everything needed to
compile fs2_open.exe
2002-07-16 14:37:09 +00:00
unknownplayer 3cdc511b2d This is the project file to compile fs2_open. It's a real project file - use the
workspace though
2002-07-16 14:36:30 +00:00
penguin 4543d0c80c Changed so that debug make debug and release makes release :) 2002-07-16 01:15:59 +00:00
penguin 2a740ad2c8 Commented out "fs2_open.dep" stuff 2002-07-16 01:15:15 +00:00
inquisitor 7187da0233 Visual Studio files
compiles fs2_open.exe - 0 error(s), 7 warning(s)
2002-07-15 22:36:08 +00:00
wmcoolmon ab43e4d987 Added support for toggling ship trails 2002-07-15 02:11:00 +00:00
wmcoolmon 8056476db1 Added initial code for "ship-lights-on" and "ship-lights-off" SEXPs 2002-07-13 09:16:18 +00:00
penguin 4b471d6045 Added flags2 (ran out of bits in flags!) to ship struct; bit 0 will be used
to toggle Bobboau's lights.
2002-07-12 16:59:04 +00:00
penguin 8b19d7c8eb Removed dummy include file 2002-07-12 02:56:07 +00:00
penguin 90c6679f03 Fixed endian-ness of new "GLOW" IDs 2002-07-12 02:44:18 +00:00
wmcoolmon 4c73e5fe20 Added Bobboau's glow code; all comments include "-Bobboau" 2002-07-10 18:42:14 +00:00
penguin dd3a3138a7 Back-port to MSVC 2002-07-07 19:56:00 +00:00
penguin 9e8a091172 Makefile for Microsoft Visual C++ 2002-07-07 19:49:42 +00:00
drevil 5d72560a30 Adding mysterial and penguin to CVS's admin files 2002-06-08 19:21:16 +00:00
drevil 2a9c65bd3f Changing my password 2002-06-08 19:10:16 +00:00
drevil 6b4cca55be Changing my password 2002-06-08 19:04:53 +00:00
penguin c18139e73f Added machine-independent version of MulDiv (in case we don't know
the processor type)
2002-06-04 06:38:21 +00:00
penguin be6ee814c2 Minor changes 2002-06-03 05:03:45 +00:00
penguin ea6130e542 Initial revision 2002-06-03 04:34:38 +00:00
penguin 48a566a2d5 Warpcore CVS sync 2002-06-03 04:10:40 +00:00
penguin dab5b293d4 Dummy include file 2002-06-03 04:08:13 +00:00
penguin 2a2cd3c873 Warpcore CVS sync 2002-06-03 03:55:40 +00:00
526 changed files with 0 additions and 405684 deletions

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
# The "checkoutlist" file is used to support additional version controlled
# administrative files in $CVSROOT/CVSROOT, such as template files.
#
# The first entry on a line is a filename which will be checked out from
# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
# The remainder of the line is an error message to use if the file cannot
# be checked out.
#
# File format:
#
# [<whitespace>]<filename><whitespace><error message><end-of-line>
#
# comment lines begin with '#'
-15
View File
@@ -1,15 +0,0 @@
# The "commitinfo" file is used to control pre-commit checks.
# The filter on the right is invoked with the repository and a list
# of files to check. A non-zero exit of the filter program will
# cause the commit to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
-14
View File
@@ -1,14 +0,0 @@
# Set this to "no" if pserver shouldn't check system users/passwords
#SystemAuth=no
# Put CVS lock files in this directory rather than directly in the repository.
#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'
# command.
#TopLevelAdmin=no
# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
# history file, or a subset as needed (ie `TMAR' logs all write operations)
#LogHistory=TOFEWGCMAR
-23
View File
@@ -1,23 +0,0 @@
# This file affects handling of files based on their names.
#
# The -t/-f options allow one to treat directories of files
# as a single file, or to transform a file in other ways on
# its way in and out of CVS.
#
# The -m option specifies whether CVS attempts to merge files.
#
# The -k option specifies keyword expansion (e.g. -kb for binary).
#
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
#
# wildcard [option value][option value]...
#
# where option is one of
# -f from cvs filter value: path to filter
# -t to cvs filter value: path to filter
# -m update methodology value: MERGE or COPY
# -k expansion mode value: b, o, kkv, &c
#
# and value is a single-quote delimited value.
# For example:
#*.gif -k 'b'
-21
View File
@@ -1,21 +0,0 @@
# The "editinfo" file is used to allow verification of logging
# information. It works best when a template (as specified in the
# rcsinfo file) is provided for the logging procedure. Given a
# template with locations for, a bug-id number, a list of people who
# reviewed the code before it can be checked in, and an external
# process to catalog the differences that were code reviewed, the
# following test can be applied to the code:
#
# Making sure that the entered bug-id number is correct.
# Validating that the code that was reviewed is indeed the code being
# checked in (using the bug-id number or a seperate review
# number to identify this particular code set.).
#
# If any of the above test failed, then the commit would be aborted.
#
# Actions such as mailing a copy of the report to each reviewer are
# better handled by an entry in the loginfo file.
#
# One thing that should be noted is the the ALL keyword is not
# supported. There can be only one entry that matches a given
# repository.
-26
View File
@@ -1,26 +0,0 @@
# The "loginfo" file controls where "cvs commit" log information
# is sent. The first entry on a line is a regular expression which must match
# the directory that the change is being made to, relative to the
# $CVSROOT. If a match is found, then the remainder of the line is a filter
# program that should expect log information on its standard input.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name ALL appears as a regular expression it is always used
# in addition to the first matching regex or DEFAULT.
#
# You may specify a format string as part of the
# filter. The string is composed of a `%' followed
# by a single format character, or followed by a set of format
# characters surrounded by `{' and `}' as separators. The format
# characters are:
#
# s = file name
# V = old version number (pre-checkin)
# v = new version number (post-checkin)
#
# For example:
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
-26
View File
@@ -1,26 +0,0 @@
# Three different line formats are valid:
# key -a aliases...
# key [options] directory
# key [options] directory files...
#
# Where "options" are composed of:
# -i prog Run "prog" on "cvs commit" from top-level of module.
# -o prog Run "prog" on "cvs checkout" of module.
# -e prog Run "prog" on "cvs export" of module.
# -t prog Run "prog" on "cvs rtag" of module.
# -u prog Run "prog" on "cvs update" of module.
# -d dir Place module in directory "dir" instead of module name.
# -l Top-level directory only -- do not recurse.
#
# NOTE: If you change any of the "Run" options above, you'll have to
# release and re-checkout any working directories of these modules.
#
# And "directory" is a path to a directory relative to $CVSROOT.
#
# The "-a" option specifies an alias. An alias is interpreted as if
# everything on the right of the "-a" had been typed on the command line.
#
# You can encode a module within a module by using the special '&'
# character to interpose another module into the current module. This
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.
-12
View File
@@ -1,12 +0,0 @@
# The "notify" file controls where notifications from watches set by
# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
# a regular expression which is tested against the directory that the
# change is being made to, relative to the $CVSROOT. If it matches,
# then the remainder of the line is a filter program that should contain
# one occurrence of %s for the user to notify, and information on its
# standard input.
#
# "ALL" or "DEFAULT" can be used in place of the regular expression.
#
# For example:
#ALL mail %s -s "CVS notification"
-4
View File
@@ -1,4 +0,0 @@
drevil:nNwcK94cKMqZI:fs2source
inquisitor:Jh.dOjaiO2jHk:fs2source
anonymous:EqQXnO5cz9yBA:fs2source
-13
View File
@@ -1,13 +0,0 @@
# The "rcsinfo" file is used to control templates with which the editor
# is invoked on commit and import.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being made to, relative to the
# $CVSROOT. For the first match that is found, then the remainder of the
# line is the name of the file that contains the template.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
-20
View File
@@ -1,20 +0,0 @@
# The "taginfo" file is used to control pre-tag checks.
# The filter on the right is invoked with the following arguments:
#
# $1 -- tagname
# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
# $3 -- repository
# $4-> file revision [file revision ...]
#
# A non-zero exit of the filter program will cause the tag to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
-21
View File
@@ -1,21 +0,0 @@
# The "verifymsg" file is used to allow verification of logging
# information. It works best when a template (as specified in the
# rcsinfo file) is provided for the logging procedure. Given a
# template with locations for, a bug-id number, a list of people who
# reviewed the code before it can be checked in, and an external
# process to catalog the differences that were code reviewed, the
# following test can be applied to the code:
#
# Making sure that the entered bug-id number is correct.
# Validating that the code that was reviewed is indeed the code being
# checked in (using the bug-id number or a seperate review
# number to identify this particular code set.).
#
# If any of the above test failed, then the commit would be aborted.
#
# Actions such as mailing a copy of the report to each reviewer are
# better handled by an entry in the loginfo file.
#
# One thing that should be noted is the the ALL keyword is not
# supported. There can be only one entry that matches a given
# repository.
-3
View File
@@ -1,3 +0,0 @@
drevil
inquisitor
-285
View File
@@ -1,285 +0,0 @@
TARGET = libcode.a
CXXFLAGS = -DWIN32 -D_DEBUG \
-Iwindows_stub \
-IAnim -IAsteroid -IBmpman -ICFile -ICmdline -ICMeasure -IControlConfig \
-ICutscene -IDebris -IDebugConsole -IDirectX -IFireball -IGameHelp -IFREESPACE2 \
-IGameSequence -IGamesnd -IGlide -IGlobalIncs -IGraphics -IHud -IIo -IJumpNode \
-ILighting -IMath -IMenuUI -IMission -IMissionUI -IModel -INetwork -IObject \
-IObserver -IOsApi -IPalman -IParse -IParticle -IPcxUtils -IPhysics -IPlayerman \
-IPopup -IRadar -IRender -IShip -ISound -IStarfield -IStats -ITgaUtils -IUI -IVCodec \
-IWeapon -ILocalization -INebula -IDemo -IInetfile -IExceptionHandler \
-D_DEBUG -DNO_CD_CHECK -UNDEBUG
# removed from OBJFILES
# CFile/cfile.o \
# CFile/CfileArchive.o \
# CFile/CfileList.o \
# CFile/CfileSystem.o \
OBJFILES = \
Anim/animplay.o \
Anim/packunpack.o \
Asteroid/asteroid.o \
Bmpman/bmpman.o \
Cmdline/cmdline.o \
CMeasure/cmeasure.o \
ControlConfig/controlsconfig.o \
ControlConfig/controlsconfigcommon.o \
Cutscene/cutscenes.o \
Debris/debris.o \
DebugConsole/console.o \
Fireball/fireballs.o \
Fireball/warpineffect.o \
GameHelp/contexthelp.o \
GameHelp/gameplayhelp.o \
GameSequence/gamesequence.o \
Gamesnd/eventmusic.o \
Gamesnd/gamesnd.o \
Glide/glide.o \
GlobalIncs/alphacolors.o \
GlobalIncs/crypt.o \
GlobalIncs/systemvars.o \
GlobalIncs/version.o \
GlobalIncs/windebug.o \
Graphics/2d.o \
Graphics/aaline.o \
Graphics/bitblt.o \
Graphics/circle.o \
Graphics/colors.o \
Graphics/font.o \
Graphics/gradient.o \
Graphics/grd3d.o \
Graphics/grd3drender.o \
Graphics/grd3dtexture.o \
Graphics/grdirectdraw.o \
Graphics/grglide.o \
Graphics/grglidetexture.o \
Graphics/gropengl.o \
Graphics/grsoft.o \
Graphics/grzbuffer.o \
Graphics/line.o \
Graphics/pixel.o \
Graphics/rect.o \
Graphics/scaler.o \
Graphics/shade.o \
Graphics/tmapgenericscans.o \
Graphics/tmapper.o \
Graphics/tmapscanline.o \
Graphics/tmapscantiled128x128.o \
Graphics/tmapscantiled16x16.o \
Graphics/tmapscantiled256x256.o \
Graphics/tmapscantiled32x32.o \
Graphics/tmapscantiled64x64.o \
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/hudobserver.o \
Hud/hudreticle.o \
Hud/hudshield.o \
Hud/hudsquadmsg.o \
Hud/hudtarget.o \
Hud/hudtargetbox.o \
Hud/hudwingmanstatus.o \
Io/joy.o \
Io/joy_ff.o \
Io/key.o \
Io/keycontrol.o \
Io/mouse.o \
Io/swff_lib.o \
Io/timer.o \
JumpNode/jumpnode.o \
Lighting/lighting.o \
Math/fix.o \
Math/floating.o \
Math/fvi.o \
Math/spline.o \
Math/staticrand.o \
Math/vecmat.o \
MenuUI/barracks.o \
MenuUI/credits.o \
MenuUI/fishtank.o \
MenuUI/mainhallmenu.o \
MenuUI/mainhalltemp.o \
MenuUI/optionsmenu.o \
MenuUI/optionsmenumulti.o \
MenuUI/playermenu.o \
MenuUI/readyroom.o \
MenuUI/snazzyui.o \
MenuUI/techmenu.o \
MenuUI/trainingmenu.o \
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/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/modelcollide.o \
Model/modelinterp.o \
Model/modeloctant.o \
Model/modelread.o \
Object/collidedebrisship.o \
Object/collidedebrisweapon.o \
Object/collideshipship.o \
Object/collideshipweapon.o \
Object/collideweaponweapon.o \
Object/objcollide.o \
Object/object.o \
Object/objectsnd.o \
Object/objectsort.o \
Observer/observer.o \
OsApi/osapi.o \
OsApi/osregistry.o \
OsApi/outwnd.o \
Palman/palman.o \
Parse/encrypt.o \
Parse/parselo.o \
Parse/sexp.o \
Particle/particle.o \
PcxUtils/pcxutils.o \
Physics/physics.o \
Playerman/managepilot.o \
Playerman/playercontrol.o \
Popup/popup.o \
Popup/popupdead.o \
Radar/radar.o \
Render/3dclipper.o \
Render/3ddraw.o \
Render/3dlaser.o \
Render/3dmath.o \
Render/3dsetup.o \
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/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/nebula.o \
Starfield/starfield.o \
Starfield/supernova.o \
Stats/medals.o \
Stats/scoring.o \
Stats/stats.o \
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/codec1.o \
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 \
Nebula/neb.o \
Nebula/neblightning.o \
Localization/fhash.o \
Localization/localize.o \
TgaUtils/tgautils.o \
Demo/demo.o \
Inetfile/cftp.o \
Inetfile/chttpget.o \
Inetfile/inetgetfile.o \
ExceptionHandler/exceptionhandler.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/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/multimsgs.o \
Network/multiteamselect.o \
Network/multiui.o \
Network/multiutil.o \
Network/psnet.o \
Network/psnet2.o \
Network/stand_gui.o
# ==============================
.PHONY: all clean code
.cpp.o:
$(CXX) $(CXXFLAGS) -E $< > $@
# $(CXX) $(CXXFLAGS) -c $<
all: $(TARGET)
clean:
rm -f $(TARGET) core *.o *~
find -name *.o -exec rm {} \;
find -name *~ -exec rm {} \;
code: $(TARGET)
# ==============================
libcode.a: $(OBJFILES)
File diff suppressed because it is too large. Load diff
-148
View File
@@ -1,148 +0,0 @@
/*
* 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/Anim/AnimPlay.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Header file for playing back anim files
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 10/22/98 6:14p Dave
* Optimized some #includes in Anim folder. Put in the beginnings of
* parse/localization support for externalized strings and tstrings.tbl
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 11 5/07/98 3:11a Lawrance
* Implement custom streaming code
*
* 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.
*
* 8 12/24/97 8:57p Lawrance
* Added anim_ignore_next_frametime()
*
* 7 11/19/97 8:28p Dave
* Hooked in Main Hall screen. Put in Anim support for ping ponging
* animations as well as general reversal of anim direction.
*
* 6 8/30/97 2:11p Lawrance
* allow animations to loop
*
* 5 8/25/97 11:13p Lawrance
* support framerate independent playback with the option of now advancing
* more than one frame at a time
*
* 4 7/21/97 11:41a Lawrance
* make playback time of .ani files keyed of frametime
*
* 3 7/20/97 6:57p Lawrance
* supporting new RLE format
*
* 2 6/26/97 12:12a Lawrance
* supporting anti-aliased bitmap animations
*
* 1 6/23/97 5:09p Lawrance
*
* 10 5/19/97 2:28p Lawrance
* changes some variables to flags
*
* 9 5/15/97 5:58p Lawrance
* fix some bugs that were present with animations when playing multiple
* missions
*
* 8 5/15/97 4:42p Lawrance
* suporting anims in-game
*
* 7 5/15/97 11:46a Lawrance
* add function to check if an anim is playing
*
* 6 2/28/97 12:17p Lawrance
* supporting mapping file to memory
*
* 5 2/25/97 11:06a Lawrance
* moved some higher level functions to from PackUnpack to AnimPlay
*
* 4 2/19/97 9:27p Lawrance
* added pause capability to anim playback
*
* 3 2/17/97 4:19p Lawrance
* using frame numbers instead of percentages for accessing keyframes
*
* 2 2/17/97 3:01p Lawrance
* code for playing back an anim
*
* $NoKeywords: $
*/
#ifndef __ANIMPLAY_H__
#define __ANIMPLAY_H__
struct anim;
struct anim_info;
struct anim_instance;
struct CFILE;
// structure passed in when playing an anim. Talk about overkill..
typedef struct {
anim *anim_info;
int x;
int y;
int start_at;
int stop_at;
int screen_id;
vector *world_pos;
float radius;
int framerate_independent;
void *color;
int skip_frames;
int looped;
int ping_pong;
} anim_play_struct;
extern int Anim_paused;
void anim_init();
void anim_level_init();
void anim_level_close();
void anim_render_all(int screen_id, float frametime);
void anim_render_one(int screen_id, anim_instance *ani, float frametime);
void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y);
anim_instance *anim_play(anim_play_struct *aps);
void anim_ignore_next_frametime();
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);
int anim_free(anim *ptr);
int anim_playing(anim_instance *ai);
int anim_write_frames_out(char *filename);
void anim_display_info(char *filename);
void anim_read_header(anim *ptr, CFILE *fp);
void anim_reverse_direction(anim_instance *ai); // called automatically for ping-ponging, and can also be called externally
void anim_pause(anim_instance *ai);
void anim_unpause(anim_instance *ai);
int anim_instance_is_streamed(anim_instance *ai);
unsigned char anim_instance_get_byte(anim_instance *ai, int offset);
#endif /* __ANIMPLAY_H__ */
File diff suppressed because it is too large. Load diff
-250
View File
@@ -1,250 +0,0 @@
/*
* 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/Anim/PackUnpack.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* 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 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 7 7/16/99 1:49p Dave
* 8 bit aabitmaps. yay.
*
* 6 1/14/99 12:48a Dave
* Todo list bug fixes. Made a pass at putting briefing icons back into
* FRED. Sort of works :(
*
* 5 11/30/98 1:07p Dave
* 16 bit conversion, first run.
*
* 4 10/22/98 6:14p Dave
* Optimized some #includes in Anim folder. Put in the beginnings of
* parse/localization support for externalized strings and tstrings.tbl
*
* 3 10/16/98 3:42p Andsager
* increase MAX_WEAPONS and MAX_SHIPS and som header files
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 32 5/18/98 5:59p Hoffoss
* Made command briefing advanced now once the speech stops and animation
* has fully played once, whichever is longer.
*
* 31 5/07/98 3:11a Lawrance
* Implement custom streaming code
*
* 30 1/14/98 6:43p Lawrance
* Add ref_count to anim struct, so we don't free multiple times
*
* 29 11/19/97 8:28p Dave
* Hooked in Main Hall screen. Put in Anim support for ping ponging
* animations as well as general reversal of anim direction.
*
* 28 8/30/97 2:11p Lawrance
* allow animations to loop
*
* 27 8/25/97 11:13p Lawrance
* support framerate independent playback with the option of now advancing
* more than one frame at a time
*
* 26 8/21/97 5:11p Lawrance
* frame numbering for ANI's now is from 0 -> total_frames-1.
*
* 25 7/28/97 10:42p Lawrance
* re-did interface to unpack_frame() to make more general
*
* 24 7/21/97 11:41a Lawrance
* make playback time of .ani files keyed of frametime
*
* 23 7/20/97 6:57p Lawrance
* supporting new RLE format
*
* 22 6/27/97 4:36p Lawrance
* update pal translation table when gr_screen.signature changes
*
* 21 6/26/97 12:12a Lawrance
* supporting anti-aliased bitmap animations
*
* 20 6/25/97 3:03p Lawrance
* fix palette translation problem with anti-alised bitmaps
*
* 19 5/27/97 3:48p Lawrance
* don't re-create a bitmap if using the same frame of animation
*
* 18 5/21/97 11:06a Lawrance
* enabling a user-defined transparent value
*
* 17 5/19/97 3:21p Lawrance
* add fps parm, version num to anim header
*
* 16 5/19/97 2:28p Lawrance
* changes some variables to flags
*
* 15 5/15/97 4:42p Lawrance
* supporting animations in-game
*
* 14 3/01/97 2:08p Lawrance
* not using windows.h, since memory mapping details moved to cfile
*
* 13 2/28/97 12:17p Lawrance
* supporting mapping file to memory
*
* 12 2/25/97 11:06a Lawrance
* moved some higher level functions to from PackUnpack to AnimPlay
*
* 11 2/19/97 9:51p Lawrance
* made keyframe decompression more effecient, moved
* default anim FPS to header file
*
* 10 2/19/97 4:01p Lawrance
* load_anim returns int, not void
*
* 9 2/17/97 4:19p Lawrance
* changed stop and start to be actual frame numbers, not percentages
*
* 8 2/17/97 4:17p Hoffoss
* modified packing internal format and added random access function to an
* Anim frame.
*
* 7 2/17/97 2:59p Lawrance
* integrating into game
*
* 6 2/14/97 11:09p Hoffoss
* Made optimizations.
*
* 5 2/14/97 10:48p Hoffoss
* fixed bug.
*
* 4 2/14/97 10:38p Lawrance
* fixing bugs
*
* 3 2/14/97 3:29p Hoffoss
* Added header for MSDEV to fill in.
*
* $NoKeywords: $
*/
#ifndef __PACKUNPACK_H__
#define __PACKUNPACK_H__
#include "pstypes.h"
struct CFILE;
#define ANI_STREAM_CACHE_SIZE 4096
#define PACKER_CODE 0xEE // Use'd by PACKING_METHOD_RLE
#define PACKING_METHOD_RLE 0 // Hoffoss's RLE format
#define PACKING_METHOD_RLE_KEY 1 // Hoffoss's key frame RLE format
#define PACKING_METHOD_STD_RLE 2 // Standard RLE format (high bit is count)
#define PACKING_METHOD_STD_RLE_KEY 3 // Standard RLE format key frame
#define STD_RLE_CODE 0x80
typedef struct key_frame {
int frame_num; // which frame number this key frame is
int offset; // offset from the start of data block
} key_frame;
#define ANF_MEM_MAPPED (1<<0) // animation is memory-mapped file
#define ANF_STREAMED (1<<1)
#define ANF_XPARENT (1<<2) // animation has transparency
#define ANF_ALL_KEYFRAMES (1<<3) // all the frames are keyframes (this is necessary if we want to play the file backwards)
typedef struct anim {
anim *next;
char name[MAX_PATH_LEN];
ubyte packer_code;
int width;
int height;
int total_frames;
int instance_count; // number of instances that are currently playing
int ref_count; // number of times this anim has been loaded
float time; // playback time in seconds
int num_keys;
key_frame *keys;
ubyte palette[768];
ubyte palette_translation[256];
ubyte *data; // points to compressed data
CFILE* cfile_ptr;
int version;
int fps;
ubyte xparent_r; // red component for the transparent color in source image
ubyte xparent_g; // green component for the transparent color in source image
ubyte xparent_b; // blue component for the transparent color in source image
int flags;
uint screen_sig;
int file_offset; // file offset to start of frame data
int cache_file_offset;
ubyte *cache;
} anim;
// the direction to play the anim (forwards or backwards)
#define ANIM_DIRECT_FORWARD 0
#define ANIM_DIRECT_REVERSE 1
typedef struct anim_instance {
anim_instance *next, *prev;
int x,y; // coordinates anim is played at (top left corner of anim)
vector *world_pos; // world (x,y,z) position of explosion
float radius; // radius of image, needed for scaling
int frame_num; // current frame, or last frame if between frames (first frame is 0)
int last_frame_num;// last frame rendered
anim *parent; // pointer to anim structure, which holds compressed data
ubyte *data; // pointer to next frame's compressed data
ubyte *frame; // uncompressed frame
float time_elapsed; // how long the anim has played for (in seconds)
int start_at; // frame anim playing should start
int stop_at; // frame anim playing should stop
int framerate_independent; // animation should play back in same amount of time, regardless
int skip_frames; // should anim skip frames during framerate independent playback
int looped; // should anim keep playing over and over...
int stop_now; // flag to indicate time to stop the animation
int last_bitmap; // id of last bitmap that was rendered out from animation
int screen_id; // 0 means all screens should render, otherwise screen specific
void *aa_color; // anti-aliased bitmap color
int xlate_pal;
int direction; // playing forwards or backwards ?
int ping_pong; // should be played ping-pong style
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;
extern int packer_code;
int pack_key_frame(ubyte *frame, ubyte *save, long size, long max, int compress_type);
int pack_frame(ubyte *frame, ubyte *frame2, ubyte *save, long size, long max, int compress_type);
ubyte *unpack_frame(anim_instance *ai, ubyte *ptr, ubyte *frame, int size, ubyte *pal_translate, int aabitmap, int bpp);
int unpack_frame_from_file(anim_instance *ai, ubyte *frame, int size, ubyte *pal_translate, int aabitmap, int bpp);
void anim_init();
anim_instance *init_anim_instance(anim *ptr, int bpp);
void free_anim_instance(anim_instance *inst);
int anim_get_next_frame(anim_instance *inst);
int anim_get_frame(anim_instance *inst, int frame_num, int xlate_pal=1);
ubyte *anim_get_next_raw_buffer(anim_instance *inst, int xlate_pal, int aabitmap, int bpp);
void anim_set_palette(anim *a);
void anim_check_for_palette_change(anim_instance *inst);
#endif /* __PACKUNPACK_H__ */
File diff suppressed because it is too large. Load diff
-261
View File
@@ -1,261 +0,0 @@
/*
* 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/Asteroid/Asteroid.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Header file for asteroids
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 12 6/09/99 2:55p Andsager
* Allow multiple asteroid subtypes (of large, medium, small) and follow
* family.
*
* 11 6/07/99 1:18p Andsager
* Make asteroids choose consistent texture from large to small. Modify
* fireball radius of dying asteroids.
*
* 10 5/03/99 10:50p Andsager
* Make Asteroid_obj_list. Change get_nearest_turret_objnum() to use
* Asteroid_obj_list, Ship_obj_list and Missile_obj_list vs.
* obj_used_list.
*
* 9 4/16/99 2:34p Andsager
* Second pass on debris fields
*
* 8 4/15/99 5:00p Andsager
* Frist pass on Debris field
*
* 7 3/31/99 9:51a Andsager
* Add for generalization to debris field
*
* 6 2/07/99 8:51p Andsager
* Add inner bound to asteroid field. Inner bound tries to stay astroid
* free. Wrap when within and don't throw at ships inside.
*
* 5 1/20/99 6:04p Dave
* Another bit of stuff for beam weapons. Ships will properly use them
* now, although they're really deadly.
*
* 4 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 3 10/16/98 1:22p Andsager
* clean up header files
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 17 3/26/98 9:19a Lawrance
* Support multiple asteroid pofs
*
* 16 3/17/98 12:16a Allender
* asteroids in multiplayer -- minor problems with position being correct
*
* 15 3/14/98 1:44p Mike
* Todolist items 3365..3368. Make child asteroids collide properly.
* Make asteroid throwing less bunchy, toss asteroids earlier, make
* facing-ness not break mission balance.
*
* 14 3/11/98 12:13a Lawrance
* Auto-target asteroids if no hostile ships present
*
* 13 3/08/98 4:16p Hoffoss
*
* 12 3/07/98 3:48p Lawrance
* Show offscreen indicators for asteroids
*
* 11 3/04/98 11:59p Lawrance
* create an asteroid.tbl, read all asteroid data from there
*
* 10 3/04/98 4:11p Lawrance
* Have area effects affect asteroids, have asteroids cast an area effect,
* fix ship shockwaves
*
* 9 3/03/98 12:48a Lawrance
* Ensure collide_objnum is still valid each frame.
*
* 8 3/02/98 11:35p Lawrance
* Keep track of asteroids that will impact ships on the escort view.
*
* 7 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 6 2/26/98 4:22p Lawrance
* Change wrapping behavior, make vel random
*
* 5 2/20/98 8:31p Lawrance
* delay creation of sub-asteroids
*
* 4 2/19/98 4:33p Lawrance
* hook in new sounds and custom explosion animation
*
* 3 2/19/98 12:46a Lawrance
* Further work on asteroids.
*
* 2 2/10/98 6:43p Lawrance
* Moved asteroid code to a separate lib.
*
* 1 2/10/98 6:05p Lawrance
*
* $NoKeywords: $
*/
#ifndef __ASTEROID_H__
#define __ASTEROID_H__
#include "ship.h"
#include "parselo.h" // for NAME_LENGTH
struct object;
struct polymodel;
struct collision_info_struct;
#define MAX_ASTEROIDS 256
// DEBRIS TYPES
#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_LARGE 5
//
#define DEBRIS_VASUDAN_SMALL 6
#define DEBRIS_VASUDAN_MEDIUM 7
#define DEBRIS_VASUDAN_LARGE 8
//
#define DEBRIS_SHIVAN_SMALL 9
#define DEBRIS_SHIVAN_MEDIUM 10
#define DEBRIS_SHIVAN_LARGE 11
// END DEBRIS TYPES
typedef struct debris_struct {
int index;
char *name;
} debris_struct;
// Data structure to track the active asteroids
typedef struct asteroid_obj {
asteroid_obj *next, *prev;
int flags, objnum;
} asteroid_obj;
extern asteroid_obj Asteroid_obj_list;
extern debris_struct Field_debris_info[];
#define MAX_ASTEROID_POFS 3 // Max number of POFs per asteroid type
#define AF_USED (1<<0) // Set means used.
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
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
polymodel *modelp[MAX_ASTEROID_POFS];
int model_num[MAX_ASTEROID_POFS];
} asteroid_info;
typedef struct asteroid {
int flags;
int objnum;
int type; // In 0..Num_asteroid_types
int asteroid_subtype; // Which index into asteroid_info for modelnum and modelp
int check_for_wrap; // timestamp to check for asteroid wrapping around field
int check_for_collide; // timestamp to check for asteroid colliding with escort ships
int final_death_time; // timestamp to swap in new models after explosion starts
int collide_objnum; // set to objnum that asteroid will be impacting soon
int collide_objsig; // object signature corresponding to collide_objnum
vector death_hit_pos; // hit pos that caused death
int target_objnum; // Yes, hah! Asteroids can have targets. See asteroid_aim_at_target().
} asteroid;
// TYPEDEF FOR SPECIES OF DEBRIS - BITFIELD
#define DS_TERRAN 0x01
#define DS_VASUDAN 0x02
#define DS_SHIVAN 0x04
// TYPEDEF FOR DEBRIS TYPE
typedef enum {
DG_ASTEROID,
DG_SHIP
} debris_genre;
// TYPEDEF FOR FIELD TYPE
typedef enum {
FT_ACTIVE,
FT_PASSIVE
} field_type;
#define MAX_ACTIVE_DEBRIS_TYPES 3
typedef struct asteroid_field {
vector min_bound; // Minimum range of field.
vector max_bound; // Maximum range of field.
int has_inner_bound;
vector inner_min_bound;
vector inner_max_bound;
vector vel; // Average asteroid moves at this velocity.
float speed; // Average speed of field
int num_initial_asteroids; // Number of asteroids at creation.
field_type field_type; // active throws and wraps, passive does not
debris_genre debris_genre; // type of debris (ship or asteroid) [generic type]
int field_debris_type[MAX_ACTIVE_DEBRIS_TYPES]; // one of the debris type defines above
} asteroid_field;
extern asteroid_info Asteroid_info[MAX_DEBRIS_TYPES];
extern asteroid Asteroids[MAX_ASTEROIDS];
extern asteroid_field Asteroid_field;
extern int Num_asteroid_types;
extern int Num_asteroids;
extern int Asteroids_enabled;
void asteroid_init();
void asteroid_level_init();
void asteroid_level_close();
void asteroid_create_all();
void asteroid_render( object *asteroid_objp );
void asteroid_delete( object *asteroid_objp );
void asteroid_process_pre( object *asteroid_objp, float frame_time);
void asteroid_process_post( object *asteroid_objp, float frame_time);
int asteroid_check_collision( object *asteroid_objp, object * other_obj, vector * hitpos, collision_info_struct *asteroid_hit_info=NULL );
void asteroid_hit( object *asteroid_objp, object *other_objp, vector *hitpos, float damage );
int asteroid_count();
int asteroid_collide_objnum(object *asteroid_objp);
float asteroid_time_to_impact(object *asteroid_objp);
void asteroid_show_brackets();
void asteroid_target_closest_danger();
int asteroid_get_random_in_cone(vector *pos, vector *dir, float ang, int danger = 0);
// need to extern for multiplayer
void asteroid_sub_create(object *parent_objp, int asteroid_type, vector *relvec);
void asteroid_frame();
#endif // __ASTEROID_H__
File diff suppressed because it is too large. Load diff
-354
View File
@@ -1,354 +0,0 @@
/*
* 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/BmpMan.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Prototypes for Bitmap Manager functions
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 16 8/10/99 6:54p Dave
* Mad optimizations. Added paging to the nebula effect.
*
* 15 8/06/99 1:52p Dave
* Bumped up MAX_BITMAPS for the demo.
*
* 14 7/15/99 9:20a Andsager
* FS2_DEMO initial checkin
*
* 13 7/13/99 1:15p Dave
* 32 bit support. Whee!
*
* 12 6/29/99 10:35a Dave
* Interface polygon bitmaps! Whee!
*
* 11 6/16/99 4:06p Dave
* New pilot info popup. Added new draw-bitmap-as-poly function.
*
* 10 5/05/99 9:02p Dave
* Fixed D3D aabitmap rendering. Spiffed up nebula effect a bit (added
* rotations, tweaked values, made bitmap selection more random). Fixed
* D3D beam weapon clipping problem. Added D3d frame dumping.
*
* 9 2/08/99 5:07p Dave
* FS2 chat server support. FS2 specific validated missions.
*
* 8 2/05/99 12:52p Dave
* Fixed Glide nondarkening textures.
*
* 7 2/03/99 11:44a Dave
* Fixed d3d transparent textures.
*
* 6 12/06/98 2:36p Dave
* Drastically improved nebula fogging.
*
* 5 12/01/98 4:46p Dave
* Put in targa bitmap support (16 bit).
*
* 4 12/01/98 8:06a Dave
* Temporary checkin to fix some texture transparency problems in d3d.
*
* 3 11/30/98 1:07p Dave
* 16 bit conversion, first run.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 32 4/16/98 6:31p Hoffoss
* Added function to get filename of a bitmap handle, which we don't have
* yet and I need.
*
* 31 4/02/98 11:40a Lawrance
* check for #ifdef DEMO instead of #ifdef DEMO_RELEASE
*
* 30 3/30/98 4:02p John
* Made machines with < 32 MB of RAM use every other frame of certain
* bitmaps. Put in code to ke7ep track of how much RAM we've malloc'd.
*
* 29 3/29/98 4:05p John
* New paging code that loads everything necessary at level startup.
*
* 28 3/26/98 5:21p John
* Added new code to preload all bitmaps at the start of a level.
* Commented it out, though.
*
* 27 3/24/98 6:18p John
* Hacked MAX_BITMAPS up to 3500
*
* 26 3/10/98 4:18p John
* Cleaned up graphics lib. Took out most unused gr functions. Made D3D
* & Glide have popups and print screen. Took out all >8bpp software
* support. Made Fred zbuffer. Made zbuffer allocate dynamically to
* support Fred. Made zbuffering key off of functions rather than one
* global variable.
*
* 25 3/02/98 6:46p John
* Upped MAX_BITMAPS to 2000
*
* 24 3/02/98 6:00p John
* Moved MAX_BITMAPS into BmpMan.h so the stuff in the graphics code that
* is dependent on it won't break if it changes. Made ModelCache slots
* be equal to MAX_OBJECTS which is what it is.
*
* 23 2/06/98 8:25p John
* Added code for new bitmaps since last frame
*
* 22 2/06/98 8:10p John
* Added code to show amout of texture usage each frame.
*
* 21 1/29/98 11:48a John
* Added new counter measure rendering as model code. Made weapons be
* able to have impact explosion.
*
* 20 1/11/98 2:14p John
* Changed a lot of stuff that had to do with bitmap loading. Made cfile
* not do callbacks, I put that in global code. Made only bitmaps that
* need to load for a level load.
*
* 19 9/03/97 4:19p John
* changed bmpman to only accept ani and pcx's. made passing .pcx or .ani
* to bm_load functions not needed. Made bmpman keep track of palettes
* for bitmaps not mapped into game palettes.
*
* 18 8/25/97 11:14p Lawrance
* added support for .ani files in bm_load_animation()
*
* 17 7/16/97 3:07p John
*
* 16 6/17/97 8:58p Lawrance
* fixed bug with not nulling bm.data with USER bitmaps
*
* 15 6/12/97 2:44a Lawrance
* changed bm_unlock() to take an index into bm_bitmaps(). Added
* ref_count to bitmap_entry struct
*
* 14 5/20/97 10:36a John
* Fixed problem with user bitmaps and direct3d caching.
*
* 13 3/24/97 3:25p John
* Cleaned up and restructured model_collide code and fvi code. In fvi
* made code that finds uvs work.. Added bm_get_pixel to BmpMan.
*
* 12 2/17/97 5:18p John
* Added a bunch of RCS headers to a bunch of old files that don't have
* them.
*
* $NoKeywords: $
*/
#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
#endif
// 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!
// 16 bit pixel formats
extern int Bm_pixel_format;
#define BYTES_PER_PIXEL(x) ((x+7)/8)
// how many bytes of textures are used.
extern int bm_texture_ram;
// This loads a bitmap so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number.
int bm_load(char * filename);
// special load function. basically allows you to load a bitmap which already exists (by filename).
// this is useful because in some cases we need to have a bitmap which is locked in screen format
// _and_ texture format, such as pilot pics and squad logos
int bm_load_duplicate(char *filename);
// Creates a bitmap that exists in RAM somewhere, instead
// of coming from a disk file. You pass in a pointer to a
// block of data. The data can be in the following formats:
// 8 bpp (mapped into game palette)
// 32 bpp
// On success, it returns the bitmap number. You cannot
// free that RAM until bm_release is called on that bitmap.
// See example at bottom of this file
int bm_create( int bpp, int w, int h, void * data, int flags = 0);
// Frees up a bitmap's data, but bitmap number 'n' can
// still be used, it will just have to be paged in next
// time it is locked.
int bm_unload( int n );
// Frees up a bitmap's data, and it's slot, so bitmap
// number 'n' cannot be used anymore, and bm_load or
// bm_create might reuse the slot.
void bm_release(int n);
// This loads a bitmap sequence so we can draw with it later.
// It returns a negative number if it couldn't load
// the bitmap. On success, it returns the bitmap
// number of the first frame and nframes is set.
extern int bm_load_animation( char * filename, int * nframes, int *fps = NULL, int can_drop_frames = 0 );
// This locks down a bitmap and returns a pointer to a bitmap
// that can be accessed until you call bm_unlock. Only lock
// a bitmap when you need it! This will convert it into the
// appropriate format also.
extern bitmap * bm_lock( int bitmapnum, ubyte bpp, ubyte flags );
// The signature is a field that gets filled in with
// a unique signature for each bitmap. The signature for each bitmap
// will also change when the bitmap's data changes.
extern uint bm_get_signature( int bitmapnum);
// Unlocks a bitmap
extern void bm_unlock( int bitmapnum );
// Gets info. w,h,or flags,nframes or fps can be NULL if you don't care.
extern void bm_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);
// 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_unload_all();
// call to get the palette for a bitmap
extern 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 );
// Returns number of bytes of bitmaps locked this frame
// ntotal = number of bytes of bitmaps locked this frame
// nnew = number of bytes of bitmaps locked this frame that weren't locked last frame
void bm_get_frame_usage(int *ntotal, int *nnew);
/*
* Example on using bm_create
*
{
static int test_inited = 0;
static int test_bmp;
static uint test_bmp_data[128*64];
if ( !test_inited ) {
test_inited = 1;
// Create the new bitmap and fill in its data.
// When you're done with it completely, call
// bm_release to free up the bitmap handle
test_bmp = bm_create( 32, 128, 64, test_bmp_data );
int i,j;
for (i=0; i<64; i++ ) {
for (j=0; j<64; j++ ) {
uint r=i*4;
test_bmp_data[j+i*128] = r;
}
}
}
bm_unload(test_bmp); // this pages out the data, so that the
// next bm_lock will convert the new data to the
// correct bpp
// put in new data
int x,y;
gr_reset_clip();
for (y=0; y<64; y++)
for (x=0; x<128; x++ )
test_bmp_data[y*128+x] = 15;
// Draw the bitmap to upper left corner
gr_set_bitmap(test_bmp);
gr_bitmap( 0,0 );
}
*/
//============================================================================
// Paging stuff
//============================================================================
void bm_page_in_start();
void bm_page_in_stop();
// Paging code in a library should call these functions
// in its page in function.
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_texture( int bitmapnum, int num_frames=1 );
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_nondarkening_texture( int bitmap, int num_frames=1 );
// marks a texture as being a transparent textyre used for this level
// Marks a texture as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_xparent_texture( int bitmapnum, int num_frames=1 );
// Marks an aabitmap as being used for this level
// If num_frames is passed, assume this is an animation
void bm_page_in_aabitmap( int bitmapnum, int num_frames=1 );
//
// Mode: 0 = High memory
// 1 = Low memory ( every other frame of ani's)
// 2 = Debug low memory ( only use first frame of each ani )
void bm_set_low_mem( int mode );
char *bm_get_filename(int handle);
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);
void bm_set_components_d3d(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_32_screen(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_16_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
void bm_set_components_argb_d3d_32_tex(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
// get the rgba components of a pixel, any of the parameters can be NULL
void bm_get_components(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
//============================================================================
// section info stuff
//============================================================================
// given a bitmap and a section, return the size (w, h)
void bm_get_section_size(int bitmapnum, int sx, int sy, int *w, int *h);
#endif
File diff suppressed because it is too large. Load diff
-603
View File
@@ -1,603 +0,0 @@
/*
* 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/CFile/cfile.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* <insert description of file here>
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 11 9/08/99 12:03a Dave
* Make squad logos render properly in D3D all the time. Added intel anim
* directory.
*
* 10 8/31/99 9:46a Dave
* Support for new cfile cbanims directory.
*
* 9 5/19/99 4:07p Dave
* Moved versioning code into a nice isolated common place. Fixed up
* updating code on the pxo screen. Fixed several stub problems.
*
* 8 3/28/99 5:58p Dave
* Added early demo code. Make objects move. Nice and framerate
* independant, but not much else. Don't use yet unless you're me :)
*
* 7 3/24/99 4:05p Dave
* Put in support for assigning the player to a specific squadron with a
* specific logo. Preliminary work for doing pos/orient checksumming in
* multiplayer to reduce bandwidth.
*
* 6 1/12/99 3:15a Dave
* Barracks screen support for selecting squad logos. We need real artwork
* :)
*
* 5 10/29/98 10:41a Dave
* Change the way cfile initializes exe directory.
*
* 4 10/13/98 9:19a Andsager
* Add localization support to cfile. Optional parameter with cfopen that
* looks for localized files.
*
* 3 10/12/98 9:54a Dave
* Fixed a few file organization things.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 84 9/09/98 5:53p Dave
* Put in new tracker packets in API. Change cfile to be able to checksum
* portions of a file.
*
* 83 8/12/98 4:53p Dave
* Put in 32 bit checksumming for PXO missions. No validation on the
* actual tracker yet, though.
*
* 82 5/19/98 1:19p Allender
* new low level reliable socket reading code. Make all missions/campaign
* load/save to data missions folder (i.e. we are rid of the player
* missions folder)
*
* 81 5/13/98 10:22p John
* Added cfile functions to read/write rle compressed blocks of data.
* Made palman use it for .clr files. Made alphacolors calculate on the
* fly rather than caching to/from disk.
*
* 80 5/01/98 10:21a John
* Added code to find all pack files in all trees. Added code to create
* any directories that we write to.
*
* 79 4/30/98 10:29p John
* Added code to refresh filelist if cd-rom changed or packfiles created
* or deleted.
*
* 78 4/30/98 10:06p John
* Started adding code for splitting the maps data tree for hardware
* textures.
*
* 77 4/30/98 9:43p John
* Restructured some stuff.
*
* 76 4/30/98 8:23p John
* Fixed some bugs with Fred caused by my new cfile code.
*
* 75 4/30/98 4:53p John
* Restructured and cleaned up cfile code. Added capability to read off
* of CD-ROM drive and out of multiple pack files.
*
* 74 4/20/98 6:04p Dave
* Implement multidata cache flushing and xferring mission files to
* multidata. Make sure observers can't change hud config. Fix pilot image
* viewing in popup. Put in game status field. Tweaked multi options.
*
* 73 4/01/98 6:06p Hoffoss
* Added a command briefing directory for those voice files.
*
* 72 3/31/98 4:51p Dave
* Removed medals screen and multiplayer buttons from demo version. Put in
* new pilot popup screen. Make ships in mp team vs. team have proper team
* ids. Make mp respawns a permanent option saved in the player file.
*
* 71 3/26/98 6:01p Dave
* Put in file checksumming routine in cfile. Made pilot pic xferring more
* robust. Cut header size of voice data packets in half. Put in
* restricted game host query system.
*
* 70 3/10/98 2:27p Hoffoss
* Added change directory with history stack functions, so you can switch
* to a new directory, do something, and restore to what it was. useful
* for Fred.
*
* 69 3/07/98 3:48p Lawrance
* get save game working, allow restore from main menu
*
* 68 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 67 2/20/98 4:43p Dave
* Finished support for multiplayer player data files. Split off
* multiplayer campaign functionality.
*
* 66 2/19/98 6:26p Dave
* Fixed a few file xfer bugs. Tweaked mp team select screen. Put in
* initial support for player data uploading.
*
* 65 2/06/98 3:47p Allender
* subtitling for movies
*
* 64 2/05/98 10:15p Lawrance
* Add support for .svg filenames.
*
* 63 1/12/98 10:07p Hoffoss
* Made tab cycle properly in debriefing screen and put in aux. pilot
* image directory.
*
* 62 1/11/98 2:45p John
* Changed .lst to .clt
*
* 61 1/11/98 2:14p John
* Changed a lot of stuff that had to do with bitmap loading. Made cfile
* not do callbacks, I put that in global code. Made only bitmaps that
* need to load for a level load.
*
* 60 1/02/98 4:41p Allender
* added new mission folder for "player" missions
*
* 59 12/28/97 12:42p John
* Put in support for reading archive files; Made missionload use the
* cf_get_file_list function. Moved demos directory out of data tree.
*
* 58 12/17/97 10:16p Allender
* implemented a "no callback" flag to tell the cfile code not to use the
* cf_callback on files which specify this flag
*
* 57 12/08/97 6:23p Lawrance
* add cflush()
*
* 56 12/07/97 4:30p John
* Fixed bug with cfile versioning if two files use it at once. Added
* code to cfile so I could display a loading box while loading.
*
* 55 11/24/97 9:28a Hoffoss
* Moved define of CF_TYPE_MULTI_PLAYERS so it's in order. I started to
* add it because I couldn't find it, so that's indication enough it
* needed it.
*
* 54 11/20/97 1:07a Lawrance
* add support for voice/debriefings directory
*
* 53 11/19/97 7:27p Hoffoss
* Added version checking read functions.
*
* 52 11/18/97 10:53a Hoffoss
*
* 51 11/17/97 6:07p Hoffoss
* Make get_file_list() allow filtering via a callback function.
*
* 50 11/16/97 2:29p John
* added versioning to nebulas; put nebula code into freespace.
*
* 49 11/15/97 6:10p Lawrance
* add in support for new voice directories
*
* 48 11/11/97 4:54p Dave
* Put in support for single vs. multiplayer pilots. Put in initial player
* selection screen (no command line option yet). Started work on
* multiplayer campaign file save gaming.
*
* 47 11/07/97 4:00p Hoffoss
* Capitalized directory names, changed the player/image directory to work
* like the rest, and forced the player/images directory to be created.
*
* 46 11/06/97 5:38p Hoffoss
* Added a new player image directory and added support for it.
*
* 45 11/04/97 7:46p Lawrance
* Add support for data\interface\HUD directory
*
* 44 10/29/97 6:22p Hoffoss
* Added some new file listing functions.
*
* 43 10/28/97 10:54a Lawrance
* support for 8b22k and 16b11k directories under the sound directory
*
* 42 10/14/97 11:34p Lawrance
* add function to get full path for a given filename
*
* 41 9/24/97 5:30p Lawrance
* add directory for voices
*
* 40 9/20/97 8:16a John
* Made .clr files go into the Cache directory. Replaced cfopen(name,NULL)
* to delete a file with cf_delete.
*
* 39 9/09/97 6:50p Hoffoss
* Fixed bug with mission saving.
*
* 38 9/05/97 4:52p Lawrance
* fix prototype for cfread_angles() and cfwrite_angles()
*
* 37 8/29/97 4:47p Dave
* Added an extension for state transfer status files.
*
* 36 8/21/97 12:14p Dave
* Changed demo file extension from .keg to .fsd
*
* 35 8/19/97 5:51p Hoffoss
* Fixes to cfopen to not check the default directory first, but check it
* last. Also tracks info as to where a file is located when opened.
*
* 34 8/17/97 10:22p Hoffoss
* Fixed several bugs in Fred with Undo feature. In the process, recoded
* a lot of CFile.cpp.
*
* 33 8/17/97 12:47p Hoffoss
* Changed code so I can force missions to load from the missions
* directory regardless of it's extension.
*
* 32 8/13/97 1:39p Adam
* make .ani files available in the data/effects directory
*
* 31 8/13/97 12:24p Lawrance
* Add support for effects directory
*
* 30 7/30/97 5:23p Dave
* Added file extensions for demo stuff
*
* 29 7/28/97 10:42p Lawrance
* added ctmpfile(), analog to tmpfile()
*
* 28 7/16/97 5:29p John
* added palette table caching and made scaler and liner no light tmapper
* do alpha blending in 8 bpp mode.
*
* 27 6/05/97 4:53p John
* First rev of new antialiased font stuff.
*
* 26 6/05/97 1:22p Allender
* added .ntl as an extension for nettest program
*
* 25 4/25/97 11:31a Allender
* Campaign state now saved in campaign save file in player directory.
* Made some global variables follow naming convention. Solidified
* continuing campaigns based on new structure
*
* 24 4/17/97 9:01p Allender
* start of campaign stuff. Campaigns now stored in external file (no
* filenames in code). Continuing campaign won't work at this point
*
* 23 4/03/97 4:26p Lawrance
* adding .wav search to music directory
*
* 22 4/01/97 9:26a Allender
* added support for descent style fonts although they are not used in the
* game yet
*
* 21 3/04/97 8:17a John
* Fixed movie code to not require a file handle. Used CFILE instead.
* Took cfile_get_handle or whatever out.
*
* 20 3/03/97 8:57a Lawrance
* took out cf_returnfp()
*
* 19 3/01/97 2:09p Lawrance
* supporting memory mapped files, moved cfile implementation details into
* .cpp file
*
* 18 2/17/97 3:00p Lawrance
* added .ani type to MAPS_EXT and INTERFACE_EXT
*
* 17 2/07/97 9:00a Lawrance
* added cfread_uint() and cwrite_uint()
*
* 16 2/04/97 9:29a Allender
* added cfwrite* functions
*
* 15 1/22/97 10:48a Lawrance
* supporting AVI playback
*
* 14 12/23/96 10:56a John
* Totally restructured the POF stuff to support multiple
* detail levels in one POF file.
*
*
* 13 11/20/96 10:00a Hoffoss
* Added cfile_chdir() function.
*
* 12 11/13/96 10:14a Allender
* added small routines to read basic data types. Also changed code to
* try to find extensions in more than 1 directory.
*
* 11 11/11/96 3:21p Allender
* added extension for movies
*
* $NoKeywords: $
*/
#ifndef __CFILE_H__
#define __CFILE_H__
#include <time.h>
#include "pstypes.h"
#define CF_EOF (-1)
#define CF_SEEK_SET (0)
#define CF_SEEK_CUR (1)
#define CF_SEEK_END (2)
typedef struct CFILE {
int id; // Index into cfile.cpp specific structure
int version; // version of this file
} CFILE;
// extra info that can be returned when getting a file listing
typedef struct {
time_t write_time;
} file_list_info;
#define CF_MAX_FILENAME_LENGTH 32 // Includes null terminater, so real length is 31
#define CF_MAX_PATHNAME_LENGTH 256 // Includes null terminater, so real length is 255
#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_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_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_PLAYER_MAIN 24
#define CF_TYPE_PLAYER_IMAGES_MAIN 25
#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_CACHE 30
#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_INTEL_ANIMS 35
#define CF_MAX_PATH_TYPES 36 // Can be as high as you'd like
// TRUE if type is specified and valid
#define CF_TYPE_SPECIFIED(path_type) (((path_type)>CF_TYPE_INVALID) && ((path_type)<CF_MAX_PATH_TYPES))
// #define's for the type parameter in cfopen.
#define CFILE_NORMAL 0 // open file normally
#define CFILE_MEMORY_MAPPED (1<<0) // open file as a memory-mapped file
#define CF_SORT_NONE 0
#define CF_SORT_NAME 1
#define CF_SORT_TIME 2
#define cfread_fix(file) (fix)cfread_int(file)
#define cfwrite_fix(i,file) cfwrite_int(i,file)
// callback function used for get_file_list() to filter files to be added to list. Return 1
// to add file to list, or 0 to not add it.
extern int (*Get_file_list_filter)(char *filename);
// cfile directory. valid after cfile_init() returns successfully
#define CFILE_ROOT_DIRECTORY_LEN 256
extern char Cfile_root_dir[CFILE_ROOT_DIRECTORY_LEN];
//================= LOW-LEVEL FUNCTIONS ==================
// Call this once at the beginning of the program
int cfile_init(char *exe_dir,char *cdrom_dir=NULL);
// Call this if pack files got added or removed or the
// cdrom changed. This will refresh the list of filenames
// stored in packfiles and on the cdrom.
void cfile_refresh();
// add an extension to a filename if it doesn't already have it
char *cf_add_ext(char *filename, char *ext);
// return CF_TYPE (directory location type) of a CFILE you called cfopen() successfully on.
int cf_get_dir_type(CFILE *cfile);
// Opens the file. If no path is given, use the extension to look into the
// default path. If mode is NULL, delete the file.
CFILE *cfopen(char *filename, char *mode, int type = CFILE_NORMAL, int dir_type = CF_TYPE_ANY, bool localize = false);
// Flush the open file buffer
int cflush(CFILE *cfile);
// version number of opened file. Will be 0 unless you put something else here after you
// 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 );
// Same as _access function to read a file's access bits
int cf_access( char *filename, int dir_type, int mode );
// Returns 1 if file exists, 0 if not.
int cf_exist( char *filename, int dir_type );
// ctmpfile() opens a temporary file stream. File is deleted automatically when closed
CFILE *ctmpfile();
// Closes the file
int cfclose(CFILE *cfile);
// Returns size of file...
int cfilelength(CFILE *fp);
// Reads data
int cfread(void *buf, int elsize, int nelem, CFILE *fp);
// cfwrite() writes to the file
int cfwrite(void *buf, int elsize, int nelem, CFILE *cfile);
// Reads/writes RLE compressed data.
int cfread_compressed(void *buf, int elsize, int nelem, CFILE *cfile);
int cfwrite_compressed(void *param_buf, int param_elsize, int param_nelem, CFILE *cfile);
// Moves the file pointer
int cfseek(CFILE *fp, int offset, int where);
// Returns current position of file.
int cftell(CFILE *fp);
// cfputc() writes a character to a file
int cfputc(int c, CFILE *cfile);
// cfputs() writes a string to a file
int cfputs(char *str, CFILE *cfile);
// cfgetc() reads a character to a file
int cfgetc(CFILE *cfile);
// cfgets() reads a string from a file
char *cfgets(char *buf, int n, CFILE *cfile);
// cfeof() Tests for end-of-file on a stream
int cfeof(CFILE *cfile);
// Return the data pointer associated with the CFILE structure (for memory mapped files)
void *cf_returndata(CFILE *cfile);
// get the 2 byte checksum of the passed filename - return 0 if operation failed, 1 if succeeded
int cf_chksum_short(char *filename, ushort *chksum, int max_size = -1, int cf_type = CF_TYPE_ANY );
// get the 2 byte checksum of the passed file - return 0 if operation failed, 1 if succeeded
// NOTE : preserves current file position
int cf_chksum_short(CFILE *file, ushort *chksum, int max_size = -1);
// get the 32 bit CRC checksum of the passed filename - return 0 if operation failed, 1 if succeeded
int cf_chksum_long(char *filename, uint *chksum, int max_size = -1, int cf_type = CF_TYPE_ANY );
// get the 32 bit CRC checksum of the passed file - return 0 if operation failed, 1 if succeeded
// NOTE : preserves current file position
int cf_chksum_long(CFILE *file, uint *chksum, int max_size = -1);
// convenient for misc checksumming purposes ------------------------------------------
// update cur_chksum with the chksum of the new_data of size new_data_size
ushort cf_add_chksum_short(ushort seed, char *buffer, int size);
// update cur_chksum with the chksum of the new_data of size new_data_size
unsigned long cf_add_chksum_long(unsigned long seed, char *buffer, int size);
// convenient for misc checksumming purposes ------------------------------------------
//================= HIGH LEVEL FUNCTIONS ==================
int cfexist(char *filename); // Returns true if file exists on disk (1) or in hog (2).
// rename a file, utilizing the extension to determine where file is.
#define CF_RENAME_SUCCESS 0 // successfully renamed the file
#define CF_RENAME_FAIL_ACCESS 1 // new name could not be created
#define CF_RENAME_FAIL_EXIST 2 // old name does not exist
int cf_rename(char *old_name, char *name, int type = CF_TYPE_ANY );
// changes the attributes of a file
void cf_attrib(char *name, int set, int clear, int type);
// flush (delete all files in) the passed directory (by type), return the # of files deleted
// NOTE : WILL NOT DELETE READ-ONLY FILES
int cfile_flush_dir(int type);
// functions for reading from cfile
// These are all high level, built up from
// cfread.
int cfgetc(CFILE *fp);
char *cfgets(char *buf, size_t n, CFILE *fp);
char cfread_char(CFILE *file, int ver = 0, char deflt = 0);
ubyte cfread_ubyte(CFILE *file, int ver = 0, ubyte deflt = 0);
short cfread_short(CFILE *file, int ver = 0, short deflt = 0);
ushort cfread_ushort(CFILE *file, int ver = 0, ushort deflt = 0);
int cfread_int(CFILE *file, int ver = 0, int deflt = 0);
uint cfread_uint(CFILE *file, int ver = 0, uint deflt = 0);
float cfread_float(CFILE *file, int ver = 0, float deflt = 0.0f);
void cfread_vector(vector *vec, CFILE *file, int ver = 0, vector *deflt = NULL);
void cfread_angles(angles *ang, CFILE *file, int ver = 0, angles *deflt = NULL);
// Reads variable length, null-termined string. Will only read up
// to n characters.
void cfread_string(char *buf,int n, CFILE *file);
// Read a fixed length that is null-terminatedm, and has the length
// stored in file
void cfread_string_len(char *buf,int n, CFILE *file);
// functions for writing cfiles
int cfwrite_char(char c, CFILE *file);
int cfwrite_float(float f, CFILE *file);
int cfwrite_int(int i, CFILE *file);
int cfwrite_uint(uint i, CFILE *file);
int cfwrite_short(short s, CFILE *file);
int cfwrite_ushort(ushort s, CFILE *file);
int cfwrite_ubyte(ubyte u, CFILE *file);
int cfwrite_vector(vector *vec, CFILE *file);
int cfwrite_angles(angles *ang, CFILE *file);
// writes variable length, null-termined string.
int cfwrite_string(char *buf, CFILE *file);
// write a fixed length that is null-terminatedm, and has the length
// stored in file
int cfwrite_string_len(char *buf, CFILE *file);
int cf_get_file_list( int max, char **list, int type, char *filter, int sort = CF_SORT_NONE, file_list_info *info = NULL );
int cf_get_file_list_preallocated( int max, char arr[][MAX_FILENAME_LEN], char **list, int type, char *filter, int sort = CF_SORT_NONE, file_list_info *info = NULL );
void cf_sort_filenames( int n, char **list, int sort, file_list_info *info = NULL );
// Searches for a file. Follows all rules and precedence and searches
// CD's and pack files.
// Input: filespace - Filename & extension
// pathtype - See CF_TYPE_ defines in CFILE.H
// Output: pack_filename - Absolute path and filename of this file. Could be a packfile or the actual file.
// size - File size
// offset - Offset into pack file. 0 if not a packfile.
// Returns: If not found returns 0.
int cf_find_file_location( char *filespec, int pathtype, char *pack_filename, int *size, int *offset, bool localize = false);
// Functions to change directories
int cfile_chdir(char *dir);
int cfile_chdrive(int DriveNum, int flag);
// push current directory on a 'stack' (so we can restore it) and change the directory
int cfile_push_chdir(int type);
// restore directory on top of the stack
int cfile_pop_dir();
#endif /* __CFILE_H__ */
-281
View File
@@ -1,281 +0,0 @@
/*
* 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/CFile/CfileArchive.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* 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 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 4 2/22/99 10:31p Andsager
* Get rid of unneeded includes.
*
* 3 1/06/99 2:24p Dave
* Stubs and release build fixes.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 12 5/14/98 8:10p Lawrance
* Fix bug with trying to read past the end of a file (when from a
* packfile).
*
* 11 5/11/98 11:48a John
* fixed bug with memory mapped files
*
* 10 5/11/98 10:59a John
* added in debug code
*
* 9 5/11/98 10:59a John
* Moved the low-level file reading code into cfilearchive.cpp.
*
* 8 4/30/98 4:53p John
* Restructured and cleaned up cfile code. Added capability to read off
* of CD-ROM drive and out of multiple pack files.
*
* 7 4/20/98 11:49a Hoffoss
* Fixed bug with directory name getting.
*
* 6 4/10/98 12:18a Hoffoss
* Make pilot image search in pack file possible.
*
* 5 1/19/98 9:37p Allender
* Great Compiler Warning Purge of Jan, 1998. Used pragma's in a couple
* of places since I was unsure of what to do with code.
*
* 4 12/30/97 5:31p Lawrance
* fixed problem for people that didn't have a VP file
*
* 3 12/30/97 4:31p Sandeep
* Changed pakfile format
*
* 2 12/28/97 12:42p John
* Put in support for reading archive files; Made missionload use the
* cf_get_file_list function. Moved demos directory out of data tree.
*
* 1 12/28/97 11:48a John
*
* $NoKeywords: $
*/
#define _CFILE_INTERNAL
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <io.h>
#include <direct.h>
#include <windows.h>
#include <winbase.h> /* needed for memory mapping of file functions */
#include "pstypes.h"
#include "cfile.h"
//#include "outwnd.h"
//#include "vecmat.h"
//#include "timer.h"
#include "cfilearchive.h"
#define CHECK_POSITION
// Called once to setup the low-level reading code.
void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size )
{
Assert(cfile != NULL);
Cfile_block *cb;
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
cb = &Cfile_block_list[cfile->id];
cb->lib_offset = offset;
cb->raw_position = 0;
cb->size = size;
if ( cb->fp ) {
if ( cb->lib_offset ) {
fseek( cb->fp, cb->lib_offset, SEEK_SET );
}
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int raw_position = ftell(cb->fp) - cb->lib_offset;
Assert(raw_position == cb->raw_position);
#endif
}
}
// cfeof() Tests for end-of-file on a stream
//
// returns a nonzero value after the first read operation that attempts to read
// past the end of the file. It returns 0 if the current position is not end of file.
// There is no error return.
int cfeof(CFILE *cfile)
{
Assert(cfile != NULL);
Cfile_block *cb;
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
cb = &Cfile_block_list[cfile->id];
int result;
result = 0;
// cfeof() not supported for memory-mapped files
Assert( !cb->data );
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);
#endif
if (cb->raw_position >= cb->size ) {
result = 1;
} else {
result = 0;
}
return result;
}
// cftell() returns offset into file
//
// returns: success ==> offset into the file
// error ==> -1
//
int cftell( CFILE * cfile )
{
Assert(cfile != NULL);
Cfile_block *cb;
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
cb = &Cfile_block_list[cfile->id];
// Doesn't work for memory mapped files
Assert( !cb->data );
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);
#endif
return cb->raw_position;
}
// cfseek() moves the file pointer
//
// returns: success ==> 0
// error ==> non-zero
//
int cfseek( CFILE *cfile, int offset, int where )
{
Assert(cfile != NULL);
Cfile_block *cb;
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
cb = &Cfile_block_list[cfile->id];
// TODO: seek to offset in memory mapped file
Assert( !cb->data );
Assert( cb->fp != NULL );
int goal_position;
switch( where ) {
case CF_SEEK_SET:
goal_position = offset+cb->lib_offset;
break;
case CF_SEEK_CUR:
{
goal_position = cb->raw_position+offset+cb->lib_offset;
}
break;
case CF_SEEK_END:
goal_position = cb->size+offset+cb->lib_offset;
break;
default:
Int3();
return 1;
}
int result = fseek(cb->fp, goal_position, SEEK_SET );
cb->raw_position = goal_position - cb->lib_offset;
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int tmp_offset = ftell(cb->fp) - cb->lib_offset;
Assert(tmp_offset==cb->raw_position);
#endif
return result;
}
// cfread() reads from a file
//
// returns: returns the number of full elements read
//
//
int cfread(void *buf, int elsize, int nelem, CFILE *cfile)
{
Assert(cfile != NULL);
Assert(buf != NULL);
Assert(cfile->id >= 0 && cfile->id < MAX_CFILE_BLOCKS);
Cfile_block *cb;
cb = &Cfile_block_list[cfile->id];
// cfread() not supported for memory-mapped files
Assert( !cb->data );
Assert(cb->fp != NULL);
int size = elsize*nelem;
Assert(nelem > 0);
Assert(elsize > 0);
Assert(size > 0);
if ( (cb->raw_position+size) > cb->size ) {
size = cb->size - cb->raw_position;
if ( size < 1 ) {
return 0;
}
//mprintf(( "CFILE: EOF encountered in file\n" ));
}
int bytes_read = fread( buf, 1, size, cb->fp );
if ( bytes_read > 0 ) {
cb->raw_position += bytes_read;
}
#if defined(CHECK_POSITION) && !defined(NDEBUG)
int tmp_offset = ftell(cb->fp) - cb->lib_offset;
Assert(tmp_offset==cb->raw_position);
#endif
return bytes_read / elsize;
}
-78
View File
@@ -1,78 +0,0 @@
/*
* 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/CFile/CfileArchive.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* External def's for CfileArchive.cpp. This should only be used
* internally by cfile stuff.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 4 5/11/98 10:59a John
* Moved the low-level file reading code into cfilearchive.cpp.
*
* 3 4/30/98 4:53p John
* Restructured and cleaned up cfile code. Added capability to read off
* of CD-ROM drive and out of multiple pack files.
*
* 2 12/28/97 12:42p John
* Put in support for reading archive files; Made missionload use the
* cf_get_file_list function. Moved demos directory out of data tree.
*
* 1 12/28/97 11:48a John
*
* $NoKeywords: $
*/
#ifndef _CFILEARCHIVE_H
#define _CFILEARCHIVE_H
#ifndef _CFILE_INTERNAL
#error This file should only be included internally in CFILE!!
#endif
// The following Cfile_block data is private to cfile.cpp
// DO NOT MOVE the Cfile_block* information to cfile.h / do not extern this data
//
#define CFILE_BLOCK_UNUSED 0
#define CFILE_BLOCK_USED 1
typedef struct Cfile_block {
int type; // CFILE_BLOCK_UNUSED, CFILE_BLOCK_USED
int dir_type; // directory location
FILE *fp; // File pointer if opening an individual file
void *data; // Pointer for memory-mapped file access. NULL if not mem-mapped.
HANDLE hInFile; // Handle from CreateFile()
HANDLE hMapFile; // Handle from CreateFileMapping()
int lib_offset;
int raw_position;
int size; // for packed files
} Cfile_block;
#define MAX_CFILE_BLOCKS 64
extern Cfile_block Cfile_block_list[MAX_CFILE_BLOCKS];
extern CFILE Cfile_list[MAX_CFILE_BLOCKS];
// Called once to setup the low-level reading code.
void cf_init_lowlevel_read_code( CFILE * cfile, int offset, int size );
#endif
-487
View File
@@ -1,487 +0,0 @@
/*
* 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/CFile/CfileList.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Code for doing directory lists and sorts
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 2/22/99 10:31p Andsager
* Get rid of unneeded includes.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 6 5/13/98 10:22p John
* Added cfile functions to read/write rle compressed blocks of data.
* Made palman use it for .clr files. Made alphacolors calculate on the
* fly rather than caching to/from disk.
*
* 5 5/06/98 5:30p John
* Removed unused cfilearchiver. Removed/replaced some unused/little used
* graphics functions, namely gradient_h and _v and pixel_sp. Put in new
* DirectX header files and libs that fixed the Direct3D alpha blending
* problems.
*
* 4 4/30/98 4:53p John
* Restructured and cleaned up cfile code. Added capability to read off
* of CD-ROM drive and out of multiple pack files.
*
* 3 4/10/98 12:18a Hoffoss
* Make pilot image search in pack file possible.
*
* 2 3/30/98 10:36p Allender
* be sure to call _findclose() when done reading a file list
*
* 1 12/28/97 11:48a John
*
* $NoKeywords: $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <io.h>
#include <direct.h>
#include <windows.h>
#include <winbase.h> /* needed for memory mapping of file functions */
#include "pstypes.h"
#include "cfile.h"
//#include "outwnd.h"
//#include "vecmat.h"
//#include "timer.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
// sort = sorting method to use (one of the CF_SORT_* defines)
// info = extra info for each file. Only required if sorting by time, however if you
// have extra file info, you should pass it as well to get it sorted too (so an
// index into list is the same index for info for that file
void cf_sort_filenames( int n, char **list, int sort, file_list_info *info )
{
int i, j, incr;
char *t;
file_list_info tt;
if (sort == CF_SORT_NAME) {
incr = n / 2;
while (incr > 0) {
for (i=incr; i<n; i++) {
j = i - incr;
while (j >= 0) {
if (stricmp(list[j], list[j + incr]) > 0) {
t = list[j];
list[j] = list[j + incr];
list[j + incr] = t;
if (info) {
tt = info[j];
info[j] = info[j + incr];
info[j + incr] = tt;
}
j -= incr;
} else
break;
}
}
incr /= 2;
}
return;
} else if (sort == CF_SORT_TIME) {
Assert(info);
incr = n / 2;
while (incr > 0) {
for (i=incr; i<n; i++) {
j = i - incr;
while (j >= 0) {
if (info[j].write_time < info[j + incr].write_time) {
t = list[j];
list[j] = list[j + incr];
list[j + incr] = t;
tt = info[j];
info[j] = info[j + incr];
info[j + incr] = tt;
j -= incr;
} else
break;
}
}
incr /= 2;
}
return;
}
nprintf(("Error", "Unknown sorting method %d passed to cf_sort_filenames()\n", sort));
}
// cf_compress - Do Run Length Compression on a block of data. Targa format.
//
// Usage:
// out Buffer to write it out to
// in Buffer to compress
// bytecount Number of bytes input
int cf_compress(char *out, char *in, int bytecount )
{
int pixcount; // number of pixels in the current packet
char *inputpixel=NULL; // current input pixel position
char *matchpixel=NULL; // pixel value to match for a run
char *flagbyte=NULL; // location of last flag byte to set
int rlcount; // current count in r.l. string
int rlthresh; // minimum valid run length
char *copyloc; // location to begin copying at
// set the threshold -- the minimum valid run length
rlthresh = 2; // Require a 2 pixel span before rle'ing
// set the first pixel up
flagbyte = out; // place to put next flag if run
inputpixel = in;
pixcount = 1;
rlcount = 0;
copyloc = (char *)0;
// loop till data processing complete
do {
// if we have accumulated a 128-byte packet, process it
if ( pixcount == 129 ) {
*flagbyte = 127;
// set the run flag if this is a run
if ( rlcount >= rlthresh ) {
*flagbyte |= 0x80;
pixcount = 2;
}
// copy the data into place
++flagbyte;
memmove( flagbyte, copyloc, pixcount-1 );
flagbyte += pixcount-1;
pixcount = 1;
// set up for next packet
continue;
}
// if zeroth byte, handle as special case
if ( pixcount == 1 ) {
rlcount = 0;
copyloc = inputpixel; /* point to 1st guy in packet */
matchpixel = inputpixel; /* set pointer to pix to match */
pixcount = 2;
inputpixel += 1;
continue;
}
// assembling a packet -- look at next pixel
// current pixel == match pixel?
if ( *inputpixel == *matchpixel ) {
// establishing a run of enough length to
// save space by doing it
// -- write the non-run length packet
// -- start run-length packet
if ( ++rlcount == rlthresh ) {
// close a non-run packet
if ( pixcount > (rlcount+1) ) {
// write out length and do not set run flag
*flagbyte++ = (char)(pixcount - 2 - rlthresh);
memmove(flagbyte, copyloc, (pixcount-1-rlcount) );
flagbyte += (pixcount-1-rlcount);
copyloc = inputpixel;
pixcount = rlcount + 1;
}
}
} else {
// no match -- either break a run or continue without one
// if a run exists break it:
// write the bytes in the string (1+1)
// start the next string
if ( rlcount >= rlthresh ) {
*flagbyte++ = (char)(0x80 | rlcount);
memmove(flagbyte, copyloc, 1 );
flagbyte += 1;
pixcount = 1;
continue;
} else {
// not a match and currently not a run
// - save the current pixel
// - reset the run-length flag
rlcount = 0;
matchpixel = inputpixel;
}
}
pixcount++;
inputpixel += 1;
} while ( inputpixel < (in + bytecount));
// quit this buffer without loosing any data
if ( --pixcount >= 1 ) {
*flagbyte = (char)(pixcount - 1);
if ( rlcount >= rlthresh ) {
*flagbyte |= 0x80;
pixcount = 1;
}
// copy the data into place
++flagbyte;
memmove(flagbyte, copyloc, pixcount );
flagbyte += pixcount;
}
return(flagbyte-out);
}
// cf_decompress - Do Decompression on a run-length encoded block of data. Targa format.
//
// Usage:
// out Buffer to write it out to
// in Buffer to compress
// bytecount Number of bytes input
int cf_decompress(char *out, char *in )
{
int count;
char *param_out = out;
while(1) {
count = int(*in++);
int run_span = count & 0x80;
count &= (~0x80);
if ( count > 0 ) {
if ( run_span ) {
// RLE'd data
ubyte c = *in++;
memset( out, c, count );
out += count;
} else {
memmove( out, in, count );
in += count;
out += count;
}
}
}
return out - param_out;
}
// cfread() reads from a file and decompresses it
//
// returns: returns the number of full elements read
//
//
int cfread_compressed(void *buf, int elsize, int nelem, CFILE *cfile)
{
char *out = (char *)buf;
while(1) {
byte count;
if ( cfread( &count, 1, 1, cfile ) != 1 ) {
break;
}
int run_span = count & 0x80;
count &= (~0x80);
count++;
if ( count > 0 ) {
if ( run_span ) {
// RLE'd data
byte c;
if ( cfread( &c, 1, 1, cfile ) != 1 ) {
break;
}
memset( out, c, count );
} else {
if ( cfread( out, 1, count, cfile ) != count ) {
break;
}
}
out += count;
if ( out >= (char *)buf + (elsize*nelem)) {
break;
}
} else {
break;
}
}
return (out - (char *)buf)/elsize;
}
int cfwrite_compressed(void *param_buf, int param_elsize, int param_nelem, CFILE *cfile)
{
char *in = (char *)param_buf;
int bytecount = (param_elsize * param_nelem );
int pixcount; // number of pixels in the current packet
char *inputpixel=NULL; // current input pixel position
char *matchpixel=NULL; // pixel value to match for a run
int rlcount; // current count in r.l. string
int rlthresh; // minimum valid run length
char *copyloc; // location to begin copying at
// set the threshold -- the minimum valid run length
rlthresh = 2; // Require a 2 pixel span before rle'ing
// set the first pixel up
inputpixel = in;
pixcount = 1;
rlcount = 0;
copyloc = (char *)0;
// loop till data processing complete
do {
// if we have accumulated a 128-byte packet, process it
if ( pixcount == 129 ) {
ubyte code = 127;
// set the run flag if this is a run
if ( rlcount >= rlthresh ) {
code |= 0x80;
pixcount = 2;
}
cfwrite( &code, 1, 1, cfile );
// copy the data into place
cfwrite( copyloc, 1, pixcount-1, cfile );
pixcount = 1;
// set up for next packet
continue;
}
// if zeroth byte, handle as special case
if ( pixcount == 1 ) {
rlcount = 0;
copyloc = inputpixel; /* point to 1st guy in packet */
matchpixel = inputpixel; /* set pointer to pix to match */
pixcount = 2;
inputpixel += 1;
continue;
}
// assembling a packet -- look at next pixel
// current pixel == match pixel?
if ( *inputpixel == *matchpixel ) {
// establishing a run of enough length to
// save space by doing it
// -- write the non-run length packet
// -- start run-length packet
if ( ++rlcount == rlthresh ) {
// close a non-run packet
if ( pixcount > (rlcount+1) ) {
// write out length and do not set run flag
ubyte code = (ubyte)(pixcount - 2 - rlthresh);
cfwrite( &code, 1, 1, cfile );
cfwrite( copyloc, 1, (pixcount-1-rlcount), cfile );
copyloc = inputpixel;
pixcount = rlcount + 1;
}
}
} else {
// no match -- either break a run or continue without one
// if a run exists break it:
// write the bytes in the string (1+1)
// start the next string
if ( rlcount >= rlthresh ) {
ubyte code = (ubyte)(0x80 | rlcount);
cfwrite( &code, 1, 1, cfile );
cfwrite( copyloc, 1, 1, cfile );
pixcount = 1;
continue;
} else {
// not a match and currently not a run
// - save the current pixel
// - reset the run-length flag
rlcount = 0;
matchpixel = inputpixel;
}
}
pixcount++;
inputpixel += 1;
} while ( inputpixel < (in + bytecount));
// quit this buffer without loosing any data
if ( --pixcount >= 1 ) {
ubyte code = ubyte(pixcount - 1);
// set the run flag if this is a run
if ( rlcount >= rlthresh ) {
code |= 0x80;
pixcount = 1;
}
cfwrite( &code, 1, 1, cfile );
// copy the data into place
cfwrite( copyloc, 1, pixcount, cfile );
}
return param_nelem;
}
File diff suppressed because it is too large. Load diff
-75
View File
@@ -1,75 +0,0 @@
/*
* 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/CFile/CfileSystem.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* 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.
* This keeps a list of all the files in packfiles or on CD-rom
* and when you need a file you call one function which then searches
* all those locations, inherently enforcing precedence orders.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 10/13/98 9:19a Andsager
* Add localization support to cfile. Optional parameter with cfopen that
* looks for localized files.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 5 5/01/98 10:21a John
* Added code to find all pack files in all trees. Added code to create
* any directories that we write to.
*
* 4 4/30/98 10:21p John
* Added code to cleanup cfilesystem
*
* $NoKeywords: $
*/
#ifndef _CFILESYSTEM_H
#define _CFILESYSTEM_H
// Builds a list of all the files
void cf_build_secondary_filelist( char *cdrom_path );
void cf_free_secondary_filelist();
// Internal stuff
typedef struct cf_pathtype {
int index; // To verify that the CF_TYPE define is correctly indexed into this array
char *path; // Path relative to Freespace root, has ending backslash.
char *extensions; // Extensions used in this pathtype, separated by spaces
int parent_index; // Index of this directory's parent. Used for creating directories when writing.
} cf_pathtype;
// During cfile_init, verify that Pathtypes[n].index == n for each item
extern cf_pathtype Pathtypes[CF_MAX_PATH_TYPES];
// Returns the default storage path for files given a
// particular pathtype. In other words, the path to
// the unpacked, non-cd'd, stored on hard drive path.
// If filename isn't null it will also tack the filename
// on the end, creating a completely valid filename.
// Input: pathtype - CF_TYPE_??
// filename - optional, if set, tacks the filename onto end of path.
// Output: path - Fully qualified pathname.
void cf_create_default_path_string( char *path, int pathtype, char *filename=NULL, bool localize = false);
#endif //_CFILESYSTEM_H
@@ -1,282 +0,0 @@
/*
* 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/Cfilearchiver/CfileArchiver.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Program to create an archive file for use with cfile stuff
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/23/98 6:15p Dave
*
* $NoKeywords: $
*/
#include <stdlib.h>
#include <stdio.h>
#include <direct.h>
#include <io.h>
#include <string.h>
#include <conio.h>
unsigned int Total_size=16; // Start with size of header
unsigned int Num_files =0;
FILE * fp_out = NULL;
FILE * fp_out_hdr = NULL;
typedef struct vp_header {
char id[4];
int version;
int index_offset;
int num_files;
} vp_header;
//vp_header Vp_header;
char archive_dat[1024];
char archive_hdr[1024];
#define BLOCK_SIZE (1024*1024)
#define VERSION_NUMBER 2;
char tmp_data[BLOCK_SIZE]; // 1 MB
void write_header()
{
fseek(fp_out, 0, SEEK_SET);
fwrite("VPVP", 1, 4, fp_out);
int ver = VERSION_NUMBER;
fwrite(&ver, 1, 4, fp_out);
fwrite(&Total_size, 1, 4, fp_out);
fwrite(&Num_files, 1, 4, fp_out);
}
int write_index(char *hf, char *df)
{
FILE *h = fopen(hf, "rb");
if (!h) return 0;
FILE *d = fopen(df, "a+b");
if (!d) return 0;
for (unsigned int i=0;i<Num_files;i++) {
fread(tmp_data, 32+4+4+4, 1, h);
fwrite(tmp_data, 32+4+4+4, 1, d);
}
fclose(h);
fclose(d);
return 1;
}
void pack_file( char *filespec, char *filename, int filesize, time_t time_write )
{
char path[1024];
if ( strstr( filename, ".vp" )) {
// Don't pack yourself!!
return;
}
if ( strstr( filename, ".hdr" )) {
// Don't pack yourself!!
return;
}
if ( filesize == 0 ) {
// Don't pack 0 length files, screws up directory structure!
return;
}
memset( path, 0, sizeof(path));
strcpy( path, filename );
if ( strlen(filename)>31 ) {
printf( "Filename '%s' too long\n", filename );
exit(1);
}
fwrite( &Total_size, 1, 4, fp_out_hdr );
fwrite( &filesize, 1, 4, fp_out_hdr );
fwrite( &path, 1, 32, fp_out_hdr );
fwrite( &time_write, 1, sizeof(time_t), fp_out_hdr);
Total_size += filesize;
Num_files++;
printf( "Packing %s\\%s...", filespec, filename );
sprintf( path, "%s\\%s", filespec, filename );
FILE *fp = fopen( path, "rb" );
if ( fp == NULL ) {
printf( "Error opening '%s'\n", path );
exit(1);
}
int nbytes, nbytes_read=0;
do {
nbytes = fread( tmp_data, 1, BLOCK_SIZE, fp );
if ( nbytes > 0 ) {
fwrite( tmp_data, 1, nbytes, fp_out );
nbytes_read += nbytes;
}
} while( nbytes > 0 );
fclose(fp);
printf( " %d bytes\n", nbytes_read );
}
// This function adds a directory marker to the header file
void add_directory( char * dirname)
{
char path[256];
char *pathptr = path;
char *tmpptr;
strcpy(path, dirname);
fwrite(&Total_size, 1, 4, fp_out_hdr);
int i = 0;
fwrite(&i, 1, 4, fp_out_hdr);
// strip out any directories that this dir is a subdir of
while ((tmpptr = strchr(pathptr, '\\')) != NULL) {
pathptr = tmpptr+1;
}
fwrite(pathptr, 1, 32, fp_out_hdr);
fwrite(&i, 1, 4, fp_out_hdr); // timestamp = 0
Num_files++;
}
void pack_directory( char * filespec)
{
int find_handle;
_finddata_t find;
char tmp[512];
char tmp1[512];
/*
char dir_name[512];
char *last_slash;
last_slash = strrchr(filespec, '\\');
if ( last_slash ) {
strcpy(dir_name, last_slash+1);
} else {
strcpy(dir_name, filespec);
}
if ( !stricmp(dir_name, "voice") ) {
return;
}
*/
strcpy( tmp1, filespec );
add_directory(filespec);
strcat( tmp1, "\\*.*" );
printf( "In dir '%s'\n", tmp1 );
find_handle = _findfirst( tmp1, &find );
if( find_handle != -1 ) {
if ( find.attrib & _A_SUBDIR ) {
if (strcmp( "..", find.name) && strcmp( ".", find.name)) {
strcpy( tmp, filespec );
strcat( tmp, "\\" );
strcat( tmp, find.name );
pack_directory(tmp);
}
} else {
pack_file( filespec, find.name, find.size, find.time_write );
}
while( !_findnext( find_handle, &find ) ) {
if ( find.attrib & _A_SUBDIR ) {
if (strcmp( "..", find.name) && strcmp( ".", find.name)) {
strcpy( tmp, filespec );
strcat( tmp, "\\" );
strcat( tmp, find.name );
pack_directory(tmp);
}
} else {
pack_file( filespec, find.name, find.size, find.time_write );
}
}
}
add_directory("..");
}
int main(int argc, char *argv[] )
{
char archive[1024];
char *p;
if ( argc < 3 ) {
printf( "Usage: %s archive_name src_dir\n", argv[0] );
printf( "Example: %s freespace c:\\freespace\\data\n", argv[0] );
printf( "Creates an archive named freespace out of the\nfreespace data tree\n" );
printf( "Press any key to exit...\n" );
getch();
return 1;
}
strcpy( archive, argv[1] );
p = strchr( archive, '.' );
if (p) *p = 0; // remove extension
strcpy( archive_dat, archive );
strcat( archive_dat, ".vp" );
strcpy( archive_hdr, archive );
strcat( archive_hdr, ".hdr" );
fp_out = fopen( archive_dat, "wb" );
if ( !fp_out ) {
printf( "Couldn't open '%s'!\n", archive_dat );
printf( "Press any key to exit...\n" );
getch();
return 1;
}
fp_out_hdr = fopen( archive_hdr, "wb" );
if ( !fp_out_hdr ) {
printf( "Couldn't open '%s'!\n", archive_hdr );
printf( "Press any key to exit...\n" );
getch();
return 1;
}
write_header();
pack_directory( argv[2] );
write_header();
fclose(fp_out);
fclose(fp_out_hdr);
printf( "Data files written, appending index...\n" );
if (!write_index(archive_hdr, archive_dat)) {
printf("Error appending index!\n");
printf("Press any key to exit...\n");
getch();
return 1;
}
printf( "%d total KB.\n", Total_size/1024 );
return 0;
}
-595
View File
@@ -1,595 +0,0 @@
/*
* 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/Cmdline/cmdline.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 8 8/26/99 8:51p Dave
* Gave multiplayer TvT messaging a heavy dose of sanity. Cheat codes.
*
* 7 7/15/99 3:07p Dave
* 32 bit detection support. Mouse coord commandline.
*
* 6 7/13/99 1:15p Dave
* 32 bit support. Whee!
*
* 5 6/22/99 9:37p Dave
* Put in pof spewing.
*
* 4 1/12/99 5:45p Dave
* Moved weapon pipeline in multiplayer to almost exclusively client side.
* Very good results. Bandwidth goes down, playability goes up for crappy
* connections. Fixed object update problem for ship subsystems.
*
* 3 11/17/98 11:12a Dave
* Removed player identification by address. Now assign explicit id #'s.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 38 10/02/98 3:22p Allender
* fix up the -connect option and fix the -port option
*
* 37 9/15/98 4:04p Allender
* added back in the -ip_addr command line switch because it needs to be
* in the standalone server only executable
*
* 36 9/14/98 11:52a Allender
* don't use cfile
*
* 35 9/14/98 11:28a Allender
* support for server bashing of address when received from client. Added
* a cmdline.cfg file to process command line arguments from a file
*
* 34 9/08/98 2:20p Allender
* temporary code to force IP address to a specific value.
*
* 33 8/20/98 5:30p Dave
* Put in handy multiplayer logfile system. Now need to put in useful
* applications of it all over the code.
*
* 32 8/07/98 10:39a Allender
* fixed debug standalone problem where stats would continually get sent
* to tracker. more debug code to help find stats problem
*
* 31 7/24/98 11:14a Allender
* start of new command line options for version 1.04
*
* 30 5/21/98 1:50a Dave
* Remove obsolete command line functions. Reduce shield explosion packets
* drastically. Tweak PXO screen even more. Fix file xfer system so that
* we can guarantee file uniqueness.
*
* 29 5/18/98 9:10p Dave
* Put in many new PXO features. Fixed skill level bashing in multiplayer.
* Removed several old command line options. Put in network config files.
*
* 28 5/09/98 7:16p Dave
* Put in CD checking. Put in standalone host password. Made pilot into
* popup scrollable.
*
* 27 4/23/98 8:27p Allender
* basic support for cutscene playback. Into movie code in place. Tech
* room can view cutscenes stored in CDROM_dir variable
*
* 26 4/09/98 5:43p Dave
* Remove all command line processing from the demo. Began work fixing up
* the new multi host options screen.
*
* 25 4/02/98 11:40a Lawrance
* check for #ifdef DEMO instead of #ifdef DEMO_RELEASE
*
* 24 4/01/98 5:56p Dave
* Fixed a messaging bug which caused msg_all mode in multiplayer not to
* work. Compile out a host of multiplayer options not available in the
* demo.
*
* 23 3/14/98 2:48p Dave
* Cleaned up observer joining code. Put in support for file xfers to
* ingame joiners (observers or not). Revamped and reinstalled pseudo
* lag/loss system.
*
* 22 2/22/98 12:19p John
* Externalized some strings
*
* 21 1/31/98 4:32p Dave
* Put in new support for VMT player validation, game logging in and game
* logging out.
*
* 20 12/10/97 4:45p Dave
* Added in more detailed support for multiplayer packet lag/loss. Fixed
* some multiplayer stuff. Added some controls to the standalone.
*
* 19 12/09/97 6:14p Lawrance
* add -nomusic flag
*
* 18 12/01/97 5:10p Dave
* Fixed a syntax bug.
*
* 17 12/01/97 4:59p Dave
* Synchronized multiplayer debris objects. Put in pilot popup in main
* hall. Optimized simulated multiplayer lag module. Fixed a potential
* file_xfer bug.
*
* 16 11/28/97 7:04p Dave
* Emergency checkin due to big system crash.
*
* 15 11/28/97 5:06p Dave
* Put in facilities for simulating multiplayer lag.
*
* 14 11/24/97 5:42p Dave
* Fixed a file xfer buffer free/malloc problem. Lengthened command line
* switch string parse length.
*
* 13 11/12/97 4:39p Dave
* Put in multiplayer campaign support parsing, loading and saving. Made
* command-line variables better named. Changed some things on the initial
* pilot select screen.
*
* 12 11/11/97 4:54p Dave
* Put in support for single vs. multiplayer pilots. Put in initial player
* selection screen (no command line option yet). Started work on
* multiplayer campaign file save gaming.
*
* 11 11/11/97 11:55a Allender
* initialize network at beginning of application. create new call to set
* which network protocol to use
*
* 10 9/18/97 10:12p Dave
* Added -gimmemedals, which gives the current pilot all the medals in the
* game (debug)
*
* 9 9/18/97 9:20a Dave
* Minor modifications
*
* 8 9/15/97 11:40p Lawrance
* remove demo granularity switch
*
* 7 9/09/97 3:39p Sandeep
* warning level 4 bugs
*
* 6 9/03/97 5:03p Lawrance
* add support for -nosound command line parm
*
* 5 8/22/97 8:52a Dave
* Removed a return statement which would have broken the parser out too
* early.
*
* 4 8/21/97 4:55p Dave
* Added a switch for multiplayer chat streaming. Added a section for
* global command line vars.
*
* 3 8/06/97 2:26p Dave
* Made the command line parse more robust. Made it easier to add and
* process new command-line switches.
*
* 2 8/04/97 3:13p Dave
* Added command line functions. See cmdline.cpp for directions on adding
* new switches
*
* 1 8/04/97 9:58a Dave
*
* $NoKeywords: $
*/
#include <string.h>
#include <stdlib.h>
#include "cmdline.h"
#include "linklist.h"
#include "systemvars.h"
#include "multi.h"
#include "cfile.h"
// variables
class cmdline_parm {
public:
cmdline_parm *next, *prev;
char *name; // name of parameter, must start with '-' char
char *help; // help text for this parameter
char *args; // string value for parameter arguements (NULL if no arguements)
int name_found; // true if parameter on command line, otherwise false
cmdline_parm(char *name, char *help);
~cmdline_parm();
int found();
int get_int();
float get_float();
char *str();
};
// here are the command line parameters that we will be using for FreeSpace
cmdline_parm standalone_arg("-standalone", NULL);
cmdline_parm nosound_arg("-nosound", NULL);
cmdline_parm nomusic_arg("-nomusic", NULL);
cmdline_parm startgame_arg("-startgame", NULL);
cmdline_parm gamename_arg("-gamename", NULL);
cmdline_parm gamepassword_arg("-password", NULL);
cmdline_parm gameclosed_arg("-closed", NULL);
cmdline_parm gamerestricted_arg("-restricted", NULL);
cmdline_parm allowabove_arg("-allowabove", NULL);
cmdline_parm allowbelow_arg("-allowbelow", NULL);
cmdline_parm port_arg("-port", NULL);
cmdline_parm connect_arg("-connect", NULL);
cmdline_parm multilog_arg("-multilog", NULL);
cmdline_parm server_firing_arg("-oldfire", NULL);
cmdline_parm client_dodamage("-clientdamage", NULL);
cmdline_parm pof_spew("-pofspew", NULL);
cmdline_parm d3d_32bit("-32bit", NULL);
cmdline_parm mouse_coords("-coords", NULL);
cmdline_parm timeout("-timeout", NULL);
cmdline_parm d3d_window("-window", NULL);
int Cmdline_multi_stream_chat_to_file = 0;
int Cmdline_freespace_no_sound = 0;
int Cmdline_freespace_no_music = 0;
int Cmdline_gimme_all_medals = 0;
int Cmdline_use_last_pilot = 0;
int Cmdline_multi_protocol = -1;
int Cmdline_cd_check = 1;
int Cmdline_start_netgame = 0;
int Cmdline_closed_game = 0;
int Cmdline_restricted_game = 0;
int Cmdline_network_port = -1;
char *Cmdline_game_name = NULL;
char *Cmdline_game_password = NULL;
char *Cmdline_rank_above= NULL;
char *Cmdline_rank_below = NULL;
char *Cmdline_connect_addr = NULL;
int Cmdline_multi_log = 0;
int Cmdline_server_firing = 0;
int Cmdline_client_dodamage = 0;
int Cmdline_spew_pof_info = 0;
int Cmdline_force_32bit = 0;
int Cmdline_mouse_coords = 0;
int Cmdline_timeout = -1;
int Cmdline_window = 0;
static cmdline_parm Parm_list(NULL, NULL);
static int Parm_list_inited = 0;
// Return true if this character is an extra char (white space and quotes)
int is_extra_space(char ch)
{
return ((ch == ' ') || (ch == '\t') || (ch == 0x0a) || (ch == '\'') || (ch == '\"'));
}
// eliminates all leading and trailing extra chars from a string. Returns pointer passed in.
char *drop_extra_chars(char *str)
{
int s, e;
s = 0;
while (str[s] && is_extra_space(str[s]))
s++;
e = strlen(str) - 1;
while (e > s) {
if (!is_extra_space(str[e])){
break;
}
e--;
}
if (e > s){
memmove(str, str + s, e - s + 1);
}
str[e - s + 1] = 0;
return str;
}
// internal function - copy the value for a parameter agruement into the cmdline_parm arg field
void parm_stuff_args(cmdline_parm *parm, char *cmdline)
{
char buffer[1024];
memset(buffer, 0, 1024);
char *dest = buffer;
cmdline += strlen(parm->name);
while ((*cmdline != 0) && (*cmdline != '-')) {
*dest++ = *cmdline++;
}
drop_extra_chars(buffer);
// mwa 9/14/98 -- made it so that newer command line arguments found will overwrite
// the old arguments
// Assert(parm->args == NULL);
if ( parm->args != NULL ) {
delete( parm->args );
parm->args = NULL;
}
int size = strlen(buffer) + 1;
if (size > 0) {
parm->args = new char[size];
memset(parm->args, 0, size);
strcpy(parm->args, buffer);
}
}
// internal function - parse the command line, extracting parameter arguements if they exist
// cmdline - command line string passed to the application
void os_parse_parms(char *cmdline)
{
// locate command line parameters
cmdline_parm *parmp;
char *cmdline_offset;
for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) {
cmdline_offset = strstr(cmdline, parmp->name);
if (cmdline_offset) {
parmp->name_found = 1;
parm_stuff_args(parmp, cmdline_offset);
}
}
}
// validate the command line parameters. Display an error if an unrecognized parameter is located.
void os_validate_parms(char *cmdline)
{
cmdline_parm *parmp;
char seps[] = " ,\t\n";
char *token;
int parm_found;
token = strtok(cmdline, seps);
while(token != NULL) {
if (token[0] == '-') {
parm_found = 0;
for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) {
if (!stricmp(parmp->name, token)) {
parm_found = 1;
break;
}
}
if (parm_found == 0) {
Error(LOCATION,"Unrecogzined command line parameter %s", token);
}
}
token = strtok(NULL, seps);
}
}
// Call once to initialize the command line system
//
// cmdline - command line string passed to the application
void os_init_cmdline(char *cmdline)
{
FILE *fp;
// read the cmdline.cfg file from the data folder, and pass the command line arguments to
// the the parse_parms and validate_parms line. Read these first so anything actually on
// the command line will take precedence
fp = fopen("data\\cmdline.cfg", "rt");
// if the file exists, get a single line, and deal with it
if ( fp ) {
char buf[1024], *p;
fgets(buf, 1024, fp);
// replace the newline character with a NUL:
if ( (p = strrchr(buf, '\n')) != NULL ) {
*p = '\0';
}
os_parse_parms(buf);
os_validate_parms(buf);
fclose(fp);
}
os_parse_parms(cmdline);
os_validate_parms(cmdline);
}
// arg constructor
// name_ - name of the parameter, must start with '-' character
// help_ - help text for this parameter
cmdline_parm::cmdline_parm(char *name_, char *help_)
{
name = name_;
help = help_;
args = NULL;
name_found = 0;
if (Parm_list_inited == 0) {
list_init(&Parm_list);
Parm_list_inited = 1;
}
if (name != NULL) {
list_append(&Parm_list, this);
}
}
// destructor - frees any allocated memory
cmdline_parm::~cmdline_parm()
{
if (args) {
delete [] args;
args = NULL;
}
}
// returns - true if the parameter exists on the command line, otherwise false
int cmdline_parm::found()
{
return name_found;
}
// returns - the interger representation for the parameter arguement
int cmdline_parm::get_int()
{
Assert(args);
return atoi(args);
}
// returns - the float representation for the parameter arguement
float cmdline_parm::get_float()
{
Assert(args);
return (float)atof(args);
}
// returns - the string value for the parameter arguement
char *cmdline_parm::str()
{
Assert(args);
return args;
}
// external entry point into this modules
int parse_cmdline(char *cmdline)
{
os_init_cmdline(cmdline);
// is this a standalone server??
if (standalone_arg.found()) {
Is_standalone = 1;
}
// run with no sound
if ( nosound_arg.found() ) {
Cmdline_freespace_no_sound = 1;
}
// run with no music
if ( nomusic_arg.found() ) {
Cmdline_freespace_no_music = 1;
}
// should we start a network game
if ( startgame_arg.found() ) {
Cmdline_use_last_pilot = 1;
Cmdline_start_netgame = 1;
}
// closed network game
if ( gameclosed_arg.found() ) {
Cmdline_closed_game = 1;
}
// restircted network game
if ( gamerestricted_arg.found() ) {
Cmdline_restricted_game = 1;
}
// get the name of the network game
if ( gamename_arg.found() ) {
Cmdline_game_name = gamename_arg.str();
// be sure that this string fits in our limits
if ( strlen(Cmdline_game_name) > MAX_GAMENAME_LEN ) {
Cmdline_game_name[MAX_GAMENAME_LEN-1] = '\0';
}
}
// get the password for a pssword game
if ( gamepassword_arg.found() ) {
Cmdline_game_password = gamepassword_arg.str();
// be sure that this string fits in our limits
if ( strlen(Cmdline_game_name) > MAX_PASSWD_LEN ) {
Cmdline_game_name[MAX_PASSWD_LEN-1] = '\0';
}
}
// set the rank above/below arguments
if ( allowabove_arg.found() ) {
Cmdline_rank_above = allowabove_arg.str();
}
if ( allowbelow_arg.found() ) {
Cmdline_rank_below = allowbelow_arg.str();
}
// get the port number for games
if ( port_arg.found() ) {
Cmdline_network_port = port_arg.get_int();
}
// the connect argument specifies to join a game at this particular address
if ( connect_arg.found() ) {
Cmdline_use_last_pilot = 1;
Cmdline_connect_addr = connect_arg.str();
}
// see if the multilog flag was set
if ( multilog_arg.found() ){
Cmdline_multi_log = 1;
}
// maybe use old-school server-side firing
if (server_firing_arg.found() ){
Cmdline_server_firing = 1;
}
// maybe use old-school client damage
if(client_dodamage.found()){
Cmdline_client_dodamage = 1;
}
// spew pof info
if(pof_spew.found()){
Cmdline_spew_pof_info = 1;
}
// 32 bit
if(d3d_32bit.found()){
Cmdline_force_32bit = 1;
}
// mouse coords
if(mouse_coords.found()){
Cmdline_mouse_coords = 1;
}
// net timeout
if(timeout.found()){
Cmdline_timeout = timeout.get_int();
}
// d3d windowed
if(d3d_window.found()){
Cmdline_window = 1;
}
return 1;
}
-188
View File
@@ -1,188 +0,0 @@
/*
* 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/Cmdline/cmdline.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 8 8/26/99 8:51p Dave
* Gave multiplayer TvT messaging a heavy dose of sanity. Cheat codes.
*
* 7 7/15/99 3:07p Dave
* 32 bit detection support. Mouse coord commandline.
*
* 6 7/13/99 1:15p Dave
* 32 bit support. Whee!
*
* 5 6/22/99 9:37p Dave
* Put in pof spewing.
*
* 4 1/12/99 5:45p Dave
* Moved weapon pipeline in multiplayer to almost exclusively client side.
* Very good results. Bandwidth goes down, playability goes up for crappy
* connections. Fixed object update problem for ship subsystems.
*
* 3 11/17/98 11:12a Dave
* Removed player identification by address. Now assign explicit id #'s.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 27 9/15/98 4:04p Allender
* added back in the -ip_addr command line switch because it needs to be
* in the standalone server only executable
*
* 26 9/14/98 11:28a Allender
* support for server bashing of address when received from client. Added
* a cmdline.cfg file to process command line arguments from a file
*
* 25 9/08/98 2:20p Allender
* temporary code to force IP address to a specific value.
*
* 24 8/20/98 5:30p Dave
* Put in handy multiplayer logfile system. Now need to put in useful
* applications of it all over the code.
*
* 23 8/07/98 10:40a Allender
* new command line flags for starting netgames. Only starting currently
* works, and PXO isn't implemented yet
*
* 22 7/24/98 11:14a Allender
* start of new command line options for version 1.04
*
* 21 5/21/98 1:50a Dave
* Remove obsolete command line functions. Reduce shield explosion packets
* drastically. Tweak PXO screen even more. Fix file xfer system so that
* we can guarantee file uniqueness.
*
* 20 5/18/98 9:10p Dave
* Put in many new PXO features. Fixed skill level bashing in multiplayer.
* Removed several old command line options. Put in network config files.
*
* 19 5/09/98 7:16p Dave
* Put in CD checking. Put in standalone host password. Made pilot into
* popup scrollable.
*
* 18 4/23/98 8:27p Allender
* basic support for cutscene playback. Into movie code in place. Tech
* room can view cutscenes stored in CDROM_dir variable
*
* 17 3/14/98 2:48p Dave
* Cleaned up observer joining code. Put in support for file xfers to
* ingame joiners (observers or not). Revamped and reinstalled pseudo
* lag/loss system.
*
* 16 1/31/98 4:32p Dave
* Put in new support for VMT player validation, game logging in and game
* logging out.
*
* 15 12/10/97 4:45p Dave
* Added in more detailed support for multiplayer packet lag/loss. Fixed
* some multiplayer stuff. Added some controls to the standalone.
*
* 14 12/09/97 6:14p Lawrance
* add -nomusic flag
*
* 13 11/28/97 7:04p Dave
* Emergency checkin due to big system crash.
*
* 12 11/28/97 5:06p Dave
* Put in facilities for simulating multiplayer lag.
*
* 11 11/24/97 5:42p Dave
* Fixed a file xfer buffer free/malloc problem. Lengthened command line
* switch string parse length.
*
* 10 11/12/97 4:39p Dave
* Put in multiplayer campaign support parsing, loading and saving. Made
* command-line variables better named. Changed some things on the initial
* pilot select screen.
*
* 9 11/11/97 4:54p Dave
* Put in support for single vs. multiplayer pilots. Put in initial player
* selection screen (no command line option yet). Started work on
* multiplayer campaign file save gaming.
*
* 8 9/18/97 10:13p Dave
* Added -gimmemedals, which gives the current pilot all the medals in the
* game (debug)
*
* 7 9/18/97 9:20a Dave
* Minor modifications
*
* 6 9/15/97 11:40p Lawrance
* remove demo granularity switch
*
* 5 9/03/97 5:03p Lawrance
* add support for -nosound command line parm
*
* 4 8/21/97 4:55p Dave
* Added a switch for multiplayer chat streaming. Added a section for
* global command line vars.
*
* 3 8/06/97 2:26p Dave
* Made the command line parse more robust. Made it easier to add and
* process new command-line switches.
*
* 2 8/04/97 3:13p Dave
* Added command line functions. See cmdline.cpp for directions on adding
* new switches
*
* 1 8/04/97 9:58a Dave
*
* $NoKeywords: $
*/
#ifndef FS_CMDLINE_HEADER_FILE
#define FS_CMDLINE_HEADER_FILE
int parse_cmdline(char *cmdline);
// 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.
//
// Add any extern definitions here and put the actual variables inside of cmdline.cpp for ease of use
// Also, check to make sure anything you add doesn't break Fred or TestCode
extern int Cmdline_multi_stream_chat_to_file;
extern int Cmdline_freespace_no_sound;
extern int Cmdline_freespace_no_music;
extern int Cmdline_gimme_all_medals;
extern int Cmdline_use_last_pilot;
extern int Cmdline_cd_check;
extern int Cmdline_start_netgame;
extern int Cmdline_closed_game;
extern int Cmdline_restricted_game;
extern int Cmdline_network_port;
extern char *Cmdline_game_name;
extern char *Cmdline_game_password;
extern char *Cmdline_rank_above;
extern char *Cmdline_rank_below;
extern char *Cmdline_connect_addr;
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_window;
#endif
-489
View File
@@ -1,489 +0,0 @@
/*
* 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/CMeasure/CMeasure.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 5 9/05/99 11:25p Mikek
* Debug code (only on NDEBUG). Don't drop countermeasures if
* Ai_firing_enabled not set.
*
* 4 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 3 10/13/98 9:28a Dave
* Started neatening up freespace.h. Many variables renamed and
* reorganized. Added AlphaColors.[h,cpp]
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 44 4/29/98 9:36p Allender
* ingame join tweaks. added network message for countermeasures
*
* 43 4/13/98 5:11p Mike
* More improvement to countermeasure code.
*
* 42 4/13/98 2:14p Mike
* Countermeasure balance testing for Jim.
*
* 41 4/10/98 11:02p Mike
* Make countermeasures less effective against aspect seekers than against
* heat seekers.
* Make AI ships match bank with each other when attacking a faraway
* target.
* Make ships not do silly loop-de-loop sometimes when attacking a faraway
* target.
*
* 40 3/31/98 5:11p John
* Removed demo/save/restore. Made NDEBUG defined compile. Removed a
* bunch of debug stuff out of player file. Made model code be able to
* unload models and malloc out only however many models are needed.
*
* 39 3/17/98 3:49p John
* Turned off lighting on counter measures.
*
* 38 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 37 2/23/98 5:44p Johnson
* Resolve build error.
*
* 36 2/23/98 4:30p Mike
* Make homing missiles detonate after they pass up their target. Make
* countermeasures less effective.
*
* 35 2/09/98 8:04p Lawrance
* Add objnum to cmeasure struct, correctly set source_objnum
*
* 34 2/05/98 11:20p Lawrance
* save/restore countermeasure data
*
* 33 2/05/98 12:51a Mike
* Early asteroid stuff.
*
* 32 2/04/98 12:20p Mike
* Make countermeasures detonate in a smaller radius. Make all in radius,
* not just homing one, detonate.
*
* 31 1/29/98 11:48a John
* Added new counter measure rendering as model code. Made weapons be
* able to have impact explosion.
*
* 30 1/29/98 11:11a John
* Put in code to show dummy counter measure object.
*
* 29 1/23/98 5:06p John
* Took L out of vertex structure used B (blue) instead. Took all small
* fireballs out of fireball types and used particles instead. Fixed some
* debris explosion things. Restructured fireball code. Restructured
* some lighting code. Made dynamic lighting on by default. Made groups
* of lasers only cast one light. Made fireballs not cast light.
*
* 28 1/23/98 9:43a Mike
* Debug-C to disallow countermeasure firing.
* Fix bug in countermeasure tracking by aspect seekers.
*
* 27 1/20/98 9:47a Mike
* Suppress optimized compiler warnings.
* Some secondary weapon work.
*
* 26 1/16/98 11:43a Mike
* Fix countermeasures.
*
* 25 12/30/97 6:44p John
* Made g3_Draw_bitmap functions account for aspect of bitmap.
*
* 24 11/29/97 2:05p John
* made g3_draw_bitmap and g3_draw_rotated bitmap take w&h, not w/2 & h/2,
* like they used to incorrectly assume. Added code to model to read in
* thruster radius's.
*
* 23 10/27/97 3:24p Lawrance
* ensure countermeasures keep their initial velocity
*
* 22 9/14/97 4:50p Lawrance
* added some demo debugging code
*
* 21 9/04/97 5:09p Andsager
* implement physics using moment of inertia and mass (from BSPgen).
* Added to phys_info struct. Updated ship_info, polymodel structs.
* Updated weapon ($Mass and $Force) and ship ($Mass -> $Density) tables
*
* 20 8/20/97 11:09a Mike
* Make countermeasure lifetime based on skill level.
*
* 19 8/13/97 9:50p Allender
* split *_move into *_process_pre and *_process_post functions.
* process_pre functions called before object is moved. _process_post
* functions called after object is moved. Reordered code in ship_post
* and weapon_post for multiplayer
*
* 18 8/13/97 4:45p Allender
* fixed ship_fire_primary and fire_secondary to not take parameter for
* determining whether to count ammo or not. Fixed countermeasure firing
* for multiplayer
*
* 17 8/13/97 12:06p Lawrance
* supporting multiple types of fireball explosions
*
* 16 8/11/97 6:03p Mike
* Make ships with no shields not claim to have shields in target box.
*
* 15 8/08/97 4:29p Allender
* countermeasure stuff for multiplayer
*
* 14 7/31/97 5:55p John
* made so you pass flags to obj_create.
* Added new collision code that ignores any pairs that will never
* collide.
*
* 13 7/15/97 12:03p Andsager
* New physics stuff
*
* 12 7/11/97 11:54a John
* added rotated 3d bitmaps.
*
* 11 6/24/97 10:04a Allender
* major multiplayer improvements. Better sequencing before game.
* Dealing with weapon/fireball/counter measure objects between
* client/host.
*
* 10 6/24/97 12:38a Lawrance
* fix minor bug with cycling cmeasure
*
* 9 6/05/97 1:37a Lawrance
* change syntax of a snd_play()
*
* 8 5/22/97 5:45p Mike
* Better countermeasure firing, key off availability, specify in
* weapons.tbl
*
* 7 5/22/97 12:06p Lawrance
* include Sound.h for playing sound fx
*
* 6 5/22/97 12:04p Lawrance
* added soundhook for cmeasure cycle
*
* 5 5/15/97 5:05p Mike
* In the midst of changing subsystem targetnig from type-based to
* pointer-based.
* Also allowed you to view a target while dead.
*
* 4 5/14/97 4:08p Lawrance
* removing my_index from game arrays
*
* 3 5/14/97 10:50a Mike
* More countermeasure stuff.
*
* 2 5/12/97 5:58p Mike
* Add countermeasures.
*
* 1 5/12/97 2:23p Mike
*
* $NoKeywords: $
*/
#include "pstypes.h"
#include "systemvars.h"
#include "cmeasure.h"
#include "freespace.h"
#include "vecmat.h"
#include "2d.h"
#include "3d.h"
#include "model.h"
#include "physics.h"
#include "floating.h"
#include "model.h"
#include "ship.h"
#include "timer.h"
#include "fireballs.h"
#include "radar.h"
#include "missionparse.h" // For MAX_SPECIES_NAMES
#include "gamesnd.h"
#include "objectsnd.h"
#include "sound.h"
#include "staticrand.h"
cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
cmeasure Cmeasures[MAX_CMEASURES];
int Num_cmeasure_types = 0;
int Num_cmeasures = 0;
int Cmeasure_inited = 0;
int Cmeasures_homing_check = 0;
int Countermeasures_enabled = 1; // Debug, set to 0 means no one can fire countermeasures.
// This will get called at the start of each level.
void cmeasure_init()
{
int i;
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;
for (i=0; i<MAX_CMEASURES; i++ ) {
Cmeasures[i].subtype = CMEASURE_UNUSED;
}
}
void cmeasure_render(object * objp)
{
// JAS TODO: Replace with proper fireball
cmeasure *cmp;
cmeasure_info *cmip;
cmp = &Cmeasures[objp->instance];
cmip = &Cmeasure_info[cmp->subtype];
if ( cmp->subtype == CMEASURE_UNUSED ) {
Int3(); // Hey, what are we doing in here?
return;
}
// float size = -1.0f;
// vertex p;
// g3_rotate_vertex(&p, &objp->pos );
// if ( rand() > RAND_MAX/2 ) {
// gr_set_color( 255, 0, 0 );
// } else {
// gr_set_color( 255, 255, 255 );
// }
// g3_draw_sphere(&p, 100.0f );
if ( cmip->model_num > -1 ) {
model_clear_instance(cmip->model_num);
model_render(cmip->model_num, &objp->orient, &objp->pos, MR_NO_LIGHTING );
} else {
mprintf(( "Not rendering countermeasure because model_num is negative\n" ));
}
/*
// JAS TODO: Replace with proper fireball
int framenum = -1;
float size = -1.0f;
vertex p;
cmeasure *cmp;
fireball_data *fd;
cmp = &Cmeasures[objp->instance];
fd = &Fireball_data[FIREBALL_SHIP_EXPLODE1];
switch (cmp->subtype) {
case CMEASURE_UNUSED:
Int3(); // Hey, what are we doing in here?
break;
default:
framenum = (int) (fd->num_frames * Cmeasures[objp->instance].lifeleft*4) % fd->num_frames;
size = objp->radius;
break;
}
Assert(framenum != -1);
Assert(size != -1.0f);
gr_set_bitmap(fd->bitmap_id + framenum);
g3_rotate_vertex(&p, &objp->pos );
g3_draw_bitmap(&p, 0, size*0.5f, TMAP_FLAG_TEXTURED );
*/
}
void cmeasure_delete( object * objp )
{
int num;
num = objp->instance;
// Assert( Cmeasures[num].objnum == OBJ_INDEX(objp));
Cmeasures[num].subtype = CMEASURE_UNUSED;
Num_cmeasures--;
Assert( Num_cmeasures >= 0 );
}
// broke cmeasure_move into two functions -- process_pre and process_post (as was done with
// all *_move functions). Nothing to do for process_pre
void cmeasure_process_pre( object *objp, float frame_time)
{
}
void cmeasure_process_post(object * objp, float frame_time)
{
int num;
num = objp->instance;
// Assert( Cmeasures[num].objnum == objnum );
cmeasure *cmp = &Cmeasures[num];
if ( cmp->lifeleft >= 0.0f) {
cmp->lifeleft -= frame_time;
if ( cmp->lifeleft < 0.0f ) {
objp->flags |= OF_SHOULD_BE_DEAD;
// demo_do_flag_dead(OBJ_INDEX(objp));
}
}
}
float Skill_level_cmeasure_life_scale[NUM_SKILL_LEVELS] = {3.0f, 2.0f, 1.5f, 1.25f, 1.0f};
// creates one countermeasure. A ship fires 1 of these per launch. rand_val is used
// in multiplayer. If -1, then create a random number. If non-negative, use this
// number for static_rand functions
int cmeasure_create( object * source_obj, vector * pos, int cm_type, int rand_val )
{
int n, objnum, parent_objnum, arand;
object * obj;
ship *shipp;
cmeasure *cmp;
cmeasure_info *cmeasurep;
#ifndef NDEBUG
if (!Countermeasures_enabled || !Ai_firing_enabled)
return -1;
#endif
Cmeasures_homing_check = 2; // Tell homing code to scan everything for two frames. If only one frame, get sync problems due to objects being created at end of frame!
parent_objnum = OBJ_INDEX(source_obj);
Assert( source_obj->type == OBJ_SHIP );
Assert( source_obj->instance >= 0 && source_obj->instance < MAX_SHIPS );
shipp = &Ships[source_obj->instance];
if ( Num_cmeasures >= MAX_CMEASURES)
return -1;
for (n=0; n<MAX_CMEASURES; n++ )
if ( Cmeasures[n].subtype == CMEASURE_UNUSED)
break;
if ( n == MAX_CMEASURES)
return -1;
nprintf(("Network", "Cmeasure created by %s\n", Ships[source_obj->instance].ship_name));
cmp = &Cmeasures[n];
cmeasurep = &Cmeasure_info[cm_type];
if ( pos == NULL )
pos = &source_obj->pos;
objnum = obj_create( OBJ_CMEASURE, parent_objnum, n, &source_obj->orient, pos, 1.0f, OF_RENDERS | OF_PHYSICS );
Assert( objnum >= 0 && objnum < MAX_OBJECTS );
// Create Debris piece n!
if ( rand_val == -1 )
arand = myrand(); // use a random number to get lifeleft, and random vector for displacement from ship
else
arand = rand_val;
cmp->lifeleft = static_randf(arand) * (cmeasurep->life_max - cmeasurep->life_min) / cmeasurep->life_min;
if (source_obj->flags & OF_PLAYER_SHIP){
cmp->lifeleft *= Skill_level_cmeasure_life_scale[Game_skill_level];
}
cmp->lifeleft = cmeasurep->life_min + cmp->lifeleft * (cmeasurep->life_max - cmeasurep->life_min);
// cmp->objnum = objnum;
cmp->team = shipp->team;
cmp->subtype = cm_type;
cmp->objnum = objnum;
cmp->source_objnum = parent_objnum;
cmp->source_sig = Objects[objnum].signature;
cmp->flags = 0;
nprintf(("Jim", "Frame %i: Launching countermeasure #%i\n", Framecount, Objects[objnum].signature));
obj = &Objects[objnum];
Num_cmeasures++;
vector vel, rand_vec;
vm_vec_scale_add(&vel, &source_obj->phys_info.vel, &source_obj->orient.fvec, -25.0f);
static_randvec(arand+1, &rand_vec);
vm_vec_scale_add2(&vel, &rand_vec, 2.0f);
obj->phys_info.vel = vel;
vm_vec_zero(&obj->phys_info.rotvel);
// blow out his reverse thrusters. Or drag, same thing.
obj->phys_info.rotdamp = 10000.0f;
obj->phys_info.side_slip_time_const = 10000.0f;
vm_vec_zero(&obj->phys_info.max_vel); // make so he can't turn on his own VOLITION anymore.
obj->phys_info.max_vel.z = -25.0f;
vm_vec_copy_scale(&obj->phys_info.desired_vel, &obj->orient.fvec, obj->phys_info.max_vel.z );
vm_vec_zero(&obj->phys_info.max_rotvel); // make so he can't change speed on his own VOLITION anymore.
// obj->phys_info.flags |= PF_USE_VEL;
return arand; // need to return this value for multiplayer purposes
}
void cmeasure_select_next(object *objp)
{
ship *shipp;
Assert(objp->type == OBJ_SHIP);
shipp = &Ships[objp->instance];
shipp->current_cmeasure++;
if (shipp->current_cmeasure >= Num_cmeasure_types)
shipp->current_cmeasure = 0;
//snd_play( &Snds[SND_CMEASURE_CYCLE] );
mprintf(("Countermeasure type set to %i in frame %i\n", shipp->current_cmeasure, Framecount));
}
-170
View File
@@ -1,170 +0,0 @@
/*
* 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/CMeasure/CMeasure.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Counter measures. Created by Mike Kulas, May 12, 1997.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 20 4/11/98 5:17p Jim
* Reduced countermeasure firing rate from 2 times per second to 3 times
* per second.
*
* 19 4/10/98 11:02p Mike
* Make countermeasures less effective against aspect seekers than against
* heat seekers.
* Make AI ships match bank with each other when attacking a faraway
* target.
* Make ships not do silly loop-de-loop sometimes when attacking a faraway
* target.
*
* 18 4/01/98 5:34p John
* Made only the used POFs page in for a level. Reduced some interp
* arrays. Made custom detail level work differently.
*
* 17 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 16 2/23/98 4:30p Mike
* Make homing missiles detonate after they pass up their target. Make
* countermeasures less effective.
*
* 15 2/09/98 8:04p Lawrance
* Add objnum to cmeasure struct, correctly set source_objnum
*
* 14 2/05/98 11:20p Lawrance
* save/restore countermeasure data
*
* 13 1/29/98 11:48a John
* Added new counter measure rendering as model code. Made weapons be
* able to have impact explosion.
*
* 12 1/16/98 11:43a Mike
* Fix countermeasures.
*
* 11 8/13/97 9:50p Allender
* split *_move into *_process_pre and *_process_post functions.
* process_pre functions called before object is moved. _process_post
* functions called after object is moved. Reordered code in ship_post
* and weapon_post for multiplayer
*
* 10 8/13/97 4:45p Allender
* fixed ship_fire_primary and fire_secondary to not take parameter for
* determining whether to count ammo or not. Fixed countermeasure firing
* for multiplayer
*
* 9 8/08/97 4:29p Allender
* countermeasure stuff for multiplayer
*
* 8 7/09/97 12:04a Mike
* Error prevention in matrix_interpolate().
*
* 7 6/24/97 10:04a Allender
* major multiplayer improvements. Better sequencing before game.
* Dealing with weapon/fireball/counter measure objects between
* client/host.
*
* 6 5/22/97 5:45p Mike
* Better countermeasure firing, key off availability, specify in
* weapons.tbl
*
* 5 5/15/97 5:05p Mike
* In the midst of changing subsystem targetnig from type-based to
* pointer-based.
* Also allowed you to view a target while dead.
*
* 4 5/14/97 4:08p Lawrance
* removing my_index from game arrays
*
* 3 5/14/97 10:50a Mike
* More countermeasure stuff.
*
* 2 5/12/97 5:58p Mike
* Add countermeasures.
*
* 1 5/12/97 2:23p Mike
*
* $NoKeywords: $
*/
#ifndef _CMEASURE_H
#define _CMEASURE_H
#include "parselo.h"
#include "object.h"
#define MAX_CMEASURES 64
// Goes in cmeasure.subtype
#define CMEASURE_UNUSED -1
#define MAX_CMEASURE_TYPES 3
#define CMEASURE_WAIT 333 // delay in milliseconds between countermeasure firing.
#define CMF_DUD_HEAT 0x01 // If set, this cmeasure is a dud to heat seekers. Set at create time.
#define CMF_DUD_ASPECT 0x02 // If set, this cmeasure is a dud to aspect seekers. Set at create time.
#define CMF_DUD (CMF_DUD_HEAT | CMF_DUD_ASPECT)
// Maximum distance at which a countermeasure can be tracked
// If this value is too large, missiles will always be tracking countermeasures.
#define MAX_CMEASURE_TRACK_DIST 300.0f
typedef struct cmeasure_info {
char cmeasure_name[NAME_LENGTH];
float max_speed; // launch speed, relative to ship
float fire_wait; // time between launches
float life_min, life_max; // lifetime will be in range min..max.
int launch_sound; // Sound played when launched.
char pof_name[NAME_LENGTH];
int model_num; // What this renders as
} cmeasure_info;
typedef struct cmeasure {
int flags; // You know, flag type things.
int subtype; // See CMEASURE_??? defines
int objnum;
int source_objnum; // What object this came from
int source_sig; // Signature of the source object
int team; // Team of the ship where the cmeasure came from
float lifeleft; // When 0 or less object dies
} cmeasure;
extern cmeasure_info Cmeasure_info[MAX_CMEASURE_TYPES];
extern cmeasure Cmeasures[MAX_CMEASURES];
extern int Num_cmeasure_types;
extern int Num_cmeasures;
extern int Cmeasures_homing_check;
extern void cmeasure_init();
extern void cmeasure_render( object * obj );
extern void cmeasure_delete( object * obj );
extern void cmeasure_process_pre( object * obj, float frame_time);
extern void cmeasure_process_post( object * obj, float frame_time);
extern int cmeasure_create( object * source_obj, vector *pos, int cm_type, int rand_val = -1 );
extern void cmeasure_select_next(object *objp);
#endif // _CMEASURE_H
File diff suppressed because it is too large. Load diff
@@ -1,489 +0,0 @@
/*
* 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/ControlConfig/ControlsConfig.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Header file for keyboard, joystick and mouse configuration
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 6 8/22/99 5:53p Dave
* Scoring fixes. Added self destruct key. Put callsigns in the logfile
* instead of ship designations for multiplayer players.
*
* 5 8/19/99 10:59a Dave
* Packet loss detection.
*
* 4 8/01/99 12:39p Dave
* Added HUD contrast control key (for nebula).
*
* 3 11/05/98 4:18p Dave
* First run nebula support. Beefed up localization a bit. Removed all
* conditional compiles for foreign versions. Modified mission file
* format.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 26 6/13/98 5:19p Hoffoss
* externalized control config texts.
*
* 25 5/15/98 8:37p Lawrance
* Add 'equalize recharge rates' and 'target ship that sent last
* transmission' key bindings
*
* 24 5/14/98 5:32p Hoffoss
* Improved axis binding code some more.
*
* 23 5/13/98 7:15p Hoffoss
* Fixed remaining bugs with axis binding.
*
* 22 5/13/98 1:17a Hoffoss
* Added joystick axes configurability.
*
* 21 4/30/98 9:43p Hoffoss
* Added new actions for free look movement which are default bounded to
* the hat.
*
* 20 4/25/98 1:59p Lawrance
* fix merge typo
*
* 19 4/25/98 1:24p Lawrance
* Add time compression keys to key config
*
* 18 4/25/98 12:43p Allender
* added new shortcut key for attack my subsystem
*
* 17 4/18/98 5:00p Dave
* Put in observer zoom key. Made mission sync screen more informative.
*
* 16 4/10/98 12:47p Allender
* changed working on replay popup. Don't reference repair in comm menu.
* Added Shift-R for repair me
*
* 15 4/08/98 11:11a Hoffoss
* Fixed some bugs that showed up due to fixing other bugs the other day
* with controls.
*
* 14 3/31/98 4:15p Hoffoss
* Disabled the show objectives action.
*
* 13 3/23/98 12:27p Hoffoss
* Whoops, changed order in list but forget to actually change the number.
*
* 12 3/23/98 11:35a Hoffoss
* Fixed #defines that were out of sync.
*
* 11 3/19/98 5:04p Dave
* Put in support for targeted multiplayer text and voice messaging (all,
* friendly, hostile, individual).
*
* 10 3/11/98 5:28p Hoffoss
* Added control config debug display info to possibly aid in tracking
* down a bug.
*
* 9 2/28/98 7:02p Lawrance
* overhaul on-line help
*
* 8 2/26/98 12:33a Lawrance
* Added back slew mode, lots of changes to external and chase views.
*
* 7 2/02/98 6:59p Lawrance
* Adding new targeting keys (bomb, uninspected cargo, new ship, live
* turrets).
*
* 6 1/30/98 10:40a Lawrance
* remove any binding references to hotkey screen
*
* 5 1/28/98 6:19p Dave
* Reduced standalone memory usage ~8 megs. Put in support for handling
* multiplayer submenu handling for endgame, etc.
*
* 4 1/22/98 4:53p Hoffoss
* Made training messages/directives display a joystick button in place of
* a keypress if there is no keypress bound to the action.
*
* 3 1/02/98 4:42p Allender
* removed unused key bindings from control config list
*
* 2 12/30/97 4:47p Allender
* work with ignore my target command. Added new keyboard hotkey. Made
* it work globally
*
* 1 12/24/97 11:59a Hoffoss
*
* 41 11/24/97 10:20p Lawrance
* Add key 'KEY_N' to target next ship on monitoring view
*
* 40 11/21/97 5:57p Hoffoss
* Fixed bug where timef type controls weren't checking joystick buttons.
*
* 39 11/20/97 1:08a Lawrance
* add support for 'R' key - target closest friendly repair ship
*
* 38 11/17/97 6:40p Lawrance
* Changed 'I' key to toggle of extended target info, moved target closest
* locked missile to 'L'
*
* 37 11/02/97 1:15p Hoffoss
* Externed an array I need elsewhere.
*
* 36 10/28/97 12:12a Lawrance
* remove unused keys (Alt-H and Alt-F)
*
* 35 10/24/97 11:00p Hoffoss
* Controls config screen much improved.
*
* 34 10/22/97 4:50p Hoffoss
* Disabled throttle by default.
*
* 33 10/21/97 7:05p Hoffoss
* Overhauled the key/joystick control structure and usage throughout the
* entire FreeSpace code. The whole system is very different now.
*
* 32 10/18/97 7:19p Hoffoss
* Added timestamp recording when a key is pressed.
*
* 31 9/14/97 10:24p Lawrance
* add damage screen popup window
*
* 30 9/10/97 6:02p Hoffoss
* Added code to check for key-pressed sexp operator in FreeSpace as part
* of training mission stuff.
*
* 29 9/09/97 9:18a Hoffoss
* Added message token translation (phase 1) to FreeSpace for training
* missions support.
*
* 28 8/31/97 6:38p Lawrance
* pass in frametime to do_frame loop
*
* 27 8/29/97 5:02p Sandeep
* fixed joystick support for shield config
*
* 26 8/25/97 12:24a Lawrance
* added keys for shield management
*
* 25 8/22/97 10:44p Sandeep
* Added Configurable support for energy management keys, keyboard and
* joystick
*
* 24 8/21/97 5:03p Sandeep
* Fixed joystick functions past "Target Closest Hostile Targeting Self"
* bug.
*
* 23 8/20/97 4:22p Sandeep
* Add support for joystick mapping to all keyboard configurable commands.
* Changed pilot file to allow support for new joystick, incompatible
* version 33
*
* 22 8/07/97 11:27p Lawrance
* add support for 4th joystick axis (rudder), add new option to roll ship
*
* 21 7/08/97 11:37a Lawrance
* add joystick support for afterburners
*
* 20 7/01/97 11:52a Lawrance
* add targeting key, allow player to clear all bindings
*
* 19 6/24/97 12:38a Lawrance
* added in some new joystick bindings
*
* 18 6/17/97 8:57p Lawrance
* added target previous hostile/friendly
*
* 17 6/03/97 1:39a Allender
* made macros for joystick button id's
*
* 16 5/28/97 9:53a Lawrance
* move goals keys and squadmate message key from function keys to
* assignable keys
*
* 15 5/26/97 5:49p Lawrance
* supporting max range on radar
*
* 14 5/26/97 3:31p Lawrance
* assign key bindings for view modes and view controls
*
* 13 5/14/97 10:50a Mike
* More countermeasure stuff.
*
* 12 4/24/97 2:40p Lawrance
* add key for targeting closest ship attacking self
*
* 11 4/05/97 3:46p Allender
* lots 'o messaging stuff. Make shortcut keys for squadmate messaging
* work. Make menus a little more dynamic
*
* 10 4/01/97 7:50p Lawrance
* added many new keys, don't allow Shft or Alt as action keys, only allow
* Ctrl as an action key
*
* 9 3/10/97 8:30a Lawrance
* changed -/+ 5% throttle keys to 1/3 2/3 throttle keys
*
* 8 12/18/96 6:09p Lawrance
* allowing shift+alt+ctrl modifiers on keyboard bindings
*
* 7 12/18/96 10:18a Lawrance
* integrating joystick axis configuration
*
* 6 12/17/96 11:10a Lawrance
* added targeting of subsystem in reticle
*
* 5 12/06/96 12:27a Lawrance
* adding support for joystick configuration
*
* 4 12/05/96 2:47p Lawrance
* changed how keyboard configuration was done to make code more easily
* changeable
*
* 3 12/03/96 10:11p Lawrance
* Integrating keyboard configuration
*
* 2 12/03/96 3:45p Lawrance
*
* $NoKeywords: $
*
*/
#ifndef CONTROLS_CONFIG_H
#define CONTROLS_CONFIG_H
#define CONTROL_CONFIG_XSTR 507
#define JOY_X_AXIS 0
#define JOY_Y_AXIS 1
#define JOY_Z_AXIS 2
#define JOY_RX_AXIS 3
#define JOY_RY_AXIS 4
#define JOY_RZ_AXIS 5
#define NUM_JOY_AXIS_ACTIONS 5
#define JOY_HEADING_AXIS 0
#define JOY_PITCH_AXIS 1
#define JOY_BANK_AXIS 2
#define JOY_ABS_THROTTLE_AXIS 3
#define JOY_REL_THROTTLE_AXIS 4
// --------------------------------------------------
// different types of controls that can be assigned
// --------------------------------------------------
#define CC_TYPE_TRIGGER 0
#define CC_TYPE_CONTINUOUS 1
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 *text; // describes the action in the config screen
char type; // manner control should be checked in
short key_id; // actual key bound to action
short joy_id; // joystick button bound to action
int used; // has control been used yet in mission? If so, this is the timestamp
} config_item;
// --------------------------------------------------
// Keyboard #defines for the actions
// This is the value of the id field in config_item
// --------------------------------------------------
// targeting a ship
#define TARGET_NEXT 0
#define TARGET_PREV 1
#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
// targeting a ship's subsystem
#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
// weapons
#define FIRE_PRIMARY 17
#define FIRE_SECONDARY 18
#define CYCLE_NEXT_PRIMARY 19
#define CYCLE_PREV_PRIMARY 20
#define CYCLE_SECONDARY 21
#define CYCLE_NUM_MISSLES 22
#define LAUNCH_COUNTERMEASURE 23
// controls
#define FORWARD_THRUST 24
#define REVERSE_THRUST 25
#define BANK_LEFT 26
#define BANK_RIGHT 27
#define PITCH_FORWARD 28
#define PITCH_BACK 29
#define YAW_LEFT 30
#define YAW_RIGHT 31
// throttle control
#define ZERO_THROTTLE 32
#define MAX_THROTTLE 33
#define ONE_THIRD_THROTTLE 34
#define TWO_THIRDS_THROTTLE 35
#define PLUS_5_PERCENT_THROTTLE 36
#define MINUS_5_PERCENT_THROTTLE 37
// squadmate messaging keys
#define ATTACK_MESSAGE 38
#define DISARM_MESSAGE 39
#define DISABLE_MESSAGE 40
#define ATTACK_SUBSYSTEM_MESSAGE 41
#define CAPTURE_MESSAGE 42
#define ENGAGE_MESSAGE 43
#define FORM_MESSAGE 44
#define IGNORE_MESSAGE 45
#define PROTECT_MESSAGE 46
#define COVER_MESSAGE 47
#define WARP_MESSAGE 48
#define REARM_MESSAGE 49
#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_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_RIGHT 62
#define RADAR_RANGE_CYCLE 63
#define SQUADMSG_MENU 64
#define SHOW_GOALS 65
#define END_MISSION 66
#define TARGET_TARGETS_TARGET 67
#define AFTERBURNER 68
#define INCREASE_WEAPON 69
#define DECREASE_WEAPON 70
#define INCREASE_SHIELD 71
#define DECREASE_SHIELD 72
#define INCREASE_ENGINE 73
#define DECREASE_ENGINE 74
#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_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 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_BOMB 95
#define TARGET_PREV_BOMB 96
// multiplayer messaging keys
#define MULTI_MESSAGE_ALL 97
#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 TIME_SPEED_UP 102
#define TIME_SLOW_DOWN 103
#define TOGGLE_HUD_CONTRAST 104
#define MULTI_TOGGLE_NETINFO 105
#define MULTI_SELF_DESTRUCT 106
// this should be the total number of control action defines above (or last define + 1)
#define CCFG_MAX 107
extern int Failed_key_index;
extern int Invert_heading;
extern int Invert_pitch;
extern int Invert_roll;
extern int Invert_thrust;
extern int Disable_axis2;
extern int Disable_axis3;
extern int Axis_map_to[];
extern int Invert_axis[];
extern int Invert_axis_defaults[];
extern config_item Control_config[]; // stores the keyboard configuration
extern char **Scan_code_text;
extern char **Joy_button_text;
// initialize common control config stuff - call at game startup after localization has been initialized
void control_config_common_init();
void control_config_init();
void control_config_do_frame(float frametime);
void control_config_close();
void control_config_cancel_exit();
void control_config_reset_defaults();
int translate_key_to_index(char *key);
char *translate_key(char *key);
char *textify_scancode(int code);
float check_control_timef(int id);
int check_control(int id, int key = -1);
void control_get_axes_readings(int *h, int *p, int *b, int *ta, int *tr);
void control_used(int id);
void control_config_clear();
void clear_key_binding(short key);
void control_check_indicate();
void control_config_clear_used_status();
#endif
@@ -1,867 +0,0 @@
/*
* 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/ControlConfig/ControlsConfigCommon.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* C module for keyboard, joystick and mouse configuration common stuff (between Fred and FreeSpace)
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 14 11/01/99 3:36p Jefff
* had scan code texts for y and z in german swapped
*
* 13 11/01/99 2:16p Jefff
* minor key name change in german
*
* 12 10/29/99 6:10p Jefff
* squashed the damned 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
* english table.
*
* 10 10/28/99 2:05a Jefff
* revised some german key names. changed some y/z switch stuff.
*
* 9 10/25/99 5:39p Jefff
* swap init binding for y and z keys in German builds
*
* 8 9/01/99 2:56p Jefff
* a few control key description changes
*
* 7 8/22/99 5:53p Dave
* Scoring fixes. Added self destruct key. Put callsigns in the logfile
* instead of ship designations for multiplayer players.
*
* 6 8/19/99 10:59a Dave
* Packet loss detection.
*
* 5 8/01/99 12:39p Dave
* Added HUD contrast control key (for nebula).
*
* 4 7/23/99 2:57p Andsager
* fix translate_key_to_index to work with localization
*
* 3 11/05/98 4:18p Dave
* First run nebula support. Beefed up localization a bit. Removed all
* conditional compiles for foreign versions. Modified mission file
* format.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 41 6/19/98 3:51p Lawrance
* localize control text
*
* 40 6/17/98 11:05a Lawrance
* localize the control config strings
*
* 39 5/24/98 2:28p Hoffoss
* Because we never really care about if the left or the right shift or
* alt key was used, but rather than either shift or alt was used, made
* both map to the left one. Solves some problems, causes none.
*
* 38 5/22/98 11:21a Hoffoss
* Added bank when pressed back in.
*
* 37 5/15/98 8:37p Lawrance
* Add 'equalize recharge rates' and 'target ship that sent last
* transmission' key bindings
*
* 36 5/13/98 7:15p Hoffoss
* Fixed remaining bugs with axis binding.
*
* 35 5/13/98 1:17a Hoffoss
* Added joystick axes configurability.
*
* 34 5/12/98 11:25a Hoffoss
* Disabled bank when pressed action.
*
* 33 5/09/98 10:48p Lawrance
* change text for view bindings
*
* 32 5/09/98 4:52p Lawrance
* Implement padlock view (up/rear/left/right)
*
* 31 4/30/98 9:43p Hoffoss
* Added new actions for free look movement which are default bounded to
* the hat.
*
* 30 4/25/98 1:25p Lawrance
* Add time compression keys to key config
*
* 29 4/25/98 12:43p Allender
* added new shortcut key for attack my subsystem
*
* 28 4/18/98 5:00p Dave
* Put in observer zoom key. Made mission sync screen more informative.
*
* 27 4/17/98 1:24a Lawrance
* fix spelling error
*
* 26 4/15/98 11:06a Lawrance
* fix bug with a multi key showing up in demo, remove obsolete bindings
* from demo and full version
*
* 25 4/10/98 12:47p Allender
* changed working on replay popup. Don't reference repair in comm menu.
* Added Shift-R for repair me
*
* 24 4/08/98 11:11a Hoffoss
* Fixed some bugs that showed up due to fixing other bugs the other day
* with controls.
*
* 23 4/07/98 4:06p Lawrance
* Change binding next for bomb targeting
*
* 22 4/07/98 1:52p Lawrance
* fix error in binding text for energy keys
*
* 21 4/06/98 11:17a Hoffoss
* Fixed num lock/pause interplay bug.
*
* 20 4/01/98 6:46p Lawrance
* change text for Alt+J
*
* 19 3/31/98 4:15p Hoffoss
* Disabled the show objectives action.
*
* 18 3/25/98 2:16p Dave
* Select random default image for newly created pilots. Fixed several
* multi-pause messaging bugs. Begin work on online help for multiplayer
* keys.
*
* 17 3/19/98 5:04p Dave
* Put in support for targeted multiplayer text and voice messaging (all,
* friendly, hostile, individual).
*
* 16 3/17/98 11:25a Hoffoss
* Fixed some of the action's names.
*
* 15 3/17/98 10:48a Hoffoss
* Allowed a special hack for "bank while pressed" action to use alt and
* shift keys standalone.
*
* 14 2/28/98 9:47p Lawrance
* change some binding text
*
* 13 2/28/98 7:02p Lawrance
* overhaul on-line help
*
* 12 2/26/98 12:33a Lawrance
* Added back slew mode, lots of changes to external and chase views.
*
* 11 2/23/98 11:25a Sandeep
* added default keys
*
* 10 2/22/98 6:27p Lawrance
* External mode takes precedence over chase mode. Fix bug with repair
* ships docking in chase mode.
*
* 9 2/22/98 12:19p John
* Externalized some strings
*
* 8 2/02/98 6:59p Lawrance
* Adding new targeting keys (bomb, uninspected cargo, new ship, live
* turrets).
*
* 7 1/27/98 4:24p Allender
* moved hotkey selection to F3 instead of X. Made palette flash
* disappear in multiplayer pause menu
*
* 6 1/22/98 4:53p Hoffoss
* Made training messages/directives display a joystick button in place of
* a keypress if there is no keypress bound to the action.
*
* 5 1/22/98 4:15p Hoffoss
* Added code to allow popup to tell player he needs to bind a key for the
* training mission.
*
* 4 1/02/98 4:42p Allender
* removed unused key bindings from control config list
*
* 3 12/30/97 4:47p Allender
* work with ignore my target command. Added new keyboard hotkey. Made
* it work globally
*
* 2 12/24/97 3:37p Hoffoss
* Moved control config stuff to seperate library to Fred can access it as
* well.
*
* 1 12/24/97 3:27p Hoffoss
*
* 1 12/24/97 11:58a Hoffoss
*
* 98 12/22/97 2:15p Hoffoss
* Fixed bug where joystick axis lines weren't being displayed.
*
* 97 12/16/97 2:44p Hoffoss
* Added clear button to control config screen.
*
* 96 12/12/97 3:07p Hoffoss
* Changed how deleting bindings work. Each control of an action can be
* deleted independently or both at once.
*
* 95 12/07/97 2:36p John
* Made warp out be Alt+J instead of J
*
* 94 12/03/97 4:59p Hoffoss
* Added reset sound and change control config sounds around.
*
* 93 12/03/97 4:16p Hoffoss
* Changed sound stuff used in interface screens for interface purposes.
*
* 92 12/01/97 5:25p Hoffoss
* Routed interface sound playing through a special function that will
* only allow one instance of the sound to play at a time, avoiding
* over-mixing problems.
*
* 91 12/01/97 3:38p Hoffoss
* Changed placement of 'More' indicator.
*
* 90 11/25/97 3:49p Hoffoss
* Changed subhilighting to happen when mouse is over line, rather than
* mouse button down but not up again yet.
*
* 89 11/24/97 10:20p Lawrance
* Add key 'KEY_N' to target next ship on monitoring view
*
* 88 11/24/97 6:15p Lawrance
* fix button scroll problem
*
* 87 11/23/97 6:15p Hoffoss
* Make exiting the controls config screen save the pilot, so changes keep
* even if programs crashes or something.
*
* 86 11/21/97 5:57p Hoffoss
* Fixed bug where timef type controls weren't checking joystick buttons.
*
* 85 11/21/97 4:06p Hoffoss
* Fixed bug with enabling of axis are reversed.
*
* 84 11/20/97 4:47p Hoffoss
* Swapped throttle and rudder, which apparently were backwards.
*
* 83 11/20/97 4:00p Lawrance
* set z to a valid value
*
* 82 11/20/97 3:52p Hoffoss
* Made "None" appear if no control is bound to function.
*
* 81 11/20/97 2:10p Hoffoss
* Added defaults for joystick buttons 2 and 3.
*
* 80 11/20/97 1:08a Lawrance
* add support for 'R' key - target closest friendly repair ship
*
* 79 11/19/97 8:33p Hoffoss
* New controls config screen baby!
*
* 78 11/17/97 7:09p Hoffoss
* Made chase view control a trigger type.
*
* 77 11/17/97 6:40p Lawrance
* Changed 'I' key to toggle of extended target info, moved target closest
* locked missile to 'L'
*
* 76 11/17/97 3:26p Jasen
* Adjusted coordinates for the help button .ani location
*
* 75 11/16/97 3:51p Hoffoss
* Added more button to config screen when scrolling allowed.
*
* 74 11/16/97 3:20p Hoffoss
* Added various suggestions from the Todolist.
*
* 73 11/14/97 4:33p Mike
* Change Debug key to backquote (from F11).
* Balance a ton of subsystems in ships.tbl.
* Change "Heavy Laser" to "Disruptor".
*
* 72 11/12/97 2:54p Hoffoss
* Made modifiers non-stand alone, added support for red tabs on
* conflicts.
*
* 71 10/30/97 6:01p Hoffoss
* Changed screen to utilize the new text color standards.
*
* 70 10/29/97 7:25p Hoffoss
* Added crude support for UI button double click checking.
*
* 69 10/29/97 6:32p Hoffoss
* Changed some interface apperances.
*
* 68 10/29/97 4:54p Hoffoss
* Changed scan_code_text element for Enter to 'Enter' instead of 'a' with
* a caret over it (what's that all about?)
*
* 67 10/28/97 10:42a Hoffoss
* Fixed handling of continuous controls that have modifiers to the key.
*
* 66 10/28/97 10:03a Hoffoss
* Fixed bug with continuous type controls not registering if pressed and
* released too quickly. Also some other little changes.
*
* 65 10/28/97 12:12a Lawrance
* remove unused keys (Alt-H and Alt-F)
*
* 64 10/27/97 12:23p Hoffoss
* Improved warning system and fixed coloring bug.
*
* 63 10/27/97 11:39a Hoffoss
* Added control conflicts checking.
*
* 62 10/26/97 3:20p Hoffoss
* Added many missing features to control config screen.
*
* 61 10/25/97 5:41p Hoffoss
* More functionality added to the controls config screen.
*
* 60 10/24/97 11:00p Hoffoss
* Controls config screen much improved.
*
* 59 10/22/97 4:50p Hoffoss
* Disabled throttle by default.
*
* 58 10/22/97 11:00a Hoffoss
* Changed VIEW_SLEW and VIEW_EXTERNAL to be continuous rather than
* trigger actions.
*
* 57 10/21/97 7:05p Hoffoss
* Overhauled the key/joystick control structure and usage throughout the
* entire FreeSpace code. The whole system is very different now.
*
* 56 10/18/97 7:19p Hoffoss
* Added timestamp recording when a key is pressed.
*
* 55 10/13/97 4:33p Hoffoss
* Made training messages go away after time.
*
* 54 10/13/97 3:24p Hoffoss
* Made it so training message text can be arbitrarily bolded.
*
* 53 9/24/97 4:52p Hoffoss
* Changed training message key token handling, and implemented a new
* training message system method to test out for a while.
*
* 52 9/14/97 10:24p Lawrance
* add damage screen popup window
*
* 51 9/10/97 6:02p Hoffoss
* Added code to check for key-pressed sexp operator in FreeSpace as part
* of training mission stuff.
*
* 50 9/09/97 3:39p Sandeep
* warning level 4 bugs
* $NoKeywords: $
*
*/
#include "controlsconfig.h"
#include "key.h"
#include "joy.h"
#include "localize.h"
#define TARGET_TAB 0
#define SHIP_TAB 1
#define WEAPON_TAB 2
#define COMPUTER_TAB 3
int Failed_key_index;
// assume control keys are used as modifiers until we find out
int Shift_is_modifier;
int Ctrl_is_modifier;
int Alt_is_modifier;
int Axis_enabled[JOY_NUM_AXES] = { 1, 1, 1, 0, 0, 0 };
int Axis_enabled_defaults[JOY_NUM_AXES] = { 1, 1, 1, 0, 0, 0 };
int Invert_axis[JOY_NUM_AXES] = { 0, 0, 0, 0, 0, 0 };
int Invert_axis_defaults[JOY_NUM_AXES] = { 0, 0, 0, 0, 0, 0 };
// arrays which hold the key mappings. The array index represents a key-independent action.
//
//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" },
// 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" },
// matching speed
{ KEY_M, -1, COMPUTER_TAB, "Match Target Speed" },
{ KEY_ALTED | KEY_M, -1, COMPUTER_TAB, "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" },
// 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 },
// 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" },
// 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_R, 6, TARGET_TAB, "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_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_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_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" },
{ -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" },
{ 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_B, -1, TARGET_TAB, "Target Next Hostile Bomb or Bomber" },
{ KEY_SHIFTED | KEY_B, -1, TARGET_TAB, "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_SHIFTED | KEY_PERIOD, -1, COMPUTER_TAB, "Increase time compression" },
{ KEY_SHIFTED | KEY_COMMA, -1, COMPUTER_TAB, "Decrease time compression" },
{ KEY_L, -1, COMPUTER_TAB, "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"},
{ -1, -1, -1, "" }
};
char *Scan_code_text_german[] = {
"", "Esc", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "0", "Akzent '", "\xE1", "R\x81""cktaste", "Tab",
"Q", "W", "E", "R", "T", "Z", "U", "I",
"O", "P", "\x9A", "+", "Eingabe", "Strg Links", "A", "S",
"D", "F", "G", "H", "J", "K", "L", "\x99",
"\xAE", "`", "Shift", "#", "Y", "X", "C", "V",
"B", "N", "M", ",", ".", "-", "Shift", "Num *",
"Alt", "Leertaste", "Hochstell", "F1", "F2", "F3", "F4", "F5",
"F6", "F7", "F8", "F9", "F10", "Pause", "Rollen", "Num 7",
"Num 8", "Num 9", "Num -", "Num 4", "Num 5", "Num 6", "Num +", "Num 1",
"Num 2", "Num 3", "Num 0", "Num ,", "", "", "", "F11",
"F12", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "Num Eingabe", "Strg Rechts", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "Num /", "", "Druck",
"Alt", "", "", "", "", "", "", "",
"", "", "", "", "", "Num Lock", "", "Pos 1",
"Pfeil Hoch", "Bild Hoch", "", "Pfeil Links", "", "Pfeil Rechts", "", "Ende",
"Pfeil Runter", "Bild Runter", "Einfg", "Entf", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
};
char *Joy_button_text_german[] = {
"Knopf 1", "Knopf 2", "Knopf 3", "Knopf 4", "Knopf 5", "Knopf 6",
"Knopf 7", "Knopf 8", "Knopf 9", "Knopf 10", "Knopf 11", "Knopf 12",
"Knopf 13", "Knopf 14", "Knopf 15", "Knopf 16", "Knopf 17", "Knopf 18",
"Knopf 19", "Knopf 20", "Knopf 21", "Knopf 22", "Knopf 23", "Knopf 24",
"Knopf 25", "Knopf 26", "Knopf 27", "Knopf 28", "Knopf 29", "Knopf 30",
"Knopf 31", "Knopf 32", "Hut Hinten", "Hut Vorne", "Hut Links", "Hut Rechts"
};
char *Scan_code_text_french[] = {
"", "\x90""chap", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "0", "-", "=", "Fl\x82""che Ret.", "Tab",
"Q", "W", "E", "R", "T", "Y", "U", "I",
"O", "P", "[", "]", "Entr\x82""e", "Ctrl Gauche", "A", "S",
"D", "F", "G", "H", "J", "K", "L", ";",
"'", "`", "Maj.", "\\", "Z", "X", "C", "V",
"B", "N", "M", ",", ".", "/", "Maj.", "Pav\x82 *",
"Alt", "Espace", "Verr. Maj.", "F1", "F2", "F3", "F4", "F5",
"F6", "F7", "F8", "F9", "F10", "Pause", "Arret defil", "Pav\x82 7",
"Pav\x82 8", "Pav\x82 9", "Pav\x82 -", "Pav\x82 4", "Pav\x82 5", "Pav\x82 6", "Pav\x82 +", "Pav\x82 1",
"Pav\x82 2", "Pav\x82 3", "Pav\x82 0", "Pav\x82 .", "", "", "", "F11",
"F12", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "Pav\x82 Entr", "Ctrl Droite", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "Pav\x82 /", "", "Impr \x82""cran",
"Alt", "", "", "", "", "", "", "",
"", "", "", "", "", "Verr num", "", "Orig.",
"Fl\x82""che Haut", "Page Haut", "", "Fl\x82""che Gauche", "", "Fl\x82""che Droite", "", "Fin",
"Fl\x82""che Bas", "Page Bas", "Inser", "Suppr", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
};
char *Joy_button_text_french[] = {
"Bouton 1", "Bouton 2", "Bouton 3", "Bouton 4", "Bouton 5", "Bouton 6",
"Bouton 7", "Bouton 8", "Bouton 9", "Bouton 10", "Bouton 11", "Bouton 12",
"Bouton 13", "Bouton 14", "Bouton 15", "Bouton 16", "Bouton 17", "Bouton 18",
"Bouton 19", "Bouton 20", "Bouton 21", "Bouton 22", "Bouton 23", "Bouton 24",
"Bouton 25", "Bouton 26", "Bouton 27", "Bouton 28", "Bouton 29", "Bouton 30",
"Bouton 31", "Bouton 32", "Chapeau Arrière", "Chapeau Avant", "Chapeau Gauche", "Chapeau Droite"
};
// This is the text that is displayed on the screen for the keys a player selects
char *Scan_code_text_english[] = {
"", "Esc", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "0", "-", "=", "Backspace", "Tab",
"Q", "W", "E", "R", "T", "Y", "U", "I",
"O", "P", "[", "]", "Enter", "Left Ctrl", "A", "S",
"D", "F", "G", "H", "J", "K", "L", ";",
"'", "`", "Shift", "\\", "Z", "X", "C", "V",
"B", "N", "M", ",", ".", "/", "Shift", "Pad *",
"Alt", "Spacebar", "Caps Lock", "F1", "F2", "F3", "F4", "F5",
"F6", "F7", "F8", "F9", "F10", "Pause", "Scroll Lock", "Pad 7",
"Pad 8", "Pad 9", "Pad -", "Pad 4", "Pad 5", "Pad 6", "Pad +", "Pad 1",
"Pad 2", "Pad 3", "Pad 0", "Pad .", "", "", "", "F11",
"F12", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "Pad Enter", "Right Ctrl", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "Pad /", "", "Print Scrn",
"Alt", "", "", "", "", "", "", "",
"", "", "", "", "", "Num Lock", "", "Home",
"Up Arrow", "Page Up", "", "Left Arrow", "", "Right Arrow", "", "End",
"Down Arrow", "Page Down", "Insert", "Delete", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
};
char *Joy_button_text_english[] = {
"Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6",
"Button 7", "Button 8", "Button 9", "Button 10", "Button 11", "Button 12",
"Button 13", "Button 14", "Button 15", "Button 16", "Button 17", "Button 18",
"Button 19", "Button 20", "Button 21", "Button 22", "Button 23", "Button 24",
"Button 25", "Button 26", "Button 27", "Button 28", "Button 29", "Button 30",
"Button 31", "Button 32", "Hat Back", "Hat Forward", "Hat Left", "Hat Right"
};
char **Scan_code_text = Scan_code_text_english;
char **Joy_button_text = Joy_button_text_english;
void set_modifier_status()
{
int i;
Alt_is_modifier = 0;
Shift_is_modifier = 0;
Ctrl_is_modifier = 0;
for (i=0; i<CCFG_MAX; i++) {
if (Control_config[i].key_id < 0)
continue;
if (Control_config[i].key_id & KEY_ALTED)
Alt_is_modifier = 1;
if (Control_config[i].key_id & KEY_SHIFTED)
Shift_is_modifier = 1;
if (Control_config[i].key_id & KEY_CTRLED) {
Assert(0); // get Alan
Ctrl_is_modifier = 1;
}
}
}
int translate_key_to_index(char *key)
{
int i, index = -1, alt = 0, shift = 0, max_scan_codes;
if (Lcl_gr) {
max_scan_codes = sizeof(Scan_code_text_german) / sizeof(char *);
} else if (Lcl_fr) {
max_scan_codes = sizeof(Scan_code_text_french) / sizeof(char *);
} else {
max_scan_codes = sizeof(Scan_code_text_english) / sizeof(char *);
}
// look for modifiers
Assert(key);
if (!strnicmp(key, "Alt", 3)) {
alt = 1;
key += 3;
if (*key)
key++;
}
char *translated_shift;
if(Lcl_gr){
translated_shift = "Shift";
} else if(Lcl_fr){
translated_shift = "Maj.";
} else {
translated_shift = "Shift";
}
if (!strnicmp(key, translated_shift, 5)) {
shift = 1;
key += 5;
if (*key)
key++;
}
// look up index for default key
if (*key) {
for (i=0; i<max_scan_codes; i++)
if (!stricmp(key, Scan_code_text_english[i])) {
index = i;
break;
}
if (i == max_scan_codes)
return -1;
if (shift)
index |= KEY_SHIFTED;
if (alt)
index |= KEY_ALTED;
// convert scancode to Control_config index
for (i=0; i<CCFG_MAX; i++) {
if (Control_config[i].key_default == index) {
index = i;
break;
}
}
if (i == CCFG_MAX)
return -1;
return index;
}
return -1;
}
// Given the system default key 'key', return the current key that is bound to the function
// Both are 'key' and the return value are descriptive strings that can be displayed
// directly to the user. If 'key' isn't a real key or not normally bound to anything,
// or there is no key current bound to the function, NULL is returned.
char *translate_key(char *key)
{
int index = -1, code = -1;
index = translate_key_to_index(key);
if (index < 0)
return NULL;
code = Control_config[index].key_id;
Failed_key_index = index;
if (code < 0) {
code = Control_config[index].joy_id;
if (code >= 0)
return Joy_button_text[code];
}
return textify_scancode(code);
}
char *textify_scancode(int code)
{
static char text[40];
if (code < 0)
return "None";
*text = 0;
if (code & KEY_ALTED) {
if(Lcl_gr){
strcat(text, "Alt-");
} else if(Lcl_fr){
strcat(text, "Alt-");
} else {
strcat(text, "Alt-");
}
}
if (code & KEY_SHIFTED) {
if(Lcl_gr){
strcat(text, "Shift-");
} else if(Lcl_fr){
strcat(text, "Maj.-");
} else {
strcat(text, "Shift-");
}
}
strcat(text, Scan_code_text[code & KEY_MASK]);
return text;
}
//XSTR:ON
// initialize common control config stuff - call at game startup after localization has been initialized
void control_config_common_init()
{
if(Lcl_gr){
Scan_code_text = Scan_code_text_german;
Joy_button_text = Joy_button_text_german;
// swap init bindings for y and z keys
Control_config[TARGET_SHIP_IN_RETICLE].key_default = KEY_Z;
Control_config[TARGET_LAST_TRANMISSION_SENDER].key_default = KEY_ALTED | KEY_Z;
Control_config[REVERSE_THRUST].key_default = KEY_Y;
Control_config[DISARM_MESSAGE].key_default = KEY_SHIFTED | KEY_Y;
} else if(Lcl_fr){
Scan_code_text = Scan_code_text_french;
Joy_button_text = Joy_button_text_french;
} else {
Scan_code_text = Scan_code_text_english;
Joy_button_text = Joy_button_text_english;
}
}
-81
View File
@@ -1,81 +0,0 @@
/*
* 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/Cryptstring/cryptstring.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Applet for crypting strings.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/23/98 6:21p Dave
*
* $NoKeywords: $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "crypt.h"
int main(int argc, char **argv)
{
int i;
char *crypt_string;
if ( argc == 1 ) {
printf("Usage: cryptstring <string1> <string2> ...\n");
printf("Output will be <crypt1> <crypt2>\n");
exit(1);
}
for ( i = 1; i < argc; i++ ) {
char *s;
s = argv[i];
// if the length of the string is greater than the number of crypted symbols we
// return, then pass only the maximum length
if ( strlen(s) > CRYPT_STRING_LENGTH )
s += (strlen(s) - CRYPT_STRING_LENGTH);
crypt_string = jcrypt(s);
printf("%s\n", crypt_string);
}
return 0;
}
char *jcrypt (char *plainstring)
{
int i,t,len;
static char cryptstring[CRYPT_STRING_LENGTH + 1];
len=strlen (plainstring);
if (len > CRYPT_STRING_LENGTH)
len = CRYPT_STRING_LENGTH;
for (i = 0;i < len; i++) {
cryptstring[i]=0;
for (t = 0; t < len; t++) {
cryptstring[i]^=(plainstring[t] ^ plainstring[i%(t+1)]);
cryptstring[i]%=90;
cryptstring[i]+=33;
}
}
cryptstring[i]=0;
return ((char *)cryptstring);
}
-750
View File
@@ -1,750 +0,0 @@
/*
* 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/Cutscenes.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Code for the cutscenes viewer screen
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 15 6/16/00 3:15p Jefff
* sim of the year dvd version changes, a few german soty localization
* fixes
*
* 14 10/13/99 10:20a Jefff
* fixed bug where intro cutscene showed 2x after getting bad ending
*
* 13 10/06/99 10:30a Jefff
* OEM updates
*
* 12 9/30/99 6:01p Jefff
* OEM updates
*
* 11 9/07/99 1:10p Mikek
* Make movie check not hang in ~RELEASE_REAL build.
*
* 10 9/06/99 6:38p Dave
* Improved CD detection code.
*
* 9 9/06/99 1:16a Dave
* Make sure the user sees the intro movie.
*
* 8 9/03/99 1:31a Dave
* CD checking by act. Added support to play 2 cutscenes in a row
* seamlessly. Fixed super low level cfile bug related to files in the
* root directory of a CD. Added cheat code to set campaign mission # in
* main hall.
*
* 7 7/19/99 2:13p Dave
* Added some new strings for Heiko.
*
* 6 6/01/99 3:52p Dave
* View footage screen. Fixed xstrings to not display the & symbol. Popup,
* dead popup, pxo find player popup, pxo private room popup.
*
* 5 1/30/99 5:08p Dave
* More new hi-res stuff.Support for nice D3D textures.
*
* 4 10/23/98 3:51p Dave
* Full support for tstrings.tbl and foreign languages. All that remains
* is to make it active in Fred.
*
* 3 10/13/98 9:28a Dave
* Started neatening up freespace.h. Many variables renamed and
* reorganized. Added AlphaColors.[h,cpp]
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 18 6/09/98 10:31a Hoffoss
* Created index numbers for all xstr() references. Any new xstr() stuff
* added from here on out should be added to the end if the list. The
* current list count can be found in FreeSpace.cpp (search for
* XSTR_SIZE).
*
* 17 6/01/98 11:43a John
* JAS & MK: Classified all strings for localization.
*
* 16 5/24/98 9:01p Lawrance
* Add commit sounds when accept is pressed
*
* 15 5/21/98 8:05p Allender
* fix possible bug with number of cutscenes shown in the list
*
* 14 5/21/98 12:35a Lawrance
* Tweak how CD is checked for
*
* 13 5/20/98 1:34p Hoffoss
* Added cutscene description rendering.
*
* 12 5/19/98 12:19p Mike
* Cheat codes!
*
* 11 5/12/98 4:17p Hoffoss
* Make ctrl-arrows (up/down) switch between tech room screens.
*
* 10 5/11/98 8:04p Hoffoss
* Fixed minor bugs.
*
* 9 5/10/98 10:05p Allender
* only show cutscenes which have been seen before. Made Fred able to
* write missions anywhere, defaulting to player misison folder, not data
* mission folder. Fix FreeSpace code to properly read missions from
* correct locations
*
* 8 5/08/98 5:30p Lawrance
* add CD checks for movie playing
*
* 7 5/08/98 4:07p Allender
* more cutscene stuff
*
* 6 5/07/98 2:33p Hoffoss
* Removed help and options buttons.
*
* 5 4/30/98 4:53p John
* Restructured and cleaned up cfile code. Added capability to read off
* of CD-ROM drive and out of multiple pack files.
*
* 4 4/23/98 8:27p Allender
* basic support for cutscene playback. Into movie code in place. Tech
* room can view cutscenes stored in CDROM_dir variable
*
* 3 4/21/98 7:07p Hoffoss
* Fixed problem where when switching screens flashes old tab hilight once
* before switching to new state.
*
* 2 4/17/98 6:33p Hoffoss
* Made changes to the tech room group of screens. Cutscenes screen is
* now in a new file.
*
* $NoKeywords: $
*/
#include "cutscenes.h"
#include "ui.h"
#include "cfile.h"
#include "gamesnd.h"
#include "gamesequence.h"
#include "freespace.h"
#include "key.h"
#include "bmpman.h"
// #include "movie.h"
#include "popup.h"
#include "mainhallmenu.h"
#include "alphacolors.h"
#include "localize.h"
char *Cutscene_bitmap_name[GR_NUM_RESOLUTIONS] = {
"ViewFootage",
"2_ViewFootage"
};
char *Cutscene_mask_name[GR_NUM_RESOLUTIONS] = {
"ViewFootage-m",
"2_ViewFootage-m"
};
int Num_cutscenes;
int Cutscenes_viewable;
int Description_index;
cutscene_info Cutscenes[MAX_CUTSCENES];
extern int All_movies_enabled; // If set, all movies may be viewed. Keyed off cheat code.
// initialization stuff for cutscenes
void cutscene_init()
{
char buf[MULTITEXT_LENGTH];
int rval;
if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Error parsing 'rank.tbl'\r\nError code = %i.\r\n", rval);
}
// open localization
lcl_ext_open();
read_file_text("cutscenes.tbl");
reset_parse();
// parse in all the rank names
Num_cutscenes = 0;
skip_to_string("#Cutscenes");
ignore_white_space();
while ( required_string_either("#End", "$Filename:") ) {
Assert ( Num_cutscenes < MAX_CUTSCENES );
required_string("$Filename:");
stuff_string( Cutscenes[Num_cutscenes].filename, F_PATHNAME, NULL );
required_string("$Name:");
stuff_string( Cutscenes[Num_cutscenes].name, F_NAME, NULL );
required_string("$Description:");
stuff_string(buf, F_MULTITEXT, NULL);
drop_white_space(buf);
compact_multitext_string(buf);
Cutscenes[Num_cutscenes].description = strdup(buf);
required_string("$cd:");
stuff_int( &Cutscenes[Num_cutscenes].cd );
Num_cutscenes++;
}
required_string("#End");
Cutscenes_viewable = INTRO_CUTSCENE_FLAG;
// close localization
lcl_ext_close();
}
// function to return 0 based index of which CD a particular movie is on
// returns -1 on failure.
int cutscenes_get_cd_num( char *filename )
{
#if defined(OEM_BUILD)
return 0; // only 1 cd for OEM
#else
int i;
for (i = 0; i < Num_cutscenes; i++ ) {
if ( !stricmp(Cutscenes[i].filename, filename) ) {
return (Cutscenes[i].cd - 1);
}
}
return -1;
#endif // defined(OEM_BUILD)
}
// marks a cutscene as viewable
void cutscene_mark_viewable(char *filename)
{
int i;
for (i = 0; i < Num_cutscenes; i++ ) {
if ( !stricmp(Cutscenes[i].filename, filename) ) {
Cutscenes_viewable |= (1<<i);
return;
}
}
}
#define NUM_BUTTONS 8
#define TECH_DATABASE_BUTTON 0
#define SIMULATOR_BUTTON 1
#define CUTSCENES_BUTTON 2
#define CREDITS_BUTTON 3
#define SCROLL_UP_BUTTON 4
#define SCROLL_DOWN_BUTTON 5
#define PLAY_BUTTON 6
#define EXIT_BUTTON 7
static int Num_files;
static int Cutscene_list[MAX_CUTSCENES];
static int Stats_scroll_offset;
static int Selected_line = 0; // line that is currently selected for binding
static int Scroll_offset;
static int Background_bitmap;
static UI_BUTTON List_region;
static UI_WINDOW Ui_window;
ui_button_info Buttons[GR_NUM_RESOLUTIONS][NUM_BUTTONS] = {
{ // GR_640
ui_button_info("TDB_00", 7, 5, 37, 7, 0), // tech database 1
ui_button_info("TDB_01", 7, 19, 37, 23, 1), // tech database 2
ui_button_info("TDB_02", 7, 34, 37, 38, 2), // tech database 3
ui_button_info("TDB_03", 7, 49, 37, 54, 3), // tech database 4
ui_button_info("VFB_04", 6, 318, -1, -1, 4), // scroll up
ui_button_info("VFB_05", 36, 318, -1, -1, 5), // scroll down
ui_button_info("VFB_06", 578, 319, 587, 366, 6), // play
ui_button_info("VFB_07", 574, 431, 587, 413, 7), // exit
},
{ // GR_1024
ui_button_info("2_TDB_00", 12, 7, 59, 12, 0), // tech database 1
ui_button_info("2_TDB_01", 12, 31, 59, 37, 1), // tech database 2
ui_button_info("2_TDB_02", 12, 56, 59, 62, 2), // tech database 3
ui_button_info("2_TDB_03", 12, 81, 59, 88, 3), // tech database 4
ui_button_info("2_VFB_04", 9, 509, -1, -1, 4), // scroll up
ui_button_info("2_VFB_05", 58, 509, -1, -1, 5), // scroll down
ui_button_info("2_VFB_06", 925, 511, 940, 586, 6), // play
ui_button_info("2_VFB_07", 918, 689, 940, 661, 7), // exit
}
};
// text
#define NUM_CUTSCENE_TEXT 6
UI_XSTR Cutscene_text[GR_NUM_RESOLUTIONS][NUM_CUTSCENE_TEXT] = {
{ // GR_640
{"Technical Database", 1055, 37, 7, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][TECH_DATABASE_BUTTON].button },
{"Mission Simulator", 1056, 37, 23, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][SIMULATOR_BUTTON].button },
{"Cutscenes", 1057, 37, 38, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][CUTSCENES_BUTTON].button },
{"Credits", 1058, 37, 54, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][CREDITS_BUTTON].button },
{"Play", 1335, 587, 366, UI_XSTR_COLOR_GREEN, -1, &Buttons[0][PLAY_BUTTON].button },
{"Exit", 1419, 587, 413, UI_XSTR_COLOR_PINK, -1, &Buttons[0][EXIT_BUTTON].button },
},
{ // GR_1024
{"Technical Database", 1055, 59, 12, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][TECH_DATABASE_BUTTON].button },
{"Mission Simulator", 1056, 59, 37, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][SIMULATOR_BUTTON].button },
{"Cutscenes", 1057, 59, 62, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][CUTSCENES_BUTTON].button },
{"Credits", 1058, 59, 88, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][CREDITS_BUTTON].button },
{"Play", 1335, 940, 586, UI_XSTR_COLOR_GREEN, -1, &Buttons[1][PLAY_BUTTON].button },
{"Exit", 1419, 940, 661, UI_XSTR_COLOR_PINK, -1, &Buttons[1][EXIT_BUTTON].button },
}
};
int Cutscene_list_coords[GR_NUM_RESOLUTIONS][4] = {
{ // GR_640
9, 117, 621, 198
},
{ // GR_1024
14, 188, 994, 316
}
};
int Cutscene_desc_coords[GR_NUM_RESOLUTIONS][4] = {
{ // GR_640
9, 378, 484, 73
},
{ // GR_1024
14, 605, 775, 117
}
};
#define MAX_TEXT_LINES 20
int Cutscene_max_text_lines[GR_NUM_RESOLUTIONS] = {
10,
MAX_TEXT_LINES
};
#define MAX_TEXT_LINE_LEN 256
static int Text_size;
static int Text_offset = 0;
static int Text_line_size[MAX_TEXT_LINES];
static char *Text_lines[MAX_TEXT_LINES];
int cutscenes_validate_cd(char *mve_name, int prompt_for_cd)
{
int cd_present = 0;
int cd_drive_num;
int cd_mve_is_on;
char volume_name[128];
#ifdef RELEASE_REAL
int num_attempts = 0;
#endif
while(1) {
int path_set_ok;
cd_mve_is_on = cutscenes_get_cd_num(mve_name);
if ((cd_mve_is_on != 0) && (cd_mve_is_on != 1) && (cd_mve_is_on != 2)) {
cd_present = 0;
break;
}
#if defined(OEM_BUILD)
sprintf(volume_name, NOX("FS2_OEM"));
#else
sprintf(volume_name, NOX("FREESPACE2_%c"), '1' + cd_mve_is_on);
#endif
cd_drive_num = find_freespace_cd(volume_name);
path_set_ok = set_cdrom_path(cd_drive_num);
if ( path_set_ok ) {
cd_present = 1;
break;
}
#ifdef RELEASE_REAL
if ( !prompt_for_cd ) {
cd_present = 0;
break;
}
// no CD found, so prompt user
char popup_msg[256];
int popup_rval;
#if defined(DVD_MESSAGE_HACK)
sprintf(popup_msg, XSTR( "Movie not found\n\nInsert FreeSpace DVD to continue", 203));
#else
sprintf(popup_msg, XSTR( "Movie not found\n\nInsert FreeSpace CD #%d to continue", 203), cd_mve_is_on+1);
#endif
popup_rval = popup(PF_BODY_BIG, 2, POPUP_CANCEL, POPUP_OK, popup_msg);
if ( popup_rval != 1 ) {
cd_present = 0;
break;
}
if ( num_attempts++ > 5 ) {
cd_present = 0;
break;
}
#else
cd_present = 0;
break;
#endif
}
return cd_present;
}
void cutscenes_screen_play()
{
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"));
// 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()
{
if (Selected_line) {
Selected_line--;
gamesnd_play_iface(SND_SCROLL);
} else
gamesnd_play_iface(SND_GENERAL_FAIL);
if (Selected_line < Scroll_offset)
Scroll_offset = Selected_line;
}
void cutscenes_screen_scroll_line_down()
{
int h;
if (Selected_line < Num_files - 1) {
Selected_line++;
gamesnd_play_iface(SND_SCROLL);
} else
gamesnd_play_iface(SND_GENERAL_FAIL);
h = Cutscene_list_coords[gr_screen.res][3] / gr_get_font_height();
if (Selected_line >= Scroll_offset + h){
Scroll_offset++;
}
}
void cutscenes_screen_scroll_screen_up()
{
int h;
if (Scroll_offset) {
Scroll_offset--;
Assert(Selected_line > Scroll_offset);
h = Cutscene_list_coords[gr_screen.res][3] / gr_get_font_height();
while (Selected_line >= Scroll_offset + h){
Selected_line--;
}
gamesnd_play_iface(SND_SCROLL);
} else {
gamesnd_play_iface(SND_GENERAL_FAIL);
}
}
void cutscenes_screen_scroll_screen_down()
{
int h;
h = Cutscene_list_coords[gr_screen.res][3] / gr_get_font_height();
if (Scroll_offset + h < Num_files) {
Scroll_offset++;
if (Selected_line < Scroll_offset){
Selected_line = Scroll_offset;
}
gamesnd_play_iface(SND_SCROLL);
} else {
gamesnd_play_iface(SND_GENERAL_FAIL);
}
}
int cutscenes_screen_button_pressed(int n)
{
switch (n) {
case TECH_DATABASE_BUTTON:
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_TECH_MENU);
return 1;
case SIMULATOR_BUTTON:
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_SIMULATOR_ROOM);
return 1;
case CREDITS_BUTTON:
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_CREDITS);
return 1;
case SCROLL_UP_BUTTON:
cutscenes_screen_scroll_screen_up();
break;
case SCROLL_DOWN_BUTTON:
cutscenes_screen_scroll_screen_down();
break;
case PLAY_BUTTON:
cutscenes_screen_play();
break;
case EXIT_BUTTON:
gamesnd_play_iface(SND_COMMIT_PRESSED);
gameseq_post_event(GS_EVENT_MAIN_MENU);
game_flush();
break;
}
return 0;
}
void cutscenes_screen_init()
{
int i;
ui_button_info *b;
Ui_window.create(0, 0, gr_screen.max_w, gr_screen.max_h, 0);
Ui_window.set_mask_bmap(Cutscene_mask_name[gr_screen.res]);
for (i=0; i<NUM_BUTTONS; i++) {
b = &Buttons[gr_screen.res][i];
b->button.create(&Ui_window, "", b->x, b->y, 60, 30, (i < 2), 1);
// set up callback for when a mouse first goes over a button
b->button.set_highlight_action(common_play_highlight_sound);
b->button.set_bmaps(b->filename);
b->button.link_hotspot(b->hotspot);
}
// add xstrs
for(i=0; i<NUM_CUTSCENE_TEXT; i++){
Ui_window.add_XSTR(&Cutscene_text[gr_screen.res][i]);
}
Buttons[gr_screen.res][EXIT_BUTTON].button.set_hotkey(KEY_CTRLED | KEY_ENTER);
Buttons[gr_screen.res][SCROLL_UP_BUTTON].button.set_hotkey(KEY_PAGEUP);
Buttons[gr_screen.res][SCROLL_DOWN_BUTTON].button.set_hotkey(KEY_PAGEDOWN);
List_region.create(&Ui_window, "", Cutscene_list_coords[gr_screen.res][0], Cutscene_list_coords[gr_screen.res][1], Cutscene_list_coords[gr_screen.res][2], Cutscene_list_coords[gr_screen.res][3], 0, 1);
List_region.hide();
// set up hotkeys for buttons so we draw the correct animation frame when a key is pressed
Buttons[gr_screen.res][SCROLL_UP_BUTTON].button.set_hotkey(KEY_PAGEUP);
Buttons[gr_screen.res][SCROLL_DOWN_BUTTON].button.set_hotkey(KEY_PAGEDOWN);
Background_bitmap = bm_load(Cutscene_bitmap_name[gr_screen.res]);
Scroll_offset = Selected_line = 0;
Description_index = -1;
// when doing a debug version, just put all of the movie files here.
#ifndef NDEBUG
//Cutscenes_viewable = 0xffffffff; // makes all cutscenes viewble.
#endif
if (All_movies_enabled)
Cutscenes_viewable = 0xffffffff; // Cheat code enables all movies.
Num_files = 0;
for ( i = 0; i < Num_cutscenes; i++ ) {
if ( Cutscenes_viewable & (1<<i) ) {
Cutscene_list[Num_files] = i;
Num_files++;
}
}
}
void cutscenes_screen_close()
{
if (Background_bitmap)
bm_unload(Background_bitmap);
Ui_window.destroy();
}
void cutscenes_screen_do_frame()
{
int i, k, y, z;
int font_height = gr_get_font_height();
int select_tease_line = -1;
k = Ui_window.process();
switch (k) {
case KEY_DOWN: // select next line
cutscenes_screen_scroll_line_down();
break;
case KEY_UP: // select previous line
cutscenes_screen_scroll_line_up();
break;
case KEY_TAB:
case KEY_CTRLED | KEY_DOWN:
cutscenes_screen_button_pressed(CREDITS_BUTTON);
break;
case KEY_SHIFTED | KEY_TAB:
case KEY_CTRLED | KEY_UP:
cutscenes_screen_button_pressed(SIMULATOR_BUTTON);
break;
case KEY_ENTER:
cutscenes_screen_play();
break;
case KEY_ESC: // cancel
gameseq_post_event(GS_EVENT_MAIN_MENU);
game_flush();
break;
case KEY_F1: // show help overlay
break;
case KEY_F2: // goto options screen
gameseq_post_event(GS_EVENT_OPTIONS_MENU);
break;
} // end switch
for (i=0; i<NUM_BUTTONS; i++){
if (Buttons[gr_screen.res][i].button.pressed()){
if (cutscenes_screen_button_pressed(i)){
return;
}
}
}
if (List_region.button_down()) {
List_region.get_mouse_pos(NULL, &y);
z = Scroll_offset + y / font_height;
if ((z >= 0) && (z < Num_files))
select_tease_line = z;
}
if (List_region.pressed()) {
List_region.get_mouse_pos(NULL, &y);
z = Scroll_offset + y / font_height;
if ((z >= 0) && (z < Num_files))
Selected_line = z;
}
GR_MAYBE_CLEAR_RES(Background_bitmap);
if (Background_bitmap >= 0) {
gr_set_bitmap(Background_bitmap);
gr_bitmap(0, 0);
}
Ui_window.draw();
for (i=TECH_DATABASE_BUTTON; i<=CREDITS_BUTTON; i++){
if (Buttons[gr_screen.res][i].button.button_down()){
break;
}
}
if (i > CREDITS_BUTTON){
Buttons[gr_screen.res][CUTSCENES_BUTTON].button.draw_forced(2);
}
y = 0;
z = Scroll_offset;
while (y + font_height <= Cutscene_list_coords[gr_screen.res][3]) {
if (z >= Num_files){
break;
}
if (z == Selected_line){
gr_set_color_fast(&Color_text_selected);
} else if (z == select_tease_line) {
gr_set_color_fast(&Color_text_subselected);
} else {
gr_set_color_fast(&Color_text_normal);
}
gr_printf(Cutscene_list_coords[gr_screen.res][0], Cutscene_list_coords[gr_screen.res][1] + y, Cutscenes[Cutscene_list[z]].name);
y += font_height;
z++;
}
if (Description_index != Selected_line) {
char *src;
Description_index = Selected_line;
Text_size = 0;
src = Cutscenes[Cutscene_list[Description_index]].description;
if (src) {
Text_size = split_str(src, Cutscene_desc_coords[gr_screen.res][2], Text_line_size, Text_lines, Cutscene_max_text_lines[gr_screen.res]);
Assert(Text_size >= 0 && Text_size < Cutscene_max_text_lines[gr_screen.res]);
}
}
if (Description_index >= 0) {
int len;
char line[MAX_TEXT_LINE_LEN + 1];
gr_set_color_fast(&Color_text_normal);
y = 0;
z = Text_offset;
while (y + font_height <= Cutscene_desc_coords[gr_screen.res][3]) {
if (z >= Text_size)
break;
len = Text_line_size[z];
if (len > MAX_TEXT_LINE_LEN)
len = MAX_TEXT_LINE_LEN;
strncpy(line, Text_lines[z], len);
line[len] = 0;
gr_string(Cutscene_desc_coords[gr_screen.res][0], Cutscene_desc_coords[gr_screen.res][1] + y, line);
y += font_height;
z++;
}
}
gr_flip();
}
-84
View File
@@ -1,84 +0,0 @@
/*
* 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/Cutscenes.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Code for the cutscenes viewer screen
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 6 5/21/98 12:35a Lawrance
* Tweak how CD is checked for
*
* 5 5/10/98 10:05p Allender
* only show cutscenes which have been seen before. Made Fred able to
* write missions anywhere, defaulting to player misison folder, not data
* mission folder. Fix FreeSpace code to properly read missions from
* correct locations
*
* 4 5/08/98 5:30p Lawrance
* add cutscenes_validate_cd()
*
* 3 5/08/98 4:07p Allender
* more cutscene stuff
*
* 2 4/17/98 6:33p Hoffoss
* Made changes to the tech room group of screens. Cutscenes screen is
* now in a new file.
*
* $NoKeywords: $
*/
#ifndef _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
#define _FREESPACE_CUTSCENES_SCREEN_HEADER_FILE
#include "parselo.h"
#define MAX_CUTSCENES 10
// this cutscene is always available.
#define INTRO_CUTSCENE_FLAG (1<<0)
typedef struct cutscene_info
{
char filename[MAX_FILENAME_LEN];
char name[NAME_LENGTH];
char *description;
int cd;
} cutscene_info;
extern cutscene_info Cutscenes[MAX_CUTSCENES];
extern int Num_cutscenes;
extern int Cutscenes_viewable;
// initializa table data
void cutscene_init();
int cutscene_get_cd_num(char *filename);
void cutscenes_screen_init();
void cutscenes_screen_close();
void cutscenes_screen_do_frame();
int cutscenes_validate_cd(char *mve_name, int prompt_for_cd = 1);
void cutscene_mark_viewable(char *filename);
#endif
File diff suppressed because it is too large. Load diff
-203
View File
@@ -1,203 +0,0 @@
/*
* 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/Debris/Debris.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Code for the pieces of exploding object debris.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 6 7/15/99 9:20a Andsager
* FS2_DEMO initial checkin
*
* 5 7/01/99 11:44a Dave
* Updated object sound system to allow multiple obj sounds per ship.
* Added hit-by-beam sound. Added killed by beam sound.
*
* 4 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 3 10/16/98 1:22p Andsager
* clean up header files
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 29 4/02/98 6:30p Lawrance
* reduce max debris piece if DEMO defined
*
* 28 4/02/98 11:40a Lawrance
* check for #ifdef DEMO instead of #ifdef DEMO_RELEASE
*
* 27 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 26 2/19/98 12:46a Lawrance
* Further work on asteroids.
*
* 25 2/10/98 6:43p Lawrance
* Moved asteroid code to a separate lib.
*
* 24 2/06/98 3:08p Mike
* More asteroid stuff, including resolving conflicts between the two
* asteroid_field structs!
*
* 23 2/05/98 12:51a Mike
* Early asteroid stuff.
*
* 22 1/29/98 5:50p John
* Made electrical arcing on debris pieces be persistent from frame to
* frame
*
* 21 1/21/98 7:18p Lawrance
* Fix bug with creating debris before the mission starts.
*
* 20 12/22/97 9:56p Andsager
* Implement ship:debris collisions. Generalize and move
* ship_ship_or_debris_hit struct from CollideShipShip to ObjCollide.h
*
* 19 11/19/97 5:57p Mike
* Make debris go away if more than N units away from the nearest player.
* Make speed of a docked object not read zero if it's moving.
*
* 18 10/01/97 10:52a Mike
* Change debris prototype to take an additional parameter to give debris
* more thrust when it is created.
*
* 17 9/20/97 9:25a John
* fixed bug with species specific debris shards.
*
* 16 8/13/97 9:50p Allender
* split *_move into *_process_pre and *_process_post functions.
* process_pre functions called before object is moved. _process_post
* functions called after object is moved. Reordered code in ship_post
* and weapon_post for multiplayer
*
* 15 7/24/97 8:35a Allender
* allow ships to blow up before missions starts. Made some debris system
* items available in other modules
*
* 14 7/13/97 5:53p Lawrance
* save model name in debris
*
* 13 7/02/97 11:48a Lawrance
* update debris to delay persistant sound
*
* 12 6/06/97 4:13p Lawrance
* leave debris chunks from very large ships persistant, scale fireball
* lifetime by ship radius
*
* 11 6/06/97 12:12p Lawrance
* limit hull debris pieces, destroying oldest debris to make way for new
* debris.
*
* 10 5/14/97 4:08p Lawrance
* removing my_index from game arrays
*
* 9 4/03/97 12:23a Mike
* Make debris collidable-with. Can hit it, too.
* Make AI ships stop firing when target enters death roll.
*
* 8 3/31/97 11:11a John
* added ship species specific debris.
*
* 7 3/25/97 3:55p Lawrance
* allowing debris to be targeted and shown on radar
*
* 6 2/27/97 12:07p John
* Added code to suppord debris chunks after a ship is exploded..
*
* 5 2/26/97 2:18p Lawrance
* adding Debris[] to save/restore
*
* 4 2/10/97 12:38p John
* made all ships blow up into debris pieces when exploded.
*
* 3 2/07/97 10:45a John
* Initial bare bones implementation of blowing off turrets.
*
* 2 2/07/97 9:30a John
*
* 1 2/06/97 4:13p John
*
* $NoKeywords: $
*/
#ifndef _DEBRIS_H
#define _DEBRIS_H
struct object;
struct CFILE;
#define MAX_DEBRIS_ARCS 8 // Must be less than MAX_ARC_EFFECTS in model.h
typedef struct debris {
debris *next, *prev; // used for a linked list of the hull debris chunks
int flags; // See DEBRIS_??? defines
int source_objnum; // What object this came from
int source_sig; // Signature of the source object
int ship_info_index; // Ship info index of the ship type debris came from
int team; // Team of the ship where the debris came from
int objnum; // What object this is linked to
float lifeleft; // When 0 or less object dies
int model_num; // What model this uses
int submodel_num; // What submodel this uses
int next_fireball; // When to start a fireball
int is_hull; // indicates a large hull chunk of debris
int species; // What species this is from. -1 if don't care.
int fire_timeout; // timestamp that holds time for fireballs to stop appearing
int sound_delay; // timestamp to signal when sound should start
fix time_started; // time when debris was created
int next_distance_check; // timestamp to determine whether to delete this piece of debris.
vector arc_pts[MAX_DEBRIS_ARCS][2]; // The endpoints of each arc
int arc_timestamp[MAX_DEBRIS_ARCS]; // When this times out, the spark goes away. -1 is not used
int arc_frequency; // Starts at 0, gets bigger
} debris;
// flags for debris pieces
#define DEBRIS_USED (1<<0)
#define DEBRIS_EXPIRE (1<<1) // debris can expire (ie hull chunks from small ships)
#ifdef FS2_DEMO
#define MAX_DEBRIS_PIECES 48
#else
#define MAX_DEBRIS_PIECES 64
#endif
extern debris Debris[MAX_DEBRIS_PIECES];
extern int Num_debris_pieces;
struct collision_info_struct;
void debris_init();
void debris_render( object * obj );
void debris_delete( object * obj );
void debris_process_pre( object * obj, float frame_time);
void debris_process_post( object * obj, float frame_time);
object *debris_create( object * source_obj, int model_num, int submodel_num, vector *pos, vector *exp_center, int hull_flag, float exp_force );
int debris_check_collision( object * obj, object * other_obj, vector * hitpos, collision_info_struct *debris_hit_info=NULL );
void debris_hit( object * debris_obj, object * other_obj, vector * hitpos, float damage );
int debris_get_team(object *objp);
void debris_clear_expired_flag(debris *db);
#endif // _DEBRIS_H
-799
View File
@@ -1,799 +0,0 @@
/*
* 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/DebugConsole/Console.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
* Routines for managing the debug console window.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 4 6/04/99 10:35a Dave
*
* 3 10/13/98 9:28a Dave
* Started neatening up freespace.h. Many variables renamed and
* reorganized. Added AlphaColors.[h,cpp]
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 17 2/05/98 11:43a Allender
* enhcanced network statistic collection. Made callback in debug console
* to do networking if player is in the console
*
* 16 1/22/98 6:42p John
* Move game_flush out of debug console into freespace. Made object
* pair code throw out some weapons that turn. Added stats for how many
* object pair are actually checked.
*
* 15 1/16/98 11:56a Allender
* ability to scroll back in debug console, and call game_flush() when
* leaving
*
* 14 1/10/98 1:14p John
* Added explanation to debug console commands
*
* 13 12/21/97 4:39p John
* fixed bug in name compare
*
* 12 12/21/97 4:33p John
* Made debug console functions a class that registers itself
* automatically, so you don't need to add the function to
* debugfunctions.cpp.
*
* 11 9/13/97 9:31a Lawrance
* if playing a demo, clear key filter then reset it once done with debug
* console
*
* 10 9/09/97 3:39p Sandeep
* warning level 4 bugs
*
* 9 6/13/97 3:50p John
* sped up debug console printf
*
* 8 6/13/97 3:27p John
* made debug console pretty
*
* 7 6/09/97 9:24a John
* Changed the way fonts are set.
*
* 6 5/29/97 3:09p John
* Took out debug menu.
* Made software scaler draw larger bitmaps.
* Optimized Direct3D some.
*
* 5 5/13/97 4:07p John
* made numbers also be marked as strings.
*
* 4 4/28/97 5:24p John
* made so : and \ don't get parsed out in debug console.
*
* 3 4/24/97 11:49a John
* added new lighting commands to console.
*
* 2 4/24/97 10:36a John
* moved the debug console stuff into it's own lib... made it compile with
* Fred.
*
* 1 4/24/97 10:16a John
* Initial rev
*
* $NoKeywords: $
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <setjmp.h>
#include <string.h>
#include "pstypes.h"
#include "freespace.h"
#include "font.h"
#include "timer.h"
#include "2d.h"
#include "key.h"
#include "alphacolors.h"
#include "osapi.h"
#define MAX_COMMANDS 300
static int Num_debug_commands = 0;
static debug_command *Debug_command[MAX_COMMANDS];
debug_command::debug_command(char *_name, char *_help, void (*_func)() )
{
int i;
if ( Num_debug_commands >= MAX_COMMANDS ) {
Int3(); // Too many debug console commands!! Increase MAX_COMMANDS!!
return;
}
for (i=0; i<Num_debug_commands; i++ ) {
int ret = stricmp( Debug_command[i]->name, _name );
if ( ret == 0) {
Int3(); // This debug console command already exists!!!!
return;
} else if ( ret > 0 ) {
break; // Insert it here
} else if ( ret < 0 ) {
// do nothing
}
}
if ( i < Num_debug_commands ) {
// Insert it at element i
int j;
for (j=Num_debug_commands; j>i; j-- ) {
Debug_command[j] = Debug_command[j-1];
}
Debug_command[i] = this;
Num_debug_commands++;
} else {
Debug_command[Num_debug_commands] = this;
Num_debug_commands++;
}
name = _name;
help = _help;
func = _func;
}
// some global variables
int Dc_command; // If this is set, then process the command
int Dc_help; // If this is set, then print out the help text in the form, "usage: ... \nLong description\n" );
int Dc_status; // If this is set, then print out the current status of the command.
char *Dc_arg; // The (lowercased) string value of the argument retrieved from dc_arg
char *Dc_arg_org; // Dc_arg before it got converted to lowercase
uint Dc_arg_type; // The type of dc_arg.
char *Dc_command_line; // The rest of the command line, from the end of the last processed arg on.
int Dc_arg_int; // If Dc_arg_type & ARG_INT is set, then this is the value
float Dc_arg_float; // If Dc_arg_type & ARG_FLOAT is set, then this is the value
int scroll_times = 0; // incremented each time display scrolls
int debug_inited = 0;
#define DROWS 25
#define DCOLS 80
int debug_x=0, debug_y=0;
char debug_text[DROWS][DCOLS];
static char command_line[1024];
static int command_line_pos = 0;
#define DEBUG_HISTORY 16
static char oldcommand_line[DEBUG_HISTORY][1024];
int last_oldcommand=-1;
int command_scroll = 0;
///=========================== SCANNER =======================
typedef enum {
LETTER, QUOTE, SPECIAL, EOF_CODE, DIGIT,
} CHAR_CODE;
typedef enum {
NO_TOKEN, IDENTIFIER, NUMBER, STRING,
} TOKEN_CODE;
#define MAX_TOKEN_STRING_LENGTH 128
char scanner_ch;
TOKEN_CODE scanner_token;
char scanner_token_string[MAX_TOKEN_STRING_LENGTH];
char scanner_word_string[MAX_TOKEN_STRING_LENGTH];
char * scanner_bufferp = "";
char * scanner_tokenp = scanner_token_string;
CHAR_CODE scanner_char_table[256];
#define scanner_char_code(x) scanner_char_table[x]
void scanner_get_char()
{
if ( *scanner_bufferp == '\0' ) {
scanner_ch = 0;
return;
}
scanner_ch = *scanner_bufferp++;
}
void scanner_init()
{
int ch;
for (ch=0; ch<256; ++ch) scanner_char_table[ch] = SPECIAL;
for (ch='0'; ch<='9'; ++ch) scanner_char_table[ch] = DIGIT;
for (ch='A'; ch<='Z'; ++ch) scanner_char_table[ch] = LETTER;
for (ch='a'; ch<='z'; ++ch) scanner_char_table[ch] = LETTER;
scanner_char_table['.'] = DIGIT;
scanner_char_table['-'] = DIGIT;
scanner_char_table['+'] = DIGIT;
scanner_char_table['_'] = LETTER;
scanner_char_table[34] = QUOTE;
scanner_char_table[0] = EOF_CODE;
scanner_char_table[':'] = LETTER;
scanner_char_table['\\'] = LETTER;
scanner_ch = 0;
}
void scanner_skip_blanks()
{
while( (scanner_ch ==' ') || (scanner_ch =='\t') )
scanner_get_char();
}
void scanner_downshift_word()
{
int offset = 'a' - 'A';
char * tp;
strcpy( scanner_word_string, scanner_token_string );
tp = scanner_word_string;
do {
*tp = (char)((*tp>='A') && (*tp <='Z') ? *tp + offset : *tp) ;
tp++;
} while (*tp != '\0' );
}
void scanner_get_word()
{
while( (scanner_char_code(scanner_ch)==LETTER) || (scanner_char_code(scanner_ch)==DIGIT) ) {
*scanner_tokenp++ = scanner_ch;
scanner_get_char();
}
*scanner_tokenp = '\0';
scanner_token = IDENTIFIER;
}
void scanner_get_string()
{
*scanner_tokenp++ = 34;
scanner_get_char();
while(scanner_ch != 34 ) {
*scanner_tokenp++ = scanner_ch;
scanner_get_char();
}
scanner_get_char();
*scanner_tokenp++ = 34;
*scanner_tokenp = '\0';
scanner_token = STRING;
}
void scanner_get_token()
{
scanner_skip_blanks();
scanner_tokenp = scanner_token_string;
*scanner_tokenp = 0;
switch( scanner_char_code(scanner_ch) ) {
case QUOTE: scanner_get_string(); break;
case EOF_CODE: scanner_token = NO_TOKEN; break;
case DIGIT:
case LETTER: scanner_get_word(); break;
default:
*scanner_tokenp++ = scanner_ch;
*scanner_tokenp = '\0';
scanner_get_char();
scanner_token = IDENTIFIER;
break;
}
scanner_downshift_word();
}
void scanner_start_command( char * s )
{
scanner_bufferp = s;
scanner_get_char();
}
int Dc_debug_on = 0;
jmp_buf dc_bad_arg;
void dc_get_arg(uint type)
{
scanner_get_token();
Dc_command_line = scanner_bufferp;
Dc_arg_org = scanner_token_string;
Dc_arg = scanner_word_string;
if (Dc_debug_on) {
dc_printf( "next arg is '%s', was originally '%s'\n", Dc_arg, Dc_arg_org );
dc_printf( "Rest of the command line is '%s'\n", Dc_command_line );
}
if ( scanner_token == NO_TOKEN ) {
Dc_arg_type = ARG_NONE;
} else if ( scanner_token == IDENTIFIER ) {
Dc_arg_type = ARG_STRING;
} else if ( scanner_token == STRING ) {
Dc_arg_type = ARG_QUOTE;
} else {
Dc_arg_type = ARG_STRING;
}
if ( Dc_arg_type & ARG_STRING ) {
int i, num_digits, len;
len = strlen(Dc_arg);
num_digits = 0;
for (i=0; i<len; i++)
if ( scanner_char_table[Dc_arg[i]] == DIGIT ) num_digits++;
if ( num_digits==len ) {
Dc_arg_type |= ARG_FLOAT;
Dc_arg_float = (float)atof(Dc_arg);
if ( !strchr( Dc_arg, '.' )) {
Dc_arg_type |= ARG_INT;
Dc_arg_int = atoi(Dc_arg);
}
} else {
if ( (Dc_arg[0] == '0') && (Dc_arg[1] == 'x') ) {
char *p;
int n;
n = strtol(Dc_arg,&p,0);
if ( *p == 0 ) {
Dc_arg_type |= ARG_INT|ARG_HEX;
Dc_arg_int = n;
}
}
}
if (Dc_debug_on) {
if ( Dc_arg_type & ARG_FLOAT )
dc_printf( "Found float number! %f\n", Dc_arg_float );
if ( Dc_arg_type & ARG_INT )
dc_printf( "Found int number! %d\n", Dc_arg_int );
if ( Dc_arg_type & ARG_HEX )
dc_printf( "Found hex number! 0x%x\n", Dc_arg_int );
}
if ( !stricmp( Dc_arg, "on" ))
Dc_arg_type |= ARG_TRUE;
if ( !stricmp( Dc_arg, "true" ))
Dc_arg_type |= ARG_TRUE;
if ( !stricmp( Dc_arg, "off" ))
Dc_arg_type |= ARG_FALSE;
if ( !stricmp( Dc_arg, "false" ))
Dc_arg_type |= ARG_FALSE;
if ( !stricmp( Dc_arg, "+" ))
Dc_arg_type |= ARG_PLUS;
if ( !stricmp( Dc_arg, "-" ))
Dc_arg_type |= ARG_MINUS;
if ( !stricmp( Dc_arg, "," ))
Dc_arg_type |= ARG_COMMA;
}
if ( Dc_arg_type & ARG_INT) {
if ( Dc_arg_int )
Dc_arg_type |= ARG_TRUE;
else
Dc_arg_type |= ARG_FALSE;
}
if ( !(Dc_arg_type&type) ) {
if ( (Dc_arg_type & ARG_NONE) && !(type & ARG_NONE))
dc_printf( "Error: Not enough parameters.\n" );
else
dc_printf( "Error: '%s' invalid type\n", Dc_arg );
longjmp(dc_bad_arg,1);
}
}
void debug_help();
void debug_do_command(char * command)
{
int i;
int mode = 0;
if ( strlen(command) < 1 ) return;
Dc_debug_on = 0;
Dc_command_line = command;
scanner_start_command(command);
if (setjmp(dc_bad_arg) ) {
return;
}
dc_get_arg( ARG_ANY );
if ( !strcmp( Dc_arg, "debug" ) ) {
Dc_debug_on = 1;
dc_printf( "Command line: '%s'\n", Dc_command_line );
dc_get_arg( ARG_ANY );
}
if ( !strcmp( Dc_arg, "?" ) ) {
mode = 1;
dc_get_arg( ARG_ANY );
if ( Dc_arg_type&ARG_NONE ) {
debug_help();
return;
}
}
if ( !strcmp( Dc_arg, "help" ) || !strcmp( Dc_arg, "man" ) ) {
mode = 2;
dc_get_arg( ARG_ANY );
if ( Dc_arg_type&ARG_NONE ) {
debug_help();
return;
}
}
if ( strstr( Dc_command_line, "?" ) ) {
mode = 2;
}
if ( !(Dc_arg_type&ARG_STRING) ) {
dc_printf( "Invalid keyword '%s'\n", Dc_arg );
return;
}
if (Dc_debug_on) {
dc_printf( "Searching for command '%s'\n", Dc_arg );
}
for (i=0; i<Num_debug_commands; i++ ) {
if ( !stricmp( Debug_command[i]->name, Dc_arg )) {
if (mode==0) {
if (Dc_debug_on)
dc_printf( "Calling function '%s'\n", Dc_arg );
Dc_command = 1;
Dc_help = 0;
Dc_status = 1;
} else if (mode==1) {
if (Dc_debug_on)
dc_printf( "Checking status for '%s'\n", Dc_arg );
Dc_command = 0;
Dc_help = 0;
Dc_status = 1;
} else {
if (Dc_debug_on)
dc_printf( "Doing help for '%s'\n", Dc_arg );
Dc_command = 0;
Dc_help = 1;
Dc_status = 0;
}
(*Debug_command[i]->func)();
if (mode==0) {
dc_get_arg(ARG_ANY);
if (!(Dc_arg_type&ARG_NONE)) {
dc_printf( "Ignoring the unused command line tail '%s %s'\n", Dc_arg_org, Dc_command_line );
}
}
return;
}
}
dc_printf( "Unknown command '%s'\n", Dc_arg );
}
void debug_draw()
{
int i;
gr_clear();
gr_set_font(FONT1);
gr_set_color_fast( &Color_bright );
gr_string( 0x8000, 3, "Debug Console" );
gr_set_color_fast( &Color_normal );
for (i=0; i<DROWS; i++ ) {
gr_string( 0, i*16+16, debug_text[i] );
}
int t = timer_get_fixed_seconds() / (F1_0/3);
if ( t & 1 ) {
int w,h;
char c;
c = debug_text[debug_y][command_line_pos+1];
debug_text[debug_y][command_line_pos+1] = 0;
gr_get_string_size( &w, &h, debug_text[debug_y] );
//gr_string( w, debug_y*16, "_" );
gr_rect(w+1,debug_y*16+1+16,2,14);
debug_text[debug_y][command_line_pos+1] = c;
}
gr_flip();
}
void debug_output( char c )
{
if ( c == '\t' ) {
int next_tab = ((debug_x/28)+1)*28;
if ( next_tab >= DCOLS-1 ) {
debug_x=0;
debug_y++;
scroll_times++;
if ( debug_y >= DROWS ) {
int i;
for (i=1; i<DROWS; i++ )
strcpy( debug_text[i-1], debug_text[i] );
debug_y = DROWS-1;
debug_x = 0;
debug_text[debug_y][debug_x] = 0;
}
debug_text[debug_y][debug_x] = 0;
return;
}
for ( ; debug_x < next_tab; )
debug_text[debug_y][debug_x++] = ' ';
debug_text[debug_y][debug_x] = 0;
return;
}
if ( (c == '\n') || (debug_x >= DCOLS-1) ) {
debug_x=0;
debug_y++;
scroll_times++;
if ( debug_y >= DROWS ) {
int i;
for (i=1; i<DROWS; i++ )
strcpy( debug_text[i-1], debug_text[i] );
debug_y = DROWS-1;
debug_x = 0;
debug_text[debug_y][debug_x] = 0;
}
debug_text[debug_y][debug_x] = 0;
if ( c == '\n' ) return;
}
debug_text[debug_y][debug_x++] = c;
debug_text[debug_y][debug_x] = 0;
}
void dc_printf(char *format, ...)
{
char tmp[DCOLS*2];
va_list args;
va_start(args, format);
vsprintf(tmp, format, args);
va_end(args);
char *p = tmp;
while( *p ) {
debug_output(*p);
p++;
}
}
void debug_init()
{
int i;
if ( debug_inited ) return;
debug_inited = 1;
debug_x=0;
debug_y=0;
for (i=0; i<DROWS; i++ ) {
debug_text[i][0] = 0;
}
dc_printf("Debug console started.\n" );
}
void debug_console( void (*_func)() )
{
int done = 0;
scanner_init();
while( key_inkey() ){
os_poll();
}
if ( !debug_inited ) debug_init();
debug_draw();
while (!done) {
// poll the os
os_poll();
int k = key_inkey();
switch( k ) {
case KEY_SHIFTED+KEY_ENTER:
case KEY_ESC:
done=1; break;
case KEY_BACKSP:
if ( command_line_pos > 0 ) {
command_line[--command_line_pos] = 0;
}
break;
case KEY_F3:
if ( last_oldcommand > -1 ) {
strcpy( command_line, oldcommand_line[last_oldcommand] );
command_line_pos = strlen(command_line);
command_line[command_line_pos] = 0;
}
break;
case KEY_UP:
command_scroll--;
if (command_scroll<0)
command_scroll = last_oldcommand;
if ( command_scroll > -1 ) {
strcpy( command_line, oldcommand_line[command_scroll] );
command_line_pos = strlen(command_line);
command_line[command_line_pos] = 0;
}
break;
case KEY_DOWN:
command_scroll++;
if (command_scroll>last_oldcommand)
command_scroll = 0;
if (command_scroll>last_oldcommand)
command_scroll = -1;
if ( command_scroll > -1 ) {
strcpy( command_line, oldcommand_line[command_scroll] );
command_line_pos = strlen(command_line);
command_line[command_line_pos] = 0;
}
break;
case KEY_ENTER: {
debug_output( '\n' );
debug_draw();
debug_do_command(command_line);
int i, found = 0;
for (i=0; i<=last_oldcommand; i++ ) {
if (!stricmp( oldcommand_line[i], command_line )) {
found = 1;
}
}
if ( !found ) {
if ( last_oldcommand < DEBUG_HISTORY-1 ) {
last_oldcommand++;
strcpy( oldcommand_line[last_oldcommand], command_line);
} else {
int i;
for (i=0; i<last_oldcommand; i++ ) {
strcpy( oldcommand_line[i], oldcommand_line[i+1] );
}
strcpy( oldcommand_line[last_oldcommand], command_line);
}
}
// int i;
// for (i=0; i<=last_oldcommand; i++ ) {
// dc_printf( "OC %d. %s\n", i, oldcommand_line[i] );
// }
debug_output( '\n' );
command_line_pos = 0;
command_line[command_line_pos] = 0;
command_scroll = 0;
}
break;
default: {
ubyte c = (ubyte)key_to_ascii(k);
if ( c != 255 ) {
command_line[command_line_pos++] = c;
command_line[command_line_pos] = 0;
}
}
}
strcpy( debug_text[debug_y], ">" );
strcat( debug_text[debug_y], command_line );
debug_draw();
if ( _func ){
_func();
}
}
while( key_inkey() ){
os_poll();
}
}
void debug_help()
{
int s, i;
dc_printf( "Available functions:\n\n" );
s = scroll_times;
for (i=0; i<Num_debug_commands; i++ ) {
dc_printf( " %s - %s\n", Debug_command[i]->name, Debug_command[i]->help );
//mprintf(( "Scroll times %d\n", scroll_times - s ));
if ( scroll_times - s > DROWS - 3 ) {
int k;
dc_printf( " Press a key...B for back\n" );
debug_draw();
k = key_getch();
s = scroll_times;
if ( k == KEY_B ) {
i -= ((DROWS-3)*2);
if ( i <= 0 )
i = -1;
}
}
debug_draw();
}
dc_printf( "\n" );
dc_printf( "Typing '? function_name' will give the current status.\n" );
dc_printf( "Typing 'function_name ?' will give help on the function.\n" );
dc_printf( "Typing ? or help will give you help.\n");
dc_printf( "F3 selects last command line.\n" );
}
File diff suppressed because it is too large. Load diff
-112
View File
@@ -1,112 +0,0 @@
/*
* 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/Demo/Demo.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:56 $
* $Author: penguin $
*
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:04 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 3/29/99 6:17p Dave
* More work on demo system. Got just about everything in except for
* blowing ships up, secondary weapons and player death/warpout.
*
* 2 3/28/99 5:58p Dave
* Added early demo code. Make objects move. Nice and framerate
* independant, but not much else. Don't use yet unless you're me :)
*
*
* $NoKeywords: $
*/
#ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
#define _FS2_DEMO_SYSTEM_HEADER_FILE
// -----------------------------------------------------------------------------------------------------------------------------
// DEMO DEFINES/VARS
//
// compile in the demo system
#define DEMO_SYSTEM
struct object;
struct ship;
// an error reading or writing the demo file
#define DEMO_ERROR_NONE 0 // no error
#define DEMO_ERROR_GENERAL 1 // general problem
#define DEMO_ERROR_FRAMESIZE 2 // frame size was too big (> 32k)
#define DEMO_ERROR_DISK_SPACE 3 // out of disk space
#define DEMO_ERROR_DISK_ACCESS 4 // problem accessing disk
#define DEMO_ERROR_VERSION 5 // bad version #
#define DEMO_ERROR_MISSION 6 // different mission file checksums
extern int Demo_error;
extern int Demo_make;
// -----------------------------------------------------------------------------------------------------------------------------
// DEMO FUNCTIONS
//
// do frame for the demo - start for the frame
int demo_do_frame_start();
// do frame for the demo - end for the frame
int demo_do_frame_end();
// initialize a demo for recording
// NOTE : call this after loading the mission and going through the briefing, but _before_ physically moving into the mission
int demo_start_record(char *file);
// initialize a demo for playback - calling this will load up the demo file and move the player into the playback state
int demo_start_playback(char *file);
// finish the demo, whether recording or playing back
void demo_close();
// if we should run the simulation for this object, or let the demo system handle it
int demo_should_sim(object *objp);
// functions for posting critical events to the demo system ------------------------------------------------------------
// post an object dump event (only used internally)
void demo_POST_object_dump();
// post a primary fired event
void demo_POST_primary_fired(object *objp, int banks, int linked);
// post a unique message
void demo_POST_unique_message(char *id, char *who_from, int m_source, int priority);
// post a builtin message
void demo_POST_builtin_message(int type, ship *shipp, int priority, int timing);
// post an object create message
void demo_POST_obj_create(char *pobj_name, int signature);
// post a warpin event
void demo_POST_warpin(int signature, int ship_flags);
// post a warpout event
void demo_POST_warpout(int signature, int ship_flags);
// post a departed event
void demo_POST_departed(int signature, int ship_flags);
// post a ship kill event
void demo_POST_ship_kill(object *objp);
#endif
-131
View File
@@ -1,131 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
*
* File: async.h
* Content: AsyncData object include file
***************************************************************************/
#ifndef __ASYNC_INCLUDED__
#define __ASYNC_INCLUDED__
#include <ole2.h> // for DECLARE_INTERFACE and HRESULT
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* GUIDS used by DPAsyncData objects
*/
// {47BCD7E0-2E89-11d0-A889-00A0C905433C}
DEFINE_GUID(IID_IDPAsyncData, 0x47bcd7e0, 0x2e89, 0x11d0, 0xa8, 0x89, 0x0, 0xa0, 0xc9, 0x5, 0x43, 0x3c);
/****************************************************************************
*
* IDPAsyncData Structures
*
* Various structures used to invoke DPAsyncData.
*
****************************************************************************/
typedef struct IDPAsyncData FAR *LPDPASYNCDATA;
/****************************************************************************
*
* IDPAsyncData Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDPAsyncData
DECLARE_INTERFACE_( IDPAsyncData, IUnknown )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDPAsyncData Methods */
STDMETHOD(AddItem) (THIS_ LPDWORD, LPVOID, DWORD) PURE;
STDMETHOD(Cancel) (THIS) PURE;
STDMETHOD(GetFlags) (THIS_ LPDWORD) PURE;
STDMETHOD(GetItem) (THIS_ DWORD, LPVOID *) PURE;
STDMETHOD(GetItemCount) (THIS_ LPDWORD) PURE;
STDMETHOD(GetStatus) (THIS_ LPDWORD, LPDWORD, HRESULT *) PURE;
STDMETHOD(IsSnapshotCurrent) (THIS) PURE;
STDMETHOD(RefreshSnapshot) (THIS) PURE;
STDMETHOD(RemoveItem) (THIS_ DWORD) PURE;
STDMETHOD(SetFlags) (THIS_ DWORD) PURE;
STDMETHOD(SetItem) (THIS_ DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetStatus) (THIS_ DWORD) PURE;
STDMETHOD(SetStatusEvent) (THIS_ DWORD, HANDLE) PURE;
};
/****************************************************************************
*
* IDPAsyncData interface macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDPAsyncData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDPAsyncData_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDPAsyncData_Release(p) (p)->lpVtbl->Release(p)
#define IDPAsyncData_AddItem(p) (p)->lpVtbl->AddItem(p)
#define IDPAsyncData_Cancel(p) (p)->lpVtbl->Cancel(p)
#define IDPAsyncData_GetItem(p,a,b) (p)->lpVtbl->GetItem(p,a,b)
#define IDPAsyncData_GetItemCount(p,a) (p)->lpVtbl->GetItemCount(p,a)
#define IDPAsyncData_GetStatus(p,a,b,c) (p)->lpVtbl->GetStatus(p,a,b,c)
#define IDPAsyncData_IsSnapshotCurrent(p) (p)->lpVtbl->IsSnapshotCurrent(p)
#define IDPAsyncData_RefreshSnapshot(p) (p)->lpVtbl->RefreshSnapshot(p)
#define IDPAsyncData_RemoveItem(p) (p)->lpVtbl->RemoveItem(p)
#define IDPAsyncData_SetFlags(p) (p)->lpVtbl->SetFlags(p)
#define IDPAsyncData_SetItem(p) (p)->lpVtbl->SetItem(p)
#define IDPAsyncData_SetStatus(p) (p)->lpVtbl->SetStatus(p)
#define IDPAsyncData_SetStatusEvent(p,a,b) (p)->lpVtbl->SetStatusEvent(p,a,b)
#else /* C++ */
#define IDPAsyncData_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDPAsyncData_AddRef(p) (p)->AddRef()
#define IDPAsyncData_Release(p) (p)->Release()
#define IDPAsyncData_AddItem(p) (p)->AddItem()
#define IDPAsyncData_Cancel(p) (p)->Cancel()
#define IDPAsyncData_GetItem(p,a,b) (p)->GetItem(a,b)
#define IDPAsyncData_GetItemCount(p,a) (p)->GetItemCount(a)
#define IDPAsyncData_GetStatus(p,a,b,c) (p)->GetStatus(a,b,c)
#define IDPAsyncData_IsSnapshotCurrent(p) (p)->IsSnapshotCurrent()
#define IDPAsyncData_RefreshSnapshot(p) (p)->RefreshSnapshot()
#define IDPAsyncData_RemoveItem(p) (p)->RemoveItem()
#define IDPAsyncData_SetFlags(p) (p)->SetFlags()
#define IDPAsyncData_SetItem(p) (p)->SetItem()
#define IDPAsyncData_SetStatus(p) (p)->SetStatus()
#define IDPAsyncData_SetStatusEvent(p,a,b) (p)->SetStatusEvent(a,b)
#endif
/****************************************************************************
*
* AsyncData Flags
*
****************************************************************************/
/*
* This flag is set if the ItemData is ANSI. If it is not set, the ItemData
* is either Unicode or doesn't contain any string information.
*/
#define DPASYNCDATA_ANSI (0x00000001)
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __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 "vd3dtypes.h"
#include "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 "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 1.1 2002-06-03 03:25:56 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 "vddraw.h"
//@@BEGIN_MSINTERNAL
#endif
//@@END_MSINTERNAL
#include "vd3d.h"
// @@BEGIN_MSINTERNAL
#if !defined(BUILD_RLAPI) && !defined(BUILD_DDDDK)
#include "vddrawi.h"
#include "rlreg.h"
#include "lists.h"
#include "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 "vddraw.h"
#include "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 "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
-48
View File
@@ -1,48 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: d3drm.h
* Content: Direct3DRM include file
*
***************************************************************************/
#ifndef __D3DRMWIN_H__
#define __D3DRMWIN_H__
#ifndef WIN32
#define WIN32
#endif
#include "vd3drm.h"
#include "vddraw.h"
#include "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
File diff suppressed because it is too large. Load diff
-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;
}
File diff suppressed because it is too large. Load diff
Binary file not shown.
File diff suppressed because it is too large. Load diff
Binary file not shown.
File diff suppressed because it is too large. Load diff
-627
View File
@@ -1,627 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dplobby.h
* Content: DirectPlayLobby include file
***************************************************************************/
#ifndef __DPLOBBY_INCLUDED__
#define __DPLOBBY_INCLUDED__
#include "vdplay.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
* GUIDS used by DirectPlay objects
*/
/* {AF465C71-9588-11cf-A020-00AA006157AC} */
DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
/* {26C66A70-B367-11cf-A024-00AA006157AC} */
DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
/* {0194C220-A303-11d0-9C4F-00A0C905425E} */
DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/****************************************************************************
*
* IDirectPlayLobby Structures
*
* Various structures used to invoke DirectPlayLobby.
*
****************************************************************************/
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY;
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA;
typedef struct IDirectPlayLobby IDirectPlayLobbyA;
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2;
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A;
typedef struct IDirectPlayLobby2 IDirectPlayLobby2A;
/*
* DPLAPPINFO
* Used to hold information about a registered DirectPlay
* application
*/
typedef struct DPLAPPINFO
{
DWORD dwSize; // Size of this structure
GUID guidApplication; // GUID of the Application
union
{
LPSTR lpszAppNameA; // Pointer to the Application Name
LPWSTR lpszAppName;
};
} DPLAPPINFO, FAR *LPDPLAPPINFO;
/*
* LPCDPLAPPINFO
* A constant pointer to DPLAPPINFO
*/
typedef const DPLAPPINFO FAR *LPCDPLAPPINFO;
/*
* DPCOMPOUNDADDRESSELEMENT
*
* An array of these is passed to CreateCompoundAddresses()
*/
typedef struct DPCOMPOUNDADDRESSELEMENT
{
GUID guidDataType;
DWORD dwDataSize;
LPVOID lpData;
} DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT;
/*
* LPCDPCOMPOUNDADDRESSELEMENT
* A constant pointer to DPCOMPOUNDADDRESSELEMENT
*/
typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT;
/****************************************************************************
*
* Enumeration Method Callback Prototypes
*
****************************************************************************/
/*
* Callback for EnumAddress()
*/
typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)(
REFGUID guidDataType,
DWORD dwDataSize,
LPCVOID lpData,
LPVOID lpContext);
/*
* Callback for EnumAddressTypes()
*/
typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)(
REFGUID guidDataType,
LPVOID lpContext,
DWORD dwFlags);
/*
* Callback for EnumLocalApplications()
*/
typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
LPCDPLAPPINFO lpAppInfo,
LPVOID lpContext,
DWORD dwFlags);
/****************************************************************************
*
* DirectPlayLobby API Prototypes
*
****************************************************************************/
#ifdef UNICODE
#define DirectPlayLobbyCreate DirectPlayLobbyCreateW
#else
#define DirectPlayLobbyCreate DirectPlayLobbyCreateA
#endif /* UNICODE */
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
/****************************************************************************
*
* IDirectPlayLobby (and IDirectPlayLobbyA) Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayLobby
DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectPlayLobby Methods */
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
};
/****************************************************************************
*
* IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
*
****************************************************************************/
#undef INTERFACE
#define INTERFACE IDirectPlayLobby2
DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby )
{
/* IUnknown Methods */
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/* IDirectPlayLobby Methods */
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
/* IDirectPlayLobby2 Methods */
STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
};
/****************************************************************************
*
* IDirectPlayLobby interface macros
*
****************************************************************************/
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
#else /* C++ */
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectPlayLobby_AddRef(p) (p)->AddRef()
#define IDirectPlayLobby_Release(p) (p)->Release()
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c)
#endif
/****************************************************************************
*
* DirectPlayLobby Flags
*
****************************************************************************/
/*
* This is a message flag used by ReceiveLobbyMessage. It can be
* returned in the dwMessageFlags parameter to indicate a message from
* the system.
*/
#define DPLMSG_SYSTEM 0x00000001
/*
* This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
* It is used to indicate that the message is a standard lobby message.
* DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
* DPLMSG_GETPROPERTYRESPONSE
*/
#define DPLMSG_STANDARD 0x00000002
/****************************************************************************
*
* DirectPlayLobby messages and message data structures
*
* All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
* from a call to ReceiveLobbyMessage.
*
* All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
* from a call to ReceiveLobbyMessage.
*
****************************************************************************/
/*
* DPLMSG_GENERIC
* Generic message structure used to identify the message type.
*/
typedef struct _DPLMSG_GENERIC
{
DWORD dwType; // Message type
} DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC;
/*
* DPLMSG_SETPROPERTY
* Standard message sent by an application to a lobby to set a
* property
*/
typedef struct _DPLMSG_SETPROPERTY
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
DWORD dwDataSize; // Size of data
DWORD dwPropertyData[1]; // Buffer containing data
} DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY;
#define DPL_NOCONFIRMATION 0
/*
* DPLMSG_SETPROPERTYRESPONSE
* Standard message returned by a lobby to confirm a
* DPLMSG_SETPROPERTY message.
*/
typedef struct _DPLMSG_SETPROPERTYRESPONSE
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
HRESULT hr; // Return Code
} DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE;
/*
* DPLMSG_GETPROPERTY
* Standard message sent by an application to a lobby to request
* the current value of a property
*/
typedef struct _DPLMSG_GETPROPERTY
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
} DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY;
/*
* DPLMSG_GETPROPERTYRESPONSE
* Standard message returned by a lobby in response to a
* DPLMSG_GETPROPERTY message.
*/
typedef struct _DPLMSG_GETPROPERTYRESPONSE
{
DWORD dwType; // Message type
DWORD dwRequestID; // Request ID
GUID guidPlayer; // Player GUID
GUID guidPropertyTag; // Property GUID
HRESULT hr; // Return Code
DWORD dwDataSize; // Size of data
DWORD dwPropertyData[1]; // Buffer containing data
} DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE;
/******************************************
*
* DirectPlay Lobby message dwType values
*
*****************************************/
/*
* The application has read the connection settings.
* It is now O.K. for the lobby client to release
* its IDirectPlayLobby interface.
*/
#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001
/*
* The application's call to DirectPlayConnect failed
*/
#define DPLSYS_DPLAYCONNECTFAILED 0x00000002
/*
* The application has created a DirectPlay session.
*/
#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003
/*
* The application has terminated.
*/
#define DPLSYS_APPTERMINATED 0x00000004
/*
* The message is a DPLMSG_SETPROPERTY message.
*/
#define DPLSYS_SETPROPERTY 0x00000005
/*
* The message is a DPLMSG_SETPROPERTYRESPONSE message.
*/
#define DPLSYS_SETPROPERTYRESPONSE 0x00000006
/*
* The message is a DPLMSG_GETPROPERTY message.
*/
#define DPLSYS_GETPROPERTY 0x00000007
/*
* The message is a DPLMSG_GETPROPERTYRESPONSE message.
*/
#define DPLSYS_GETPROPERTYRESPONSE 0x00000008
/****************************************************************************
*
* DirectPlay defined property GUIDs and associated data structures
*
****************************************************************************/
/*
* DPLPROPERTY_MessagesSupported
*
* Request whether the lobby supports standard. Lobby with respond with either
* TRUE or FALSE or may not respond at all.
*
* Property data is a single BOOL with TRUE or FALSE
*/
// {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_MessagesSupported,
0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLPROPERTY_LobbyGuid
*
* Request the GUID that identifies the lobby software that the application
* is communicating with.
*
* Property data is a single GUID.
*/
// {F56920A0-D218-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_LobbyGuid,
0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLPROPERTY_PlayerGuid
*
* Request the GUID that identifies the player on this machine for sending
* property data back to the lobby.
*
* Property data is the DPLDATA_PLAYERDATA structure
*/
// {B4319322-D20D-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_PlayerGuid,
0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLDATA_PLAYERGUID
*
* Data structure to hold the GUID of the player and player creation flags
* from the lobby.
*/
typedef struct _DPLDATA_PLAYERGUID
{
GUID guidPlayer;
DWORD dwPlayerFlags;
} DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID;
/*
* DPLPROPERTY_PlayerScore
*
* Used to send an array of long integers to the lobby indicating the
* score of a player.
*
* Property data is the DPLDATA_PLAYERSCORE structure.
*/
// {48784000-D219-11d0-BA39-00C04FD7ED67}
DEFINE_GUID(DPLPROPERTY_PlayerScore,
0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*
* DPLDATA_PLAYERSCORE
*
* Data structure to hold an array of long integers representing a player score.
* Application must allocate enough memory to hold all the scores.
*/
typedef struct _DPLDATA_PLAYERSCORE
{
DWORD dwScoreCount;
LONG Score[1];
} DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE;
/****************************************************************************
*
* DirectPlay Address ID's
*
****************************************************************************/
/* DirectPlay Address
*
* A DirectPlay address consists of multiple chunks of data, each tagged
* with a GUID signifying the type of data in the chunk. The chunk also
* has a length so that unknown chunk types can be skipped.
*
* The EnumAddress() function is used to parse these address data chunks.
*/
/*
* DPADDRESS
*
* Header for block of address data elements
*/
typedef struct _DPADDRESS
{
GUID guidDataType;
DWORD dwDataSize;
} DPADDRESS;
typedef DPADDRESS FAR *LPDPADDRESS;
/*
* DPAID_TotalSize
*
* Chunk is a DWORD containing size of entire DPADDRESS structure
*/
// {1318F560-912C-11d0-9DAA-00A0C90A43CB}
DEFINE_GUID(DPAID_TotalSize,
0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
/*
* DPAID_ServiceProvider
*
* Chunk is a GUID describing the service provider that created the chunk.
* All addresses must contain this chunk.
*/
// {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_ServiceProvider,
0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_LobbyProvider
*
* Chunk is a GUID describing the lobby provider that created the chunk.
* All addresses must contain this chunk.
*/
// {59B95640-9667-11d0-A77D-0000F803ABFC}
DEFINE_GUID(DPAID_LobbyProvider,
0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/*
* DPAID_Phone and DPAID_PhoneW
*
* Chunk is a string containing a phone number (i.e. "1-800-555-1212")
* in ANSI or UNICODE format
*/
// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_Phone,
0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
DEFINE_GUID(DPAID_PhoneW,
0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_Modem and DPAID_ModemW
*
* Chunk is a string containing a modem name registered with TAPI
* in ANSI or UNICODE format
*/
// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
DEFINE_GUID(DPAID_Modem,
0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
DEFINE_GUID(DPAID_ModemW,
0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPAID_Inet and DPAID_InetW
*
* Chunk is a string containing a TCP/IP host name or an IP address
* (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
*/
// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_INet,
0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
// {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
DEFINE_GUID(DPAID_INetW,
0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/*
* DPCOMPORTADDRESS
*
* Used to specify com port settings. The constants that define baud rate,
* stop bits and parity are defined in WINBASE.H. The constants for flow
* control are given below.
*/
#define DPCPA_NOFLOW 0 // no flow control
#define DPCPA_XONXOFFFLOW 1 // software flow control
#define DPCPA_RTSFLOW 2 // hardware flow control with RTS
#define DPCPA_DTRFLOW 3 // hardware flow control with DTR
#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR
typedef struct _DPCOMPORTADDRESS
{
DWORD dwComPort; // COM port to use (1-4)
DWORD dwBaudRate; // baud rate (100-256k)
DWORD dwStopBits; // no. stop bits (1-2)
DWORD dwParity; // parity (none, odd, even, mark)
DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr)
} DPCOMPORTADDRESS;
typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS;
/*
* DPAID_ComPort
*
* Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
*/
// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
DEFINE_GUID(DPAID_ComPort,
0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/****************************************************************************
*
* dplobby 1.0 obsolete definitions
* Included for compatibility only.
*
****************************************************************************/
#define DPLAD_SYSTEM DPLMSG_SYSTEM
#ifdef __cplusplus
};
#endif /* __cplusplus */
#endif /* __DPLOBBY_INCLUDED__ */
-267
View File
@@ -1,267 +0,0 @@
/*==========================================================================
*
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dsetup.h
* Content: DirectXSetup, error codes and flags
***************************************************************************/
#ifndef __DSETUP_H__
#define __DSETUP_H__
#include <windows.h> // windows stuff
#ifdef _WIN32
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#endif
#ifdef __cplusplus
extern "C" {
#endif
// DSETUP Error Codes, must remain compatible with previous setup.
#define DSETUPERR_SUCCESS_RESTART 1
#define DSETUPERR_SUCCESS 0
#define DSETUPERR_BADWINDOWSVERSION -1
#define DSETUPERR_SOURCEFILENOTFOUND -2
#define DSETUPERR_BADSOURCESIZE -3
#define DSETUPERR_BADSOURCETIME -4
#define DSETUPERR_NOCOPY -5
#define DSETUPERR_OUTOFDISKSPACE -6
#define DSETUPERR_CANTFINDINF -7
#define DSETUPERR_CANTFINDDIR -8
#define DSETUPERR_INTERNAL -9
#define DSETUPERR_NTWITHNO3D -10 /* REM: obsolete, you'll never see this */
#define DSETUPERR_UNKNOWNOS -11
#define DSETUPERR_USERHITCANCEL -12
#define DSETUPERR_NOTPREINSTALLEDONNT -13
// DSETUP flags. DirectX 5.0 apps should use these flags only.
#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */
#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */
#define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */
#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
#define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */
// These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
// They are present to allow DX3 apps to be recompiled with DX5 and still work.
// DO NOT USE THEM for DX5. They will go away in future DX releases.
#define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */
#define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */
#define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */
#define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */
#define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */
#define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */
#define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */
#define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */
#define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */
#define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */
#define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */
//******************************************************************
// DirectX Setup Callback mechanism
//******************************************************************
// DSETUP Message Info Codes, passed to callback as Reason parameter.
#define DSETUP_CB_MSG_NOMESSAGE 0
#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS 1
#define DSETUP_CB_MSG_CANTINSTALL_NT 2
#define DSETUP_CB_MSG_CANTINSTALL_BETA 3
#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32 4
#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE 5
#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM 6
#define DSETUP_CB_MSG_PREINSTALL_NT 7
#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT 8
#define DSETUP_CB_MSG_SETUP_INIT_FAILED 9
#define DSETUP_CB_MSG_INTERNAL_ERROR 10
#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE 11
#define DSETUP_CB_MSG_OUTOFDISKSPACE 12
#define DSETUP_CB_MSG_BEGIN_INSTALL 13
#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14
#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS 15
#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS 16
#define DSETUP_CB_MSG_FILECOPYERROR 17
#define DSETUP_CB_UPGRADE_TYPE_MASK 0x000F
#define DSETUP_CB_UPGRADE_KEEP 0x0001
#define DSETUP_CB_UPGRADE_SAFE 0x0002
#define DSETUP_CB_UPGRADE_FORCE 0x0004
#define DSETUP_CB_UPGRADE_UNKNOWN 0x0008
#define DSETUP_CB_UPGRADE_HASWARNINGS 0x0100
#define DSETUP_CB_UPGRADE_CANTBACKUP 0x0200
#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE 0x0800
#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY 0x1000
#define DSETUP_CB_UPGRADE_DEVICE_MEDIA 0x2000
typedef struct _DSETUP_CB_UPGRADEINFO
{
DWORD UpgradeFlags;
} DSETUP_CB_UPGRADEINFO;
typedef struct _DSETUP_CB_FILECOPYERROR
{
DWORD dwError;
} DSETUP_CB_FILECOPYERROR;
#ifdef _WIN32
//
// Data Structures
//
#ifndef UNICODE_ONLY
typedef struct _DIRECTXREGISTERAPPA {
DWORD dwSize;
DWORD dwFlags;
LPSTR lpszApplicationName;
LPGUID lpGUID;
LPSTR lpszFilename;
LPSTR lpszCommandLine;
LPSTR lpszPath;
LPSTR lpszCurrentDirectory;
} DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
typedef struct _DIRECTXREGISTERAPPW {
DWORD dwSize;
DWORD dwFlags;
LPWSTR lpszApplicationName;
LPGUID lpGUID;
LPWSTR lpszFilename;
LPWSTR lpszCommandLine;
LPWSTR lpszPath;
LPWSTR lpszCurrentDirectory;
} DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
#endif //!ANSI_ONLY
#ifdef UNICODE
typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
#else
typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
#endif // UNICODE
//
// API
//
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXSetupA(
HWND hWnd,
LPSTR lpszRootPath,
DWORD dwFlags
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXSetupW(
HWND hWnd,
LPWSTR lpszRootPath,
DWORD dwFlags
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXSetup DirectXSetupW
#else
#define DirectXSetup DirectXSetupA
#endif // !UNICODE
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXDeviceDriverSetupA(
HWND hWnd,
LPSTR lpszDriverClass,
LPSTR lpszDriverPath,
DWORD dwFlags
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXDeviceDriverSetupW(
HWND hWnd,
LPWSTR lpszDriverClass,
LPWSTR lpszDriverPath,
DWORD dwFlags
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupW
#else
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupA
#endif // !UNICODE
#ifndef UNICODE_ONLY
INT
WINAPI
DirectXRegisterApplicationA(
HWND hWnd,
LPDIRECTXREGISTERAPPA lpDXRegApp
);
#endif //!UNICODE_ONLY
#ifndef ANSI_ONLY
INT
WINAPI
DirectXRegisterApplicationW(
HWND hWnd,
LPDIRECTXREGISTERAPPW lpDXRegApp
);
#endif //!ANSI_ONLY
#ifdef UNICODE
#define DirectXRegisterApplication DirectXRegisterApplicationW
#else
#define DirectXRegisterApplication DirectXRegisterApplicationA
#endif // !UNICODE
INT
WINAPI
DirectXUnRegisterApplication(
HWND hWnd,
LPGUID lpGUID
);
//
// Function Pointers
//
#ifdef UNICODE
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPW);
#else
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, DWORD);
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPA);
#endif // UNICODE
typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason,
DWORD MsgType, /* Same as flags to MessageBox */
LPSTR szMessage,
LPSTR szName,
void *pInfo);
INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback);
INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion);
#endif // WIN32
#ifdef __cplusplus
};
#endif
#endif
-863
View File
@@ -1,863 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1995,1996 Microsoft Corporation. All Rights Reserved.
*
* File: dsound.h
* Content: DirectSound include file
*
**************************************************************************/
#ifndef __DSOUND_INCLUDED__
#define __DSOUND_INCLUDED__
#include "vd3dtypes.h"
#define COM_NO_WINDOWS_H
#include <objbase.h>
#define _FACDS 0x878
#define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
// DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
//
// Structures
//
#ifdef __cplusplus
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
struct IDirectSound;
struct IDirectSoundBuffer;
struct IDirectSound3DListener;
struct IDirectSound3DBuffer;
struct IDirectSoundCapture;
struct IDirectSoundCaptureBuffer;
struct IDirectSoundNotify;
#endif // __cplusplus
typedef struct IDirectSound *LPDIRECTSOUND;
typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
typedef struct _DSCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwMinSecondarySampleRate;
DWORD dwMaxSecondarySampleRate;
DWORD dwPrimaryBuffers;
DWORD dwMaxHwMixingAllBuffers;
DWORD dwMaxHwMixingStaticBuffers;
DWORD dwMaxHwMixingStreamingBuffers;
DWORD dwFreeHwMixingAllBuffers;
DWORD dwFreeHwMixingStaticBuffers;
DWORD dwFreeHwMixingStreamingBuffers;
DWORD dwMaxHw3DAllBuffers;
DWORD dwMaxHw3DStaticBuffers;
DWORD dwMaxHw3DStreamingBuffers;
DWORD dwFreeHw3DAllBuffers;
DWORD dwFreeHw3DStaticBuffers;
DWORD dwFreeHw3DStreamingBuffers;
DWORD dwTotalHwMemBytes;
DWORD dwFreeHwMemBytes;
DWORD dwMaxContigFreeHwMemBytes;
DWORD dwUnlockTransferRateHwBuffers;
DWORD dwPlayCpuOverheadSwBuffers;
DWORD dwReserved1;
DWORD dwReserved2;
} DSCAPS, *LPDSCAPS;
typedef const DSCAPS *LPCDSCAPS;
typedef struct _DSBCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwUnlockTransferRate;
DWORD dwPlayCpuOverhead;
} DSBCAPS, *LPDSBCAPS;
typedef const DSBCAPS *LPCDSBCAPS;
typedef struct _DSBUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
} DSBUFFERDESC, *LPDSBUFFERDESC;
typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
typedef struct _DS3DBUFFER
{
DWORD dwSize;
D3DVECTOR vPosition;
D3DVECTOR vVelocity;
DWORD dwInsideConeAngle;
DWORD dwOutsideConeAngle;
D3DVECTOR vConeOrientation;
LONG lConeOutsideVolume;
D3DVALUE flMinDistance;
D3DVALUE flMaxDistance;
DWORD dwMode;
} DS3DBUFFER, *LPDS3DBUFFER;
typedef const DS3DBUFFER *LPCDS3DBUFFER;
typedef struct _DS3DLISTENER
{
DWORD dwSize;
D3DVECTOR vPosition;
D3DVECTOR vVelocity;
D3DVECTOR vOrientFront;
D3DVECTOR vOrientTop;
D3DVALUE flDistanceFactor;
D3DVALUE flRolloffFactor;
D3DVALUE flDopplerFactor;
} DS3DLISTENER, *LPDS3DLISTENER;
typedef const DS3DLISTENER *LPCDS3DLISTENER;
typedef struct _DSCCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwFormats;
DWORD dwChannels;
} DSCCAPS, *LPDSCCAPS;
typedef const DSCCAPS *LPCDSCCAPS;
typedef struct _DSCBUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
} DSCBUFFERDESC, *LPDSCBUFFERDESC;
typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
typedef struct _DSCBCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
} DSCBCAPS, *LPDSCBCAPS;
typedef const DSCBCAPS *LPCDSCBCAPS;
typedef struct _DSBPOSITIONNOTIFY
{
DWORD dwOffset;
HANDLE hEventNotify;
} DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
//
// Compatibility typedefs
//
typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
typedef LPVOID *LPLPVOID;
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
//
// DirectSound API
//
typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
extern HRESULT WINAPI DirectSoundCreate(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
extern HRESULT WINAPI DirectSoundCaptureCreate(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
#ifdef UNICODE
#define LPDSENUMCALLBACK LPDSENUMCALLBACKW
#define DirectSoundEnumerate DirectSoundEnumerateW
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
#else // UNICODE
#define LPDSENUMCALLBACK LPDSENUMCALLBACKA
#define DirectSoundEnumerate DirectSoundEnumerateA
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
#endif // UNICODE
//
// IDirectSound
//
DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound
DECLARE_INTERFACE_(IDirectSound, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound methods
STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC, LPDIRECTSOUNDBUFFER *, LPUNKNOWN) PURE;
STDMETHOD(GetCaps) (THIS_ LPDSCAPS) PURE;
STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER, LPDIRECTSOUNDBUFFER *) PURE;
STDMETHOD(SetCooperativeLevel) (THIS_ HWND, DWORD) PURE;
STDMETHOD(Compact) (THIS) PURE;
STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD) PURE;
STDMETHOD(SetSpeakerConfig) (THIS_ DWORD) PURE;
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
#define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b)
#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSound_AddRef(p) (p)->AddRef()
#define IDirectSound_Release(p) (p)->Release()
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectSound_Compact(p) (p)->Compact()
#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
#define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b)
#define IDirectSound_Initialize(p,a) (p)->Initialize(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundBuffer
//
DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSoundBuffer
DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundBuffer methods
STDMETHOD(GetCaps) (THIS_ LPDSBCAPS) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
STDMETHOD(GetVolume) (THIS_ LPLONG) PURE;
STDMETHOD(GetPan) (THIS_ LPLONG) PURE;
STDMETHOD(GetFrequency) (THIS_ LPDWORD) PURE;
STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE;
STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND, LPCDSBUFFERDESC) PURE;
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD) PURE;
STDMETHOD(SetCurrentPosition) (THIS_ DWORD) PURE;
STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX) PURE;
STDMETHOD(SetVolume) (THIS_ LONG) PURE;
STDMETHOD(SetPan) (THIS_ LONG) PURE;
STDMETHOD(SetFrequency) (THIS_ DWORD) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
STDMETHOD(Restore) (THIS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
#define IDirectSoundBuffer_Release(p) (p)->Release()
#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
#define IDirectSoundBuffer_Stop(p) (p)->Stop()
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
#define IDirectSoundBuffer_Restore(p) (p)->Restore()
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSound3DListener
//
DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound3DListener
DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound3D methods
STDMETHOD(GetAllParameters) (THIS_ LPDS3DLISTENER) PURE;
STDMETHOD(GetDistanceFactor) (THIS_ LPD3DVALUE) PURE;
STDMETHOD(GetDopplerFactor) (THIS_ LPD3DVALUE) PURE;
STDMETHOD(GetOrientation) (THIS_ LPD3DVECTOR, LPD3DVECTOR) PURE;
STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
STDMETHOD(GetRolloffFactor) (THIS_ LPD3DVALUE) PURE;
STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
STDMETHOD(SetAllParameters) (THIS_ LPCDS3DLISTENER, DWORD) PURE;
STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE, DWORD) PURE;
STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE, DWORD) PURE;
STDMETHOD(SetOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE, DWORD) PURE;
STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
STDMETHOD(CommitDeferredSettings) (THIS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSound3DListener_AddRef(p) (p)->AddRef()
#define IDirectSound3DListener_Release(p) (p)->Release()
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSound3DBuffer
//
DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound3DBuffer
DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundBuffer3D methods
STDMETHOD(GetAllParameters) (THIS_ LPDS3DBUFFER) PURE;
STDMETHOD(GetConeAngles) (THIS_ LPDWORD, LPDWORD) PURE;
STDMETHOD(GetConeOrientation) (THIS_ LPD3DVECTOR) PURE;
STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG) PURE;
STDMETHOD(GetMaxDistance) (THIS_ LPD3DVALUE) PURE;
STDMETHOD(GetMinDistance) (THIS_ LPD3DVALUE) PURE;
STDMETHOD(GetMode) (THIS_ LPDWORD) PURE;
STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
STDMETHOD(SetAllParameters) (THIS_ LPCDS3DBUFFER, DWORD) PURE;
STDMETHOD(SetConeAngles) (THIS_ DWORD, DWORD, DWORD) PURE;
STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
STDMETHOD(SetConeOutsideVolume) (THIS_ LONG, DWORD) PURE;
STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE, DWORD) PURE;
STDMETHOD(SetMinDistance) (THIS_ D3DVALUE, DWORD) PURE;
STDMETHOD(SetMode) (THIS_ DWORD, DWORD) PURE;
STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->lpVtbl->SetConeOutsideVolume(p,a,b)
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
#define IDirectSound3DBuffer_Release(p) (p)->Release()
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->SetConeOutsideVolume(a,b)
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCapture
//
DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundCapture
DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCapture methods
STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC, LPDIRECTSOUNDCAPTUREBUFFER *, LPUNKNOWN) PURE;
STDMETHOD(GetCaps) (THIS_ LPDSCCAPS ) PURE;
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSoundCapture_AddRef(p) (p)->AddRef()
#define IDirectSoundCapture_Release(p) (p)->Release()
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCaptureBuffer
//
DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundCaptureBuffer
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCaptureBuffer methods
STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS ) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) PURE;
STDMETHOD(GetStatus) (THIS_ LPDWORD ) PURE;
STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE, LPCDSCBUFFERDESC) PURE;
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
STDMETHOD(Start) (THIS_ DWORD) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
#define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundNotify
//
DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundNotify
DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundNotify methods
STDMETHOD(SetNotificationPositions) (THIS_ DWORD, LPCDSBPOSITIONNOTIFY) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectSoundNotify_AddRef(p) (p)->AddRef()
#define IDirectSoundNotify_Release(p) (p)->Release()
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IKsPropertySet
//
#ifndef _IKsPropertySet_
#define _IKsPropertySet_
#ifdef __cplusplus
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
struct IKsPropertySet;
#endif // __cplusplus
typedef struct IKsPropertySet *LPKSPROPERTYSET;
#define KSPROPERTY_SUPPORT_GET 0x00000001
#define KSPROPERTY_SUPPORT_SET 0x00000002
DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
#undef INTERFACE
#define INTERFACE IKsPropertySet
DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IKsPropertySet methods
STDMETHOD(Get) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG, PULONG) PURE;
STDMETHOD(Set) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG) PURE;
STDMETHOD(QuerySupport) (THIS_ REFGUID, ULONG, PULONG) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IKsPropertySet_AddRef(p) (p)->AddRef()
#define IKsPropertySet_Release(p) (p)->Release()
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // _IKsPropertySet_
//
// Return Codes
//
#define DS_OK 0
// The call failed because resources (such as a priority level)
// were already being used by another caller.
#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
// The control (vol,pan,etc.) requested by the caller is not available.
#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
// An invalid parameter was passed to the returning function
#define DSERR_INVALIDPARAM E_INVALIDARG
// This call is not valid for the current state of this object
#define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
// An undetermined error occured inside the DirectSound subsystem
#define DSERR_GENERIC E_FAIL
// The caller does not have the priority level required for the function to
// succeed.
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
// Not enough free memory is available to complete the operation
#define DSERR_OUTOFMEMORY E_OUTOFMEMORY
// The specified WAVE format is not supported
#define DSERR_BADFORMAT MAKE_DSHRESULT(100)
// The function called is not supported at this time
#define DSERR_UNSUPPORTED E_NOTIMPL
// No sound driver is available for use
#define DSERR_NODRIVER MAKE_DSHRESULT(120)
// This object is already initialized
#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
// This object does not support aggregation
#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
// The buffer memory has been lost, and must be restored.
#define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
// Another app has a higher priority level, preventing this call from
// succeeding.
#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
// This object has not been initialized
#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
// The requested COM interface is not available
#define DSERR_NOINTERFACE E_NOINTERFACE
//
// Flags
//
#define DSCAPS_PRIMARYMONO 0x00000001
#define DSCAPS_PRIMARYSTEREO 0x00000002
#define DSCAPS_PRIMARY8BIT 0x00000004
#define DSCAPS_PRIMARY16BIT 0x00000008
#define DSCAPS_CONTINUOUSRATE 0x00000010
#define DSCAPS_EMULDRIVER 0x00000020
#define DSCAPS_CERTIFIED 0x00000040
#define DSCAPS_SECONDARYMONO 0x00000100
#define DSCAPS_SECONDARYSTEREO 0x00000200
#define DSCAPS_SECONDARY8BIT 0x00000400
#define DSCAPS_SECONDARY16BIT 0x00000800
#define DSBPLAY_LOOPING 0x00000001
#define DSBSTATUS_PLAYING 0x00000001
#define DSBSTATUS_BUFFERLOST 0x00000002
#define DSBSTATUS_LOOPING 0x00000004
#define DSBLOCK_FROMWRITECURSOR 0x00000001
#define DSBLOCK_ENTIREBUFFER 0x00000002
#define DSSCL_NORMAL 0x00000001
#define DSSCL_PRIORITY 0x00000002
#define DSSCL_EXCLUSIVE 0x00000003
#define DSSCL_WRITEPRIMARY 0x00000004
#define DS3DMODE_NORMAL 0x00000000
#define DS3DMODE_HEADRELATIVE 0x00000001
#define DS3DMODE_DISABLE 0x00000002
#define DS3D_IMMEDIATE 0x00000000
#define DS3D_DEFERRED 0x00000001
#define DS3D_MINDISTANCEFACTOR 0.0f
#define DS3D_MAXDISTANCEFACTOR 10.0f
#define DS3D_DEFAULTDISTANCEFACTOR 1.0f
#define DS3D_MINROLLOFFFACTOR 0.0f
#define DS3D_MAXROLLOFFFACTOR 10.0f
#define DS3D_DEFAULTROLLOFFFACTOR 1.0f
#define DS3D_MINDOPPLERFACTOR 0.0f
#define DS3D_MAXDOPPLERFACTOR 10.0f
#define DS3D_DEFAULTDOPPLERFACTOR 1.0f
#define DS3D_DEFAULTMINDISTANCE 1.0f
#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
#define DS3D_MINCONEANGLE 0
#define DS3D_MAXCONEANGLE 360
#define DS3D_DEFAULTCONEANGLE 360
#define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
#define DSBCAPS_PRIMARYBUFFER 0x00000001
#define DSBCAPS_STATIC 0x00000002
#define DSBCAPS_LOCHARDWARE 0x00000004
#define DSBCAPS_LOCSOFTWARE 0x00000008
#define DSBCAPS_CTRL3D 0x00000010
#define DSBCAPS_CTRLFREQUENCY 0x00000020
#define DSBCAPS_CTRLPAN 0x00000040
#define DSBCAPS_CTRLVOLUME 0x00000080
#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
#define DSBCAPS_CTRLDEFAULT 0x000000E0
#define DSBCAPS_CTRLALL 0x000001F0
#define DSBCAPS_STICKYFOCUS 0x00004000
#define DSBCAPS_GLOBALFOCUS 0x00008000
#define DSBCAPS_GETCURRENTPOSITION2 0x00010000
#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
#define DSCBCAPS_WAVEMAPPED 0x80000000
#define DSSPEAKER_HEADPHONE 0x00000001
#define DSSPEAKER_MONO 0x00000002
#define DSSPEAKER_QUAD 0x00000003
#define DSSPEAKER_STEREO 0x00000004
#define DSSPEAKER_SURROUND 0x00000005
#define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees
#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees
#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees
#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees
#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
#define DSSPEAKER_CONFIG(a) ((BYTE)(a))
#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
#define DSCCAPS_EMULDRIVER 0x00000020
#define DSCBLOCK_ENTIREBUFFER 0x00000001
#define DSCBSTATUS_CAPTURING 0x00000001
#define DSCBSTATUS_LOOPING 0x00000002
#define DSCBSTART_LOOPING 0x00000001
#define DSBFREQUENCY_MIN 100
#define DSBFREQUENCY_MAX 100000
#define DSBFREQUENCY_ORIGINAL 0
#define DSBPAN_LEFT -10000
#define DSBPAN_CENTER 0
#define DSBPAN_RIGHT 10000
#define DSBVOLUME_MIN -10000
#define DSBVOLUME_MAX 0
#define DSBSIZE_MIN 4
#define DSBSIZE_MAX 0x0FFFFFFF
#define DSBPN_OFFSETSTOP 0xFFFFFFFF
#ifdef __cplusplus
};
#endif // __cplusplus
#endif // __DSOUND_INCLUDED__
Binary file not shown.
-831
View File
@@ -1,831 +0,0 @@
/*==========================================================================;
*
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
*
* File: dvp.h
* Content: DirectDrawVideoPort include file
*
***************************************************************************/
#ifndef __DVP_INCLUDED__
#define __DVP_INCLUDED__
#if defined( _WIN32 ) && !defined( _NO_COM )
#define COM_NO_WINDOWS_H
#include <objbase.h>
#else
#define IUnknown void
#undef CO_E_NOTINITIALIZED
#define CO_E_NOTINITIALIZED 0x800401F0L
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* GUIDS used by DirectDrawVideoPort objects
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
DEFINE_GUID( IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_CCIR656, 0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_BROOKTREE, 0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
DEFINE_GUID( DDVPTYPE_PHILIPS, 0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
/*
* GUIDS used to describe connections
*/
#endif
/*============================================================================
*
* DirectDraw Structures
*
* Various structures used to invoke DirectDraw.
*
*==========================================================================*/
struct IDirectDraw;
struct IDirectDrawSurface;
struct IDirectDrawPalette;
struct IDirectDrawClipper;
typedef struct IDDVideoPortContainer FAR *LPDDVIDEOPORTCONTAINER;
typedef struct IDirectDrawVideoPort FAR *LPDIRECTDRAWVIDEOPORT;
typedef struct _DDVIDEOPORTCONNECT FAR *LPDDVIDEOPORTCONNECT;
typedef struct _DDVIDEOPORTCAPS FAR *LPDDVIDEOPORTCAPS;
typedef struct _DDVIDEOPORTDESC FAR *LPDDVIDEOPORTDESC;
typedef struct _DDVIDEOPORTINFO FAR *LPDDVIDEOPORTINFO;
typedef struct _DDVIDEOPORTBANDWIDTH FAR *LPDDVIDEOPORTBANDWIDTH;
typedef struct _DDVIDEOPORTSTATUS FAR *LPDDVIDEOPORTSTATUS;
typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS;
/*
* API's
*/
typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
/*
* INTERACES FOLLOW:
* IDirectDrawVideoPort
* IVideoPort
*/
/*
* IDirectDrawVideoPortContainer
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDDVideoPortContainer
DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawVideoPort methods ***/
STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p)
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
#else
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IVideoPortContainer_AddRef(p) (p)->AddRef()
#define IVideoPortContainer_Release(p) (p)->Release()
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d)
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d)
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b)
#endif
#endif
/*
* IDirectDrawVideoPort
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawVideoPort
DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IVideoPort methods ***/
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
STDMETHOD(StopVideo)(THIS) PURE;
STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IVideoPort_Release(p) (p)->lpVtbl->Release(p)
#define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b)
#define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
#define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c)
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
#define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a)
#define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a)
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a)
#define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
#define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a)
#define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p)
#define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a)
#define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c)
#else
#define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IVideoPort_AddRef(p) (p)->AddRef()
#define IVideoPort_Release(p) (p)->Release()
#define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b)
#define IVideoPort_Flip(p,a,b) (p)->Flip(a,b)
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
#define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a)
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c)
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d)
#define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a)
#define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a)
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a)
#define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a)
#define IVideoPort_StartVideo(p,a) (p)->StartVideo(a)
#define IVideoPort_StopVideo(p) (p)->StopVideo()
#define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a)
#define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c)
#endif
#endif
/*
* DDVIDEOPORTCONNECT
*/
typedef struct _DDVIDEOPORTCONNECT
{
DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
DWORD dwPortWidth; // Width of the video port
GUID guidTypeID; // Description of video port connection
DWORD dwFlags; // Connection flags
DWORD dwReserved1; // Reserved, set to zero.
} DDVIDEOPORTCONNECT;
/*
* DDVIDEOPORTCAPS
*/
typedef struct _DDVIDEOPORTCAPS
{
DWORD dwSize; // size of the DDVIDEOPORTCAPS structure
DWORD dwFlags; // indicates which fields contain data
DWORD dwMaxWidth; // max width of the video port field
DWORD dwMaxVBIWidth; // max width of the VBI data
DWORD dwMaxHeight; // max height of the video port field
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
DWORD dwCaps; // Video port capabilities
DWORD dwFX; // More video port capabilities
DWORD dwNumAutoFlipSurfaces; // Number of autoflippable surfaces
DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface
DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping
DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width
DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x
DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x
DWORD dwNumVBIAutoFlipSurfaces; // Number of VBI autoflippable surfaces
DWORD dwReserved1; // Reserved for future use
DWORD dwReserved2; // Reserved for future use
} DDVIDEOPORTCAPS;
/*
* The dwMaxWidth and dwMaxVBIWidth members are valid
*/
#define DDVPD_WIDTH 0x00000001l
/*
* The dwMaxHeight member is valid
*/
#define DDVPD_HEIGHT 0x00000002l
/*
* The dwVideoPortID member is valid
*/
#define DDVPD_ID 0x00000004l
/*
* The dwCaps member is valid
*/
#define DDVPD_CAPS 0x00000008l
/*
* The dwFX member is valid
*/
#define DDVPD_FX 0x00000010l
/*
* The dwNumAutoFlipSurfaces member is valid
*/
#define DDVPD_AUTOFLIP 0x00000020l
/*
* All of the alignment members are valid
*/
#define DDVPD_ALIGN 0x00000040l
/*
* DDVIDEOPORTDESC
*/
typedef struct _DDVIDEOPORTDESC
{
DWORD dwSize; // size of the DDVIDEOPORTDESC structure
DWORD dwFieldWidth; // width of the video port field
DWORD dwVBIWidth; // width of the VBI data
DWORD dwFieldHeight; // height of the video port field
DWORD dwMicrosecondsPerField; // Microseconds per video field
DWORD dwMaxPixelsPerSecond; // Maximum pixel rate per second
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
DWORD dwReserved1; // Reserved for future use - set to zero
DDVIDEOPORTCONNECT VideoPortType; // Description of video port connection
DWORD dwReserved2; // Reserved for future use - set to zero
DWORD dwReserved3; // Reserved for future use - set to zero
} DDVIDEOPORTDESC;
/*
* DDVIDEOPORTINFO
*/
typedef struct _DDVIDEOPORTINFO
{
DWORD dwSize; // Size of the structure
DWORD dwOriginX; // Placement of the video data within the surface.
DWORD dwOriginY; // Placement of the video data within the surface.
DWORD dwVPFlags; // Video port options
RECT rCrop; // Cropping rectangle (optional).
DWORD dwPrescaleWidth; // Determines pre-scaling/zooming in the X direction (optional).
DWORD dwPrescaleHeight; // Determines pre-scaling/zooming in the Y direction (optional).
LPDDPIXELFORMAT lpddpfInputFormat; // Video format written to the video port
LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
DWORD dwVBIHeight; // Specifies the number of lines of data within the vertical blanking interval.
DWORD dwReserved1; // Reserved for future use - set to zero
DWORD dwReserved2; // Reserved for future use - set to zero
} DDVIDEOPORTINFO;
/*
* DDVIDEOPORTBANDWIDTH
*/
typedef struct _DDVIDEOPORTBANDWIDTH
{
DWORD dwSize; // Size of the structure
DWORD dwCaps;
DWORD dwOverlay; // Zoom factor at which overlay is supported
DWORD dwColorkey; // Zoom factor at which overlay w/ colorkey is supported
DWORD dwYInterpolate; // Zoom factor at which overlay w/ Y interpolation is supported
DWORD dwYInterpAndColorkey; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
DWORD dwReserved1; // Reserved for future use - set to zero
DWORD dwReserved2; // Reserved for future use - set to zero
} DDVIDEOPORTBANDWIDTH;
/*
* DDVIDEOPORTSTATUS
*/
typedef struct _DDVIDEOPORTSTATUS
{
DWORD dwSize; // Size of the structure
BOOL bInUse; // TRUE if video port is currently being used
DWORD dwFlags; // Currently not used
DWORD dwReserved1; // Reserved for future use
DDVIDEOPORTCONNECT VideoPortType; // Information about the connection
DWORD dwReserved2; // Reserved for future use
DWORD dwReserved3; // Reserved for future use
} DDVIDEOPORTSTATUS;
/*============================================================================
*
* Video Port Flags
*
* All flags are bit flags.
*
*==========================================================================*/
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTCONNECT FLAGS
*
****************************************************************************/
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of double clocking the data.
* When this is set by the client, this indicates that the video port
* should enable double clocking. This flag is only valid with external
* syncs.
*/
#define DDVPCONNECT_DOUBLECLOCK 0x00000001l
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of using an external VACT
* signal. When this is set by the client, this indicates that the
* video port should use the external VACT signal.
*/
#define DDVPCONNECT_VACT 0x00000002l
/*
* When this is set by the driver and passed to the client, this
* indicates that the video port is capable of treating even fields
* like odd fields and visa versa. When this is set by the client,
* this indicates that the video port should treat even fields like odd
* fields.
*/
#define DDVPCONNECT_INVERTPOLARITY 0x00000004l
/*
* Indicates that any data written to the video port during the VREF
* period will not be written into the frame buffer. This flag is read only.
*/
#define DDVPCONNECT_DISCARDSVREFDATA 0x00000008l
/*
* Device will write half lines into the frame buffer, sometimes causing
* the data to not be displayed correctly.
*/
#define DDVPCONNECT_HALFLINE 0x00000010l
/*
* Indicates that the signal is interlaced. This flag is only
* set by the client.
*/
#define DDVPCONNECT_INTERLACED 0x00000020l
/*
* Indicates that video port is shareable and that this video port
* will use the even fields. This flag is only set by the client.
*/
#define DDVPCONNECT_SHAREEVEN 0x00000040l
/*
* Indicates that video port is shareable and that this video port
* will use the odd fields. This flag is only set by the client.
*/
#define DDVPCONNECT_SHAREODD 0x00000080l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTDESC CAPS
*
****************************************************************************/
/*
* Flip can be performed automatically to avoid tearing.
*/
#define DDVPCAPS_AUTOFLIP 0x00000001l
/*
* Supports interlaced video
*/
#define DDVPCAPS_INTERLACED 0x00000002l
/*
* Supports non-interlaced video
*/
#define DDVPCAPS_NONINTERLACED 0x00000004l
/*
* Indicates that the device can return whether the current field
* of an interlaced signal is even or odd.
*/
#define DDVPCAPS_READBACKFIELD 0x00000008l
/*
* Indicates that the device can return the current line of video
* being written into the frame buffer.
*/
#define DDVPCAPS_READBACKLINE 0x00000010l
/*
* Allows two gen-locked video streams to share a single video port,
* where one stream uses the even fields and the other uses the odd
* fields. Separate parameters (including address, scaling,
* cropping, etc.) are maintained for both fields.)
*/
#define DDVPCAPS_SHAREABLE 0x00000020l
/*
* Even fields of video can be automatically discarded.
*/
#define DDVPCAPS_SKIPEVENFIELDS 0x00000040l
/*
* Odd fields of video can be automatically discarded.
*/
#define DDVPCAPS_SKIPODDFIELDS 0x00000080l
/*
* Indicates that the device is capable of driving the graphics
* VSYNC with the video port VSYNC.
*/
#define DDVPCAPS_SYNCMASTER 0x00000100l
/*
* Indicates that data within the vertical blanking interval can
* be written to a different surface.
*/
#define DDVPCAPS_VBISURFACE 0x00000200l
/*
* Indicates that the video port can perform color operations
* on the incoming data before it is written to the frame buffer.
*/
#define DDVPCAPS_COLORCONTROL 0x00000400l
/*
* Indicates that the video port can accept VBI data in a different
* width or format than the regular video data.
*/
#define DDVPCAPS_OVERSAMPLEDVBI 0x00000800l
/*
* Indicates that the video port can write data directly to system memory
*/
#define DDVPCAPS_SYSTEMMEMORY 0x00001000l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTDESC FX
*
****************************************************************************/
/*
* Limited cropping is available to crop out the vertical interval data.
*/
#define DDVPFX_CROPTOPDATA 0x00000001l
/*
* Incoming data can be cropped in the X direction before it is written
* to the surface.
*/
#define DDVPFX_CROPX 0x00000002l
/*
* Incoming data can be cropped in the Y direction before it is written
* to the surface.
*/
#define DDVPFX_CROPY 0x00000004l
/*
* Supports interleaving interlaced fields in memory.
*/
#define DDVPFX_INTERLEAVE 0x00000008l
/*
* Supports mirroring left to right as the video data is written
* into the frame buffer.
*/
#define DDVPFX_MIRRORLEFTRIGHT 0x00000010l
/*
* Supports mirroring top to bottom as the video data is written
* into the frame buffer.
*/
#define DDVPFX_MIRRORUPDOWN 0x00000020l
/*
* Data can be arbitrarily shrunk in the X direction before it
* is written to the surface.
*/
#define DDVPFX_PRESHRINKX 0x00000040l
/*
* Data can be arbitrarily shrunk in the Y direction before it
* is written to the surface.
*/
#define DDVPFX_PRESHRINKY 0x00000080l
/*
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
* direction before it is written to the surface.
*/
#define DDVPFX_PRESHRINKXB 0x00000100l
/*
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
* direction before it is written to the surface.
*/
#define DDVPFX_PRESHRINKYB 0x00000200l
/*
* Data can be shrunk in increments of 1/x in the X direction
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
* before it is written to the surface.
*/
#define DDVPFX_PRESHRINKXS 0x00000400l
/*
* Data can be shrunk in increments of 1/x in the Y direction
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
* before it is written to the surface.
*/
#define DDVPFX_PRESHRINKYS 0x00000800l
/*
* Data can be arbitrarily stretched in the X direction before
* it is written to the surface.
*/
#define DDVPFX_PRESTRETCHX 0x00001000l
/*
* Data can be arbitrarily stretched in the Y direction before
* it is written to the surface.
*/
#define DDVPFX_PRESTRETCHY 0x00002000l
/*
* Data can be integer stretched in the X direction before it is
* written to the surface.
*/
#define DDVPFX_PRESTRETCHXN 0x00004000l
/*
* Data can be integer stretched in the Y direction before it is
* written to the surface.
*/
#define DDVPFX_PRESTRETCHYN 0x00008000l
/*
* Indicates that data within the vertical blanking interval can
* be converted independently of the remaining video data.
*/
#define DDVPFX_VBICONVERT 0x00010000l
/*
* Indicates that scaling can be disabled for data within the
* vertical blanking interval.
*/
#define DDVPFX_VBINOSCALE 0x00020000l
/*
* Indicates that the video data can ignore the left and right
* cropping coordinates when cropping oversampled VBI data.
*/
#define DDVPFX_IGNOREVBIXCROP 0x00040000l
/****************************************************************************
*
* VIDEOPORT DDVIDEOPORTINFO FLAGS
*
****************************************************************************/
/*
* Perform automatic flipping. Auto-flipping is performed between
* the overlay surface that was attached to the video port using
* IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
* are attached to the surface via the IDirectDrawSurface::AttachSurface
* method. The flip order is the order in which the overlay surfaces
* were. attached.
*/
#define DDVP_AUTOFLIP 0x00000001l
/*
* Perform conversion using the ddpfOutputFormat information.
*/
#define DDVP_CONVERT 0x00000002l
/*
* Perform cropping using the specified rectangle.
*/
#define DDVP_CROP 0x00000004l
/*
* Indicates that interlaced fields should be interleaved in memory.
*/
#define DDVP_INTERLEAVE 0x00000008l
/*
* Indicates that the data should be mirrored left to right as it's
* written into the frame buffer.
*/
#define DDVP_MIRRORLEFTRIGHT 0x00000010l
/*
* Indicates that the data should be mirrored top to bottom as it's
* written into the frame buffer.
*/
#define DDVP_MIRRORUPDOWN 0x00000020l
/*
* Perform pre-scaling/zooming based on the pre-scale parameters.
*/
#define DDVP_PRESCALE 0x00000040l
/*
* Ignore input of even fields.
*/
#define DDVP_SKIPEVENFIELDS 0x00000080l
/*
* Ignore input of odd fields.
*/
#define DDVP_SKIPODDFIELDS 0x00000100l
/*
* Drive the graphics VSYNCs using the video port VYSNCs.
*/
#define DDVP_SYNCMASTER 0x00000200l
/*
* The ddpfVBIOutputFormatFormat member contains data that should be used
* to convert the data within the vertical blanking interval.
*/
#define DDVP_VBICONVERT 0x00000400l
/*
* Indicates that data within the vertical blanking interval
* should not be scaled.
*/
#define DDVP_VBINOSCALE 0x00000800l
/*
* Indicates that these bob/weave decisions should not be
* overriden by other interfaces.
*/
#define DDVP_OVERRIDEBOBWEAVE 0x00001000l
/*
* Indicates that the video data should ignore the left and right
* cropping coordinates when cropping the VBI data.
*/
#define DDVP_IGNOREVBIXCROP 0x00002000l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
*
****************************************************************************/
/*
* Return formats for the video data
*/
#define DDVPFORMAT_VIDEO 0x00000001l
/*
* Return formats for the VBI data
*/
#define DDVPFORMAT_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
*
****************************************************************************/
/*
* Surface should receive video data (and VBI data if a surface
* is not explicitly attached for that purpose)
*/
#define DDVPTARGET_VIDEO 0x00000001l
/*
* Surface should receive VBI data
*/
#define DDVPTARGET_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
*
****************************************************************************/
/*
* Waits until the beginning of the next VSYNC
*/
#define DDVPWAIT_BEGIN 0x00000001l
/*
* Waits until the end of the next/current VSYNC
*/
#define DDVPWAIT_END 0x00000002l
/*
* Waits until the beginning of the specified line
*/
#define DDVPWAIT_LINE 0x00000003l
/****************************************************************************
*
* DIRECTDRAWVIDEOPORT FLIP FLAGS
*
****************************************************************************/
/*
* Flips the normal video surface
*/
#define DDVPFLIP_VIDEO 0x00000001l
/*
* Flips the VBI surface
*/
#define DDVPFLIP_VBI 0x00000002l
/****************************************************************************
*
* DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
*
****************************************************************************/
/*
* No video signal is present at the video port
*/
#define DDVPSQ_NOSIGNAL 0x00000001l
/*
* A valid video signal is present at the video port
*/
#define DDVPSQ_SIGNALOK 0x00000002l
/****************************************************************************
*
* VIDEOPORTBANDWIDTH Flags
*
****************************************************************************/
/*
* The specified height/width refer to the size of the video port data
* written into memory, after prescaling has occured.
*/
#define DDVPB_VIDEOPORT 0x00000001l
/*
* The specified height/width refer to the source size of the overlay.
*/
#define DDVPB_OVERLAY 0x00000002l
/*
* This is a query for the device to return which caps this device requires.
*/
#define DDVPB_TYPE 0x00000004l
/****************************************************************************
*
* VIDEOPORTBANDWIDTH Caps
*
****************************************************************************/
/*
* The bandwidth for this device is dependant on the overlay source size.
*/
#define DDVPBCAPS_SOURCE 0x00000001l
/*
* The bandwidth for this device is dependant on the overlay destination
* size.
*/
#define DDVPBCAPS_DESTINATION 0x00000002l
#ifdef __cplusplus
};
#endif
#endif
Binary file not shown.
@@ -1,511 +0,0 @@
/*
* 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/ExceptionHandler/ExceptionHandler.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Main file for dealing with exception handling
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:05 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 1 6/29/99 7:42p Dave
*
* 3 1/19/99 9:07a Allender
* removed compiler warning pragma's since we are already ignoring them in
* vtypes.h
*
* 2 1/18/99 4:34p Allender
* added the exception handler routines from Game Developer for structured
* exception handling in vsdk code
*
* $NoKeywords: $
*/
// Copyright © 1998 Bruce Dawson.
/*
This source file contains the exception handler for recording error
information after crashes. See exceptionhandler.h for information
on how to hook it in.
*/
#include <windows.h>
// --------------------
//
// Defines
//
// --------------------
#define ONEK 1024
#define SIXTYFOURK (64*ONEK)
#define ONEM (ONEK*ONEK)
#define ONEG (ONEK*ONEK*ONEK)
// --------------------
//
// Enumerated Types
//
// --------------------
// --------------------
//
// Structures
//
// --------------------
// --------------------
//
// Classes
//
// --------------------
// --------------------
//
// Global Variables
//
// --------------------
// --------------------
//
// Local Variables
//
// --------------------
const int NumCodeBytes = 16; // Number of code bytes to record.
const int MaxStackDump = 2048; // Maximum number of DWORDS in stack dumps.
const int StackColumns = 8; // Number of columns in stack dump.
// --------------------
//
// Internal Functions
//
// --------------------
// hprintf behaves similarly to printf, with a few vital differences.
// It uses wvsprintf to do the formatting, which is a system routine,
// thus avoiding C run time interactions. For similar reasons it
// uses WriteFile rather than fwrite.
// The one limitation that this imposes is that wvsprintf, and
// therefore hprintf, cannot handle floating point numbers.
static void hprintf(HANDLE LogFile, char* Format, ...)
{
char buffer[2000]; // wvsprintf never prints more than one K.
va_list arglist;
va_start( arglist, Format);
wvsprintf(buffer, Format, arglist);
va_end( arglist);
DWORD NumBytes;
WriteFile(LogFile, buffer, lstrlen(buffer), &NumBytes, 0);
}
// Print the specified FILETIME to output in a human readable format,
// without using the C run time.
static void PrintTime(char *output, FILETIME TimeToPrint)
{
WORD Date, Time;
if (FileTimeToLocalFileTime(&TimeToPrint, &TimeToPrint) &&
FileTimeToDosDateTime(&TimeToPrint, &Date, &Time))
{
// What a silly way to print out the file date/time. Oh well,
// it works, and I'm not aware of a cleaner way to do it.
wsprintf(output, "%d/%d/%d %02d:%02d:%02d",
(Date / 32) & 15, Date & 31, (Date / 512) + 1980,
(Time / 2048), (Time / 32) & 63, (Time & 31) * 2);
} else {
output[0] = 0;
}
}
// Print information about a code module (DLL or EXE) such as its size,
// location, time stamp, etc.
static void ShowModuleInfo(HANDLE LogFile, HINSTANCE ModuleHandle)
{
char ModName[MAX_PATH];
__try {
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
// our way through its structures to find the link time stamp.
IMAGE_DOS_HEADER *DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle;
if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic) {
return;
}
IMAGE_NT_HEADERS *NTHeader = (IMAGE_NT_HEADERS*)((char *)DosHeader + DosHeader->e_lfanew);
if (IMAGE_NT_SIGNATURE != NTHeader->Signature) {
return;
}
// Open the code module file so that we can get its file date
// and size.
HANDLE ModuleFile = CreateFile(ModName, GENERIC_READ,
FILE_SHARE_READ, 0, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, 0);
char TimeBuffer[100] = "";
DWORD FileSize = 0;
if (ModuleFile != INVALID_HANDLE_VALUE) {
FileSize = GetFileSize(ModuleFile, 0);
FILETIME LastWriteTime;
if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime)) {
wsprintf(TimeBuffer, " - file date is ");
PrintTime(TimeBuffer + lstrlen(TimeBuffer), LastWriteTime);
}
CloseHandle(ModuleFile);
}
hprintf(LogFile, "%s, loaded at 0x%08x - %d bytes - %08x%s\r\n",
ModName, ModuleHandle, FileSize,
NTHeader->FileHeader.TimeDateStamp, TimeBuffer);
}
}
// Handle any exceptions by continuing from this point.
__except(EXCEPTION_EXECUTE_HANDLER)
{
}
}
// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used
// to find all the blocks of address space that were reserved or committed,
// and ShowModuleInfo will display module information if they are code
// modules.
static void RecordModuleList(HANDLE LogFile)
{
hprintf(LogFile, "\r\n"
"\tModule list: names, addresses, sizes, time stamps "
"and file times:\r\n");
SYSTEM_INFO SystemInfo;
GetSystemInfo(&SystemInfo);
const size_t PageSize = SystemInfo.dwPageSize;
// Set NumPages to the number of pages in the 4GByte address space,
// while being careful to avoid overflowing ints.
const size_t NumPages = 4 * size_t(ONEG / PageSize);
size_t pageNum = 0;
void *LastAllocationBase = 0;
while (pageNum < NumPages) {
MEMORY_BASIC_INFORMATION MemInfo;
if (VirtualQuery((void *)(pageNum * PageSize), &MemInfo, sizeof(MemInfo))) {
if (MemInfo.RegionSize > 0) {
// Adjust the page number to skip over this block of memory.
pageNum += MemInfo.RegionSize / PageSize;
if (MemInfo.State == MEM_COMMIT && MemInfo.AllocationBase > LastAllocationBase) {
// Look for new blocks of committed memory, and try
// recording their module names - this will fail
// gracefully if they aren't code modules.
LastAllocationBase = MemInfo.AllocationBase;
ShowModuleInfo(LogFile, (HINSTANCE)LastAllocationBase);
}
} else {
pageNum += SIXTYFOURK / PageSize;
}
} else {
// If VirtualQuery fails we advance by 64K because that is the
// granularity of address space doled out by VirtualAlloc().
pageNum += SIXTYFOURK / PageSize;
}
}
}
// Record information about the user's system, such as processor type, amount
// of memory, etc.
static void RecordSystemInformation(HANDLE LogFile)
{
FILETIME CurrentTime;
GetSystemTimeAsFileTime(&CurrentTime);
char TimeBuffer[100];
PrintTime(TimeBuffer, CurrentTime);
hprintf(LogFile, "Error occurred at %s.\r\n", TimeBuffer);
char ModuleName[MAX_PATH];
if (GetModuleFileName(0, ModuleName, sizeof(ModuleName)) <= 0) {
lstrcpy(ModuleName, "Unknown");
}
char UserName[200];
DWORD UserNameSize = sizeof(UserName);
if (!GetUserName(UserName, &UserNameSize)) {
lstrcpy(UserName, "Unknown");
}
hprintf(LogFile, "%s, run by %s.\r\n", ModuleName, UserName);
SYSTEM_INFO SystemInfo;
GetSystemInfo(&SystemInfo);
hprintf(LogFile, "%d processor(s), type %d.\r\n",
SystemInfo.dwNumberOfProcessors, SystemInfo.dwProcessorType);
MEMORYSTATUS MemInfo;
MemInfo.dwLength = sizeof(MemInfo);
GlobalMemoryStatus(&MemInfo);
// Print out the amount of physical memory, rounded up.
hprintf(LogFile, "%d MBytes physical memory.\r\n", (MemInfo.dwTotalPhys +
ONEM - 1) / ONEM);
}
// Translate the exception code into something human readable.
static const char *GetExceptionDescription(DWORD ExceptionCode)
{
struct ExceptionNames
{
DWORD ExceptionCode;
char* ExceptionName;
};
ExceptionNames ExceptionMap[] =
{
{0x40010005, "a Control-C"},
{0x40010008, "a Control-Break"},
{0x80000002, "a Datatype Misalignment"},
{0x80000003, "a Breakpoint"},
{0xc0000005, "an Access Violation"},
{0xc0000006, "an In Page Error"},
{0xc0000017, "a No Memory"},
{0xc000001d, "an Illegal Instruction"},
{0xc0000025, "a Noncontinuable Exception"},
{0xc0000026, "an Invalid Disposition"},
{0xc000008c, "a Array Bounds Exceeded"},
{0xc000008d, "a Float Denormal Operand"},
{0xc000008e, "a Float Divide by Zero"},
{0xc000008f, "a Float Inexact Result"},
{0xc0000090, "a Float Invalid Operation"},
{0xc0000091, "a Float Overflow"},
{0xc0000092, "a Float Stack Check"},
{0xc0000093, "a Float Underflow"},
{0xc0000094, "an Integer Divide by Zero"},
{0xc0000095, "an Integer Overflow"},
{0xc0000096, "a Privileged Instruction"},
{0xc00000fD, "a Stack Overflow"},
{0xc0000142, "a DLL Initialization Failed"},
{0xe06d7363, "a Microsoft C++ Exception"},
};
for (int i = 0; i < sizeof(ExceptionMap) / sizeof(ExceptionMap[0]); i++) {
if (ExceptionCode == ExceptionMap[i].ExceptionCode) {
return ExceptionMap[i].ExceptionName;
}
}
return "Unknown exception type";
}
static char* GetFilePart(char *source)
{
char *result = strrchr(source, '\\');
if (result) {
result++;
} else {
result = source;
}
return result;
}
// --------------------
//
// External Functions
//
// --------------------
// 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
// The data is stored in a file called ErrorLog.txt in the data directory.
//
// data: pointer to the exception data
// Message: Any message that should be printed out in the error log file
//
// returns:
//
int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message)
{
static bool BeenHere = false;
// Going recursive! That must mean this routine crashed!
if (BeenHere) {
return EXCEPTION_CONTINUE_SEARCH;
}
BeenHere = true;
char ModuleName[MAX_PATH];
char FileName[MAX_PATH] = "Unknown";
// Create a filename to record the error information to.
// Storing it in the executable directory works well.
if (GetModuleFileName(0, ModuleName, sizeof(ModuleName)) <= 0) {
ModuleName[0] = 0;
}
char *FilePart = GetFilePart(ModuleName);
// Extract the file name portion and remove it's file extension. We'll
// use that name shortly.
lstrcpy(FileName, FilePart);
char *lastperiod = strrchr(FileName, '.');
if (lastperiod) {
lastperiod[0] = 0;
}
// Replace the executable filename with our error log file name.
lstrcpy(FilePart, "errorlog.txt");
HANDLE LogFile = CreateFile(ModuleName, GENERIC_WRITE, 0, 0,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, 0);
if (LogFile == INVALID_HANDLE_VALUE) {
OutputDebugString("Error creating exception report");
return EXCEPTION_CONTINUE_SEARCH;
}
// Append to the error log.
SetFilePointer(LogFile, 0, 0, FILE_END);
// Print out some blank lines to separate this error log from any previous ones.
hprintf(LogFile, "\r\n\r\n\r\n\r\n");
PEXCEPTION_RECORD Exception = data->ExceptionRecord;
PCONTEXT Context = data->ContextRecord;
char CrashModulePathName[MAX_PATH];
char *CrashModuleFileName = "Unknown";
MEMORY_BASIC_INFORMATION MemInfo;
// VirtualQuery can be used to get the allocation base associated with a
// code address, which is the same as the ModuleHandle. This can be used
// to get the filename of the module that the crash happened in.
if (VirtualQuery((void*)Context->Eip, &MemInfo, sizeof(MemInfo)) && GetModuleFileName((HINSTANCE)MemInfo.AllocationBase, CrashModulePathName, sizeof(CrashModulePathName)) > 0) {
CrashModuleFileName = GetFilePart(CrashModulePathName);
}
// Print out the beginning of the error log in a Win95 error window
// compatible format.
hprintf(LogFile, "%s caused %s in module %s at %04x:%08x.\r\n",
FileName, GetExceptionDescription(Exception->ExceptionCode),
CrashModuleFileName, Context->SegCs, Context->Eip);
hprintf(LogFile, "Exception handler called in %s.\r\n", Message);
RecordSystemInformation(LogFile);
// If the exception was an access violation, print out some additional
// information, to the error log and the debugger.
if (Exception->ExceptionCode == STATUS_ACCESS_VIOLATION && Exception->NumberParameters >= 2) {
char DebugMessage[1000];
const char* readwrite = "Read from";
if (Exception->ExceptionInformation[0]) {
readwrite = "Write to";
}
wsprintf(DebugMessage, "%s location %08x caused an access violation.\r\n", readwrite, Exception->ExceptionInformation[1]);
#ifdef _DEBUG
// The VisualC++ debugger doesn't actually tell you whether a read
// or a write caused the access violation, nor does it tell what
// address was being read or written. So I fixed that.
OutputDebugString("Exception handler: ");
OutputDebugString(DebugMessage);
#endif
hprintf(LogFile, "%s", DebugMessage);
}
// Print out the register values in a Win95 error window compatible format.
hprintf(LogFile, "\r\n");
hprintf(LogFile, "Registers:\r\n");
hprintf(LogFile, "EAX=%08x CS=%04x EIP=%08x EFLGS=%08x\r\n",
Context->Eax, Context->SegCs, Context->Eip, Context->EFlags);
hprintf(LogFile, "EBX=%08x SS=%04x ESP=%08x EBP=%08x\r\n",
Context->Ebx, Context->SegSs, Context->Esp, Context->Ebp);
hprintf(LogFile, "ECX=%08x DS=%04x ESI=%08x FS=%04x\r\n",
Context->Ecx, Context->SegDs, Context->Esi, Context->SegFs);
hprintf(LogFile, "EDX=%08x ES=%04x EDI=%08x GS=%04x\r\n",
Context->Edx, Context->SegEs, Context->Edi, Context->SegGs);
hprintf(LogFile, "Bytes at CS:EIP:\r\n");
// Print out the bytes of code at the instruction pointer. Since the
// crash may have been caused by an instruction pointer that was bad,
// this code needs to be wrapped in an exception handler, in case there
// is no memory to read. If the dereferencing of code[] fails, the
// exception handler will print '??'.
unsigned char *code = (unsigned char*)Context->Eip;
for (int codebyte = 0; codebyte < NumCodeBytes; codebyte++) {
__try {
hprintf(LogFile, "%02x ", code[codebyte]);
}
__except(EXCEPTION_EXECUTE_HANDLER) {
hprintf(LogFile, "?? ");
}
}
// 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"
"Stack dump:\r\n");
__try {
// Esp contains the bottom of the stack, or at least the bottom of
// the currently used area.
DWORD* pStack = (DWORD *)Context->Esp;
DWORD* pStackTop;
__asm
{
// Load the top (highest address) of the stack from the
// thread information block. It will be found there in
// Win9x and Windows NT.
mov eax, fs:[4]
mov pStackTop, eax
}
if (pStackTop > pStack + MaxStackDump) {
pStackTop = pStack + MaxStackDump;
}
int Count = 0;
// Too many calls to WriteFile can take a long time, causing
// confusing delays when programs crash. Therefore I implemented
// simple buffering for the stack dumping code instead of calling
// hprintf directly.
char buffer[1000] = "";
const int safetyzone = 50;
char* nearend = buffer + sizeof(buffer) - safetyzone;
char* output = buffer;
while (pStack + 1 <= pStackTop) {
if ((Count % StackColumns) == 0) {
output += wsprintf(output, "%08x: ", pStack);
}
char *Suffix = " ";
if ((++Count % StackColumns) == 0 || pStack + 2 > pStackTop) {
Suffix = "\r\n";
}
output += wsprintf(output, "%08x%s", *pStack, Suffix);
pStack++;
// Check for when the buffer is almost full, and flush it to disk.
if (output > nearend) {
hprintf(LogFile, "%s", buffer);
buffer[0] = 0;
output = buffer;
}
}
// Print out any final characters from the cache.
hprintf(LogFile, "%s", buffer);
}
__except(EXCEPTION_EXECUTE_HANDLER) {
hprintf(LogFile, "Exception encountered during stack dump.\r\n");
}
RecordModuleList(LogFile);
CloseHandle(LogFile);
// Return the magic value which tells Win32 that this handler didn't
// actually handle the exception - so that things will proceed as per
// normal.
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -1,90 +0,0 @@
/*
* 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/ExceptionHandler/ExceptionHandler.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Header file for program exception handling
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:05 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 1 6/29/99 7:42p Dave
*
* 2 1/18/99 4:34p Allender
* added the exception handler routines from Game Developer for structured
* exception handling in vsdk code
*
* $NoKeywords: $
*/
#pragma once // Include this file only once
#ifndef __EXCEPTION_HANDLER_H
#define __EXCEPTION_HANDLER_H
// --------------------
//
// Defines
//
// --------------------
// --------------------
//
// Enumerated types
//
// --------------------
// --------------------
//
// Structures
//
// --------------------
// this is a forward declaration so we don't need to include windows.h
typedef struct _EXCEPTION_POINTERS EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
// --------------------
//
// Classes
//
// --------------------
// --------------------
//
// Variables
//
// --------------------
// --------------------
//
// Prototypes
//
// --------------------
int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message);
// --------------------
//
// Helper Macros
//
// --------------------
#endif // __EXCEPTION_HANDLER_H
File diff suppressed because it is too large. Load diff
-206
View File
@@ -1,206 +0,0 @@
/*
* 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/Fireball/FireBalls.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Prototypes for fireball functions
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 8 9/13/99 10:09a Andsager
* Add debug console commands to lower model render detail and fireball
* LOD for big ship explosiosns.
*
* 7 9/06/99 6:57p Jamesa
* Cranked down num large fireball explosions.
*
* 6 9/06/99 6:14p Jamesa
* Reduced max fireball types.
*
* 5 8/31/99 10:13p Andsager
* Add Knossos warp effect fireball
*
* 4 4/28/99 11:13p Dave
* Temporary checkin of artillery code.
*
* 3 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 34 5/15/98 3:54p John
* Added code so that only "perishable" fireballs get removed.
*
* 33 4/15/98 9:42a Adam
* added 2 more explosion types (1, actually, but placeholder for 2)
*
* 32 4/12/98 9:56a John
* Made lighting detail flags work. Made explosions cast light on
* highest.
*
* 31 3/30/98 4:02p John
* Made machines with < 32 MB of RAM use every other frame of certain
* bitmaps. Put in code to keep track of how much RAM we've malloc'd.
*
* 30 3/18/98 12:36p John
* Made hardware have nicer looking warp effect
*
* 29 2/26/98 10:07p Hoffoss
* Rewrote state saving and restoring to fix bugs and simplify the code.
*
* 28 2/19/98 4:32p Lawrance
* Add asteroid explosion
*
* 27 1/23/98 5:06p John
* Took L out of vertex structure used B (blue) instead. Took all small
* fireballs out of fireball types and used particles instead. Fixed some
* debris explosion things. Restructured fireball code. Restructured
* some lighting code. Made dynamic lighting on by default. Made groups
* of lasers only cast one light. Made fireballs not cast light.
*
* 26 1/15/98 4:58p John
* Made warp effect use a looping ani. Made the scaling up & down be in
* software.
*
* 25 1/15/98 2:32p John
* Added code to optionally take a velocity for a fireball.
*
* 24 1/02/98 5:04p John
* Several explosion related changes. Made fireballs not be used as
* ani's. Made ship spark system expell particles. Took away impact
* explosion for weapon hitting ship... this needs to get added to weapon
* info and makes shield hit more obvious. Only make sparks when hit
* hull, not shields.
*
* 23 12/08/97 11:15a John
* added parameter to warpout for life.
*
* 22 11/01/97 1:49p John
* added code to page fireballs in during level load. Made player warpout
* use Adam's new camera movement pattern. Make ships docked to warping
* out ships render correctly.
*
* 21 10/24/97 6:24p John
* added code to return the life left of a fireball
*
* 20 9/14/97 4:49p Lawrance
* extern Num_fireballs
*
* 19 9/12/97 4:02p John
* put in ship warp out effect.
* put in dynamic lighting for warp in/out
*
* 18 9/09/97 4:49p John
* Almost done ship warp in code
*
* 17 9/03/97 4:32p John
* changed bmpman to only accept ani and pcx's. made passing .pcx or .ani
* to bm_load functions not needed. Made bmpman keep track of palettes
* for bitmaps not mapped into game palettes.
*
* 16 8/29/97 2:26p John
* first rev of ship warp in effect. Nothing more than a fireball inside
* of freespace, but textest.cpp contains the correct effect code that
* needs to be transferred into the game next.
*
* 15 8/13/97 9:50p Allender
* split *_move into *_process_pre and *_process_post functions.
* process_pre functions called before object is moved. _process_post
* functions called after object is moved. Reordered code in ship_post
* and weapon_post for multiplayer
*
* 14 8/13/97 12:06p Lawrance
* supporting multiple types of fireball explosions
*
* 13 7/21/97 11:41a Lawrance
* clean up fireballs at the end of each level
*
* 12 7/11/97 11:19a Lawrance
* fix mem leaks, move save code from State.cpp here
*
* 11 7/10/97 1:51p Lawrance
* sorting anim fireballs
*
* 10 5/14/97 4:08p Lawrance
* removing my_index from game arrays
*
* 9 3/11/97 10:47p Mike
* Add a slew of secondary weapons.
* Support exhaust blobs.
* Add weapons that spawn weapons.
* Add remotely detonatable weapons.
* Add heat-seeking missiles.
*
* 8 2/17/97 5:18p John
* Added a bunch of RCS headers to a bunch of old files that don't have
* them.
*
* $NoKeywords: $
*/
#ifndef _FIREBALLS_H
#define _FIREBALLS_H
#include "object.h"
#include "cfile.h"
// these values correspond to the fireball.tbl entries
#define FIREBALL_EXPLOSION_MEDIUM 0 // Used for the 4 little explosions before a ship explodes
#define FIREBALL_WARP_EFFECT 1 // Used for the warp in / warp out effect
#define FIREBALL_KNOSSOS_EFFECT 2 // Used for the KNOSSOS warp in / warp out effect
#define FIREBALL_ASTEROID 3
#define FIREBALL_EXPLOSION_LARGE1 4 // Used for the big explosion when a ship breaks into pieces
#define FIREBALL_EXPLOSION_LARGE2 5 // Used for the big explosion when a ship breaks into pieces
// #define FIREBALL_EXPLOSION_LARGE3 6 // Used for the big explosion when a ship breaks into pieces
#define MAX_FIREBALL_TYPES 6 // How many types there are
#define FIREBALL_NUM_LARGE_EXPLOSIONS 2
void fireball_init();
void fireball_render(object * obj);
void fireball_delete( object * obj );
void fireball_process_pre(object * obj, float frame_time);
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);
void fireball_render_plane(int plane);
void fireball_close();
void fireball_level_close();
void fireball_preload(); // page in warpout effect data
// Returns 1 if you can remove this fireball
int fireball_is_perishable(object * obj);
// Returns 1 if this fireball is a warp
int fireball_is_warp(object * obj);
// Returns life left of a fireball in seconds
float fireball_lifeleft( object *obj );
// Returns life left of a fireball in percent
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 int Warp_glow_bitmap; // Internal
#endif /* _FIREBALLS_H */
-267
View File
@@ -1,267 +0,0 @@
/*
* 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/Fireball/WarpInEffect.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Code for rendering the warp in effects for ships
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 7/22/99 1:22p Dave
* Enable proper zbuffering for warpin glow effect.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 23 4/08/98 8:20p John
* Made "Apex" of warp effect not move.
*
* 22 3/30/98 4:02p John
* Made machines with < 32 MB of RAM use every other frame of certain
* bitmaps. Put in code to keep track of how much RAM we've malloc'd.
*
* 21 3/29/98 12:39p John
* Made warp in glow page in
*
* 20 3/26/98 5:21p John
* Added new code to preload all bitmaps at the start of a level.
* Commented it out, though.
*
* 19 3/18/98 12:36p John
* Made hardware have nicer looking warp effect
*
* 18 3/16/98 4:51p John
* Added low-level code to clip all polygons against an arbritary plane.
* Took out all old model_interp_zclip and used this new method instead.
*
* 17 3/10/98 4:18p John
* Cleaned up graphics lib. Took out most unused gr functions. Made D3D
* & Glide have popups and print screen. Took out all >8bpp software
* support. Made Fred zbuffer. Made zbuffer allocate dynamically to
* support Fred. Made zbuffering key off of functions rather than one
* global variable.
*
* 16 3/04/98 7:07p John
* Added debug code to try to normalize a zerolength vector.
*
* 15 2/26/98 3:28p John
* fixed optimize compiler warning
*
* 14 2/24/98 6:36p John
* Made warp effect draw as a 4 poly cone.
*
* 13 2/22/98 12:19p John
* Externalized some strings
*
* 12 1/15/98 9:07p John
* Added noise to warp effect glow.
*
* 11 1/15/98 4:58p John
* Made warp effect use a looping ani. Made the scaling up & down be in
* software.
*
* 10 12/30/97 6:44p John
* Made g3_Draw_bitmap functions account for aspect of bitmap.
*
* 9 12/08/97 11:15a John
* added parameter to warpout for life.
*
* 8 12/05/97 3:46p John
* made ship thruster glow scale instead of being an animation.
*
* 7 12/02/97 3:59p John
* Added first rev of thruster glow, along with variable levels of
* translucency, which retquired some restructing of palman.
*
* 6 10/24/97 12:18p John
* sped up warp effect by decreasing number of polys with distance.
*
* 5 9/15/97 5:45p John
* took out chunk stuff.
* made pofview display thrusters as blue polies.
*
* 4 9/12/97 4:02p John
* put in ship warp out effect.
* put in dynamic lighting for warp in/out
*
* 3 9/09/97 4:49p John
* Almost done ship warp in code
*
* 2 9/08/97 8:39a John
* added in code structure for grid
*
* 1 9/05/97 10:07a John
*
* $NoKeywords: $
*/
#include "vecmat.h"
#include "tmapper.h"
#include "2d.h"
#include "3d.h"
#include "bmpman.h"
#include "model.h"
#include "key.h"
#include "physics.h"
#include "floating.h"
#include "model.h"
#include "lighting.h"
#include "object.h"
#include "ship.h"
#include "systemvars.h"
#include "animplay.h"
#include "fireballs.h"
#include "linklist.h"
#include "timer.h"
DCF(norm,"normalize a zero length vector")
{
if ( Dc_command ) {
vector tmp = vmd_zero_vector;
vm_vec_normalize(&tmp);
}
}
void draw_face( vertex *v1, vertex *v2, vertex *v3 )
{
vector norm;
vertex *vertlist[3];
vm_vec_perp(&norm,(vector *)&v1->x,(vector *)&v2->x,(vector *)&v3->x);
if ( vm_vec_dot(&norm,(vector *)&v1->x ) >= 0.0 ) {
vertlist[0] = v3;
vertlist[1] = v2;
vertlist[2] = v1;
} else {
vertlist[0] = v1;
vertlist[1] = v2;
vertlist[2] = v3;
}
g3_draw_poly( 3, vertlist, TMAP_FLAG_TEXTURED );
}
void warpin_render(matrix *orient, vector *pos, int texture_bitmap_num, float radius, float life_percent, float max_radius )
{
int i;
int saved_gr_zbuffering = gr_zbuffer_get();
// gr_zbuffering = 0;
gr_set_bitmap( texture_bitmap_num, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
float Grid_depth = radius/2.5f;
vector center;
vm_vec_scale_add( &center, pos, &orient->fvec, -(max_radius/2.5f)/3.0f );
vector vecs[5];
vertex verts[5];
vm_vec_scale_add( &vecs[0], &center, &orient->uvec, radius );
vm_vec_scale_add2( &vecs[0], &orient->rvec, -radius );
vm_vec_scale_add2( &vecs[0], &orient->fvec, Grid_depth );
vm_vec_scale_add( &vecs[1], &center, &orient->uvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->rvec, radius );
vm_vec_scale_add2( &vecs[1], &orient->fvec, Grid_depth );
vm_vec_scale_add( &vecs[2], &center, &orient->uvec, -radius );
vm_vec_scale_add2( &vecs[2], &orient->rvec, radius );
vm_vec_scale_add2( &vecs[2], &orient->fvec, Grid_depth );
vm_vec_scale_add( &vecs[3], &center, &orient->uvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->rvec, -radius );
vm_vec_scale_add2( &vecs[3], &orient->fvec, Grid_depth );
// vm_vec_scale_add( &vecs[4], &center, &orient->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++ ) {
g3_rotate_vertex( &verts[i], &vecs[i] );
}
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 );
float r = radius;
int render_it;
#define OUT_PERCENT1 0.80f
#define OUT_PERCENT2 0.90f
#define IN_PERCENT1 0.10f
#define IN_PERCENT2 0.20f
if ( life_percent < IN_PERCENT1 ) {
// do nothing
render_it = 0;
} else if ( life_percent < IN_PERCENT2 ) {
r *= ( life_percent-IN_PERCENT1 ) / (IN_PERCENT2-IN_PERCENT1);
render_it = 1;
} else if ( life_percent < OUT_PERCENT1 ) {
// do nothing
render_it = 1;
} else if ( life_percent < OUT_PERCENT2 ) {
r *= (OUT_PERCENT2 - life_percent) / (OUT_PERCENT2-OUT_PERCENT1);
render_it = 1;
} else {
// do nothing
render_it = 0;
}
if (render_it) {
int saved_gr_zbuffering = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_READ);
// Add in noise
//float Noise[NOISE_NUM_FRAMES] = {
int noise_frame = fl2i(Missiontime/15.0f) % NOISE_NUM_FRAMES;
r *= (0.40f + Noise[noise_frame]*0.30f);
g3_draw_bitmap( &verts[4], 0,r, TMAP_FLAG_TEXTURED );
gr_zbuffer_set(saved_gr_zbuffering);
}
}
gr_zbuffer_set( saved_gr_zbuffering );
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because it is too large. Load diff
-354
View File
@@ -1,354 +0,0 @@
/*
* 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/FREESPACE2/FreeSpace.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* FreeSpace, the game, not the project, header information.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 24 10/06/99 10:32a Jefff
* oem updates
*
* 23 9/30/99 6:04p Jefff
* OEM changes
*
* 22 9/08/99 3:22p Dave
* Updated builtin mission list.
*
* 21 9/06/99 6:38p Dave
* Improved CD detection code.
*
* 20 9/06/99 1:30a Dave
* Intermediate checkin. Started on enforcing CD-in-drive to play the
* game.
*
* 19 9/06/99 1:16a Dave
* Make sure the user sees the intro movie.
*
* 18 9/05/99 11:19p Dave
* Made d3d texture cache much more safe. Fixed training scoring bug where
* it would backout scores without ever having applied them in the first
* place.
*
* 17 9/03/99 1:32a Dave
* CD checking by act. Added support to play 2 cutscenes in a row
* seamlessly. Fixed super low level cfile bug related to files in the
* root directory of a CD. Added cheat code to set campaign mission # in
* main hall.
*
* 16 8/19/99 10:12a Alanl
* preload mission-specific messages on machines greater than 48MB
*
* 15 5/19/99 4:07p Dave
* Moved versioning code into a nice isolated common place. Fixed up
* updating code on the pxo screen. Fixed several stub problems.
*
* 14 5/09/99 8:57p Dave
* Final E3 build preparations.
*
* 13 5/05/99 10:06a Dave
* Upped beta version to 0.04
*
* 12 4/29/99 3:02p Dave
* New beta version.
*
* 11 4/25/99 3:02p Dave
* Build defines for the E3 build.
*
* 10 4/09/99 2:27p Dave
* Upped version #
*
* 9 4/09/99 2:21p Dave
* Multiplayer beta stuff. CD checking.
*
* 8 4/08/99 2:10a Dave
* Numerous bug fixes for the beta. Added builtin mission info for the
* beta.
*
* 7 3/19/99 9:52a Dave
* Checkin to repair massive source safe crash. Also added support for
* pof-style nebulae, and some new weapons code.
*
* 6 12/03/98 5:22p Dave
* Ported over Freespace 1 multiplayer ships.tbl and weapons.tbl
* checksumming.
*
* 5 10/13/98 9:26a Dave
* Began neatening up freespace.h.
*
* 4 10/09/98 1:35p Dave
* Split off registry stuff into seperate file.
*
* 3 10/07/98 6:27p Dave
* Globalized mission and campaign file extensions. Removed Silent Threat
* special code. Moved \cache \players and \multidata into the \data
* directory.
*
* 2 10/07/98 10:54a Dave
* Initial checkin.
*
* 79 9/13/98 10:51p Dave
* Put in newfangled icons for mission simulator room. New mdisk.vp
* checksum and file length.
*
* 78 9/11/98 6:59p Dave
* First beta/rev thingie to interplay.
*
* 77 9/11/98 4:14p Dave
* Fixed file checksumming of < file_size. Put in more verbose kicking and
* PXO stats store reporting.
*
* 76 9/04/98 3:51p Dave
* Put in validated mission updating and application during stats
* updating.
*
* 75 5/23/98 2:41p Mike
* Make Easy the default skill level and prevent old pilot's skill level
* from carrying into new pilot.
*
* 74 5/19/98 1:19p Allender
* new low level reliable socket reading code. Make all missions/campaign
* load/save to data missions folder (i.e. we are rid of the player
* missions folder)
*
* 73 5/13/98 11:34p Mike
* Model caching system.
*
* 72 5/10/98 10:05p Allender
* only show cutscenes which have been seen before. Made Fred able to
* write missions anywhere, defaulting to player misison folder, not data
* mission folder. Fix FreeSpace code to properly read missions from
* correct locations
*
* 71 5/08/98 7:08p Dave
* Lots of UI tweaking.
*
* 70 5/08/98 5:31p Lawrance
* extern cd checking routines
*
* $NoKeywords: $
*/
#ifndef _FREESPACE_H
#define _FREESPACE_H
#ifndef STAMPER_PROGRAM // because of all the dependancies, I have to do this...yuck!!! MWA 7/21/97
#include "pstypes.h"
#include "systemvars.h"
#include "2d.h"
// --------------------------------------------------------------------------------------------------------
// FREESPACE DEFINES/VARS
//
// filename extensions
#define FS_MISSION_FILE_EXT NOX(".fs2")
#define FS_CAMPAIGN_FILE_EXT NOX(".fc2")
// CDROM volume names
#ifdef MULTIPLAYER_BETA_BUILD
#define FS_CDROM_VOLUME_1 NOX("FS2_BETA")
#define FS_CDROM_VOLUME_2 NOX("FS2_BETA")
#elif defined(E3_BUILD)
#define FS_CDROM_VOLUME_1 NOX("FS2_E3DEMO")
#define FS_CDROM_VOLUME_2 NOX("FS2_E3DEMO")
#elif defined(OEM_BUILD)
#define FS_CDROM_VOLUME_1 NOX("FS2_OEM")
#define FS_CDROM_VOLUME_2 NOX("FS2_OEM")
#define FS_CDROM_VOLUME_3 NOX("FS2_OEM")
#else
#define FS_CDROM_VOLUME_1 NOX("FREESPACE2_1")
#define FS_CDROM_VOLUME_2 NOX("FREESPACE2_2")
#define FS_CDROM_VOLUME_3 NOX("FREESPACE2_3")
// old volume names
// #define FS_CDROM_VOLUME_1 NOX("FREESPACE_1")
// #define FS_CDROM_VOLUME_2 NOX("FREESPACE_2")
// #define FS_CDROM_VOLUME_3 NOX("FREESPACE_3")
#endif
// frametime/missiontime variables
extern fix Frametime;
extern float flFrametime;
extern fix Missiontime;
// 0 - 4
extern int Game_skill_level;
// see GM_* defines in systemvars.h
extern int Game_mode;
// if this value is set anywhere within the game_do_state_common() function, the normal do_state() will not be called
// for this frame. Useful for getting out of sticky sequencing situations.
extern int Game_do_state_should_skip;
// time compression
extern fix Game_time_compression;
// Set if subspace is active this level
extern int Game_subspace_effect;
// The current mission being played.
extern char Game_current_mission_filename[MAX_FILENAME_LEN];
// game's CDROM directory
extern char Game_CDROM_dir[MAX_PATH_LEN];
// if the ships.tbl the player has is valid
extern int Game_ships_tbl_valid;
// if the weapons.tbl the player has is valid
extern int Game_weapons_tbl_valid;
// this is a mission actually designed at Volition
#define MAX_BUILTIN_MISSIONS 100
#define FSB_FROM_VOLITION (1<<0) // we made it in-house
#define FSB_MULTI (1<<1) // is a multiplayer mission
#define FSB_TRAINING (1<<2) // is a training mission
#define FSB_CAMPAIGN (1<<3) // is a campaign mission
#define FSB_CAMPAIGN_FILE (1<<4) // is actually a campaign file
typedef struct fs_builtin_mission {
char filename[MAX_FILENAME_LEN];
int flags; // see FSB_* defines above
char cd_volume[MAX_FILENAME_LEN]; // cd volume which this needs
} fs_builtin_mission;
// --------------------------------------------------------------------------------------------------------
// FREESPACE FUNCTIONS
//
// mission management -------------------------------------------------
// loads in the currently selected mission
int game_start_mission();
// shutdown a mission
void game_level_close();
// gameplay stuff -----------------------------------------------------
// stop the game (mission) timer
void game_stop_time();
// start the game (mission) timer
void game_start_time();
// call whenever in a loop or if you need to get a keypress
int game_check_key();
// poll for keypresses
int game_poll();
// function to read keyboard stuff
void game_process_keys();
// call this to set frametime properly (once per frame)
void game_set_frametime(int state);
// Used to halt all looping game sounds
void game_stop_looped_sounds();
// do stuff that may need to be done regardless of state
void game_do_state_common(int state,int no_networking = 0);
// skill level --------------------------------------------------------
// increase the skill level (will wrap around to min skill level)
void game_increase_skill_level();
// get the default game skill level
int game_get_default_skill_level();
// a keypress. See CPP file for more info.
void game_flush();
// running with low-memory (less than 48MB)
bool game_using_low_mem();
// misc ---------------------------------------------------------------
// lookup the specified filename. return an fs_builtin_mission* if found, NULL otherwise
fs_builtin_mission *game_find_builtin_mission(char *filename);
//================================================================
// GAME FLASH STUFF - code in FreeSpace.cpp
// Resets the flash
void game_flash_reset();
// Adds a flash effect. These can be positive or negative.
// The range will get capped at around -1 to 1, so stick
// with a range like that.
void game_flash( float r, float g, float b );
// Adds a flash for Big Ship explosions
// cap range from 0 to 1
void big_explosion_flash(float flash);
// Call once a frame to diminish the
// flash effect to 0.
void game_flash_diminish();
// Loads the best palette for this level, based
// on nebula color and hud color. You could just call palette_load_table with
// the appropriate filename, but who wants to do that.
void game_load_palette();
//================================================================
// Call at the beginning of each frame
void game_whack_reset();
// Call to apply a whack to a the ship. Used for force feedback
void game_whack_apply( float x, float y );
// call to apply a "shudder"
void game_shudder_apply(int time, float intensity);
//===================================================================
// make sure a CD is in the drive before continuing (returns 1 to continue, otherwise 0).
int game_do_cd_check(char *volume_name=NULL);
int game_do_cd_check_specific(char *volume_name, int cdnum);
int find_freespace_cd(char *volume_name=NULL);
int set_cdrom_path(int drive_num);
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();
// Return version string for demo or full version, depending on build.
void get_version_string(char *str);
// format the specified time (fixed point) into a nice string
void game_format_time(fix m_time,char *time_str);
// if the game is running using hacked data
int game_hacked_data();
// show the oem upsell screens (end of campaign, or close of game
void oem_upsell_show_screens();
#endif // endif of #ifndef STAMPER_PROGRAM
#endif
-376
View File
@@ -1,376 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "freespaceresource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"FreespaceResource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include <windows.h>\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
DEBUG_MENU DIALOG DISCARDABLE 0, 0, 185, 159
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug Menu"
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_LIST_DEBUG,7,7,171,121,LBS_OWNERDRAWFIXED |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Ok",IDOK,7,137,171,14
END
FIND_DIALOG DIALOG DISCARDABLE 0, 0, 119, 47
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Find Text"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_TEXT,7,7,105,14,ES_AUTOHSCROLL
DEFPUSHBUTTON "Find",IDOK,7,26,50,14
PUSHBUTTON "Cancel",IDCANCEL,62,26,50,14
END
IDD_CONNECT DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Server"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "# Connections :",IDC_CON_COUNT,7,54,148,10
LISTBOX IDC_CONPING,7,79,148,167,WS_VSCROLL | WS_TABSTOP
LTEXT "Address and Ping",IDC_STATIC,7,66,143,10
PUSHBUTTON "Reset All",IDC_RESET_MULTI,162,174,46,72
PUSHBUTTON "Kick",IDC_KICK_BUTTON,161,80,47,19
CONTROL "",IDC_STATIC,"Static",SS_GRAYRECT,7,48,201,1
EDITTEXT IDC_STD_NAME,64,14,144,14,ES_AUTOHSCROLL
LTEXT "Server Name",IDC_STATIC,7,17,42,8
EDITTEXT IDC_STD_HOST_PASSWD,64,32,144,14,ES_AUTOHSCROLL
LTEXT "Host Password",IDC_STATIC,7,33,48,8
PUSHBUTTON "Refresh Missions",IDC_PXO_REFRESH,161,116,47,36,
BS_MULTILINE
END
IDD_MULTI DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Multi-Player"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Frame Cap :",10,7,28,43,8
LTEXT "",IDC_FRAMECAP_STATIC,53,29,46,10,SS_SUNKEN
LTEXT "Realized FPS :",IDC_STATIC_A,119,30,49,12
LTEXT "",IDC_STANDALONE_FPS,172,29,34,11,SS_SUNKEN
LTEXT "Mission Time :",IDC_STATIC_A2,13,91,49,12
LTEXT "",IDC_STANDALONE_MTIME,71,90,125,11,SS_SUNKEN
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_SUNKEN,7,43,199,
1
LTEXT "Mission Name :",IDC_STATIC,13,80,52,11
LTEXT "",IDC_MISSION_NAME,71,78,125,11,SS_SUNKEN
LTEXT "Mission Goals",IDC_STATIC,7,140,74,8
LTEXT "Netgame Information",IDC_STATIC,133,140,66,8
LTEXT "Max Players",IDC_STATIC,117,158,42,8
LTEXT "Max Observers",IDC_STATIC,117,184,48,8
LTEXT "Security",IDC_STATIC,117,210,26,8
LTEXT "Respawns",IDC_STATIC,117,236,34,8
LTEXT "",IDC_NG_MAXPLAYERS,178,158,28,8
LTEXT "",IDC_NG_MAXOBSERVERS,178,184,28,8
LTEXT "",IDC_NG_SECURITY,178,210,28,8
LTEXT "",IDC_NG_RESPAWNS,178,236,28,8
END
IDD_PLAYER_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Player Info"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_LIST,77,6,112,169,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Ship Type",IDC_STATIC,7,24,38,10
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,104,24,1,54
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,77,201,1
LTEXT "",IDC_PSHIP_TYPE,53,24,49,10,SS_SUNKEN
LTEXT "Mission Stats",IDC_STATIC,133,79,44,10
LTEXT "Primary Shots",IDC_STATIC,7,89,45,9
LTEXT "Primary Hits",IDC_STATIC,7,100,40,9
LTEXT "Primary BH Hits",IDC_STATIC,7,112,50,9
LTEXT "Primary Hit %",IDC_STATIC,7,123,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,7,134,55,9
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,104,78,1,168
LTEXT "All Time Stats",IDC_STATIC,33,79,44,10
LTEXT "Primary Shots",IDC_STATIC,107,88,45,9
LTEXT "Primary Hits",IDC_STATIC,107,99,40,9
LTEXT "Primary BH Hits",IDC_STATIC,107,111,50,9
LTEXT "Primary Hit %",IDC_STATIC,107,122,43,9
LTEXT "Primary BH Hit %",IDC_STATIC,107,133,55,9
LTEXT "Secondary Shots",IDC_STATIC,7,145,56,9
LTEXT "Secondary Hits",IDC_STATIC,7,156,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,7,167,63,9
LTEXT "Secondary Hit %",IDC_STATIC,7,177,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,7,189,65,9
LTEXT "Secondary Shots",IDC_STATIC,107,144,56,9
LTEXT "Secondary Hits",IDC_STATIC,107,155,49,9
LTEXT "Secondary BH Hits",IDC_STATIC,107,166,63,9
LTEXT "Secondary Hit %",IDC_STATIC,107,176,55,9
LTEXT "Secondary BH Hit %",IDC_STATIC,107,187,65,9
LTEXT "",IDC_PSHOTS,75,90,28,8,SS_SUNKEN
LTEXT "",IDC_PHITS,75,101,28,8,SS_SUNKEN
LTEXT "",IDC_PBHHITS,75,112,28,8,SS_SUNKEN
LTEXT "",IDC_PPCT,75,123,28,8,SS_SUNKEN
LTEXT "",IDC_PBHPCT,75,134,28,8,SS_SUNKEN
LTEXT "",IDC_SSHOTS,75,145,28,8,SS_SUNKEN
LTEXT "",IDC_SECHITS,75,156,28,8,SS_SUNKEN
LTEXT "",IDC_SBHHITS,75,166,28,9,SS_SUNKEN
LTEXT "",IDC_SPCT,75,178,28,8,SS_SUNKEN
LTEXT "",IDC_SBHPCT,75,190,28,8,SS_SUNKEN
LTEXT "",IDC_MPSHOTS,180,89,28,8,SS_SUNKEN
LTEXT "",IDC_MPHITS,180,100,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHHITS,180,111,28,8,SS_SUNKEN
LTEXT "",IDC_MPPCT,180,122,28,8,SS_SUNKEN
LTEXT "",IDC_MPBHPCT,180,134,28,8,SS_SUNKEN
LTEXT "",IDC_MSSHOTS,180,145,28,8,SS_SUNKEN
LTEXT "",IDC_MSECHITS,180,156,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHHITS,180,167,28,8,SS_SUNKEN
LTEXT "",IDC_MSPCT,180,178,28,8,SS_SUNKEN
LTEXT "",IDC_MSBHPCT,180,189,28,8,SS_SUNKEN
CONTROL "",IDC_PINFO_PING,"Static",SS_WHITERECT | SS_NOTIFY |
SS_SUNKEN,7,215,201,1
LTEXT "Player",IDC_STATIC,44,6,20,8
LTEXT "",IDC_PING_TIME,53,38,49,10,SS_SUNKEN
LTEXT "Avg Ping",IDC_STATIC,7,38,32,9
LTEXT "Assists",IDC_STATIC,7,200,54,10
LTEXT "Assists",IDC_STATIC,107,200,54,10
LTEXT "",IDC_ASSISTS,75,201,28,9,SS_SUNKEN
LTEXT "",IDC_MASSISTS,180,200,28,9,SS_SUNKEN
END
IDD_GODSTUFF DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "God Stuff"
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_PLAYER_GOD_LIST,39,7,101,211,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_GODSTUFF_FPS,177,7,31,8,SS_SUNKEN
LTEXT "FPS",IDC_STATIC,154,7,16,8
LTEXT "Player ",IDC_STATIC,7,7,20,12
EDITTEXT IDC_GODSTUFF_BROADCAST,7,47,201,12,ES_MULTILINE
LTEXT "Server Message",IDC_STATIC,7,39,54,8
PUSHBUTTON "Send",IDC_GODSTUFF_SENDMESS,7,59,70,13
LISTBOX IDC_GOD_CHAT,7,84,201,162,LBS_NOINTEGRALHEIGHT |
LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
END
IDD_DEBUG_DIALOG DIALOG DISCARDABLE 0, 0, 215, 253
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Debug"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Standalone State :",IDC_STATIC,7,7,61,11
LTEXT "",IDC_STANDALONE_STATE,71,7,125,11,SS_SUNKEN
END
IDD_GEN DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
CTEXT "",IDC_FIELD1,27,11,136,8
CTEXT "",IDC_FIELD2,28,30,130,8
CTEXT "",IDC_FIELD3,27,49,138,8
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
"DEBUG_MENU", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 178
TOPMARGIN, 7
BOTTOMMARGIN, 152
END
"FIND_DIALOG", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 112
TOPMARGIN, 7
BOTTOMMARGIN, 40
END
IDD_CONNECT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_MULTI, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 206
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_PLAYER_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 6
BOTTOMMARGIN, 246
END
IDD_GODSTUFF, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_DEBUG_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 208
TOPMARGIN, 7
BOTTOMMARGIN, 246
END
IDD_GEN, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 5
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Volition Inc.\0"
VALUE "FileDescription", "FreeSpace\0"
VALUE "FileVersion", "1.03.01\0"
VALUE "InternalName", "FreeSpace\0"
VALUE "LegalCopyright", "Copyright © 1998\0"
VALUE "OriginalFilename", "fs.exe\0"
VALUE "ProductName", "FreeSpace\0"
VALUE "ProductVersion", "1.03.01\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_GOAL_INC BITMAP DISCARDABLE "goal_inc.bmp"
IDB_GOAL_COMP BITMAP DISCARDABLE "goal_com.bmp"
IDB_GOAL_ORD BITMAP DISCARDABLE "goal_ord.bmp"
IDB_GOAL_NONE BITMAP DISCARDABLE "goal_none.bmp"
IDB_GOAL_FAIL BITMAP DISCARDABLE "goal_fail.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_APP_ICON ICON DISCARDABLE "app_icon.ico"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -1,93 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by FreeSpace.rc
//
#define IDD_DEBUG_MENU 101
#define IDD_CONNECT 108
#define IDD_MULTI 109
#define IDC_CURSOR1 111
#define IDC_CURSOR2 112
#define IDD_PLAYER_DIALOG 114
#define IDD_GODSTUFF 115
#define IDD_DEBUG_DIALOG 116
#define IDB_GOAL_INC 118
#define IDB_GOAL_COMP 119
#define IDB_GOAL_ORD 120
#define IDB_GOAL_NONE 121
#define IDB_GOAL_FAIL 122
#define IDI_APP_ICON 124
#define IDD_GEN 127
#define IDC_LIST_DEBUG 1000
#define IDC_DEBUG_TEXT1 1001
#define IDC_DEBUG_TEXT2 1002
#define IDC_TEXT 1003
#define IDC_HOST_IS 1005
#define IDC_CONPING 1007
#define IDC_RESET_MULTI 1011
#define IDC_STANDALONE_STATE 1012
#define IDC_STATIC_A 1013
#define IDC_STANDALONE_FPS 1014
#define IDC_STATIC_A2 1015
#define IDC_STANDALONE_MTIME 1016
#define IDC_PLAYER_LIST 1016
#define IDC_PSHIP_TYPE 1017
#define IDC_NETPLAYER_NUM 1018
#define IDC_PHITS 1019
#define IDC_PBHHITS 1020
#define IDC_PPCT 1021
#define IDC_PBHPCT 1022
#define IDC_SSHOTS 1023
#define IDC_MPSHOTS 1024
#define IDC_PLAYER_GOD_LIST 1026
#define IDC_SECHITS 1028
#define IDC_SBHHITS 1029
#define IDC_SPCT 1030
#define IDC_SBHPCT 1031
#define IDC_MPHITS 1032
#define IDC_MPBHHITS 1033
#define IDC_MPPCT 1034
#define IDC_MPBHPCT 1035
#define IDC_MSSHOTS 1036
#define IDC_MSECHITS 1037
#define IDC_MSBHHITS 1038
#define IDC_MSPCT 1039
#define IDC_MSBHPCT 1040
#define IDC_PSHOTS 1041
#define IDC_PING_TIME 1042
#define IDC_MISSION_NAME 1043
#define IDC_GODSTUFF_BROADCAST 1044
#define IDC_GODSTUFF_SENDMESS 1045
#define IDC_STD_GOALS 1049
#define IDC_PLAYER_MESSAGES 1051
#define IDC_ASSISTS 1052
#define IDC_MASSISTS 1053
#define IDC_KICK_BUTTON 1054
#define IDC_STD_NAME 1055
#define IDC_NG_MAXPLAYERS 1057
#define IDC_NG_MAXOBSERVERS 1058
#define IDC_NG_SECURITY 1059
#define IDC_NG_RESPAWNS 1060
#define IDC_GOD_CHAT 1061
#define IDC_STD_HOST_PASSWD 1062
#define IDC_FIELD1 1064
#define IDC_FIELD2 1065
#define IDC_FIELD3 1066
#define IDC_PXO_REFRESH 1067
#define IDC_CON_COUNT 2000
#define IDC_FRAMECAP_STATIC 2001
#define IDC_GODSTUFF_FPS 2002
#define IDC_PINFO_PING 2003
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 128
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1068
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

-113
View File
@@ -1,113 +0,0 @@
/*
* 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/Freespace2/LevelPaging.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Code to page in all the bitmaps at the beginning of a level.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 4 8/19/99 10:12a Alanl
* preload mission-specific messages on machines greater than 48MB
*
* 3 8/10/99 6:54p Dave
* Mad optimizations. Added paging to the nebula effect.
*
* 2 10/07/98 10:54a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 6 5/23/98 4:14p John
* Added code to preload textures to video card for AGP. Added in code
* to page in some bitmaps that weren't getting paged in at level start.
*
* 5 4/05/98 4:15p Dave
* Fixed a weapons model paging problem with the standalone server.
*
* 4 4/01/98 5:34p John
* Made only the used POFs page in for a level. Reduced some interp
* arrays. Made custom detail level work differently.
*
* 3 3/29/98 4:05p John
* New paging code that loads everything necessary at level startup.
*
* 2 3/26/98 5:26p John
* added new paging code. nonfunctional.
*
* 1 3/26/98 5:14p John
*
* $NoKeywords: $
*/
#include "freespace.h"
#include "bmpman.h"
#include "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 weapons_page_in();
extern void fireballs_page_in();
extern void shockwave_page_in();
extern void shield_hit_page_in();
extern void asteroid_page_in();
extern void training_mission_page_in();
extern void neb2_page_in();
extern void message_pagein_mission_messages();
// Pages in all the texutures for the currently
// loaded mission. Call game_busy() occasionally...
void level_page_in()
{
mprintf(( "Beginning level bitmap paging...\n" ));
if(!(Game_mode & GM_STANDALONE_SERVER)){
bm_page_in_start();
}
// Most important ones first
ship_page_in();
weapons_page_in();
fireballs_page_in();
particle_page_in();
debris_page_in();
hud_page_in();
radar_page_in();
training_mission_page_in();
stars_page_in();
shockwave_page_in();
shield_hit_page_in();
asteroid_page_in();
neb2_page_in();
// preload mission messages if NOT running low-memory (greater than 48MB)
if (game_using_low_mem() == false) {
message_pagein_mission_messages();
}
if(!(Game_mode & GM_STANDALONE_SERVER)){
bm_page_in_stop();
}
mprintf(( "Ending level bitmap paging...\n" ));
}
-40
View File
@@ -1,40 +0,0 @@
/*
* 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/FREESPACE2/LevelPaging.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Code to page in all the bitmaps at the beginning of a level.
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/07/98 10:54a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 1 3/26/98 5:14p John
*
* $NoKeywords: $
*/
#ifndef _LEVELPAGING_H
#define _LEVELPAGING_H
// Call this and it calls the page in code for all the subsystems
void level_page_in();
#endif //_LEVELPAGING_H
-910
View File
@@ -1,910 +0,0 @@
/*
* 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/GameHelp/ContextHelp.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Functions to drive the context-sensitive help
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 16 8/22/99 4:22p Jefff
* removed 2nd tech room overlay stuff
*
* 15 8/09/99 5:54p Jefff
* tech room overlay changes
*
* 14 7/27/99 7:18p Jefff
* fixed a debug function for adjsuting overlays in-game
*
* 13 7/20/99 1:49p Dave
* Peter Drake build. Fixed some release build warnings.
*
* 12 7/16/99 10:07a Jefff
* Removed legacy bitmap overlay code
*
* 11 7/16/99 10:04a Jefff
*
* 10 7/15/99 9:20a Andsager
* FS2_DEMO initial checkin
*
* 9 7/11/99 6:40p Jefff
*
* 8 7/08/99 6:25p Jefff
* got new help system working
*
* 7 6/03/99 10:15p Dave
* Put in temporary main hall screen.
*
* 6 3/25/99 8:32p Neilk
* temporary barracks help removal
*
* 5 2/15/99 9:37a Dave
* Removed infinite loop from context help parse code.
*
* 4 2/11/99 4:05p Neilk
* Temporary checkin
*
* 3 1/29/99 2:37p Neilk
* foundation for a new help system
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 92 5/06/98 11:49p Lawrance
* Add help overlay for command brief
*
* 91 5/05/98 1:49a Lawrance
* Add in missing help overlays
*
* 90 4/25/98 2:00p Dave
* Installed a bunch of multiplayer context help screens. Reworked ingame
* join ship select screen. Fix places where network timestamps get hosed.
*
* 89 4/20/98 12:03a Lawrance
* make gray help shader lighter
*
* 88 4/11/98 7:59p Lawrance
* Add support for help overlays
*
* 87 3/12/98 5:36p John
* Took out any unused shaders. Made shader code take rgbc instead of
* matrix and vector since noone used it like a matrix and it would have
* been impossible to do in hardware. Made Glide implement a basic
* shader for online help.
*
* 86 3/09/98 9:55p Lawrance
* split off gameplay help, rip out obsolete code
*
* 85 3/05/98 11:15p Hoffoss
* Changed non-game key checking to use game_check_key() instead of
* game_poll().
*
* 84 2/28/98 9:47p Lawrance
* Fix couple of typos
*
* 83 2/28/98 7:02p Lawrance
* overhaul on-line help
*
*/
#include <string.h>
#include <setjmp.h>
#include "contexthelp.h"
#include "gamesequence.h"
#include "freespace.h"
#include "mainhallmenu.h"
#include "key.h"
#include "bmpman.h"
#include "2d.h"
#include "timer.h"
#include "math.h"
#include "mouse.h"
#include "controlsconfig.h"
#include "techmenu.h"
#include "parselo.h"
#include "localize.h"
#include "alphacolors.h"
////////////////////////////////////////////////////////////////////
// private function prototypes / structs
////////////////////////////////////////////////////////////////////
void parse_helptbl();
void help_overlay_blit(int overlay_id);
void help_overlay_init();
typedef struct {
int x_begin, y_begin, x_end, y_end;
} help_line;
typedef struct {
vector vtx[HELP_MAX_PLINE_VERTICES];
vector *pvtx[HELP_MAX_PLINE_VERTICES];
int vtxcount;
} help_pline;
typedef struct {
int x_coord, y_coord;
char* string;
} help_text;
typedef struct {
int x_coord, y_coord;
} help_left_bracket;
typedef struct {
int x_coord, y_coord;
} help_right_bracket;
typedef struct {
help_pline plinelist[GR_NUM_RESOLUTIONS][HELP_MAX_ITEM];
help_text textlist[GR_NUM_RESOLUTIONS][HELP_MAX_ITEM];
help_left_bracket lbracketlist[GR_NUM_RESOLUTIONS][HELP_MAX_ITEM];
help_right_bracket rbracketlist[GR_NUM_RESOLUTIONS][HELP_MAX_ITEM];
int plinecount;
int textcount;
int lbracketcount;
int rbracketcount;
} help_overlay;
// new help.tbl file way
char *help_overlay_section_names[MAX_HELP_OVERLAYS] = {
"$ship", // ship_help
"$weapon", // weapon_help
"$briefing", // briefing
"$main", // main help overlay
"$barracks", // barracks
"$control", // control help
"$debrief", // debrief help
"$multicreate", // multicreate help
"$multistart", // multistart help
"$multijoin", // multijoin help
"$main2", // main help overlay2
"$hotkey", // hotkey help
"$campaign", // campaign help
"$simulator", // simulator help
"$tech", // tech help
"$command" // command help
};
////////////////////////////////////////////////////////////////////
// Game-wide globals
////////////////////////////////////////////////////////////////////
shader Grey_shader;
////////////////////////////////////////////////////////////////////
// Module globals
////////////////////////////////////////////////////////////////////
static int help_left_bracket_bitmap;
static int help_right_bracket_bitmap;
static help_overlay help_overlaylist[MAX_HELP_OVERLAYS];
static int current_helpid = -1; // the currently active overlay_id, only really used for the debug console funxions
int Help_overlay_flags;
static int Source_game_state; // state from where F1 was pressed
////////////////////////////////////////////////////////////////////
// Public Functions
////////////////////////////////////////////////////////////////////
// query whether a help overlay is active (ie being displayed)
int help_overlay_active(int overlay_id)
{
Assert(overlay_id >= 0 && overlay_id < MAX_HELP_OVERLAYS);
return Help_overlay_flags & (1<<overlay_id);
}
// stop displaying a help overlay
void help_overlay_set_state(int overlay_id, int state)
{
Assert(overlay_id >= 0 && overlay_id < MAX_HELP_OVERLAYS);
if ( state > 0 ) {
Help_overlay_flags |= (1<<overlay_id);
current_helpid = overlay_id;
} else {
Help_overlay_flags &= ~(1<<overlay_id);
//current_helpid = -1;
}
}
// load in the bitmap for a help overlay
// FIXME - leftover from the old bitmap overlay days - prune this out sometime
void help_overlay_load(int overlay_id)
{
return;
}
// unload a bitmap of a help overlay
// FIXME - leftover from the old bitmap overlay days - prune this out sometime
void help_overlay_unload(int overlay_id)
{
return;
}
// maybe blit a bitmap of a help overlay to the screen
void help_overlay_maybe_blit(int overlay_id)
{
Assert(overlay_id >= 0 && overlay_id < MAX_HELP_OVERLAYS);
if ( Help_overlay_flags & (1<<overlay_id) ) {
context_help_grey_screen();
help_overlay_blit(overlay_id);
}
}
// reset the flags for the help overlays
void help_overlay_reset_all()
{
Help_overlay_flags = 0;
}
// Set up Grey_shader, which is used game-wide to grey out background when using help overlays
void create_grey_shader()
{
float tmp,c;
tmp = 0.4f/3.0f;
// The c matrix brightens everything a bit.
// c = 0.125f;
c = 0.110f;
gr_create_shader( &Grey_shader, tmp, tmp, tmp, c );
}
// called at game startup to init all help related data
void context_help_init()
{
create_grey_shader();
help_overlay_reset_all();
help_overlay_init();
}
void context_help_grey_screen()
{
gr_set_shader(&Grey_shader);
gr_shade(0,0,gr_screen.clip_width, gr_screen.clip_height);
}
// launch_context_help() will switch to a context sensitive help state
void launch_context_help()
{
// look at the state the game was in when F1 was pressed
Source_game_state = gameseq_get_state();
switch (Source_game_state) {
case GS_STATE_MAIN_MENU:
#if !defined(PRESS_TOUR_BUILD) && !defined(PD_BUILD)
int main_hall_num;
main_hall_num = (main_hall_id() == 0) ? MH_OVERLAY : MH2_OVERLAY;
if ( !help_overlay_active(main_hall_num) ) {
help_overlay_set_state(main_hall_num, 1);
}
else {
help_overlay_set_state(main_hall_num, 0);
}
#endif
break;
case GS_STATE_GAME_PLAY:
case GS_STATE_GAME_PAUSED:
case GS_STATE_TRAINING_PAUSED:
gameseq_post_event(GS_EVENT_GAMEPLAY_HELP);
break;
case GS_STATE_BRIEFING:
if ( !help_overlay_active(BR_OVERLAY) ) {
help_overlay_set_state(BR_OVERLAY, 1);
}
else {
help_overlay_set_state(BR_OVERLAY, 0);
}
break;
case GS_STATE_SHIP_SELECT:
if ( !help_overlay_active(SS_OVERLAY) ) {
help_overlay_set_state(SS_OVERLAY, 1);
}
else {
help_overlay_set_state(SS_OVERLAY, 0);
}
break;
case GS_STATE_WEAPON_SELECT:
if ( !help_overlay_active(WL_OVERLAY) ) {
help_overlay_set_state(WL_OVERLAY, 1);
}
else {
help_overlay_set_state(WL_OVERLAY, 0);
}
break;
case GS_STATE_BARRACKS_MENU:
if ( !help_overlay_active(BARRACKS_OVERLAY) ) {
help_overlay_set_state(BARRACKS_OVERLAY, 1);
}
else {
help_overlay_set_state(BARRACKS_OVERLAY, 0);
}
break;
case GS_STATE_CONTROL_CONFIG:
if ( !help_overlay_active(CONTROL_CONFIG_OVERLAY) ) {
help_overlay_set_state(CONTROL_CONFIG_OVERLAY, 1);
}
else {
help_overlay_set_state(CONTROL_CONFIG_OVERLAY, 0);
}
break;
case GS_STATE_DEBRIEF:
if ( !help_overlay_active(DEBRIEFING_OVERLAY) ) {
help_overlay_set_state(DEBRIEFING_OVERLAY, 1);
}
else {
help_overlay_set_state(DEBRIEFING_OVERLAY, 0);
}
break;
case GS_STATE_MULTI_HOST_SETUP:
if ( !help_overlay_active(MULTI_CREATE_OVERLAY) ) {
help_overlay_set_state(MULTI_CREATE_OVERLAY, 1);
}
else {
help_overlay_set_state(MULTI_CREATE_OVERLAY, 0);
}
break;
case GS_STATE_MULTI_START_GAME:
if ( !help_overlay_active(MULTI_START_OVERLAY) ) {
help_overlay_set_state(MULTI_START_OVERLAY, 1);
}
else {
help_overlay_set_state(MULTI_START_OVERLAY, 0);
}
break;
case GS_STATE_MULTI_JOIN_GAME:
if ( !help_overlay_active(MULTI_JOIN_OVERLAY) ) {
help_overlay_set_state(MULTI_JOIN_OVERLAY, 1);
}
else {
help_overlay_set_state(MULTI_JOIN_OVERLAY, 0);
}
break;
case GS_STATE_HOTKEY_SCREEN:
if ( !help_overlay_active(HOTKEY_OVERLAY) ) {
help_overlay_set_state(HOTKEY_OVERLAY, 1);
}
else {
help_overlay_set_state(HOTKEY_OVERLAY, 0);
}
break;
case GS_STATE_CAMPAIGN_ROOM:
if ( !help_overlay_active(CAMPAIGN_ROOM_OVERLAY) ) {
help_overlay_set_state(CAMPAIGN_ROOM_OVERLAY, 1);
}
else {
help_overlay_set_state(CAMPAIGN_ROOM_OVERLAY, 0);
}
break;
case GS_STATE_SIMULATOR_ROOM:
if ( !help_overlay_active(SIM_ROOM_OVERLAY) ) {
help_overlay_set_state(SIM_ROOM_OVERLAY, 1);
}
else {
help_overlay_set_state(SIM_ROOM_OVERLAY, 0);
}
break;
case GS_STATE_TECH_MENU: {
if ( !help_overlay_active(TECH_ROOM_OVERLAY) ) {
help_overlay_set_state(TECH_ROOM_OVERLAY, 1);
}
else {
help_overlay_set_state(TECH_ROOM_OVERLAY, 0);
}
break;
}
case GS_STATE_CMD_BRIEF:
if ( !help_overlay_active(CMD_BRIEF_OVERLAY) ) {
help_overlay_set_state(CMD_BRIEF_OVERLAY, 1);
}
else {
help_overlay_set_state(CMD_BRIEF_OVERLAY, 0);
}
break;
default:
nprintf(("Warning","WARNING ==> There is no context help available for state %s\n", GS_state_text[Source_game_state-1]));
break;
} // end switch
}
// Called once at the beginning of the game to load help bitmaps & data
void help_overlay_init()
{
// load right_bracket bitmap
help_right_bracket_bitmap = bm_load("right_bracket");
if(help_right_bracket_bitmap < 0){
// we failed to load the bitmap - this is very bad
Int3();
}
// load left_bracket bitmap
help_left_bracket_bitmap = bm_load("left_bracket");
if(help_left_bracket_bitmap < 0){
// we failed to load the bitmap - this is very bad
Int3();
}
// parse help.tbl
parse_helptbl();
}
// parses help.tbl and populates help_overlaylist[]
void parse_helptbl()
{
int overlay_id, currcount;
char buf[HELP_MAX_STRING_LENGTH + 1];
int i;
// open localization
lcl_ext_open();
read_file_text(HELP_OVERLAY_FILENAME);
// for each overlay...
for (overlay_id=0; overlay_id<MAX_HELP_OVERLAYS; overlay_id++) {
reset_parse();
skip_to_string(help_overlay_section_names[overlay_id]);
// clear out counters in the overlay struct
help_overlaylist[overlay_id].plinecount = 0;
help_overlaylist[overlay_id].textcount = 0;
help_overlaylist[overlay_id].rbracketcount = 0;
help_overlaylist[overlay_id].lbracketcount = 0;
// read in all elements for this overlay
while (!(check_for_string("$end"))) {
if (optional_string("+pline")) {
currcount = help_overlaylist[overlay_id].plinecount;
int a, b; // temp vars to read in int before cast to float;
if (currcount < HELP_MAX_ITEM) {
// read number of pline vertices
stuff_int(&help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtxcount); // note that it is read into GR_640
// help_overlaylist[overlay_id].plinelist[GR_1024][currcount].vtxcount = help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtxcount; // set equal to 1024 version vertex count to prevent bugs
Assert(help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtxcount <= HELP_MAX_PLINE_VERTICES);
// get 640x480 vertex coordinates
for (i=0; i<help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtxcount; i++) {
stuff_int(&a);
stuff_int(&b);
help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[i].x = (float)a;
help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[i].y = (float)b;
help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[i].z = 0.0f;
help_overlaylist[overlay_id].plinelist[GR_640][currcount].pvtx[i] = &help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[i];
}
// get 1024x768 vertex coordinates
for (i=0; i<help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtxcount; i++) {
stuff_int(&a);
stuff_int(&b);
help_overlaylist[overlay_id].plinelist[GR_1024][currcount].vtx[i].x = (float)a;
help_overlaylist[overlay_id].plinelist[GR_1024][currcount].vtx[i].y = (float)b;
help_overlaylist[overlay_id].plinelist[GR_1024][currcount].vtx[i].z = 0.0f;
help_overlaylist[overlay_id].plinelist[GR_1024][currcount].pvtx[i] = &help_overlaylist[overlay_id].plinelist[GR_1024][currcount].vtx[i];
}
}
//mprintf(("Found pline - start location (%f,%f), end location (%f,%f)\n", help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[0].x, help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[0].y, help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[2].x, help_overlaylist[overlay_id].plinelist[GR_640][currcount].vtx[2].y));
help_overlaylist[overlay_id].plinecount++;
} else if (optional_string("+text")) {
currcount = help_overlaylist[overlay_id].textcount;
if (currcount < HELP_MAX_ITEM) {
// get 640x480 coordinates
stuff_int(&(help_overlaylist[overlay_id].textlist[GR_640][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].textlist[GR_640][currcount].y_coord));
// get 1024x768 coordinates
stuff_int(&(help_overlaylist[overlay_id].textlist[GR_1024][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].textlist[GR_1024][currcount].y_coord));
// get string (always use the GR_640 one)
stuff_string(buf, F_MESSAGE, NULL);
help_overlaylist[overlay_id].textlist[GR_640][currcount].string = strdup(buf);
//mprintf(("Found text %d on overlay %d - location (%d,%d) @ 640x480 :: location (%d,%d) @ 1024x768\n", currcount, overlay_id, help_overlaylist[overlay_id].textlist[GR_640][currcount].x_coord, help_overlaylist[overlay_id].textlist[GR_640][currcount].y_coord, help_overlaylist[overlay_id].textlist[GR_1024][currcount].x_coord, help_overlaylist[overlay_id].textlist[GR_1024][currcount].x_coord));
help_overlaylist[overlay_id].textcount++;
}
} else if (optional_string("+right_bracket")) {
currcount = help_overlaylist[overlay_id].rbracketcount;
if (currcount < HELP_MAX_ITEM) {
// get 640x480 coordinates
stuff_int(&(help_overlaylist[overlay_id].rbracketlist[GR_640][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].rbracketlist[GR_640][currcount].y_coord));
// get 1024x768 coordinates
stuff_int(&(help_overlaylist[overlay_id].rbracketlist[GR_1024][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].rbracketlist[GR_1024][currcount].y_coord));
//mprintf(("Found rbracket %d on overlay %d - location (%d,%d) @ 640x480 :: location (%d,%d) @ 1024x768\n", currcount, overlay_id, help_overlaylist[overlay_id].rbracketlist[GR_640][currcount].x_coord, help_overlaylist[overlay_id].rbracketlist[GR_640][currcount].y_coord, help_overlaylist[overlay_id].rbracketlist[GR_1024][currcount].x_coord, help_overlaylist[overlay_id].rbracketlist[GR_1024][currcount].y_coord));
help_overlaylist[overlay_id].rbracketcount++;
}
} else if (optional_string("+left_bracket")) {
currcount = help_overlaylist[overlay_id].lbracketcount;
if (currcount < HELP_MAX_ITEM) {
// get 640x480 coordinates
stuff_int(&(help_overlaylist[overlay_id].lbracketlist[GR_640][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].lbracketlist[GR_640][currcount].y_coord));
// get 1024x768 coordinates
stuff_int(&(help_overlaylist[overlay_id].lbracketlist[GR_1024][currcount].x_coord));
stuff_int(&(help_overlaylist[overlay_id].lbracketlist[GR_1024][currcount].y_coord));
//mprintf(("Found lbracket %d on overlay %d - location (%d,%d) @ 640x480 :: location (%d,%d) @ 1024x768\n", currcount, overlay_id, help_overlaylist[overlay_id].lbracketlist[GR_640][currcount].x_coord, help_overlaylist[overlay_id].lbracketlist[GR_640][currcount].y_coord, help_overlaylist[overlay_id].lbracketlist[GR_1024][currcount].x_coord, help_overlaylist[overlay_id].lbracketlist[GR_1024][currcount].y_coord));
help_overlaylist[overlay_id].lbracketcount++;
}
} else {
// help.tbl is corrupt
Assert(0);
} // end if
} // end while
} // end for
// close localization
lcl_ext_close();
}
// draw overlay on the screen
void help_overlay_blit(int overlay_id)
{
int idx, width, height;
int plinecount = help_overlaylist[overlay_id].plinecount;
int textcount = help_overlaylist[overlay_id].textcount;
int rbracketcount = help_overlaylist[overlay_id].rbracketcount;
int lbracketcount = help_overlaylist[overlay_id].lbracketcount;
Assert(overlay_id >= 0 && overlay_id < MAX_HELP_OVERLAYS);
// this draws each line of help text with white on black text (use the GR_640 index for the string)
for (idx = 0; idx < textcount; idx++) {
gr_set_color_fast(&Color_black);
gr_get_string_size(&width, &height, help_overlaylist[overlay_id].textlist[GR_640][idx].string, strlen(help_overlaylist[overlay_id].textlist[GR_640][idx].string));
gr_rect(help_overlaylist[overlay_id].textlist[gr_screen.res][idx].x_coord-2*HELP_PADDING, help_overlaylist[overlay_id].textlist[gr_screen.res][idx].y_coord-3*HELP_PADDING, width+4*HELP_PADDING, height+4*HELP_PADDING);
gr_set_color_fast(&Color_bright_white);
gr_printf(help_overlaylist[overlay_id].textlist[gr_screen.res][idx].x_coord, help_overlaylist[overlay_id].textlist[gr_screen.res][idx].y_coord, help_overlaylist[overlay_id].textlist[GR_640][idx].string);
}
// this draws each right bracket
for (idx = 0; idx < rbracketcount; idx++) {
gr_set_bitmap(help_right_bracket_bitmap);
gr_bitmap(help_overlaylist[overlay_id].rbracketlist[gr_screen.res][idx].x_coord, help_overlaylist[overlay_id].rbracketlist[gr_screen.res][idx].y_coord);
}
// this draws each left bracket
for (idx = 0; idx < lbracketcount; idx++) {
gr_set_bitmap(help_left_bracket_bitmap);
gr_bitmap(help_overlaylist[overlay_id].lbracketlist[gr_screen.res][idx].x_coord, help_overlaylist[overlay_id].lbracketlist[gr_screen.res][idx].y_coord);
}
// this draws each 2d line for the help screen
//gr_set_color_fast(&Color_yellow);
gr_set_color(255, 255, 0);
for (idx = 0; idx<plinecount; idx++) {
gr_pline_special(help_overlaylist[overlay_id].plinelist[gr_screen.res][idx].pvtx , help_overlaylist[overlay_id].plinelist[GR_640][idx].vtxcount, HELP_PLINE_THICKNESS);
}
}
// --------------------------------------------------
// DEBUGGING STUFF
// --------------------------------------------------
DCF(help_reload, "Reloads help overlay data from help.tbl")
{
if (Dc_command) {
parse_helptbl();
}
if (Dc_help) {
dc_printf( "Usage: sample\nCrashes your machine.\n" );
}
if (Dc_status) {
dc_printf( "Yes, my master." );
}
}
int h_textnum=0, h_amt=0, h_vtx = 0;
void nudgetext_x(int textnum, int amount)
{
help_overlaylist[current_helpid].textlist[gr_screen.res][textnum].x_coord += amount;
}
void nudgetext_y(int textnum, int amount)
{
help_overlaylist[current_helpid].textlist[gr_screen.res][textnum].y_coord += amount;
}
void nudgepline_x(int plinenum, int plinevert, int amount)
{
help_overlaylist[current_helpid].plinelist[gr_screen.res][plinenum].vtx[plinevert].x += amount;
}
void nudgepline_y(int plinenum, int plinevert, int amount)
{
help_overlaylist[current_helpid].plinelist[gr_screen.res][plinenum].vtx[plinevert].y += amount;
}
void nudgerbracket_x(int num, int amount)
{
help_overlaylist[current_helpid].rbracketlist[gr_screen.res][num].x_coord += amount;
}
void nudgerbracket_y(int num, int amount)
{
help_overlaylist[current_helpid].rbracketlist[gr_screen.res][num].y_coord += amount;
}
void nudgelbracket_x(int num, int amount)
{
help_overlaylist[current_helpid].lbracketlist[gr_screen.res][num].x_coord += amount;
}
void nudgelbracket_y(int num, int amount)
{
help_overlaylist[current_helpid].lbracketlist[gr_screen.res][num].y_coord += amount;
}
void showtextpos(int textnum)
{
dc_printf("text %d is now located at (%d, %d)", textnum, help_overlaylist[current_helpid].textlist[gr_screen.res][textnum].x_coord, help_overlaylist[current_helpid].textlist[gr_screen.res][textnum].y_coord );
}
void showrbracketpos(int num)
{
dc_printf("rbracket %d is now located at (%d, %d)", num, help_overlaylist[current_helpid].rbracketlist[gr_screen.res][num].x_coord, help_overlaylist[current_helpid].rbracketlist[gr_screen.res][num].y_coord );
}
void showlbracketpos(int num)
{
dc_printf("lbracket %d on overlay %d is now located at (%d, %d)", num, current_helpid, help_overlaylist[current_helpid].lbracketlist[gr_screen.res][num].x_coord, help_overlaylist[current_helpid].lbracketlist[gr_screen.res][num].y_coord );
}
void showplinepos(int plinenum)
{
int i;
dc_printf("pline %d on overlay %d vertices are now ", plinenum, current_helpid, help_overlaylist[current_helpid].textlist[gr_screen.res][plinenum].y_coord );
for (i=0; i<help_overlaylist[current_helpid].plinelist[GR_640][plinenum].vtxcount; i++)
{
dc_printf("(%3.0f %3.0f) ", help_overlaylist[current_helpid].plinelist[gr_screen.res][plinenum].vtx[i].x, help_overlaylist[current_helpid].plinelist[gr_screen.res][plinenum].vtx[i].y);
}
}
DCF(help_nudgetext_x, "Use to visually position overlay text.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgetext_x(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: sample\nCrashes your machine.\n" );
}
if (Dc_status) {
showtextpos(h_textnum);
}
}
DCF(help_nudgetext_y, "Use to visually position overlay text.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgetext_y(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: sample\nCrashes your machine.\n" );
}
if (Dc_status) {
showtextpos(h_textnum);
}
}
DCF(help_nudgepline_x, "Use to visually position overlay polylines.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_vtx = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgepline_x(h_textnum, h_vtx, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgepline [pline_number] [vertex_number] [distance]\n" );
}
if (Dc_status) {
showplinepos(h_textnum);
}
}
DCF(help_nudgepline_y, "Use to visually position overlay polylines.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_vtx = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgepline_y(h_textnum, h_vtx, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgepline [pline_number] [vertex_number] [distance]\n" );
}
if (Dc_status) {
showplinepos(h_textnum);
}
}
DCF(help_nudgerbracket_x, "Use to visually position overlay right bracket.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgerbracket_x(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgerbracket_x [num] [amount]\n" );
}
if (Dc_status) {
showrbracketpos(h_textnum);
}
}
DCF(help_nudgerbracket_y, "Use to visually position overlay right bracket.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgerbracket_y(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgerbracket_y [num] [amount]\n" );
}
if (Dc_status) {
showrbracketpos(h_textnum);
}
}
DCF(help_nudgelbracket_x, "Use to visually position overlay left bracket.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgelbracket_x(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgelbracket_x [num] [amount]\n" );
}
if (Dc_status) {
showlbracketpos(h_textnum);
}
}
DCF(help_nudgelbracket_y, "Use to visually position overlay left bracket.")
{
if (Dc_command) {
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_textnum = Dc_arg_int;
}
dc_get_arg(ARG_INT);
if(Dc_arg_type & ARG_INT){
h_amt = Dc_arg_int;
}
nudgelbracket_y(h_textnum, h_amt);
}
if (Dc_help) {
dc_printf( "Usage: help_nudgelbracket_y [num] [amount]\n" );
}
if (Dc_status) {
showlbracketpos(h_textnum);
}
}
-63
View File
@@ -1,63 +0,0 @@
/*
* 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.
*
*/
// ContextHelp.h
//
//
#ifndef __CONTEXTHELP_H__
#define __CONTEXTHELP_H__
// Help overlays
//
// Adding a help overlay: 1) Add a #define that uniquely identifies your help overlay
// 2) Increment MAX_HELP_OVERLAYS
// 3) Add the filename for the help overlay to Help_overlays[] array in ContextHelp.cpp
//
#define MAX_HELP_OVERLAYS 16 // Must be kept current
#define SS_OVERLAY 0 // ship selection help
#define WL_OVERLAY 1 // weapons loadout help
#define BR_OVERLAY 2 // briefing help
#define MH_OVERLAY 3 // main hall help
#define BARRACKS_OVERLAY 4 // barracks help
#define CONTROL_CONFIG_OVERLAY 5 // control config help
#define DEBRIEFING_OVERLAY 6 // debriefing help
#define MULTI_CREATE_OVERLAY 7 // multi create game help
#define MULTI_START_OVERLAY 8 // multi start game help overlay
#define MULTI_JOIN_OVERLAY 9 // join game help overlay
#define MH2_OVERLAY 10 // main hall 2 help overlay
#define HOTKEY_OVERLAY 11 // hotkey assignment help overlay
#define CAMPAIGN_ROOM_OVERLAY 12 // campaign room help overlay
#define SIM_ROOM_OVERLAY 13 // sim room help overlay
#define TECH_ROOM_OVERLAY 14 // tech room (general) help overlay
#define CMD_BRIEF_OVERLAY 15 // command briefing help overlay
// other help overlay constants
#define HELP_MAX_ITEM 50 // max number of screen elements per element type per overlay
#define HELP_PADDING 1 //
#define HELP_MAX_STRING_LENGTH 128 // max string length for text overlay element
#define HELP_MAX_PLINE_VERTICES 21 // good for 20 segments, can prolly reduce this (FIXME)
#define HELP_PLINE_THICKNESS 2
#define HELP_OVERLAY_FILENAME "help.tbl"
// help overlay calls
int help_overlay_active(int overlay_id);
void help_overlay_set_state(int overlay_id, int state);
void help_overlay_load(int overlay_id);
void help_overlay_unload(int overlay_id);
void help_overlay_maybe_blit(int overlay_id);
void context_help_init(); // called once at game startup
void context_help_grey_screen(); // call to grey out a screen (normally when applying a help overlay)
void launch_context_help();
#endif /* __CONTEXTHELP_H__ */
-951
View File
@@ -1,951 +0,0 @@
/*
* 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/GameHelp/GameplayHelp.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Module for displaying in-game help
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 8 9/08/99 2:38p Jefff
* sound pausing going to menu from game
*
* 7 9/01/99 2:56p Jefff
* a few control key description changes
*
* 6 7/29/99 4:43p Jefff
* updated for fs2 -- fixed buttons, added "press esc" text, hi-res
* support, the works.
*
* 5 7/15/99 9:20a Andsager
* FS2_DEMO initial checkin
*
* 4 1/30/99 5:08p Dave
* More new hi-res stuff.Support for nice D3D textures.
*
* 3 10/13/98 9:28a Dave
* Started neatening up freespace.h. Many variables renamed and
* reorganized. Added AlphaColors.[h,cpp]
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 21 6/17/98 11:01a Lawrance
* ensure translated descriptions appear in the online help
*
* 20 6/09/98 10:31a Hoffoss
* Created index numbers for all xstr() references. Any new xstr() stuff
* added from here on out should be added to the end if the list. The
* current list count can be found in FreeSpace.cpp (search for
* XSTR_SIZE).
*
* 19 5/17/98 3:33p Lawrance
* Add 'target last ship to send transmission' key to online help
*
* 18 5/15/98 8:36p Lawrance
* Add 'target ship that last sent transmission' target key
*
* 17 5/09/98 4:52p Lawrance
* Implement padlock view (up/rear/left/right)
*
* 16 4/27/98 10:11a Lawrance
* Add in disabled beep for missing buttons
*
* 15 4/25/98 1:25p Lawrance
* Change screen shot key to Print Scrn
*
* 14 4/22/98 2:50p John
* Made PrintScreen actually be Shift+PrintScreen.
*
* 13 4/18/98 9:21p Lawrance
* show correct key binding for screen shots
*
* 12 4/11/98 7:59p Lawrance
* Allow space, tab and enter to cycle through pages
*
* 11 4/05/98 7:44p Lawrance
* remove obsolete 'show goals' binding
*
* 10 4/02/98 11:40a Lawrance
* check for #ifdef DEMO instead of #ifdef DEMO_RELEASE
*
* 9 4/01/98 2:22p Lawrance
* remove hotkey references in on-line help for demo builds
*
* 8 3/31/98 4:57p Lawrance
* update text for taking a screen shot
*
* 7 3/30/98 1:31p Lawrance
* Take out debug key help
*
* 6 3/25/98 5:34p Dave
* First rev of multiplayer online key help.
*
* 5 3/25/98 2:16p Dave
* Select random default image for newly created pilots. Fixed several
* multi-pause messaging bugs. Begin work on online help for multiplayer
* keys.
*
* 4 3/18/98 12:03p John
* Marked all the new strings as externalized or not.
*
* 3 3/16/98 5:53p Lawrance
* Fix bug that was causing joystick only bindings to mess up
*
* 2 3/09/98 9:54p Lawrance
* integrate new art for gameplay help
*
* 1 3/09/98 5:05p Lawrance
*
* $NoKeywords: $
*/
#include "contexthelp.h"
#include "gamesequence.h"
#include "freespace.h"
#include "key.h"
#include "bmpman.h"
#include "2d.h"
#include "timer.h"
#include "math.h"
#include "mouse.h"
#include "controlsconfig.h"
#include "ui.h"
#include "gamesnd.h"
#include "missionscreencommon.h"
#include "alphacolors.h"
#include "beam.h"
#include "audiostr.h"
// text positioning constats
#define TITLE_Y 35
#define Y_START 70
#define X_OFFSET_1 70
// pixel offset for description of key from where key binding starts
#define KEY_DESCRIPTION_OFFSET 193
// different gameplay help pages
#define GP_FIRST_SCREEN 0 // keep up to date
#define GP_HELP_BASIC_KEYS 0
#define GP_HELP_MOVEMENT_KEYS 1
#define GP_HELP_COMMON_TARGET_KEYS 2
#define GP_HELP_ADVANCED_TARGET_KEYS 3
#define GP_HELP_MESSAGING 4
#define GP_HELP_WEAPON_KEYS 5
#define GP_HELP_THROTTLE_AND_ETS_KEYS 6
#define GP_HELP_VIEW_KEYS 7
#define GP_HELP_MISC_KEYS 8
#define GP_HELP_MULTI_KEYS 9
#define GP_LAST_SCREEN_SINGLE 8 // keep up to date
#define GP_LAST_SCREEN_MULTI 9 // keep up to date
// set this to GP_LAST_SCREEN_SINGLE or GP_LAST_SCREEN_MULTI based upon what game mode we're in
int Gp_last_screen;
#define NUM_BUTTONS 3
#define PREVIOUS_PAGE_BUTTON 0
#define NEXT_PAGE_BUTTON 1
#define CONTINUE_BUTTON 2
struct gameplay_help_buttons {
char *filename;
int x, y;
int hotspot;
int tab;
int flags;
UI_BUTTON button; // because we have a class inside this struct, we need the constructor below..
gameplay_help_buttons(char *name, int x1, int y1, int h) : filename(name), x(x1), y(y1), hotspot(h) {}
};
static gameplay_help_buttons Buttons[GR_NUM_RESOLUTIONS][NUM_BUTTONS] = {
//XSTR:OFF
{
gameplay_help_buttons("F1B_00", 15, 389, 0),
gameplay_help_buttons("F1B_01", 60, 389, 1),
gameplay_help_buttons("F1B_02", 574, 431, 2)
},
{
gameplay_help_buttons("2_F1B_00", 24, 622, 0),
gameplay_help_buttons("2_F1B_01", 96, 622, 1),
gameplay_help_buttons("2_F1B_02", 919, 689, 2)
},
//XSTR:ON
};
#define GAME_HELP_NUM_TEXT 2
static UI_XSTR Game_help_text[GR_NUM_RESOLUTIONS][GAME_HELP_NUM_TEXT] = {
{ // GR_640
{ "Press ESC to return to the game", 1441, 263, 389, UI_XSTR_COLOR_GREEN, -1, NULL },
{ "Continue", 1069, 571, 413, UI_XSTR_COLOR_GREEN, -1, &Buttons[gr_screen.res][CONTINUE_BUTTON].button }
},
{ // GR_1024
{ "Press ESC to return to the game", 1441, 421, 622, UI_XSTR_COLOR_GREEN, -1, NULL },
{ "Continue", 1069, 928, 663, UI_XSTR_COLOR_GREEN, -1, &Buttons[gr_screen.res][CONTINUE_BUTTON].button }
}
};
static char *Game_help_filename[GR_NUM_RESOLUTIONS] = {
"F1",
"2_F1"
};
static char *Game_help_mask_filename[GR_NUM_RESOLUTIONS] = {
"F1-m",
"2_F1-m"
};
static UI_WINDOW Ui_window;
static int Background_bitmap;
static int Gameplay_help_inited = 0;
static int Current_help_page;
// generate a line for the on-line help for a control item with specified id
// input: id => index for control item within Control_config[]
// buf => buffer with enough space to hold ouput string
char *gameplay_help_control_text(int id, char *buf)
{
int has_key=0, has_joy=0;
config_item *ci;
ci = &Control_config[id];
if ( ci->key_id >= 0 ) {
sprintf(buf, textify_scancode(ci->key_id));
has_key=1;
}
if ( ci->joy_id >= 0 ) {
if ( has_key ) {
strcat(buf, XSTR( ", ", 129));
}
strcat(buf, Joy_button_text[ci->joy_id]);
has_joy=1;
}
if ( !has_key && !has_joy ) {
strcpy(buf, XSTR( "no binding", 130));
}
strcat(buf, XSTR( " - ", 131));
strcat(buf, ci->text);
return buf;
}
void gameplay_help_blit_control_line(int x, int y, int id)
{
int has_key=0, has_joy=0;
char buf[256];
config_item *ci;
ci = &Control_config[id];
buf[0] = 0;
if ( ci->key_id >= 0 ) {
sprintf(buf, textify_scancode(ci->key_id));
has_key=1;
}
if ( ci->joy_id >= 0 ) {
if ( has_key ) {
strcat(buf, XSTR( ", ", 129));
}
strcat(buf, Joy_button_text[ci->joy_id]);
has_joy=1;
}
if ( !has_key && !has_joy ) {
strcpy(buf, XSTR( "no binding", 130));
}
gr_string(x,y,buf);
// gr_string(x+KEY_DESCRIPTION_OFFSET,y,ci->text);
gr_string(x+KEY_DESCRIPTION_OFFSET, y, XSTR(ci->text, CONTROL_CONFIG_XSTR + id));
}
void gameplay_help_blit_control_line_raw(int x, int y, char *control_text, char *control_description)
{
gr_string(x,y,control_text);
gr_string(x+KEY_DESCRIPTION_OFFSET,y,control_description);
}
// game_play_help_set_title() will display the title for the help screen and
// set the font for the rest of the screen
void gameplay_help_set_title(char *title)
{
int sy=TITLE_Y;
char buf[128];
gr_set_color_fast(&Color_bright);
gr_printf(0x8000,sy,title);
sprintf(buf, XSTR( "Page %d of %d", 132), Current_help_page+1, Gp_last_screen+1);
gr_printf(0x8000,sy+gr_get_font_height()+2,buf);
gr_set_color_fast(&Color_normal);
}
// called once when the gameplay help state is entered
void gameplay_help_init()
{
int i;
gameplay_help_buttons *b;
if ( Gameplay_help_inited ) {
return;
}
common_set_interface_palette("InterfacePalette"); // set the interface palette
Ui_window.create(0, 0, gr_screen.max_w, gr_screen.max_h, 0);
Ui_window.set_mask_bmap(Game_help_mask_filename[gr_screen.res]);
for (i=0; i<NUM_BUTTONS; i++) {
b = &Buttons[gr_screen.res][i];
b->button.create(&Ui_window, "", b->x, b->y, 60, 30, 0, 1);
// set up callback for when a mouse first goes over a button
b->button.set_highlight_action(common_play_highlight_sound);
b->button.set_bmaps(b->filename);
b->button.link_hotspot(b->hotspot);
}
// add all xstrs
for (i=0; i<GAME_HELP_NUM_TEXT; i++)
{
Ui_window.add_XSTR(&Game_help_text[gr_screen.res][i]);
}
// set the proper last screen # based upon game mode
if(Game_mode & GM_MULTIPLAYER){
Gp_last_screen = GP_LAST_SCREEN_MULTI;
} else {
Gp_last_screen = GP_LAST_SCREEN_SINGLE;
}
// setup hotkeys so lights flash when keys are pressed
Buttons[gr_screen.res][CONTINUE_BUTTON].button.set_hotkey(KEY_CTRLED | KEY_ENTER);
Buttons[gr_screen.res][PREVIOUS_PAGE_BUTTON].button.set_hotkey(KEY_LEFT);
Buttons[gr_screen.res][NEXT_PAGE_BUTTON].button.set_hotkey(KEY_RIGHT);
Background_bitmap = bm_load(Game_help_filename[gr_screen.res]);
Current_help_page = GP_HELP_BASIC_KEYS;
Gameplay_help_inited = 1;
}
// called when moving to the previous help page
void gameplay_help_goto_prev_screen()
{
Current_help_page--;
if (Current_help_page < GP_FIRST_SCREEN) {
Current_help_page = Gp_last_screen;
}
gamesnd_play_iface(SND_SWITCH_SCREENS);
}
// called when proceeding to the next help page
void gameplay_help_goto_next_screen()
{
Current_help_page++;
if (Current_help_page > Gp_last_screen) {
Current_help_page = GP_FIRST_SCREEN;
}
gamesnd_play_iface(SND_SWITCH_SCREENS);
}
// called when the screen is exited
void gameplay_help_leave()
{
// unpause all game sounds
beam_unpause_sounds();
audiostream_unpause_all();
gameseq_post_event(GS_EVENT_PREVIOUS_STATE);
game_flush();
}
// deal with a keypress on the gameplay help screen
void gameplay_help_process_key(int k)
{
switch ( k ) {
case KEY_ESC:
gameplay_help_leave();
break;
case KEY_ENTER:
case KEY_SPACEBAR:
case KEY_TAB:
//gameplay_help_goto_next_screen();
Buttons[gr_screen.res][NEXT_PAGE_BUTTON].button.press_button();
break;
case KEY_SHIFTED | KEY_TAB:
Buttons[gr_screen.res][PREVIOUS_PAGE_BUTTON].button.press_button();
// gameplay_help_goto_prev_screen();
break;
default:
break;
} // end switch
}
// deal with buttons being pressed on the gameplay help screen
void gameplay_help_button_pressed(int n)
{
switch (n) {
case PREVIOUS_PAGE_BUTTON:
gameplay_help_goto_prev_screen();
break;
case NEXT_PAGE_BUTTON:
gameplay_help_goto_next_screen();
break;
case CONTINUE_BUTTON:
gameplay_help_leave();
gamesnd_play_iface(SND_COMMIT_PRESSED);
break;
default:
Int3();
break;
}
}
// Draw the help text onto the screen
void gameplay_help_draw_text()
{
int x_offset, y_offset, separation;
separation = gr_get_font_height() + 3;
switch ( Current_help_page ) {
case GP_HELP_BASIC_KEYS:
gameplay_help_set_title(XSTR( "Basic Keys", 133));
x_offset=X_OFFSET_1;
y_offset=Y_START;
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,END_MISSION);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,FIRE_PRIMARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MAX_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ZERO_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TOGGLE_AUTO_TARGETING);
y_offset += separation;
y_offset += separation;
gr_set_color_fast(&Color_bright);
gr_printf(0x8000,y_offset,XSTR( "Function Keys", 134));
gr_set_color_fast(&Color_normal);
y_offset += separation;
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F1", 135), XSTR( "context-sensitive help", 136));
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F2", 137), XSTR( "options screen (available anywhere in game)", 138));
#ifndef FS2_DEMO
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F3", 139), XSTR( "hotkey assignment", 140));
#endif
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F4", 141), XSTR( "HUD message scroll-back", 142));
#ifndef FS2_DEMO
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "F5...F12", 143), XSTR( "hotkeys", 144));
#endif
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Shift-Esc", 145), XSTR( "quit FreeSpace 2 immediately", 146));
break;
case GP_HELP_MOVEMENT_KEYS:
gameplay_help_set_title(XSTR( "Movement Keys", 147));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,FORWARD_THRUST);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MAX_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ONE_THIRD_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TWO_THIRDS_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MINUS_5_PERCENT_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PLUS_5_PERCENT_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ZERO_THROTTLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,AFTERBURNER);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,REVERSE_THRUST);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PITCH_FORWARD);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PITCH_BACK);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,YAW_LEFT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,YAW_RIGHT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,BANK_LEFT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,BANK_RIGHT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,BANK_WHEN_PRESSED);
break;
case GP_HELP_COMMON_TARGET_KEYS:
gameplay_help_set_title(XSTR( "Basic Targeting Keys", 148));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TOGGLE_AUTO_TARGETING);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_SHIP_IN_RETICLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_CLOSEST_HOSTILE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_CLOSEST_HOSTILE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_CLOSEST_FRIENDLY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_CLOSEST_FRIENDLY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_SUBOBJECT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_SUBOBJECT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_SUBOBJECT_IN_RETICLE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MATCH_TARGET_SPEED);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TOGGLE_AUTO_MATCH_TARGET_SPEED);
break;
case GP_HELP_ADVANCED_TARGET_KEYS:
gameplay_help_set_title(XSTR( "Advanced Targeting Keys", 149));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_CLOSEST_SHIP_ATTACKING_SELF);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_CLOSEST_SHIP_ATTACKING_TARGET);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_LAST_TRANMISSION_SENDER);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_TARGETS_TARGET);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_ESCORT_SHIP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_CLOSEST_REPAIR_SHIP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_UNINSPECTED_CARGO);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_UNINSPECTED_CARGO);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEWEST_SHIP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_BOMB);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_BOMB);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,STOP_TARGETING_SHIP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_NEXT_LIVE_TURRET);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TARGET_PREV_LIVE_TURRET);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,STOP_TARGETING_SUBSYSTEM);
#ifndef FS2_DEMO
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "F5...F12", 143), XSTR( "Select target assigned to that hotkey", 150));
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "Shift-F5...F12", 151), XSTR( "Add/remove target from that hotkey", 152));
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "Alt-Shift-F5...F12", 153), XSTR( "Clear that hotkey", 154));
#endif
break;
case GP_HELP_MESSAGING:
gameplay_help_set_title(XSTR( "Messaging Keys", 155));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,SQUADMSG_MENU);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,REARM_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ATTACK_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,DISARM_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,DISABLE_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,CAPTURE_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ENGAGE_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,FORM_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,IGNORE_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PROTECT_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,COVER_MESSAGE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,WARP_MESSAGE);
#ifndef FS2_DEMO
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset, y_offset, XSTR( "F5...F12", 143), XSTR( "send specified order to these target(s)", 156));
#endif
break;
case GP_HELP_WEAPON_KEYS:
gameplay_help_set_title(XSTR( "Weapon Keys", 157));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,FIRE_PRIMARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,FIRE_SECONDARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,CYCLE_NEXT_PRIMARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,CYCLE_PREV_PRIMARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,CYCLE_SECONDARY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,CYCLE_NUM_MISSLES);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,LAUNCH_COUNTERMEASURE);
break;
case GP_HELP_THROTTLE_AND_ETS_KEYS:
gameplay_help_set_title(XSTR( "Energy Management Keys", 158));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,SHIELD_EQUALIZE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,SHIELD_XFER_TOP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,SHIELD_XFER_BOTTOM);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,SHIELD_XFER_LEFT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,SHIELD_XFER_RIGHT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,INCREASE_WEAPON);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,DECREASE_WEAPON);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,INCREASE_SHIELD);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,DECREASE_SHIELD);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,INCREASE_ENGINE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,DECREASE_ENGINE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ETS_EQUALIZE);
/*
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,XFER_LASER);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,XFER_SHIELD);
*/
break;
case GP_HELP_MISC_KEYS:
gameplay_help_set_title(XSTR( "Miscellaneous Keys", 159));
x_offset=X_OFFSET_1;
y_offset=Y_START;
// ending mission
//
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,END_MISSION);
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "ESC", 160), XSTR( "invoke abort mission popup", 161));
// time compression
//
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TIME_SPEED_UP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,TIME_SLOW_DOWN);
// radar keys
//
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,RADAR_RANGE_CYCLE);
// escort view keys
//
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ADD_REMOVE_ESCORT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,ESCORT_CLEAR);
// Pause, Print Screenshot
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Pause", 162), XSTR( "pause game", 163));
y_offset += separation;
gameplay_help_blit_control_line_raw(x_offset,y_offset, XSTR( "Print Scrn", 164), XSTR( "take screen shot", 165));
break;
case GP_HELP_VIEW_KEYS:
gameplay_help_set_title(XSTR( "View Keys", 166));
x_offset=X_OFFSET_1;
y_offset=Y_START;
gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_UP);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_DOWN);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_LEFT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,PADLOCK_RIGHT);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_CHASE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_EXTERNAL);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_EXTERNAL_TOGGLE_CAMERA_LOCK);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_SLEW);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_DIST_INCREASE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_DIST_DECREASE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_CENTER);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,VIEW_OTHER_SHIP);
break;
case GP_HELP_MULTI_KEYS:
gameplay_help_set_title(XSTR( "Multiplayer Keys", 167));
x_offset=X_OFFSET_1;
y_offset=Y_START;
// ingame messaging
gr_set_color_fast(&Color_bright);
gr_printf(0x8000,y_offset,XSTR( "Ingame messaging keys (tap for text, hold for voice)", 168));
gr_set_color_fast(&Color_normal);
y_offset += separation;
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MULTI_MESSAGE_ALL);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MULTI_MESSAGE_FRIENDLY);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MULTI_MESSAGE_HOSTILE);
y_offset += separation;
gameplay_help_blit_control_line(x_offset, y_offset,MULTI_MESSAGE_TARGET);
break;
} // end switch
}
// gameplay_help_do_frame() is the function that displays help when acutally playing the game
void gameplay_help_do_frame(float frametime)
{
int i, k;
// ensure the gameplay help interface has been initialized
if (!Gameplay_help_inited) {
Int3();
return;
}
// make sure game sounds are paused
beam_pause_sounds();
audiostream_pause_all();
k = Ui_window.process() & ~KEY_DEBUGGED;
gameplay_help_process_key(k);
for (i=0; i<NUM_BUTTONS; i++){
if (Buttons[gr_screen.res][i].button.pressed()){
gameplay_help_button_pressed(i);
}
}
GR_MAYBE_CLEAR_RES(Background_bitmap);
if (Background_bitmap >= 0) {
gr_set_bitmap(Background_bitmap);
gr_bitmap(0, 0);
}
Ui_window.draw();
gameplay_help_draw_text();
gr_flip();
}
// called once when leaving the gameplay help state
void gameplay_help_close()
{
if ( Gameplay_help_inited ) {
if (Background_bitmap >= 0) {
bm_unload(Background_bitmap);
}
Ui_window.destroy();
common_free_interface_palette(); // restore game palette
game_flush();
}
Gameplay_help_inited = 0;
}
-43
View File
@@ -1,43 +0,0 @@
/*
* 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/GameHelp/GameplayHelp.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Header for displaying in-game help
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 2 3/09/98 9:54p Lawrance
* integrate new art for gameplay help
*
* 1 3/09/98 5:05p Lawrance
*
* $NoKeywords: $
*/
#ifndef __GAMEPLAY_HELP_H__
#define __GAMEPLAY_HELP_H__
void gameplay_help_init();
void gameplay_help_close();
void gameplay_help_do_frame(float frametime);
#endif
-623
View File
@@ -1,623 +0,0 @@
/*
* 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/GameSequence/GameSequence.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* File to control Game Sequencing
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 2/23/99 2:29p Dave
* First run of oldschool dogfight mode.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 65 5/15/98 12:09a Dave
* New tracker api code. New game tracker code. Finished up first run of
* the PXO screen. Fixed a few game server list exceptions.
*
* 64 5/12/98 2:46a Dave
* Rudimentary communication between Parallax Online and freespace. Can
* get and store channel lists.
*
* 63 5/06/98 1:12a Allender
* fix sequencing names, added nprintf to help respawn debugging
*
* 62 4/25/98 7:39p Allender
* fixd some small hotkey stuff. Worked on turret orientation being
* correct for multiplayer. new sexpression called end-campaign will will
* end the main campaign
*
* 61 4/23/98 7:08p John
* Removed some obsoleted states.
*
* 60 4/16/98 4:31p Hoffoss
* Changed demo screen referenced to view cutscenes screen, which is now
* what it's called.
*
* 59 4/02/98 5:40p Hoffoss
* Added the Load Mission screen to FreeSpace.
*
* 58 3/11/98 5:32p Lawrance
* Fix up text arrays for events/states
*
* 57 3/09/98 12:13a Lawrance
* Add support for Red Alert missions
*
* 56 3/05/98 4:12p John
* Made Debug+F4 switch Glide and windowed.
*
* 55 3/03/98 1:00p Hoffoss
* Added new command briefing event and state.
*
* 54 3/02/98 4:23p Hoffoss
* Forgot to add state label.
*
* 53 3/02/98 3:44p Hoffoss
* Added new Campaign Room state and event.
*
* 52 2/21/98 11:58a John
* Put in some stuff to externalize strings
*
* 51 2/19/98 6:26p Dave
* Fixed a few file xfer bugs. Tweaked mp team select screen. Put in
* initial support for player data uploading.
*
* 50 2/18/98 10:21p Dave
* Ripped out old file xfer system. Put in brand new xfer system.
*
* 49 2/08/98 5:07p Dave
* Put in support for multiplayer furball mode.
*
* 48 1/28/98 6:21p Dave
* Made the standalone use ~8 megs less memory. Fixed multiplayer submenu
* endgame problem.
*
* 47 1/23/98 5:43p Dave
* Finished bringing standalone up to speed. Coded in new host options
* screen.
*
* 46 1/22/98 5:25p Dave
* Modified some pregame sequencing packets. Starting to repair broken
* standalone stuff.
*
* 45 1/22/98 4:15p Hoffoss
* Added code to allow popup to tell player he needs to bind a key for the
* training mission.
*
* 44 1/20/98 5:42p Dave
* Moved ingame join to its own module. Improved it a bit.
*
* 43 1/19/98 12:57p Allender
* removed confusing comment
*
* 42 1/19/98 12:56p Allender
* fix problem of freespace_start_misison possibly failing due to mission
* not properly loading (for single player only right now).
*
* 41 1/15/98 6:12p Dave
* Fixed weapons loadout bugs with multiplayer respawning. Added
* multiplayer start screen. Fixed a few chatbox bugs.
*
* 40 1/15/98 6:00p Hoffoss
* Added option to quit menu (in game) to restart the mission. Doesn't
* seem to quite work, though. Checking code in so someone else can look
* into it.
*
* 39 1/05/98 10:05a Dave
* Big re-sequencing of server transfer. Centralized _all_ server transfer
* code to one module.
*
* 38 12/30/97 4:28p Lawrance
* Give text descriptions for events, change debug output to give text
* desciption of event/state
*
* 37 12/24/97 8:56p Lawrance
* took out obsolete state used for non-existant sound config screen
*
* 36 11/19/97 8:28p Dave
* Hooked in Main Hall screen. Put in Anim support for ping ponging
* animations as well as general reversal of anim direction.
*
* 35 11/15/97 2:36p Dave
* Added more multiplayer campaign support.
*
* 34 11/13/97 7:01p Hoffoss
* Fixed GS_state_text[], which didn't match the current states we have
* available.
*
* 33 11/10/97 6:02p Hoffoss
* Added new debug paused state.
*
* 32 11/03/97 10:12p Hoffoss
* Finished up work on the hud message/mission log scrollback screen.
*
* 31 10/22/97 11:00p Lawrance
* modify pop_and_discard() to allow discarding of all states on the stack
*
* 30 10/22/97 5:08p John
* fixed a whole slew of bugs and clean up a bunch of stuff dealing with
* end of mission stuff.
*
* 29 10/02/97 9:49p Hoffoss
* Added event evaluation analysis debug screen so we can determine the
* state of events and their sexp trees to track down logic problems and
* such.
*
* 28 9/23/97 11:53p Lawrance
* add state do perform multiplayer on-line help
*
* 27 9/22/97 4:55p Hoffoss
* Added a training message window display thingy.
*
* 26 9/19/97 4:24p Allender
* added team selection state -- initialze player* variable in
* player_level_init
*
* 25 9/18/97 10:17p Lawrance
* add help state for briefing
*
* 24 9/18/97 10:15p Lawrance
* add help state for briefing
*
* 23 7/14/97 12:03a Lawrance
* added navmap state
*
* 22 6/13/97 2:30p Lawrance
* Added debriefings
*
* 21 5/20/97 10:02a Lawrance
* added view medals screen
*
* 20 4/28/97 2:17p Lawrance
* added help state for hotkey assignment screen
*
* 19 4/25/97 3:41p Lawrance
* added support for hotkey assignment screen
*
* 18 4/23/97 9:54a Lawrance
* made show goals screen a separate state
*
* 17 4/22/97 11:06a Lawrance
* added credits state
*
* 16 4/17/97 9:01p Allender
* start of campaign stuff. Campaigns now stored in external file (no
* filenames in code). Continuing campaign won't work at this point
*
* 15 4/03/97 8:40p Lawrance
* add new player death states to GS_state_text[]
*
* 14 3/05/97 5:04p Lawrance
* added new states for different context help
*
* 13 1/09/97 12:41a Lawrance
* added function to pop a state without restoring that state
*
* 12 12/22/96 3:41p Lawrance
* integrating energy transfer system
*
* 11 12/09/96 2:35p Allender
* modifed game sequencing so that game_leave_state and game_enter_state
* are *always* called.
*
* 10 12/08/96 1:54a Lawrance
* put check in to see if a state change request is invalid (ie already in
* that state)
*
* 9 11/18/96 5:07p John
* Changed sequencing code to call entry,leave functions for each state
* change. Added Shift+Pause debug pause thing.
*
* 8 11/13/96 4:02p Lawrance
* complete over-haul of the menu system and the states associated with
* them
*
* 7 10/23/96 9:08a Allender
* Removed primary and secondary goal complete states -- to be implemented
* later.
*
*/
/*
* All states for game sequencing are defined in GameSequence.h.
* States should always be referred to using the macros.
*/
#include "freespace.h"
#include "gamesequence.h"
// local defines
#define MAX_GAMESEQ_EVENTS 20 // maximum number of events on the game sequencing queue
#define GS_STACK_SIZE 10 // maximum number of stacked states
// local variables
typedef struct state_stack {
int current_state;
int event_queue[MAX_GAMESEQ_EVENTS];
int queue_tail, queue_head;
} state_stack;
// DO NOT MAKE THIS NON-STATIC!!!!
LOCAL state_stack gs[GS_STACK_SIZE];
LOCAL int gs_current_stack = -1; // index of top state on stack.
static int state_reentry = 0; // set if we are already in state processing
static int state_processing_event_post = 0; // set if we are already processing an event to switch states
static int state_in_event_processer = 0;
// Text of state, corresponding to #define values for GS_STATE_*
//XSTR:OFF
char *GS_event_text[] =
{
"GS_EVENT_MAIN_MENU",
"GS_EVENT_START_GAME",
"GS_EVENT_ENTER_GAME",
"GS_EVENT_START_GAME_QUICK",
"GS_EVENT_END_GAME",
"GS_EVENT_QUIT_GAME", // 5
"GS_EVENT_PAUSE_GAME",
"GS_EVENT_PREVIOUS_STATE",
"GS_EVENT_OPTIONS_MENU",
"GS_EVENT_BARRACKS_MENU",
"GS_EVENT_TRAINING_MENU", // 10
"GS_EVENT_TECH_MENU",
"GS_EVENT_LOAD_MISSION_MENU",
"GS_EVENT_SHIP_SELECTION",
"GS_EVENT_TOGGLE_FULLSCREEN",
"GS_EVENT_WEAPON_SELECT_HELP", // 15
"GS_EVENT_START_BRIEFING",
"GS_EVENT_DEBUG_PAUSE_GAME",
"GS_EVENT_HUD_CONFIG",
"GS_EVENT_MULTI_SETUP",
"GS_EVENT_MULTI_JOIN_GAME", // 20
"GS_EVENT_CONTROL_CONFIG",
"GS_EVENT_EVENT_DEBUG",
"GS_EVENT_MULTI_PROTO_CHOICE",
"GS_EVENT_SAVE_RESTORE",
"GS_EVENT_CHOOSE_SAVE_OR_RESTORE", // 25
"GS_EVENT_WEAPON_SELECTION",
"GS_EVENT_MISSION_LOG_SCROLLBACK",
"GS_EVENT_MAIN_MENU_HELP",
"GS_EVENT_GAMEPLAY_HELP",
"GS_EVENT_SHIP_SELECT_HELP", // 30
"GS_EVENT_DEATH_DIED",
"GS_EVENT_DEATH_BLEW_UP",
"GS_EVENT_NEW_CAMPAIGN",
"GS_EVENT_CREDITS",
"GS_EVENT_SHOW_GOALS", // 35
"GS_EVENT_HOTKEY_SCREEN",
"GS_EVENT_HOTKEY_SCREEN_HELP",
"GS_EVENT_VIEW_MEDALS",
"GS_EVENT_MULTI_HOST_SETUP",
"GS_EVENT_MULTI_CLIENT_SETUP", // 40
"GS_EVENT_DEBRIEF",
"GS_EVENT_NAVMAP",
"GS_EVENT_MULTI_JOIN_TRACKER",
"GS_EVENT_GOTO_VIEW_CUTSCENES_SCREEN",
"GS_EVENT_MULTI_STD_WAIT", // 45
"GS_EVENT_STANDALONE_MAIN",
"GS_EVENT_MULTI_PAUSE",
"GS_EVENT_BRIEFING_HELP",
"GS_EVENT_TEAM_SELECT",
"GS_EVENT_TRAINING_PAUSE", // 50
"GS_EVENT_MULTI_HELP",
"GS_EVENT_INGAME_PRE_JOIN",
"GS_EVENT_PLAYER_WARPOUT_START",
"GS_EVENT_PLAYER_WARPOUT_START_FORCED",
"GS_EVENT_PLAYER_WARPOUT_STOP", // 55
"GS_EVENT_PLAYER_WARPOUT_DONE_STAGE1",
"GS_EVENT_PLAYER_WARPOUT_DONE_STAGE2",
"GS_EVENT_PLAYER_WARPOUT_DONE",
"GS_EVENT_STANDALONE_POSTGAME",
"GS_EVENT_INITIAL_PLAYER_SELECT", // 60
"GS_EVENT_GAME_INIT",
"GS_EVENT_MULTI_MISSION_SYNC",
"GS_EVENT_MULTI_CAMPAIGN_SELECT",
"GS_EVENT_MULTI_SERVER_TRANSFER",
"GS_EVENT_MULTI_START_GAME", // 65
"GS_EVENT_MULTI_HOST_OPTIONS",
"GS_EVENT_MULTI_DOGFIGHT_DEBRIEF",
"GS_EVENT_CAMPAIGN_ROOM",
"GS_EVENT_CMD_BRIEF",
"GS_EVENT_TOGGLE_GLIDE", // 70
"GS_EVENT_RED_ALERT",
"GS_EVENT_SIMULATOR_ROOM",
"GS_EVENT_EMD_CAMPAIGN",
};
//XSTR:ON
// Text of state, corresponding to #define values for GS_STATE_*
//XSTR:OFF
char *GS_state_text[] =
{
"NOT A VALID STATE",
"GS_STATE_MAIN_MENU", // 1
"GS_STATE_GAME_PLAY",
"GS_STATE_GAME_PAUSED",
"GS_STATE_QUIT_GAME",
"GS_STATE_OPTIONS_MENU", // 5
"GS_EVENT_WEAPON_SELECT_HELP",
"GS_STATE_BARRACKS_MENU",
"GS_STATE_TECH_MENU",
"GS_STATE_TRAINING_MENU",
"GS_STATE_LOAD_MISSION_MENU", // 10
"GS_STATE_BRIEFING",
"GS_STATE_SHIP_SELECT",
"GS_STATE_DEBUG_PAUSED",
"GS_STATE_HUD_CONFIG",
"GS_STATE_MULTI_SETUP", // 15
"GS_STATE_MULTI_JOIN_GAME",
"GS_STATE_CONTROL_CONFIG",
"GS_STATE_MULTI_PROTO_CHOICE",
"GS_STATE_SAVE_RESTORE",
"GS_STATE_WEAPON_SELECT", // 20
"GS_STATE_MISSION_LOG_SCROLLBACK",
"GS_STATE_MAIN_MENU_HELP",
"GS_STATE_GAMEPLAY_HELP",
"GS_STATE_SHIP_SELECT_HELP",
"GS_STATE_DEATH_DIED", // 25
"GS_STATE_DEATH_BLEW_UP",
"GS_STATE_SIMULATOR_ROOM",
"GS_STATE_CREDITS",
"GS_STATE_SHOW_GOALS",
"GS_STATE_HOTKEY_SCREEN", // 30
"GS_STATE_HOTKEY_SCREEN_HELP",
"GS_STATE_VIEW_MEDALS",
"GS_STATE_MULTI_HOST_SETUP",
"GS_STATE_MULTI_CLIENT_SETUP",
"GS_STATE_DEBRIEF", // 35
"GS_STATE_NAVMAP",
"GS_STATE_MULTI_JOIN_TRACKER",
"GS_STATE_VIEW_CUTSCENES",
"GS_STATE_MULTI_STD_WAIT",
"GS_STATE_STANDALONE_MAIN", // 40
"GS_STATE_MULTI_PAUSED",
"GS_STATE_BRIEFING_HELP",
"GS_STATE_TEAM_SELECT",
"GS_STATE_TRAINING_PAUSED",
"GS_STATE_MULTI_HELP", // 45
"GS_STATE_INGAME_PRE_JOIN",
"GS_STATE_EVENT_DEBUG",
"GS_STATE_STANDALONE_POSTGAME",
"GS_STATE_INITIAL_PLAYER_SELECT",
"GS_STATE_MULTI_MISSION_SYNC", // 50
"GS_STATE_MULTI_SERVER_TRANSFER",
"GS_STATE_MULTI_START_GAME",
"GS_STATE_MULTI_HOST_OPTIONS",
"GS_STATE_MULTI_DOGFIGHT_DEBRIEF",
"GS_STATE_CAMPAIGN_ROOM", // 55
"GS_STATE_CMD_BRIEF",
"GS_STATE_RED_ALERT",
"GS_STATE_END_OF_CAMPAIGN",
};
//XSTR:ON
void gameseq_init()
{
int i;
for (i=0; i<GS_STACK_SIZE; i++ ) {
// gs[i].current_state = GS_STATE_MAIN_MENU;
gs[i].current_state = 0;
gs[i].queue_tail=0;
gs[i].queue_head=0;
}
gs_current_stack = 0;
state_reentry = 0;
state_processing_event_post = 0;
state_in_event_processer = 0;
}
// gameseq_post_event posts a new game sequencing event onto the gameseq
// event queue
void gameseq_post_event( int event )
{
if (state_processing_event_post) {
nprintf(("Warning", "Received post for event %s during state transtition. Find Allender if you are unsure if this is bad.\n", GS_event_text[event] ));
}
Assert(gs[gs_current_stack].queue_tail < MAX_GAMESEQ_EVENTS);
gs[gs_current_stack].event_queue[gs[gs_current_stack].queue_tail++] = event;
if ( gs[gs_current_stack].queue_tail == MAX_GAMESEQ_EVENTS )
gs[gs_current_stack].queue_tail = 0;
}
// returns one of the GS_EVENT_ id's on the game sequencing queue
int gameseq_get_event()
{
int event;
if ( gs[gs_current_stack].queue_head == gs[gs_current_stack].queue_tail )
return -1;
event = gs[gs_current_stack].event_queue[gs[gs_current_stack].queue_head++];
if ( gs[gs_current_stack].queue_head == MAX_GAMESEQ_EVENTS )
gs[gs_current_stack].queue_head = 0;
return event;
}
// returns one of the GS_STATE_ macros
int gameseq_get_state(int depth)
{
Assert(depth <= gs_current_stack);
return gs[gs_current_stack - depth].current_state;
}
int gameseq_get_depth()
{
return gs_current_stack;
}
void gameseq_set_state(int new_state, int override)
{
int event, old_state;
if ( (new_state == gs[gs_current_stack].current_state) && !override )
return;
old_state = gs[gs_current_stack].current_state;
// Flush all events!!
while ( (event = gameseq_get_event()) != -1 ) {
mprintf(( "Throwing out event %d because of state set from %d to %d\n", event, old_state, new_state ));
}
Assert( state_reentry == 1 ); // Get John! (Invalid state sequencing!)
Assert( state_in_event_processer == 1 ); // can only call from game_process_event
state_processing_event_post++;
state_reentry++;
game_leave_state(gs[gs_current_stack].current_state,new_state);
gs[gs_current_stack].current_state = new_state;
game_enter_state(old_state,gs[gs_current_stack].current_state);
state_reentry--;
state_processing_event_post--;
}
void gameseq_push_state( int new_state )
{
if ( new_state == gs[gs_current_stack].current_state )
return;
int old_state = gs[gs_current_stack].current_state;
// Flush all events!!
// I commented out because I'm not sure if we should throw out events when pushing or not.
// int event;
// while( (event = gameseq_get_event()) != -1 ) {
// mprintf(( "Throwing out event %d because of state push from %d to %d\n", event, old_state, new_state ));
// }
Assert( state_reentry == 1 ); // Get John! (Invalid state sequencing!)
Assert( state_in_event_processer == 1 ); // can only call from game_process_event
gs_current_stack++;
Assert(gs_current_stack < GS_STACK_SIZE);
state_processing_event_post++;
state_reentry++;
game_leave_state(old_state,new_state);
gs[gs_current_stack].current_state = new_state;
gs[gs_current_stack].queue_tail = 0;
gs[gs_current_stack].queue_head = 0;
game_enter_state(old_state,gs[gs_current_stack].current_state);
state_reentry--;
state_processing_event_post--;
}
void gameseq_pop_state()
{
int popped_state = 0;
Assert(state_reentry == 1); // Get John! (Invalid state sequencing!)
if (gs_current_stack >= 1) {
int old_state;
// set the old state to be the state which is about to be popped off the queue
old_state = gs[gs_current_stack].current_state;
// set the popped_state to be the state which is going to be moved into
popped_state = gs[gs_current_stack-1].current_state;
// leave the current state
state_reentry++;
game_leave_state(gs[gs_current_stack].current_state,popped_state);
// set the popped_state to be the one we moved into
gs_current_stack--;
popped_state = gs[gs_current_stack].current_state;
// swap all remaining events from the state which just got popped to this new state
while(gs[gs_current_stack+1].queue_head != gs[gs_current_stack+1].queue_tail){
gameseq_post_event(gs[gs_current_stack+1].event_queue[gs[gs_current_stack+1].queue_head++]);
}
game_enter_state(old_state, gs[gs_current_stack].current_state);
state_reentry--;
}
}
// gameseq_pop_and_discard_state() is used to remove a state that was pushed onto the stack, but
// will never need to be popped. An example of this is entering a state that may require returning
// to the previous state (then you would call gameseq_pop_state). Or you may simply continue to
// another part of the game, to avoid filling up the stack with states that may never be popped, you
// call this function to discard the top of the gs.
//
void gameseq_pop_and_discard_state()
{
if (gs_current_stack > 0 ) {
gs_current_stack--;
}
}
// Returns the last state pushed on stack
int gameseq_get_pushed_state()
{
if (gs_current_stack >= 1) {
return gs[gs_current_stack-1].current_state;
} else
return -1;
}
// gameseq_process_events gets called every time through high level loops
// (i.e. game loops, main menu loop). Function is responsible for pulling
// game sequence events off the queue and changing the state when necessary.
// Returns the current state.
// pull events game sequence events off of the queue. Process one at a time
// based on the current state and the new event.
int gameseq_process_events()
{
int event, old_state;
old_state = gs[gs_current_stack].current_state;
Assert(state_reentry == 0); // Get John! (Invalid state sequencing!)
while ( (event = gameseq_get_event()) != -1 ) {
state_reentry++;
state_in_event_processer++;
game_process_event(gs[gs_current_stack].current_state, event);
state_in_event_processer--;
state_reentry--;
// break when state changes so that code will get called at
// least one frame for each state.
if (old_state != gs[gs_current_stack].current_state)
break;
}
state_reentry++;
game_do_state(gs[gs_current_stack].current_state);
state_reentry--;
return gs[gs_current_stack].current_state;
}
-491
View File
@@ -1,491 +0,0 @@
/*
* 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/GameSequence/GameSequence.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Header file for Game Sequencing items
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 8 9/03/99 1:31a Dave
* CD checking by act. Added support to play 2 cutscenes in a row
* seamlessly. Fixed super low level cfile bug related to files in the
* root directory of a CD. Added cheat code to set campaign mission # in
* main hall.
*
* 7 8/27/99 12:04a Dave
* Campaign loop screen.
*
* 6 8/04/99 5:36p Andsager
* Show upsell screens at end of demo campaign before returning to main
* hall.
*
* 5 2/23/99 2:29p Dave
* First run of oldschool dogfight mode.
*
* 4 11/05/98 5:55p Dave
* Big pass at reducing #includes
*
* 3 11/05/98 4:18p Dave
* First run nebula support. Beefed up localization a bit. Removed all
* conditional compiles for foreign versions. Modified mission file
* format.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 83 5/15/98 12:09a Dave
* New tracker api code. New game tracker code. Finished up first run of
* the PXO screen. Fixed a few game server list exceptions.
*
* 82 5/12/98 2:46a Dave
* Rudimentary communication between Parallax Online and freespace. Can
* get and store channel lists.
*
* 81 4/25/98 7:39p Allender
* fixd some small hotkey stuff. Worked on turret orientation being
* correct for multiplayer. new sexpression called end-campaign will will
* end the main campaign
*
* 80 4/23/98 7:08p John
* Removed some obsoleted states.
*
* 79 4/16/98 4:31p Hoffoss
* Changed demo screen referenced to view cutscenes screen, which is now
* what it's called.
*
* 78 4/02/98 5:40p Hoffoss
* Added the Load Mission screen to FreeSpace.
*
* 77 3/11/98 5:32p Lawrance
* Fix up text arrays for events/states
*
* 76 3/09/98 12:13a Lawrance
* Add support for Red Alert missions
*
* 75 3/07/98 5:44p Dave
* Finished player info popup. Ironed out a few todo bugs.
*
* 74 3/05/98 4:12p John
* Made Debug+F4 switch Glide and windowed.
*
* 73 3/03/98 1:00p Hoffoss
* Added new command briefing event and state.
*
* 72 3/02/98 3:44p Hoffoss
* Added new Campaign Room state and event.
*
* 71 2/19/98 6:26p Dave
* Fixed a few file xfer bugs. Tweaked mp team select screen. Put in
* initial support for player data uploading.
*
* 70 2/18/98 10:21p Dave
* Ripped out old file xfer system. Put in brand new xfer system.
*
* 69 2/08/98 5:07p Dave
* Put in support for multiplayer furball mode.
*
* 68 1/28/98 6:22p Dave
* Made standalone use ~8 megs less memory. Fixed multiplayer submenu
* sequencing bug.
*
* 67 1/23/98 5:43p Dave
* Finished bringing standalone up to speed. Coded in new host options
* screen.
*
* 66 1/22/98 5:25p Dave
* Modified some pregame sequencing packets. Starting to repair broken
* standalone stuff.
*
* 65 1/20/98 5:42p Dave
* Moved ingame join to its own module. Improved it a bit.
*
* 64 1/15/98 6:12p Dave
* Fixed weapons loadout bugs with multiplayer respawning. Added
* multiplayer start screen. Fixed a few chatbox bugs.
*
* 63 1/15/98 6:00p Hoffoss
* Added option to quit menu (in game) to restart the mission. Doesn't
* seem to quite work, though. Checking code in so someone else can look
* into it.
*
* 62 1/05/98 10:05a Dave
* Big re-sequencing of server transfer. Centralized _all_ server transfer
* code to one module.
*
* 61 12/30/97 4:28p Lawrance
* Give text descriptions for events, change debug output to give text
* desciption of event/state
*
* 60 12/24/97 8:56p Lawrance
* took out obsolete state used for non-existant sound config screen
*
* 59 12/17/97 8:44p John
* added code to warp the player out of mission no matter what; no
* cancelling, no max speed check.
*
* 58 11/15/97 2:37p Dave
* More multiplayer campaign support.
*
* 57 11/13/97 7:01p Hoffoss
* Fixed GS_state_text[], which didn't match the current states we have
* available.
*
* 56 11/11/97 4:57p Dave
* Put in support for single vs. multiplayer pilots. Began work on
* multiplayer campaign saving. Put in initial player select screen
*
* 55 11/10/97 6:02p Hoffoss
* Added new debug paused state.
*
* 54 11/03/97 10:12p Hoffoss
* Finished up work on the hud message/mission log scrollback screen.
*
* 53 10/27/97 6:11p Dave
* Changed host/server transfer around. Added some multiplayer data to
* state save/restore. Made multiplayer quitting more intelligent.
*
* 52 10/27/97 8:33a John
* added code for new player warpout sequence
*
* 51 10/24/97 6:19p Dave
* More standalone testing/fixing. Added reliable endgame sequencing.
* Added reliable ingame joining. Added reliable stats transfer (endgame).
* Added support for dropping players in debriefing. Removed a lot of old
* unused code.
*
* 50 10/18/97 7:47p Hoffoss
* Changed state workings for controls config screen.
*
* 49 10/02/97 9:53p Hoffoss
* Added event evaluation analysis debug screen so we can determine the
* state of events and their sexp trees to track down logic problems and
* such.
*
* 48 10/02/97 4:52p Dave
* Added event to move to the multi wait state with a post_event
*
* 47 10/01/97 4:52p Dave
* Got ingame join and observer mode to correctly work under the new
* player_obj system.
*
* 46 9/30/97 5:08p Dave
* Began work on ingame join ship selection screen/state.
*
* 45 9/23/97 11:53p Lawrance
* add state do perform multiplayer on-line help
*
* 44 9/22/97 4:55p Hoffoss
* Added a training message window display thingy.
*
* 43 9/19/97 4:24p Allender
* added team selection state -- initialze player* variable in
* player_level_init
*
* 42 9/18/97 10:17p Lawrance
* add help state for briefing
*
* 41 9/18/97 9:21a Dave
* Added view medals state. Changed pilot scoring struct to reflect.
*
* 40 8/29/97 4:51p Dave
* Added a state and even for multiplayer pausing.
*
* 39 8/15/97 5:15p Dave
* Added a file xfer state.
*
* 38 8/15/97 9:29a Dave
* Removed standalone server briefing wait state.
*
* 37 8/04/97 4:39p Dave
* Added first 3 standalone state handlers
*
* 36 7/30/97 5:24p Dave
* Added in demo system state.
*
* 35 7/24/97 2:17p Dave
* Added show statistics state.
*
* 34 7/23/97 4:51p Dave
* Added join tracker state
*
* 33 7/14/97 12:03a Lawrance
* added navmap state
*
* 32 6/13/97 2:30p Lawrance
* Added debriefings
*
* 31 6/12/97 9:13a Allender
* added sequencing state to the end of ship selection. Changed some
* packet names and host sequencing
*
* 30 6/10/97 9:56p Allender
* get multiplayer mission selection working. Host can select mission and
* have himself and clients load the mission -- no sequencing past this
* point however
*
* 29 6/06/97 10:40a Allender
* added 'type' to mission (single/multi/etc). Added a couple of new game
* states for allowing to choose mission for multiplayer game
*
* 28 5/20/97 10:02a Lawrance
* added view medals screen
*
* 27 4/28/97 2:17p Lawrance
* added help state for hotkey assignment screen
*
* 26 4/25/97 3:41p Lawrance
* added support for hotkey assignment screen
*
* 25 4/23/97 9:54a Lawrance
* made show goals screen a separate state
*
* 24 4/22/97 11:06a Lawrance
* added credits state
*
* 23 4/17/97 9:01p Allender
* start of campaign stuff. Campaigns now stored in external file (no
* filenames in code). Continuing campaign won't work at this point
*
* 22 4/03/97 8:40p Lawrance
* give GS_STATE's for player death correct numbering
*
* 21 4/02/97 6:03p Mike
* Make dying work through event driven code.
*
* 20 3/05/97 5:04p Lawrance
* added new states for different context help
*
* 19 3/03/97 1:21p Allender
* mission log stuff -- display the log during/after game. Enhanced
* structure
*
* 18 3/02/97 4:43p Lawrance
* Added in state for sound/music sound config
*
* 17 2/25/97 11:07a Lawrance
* Added support for weapon loadout state
*
* 16 1/09/97 12:57p Lawrance
* supporting a new state where the player picks to either save or restore
*
* 15 1/09/97 12:41a Lawrance
* added function to pop a state without restoring that state
*
* 14 1/06/97 10:44p Lawrance
* Changes to make save/restore functional
*
* 13 1/01/97 6:44p Lawrance
* added new state for protocol choice in a net game
*
* 12 12/03/96 3:45p Lawrance
* supporting control configuration
*
* 11 12/01/96 3:49a Lawrance
* adding support for various multiplayer states
*
* 10 11/29/96 6:09p Lawrance
* added a state for HUD configuration
*
* 9 11/27/96 3:21p Lawrance
* added state for when player is examining message scroll-back
*
* 8 11/19/96 1:22p Lawrance
* added event to start a briefing
*
* 7 11/18/96 8:12p John
* Changed some briefing and sequencing stuff around.
*
* 6 11/18/96 5:07p John
* Changed sequencing code to call entry,leave functions for each state
* change. Added Shift+Pause debug pause thing.
*
* 5 11/13/96 4:02p Lawrance
* complete over-haul of the menu system and the states associated with
* them
*
* 4 10/23/96 9:08a Allender
* Removed primary and secondary goal complete states -- to be implemented
* later.
*
*/
// defines for game sequencing
#ifndef __GAMESEQUENCE_H__
#define __GAMESEQUENCE_H__
#include "pstypes.h"
// defines for game sequencing events
//
#define GS_EVENT_MAIN_MENU 0 // first event to move to first state
#define GS_EVENT_START_GAME 1 // start a new game (Loads a mission then goes to briefing state)
#define GS_EVENT_ENTER_GAME 2 // switches into game state, probably after mission briefing or ship selection.
#define GS_EVENT_START_GAME_QUICK 3 // start a new game (Loads a mission then goes to directly to game state)
#define GS_EVENT_END_GAME 4 // end the current game (i.e. back to main menu)
#define GS_EVENT_QUIT_GAME 5 // quit the entire game
#define GS_EVENT_PAUSE_GAME 6 // pause the current game
#define GS_EVENT_PREVIOUS_STATE 7 // return to the previous state
#define GS_EVENT_OPTIONS_MENU 8 // go to the options menu
#define GS_EVENT_BARRACKS_MENU 9 // go to the barracks menu
#define GS_EVENT_TRAINING_MENU 10 // go to the training menu
#define GS_EVENT_TECH_MENU 11 // go to the tech room menu
#define GS_EVENT_LOAD_MISSION_MENU 12 // go to the load mission menu
#define GS_EVENT_SHIP_SELECTION 13 // Show ship selection menu
#define GS_EVENT_TOGGLE_FULLSCREEN 14 // toggle fullscreen mode
#define GS_EVENT_START_BRIEFING 15 // go to the briefing for the current mission
#define GS_EVENT_DEBUG_PAUSE_GAME 16
#define GS_EVENT_HUD_CONFIG 17 // start the HUD configuration screen
#define GS_EVENT_MULTI_JOIN_GAME 18 // start multiplayer join game screen
#define GS_EVENT_CONTROL_CONFIG 19 // get user to choose what type of controller to config
#define GS_EVENT_EVENT_DEBUG 20 // an event debug trace scroll list display screen
#define GS_EVENT_WEAPON_SELECTION 21 // Do weapon loadout
#define GS_EVENT_MISSION_LOG_SCROLLBACK 22 // scrollback screen for message log entries
#define GS_EVENT_GAMEPLAY_HELP 23 // show help for the gameplay
#define GS_EVENT_DEATH_DIED 24 // Player just died
#define GS_EVENT_DEATH_BLEW_UP 25 // Saw ship explode.
#define GS_EVENT_NEW_CAMPAIGN 26
#define GS_EVENT_CREDITS 27 // Got to the credits
#define GS_EVENT_SHOW_GOALS 28 // Show the goal status screen
#define GS_EVENT_HOTKEY_SCREEN 29 // Show the hotkey assignment screen
#define GS_EVENT_VIEW_MEDALS 30 // Go to the View Medals screen
#define GS_EVENT_MULTI_HOST_SETUP 31 // host setup for multiplayer
#define GS_EVENT_MULTI_CLIENT_SETUP 32 // client setup for multiplayer
#define GS_EVENT_DEBRIEF 33 // go to debriefing
#define GS_EVENT_GOTO_VIEW_CUTSCENES_SCREEN 34 // go to the demo management screen
#define GS_EVENT_MULTI_STD_WAIT 35 // standalone wait state
#define GS_EVENT_STANDALONE_MAIN 36 // the main do-nothing state of the standalone
#define GS_EVENT_MULTI_PAUSE 37 // pause your multiplayer game
#define GS_EVENT_TEAM_SELECT 38 // team selection for multiplayer
#define GS_EVENT_TRAINING_PAUSE 39 // pause game while training message is displayed
#define GS_EVENT_INGAME_PRE_JOIN 40 // go to ship selection screen for ingame join
#define GS_EVENT_PLAYER_WARPOUT_START 41 // player hit 'j' to warp out
#define GS_EVENT_PLAYER_WARPOUT_START_FORCED 42 // player is being forced out of mission no matter what
#define GS_EVENT_PLAYER_WARPOUT_STOP 43 // player hit 'esc' or something to cancel warp out
#define GS_EVENT_PLAYER_WARPOUT_DONE_STAGE1 44 // player ship got up to speed
#define GS_EVENT_PLAYER_WARPOUT_DONE_STAGE2 45 // player ship got through the warp effect
#define GS_EVENT_PLAYER_WARPOUT_DONE 46 // warp effect went away
#define GS_EVENT_STANDALONE_POSTGAME 47 // debriefing, etc
#define GS_EVENT_INITIAL_PLAYER_SELECT 48 // initial screen where player selects from multi/single player pilots
#define GS_EVENT_GAME_INIT 49
#define GS_EVENT_MULTI_MISSION_SYNC 50 // sychronize/transfer/load any mission specific data in multiplayer
#define GS_EVENT_MULTI_START_GAME 51 // immediately before the create game screen for the host to set the game variables
#define GS_EVENT_MULTI_HOST_OPTIONS 52 // options the host can set while in the create game scree
#define GS_EVENT_MULTI_DOGFIGHT_DEBRIEF 53 // multiplayer furball debriefing screen (replaces normal debriefing)
#define GS_EVENT_CAMPAIGN_ROOM 54
#define GS_EVENT_CMD_BRIEF 55 // switch to command briefing screen
#define GS_EVENT_TOGGLE_GLIDE 56 // GS_EVENT_TOGGLE_GLIDE
#define GS_EVENT_RED_ALERT 57 // go to red alert screen
#define GS_EVENT_SIMULATOR_ROOM 58
#define GS_EVENT_END_CAMPAIGN 59 // end of the whole thang.
#define GS_EVENT_END_DEMO 60 // end of demo campaign
#define GS_EVENT_LOOP_BRIEF 61 // campaign loop brief
#define GS_EVENT_CAMPAIGN_CHEAT 62 // skip to a mission in a campaign
// IMPORTANT: When you add a new event, update the initialization for GS_event_text[]
// which is done in GameSequence.cpp
//
extern char *GS_event_text[]; // text description for the GS_EVENT_* #defines above
// defines for game sequencing states
//
// IMPORTANT: When you add a new state, update the initialization for GS_state_text[]
// which is done in GameSequence.cpp
#define GS_STATE_MAIN_MENU 1
#define GS_STATE_GAME_PLAY 2
#define GS_STATE_GAME_PAUSED 3
#define GS_STATE_QUIT_GAME 4
#define GS_STATE_OPTIONS_MENU 5
#define GS_STATE_BARRACKS_MENU 7
#define GS_STATE_TECH_MENU 8
#define GS_STATE_TRAINING_MENU 9
#define GS_STATE_LOAD_MISSION_MENU 10
#define GS_STATE_BRIEFING 11
#define GS_STATE_SHIP_SELECT 12
#define GS_STATE_DEBUG_PAUSED 13
#define GS_STATE_HUD_CONFIG 14
#define GS_STATE_MULTI_JOIN_GAME 15
#define GS_STATE_CONTROL_CONFIG 16
#define GS_STATE_WEAPON_SELECT 17
#define GS_STATE_MISSION_LOG_SCROLLBACK 18
#define GS_STATE_DEATH_DIED 19 // Player just died
#define GS_STATE_DEATH_BLEW_UP 20 // Saw ship explode.
#define GS_STATE_SIMULATOR_ROOM 21
#define GS_STATE_CREDITS 22
#define GS_STATE_SHOW_GOALS 23
#define GS_STATE_HOTKEY_SCREEN 24
#define GS_STATE_VIEW_MEDALS 25 // Go to the View Medals screen
#define GS_STATE_MULTI_HOST_SETUP 26 // state where host sets up multiplayer game
#define GS_STATE_MULTI_CLIENT_SETUP 27 // client setup for multiplayer game
#define GS_STATE_DEBRIEF 28
#define GS_STATE_VIEW_CUTSCENES 29
#define GS_STATE_MULTI_STD_WAIT 30
#define GS_STATE_STANDALONE_MAIN 31
#define GS_STATE_MULTI_PAUSED 32
#define GS_STATE_TEAM_SELECT 33
#define GS_STATE_TRAINING_PAUSED 34 // game is paused while training msg is being read.
#define GS_STATE_INGAME_PRE_JOIN 35 // go to ship selection screen for ingame join
#define GS_STATE_EVENT_DEBUG 36 // an event debug trace scroll list display screen
#define GS_STATE_STANDALONE_POSTGAME 37 // debriefing, etc.
#define GS_STATE_INITIAL_PLAYER_SELECT 38
#define GS_STATE_MULTI_MISSION_SYNC 39
#define GS_STATE_MULTI_START_GAME 40
#define GS_STATE_MULTI_HOST_OPTIONS 41
#define GS_STATE_MULTI_DOGFIGHT_DEBRIEF 42
#define GS_STATE_CAMPAIGN_ROOM 43
#define GS_STATE_CMD_BRIEF 44 // command briefing screen
#define GS_STATE_RED_ALERT 45 // red alert screen
#define GS_STATE_END_OF_CAMPAIGN 46 // end of main campaign -- only applicable in single player
#define GS_STATE_GAMEPLAY_HELP 47
#define GS_STATE_END_DEMO 48 // end of demo campaign (upsell then main menu)
#define GS_STATE_LOOP_BRIEF 49
// IMPORTANT: When you add a new state, update the initialization for GS_state_text[]
// which is done in GameSequence.cpp
//
extern char *GS_state_text[]; // text description for the GS_STATE_* #defines above
// function prototypes
//
void gameseq_init();
int gameseq_process_events( void ); // returns current game state
int gameseq_get_state( int depth = 0 );
void gameseq_post_event( int event );
int gameseq_get_event( void );
void gameseq_set_state(int new_state, int override = 0);
void gameseq_push_state( int new_state );
void gameseq_pop_state( void );
int gameseq_get_pushed_state();
int gameseq_get_depth();
void gameseq_pop_and_discard_state(void);
// Called by the sequencing code when things happen.
void game_process_event(int current_state, int event);
void game_leave_state(int old_state,int new_state);
void game_enter_state(int old_state,int new_state);
void game_do_state(int current_state);
#endif /* __GAMESEQUENCE_H__ */
File diff suppressed because it is too large. Load diff
-220
View File
@@ -1,220 +0,0 @@
/*
* 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/Gamesnd/EventMusic.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Header file for high-level control of event driven music
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 5 8/11/99 5:33p Jefff
* added 3rd debrief music track
*
* 4 6/20/99 12:06a Alanl
* new event music changes
*
* 3 11/20/98 4:08p Dave
* Fixed flak effect in multiplayer.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 27 9/18/98 1:22p Dave
* Added new event music stuff defines.
*
* 26 5/18/98 5:22p Lawrance
* Support new briefing music
*
* 25 5/03/98 1:54a Lawrance
* Fix event music problems related to respawning
*
* 24 12/30/97 11:46a Lawrance
* Support a success debriefing music.
*
* 23 12/28/97 5:52p Lawrance
* Add support for debriefing success/fail music.
*
* 22 12/26/97 10:01p Lawrance
* Add goal failure music... remove unused arrival music patterns
*
* 21 9/19/97 5:13p Lawrance
* add support for specifying music in the mission file
*
* 20 9/09/97 5:24p Lawrance
* added ability to switch soundtracks, gave soundtracks real names
*
* 19 9/06/97 2:13p Mike
* Replace support for TEAM_NEUTRAL
*
* 18 5/14/97 9:54a Lawrance
* supporting mission-specific briefing music
*
* 17 4/21/97 5:36p Lawrance
* add in hooks to play death music when pilot dies
*
* 16 4/17/97 3:28p Lawrance
* documented functions
*
* 15 4/14/97 1:52p Lawrance
* making transitions happen on measure boundries
*
* 14 4/07/97 1:39p Lawrance
* added event_music_first_pattern();
*
* 13 4/03/97 4:26p Lawrance
* getting digital event music working
*
* 12 3/07/97 8:53a Lawrance
* Read event at time 0 when music first starts
*
* 11 2/25/97 11:10a Lawrance
* using text of the mission name to match up which midi file gets played
* for which mission
*
* 10 2/18/97 9:43a Lawrance
* make BTTL_2 play after 2 enemy arrivals in battle mode. Then switch
* back to default BTTL_1 until 2 more.
*
* 9 2/14/97 11:50a Lawrance
* added BTTL_2 track
*
* 8 2/11/97 4:22p Lawrance
* adding song switching request to the event music level
*
* 7 2/11/97 9:15a Lawrance
* taking out BTTL_2 and BTTL_3
*
* 6 2/10/97 9:26a Lawrance
*
* 5 2/05/97 3:12p Lawrance
* supporting changes in MIDI system that remove any high-level
* dependencies
*
* 4 2/04/97 11:58p Lawrance
* volume change code, and fixing some bugs
*
* 3 2/04/97 12:02p Lawrance
* fixed temp bug, integrating music.tbl
*
* 2 2/03/97 6:49p Lawrance
* Event Music interface working
*
* $NoKeywords: $
*/
#ifndef __EVENT_MUSIC_H__
#define __EVENT_MUSIC_H__
#include "parselo.h"
// Identifies songs in the Soundtrack_filenames[] structure. The order matches up with
// what is in music.tbl. Do not modify without synching music.tbl.
#define SONG_NRML_1 0 // Normal Song 1
#define SONG_AARV_1 1 // Allied Arrival 1
#define SONG_EARV_1 2 // Enemy Arrival 1
#define SONG_BTTL_1 3 // Battle Song 1
#define SONG_BTTL_2 4 // Battle Song 2
#define SONG_BTTL_3 5 // Battle Song 3
#define SONG_AARV_2 6 // Allied Arrival 2
#define SONG_EARV_2 7 // Enemy Arrival 2
#define SONG_VICT_1 8 // Victory Song 1
#define SONG_VICT_2 9 // Victory Song 2
#define SONG_FAIL_1 10 // Goal Failed
#define SONG_DEAD_1 11 // Death Song 1
#define MAX_PATTERNS 12
// if player targets a hostile ship at less than this range, switch to battle track
#define BATTLE_START_MIN_TARGET_DIST 500
extern int Event_Music_battle_started; // flag that will tell us if we've started a battle in the current mission
extern int Event_music_enabled;
extern float Master_event_music_volume; // range is 0->1
/////////////////////////////////////////////////////////////////////////////
// Used to track what briefing and debriefing music is played for the mission
/////////////////////////////////////////////////////////////////////////////
#define NUM_SCORES 4
#define SCORE_BRIEFING 0
#define SCORE_DEBRIEF_SUCCESS 1
#define SCORE_DEBRIEF_AVERAGE 2
#define SCORE_DEBRIEF_FAIL 3
extern int Mission_music[NUM_SCORES]; // indicies into Spooled_music[]
/////////////////////////////////////////////////////////////////////////////
extern int Current_soundtrack_num; // index into Soundtracks[]
// menu music storage
typedef struct menu_music {
char name[NAME_LENGTH]; // name music is known by
char filename[MAX_FILENAME_LEN]; // name music is stored on disk as
} menu_music;
#define MAX_SPOOLED_MUSIC 20
extern menu_music Spooled_music[MAX_SPOOLED_MUSIC];
extern int Num_music_files;
// event music soundtrack storage
typedef struct tagSOUNDTRACK_INFO {
int num_patterns;
char name[NAME_LENGTH];
char pattern_fnames[MAX_PATTERNS][MAX_FILENAME_LEN];
} SOUNDTRACK_INFO;
#define MAX_SOUNDTRACKS 10
extern SOUNDTRACK_INFO Soundtracks[MAX_SOUNDTRACKS];
extern int Num_soundtracks;
void event_music_init();
void event_music_close();
void event_music_level_init(int force_soundtrack = -1);
void event_music_level_close();
void event_music_do_frame();
void event_music_disable();
void event_music_enable();
void event_music_pause();
void event_music_unpause();
void event_music_set_volume_all(float volume);
void event_music_parse_musictbl();
void event_music_change_pattern(int new_pattern);
int event_music_return_current_pattern();
void event_music_first_pattern();
int event_music_battle_start();
int event_music_enemy_arrival();
int event_music_friendly_arrival();
void event_music_arrival(int team);
int event_music_primary_goals_met();
int event_music_primary_goal_failed();
int event_music_player_death();
void event_music_start_default();
void event_music_get_info(char *outbuf);
void event_music_get_soundtrack_name(char *outbuf);
int event_music_next_soundtrack(int delta);
void event_music_set_soundtrack(char *name);
void event_music_set_score(int score_index, char *name);
int event_music_get_spooled_music_index(char *name);
void event_music_reset_choices();
int event_music_player_respawn();
int event_music_player_respawn_as_observer();
void event_music_hostile_ship_destroyed();
#endif /* __EVENT_MUSIC_H__ */
-423
View File
@@ -1,423 +0,0 @@
/*
* 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/Gamesnd/GameSnd.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Routines to keep track of which sound files go where
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 6 7/01/99 11:44a Dave
* Updated object sound system to allow multiple obj sounds per ship.
* Added hit-by-beam sound. Added killed by beam sound.
*
* 5 6/25/99 3:08p Dave
* Multiple flyby sounds.
*
* 4 5/23/99 8:11p Alanl
* Added support for EAX
*
* 3 10/23/98 3:51p Dave
* Full support for tstrings.tbl and foreign languages. All that remains
* is to make it active in Fred.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 39 5/05/98 4:49p Lawrance
* Put in code to authenticate A3D, improve A3D support
*
* 38 4/25/98 1:25p Lawrance
* Make function for playing generic error beep
*
* 37 4/18/98 9:12p Lawrance
* Added Aureal support.
*
* 36 3/29/98 12:56a Lawrance
* preload the warp in and explosions sounds before a mission.
*
* 35 3/25/98 6:10p Lawrance
* Work on DirectSound3D
*
* 34 2/22/98 2:48p John
* More String Externalization Classification
*
* 33 1/17/98 12:33p John
* Made the game_busy function be called a constant amount of times per
* level load, making the bar prediction easier.
*
* 32 1/17/98 12:14p John
* Added loading... bar to freespace.
*
* 31 1/11/98 11:14p Lawrance
* Preload sounds that we expect will get played.
*
* 30 12/24/97 8:54p Lawrance
* Integrating new popup code
*
* 29 12/19/97 3:44p Mike
* Fix parse code. Would improperly read a number through a comma. Lots
* of ships.tbl problems.
*
* 28 12/01/97 5:25p Hoffoss
* Routed interface sound playing through a special function that will
* only allow one instance of the sound to play at a time, avoiding
* over-mixing problems.
*
* 27 11/20/97 1:06a Lawrance
* Add Master_voice_volume, make voices play back at correctly scaled
* volumes
*
* 26 10/17/97 1:36p Lawrance
* load/unload interface sounds
*
* 25 10/14/97 11:35p Lawrance
* change snd_load parameters
*
* 24 7/05/97 1:46p Lawrance
* improve robustness of gameplay and interface sound loading/unloading
*
* 23 6/09/97 11:50p Lawrance
* integrating DirectSound3D
*
* 22 6/08/97 5:59p Lawrance
* flag sounds as 3D
*
* 21 6/05/97 11:25a Lawrance
* use sound signatures to ensure correct sound is loaded
*
* 20 6/05/97 1:07a Lawrance
* changes to support sound interface
*
* 19 6/04/97 1:18p Lawrance
* added hooks for shield impacts
*
* 18 6/02/97 1:50p Lawrance
* supporting new format of sounds in table
*
* 17 5/14/97 9:54a Lawrance
* supporting mission-specific briefing music
*
* 16 5/08/97 1:56p Lawrance
* supporting ship-specific engine sounds
*
* 15 5/06/97 9:36a Lawrance
* added support for min and max distances for 3d sounds
*
* 14 4/23/97 5:19p Lawrance
* split up misc sounds into: gamewide, ingame, and interface
*
* 13 4/20/97 11:48a Lawrance
* added array of filenames for misc sounds. Will be useful if we want to
* unload then re-load sounds
*
* 12 4/20/97 11:19a Lawrance
* sndman_ interface obsolete. Using snd_ functions to load, play, and
* manage static sound fx
*
* 11 4/18/97 4:31p Mike
* Add support for default volume levels.
*
* 10 3/20/97 11:04a Lawrance
* using incorrect constant when loading music filenames
*
* 9 3/19/97 5:53p Lawrance
* integrating new Misc_sounds[] array (replaces old Game_sounds
* structure)
*
* 8 3/17/97 3:47p Mike
* Homing missile lock sound.
* More on AI ships firing missiles.
*
* 7 3/10/97 8:54a Lawrance
* added gamesnd_init_looping_sounds()
*
* 6 2/28/97 8:41a Lawrance
* added afterburner engage and burn sounds
*
* 5 2/14/97 12:37a Lawrance
* added hooks to play docking/undocking sounds
*
* 4 2/13/97 12:03p Lawrance
* hooked in throttle sounds
*
* 3 2/05/97 10:35a Lawrance
* supporting spooled music at menus, briefings, credits etc.
*
* 2 1/20/97 7:58p John
* Fixed some link errors with testcode.
*
* 1 1/20/97 7:08p John
*
* $NoKeywords: $
*/
#include "pstypes.h"
#include "gamesnd.h"
#include "sound.h"
#include "parselo.h"
#include "localize.h"
// Global array that holds data about the gameplay sound effects.
game_snd Snds[MAX_GAME_SOUNDS];
// Global array that holds data about the interface sound effects.
game_snd Snds_iface[MAX_INTERFACE_SOUNDS];
int Snds_iface_handle[MAX_INTERFACE_SOUNDS];
// flyby sounds - 2 for each species (fighter and bomber flybys)
game_snd Snds_flyby[MAX_SPECIES_NAMES][2];
void gamesnd_play_iface(int n)
{
if (Snds_iface_handle[n] >= 0)
snd_stop(Snds_iface_handle[n]);
Snds_iface_handle[n] = snd_play(&Snds_iface[n]);
}
// load in sounds that we expect will get played
//
// The method currently used is to load all those sounds that have the hardware flag
// set. This works well since we don't want to try and load hardware sounds in on the
// fly (too slow).
void gamesnd_preload_common_sounds()
{
int i;
game_snd *gs;
for ( i = 0; i < MAX_GAME_SOUNDS; i++ ) {
gs = &Snds[i];
if ( gs->filename[0] != 0 && stricmp(gs->filename, NOX("none.wav")) ) {
if ( gs->preload ) {
gs->id = snd_load(gs);
}
}
game_busy(); // Animate loading cursor... does nothing if loading screen not active.
}
}
// -------------------------------------------------------------------------------------------------
// gamesnd_load_gameplay_sounds()
//
// Load the ingame sounds into memory
//
void gamesnd_load_gameplay_sounds()
{
int i;
game_snd *gs;
for ( i = 0; i < MAX_GAME_SOUNDS; i++ ) {
gs = &Snds[i];
if ( gs->filename[0] != 0 && stricmp(gs->filename, NOX("none.wav")) ) {
gs->id = snd_load(gs);
}
}
}
// -------------------------------------------------------------------------------------------------
// gamesnd_unload_gameplay_sounds()
//
// Unload the ingame sounds from memory
//
void gamesnd_unload_gameplay_sounds()
{
int i;
game_snd *gs;
for ( i = 0; i < MAX_GAME_SOUNDS; i++ ) {
gs = &Snds[i];
if ( gs->id != -1 ) {
snd_unload( gs->id );
gs->id = -1;
}
}
}
// -------------------------------------------------------------------------------------------------
// gamesnd_load_interface_sounds()
//
// Load the interface sounds into memory
//
void gamesnd_load_interface_sounds()
{
int i;
game_snd *gs;
for ( i = 0; i < MAX_INTERFACE_SOUNDS; i++ ) {
gs = &Snds_iface[i];
if ( gs->filename[0] != 0 && stricmp(gs->filename, NOX("none.wav")) ) {
gs->id = snd_load(gs);
}
}
}
// -------------------------------------------------------------------------------------------------
// gamesnd_unload_interface_sounds()
//
// Unload the interface sounds from memory
//
void gamesnd_unload_interface_sounds()
{
int i;
game_snd *gs;
for ( i = 0; i < MAX_INTERFACE_SOUNDS; i++ ) {
gs = &Snds_iface[i];
if ( gs->id != -1 ) {
snd_unload( gs->id );
gs->id = -1;
gs->id_sig = -1;
}
}
}
// -------------------------------------------------------------------------------------------------
// gamesnd_parse_line()
//
// Parse a sound effect line
//
void gamesnd_parse_line(game_snd *gs, char *tag)
{
int is_3d;
required_string(tag);
stuff_int(&gs->sig);
stuff_string(gs->filename, F_NAME, ",");
if ( !stricmp(gs->filename,NOX("empty")) ) {
gs->filename[0] = 0;
advance_to_eoln(NULL);
return;
}
Mp++;
stuff_int(&gs->preload);
stuff_float(&gs->default_volume);
stuff_int(&is_3d);
if ( is_3d ) {
gs->flags |= GAME_SND_USE_DS3D;
stuff_int(&gs->min);
stuff_int(&gs->max);
}
advance_to_eoln(NULL);
}
// -------------------------------------------------------------------------------------------------
// gamesnd_parse_soundstbl() will parse the sounds.tbl file, and load the specified sounds.
//
//
void gamesnd_parse_soundstbl()
{
int rval;
int num_game_sounds = 0;
int num_iface_sounds = 0;
// open localization
lcl_ext_open();
gamesnd_init_sounds();
if ((rval = setjmp(parse_abort)) != 0) {
Error(LOCATION, "Unable to parse sounds.tbl! Code = %i.\n", rval);
}
else {
read_file_text("sounds.tbl");
reset_parse();
}
// Parse the gameplay sounds section
required_string("#Game Sounds Start");
while (required_string_either("#Game Sounds End","$Name:")) {
Assert( num_game_sounds < MAX_GAME_SOUNDS);
gamesnd_parse_line( &Snds[num_game_sounds], "$Name:" );
num_game_sounds++;
}
required_string("#Game Sounds End");
// Parse the interface sounds section
required_string("#Interface Sounds Start");
while (required_string_either("#Interface Sounds End","$Name:")) {
Assert( num_iface_sounds < MAX_INTERFACE_SOUNDS);
gamesnd_parse_line(&Snds_iface[num_iface_sounds], "$Name:");
num_iface_sounds++;
}
required_string("#Interface Sounds End");
// parse flyby sound section
required_string("#Flyby Sounds Start");
// read 2 terran sounds
gamesnd_parse_line(&Snds_flyby[SPECIES_TERRAN][0], "$Terran:");
gamesnd_parse_line(&Snds_flyby[SPECIES_TERRAN][1], "$Terran:");
// 2 vasudan sounds
gamesnd_parse_line(&Snds_flyby[SPECIES_VASUDAN][0], "$Vasudan:");
gamesnd_parse_line(&Snds_flyby[SPECIES_VASUDAN][1], "$Vasudan:");
gamesnd_parse_line(&Snds_flyby[SPECIES_SHIVAN][0], "$Shivan:");
gamesnd_parse_line(&Snds_flyby[SPECIES_SHIVAN][1], "$Shivan:");
required_string("#Flyby Sounds End");
// close localization
lcl_ext_close();
}
// -------------------------------------------------------------------------------------------------
// gamesnd_init_struct()
//
void gamesnd_init_struct(game_snd *gs)
{
gs->filename[0] = 0;
gs->id = -1;
gs->id_sig = -1;
// gs->is_3d = 0;
// gs->use_ds3d = 0;
gs->flags = 0;
}
// -------------------------------------------------------------------------------------------------
// gamesnd_init_sounds() will initialize the Snds[] and Snds_iface[] arrays
//
void gamesnd_init_sounds()
{
int i;
// init the gameplay sounds
for ( i = 0; i < MAX_GAME_SOUNDS; i++ ) {
gamesnd_init_struct(&Snds[i]);
}
// init the interface sounds
for ( i = 0; i < MAX_INTERFACE_SOUNDS; i++ ) {
gamesnd_init_struct(&Snds_iface[i]);
Snds_iface_handle[i] = -1;
}
}
// callback function for the UI code to call when the mouse first goes over a button.
void common_play_highlight_sound()
{
gamesnd_play_iface(SND_USER_OVER);
}
void gamesnd_play_error_beep()
{
gamesnd_play_iface(SND_GENERAL_FAIL);
}
-574
View File
@@ -1,574 +0,0 @@
/*
* 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/Gamesnd/GameSnd.h $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Routines to keep track of which sound files go where
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 15 9/12/99 8:09p Dave
* Fixed problem where skip-training button would cause mission messages
* not to get paged out for the current mission.
*
* 14 9/09/99 11:40p Dave
* Handle an Assert() in beam code. Added supernova sounds. Play the right
* 2 end movies properly, based upon what the player did in the mission.
*
* 13 8/27/99 11:59a Jefff
* changed some sound names to better reflect new uses
*
* 12 8/26/99 9:45a Dave
* First pass at easter eggs and cheats.
*
* 11 7/19/99 11:47a Jefff
* Added sound hook for countermeasure success
*
* 10 7/02/99 4:31p Dave
* Much more sophisticated lightning support.
*
* 9 7/01/99 11:44a Dave
* Updated object sound system to allow multiple obj sounds per ship.
* Added hit-by-beam sound. Added killed by beam sound.
*
* 8 6/25/99 3:08p Dave
* Multiple flyby sounds.
*
* 7 6/18/99 5:16p Dave
* Added real beam weapon lighting. Fixed beam weapon sounds. Added MOTD
* dialog to PXO screen.
*
* 6 4/19/99 11:01p Dave
* More sophisticated targeting laser support. Temporary checkin.
*
* 5 2/04/99 6:29p Dave
* First full working rev of FS2 PXO support. Fixed Glide lighting
* problems.
*
* 4 1/29/99 12:47a Dave
* Put in sounds for beam weapon. A bunch of interface screens (tech
* database stuff).
*
* 3 10/26/98 9:42a Dave
* Early flak gun support.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 76 5/18/98 12:59a Lawrance
* Replace shockwave impact sound with a new "whoosh" sound that
* originates from the shockwave center
*
* 75 5/06/98 10:29a Dave
* Put in support for panning sounds. Put in new sound hooks for main hall
* 2 intercom sounds.
*
* 74 4/27/98 3:36p Dave
*
* 73 4/25/98 1:25p Lawrance
* Make function for playing generic error beep
*
* 72 4/19/98 9:33p Lawrance
* Added sound hooks for Shivan flyby sound, subspace ambient effect
*
* 71 3/23/98 4:13p Lawrance
* Add hooks for captial ship specific warp sounds
*
* 70 3/21/98 3:34p Lawrance
* Added highlight icon sound, added static sound for briefing cut
*
* 69 3/17/98 5:55p Lawrance
* Support object-linked sounds for asteroids.
*
* 68 3/17/98 3:53p Lawrance
* First pass at weapon flyby sounds
*
* 67 3/16/98 5:54p Lawrance
* Play cargo scanning sound
*
* 66 3/05/98 10:18p Lawrance
* Play voice cue sound when there is no voice file present
*
* 65 2/19/98 4:33p Lawrance
* add asteroid sound hooks
*
* 64 2/12/98 4:59p Lawrance
* Add new sound hooks for subsystem explosions, and subsystems getting
* destroyed
*
* 63 2/11/98 5:32p Dave
* Put in hooks for 3 random intercom sounds in the main hall.
*
* 62 2/06/98 11:33a Dave
* Made sounds customizable through sounds.tbl
*
* 61 2/04/98 6:08p Lawrance
* Add a light collision sound, overlay a shield collide sound if
* applicable.
*
* 60 1/30/98 11:48a John
* Made debris arcs cast light. Added sound effects for them.
*
* 59 1/11/98 11:14p Lawrance
* Preload sounds that we expect will get played.
*
* 58 1/07/98 11:10a Lawrance
* Add new several new sound hooks.
*
* 57 12/24/97 8:54p Lawrance
* Integrating new popup code
*
* 56 12/09/97 11:31a Lawrance
* add missile launch warnings, re-work proximity beep
*
* 55 12/05/97 2:39p Lawrance
* added some different sounds to main hall, add support for looping
* ambient sounds
*
* 54 12/03/97 4:58p Hoffoss
*
* 53 12/03/97 4:16p Hoffoss
* Changed sound stuff used in interface screens for interface purposes.
*
* 52 12/01/97 5:25p Hoffoss
* Routed interface sound playing through a special function that will
* only allow one instance of the sound to play at a time, avoiding
* over-mixing problems.
*
* 51 11/20/97 5:36p Dave
* Hooked in a bunch of main hall changes (including sound). Made it
* possible to reposition (rewind/ffwd)
* sound buffer pointers. Fixed animation direction change framerate
* problem.
*
* 50 11/11/97 10:25p Lawrance
* add sound hook for when missile threat flashes
*
* 49 11/03/97 11:08p Lawrance
* Add sound for collisions with shields.
*
* 48 11/03/97 2:07p Lawrance
* add ship-to-ship collision sound
*
* 47 10/28/97 4:49p Lawrance
* add sound hook that gets played when player warps out
*
* 46 10/27/97 10:48p Lawrance
* add second explosion sound
*
* 45 10/11/97 6:39p Lawrance
* added sound hooks for static sound
*
* 44 10/10/97 7:45p Lawrance
* add warp fail sound
*
* 43 9/19/97 2:45p Lawrance
* add hook for weapon animation sound
*
* 42 9/12/97 4:02p John
* put in ship warp out effect.
* put in dynamic lighting for warp in/out
*
* 41 9/07/97 10:01p Lawrance
* add some interface hooks
*
* 40 9/05/97 4:59p Lawrance
* added warp sound hook
*
* 39 9/03/97 5:05p Lawrance
* add support for ship flyby sound
*
* 38 8/25/97 12:25a Lawrance
* added sound for when shield energy is transferred between quadrants
*
* 37 8/18/97 5:28p Lawrance
* added some new interface sounds
*
* 36 8/12/97 5:52p Lawrance
* added hook for lock warning from aspect missile
*
* 35 8/11/97 9:48p Lawrance
* add sound hook for swarm missile
*
* 34 8/06/97 10:27a Lawrance
* added hook for shockwave create sound
*
* 33 7/17/97 10:50a Lawrance
* create a Shivan light laser so sound can be assigned
*
* 32 6/24/97 11:47p Lawrance
* add briefing sound fx
*
* 31 6/24/97 3:14p Lawrance
* add briefing sounds
*
* 30 6/13/97 4:44p Lawrance
* added another sound hook in ship selection
*
* 29 6/12/97 5:15p Lawrance
* added hook for ambient sound in briefing/ship select
*
* 28 6/05/97 11:25a Lawrance
* use sound signatures to ensure correct sound is loaded
*
* 27 6/05/97 1:07a Lawrance
* changes to support sound interface
*
* 26 6/04/97 1:18p Lawrance
* added hooks for shield impacts
*
* 25 5/23/97 11:20a Lawrance
* counter measure sounds specified in weapons.tbl
*
* 24 5/22/97 12:04p Lawrance
* added soundhook for cmeasure cycle
*
* 23 5/16/97 11:33a Lawrance
* add countermeasures and rearm sounds
*
* 22 5/14/97 11:24a Lawrance
* break up docking sound effect into an approach/depart and attach/detach
*
* 21 5/14/97 11:09a Lawrance
* add hooks for sounds played when player is hit by lasers or missiles
*
* 20 5/14/97 9:54a Lawrance
* supporting mission-specific briefing music
*
* 19 5/13/97 3:09p Lawrance
* added repair/rearm sound
*
* 18 5/13/97 10:44a Lawrance
* add several new sound effects
*
* 17 5/12/97 11:58a Lawrance
* removed obsolete sound
*
* 16 5/06/97 2:12p Lawrance
* rearrange order of sounds
*
* 15 5/06/97 9:36a Lawrance
* added support for min and max distances for 3d sounds
*
* 14 4/23/97 5:19p Lawrance
* split up misc sounds into: gamewide, ingame, and interface
*
* 13 4/20/97 11:48a Lawrance
* added array of filenames for misc sounds. Will be useful if we want to
* unload then re-load sounds
*
* 12 4/18/97 2:54p Lawrance
* sounds now have a default volume, when playing, pass a scaling factor
* not the actual volume
*
* 11 4/15/97 2:49p Lawrance
* add new sounds
*
* 10 3/26/97 11:27a Lawrance
* added hooks for sounds to be played when trying to fire missles when
* none left / trying to fire lasers with no energy
*
* 9 3/19/97 5:53p Lawrance
* integrating new Misc_sounds[] array (replaces old Game_sounds
* structure)
*
* 8 3/17/97 3:47p Mike
* Homing missile lock sound.
* More on AI ships firing missiles.
*
* 7 3/10/97 8:54a Lawrance
* added gamesnd_init_looping_sounds()
*
* 6 2/28/97 8:41a Lawrance
* added afterburner engage and burn sounds
*
* 5 2/14/97 12:37a Lawrance
* added hooks to play docking/undocking sounds
*
* 4 2/13/97 12:03p Lawrance
* hooked in throttle sounds
*
* 3 2/05/97 10:35a Lawrance
* supporting spooled music at menus, briefings, credits etc.
*
* 2 1/20/97 7:58p John
* Fixed some link errors with testcode.
*
* 1 1/20/97 7:08p John
*
* $NoKeywords: $
*/
#ifndef __GAMESND_H__
#define __GAMESND_H__
#include "sound.h"
#include "missionparse.h"
void gamesnd_parse_soundstbl(); // Loads in general game sounds from sounds.tbl
void gamesnd_init_sounds(); // initializes the Snds[] and Snds_iface[] array
void gamesnd_load_gameplay_sounds();
void gamesnd_unload_gameplay_sounds();
void gamesnd_load_interface_sounds();
void gamesnd_unload_interface_sounds();
void gamesnd_preload_common_sounds();
void gamesnd_play_iface(int n);
void gamesnd_play_error_beep();
void common_play_highlight_sound(); // called from interface code
// Misc_sounds[] holds handles for misc sounds in the game (list appears in sounds.tbl)
#define MAX_GAME_SOUNDS 200
#define MAX_INTERFACE_SOUNDS 70
#define MAX_SPECIES_FLYBY_SOUNDS 4 // 4 different possible flybys for species
extern game_snd Snds[MAX_GAME_SOUNDS];
extern game_snd Snds_iface[MAX_INTERFACE_SOUNDS];
// flyby sounds - 2 for each species (fighter and bomber flybys)
extern game_snd Snds_flyby[MAX_SPECIES_NAMES][2];
// symbolic names for misc. game sounds. The order here must match the order in
// sounds.tbl
//
// INSTRUCTIONS FOR ADDING A NEW SOUND:
//
// Add interface (ie non-gameplay) sounds to the end of the interface list of sounds.
// Add gameplay sounds to the correct portion of the gameplay sounds section (ie Misc,
// Weapons, or Ship).
//
// Then add a symbolic name to the appropriate position in the #define list below
// and add an entry to sounds.tbl. If there is no .wav file for the sound yet,
// specify sound_hook.wav in sounds.tbl.
//
//
//---------------------------------------------------
// Misc Sounds
//---------------------------------------------------
#define SND_MISSILE_TRACKING 0
#define SND_MISSILE_LOCK 1
#define SND_PRIMARY_CYCLE 2
#define SND_SECONDARY_CYCLE 3
#define SND_ENGINE 4
#define SND_CARGO_REVEAL 5
#define SND_DEATH_ROLL 6
#define SND_SHIP_EXPLODE_1 7
#define SND_TARGET_ACQUIRE 8
#define SND_ENERGY_ADJUST 9
#define SND_ENERGY_ADJUST_FAIL 10
#define SND_ENERGY_TRANS 11
#define SND_ENERGY_TRANS_FAIL 12
#define SND_FULL_THROTTLE 13
#define SND_ZERO_THROTTLE 14
#define SND_THROTTLE_UP 15
#define SND_THROTTLE_DOWN 16
#define SND_DOCK_APPROACH 17
#define SND_DOCK_ATTACH 18
#define SND_DOCK_DETACH 19
#define SND_DOCK_DEPART 20
#define SND_ABURN_ENGAGE 21
#define SND_ABURN_LOOP 22
#define SND_VAPORIZED 23
#define SND_ABURN_FAIL 24
#define SND_HEATLOCK_WARN 25
#define SND_OUT_OF_MISSLES 26
#define SND_OUT_OF_WEAPON_ENERGY 27
#define SND_TARGET_FAIL 28
#define SND_SQUADMSGING_ON 29
#define SND_SQUADMSGING_OFF 30
#define SND_DEBRIS 31
#define SND_SUBSYS_DIE_1 32
#define SND_MISSILE_START_LOAD 33
#define SND_MISSILE_LOAD 34
#define SND_SHIP_REPAIR 35
#define SND_PLAYER_HIT_LASER 36
#define SND_PLAYER_HIT_MISSILE 37
#define SND_CMEASURE_CYCLE 38
#define SND_SHIELD_HIT 39
#define SND_SHIELD_HIT_YOU 40
#define SND_GAME_MOUSE_CLICK 41
#define SND_ASPECTLOCK_WARN 42
#define SND_SHIELD_XFER_OK 43
#define SND_ENGINE_WASH 44
#define SND_WARP_IN 45
#define SND_WARP_OUT 46 // Same as warp in for now
#define SND_PLAYER_WARP_FAIL 47
#define SND_STATIC 48
#define SND_SHIP_EXPLODE_2 49
#define SND_PLAYER_WARP_OUT 50
#define SND_SHIP_SHIP_HEAVY 51
#define SND_SHIP_SHIP_LIGHT 52
#define SND_SHIP_SHIP_SHIELD 53
#define SND_THREAT_FLASH 54
#define SND_PROXIMITY_WARNING 55
#define SND_PROXIMITY_ASPECT_WARNING 56
#define SND_DIRECTIVE_COMPLETE 57
#define SND_SUBSYS_EXPLODE 58
#define SND_CAPSHIP_EXPLODE 59
#define SND_CAPSHIP_SUBSYS_EXPLODE 60
#define SND_LARGESHIP_WARPOUT 61
#define SND_ASTEROID_EXPLODE_BIG 62
#define SND_ASTEROID_EXPLODE_SMALL 63
#define SND_CUE_VOICE 64
#define SND_END_VOICE 65
#define SND_CARGO_SCAN 66
#define SND_WEAPON_FLYBY 67
#define SND_ASTEROID 68
#define SND_CAPITAL_WARP_IN 69
#define SND_CAPITAL_WARP_OUT 70
#define SND_ENGINE_LOOP_LARGE 71
#define SND_SUBSPACE_LEFT_CHANNEL 72
#define SND_SUBSPACE_RIGHT_CHANNEL 73
#define SND_MISSILE_EVADED_POPUP 74
#define SND_ENGINE_LOOP_HUGE 75
// Weapon sounds
#define SND_LIGHT_LASER_FIRE 76
#define SND_LIGHT_LASER_IMPACT 77
#define SND_HVY_LASER_FIRE 78
#define SND_HVY_LASER_IMPACT 79
#define SND_MASSDRV_FIRED 80
#define SND_MASSDRV_IMPACT 81
#define SND_FLAIL_FIRED 82
#define SND_FLAIL_IMPACT 83
#define SND_NEUTRON_FLUX_FIRED 84
#define SND_NEUTRON_FLUX_IMPACT 85
#define SND_DEBUG_LASER_FIRED 86
#define SND_ROCKEYE_FIRED 87
#define SND_MISSILE_IMPACT1 88
#define SND_MAG_MISSILE_LAUNCH 89
#define SND_FURY_MISSILE_LAUNCH 90
#define SND_SHRIKE_MISSILE_LAUNCH 91
#define SND_ANGEL_MISSILE_LAUNCH 92
#define SND_CLUSTER_MISSILE_LAUNCH 93
#define SND_CLUSTERB_MISSILE_LAUNCH 94
#define SND_STILETTO_MISSILE_LAUNCH 95
#define SND_TSUNAMI_MISSILE_LAUNCH 96
#define SND_HARBINGER_MISSILE_LAUNCH 97
#define SND_MEGAWOKKA_MISSILE_LAUNCH 98
#define SND_CMEASURE1_LAUNCH 99
#define SND_SHIVAN_LIGHT_LASER_FIRE 100
#define SND_SHOCKWAVE_EXPLODE 101
#define SND_SWARM_MISSILE_LAUNCH 102
#define SND_SHOCKWAVE_IMPACT 109
#define SND_TARG_LASER_LOOP 115
#define SND_FLAK_FIRE 116
#define SND_SHIELD_BREAKER 117
#define SND_EMP_MISSILE 118
#define SND_AUTOCANNON_LOOP 119
#define SND_AUTOCANNON_SHOT 120
#define SND_BEAM_LOOP 121
#define SND_BEAM_UP 122
#define SND_BEAM_DOWN 123
#define SND_BEAM_SHOT 124
#define SND_BEAM_VAPORIZE 125
// Ship engine sounds
#define SND_TERRAN_FIGHTER_ENG 126
#define SND_TERRAN_BOMBER_ENG 127
#define SND_TERRAN_CAPITAL_ENG 128
#define SND_SPECIESB_FIGHTER_ENG 129
#define SND_SPECIESB_BOMBER_ENG 130
#define SND_SPECIESB_CAPITAL_ENG 131
#define SND_SHIVAN_FIGHTER_ENG 132
#define SND_SHIVAN_BOMBER_ENG 133
#define SND_SHIVAN_CAPITAL_ENG 134
#define SND_REPAIR_SHIP_ENG 135
// Debris electric arcing sounds
#define SND_DEBRIS_ARC_01 139 // 0.10 second spark sound effect (3d sound)
#define SND_DEBRIS_ARC_02 140 // 0.25 second spark sound effect (3d sound)
#define SND_DEBRIS_ARC_03 141 // 0.50 second spark sound effect (3d sound)
#define SND_DEBRIS_ARC_04 142 // 0.75 second spark sound effect (3d sound)
#define SND_DEBRIS_ARC_05 143 // 1.00 second spark sound effect (3d sound)
// copilot
#define SND_COPILOT 162
// supernova 1 and supernova 2
#define SND_SUPERNOVA_1 173
#define SND_SUPERNOVA_2 174
// lightning sounds
#define SND_LIGHTNING_1 180
#define SND_LIGHTNING_2 181
//---------------------------------------------------
// Interface sounds
//---------------------------------------------------
#define SND_IFACE_MOUSE_CLICK 0
#define SND_ICON_PICKUP 1
#define SND_ICON_DROP_ON_WING 2
#define SND_ICON_DROP 3
#define SND_SCREEN_MODE_PRESSED 4
#define SND_SWITCH_SCREENS 5
#define SND_HELP_PRESSED 6
#define SND_COMMIT_PRESSED 7
#define SND_PREV_NEXT_PRESSED 8
#define SND_SCROLL 9
#define SND_GENERAL_FAIL 10
#define SND_SHIP_ICON_CHANGE 11
#define SND_MAIN_HALL_AMBIENT 12
#define SND_BTN_SLIDE 13
#define SND_BRIEF_STAGE_CHG 14
#define SND_BRIEF_STAGE_CHG_FAIL 15
#define SND_BRIEF_ICON_SELECT 16
#define SND_USER_OVER 17
#define SND_USER_SELECT 18
#define SND_RESET_PRESSED 19
#define SND_BRIEF_TEXT_WIPE 20
#define SND_VASUDAN_PA_1 21 // vasudan pa 1
#define SND_WEAPON_ANIM_START 22
#define SND_MAIN_HALL_DOOR_OPEN 23
#define SND_MAIN_HALL_DOOR_CLOSE 24
#define SND_GLOW_OPEN 25
#define SND_VASUDAN_PA_2 26 // vasudan pa 2
#define SND_AMBIENT_MENU 27
#define SND_POPUP_APPEAR 28
#define SND_POPUP_DISAPPEAR 29
#define SND_VOICE_SLIDER_CLIP 30
#define SND_VASUDAN_PA_3 31 // vasudan pa 3
#define SND_MAIN_HALL_GET_PEPSI 32
#define SND_MAIN_HALL_LIFT_UP 33
#define SND_MAIN_HALL_WELD1 34
#define SND_MAIN_HALL_WELD2 35
#define SND_MAIN_HALL_WELD3 36
#define SND_MAIN_HALL_WELD4 37
#define SND_MAIN_HALL_INT1 38 // random intercom message 1
#define SND_MAIN_HALL_INT2 39 // random intercom message 2
#define SND_MAIN_HALL_INT3 40 // random intercom message 3
#define SND_ICON_HIGHLIGHT 41
#define SND_BRIEFING_STATIC 42
#define SND_MAIN_HALL2_CRANE1_1 43
#define SND_MAIN_HALL2_CRANE1_2 44
#define SND_MAIN_HALL2_CRANE2_1 45
#define SND_MAIN_HALL2_CRANE2_2 46
#define SND_MAIN_HALL2_CAR1 47
#define SND_MAIN_HALL2_CAR2 48
#define SND_MAIN_HALL2_INT1 49
#define SND_MAIN_HALL2_INT2 50
#define SND_MAIN_HALL2_INT3 51
#define SND_VASUDAN_BUP 61
#endif /* __GAMESND_H__ */
-97
View File
@@ -1,97 +0,0 @@
/*
** Copyright (c) 1995, 3Dfx Interactive, Inc.
** All Rights Reserved.
**
*/
#ifndef __3DFX_H__
#define __3DFX_H__
/*
** basic data types
*/
typedef unsigned char FxU8;
typedef signed char FxI8;
typedef unsigned short FxU16;
typedef signed short FxI16;
typedef signed long FxI32;
typedef unsigned long FxU32;
typedef int FxBool;
typedef float FxFloat;
typedef double FxDouble;
/*
** color types
*/
typedef unsigned long FxColor_t;
typedef struct { float r, g, b, a; } FxColor4;
/*
** fundamental types
*/
#define FXTRUE 1
#define FXFALSE 0
/*
** helper macros
*/
#define FXUNUSED( a ) ( (a) = (a) )
#define FXBIT( i ) ( 1L << (i) )
/*
** export macros
*/
#if defined(__MSC__)
#if defined (MSVC16)
#define FX_ENTRY
#define FX_CALL
#else
#define FX_ENTRY extern
#define FX_CALL __stdcall
#endif
#elif defined(__WATCOMC__)
#define FX_ENTRY extern
#define FX_CALL __stdcall
#elif defined (__IBMC__) || defined (__IBMCPP__)
/* IBM Visual Age C/C++: */
#define FX_ENTRY extern
#define FX_CALL __stdcall
#elif defined(__DJGPP__)
#define FX_ENTRY extern
#define FX_CALL
#elif defined(__unix__)
#define FX_ENTRY extern
#define FX_CALL
#else
#warning define FX_ENTRY & FX_CALL for your compiler
#define FX_ENTRY extern
#define FX_CALL
#endif
/*
** x86 compiler specific stuff
*/
#if defined(__BORLANDC_)
# define REALMODE
# define REGW( a, b ) ((a).x.b)
# define REGB( a, b ) ((a).h.b)
# define INT86( a, b, c ) int86(a,b,c)
# define INT86X( a, b, c, d ) int86x(a,b,c,d)
# define RM_SEG( a ) FP_SEG( a )
# define RM_OFF( a ) FP_OFF( a )
#elif defined(__WATCOMC__)
# undef FP_SEG
# undef FP_OFF
# define REGW( a, b ) ((a).w.b)
# define REGB( a, b ) ((a).h.b)
# define INT86( a, b, c ) int386(a,b,c)
# define INT86X( a, b, c, d ) int386x(a,b,c,d)
# define RM_SEG( a ) ( ( ( ( FxU32 ) (a) ) & 0x000F0000 ) >> 4 )
# define RM_OFF( a ) ( ( FxU16 ) (a) )
#endif
#endif /* !__3DFX_H__ */
-111
View File
@@ -1,111 +0,0 @@
/*
** Copyright (c) 1995, 1996, 3Dfx Interactive, Inc.
** All Rights Reserved.
**
*/
/* preprocessor defines for libraries to support DLL creation */
/* in header file, use FX_ENTRY return-type FX_CALL function-name ( ... ) */
/* in source file, use FX_EXPORT return-type FX_CSTYLE function-name (... ) */
/* in source file, set FX_DLL_DEFINITION, include this file, then include
header file for library. */
/* we need to use two macros per declaration/definition because MSVC
requires __stdcall and __declspec( dllexport ) be in different parts
of the prototype! */
/* I use two sets in case we need to control declarations and definitions
differently. If it turns out we don't, it should be easy to do a search
and replace to eliminate one set */
/* NOTE: this header file may be included more than once, and FX_DLL_DEFINITION
may have changed, so we do not protect this with an #fndef __FXDLL_H__
statement like we normally would. */
#ifdef FX_ENTRY
#undef FX_ENTRY
#endif
#ifdef FX_CALL
#undef FX_CALL
#endif
#ifdef FX_EXPORT
#undef FX_EXPORT
#endif
#ifdef FX_CSTYLE
#undef FX_CSTYLE
#endif
#if defined(FX_DLL_DEFINITION)
#if defined(FX_DLL_ENABLE)
#if defined(__MSC__)
#ifndef KERNEL
#define FX_ENTRY __declspec( dllexport )
#define FX_EXPORT __declspec( dllexport )
#else
#define FX_ENTRY
#define FX_EXPORT
#endif /* #ifndef KERNEL */
#define FX_CALL __stdcall
#define FX_CSTYLE __stdcall
#elif defined(__WATCOMC__)
#define FX_ENTRY
#define FX_CALL __stdcall __export
#define FX_EXPORT
#define FX_CSTYLE __stdcall __export
#else /* compiler */
#error define FX_ENTRY,FX_CALL & FX_EXPORT,FX_CSTYLE for your compiler
#endif /* compiler */
#else /* FX_DLL_ENABLE */
#define FX_ENTRY
#define FX_CALL __stdcall
#define FX_EXPORT
#define FX_CSTYLE __stdcall
#endif /* FX_DLL_ENABLE */
#else /* FX_DLL_DEFINITION */
#define FX_ENTRY extern
#define FX_CALL __stdcall
#endif /* FX_DLL_DEFINITION */
/*
* We don't want any of this DLL junk for DJGPP or UNIX
* so undo what is done above.
*/
#if defined(__DJGPP__) || defined(__unix__)
#ifdef FX_CALL
#undef FX_CALL
#endif
#ifdef FX_CSTYLE
#undef FX_CSTYLE
#endif
#ifdef FX_EXPORT
#undef FX_EXPORT
#endif
#ifdef FX_ENTRY
#undef FX_ENTRY
#endif
#define FX_CALL
#define FX_CSTYLE
#define FX_EXPORT
#define FX_ENTRY
#endif
#if defined (MSVC16)
#undef FX_CALL
#define FX_CALL
#endif
-19
View File
@@ -1,19 +0,0 @@
/*
** Copyright (c) 1995, 3Dfx Interactive, Inc.
** All Rights Reserved.
**
**
** $ Revision: $
** $ Date: $
**
*/
#ifndef _FXGLOB_H_
#define _FXGLOB_H_
void fxGlobify( int *argc, char ***argv );
#endif
-38
View File
@@ -1,38 +0,0 @@
/*
** Copyright (c) 1995, 3Dfx Interactive, Inc.
** All Rights Reserved.
**
** $ Revision: $
** $ Date: $
**
*/
#ifndef _FXOS_H_
#define _FXOS_H_
#include <stdio.h>
# ifdef __cplusplus
extern "C" {
# endif
# ifdef WIN32
void sleep(int secs);
#define gethostname fxGethostname
int gethostname(char *name, int namelen);
# endif
float fxTime(void);
float timer(int flag);
FILE *fxFopenPath(const char *filename, const char *mode,
const char *path, const char **pprefix);
# ifdef __cplusplus
}
# endif
#endif
-455
View File
@@ -1,455 +0,0 @@
/*
* $Logfile: /Freespace2/code/glide/Glide.cpp $
* $Revision: 1.1 $
* $Date: 2002-06-03 03:25:57 $
* $Author: penguin $
*
* Code for dynamically loading glide libraries
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2002/05/02 18:03:07 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 3 11/11/98 5:37p Dave
* Checkin for multiplayer testing.
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 4 3/18/98 1:57p John
* Made non-perspective correct textures do 2d clipping before rendering.
*
* 3 2/21/98 11:58a John
* Put in some stuff to externalize strings
*
* 2 2/19/98 6:13p John
* Made Glide do texturing & zbuffering.
*
* 1 1/05/98 10:38a John
*
* $NoKeywords: $
*/
#define __MSC__
#include <windows.h>
#include <windowsx.h>
#include "glide.h"
#include "pstypes.h"
static HMODULE Glide_lib_handle;
void vglide_close()
{
if ( Glide_lib_handle ) {
FreeLibrary(Glide_lib_handle);
Glide_lib_handle = NULL;
}
}
// Returns 1 if Glide found, else 0 if not
int vglide_init()
{
HMODULE lib_handle;
Glide_lib_handle = LoadLibrary(NOX("glide2x.dll"));
if (Glide_lib_handle == NULL) {
//No lib so no glide
return 0;
}
lib_handle = Glide_lib_handle;
//XSTR:OFF
grDrawLine = (void (__stdcall*)(const GrVertex *, const GrVertex *))GetProcAddress(lib_handle, "_grDrawLine@8");
grDrawPlanarPolygon = (void (__stdcall *)(int,const int [],const GrVertex []))GetProcAddress(lib_handle, "_grDrawPlanarPolygon@12");
grDrawPlanarPolygonVertexList = (void (__stdcall *)(int,const GrVertex []))GetProcAddress(lib_handle, "_grDrawPlanarPolygonVertexList@8");
grDrawPoint = (void (__stdcall *)(const GrVertex *))GetProcAddress(lib_handle, "_grDrawPoint@4");
grDrawPolygon = (void (__stdcall *)(int,const int [],const GrVertex []))GetProcAddress(lib_handle, "_grDrawPolygon@12");
grDrawPolygonVertexList = (void (__stdcall *)(int,const GrVertex []))GetProcAddress(lib_handle, "_grDrawPolygonVertexList@8");
grDrawTriangle = (void (__stdcall *)(const GrVertex *,const GrVertex *,const GrVertex *))GetProcAddress(lib_handle, "_grDrawTriangle@12");
guDrawTriangleWithClip = (void (__stdcall *)(const GrVertex *,const GrVertex *,const GrVertex *))GetProcAddress(lib_handle, "_guDrawTriangleWithClip@12");
grBufferClear = (void (__stdcall *)(unsigned long,unsigned char,unsigned short))GetProcAddress(lib_handle, "_grBufferClear@12");
grBufferNumPending = GetProcAddress(lib_handle, "_grBufferNumPending@0");
grBufferSwap = (void (__stdcall *)(int))GetProcAddress(lib_handle, "_grBufferSwap@4");
grRenderBuffer = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grRenderBuffer@4");
grErrorSetCallback = (void (__stdcall *)(void (__cdecl *)(const char *,int)))GetProcAddress(lib_handle, "_grErrorSetCallback@4");
grSstIdle = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstIdle@0");
grSstVideoLine = (unsigned long (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstVideoLine@0");
grSstVRetraceOn = (int (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstVRetraceOn@0");
grSstIsBusy = (int (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstIsBusy@0");
grSstWinOpen = (int (__stdcall *)(unsigned long,long,long,long,long,int,int))GetProcAddress(lib_handle, "_grSstWinOpen@28");
grSstWinClose = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstWinClose@0");
grSstControl = (int (__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_grSstControl@4");
grSstQueryHardware = (int (__stdcall *)(GrHwConfiguration *))GetProcAddress(lib_handle, "_grSstQueryHardware@4");
grSstQueryBoards = (int (__stdcall *)(GrHwConfiguration *))GetProcAddress(lib_handle, "_grSstQueryBoards@4");
grSstOrigin = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grSstOrigin@4");
grSstSelect = (void (__stdcall *)(int))GetProcAddress(lib_handle, "_grSstSelect@4");
grSstScreenHeight = (unsigned long (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstScreenHeight@0");
grSstScreenWidth = (unsigned long (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstScreenWidth@0");
grSstStatus = (unsigned long (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstStatus@0");
grSstPerfStats = (void (__stdcall *)(struct GrSstPerfStats_s *))GetProcAddress(lib_handle, "_grSstPerfStats@4");
grSstResetPerfStats = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grSstResetPerfStats@0");
grResetTriStats = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grResetTriStats@0");
grTriStats = (void (__stdcall *)(unsigned long *,unsigned long *))GetProcAddress(lib_handle, "_grTriStats@8");
grAlphaBlendFunction = (void (__stdcall *)(long,long,long,long))GetProcAddress(lib_handle, "_grAlphaBlendFunction@16");
grAlphaCombine = (void (__stdcall *)(long,long,long,long,int))GetProcAddress(lib_handle, "_grAlphaCombine@20");
grAlphaControlsITRGBLighting = (void (__stdcall *)(int))GetProcAddress(lib_handle, "_grAlphaControlsITRGBLighting@4");
grAlphaTestFunction = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grAlphaTestFunction@4");
grAlphaTestReferenceValue = (void (__stdcall *)(unsigned char))GetProcAddress(lib_handle, "_grAlphaTestReferenceValue@4");
grChromakeyMode = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grChromakeyMode@4");
grChromakeyValue = (void (__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_grChromakeyValue@4");
grClipWindow = (void (__stdcall *)(unsigned long,unsigned long,unsigned long,unsigned long))GetProcAddress(lib_handle, "_grClipWindow@16");
grColorCombine = (void (__stdcall *)(long,long,long,long,int))GetProcAddress(lib_handle, "_grColorCombine@20");
grColorMask = (void (__stdcall *)(int,int))GetProcAddress(lib_handle, "_grColorMask@8");
grCullMode = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grCullMode@4");
grConstantColorValue = (void (__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_grConstantColorValue@4");
grConstantColorValue4 = (void (__stdcall *)(float,float,float,float))GetProcAddress(lib_handle, "_grConstantColorValue4@16");
grDepthBiasLevel = (void (__stdcall *)(short))GetProcAddress(lib_handle, "_grDepthBiasLevel@4");
grDepthBufferFunction = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grDepthBufferFunction@4");
grDepthBufferMode = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grDepthBufferMode@4");
grDepthMask = (void (__stdcall *)(int))GetProcAddress(lib_handle, "_grDepthMask@4");
grDisableAllEffects = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grDisableAllEffects@0");
grDitherMode = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grDitherMode@4");
grFogColorValue = (void (__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_grFogColorValue@4");
grFogMode = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grFogMode@4");
grFogTable = (void (__stdcall *)(const unsigned char []))GetProcAddress(lib_handle, "_grFogTable@4");
grGammaCorrectionValue = (void (__stdcall *)(float))GetProcAddress(lib_handle, "_grGammaCorrectionValue@4");
grSplash = (void (__stdcall *)(float,float,float,float,unsigned long))GetProcAddress(lib_handle, "_grSplash@20");
grTexCalcMemRequired = (unsigned long (__stdcall *)(long,long,long,long))GetProcAddress(lib_handle, "_grTexCalcMemRequired@16");
grTexTextureMemRequired = (unsigned long (__stdcall *)(unsigned long,GrTexInfo *))GetProcAddress(lib_handle, "_grTexTextureMemRequired@8");
grTexMinAddress = (unsigned long (__stdcall *)(long))GetProcAddress(lib_handle, "_grTexMinAddress@4");
grTexMaxAddress = (unsigned long (__stdcall *)(long))GetProcAddress(lib_handle, "_grTexMaxAddress@4");
grTexNCCTable = (void (__stdcall *)(long,unsigned long))GetProcAddress(lib_handle, "_grTexNCCTable@8");
grTexSource = (void (__stdcall *)(long,unsigned long,unsigned long,GrTexInfo *))GetProcAddress(lib_handle, "_grTexSource@16");
grTexClampMode = (void (__stdcall *)(long,long,long))GetProcAddress(lib_handle, "_grTexClampMode@12");
grTexCombine = (void (__stdcall *)(long,long,long,long,long,int,int))GetProcAddress(lib_handle, "_grTexCombine@28");
grTexCombineFunction = (void (__stdcall *)(long,long))GetProcAddress(lib_handle, "_grTexCombineFunction@8");
grTexDetailControl = (void (__stdcall *)(long,int,unsigned char,float))GetProcAddress(lib_handle, "_grTexDetailControl@16");
grTexFilterMode = (void (__stdcall *)(long,long,long))GetProcAddress(lib_handle, "_grTexFilterMode@12");
grTexLodBiasValue = (void (__stdcall *)(long,float))GetProcAddress(lib_handle, "_grTexLodBiasValue@8");
grTexDownloadMipMap = (void (__stdcall *)(long,unsigned long,unsigned long,GrTexInfo *))GetProcAddress(lib_handle, "_grTexDownloadMipMap@16");
grTexDownloadMipMapLevel = (void (__stdcall *)(long,unsigned long,long,long,long,long,unsigned long,void *))GetProcAddress(lib_handle, "_grTexDownloadMipMapLevel@32");
grTexDownloadMipMapLevelPartial = (void (__stdcall *)(long,unsigned long,long,long,long,long,unsigned long,void *,int,int))GetProcAddress(lib_handle, "_grTexDownloadMipMapLevelPartial@40");
ConvertAndDownloadRle = (void (__stdcall *)(long,unsigned long,long,long,long,long,unsigned long,unsigned char *,long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned short *))GetProcAddress(lib_handle, "_ConvertAndDownloadRle@64");
grCheckForRoom = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grCheckForRoom@4");
grTexDownloadTable = (void (__stdcall *)(long,unsigned long,void *))GetProcAddress(lib_handle, "_grTexDownloadTable@12");
grTexDownloadTablePartial = (void (__stdcall *)(long,unsigned long,void *,int,int))GetProcAddress(lib_handle, "_grTexDownloadTablePartial@20");
grTexMipMapMode = (void (__stdcall *)(long,long,int))GetProcAddress(lib_handle, "_grTexMipMapMode@12");
grTexMultibase = (void (__stdcall *)(long,int))GetProcAddress(lib_handle, "_grTexMultibase@8");
grTexMultibaseAddress = (void (__stdcall *)(long,unsigned long,unsigned long,unsigned long,GrTexInfo *))GetProcAddress(lib_handle, "_grTexMultibaseAddress@20");
guTexAllocateMemory = (unsigned long (__stdcall *)(long,unsigned char,int,int,long,long,long,long,long,long,long,long,long,float,int))GetProcAddress(lib_handle, "_guTexAllocateMemory@60");
guTexChangeAttributes = (int (__stdcall *)(unsigned long,int,int,long,long,long,long,long,long,long,long,long))GetProcAddress(lib_handle, "_guTexChangeAttributes@48");
guTexCombineFunction = (void (__stdcall *)(long,long))GetProcAddress(lib_handle, "_guTexCombineFunction@8");
guTexGetCurrentMipMap = (unsigned long (__stdcall *)(long))GetProcAddress(lib_handle, "_guTexGetCurrentMipMap@4");
guTexGetMipMapInfo = (GrMipMapInfo *(__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_guTexGetMipMapInfo@4");
guTexMemQueryAvail = (unsigned long (__stdcall *)(long))GetProcAddress(lib_handle, "_guTexMemQueryAvail@4");
guTexMemReset = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_guTexMemReset@0");
guTexDownloadMipMap = (void (__stdcall *)(unsigned long,const void *,const GuNccTable *))GetProcAddress(lib_handle, "_guTexDownloadMipMap@12");
guTexDownloadMipMapLevel = (void (__stdcall *)(unsigned long,long,const void ** ))GetProcAddress(lib_handle, "_guTexDownloadMipMapLevel@12");
guTexSource = (void (__stdcall *)(unsigned long))GetProcAddress(lib_handle, "_guTexSource@4");
guColorCombineFunction = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_guColorCombineFunction@4");
grLfbLock = (int (__stdcall *)(unsigned long,long,long,long,int,GrLfbInfo_t *))GetProcAddress(lib_handle, "_grLfbLock@24");
grLfbUnlock = (int (__stdcall *)(unsigned long,long))GetProcAddress(lib_handle, "_grLfbUnlock@8");
grLfbConstantAlpha = (void (__stdcall *)(unsigned char))GetProcAddress(lib_handle, "_grLfbConstantAlpha@4");
grLfbConstantDepth = (void (__stdcall *)(unsigned short))GetProcAddress(lib_handle, "_grLfbConstantDepth@4");
grLfbWriteColorSwizzle = (void (__stdcall *)(int,int))GetProcAddress(lib_handle, "_grLfbWriteColorSwizzle@8");
grLfbWriteColorFormat = (void (__stdcall *)(long))GetProcAddress(lib_handle, "_grLfbWriteColorFormat@4");
grLfbWriteRegion = (int (__stdcall *)(long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,long,void *))GetProcAddress(lib_handle, "_grLfbWriteRegion@32");
grLfbReadRegion = (int (__stdcall *)(long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,void *))GetProcAddress(lib_handle, "_grLfbReadRegion@28");
grAADrawLine = (void (__stdcall *)(const GrVertex *,const GrVertex *))GetProcAddress(lib_handle, "_grAADrawLine@8");
grAADrawPoint = (void (__stdcall *)(const GrVertex *))GetProcAddress(lib_handle, "_grAADrawPoint@4");
grAADrawPolygon = (void (__stdcall *)(const int,const int [],const GrVertex []))GetProcAddress(lib_handle, "_grAADrawPolygon@12");
grAADrawPolygonVertexList = (void (__stdcall *)(const int,const GrVertex []))GetProcAddress(lib_handle, "_grAADrawPolygonVertexList@8");
grAADrawTriangle = (void (__stdcall *)(const GrVertex *,const GrVertex *,const GrVertex *,int,int,int))GetProcAddress(lib_handle, "_grAADrawTriangle@24");
grGlideInit = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grGlideInit@0");
grGlideShutdown = (void (__stdcall *)(void))GetProcAddress(lib_handle, "_grGlideShutdown@0");
grGlideGetVersion = (void (__stdcall *)(char []))GetProcAddress(lib_handle, "_grGlideGetVersion@4");
grGlideGetState = (void (__stdcall *)(struct _GrState_s *))GetProcAddress(lib_handle, "_grGlideGetState@4");
grGlideSetState = (void (__stdcall *)(const struct _GrState_s *))GetProcAddress(lib_handle, "_grGlideSetState@4");
grGlideShamelessPlug = (void (__stdcall *)(const int))GetProcAddress(lib_handle, "_grGlideShamelessPlug@4");
grHints = (void (__stdcall *)(unsigned long,unsigned long))GetProcAddress(lib_handle, "_grHints@8");
guFogTableIndexToW = (float (__stdcall *)(int))GetProcAddress(lib_handle, "_guFogTableIndexToW@4");
guFogGenerateExp = (void (__stdcall *)( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float))GetProcAddress(lib_handle, "_guFogGenerateExp@8");
guFogGenerateExp2 = (void (__stdcall *)(GrFog_t fogtable[GR_FOG_TABLE_SIZE], float))GetProcAddress(lib_handle, "_guFogGenerateExp2@8");
guFogGenerateLinear = (void (__stdcall *)(GrFog_t fogtable[GR_FOG_TABLE_SIZE], float , float))GetProcAddress(lib_handle, "_guFogGenerateLinear@12");
//XSTR:ON
return 1;
}
void (__stdcall *grDrawLine)(const GrVertex *v1, const GrVertex *v2) = NULL;
void (__stdcall *grDrawPlanarPolygon)(int nverts, const int ilist[], const GrVertex vlist[]) = NULL;
void (__stdcall *grDrawPlanarPolygonVertexList)(int nverts, const GrVertex vlist[]) = NULL;
void (__stdcall *grDrawPoint)(const GrVertex *pt) = NULL;
void (__stdcall *grDrawPolygon)(int nverts, const int ilist[], const GrVertex vlist[]) = NULL;
void (__stdcall *grDrawPolygonVertexList)(int nverts, const GrVertex vlist[]) = NULL;
void (__stdcall *grDrawTriangle)(const GrVertex *a, const GrVertex *b, const GrVertex *c) = NULL;
void (__stdcall *guDrawTriangleWithClip)(const GrVertex *a, const GrVertex *b, const GrVertex *c) = NULL;
void (__stdcall *grBufferClear)(GrColor_t color, GrAlpha_t alpha, FxU16 depth) = NULL;
int (__stdcall *grBufferNumPending)(void) = NULL;
void (__stdcall *grBufferSwap)(int swap_interval) = NULL;
void (__stdcall *grRenderBuffer)(GrBuffer_t buffer) = NULL;
typedef void (*GrErrorCallbackFnc_t)(const char *string, FxBool fatal);
void (__stdcall *grErrorSetCallback)(GrErrorCallbackFnc_t fnc) = NULL;
void (__stdcall *grSstIdle)(void) = NULL;
FxU32 (__stdcall *grSstVideoLine)(void) = NULL;
FxBool (__stdcall *grSstVRetraceOn)(void) = NULL;
FxBool (__stdcall *grSstIsBusy)(void) = NULL;
FxBool (__stdcall *grSstWinOpen)(
FxU32 hWnd,
GrScreenResolution_t screen_resolution,
GrScreenRefresh_t refresh_rate,
GrColorFormat_t color_format,
GrOriginLocation_t origin_location,
int nColBuffers,
int nAuxBuffers) = NULL;
void (__stdcall *grSstWinClose)(void) = NULL;
FxBool (__stdcall *grSstControl)(FxU32 code) = NULL;
FxBool (__stdcall *grSstQueryHardware)(GrHwConfiguration *hwconfig) = NULL;
FxBool (__stdcall *grSstQueryBoards)(GrHwConfiguration *hwconfig) = NULL;
void (__stdcall *grSstOrigin)(GrOriginLocation_t origin) = NULL;
void (__stdcall *grSstSelect)(int which_sst) = NULL;
FxU32 (__stdcall *grSstScreenHeight)(void) = NULL;
FxU32 (__stdcall *grSstScreenWidth)(void) = NULL;
FxU32 (__stdcall *grSstStatus)(void) = NULL;
void (__stdcall *grSstPerfStats)(GrSstPerfStats_t *pStats) = NULL;
void (__stdcall *grSstResetPerfStats)(void) = NULL;
void (__stdcall *grResetTriStats)() = NULL;
void (__stdcall *grTriStats)(FxU32 *trisProcessed, FxU32 *trisDrawn) = NULL;
void (__stdcall *grAlphaBlendFunction)(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df) = NULL;
void (__stdcall *grAlphaCombine)(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert) = NULL;
void (__stdcall *grAlphaControlsITRGBLighting)(FxBool enable) = NULL;
void (__stdcall *grAlphaTestFunction)(GrCmpFnc_t function) = NULL;
void (__stdcall *grAlphaTestReferenceValue)(GrAlpha_t value) = NULL;
void (__stdcall *grChromakeyMode)(GrChromakeyMode_t mode) = NULL;
void (__stdcall *grChromakeyValue)(GrColor_t value) = NULL;
void (__stdcall *grClipWindow)(FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy) = NULL;
void (__stdcall *grColorCombine)(
GrCombineFunction_t function, GrCombineFactor_t factor,
GrCombineLocal_t local, GrCombineOther_t other,
FxBool invert) = NULL;
void (__stdcall *grColorMask)(FxBool rgb, FxBool a) = NULL;
void (__stdcall *grCullMode)(GrCullMode_t mode) = NULL;
void (__stdcall *grConstantColorValue)(GrColor_t value) = NULL;
void (__stdcall *grConstantColorValue4)(float a, float r, float g, float b) = NULL;
void (__stdcall *grDepthBiasLevel)(FxI16 level) = NULL;
void (__stdcall *grDepthBufferFunction)(GrCmpFnc_t function) = NULL;
void (__stdcall *grDepthBufferMode)(GrDepthBufferMode_t mode) = NULL;
void (__stdcall *grDepthMask)(FxBool mask) = NULL;
void (__stdcall *grDisableAllEffects)(void) = NULL;
void (__stdcall *grDitherMode)( GrDitherMode_t mode) = NULL;
void (__stdcall *grFogColorValue)( GrColor_t fogcolor) = NULL;
void (__stdcall *grFogMode)(GrFogMode_t mode) = NULL;
void (__stdcall *grFogTable)(const GrFog_t ft[GR_FOG_TABLE_SIZE]) = NULL;
void (__stdcall *grGammaCorrectionValue)(float value) = NULL;
void (__stdcall *grSplash)(float x, float y, float width, float height, FxU32 frame) = NULL;
FxU32 (__stdcall *grTexCalcMemRequired)(
GrLOD_t lodmin, GrLOD_t lodmax,
GrAspectRatio_t aspect, GrTextureFormat_t fmt) = NULL;
FxU32 (__stdcall *grTexTextureMemRequired)(FxU32 evenOdd, GrTexInfo *info) = NULL;
FxU32 (__stdcall *grTexMinAddress)(GrChipID_t tmu) = NULL;
FxU32 (__stdcall *grTexMaxAddress)(GrChipID_t tmu) = NULL;
void (__stdcall *grTexNCCTable)(GrChipID_t tmu, GrNCCTable_t table) = NULL;
void (__stdcall *grTexSource)(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info) = NULL;
void (__stdcall *grTexClampMode)(GrChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode) = NULL;
void (__stdcall *grTexCombine)(
GrChipID_t tmu,
GrCombineFunction_t rgb_function,
GrCombineFactor_t rgb_factor,
GrCombineFunction_t alpha_function,
GrCombineFactor_t alpha_factor,
FxBool rgb_invert,
FxBool alpha_invert
) = NULL;
void (__stdcall *grTexCombineFunction)(
GrChipID_t tmu,
GrTextureCombineFnc_t fnc
) = NULL;
void (__stdcall *grTexDetailControl)(
GrChipID_t tmu,
int lod_bias,
FxU8 detail_scale,
float detail_max
) = NULL;
void (__stdcall *grTexFilterMode)(
GrChipID_t tmu,
GrTextureFilterMode_t minfilter_mode,
GrTextureFilterMode_t magfilter_mode
) = NULL;
void (__stdcall *grTexLodBiasValue)(GrChipID_t tmu, float bias) = NULL;
void (__stdcall *grTexDownloadMipMap)(GrChipID_t tmu,
FxU32 startAddress,
FxU32 evenOdd,
GrTexInfo *info) = NULL;
void (__stdcall *grTexDownloadMipMapLevel)(GrChipID_t tmu,
FxU32 startAddress,
GrLOD_t thisLod,
GrLOD_t largeLod,
GrAspectRatio_t aspectRatio,
GrTextureFormat_t format,
FxU32 evenOdd,
void *data) = NULL;
void (__stdcall *grTexDownloadMipMapLevelPartial)(GrChipID_t tmu,
FxU32 startAddress,
GrLOD_t thisLod,
GrLOD_t largeLod,
GrAspectRatio_t aspectRatio,
GrTextureFormat_t format,
FxU32 evenOdd,
void *data,
int start,
int end) = NULL;
void (__stdcall *ConvertAndDownloadRle)(GrChipID_t tmu,
FxU32 startAddress,
GrLOD_t thisLod,
GrLOD_t largeLod,
GrAspectRatio_t aspectRatio,
GrTextureFormat_t format,
FxU32 evenOdd,
FxU8 *bm_data,
long bm_h,
FxU32 u0,
FxU32 v0,
FxU32 width,
FxU32 height,
FxU32 dest_width,
FxU32 dest_height,
FxU16 *tlut) = NULL;
void (__stdcall *grCheckForRoom)(FxI32 n);
void (__stdcall *grTexDownloadTable)(GrChipID_t tmu,
GrTexTable_t type,
void *data) = NULL;
void (__stdcall *grTexDownloadTablePartial)(GrChipID_t tmu,
GrTexTable_t type,
void *data,
int start,
int end) = NULL;
void (__stdcall *grTexMipMapMode)(GrChipID_t tmu,
GrMipMapMode_t mode,
FxBool lodBlend) = NULL;
void (__stdcall *grTexMultibase)(GrChipID_t tmu,
FxBool enable) = NULL;
void (__stdcall *grTexMultibaseAddress)(GrChipID_t tmu,
GrTexBaseRange_t range,
FxU32 startAddress,
FxU32 evenOdd,
GrTexInfo *info) = NULL;
GrMipMapId_t (__stdcall *guTexAllocateMemory)(
GrChipID_t tmu,
FxU8 odd_even_mask,
int width, int height,
GrTextureFormat_t fmt,
GrMipMapMode_t mm_mode,
GrLOD_t smallest_lod, GrLOD_t largest_lod,
GrAspectRatio_t aspect,
GrTextureClampMode_t s_clamp_mode,
GrTextureClampMode_t t_clamp_mode,
GrTextureFilterMode_t minfilter_mode,
GrTextureFilterMode_t magfilter_mode,
float lod_bias,
FxBool trilinear
) = NULL;
FxBool (__stdcall *guTexChangeAttributes)(
GrMipMapId_t mmid,
int width, int height,
GrTextureFormat_t fmt,
GrMipMapMode_t mm_mode,
GrLOD_t smallest_lod, GrLOD_t largest_lod,
GrAspectRatio_t aspect,
GrTextureClampMode_t s_clamp_mode,
GrTextureClampMode_t t_clamp_mode,
GrTextureFilterMode_t minFilterMode,
GrTextureFilterMode_t magFilterMode
) = NULL;
void (__stdcall *guTexCombineFunction)(
GrChipID_t tmu,
GrTextureCombineFnc_t fnc
) = NULL;
GrMipMapId_t (__stdcall *guTexGetCurrentMipMap)(GrChipID_t tmu) = NULL;
GrMipMapInfo* (__stdcall *guTexGetMipMapInfo)(GrMipMapId_t mmid);
FxU32 (__stdcall *guTexMemQueryAvail)(GrChipID_t tmu) = NULL;
void (__stdcall *guTexMemReset)(void) = NULL;
void (__stdcall *guTexDownloadMipMap)(
GrMipMapId_t mmid,
const void *src,
const GuNccTable *table
) = NULL;
void (__stdcall *guTexDownloadMipMapLevel)(
GrMipMapId_t mmid,
GrLOD_t lod,
const void **src
) = NULL;
void (__stdcall *guTexSource)(GrMipMapId_t id) = NULL;
void (__stdcall *guColorCombineFunction)(GrColorCombineFnc_t fnc) = NULL;
FxBool (__stdcall *grLfbLock)( GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode,
GrOriginLocation_t origin, FxBool pixelPipeline,
GrLfbInfo_t *info) = NULL;
FxBool (__stdcall *grLfbUnlock)(GrLock_t type, GrBuffer_t buffer) = NULL;
void (__stdcall *grLfbConstantAlpha)(GrAlpha_t alpha) = NULL;
void (__stdcall *grLfbConstantDepth)(FxU16 depth) = NULL;
void (__stdcall *grLfbWriteColorSwizzle)(FxBool swizzleBytes, FxBool swapWords) = NULL;
void (__stdcall *grLfbWriteColorFormat)(GrColorFormat_t colorFormat) = NULL;
FxBool (__stdcall *grLfbWriteRegion)(GrBuffer_t dst_buffer,
FxU32 dst_x, FxU32 dst_y,
GrLfbSrcFmt_t src_format,
FxU32 src_width, FxU32 src_height,
FxI32 src_stride, void *src_data) = NULL;
FxBool (__stdcall *grLfbReadRegion)(GrBuffer_t src_buffer,
FxU32 src_x, FxU32 src_y,
FxU32 src_width, FxU32 src_height,
FxU32 dst_stride, void *dst_data) = NULL;
void (__stdcall *grAADrawLine)(const GrVertex *v1, const GrVertex *v2) = NULL;
void (__stdcall *grAADrawPoint)(const GrVertex *pt) = NULL;
void (__stdcall *grAADrawPolygon)(const int nverts, const int ilist[], const GrVertex vlist[]) = NULL;
void (__stdcall *grAADrawPolygonVertexList)(const int nverts, const GrVertex vlist[]) = NULL;
void (__stdcall *grAADrawTriangle)(
const GrVertex *a, const GrVertex *b, const GrVertex *c,
FxBool ab_antialias, FxBool bc_antialias, FxBool ca_antialias
) = NULL;
void (__stdcall *grGlideInit)(void) = NULL;
void (__stdcall *grGlideShutdown)(void) = NULL;
void (__stdcall *grGlideGetVersion)(char version[80]) = NULL;
void (__stdcall *grGlideGetState)(GrState *state) = NULL;
void (__stdcall *grGlideSetState)( const GrState *state) = NULL;
void (__stdcall *grGlideShamelessPlug)(const FxBool on) = NULL;
void (__stdcall *grHints)(GrHint_t hintType, FxU32 hintMask) = NULL;
float (__stdcall *guFogTableIndexToW)(int i) = NULL;
void (__stdcall *guFogGenerateExp)( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density ) = NULL;
void (__stdcall *guFogGenerateExp2)( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float density ) = NULL;
void (__stdcall *guFogGenerateLinear)( GrFog_t fogtable[GR_FOG_TABLE_SIZE], float nearZ, float farZ ) = NULL;
File diff suppressed because it is too large. Load diff
-116
View File
@@ -1,116 +0,0 @@
/*
** Copyright (c) 1995, 3Dfx Interactive, Inc.
** All Rights Reserved.
**
**
** $Header: /cvs/cvsroot/fs2open/fs2_open/code/glide/glidesys.h,v 1.1 2002-06-03 03:25:57 penguin Exp $
** $Log: not supported by cvs2svn $
** Revision 1.1 2002/05/02 18:03:07 mharris
** Initial checkin - converted filenames and includes to lower case
**
*
* 2 10/07/98 10:52a Dave
* Initial checkin.
*
* 1 10/07/98 10:48a Dave
*
* 2 2/27/98 3:25p Frank
* (John/Frank K.) updated to 2.43 headers
*
* 1 10/16/97 11:51a Klier
*/
#ifndef __GLIDESYS_H__
#define __GLIDESYS_H__
/*
n** -----------------------------------------------------------------------
** COMPILER/ENVIRONMENT CONFIGURATION
** -----------------------------------------------------------------------
*/
/* Endianness is stored in bits [30:31] */
#define GLIDE_ENDIAN_SHIFT 30
#define GLIDE_ENDIAN_LITTLE (0x1 << GLIDE_ENDIAN_SHIFT)
#define GLIDE_ENDIAN_BIG (0x2 << GLIDE_ENDIAN_SHIFT)
/* OS is stored in bits [0:6] */
#define GLIDE_OS_SHIFT 0
#define GLIDE_OS_UNIX 0x1
#define GLIDE_OS_DOS32 0x2
#define GLIDE_OS_WIN32 0x4
#define GLIDE_OS_SYSTEM7 0x8
#define GLIDE_OS_OS2 0x10
#define GLIDE_OS_OTHER 0x20 /* For Proprietary Arcade HW */
/* Sim vs. Hardware is stored in bits [7:8] */
#define GLIDE_SST_SHIFT 7
#define GLIDE_SST_SIM (0x1 << GLIDE_SST_SHIFT)
#define GLIDE_SST_HW (0x2 << GLIDE_SST_SHIFT )
/* Hardware Type is stored in bits [9:12] */
#define GLIDE_HW_SHIFT 9
#define GLIDE_HW_SST1 (0x1 << GLIDE_HW_SHIFT)
#define GLIDE_HW_SST96 (0x2 << GLIDE_HW_SHIFT)
#define GLIDE_HW_SSTH3 (0x4 << GLIDE_HW_SHIFT)
#define GLIDE_HW_SST2 (0x8 << GLIDE_HW_SHIFT)
/*
** Make sure we handle all instances of WIN32
*/
#ifndef __WIN32__
# if defined ( _WIN32 ) || defined (WIN32) || defined(__NT__)
# define __WIN32__
# endif
#endif
/* We need two checks on the OS: one for endian, the other for OS */
/* Check for endianness */
#if defined(__IRIX__) || defined(__sparc__) || defined(MACOS)
# define GLIDE_ENDIAN GLIDE_ENDIAN_BIG
#else
# define GLIDE_ENDIAN GLIDE_ENDIAN_LITTLE
#endif
/* Check for OS */
#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
# define GLIDE_OS GLIDE_OS_UNIX
#elif defined(__DOS__)
# define GLIDE_OS GLIDE_OS_DOS32
#elif defined(__WIN32__)
# define GLIDE_OS GLIDE_OS_WIN32
#endif
/* Check for Simulator vs. Hardware */
#ifdef GLIDE_SIMULATOR
# define GLIDE_SST GLIDE_SST_SIM
#else
# define GLIDE_SST GLIDE_SST_HW
#endif
/* Check for type of hardware */
#ifdef SST96
# define GLIDE_HW GLIDE_HW_SST96
#elif defined(SSTH3)
# define GLIDE_HW GLIDE_HW_SSTH3
#elif defined(SST2)
# define GLIDE_HW GLIDE_HW_SST2
#else /* Default to SST1 */
# define GLIDE_HW GLIDE_HW_SST1
#endif
#define GLIDE_PLATFORM (GLIDE_ENDIAN | GLIDE_OS | GLIDE_SST | GLIDE_HW)
/*
** Control the number of TMUs
*/
#ifndef GLIDE_NUM_TMU
# define GLIDE_NUM_TMU 2
#endif
#if ( ( GLIDE_NUM_TMU < 0 ) && ( GLIDE_NUM_TMU > 3 ) )
# error "GLIDE_NUM_TMU set to an invalid value"
#endif
#endif /* __GLIDESYS_H__ */
Loaded 100 of 526 files, more files were not shown because too many files have changed in this diff. Show more