Commit Graph
26 Commits
Author SHA1 Message Date
sukibabyandteejusb a6a60e2e56 Remove std prefix from int types
std::int* -> int*
2024-10-08 20:52:52 -07:00
sukibabyandteejusb 659cd549a2 Remove std prefix from uint types
std::uint*  ->  uint*
2024-10-05 19:25:41 -07:00
sukibabyandteejusb 21088502b9 Remove clamp macro
Doesn't really need to exist since  all it's doing is inlining std::clamp.
2024-09-03 20:50:48 -07:00
Rafał Florczakandteejusb 5369f16e16 Implement cross-platform FTOC using clamp and static_casts
The old implementation relied on the tricks that no longer seem to
optimize anything and break strict aliasing rule, which in turn is an
undefined behavior:

/var/storage/rf/proj/itgmania/src/RageTypes.h: In function ‘unsigned char FTOC(float)’:
/var/storage/rf/proj/itgmania/src/RageTypes.h:300:42: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  300 |         int ret = reinterpret_cast<int&>(base);
      |                                          ^~~~

Compiler explorer summary: https://godbolt.org/z/5857747P3

It's also possible to eliminate this strict aliasing violation with a union,
while leaving all the tricky code (also included in the link above).

Online build of the test code that's suggested for FTOC: https://onlinegdb.com/O7N0Orl0r

ARM version of the code wasn't correct -- as in not passing the attached test.
It didn't perform accurately around the end of the input range.
2024-07-17 20:21:55 -07:00
Martin Natano aa87f85eef Decouple <cstdint> 2023-04-21 22:13:41 +02:00
Brian Phlipotandteejusb d079940fea Address PR feedback. 2023-02-02 11:54:17 -08:00
Brian Phlipotandteejusb 4a6b1a743c Enable more compiler warnings and treat them as errors. 2023-02-02 11:54:17 -08:00
Colby Klein 39d516f6de simplified FTOC for aarch64
this isn't actually a good solution, really RageVColor shouldn't be
doing this conversion at all and should be refactored/removed.

this gets gameplay running a bit smoother, much closer to holding 60fps
2020-06-27 09:54:58 -07:00
FlameshadowxeroshinandColby Klein c1088c1abc Distance field EffectMode (#1546)
* Distance field EffectMode (supports MSDF and the regular sort)
2017-10-02 05:54:05 -07:00
Colby Klein 1c920a4197 Backport FTOC optimization from 5.1 2017-05-30 03:04:26 -07:00
Kyzentun ca4eb65b61 Added lerp, lerp_color, approach, and multiapproach lua functions. 2014-10-23 00:13:13 -06:00
sigatrev 70c5209e76 added ActorMultiVertex
AMV is an actor which can have a variable number of vertices that can
each be given their own pos, color, and coords. They can be drawn using
any of the RageSpriteVertex draw functions in RageDisplay.cpp. The
vertex properties can be tweened.
2014-04-14 21:29:19 -05:00
Jason Felds 702f091ea1 Remove outdated SM_ALIGN macro. 2013-10-18 18:39:25 -04:00
Jason Felds b72b4a2036 Remove unused declaration. Thanks to vulture. 2013-07-07 18:50:30 -04:00
Jason Felds 22b7b34897 More effective fixes.
Course playing still results in it playing fine.
2011-03-19 18:26:55 -04:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds c5fda59080 More warning reductions, even if not noticed.
We're in the lower 40Ks now with Effective C++
Violations being checked.
2011-03-14 12:15:33 -04:00
Jason Felds d03e6a89fb Got more of them, but not all.
Time to move onto a new file I think.
2011-03-14 11:14:29 -04:00
Jason Felds e090631b4c Make the others behave the same way.
Almost 10K warnings were removed from these two commits.

Can we find the others?
2011-03-14 10:50:39 -04:00
Jason Felds 33af1ba294 Fix some Effective C++ Violations.
This part may be easier to work with
from the command line at this rate...
2011-03-14 10:40:05 -04:00
AJ Kelly cd2a78e09a pretty much equivalent to 23b02ce-adf0feb. [Chris Danford; some other cleanup by AJ] 2010-06-12 14:37:20 -05:00
AJ Kelly 6b3da26a4c [GameCommand] Don't allow battle/rave with Routine (StyleType_TwoPlayersSharedSides). also cleanup
[RageTypes] remove glowmode stub stuff
[RageDisplayOGL] update comments slightly
2010-06-02 15:43:56 -05:00
AJ Kelly 04317c14ae f8270c6, "draw glow using stroke texture" forces the BitmapText to glow both the inner and stroke elements. This makes BitmapText elementswith an invisible stroke have a glowing stroke instead. Not good.
To combat this, I have developed the BitmapText::textglowmode command, along with the TextGlowMode enum.
Valid values include 'TextGlowMode_Inner', 'TextGlowMode_Stroke', 'TextGlowMode_Both'.
2010-03-12 19:47:08 -06:00
AJ Kelly 2d872ac518 427a764: subtractive blend (OpenGL only for now) [Glenn Maynard]
I was looking into writing the equivalent Direct3D code; still not 100% sure if my code is right, so it stays local for now.
2010-02-08 01:32:14 -06:00
AJ Kelly 3e51544930 Initial commit. 2010-01-26 21:00:30 -06:00
Devin J. Pohly 80057f53cd smsvn -> ssc-hg glue: rearrange directory structure 2013-06-10 15:38:43 -04:00