Fabian Woltermann
770fce8de5
Bitset flags -- take 2 ( #775 )
...
This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
2016-08-12 16:13:50 -07:00
m!m
22c0255277
Fix a bunch of 64-bit MSVC warnings ( #709 )
...
* Fix a bunch of 64-bit warnings
* Fix Linux compilation error
* Fix Mac error
* Fix some issues
* Fix more GCC warnings
* Remote unwanted change
* Remove accidentally readded file
* Fix wrong limit check
* Use BEAM_INDEX macro for getting beam object index
* Fix 32-bit warning
* Use BEAM_INDEX instead of pointer arithmetic
2016-08-09 11:08:54 -07:00
asarium
bbeaaa1565
Add a new particle effect system
...
This is similar to the script I wrote a few years ago but unlike that
one, this solution doesn't kill the performance.
2016-08-04 11:08:39 +02:00
asarium
1bcd5400d3
Move build system to CMake
2016-07-22 12:07:19 +02:00
MageKing17
70529dbd5a
Deprecate -nohtl and -brief_lighting.
...
-nohtl hasn't worked for years, and -brief_lighting was always supposed to be a temporary flag before making the behavior always on.
2016-07-08 09:39:29 -07:00
SamuelCho
dd73d8fb63
New lighting model based off of Blinn-Phong and Fresnel-Shlick. Introduced -reflect maps. New gloss parameters for specular power. High dynamic range rendering. Improved bloom pass.
2016-07-05 23:15:08 -07:00
niffiwan
0b20b15c2c
Fix issues found by Axem
...
Fix silly issue preventing getFrame() from working
Remove infinite loop when calculating frame num
Convert more animations to use new frame calc function
2016-05-10 19:42:20 +10:00
Peter Mitsis
180674154c
trig: Use floating point versions of trig functions
...
Replaces calls to double-precision floating point trig functions with
calls to single-precision floating point trig functions as follows:
cos() -> cosf()
sin() -> sinf()
tan() -> tanf()
acos() -> acosf()
asin() -> asinf()
atan() -> atanf()
This allows the compiler to avoid generating unnecessary instructions
that convert a float to a double and then a double back to a float.
Signed-off-by: Peter Mitsis <[email protected] >
2016-04-24 21:56:06 -04:00
Echelon9
5d593f0df0
Plumb through is_minimum_GLSL_version()
2016-01-03 16:33:04 -05:00
DahBlount
9b7ebff53a
Change NULL to nullptr and change fighter beam flag comparison from > to !=
2015-12-15 09:54:34 -07:00
DahBlount
1491d4a79a
Create "share fire direction" subsystem flag
2015-12-15 09:54:32 -07:00
The E
e0defd287a
Renaming vm_vec_crossprod to vm_vec_cross
2015-12-01 20:36:34 +01:00
The E
a413255728
Renaming vm_vec_dotprod to vm_vec_dot
2015-12-01 20:35:47 +01:00
DahBlount
89d072e18c
Add +Directonal Glow:
...
This goes directly below +Muzzleglow: in $Beam Info: and causes the muzzle glow to be rendered along a projected poly instead of a bitmap.
Takes a float argument that is the length of the glow.
2015-11-09 14:28:40 -07:00
Goober5000
ccc71a8e8b
looks like we'll need them in these three other files too
2015-10-25 21:20:57 -04:00
Goober5000
b82d0c579d
convert qsort to std::sort
2015-10-25 19:16:36 -04:00
MageKing17
1a0f2cf0e0
Fix Mantis #3173 .
...
So in PR #294 , I made 0-damage beams call the damage-applying code so they could be used to TAG things. The way I did this was I removed the do_damage check from the conditional before the switch block that handles beams damaging things.
This was a horrible mistake.
do_damage was set to 0 if a beam dealt <= 0 damage, but before that, it would only be set to 1 if the damage timestamp had elapsed. Removing the do_damage check caused damaging beams to deal damage every frame, which obviously will cause a substantial damage increase (well, unless your framerate was so low that beams would deal less than their full damage anyway).
This commit restores the do_damage check, and simply avoids setting do_damage to 0 if the beam isn't a damaging one (the <= 0 check is moved to beam_get_ship_damage() instead, so we can skip the attenuation calculation if we're not going to deal damage in the first place).
2015-09-06 05:33:30 -07:00
Axem
7f22a80af6
Prelim work
2015-08-29 11:14:38 -05:00
MageKing17
27d85189ea
Remove do_damage check before calling hit functions in beam collisions.
...
This should allow 0-damage beams to be used to apply TAG effects.
2015-08-19 22:17:05 -07:00
MageKing17
b296300365
Simplify some references to Weapon_info[b->weapon_info_index].
...
These were all referenced when there was already a weapon_info pointer to that element; it makes more sense to use that pointer instead of re-indexing Weapon_info[].
2015-08-19 22:15:23 -07:00
Echelon9
418b9e06d7
Simplify duplicative weapon/ includes, which are in weapon/weapon.h
2015-06-22 20:24:31 +10:00
Echelon9
c5493bb480
Scripted sort and uniq on (internal) project includes. Improves search time and as a by product removed a number of duplicative includes.
2015-06-22 20:24:30 +10:00
Axem
4b20b46509
Commit because reasons? (Why git, why)
2015-06-03 17:44:37 -05:00
Axem
61e4f739ce
Adds On Beam Fire scripting hook
2015-05-31 18:02:36 -05:00
MageKing17
b2cff0788a
Make these assertions more clear.
2015-05-22 12:37:19 -07:00
MageKing17
0609d3919f
Allow floating beams.
...
Makes it possible for a beam to fire from a point in space instead of a turret.
2015-05-15 16:09:35 -07:00
MageKing17
f8954cc941
Fix typo of "section" as "secion".
2015-05-15 15:28:27 -07:00
m_m
e3311f36ac
Fix for Mantis 3156: Fighter beam range depends on target radius
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11307 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-18 00:09:10 +10:00
Goober5000
d734f76369
xt branch: "Nothing major here, just added the same basic stuff from the nebula code to make beam glows fade out depending on how close to the eye they are. The primary reason for this was for beams on fighters, since the muzzle glows tend to block your view when they show up. Having them fade out still gives you the visual effect, but allows you to see through them as well."
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11142 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-17 18:25:16 +10:00
Goober5000
871bb0b19a
xt branch: minor optimizations in beam.cpp
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@11141 387891d4-d844-0410-90c0-e4c51a9137d3
2014-10-17 18:25:14 +10:00
niffiwan
5daa8d87d2
Fix Coverity 1093822 Uninitialized scalar variable
...
Set sensible looking defaults for the elems added to the beam_collision
struct since retail
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10956 387891d4-d844-0410-90c0-e4c51a9137d3
2014-07-30 20:41:20 +10:00
The_E
8da0ac791e
From MageKing17: Patch for Mantis 3060 (Beam particles not generated correctly in certain cases)
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10823 387891d4-d844-0410-90c0-e4c51a9137d3
2014-06-19 20:12:53 +10:00
z64555
8d5fbab768
z64555's debug console. Take 2. Includes changes to most (not Xcode) project files to include the added files of r10621
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10622 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:37 +10:00
The_E
98355da7d5
Revert 10619: Missing files
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10620 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
z64555
2b2ba832f8
z64555's debug console.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10619 387891d4-d844-0410-90c0-e4c51a9137d3
2014-05-08 19:18:36 +10:00
Echelon9
8267319073
Resolve build errors reported on MSVC in beam_ok_to_fire()
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10594 387891d4-d844-0410-90c0-e4c51a9137d3
2014-04-25 16:04:45 +10:00
niffiwan
0115235de7
Add lua on-collision hooks for beams: from Axem & Wanderer
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10253 387891d4-d844-0410-90c0-e4c51a9137d3
2013-12-22 19:05:16 +10:00
Echelon9
cb446460e4
General cleanup of commented out code in beam.cpp
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10165 387891d4-d844-0410-90c0-e4c51a9137d3
2013-12-03 21:12:49 +10:00
zookeeper
8cd19aa588
Merged model point shields from zookeeper branch.
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@10135 387891d4-d844-0410-90c0-e4c51a9137d3
2013-11-25 19:29:36 +10:00
The_E
ea6edd3f8c
Catch a rare error condition where shield_hit_tri was -1 for some reason
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9927 387891d4-d844-0410-90c0-e4c51a9137d3
2013-10-16 19:46:02 +10:00
niffiwan
7adf66330d
Coverity CID 1093820: read of uninitialised var in beam_render_muzzle_glow(beam *b)
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9858 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-29 22:12:23 +10:00
Goober5000
7e5b2aee52
turn mc_info into a plain data struct, part 2
...
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@9822 387891d4-d844-0410-90c0-e4c51a9137d3
2013-09-26 18:51:36 +10:00
Swifty
c6c12fc251
go_even_faster: Improved collision detection performance by rewriting broadphase and narrowphase testing.
2012-08-11 21:14:53 +00:00
Echelon9
791146c9ac
GCC warnings: first pass of warning: variable is set but not used
2012-06-12 15:32:47 +00:00
Echelon9
e67348d4e6
LLVM Warning fix: This is all dead code, removing.
2012-01-21 06:09:50 +00:00
Valathil
dd810fa34e
Fix for Mantis 2576: Use the beam direction as the applied force vector
2012-01-21 04:07:27 +00:00
Valathil
16df14125d
Fix for Mantis 2574: Timestamps do not work that way, also fixed the rapid fire "Out of Energy" sound for fighter beams.
2012-01-20 01:35:19 +00:00
Echelon9
53d407332f
Fix LLVM warnings in weapon folder
2012-01-15 07:05:20 +00:00
Echelon9
19ae6528e0
Cases of commented out Int3() indicate areas of old, redundant code.
2011-11-17 11:07:53 +00:00
niffiwan
dd66475b75
Reapplying 7790, seems to have been mistakenly swatted by 7802
2011-09-28 11:23:27 +00:00