Commit Graph

57 Commits

Author SHA1 Message Date
Arthur Eubanks ecfcb11a00 Remove implicit conversion operator from RString to const char*
This is required for the RString to std::string migration.

Mostly automated from https://github.com/aeubanks/rewriter/blob/main/c_str.cc, with some manual intervention required for fixing up `a + b.c_str()` to `(a + b).c_str()`.

Added some overloads for some common global functions like sm_crash to reduce the number of changes required here.
2025-05-15 21:14:54 -07:00
sukibaby e0b254968d std::size_t -> size_t
Removing std prefix from all size_t.
2024-10-01 01:46:26 -07:00
Valentina16 52cf6170e4 Sprite DecodeMovie when required 2024-08-19 09:24:36 -07:00
Brandon W 23f7ebd476 Add FrameHolder struct and logic around finding totalFrames of movies. 2024-07-25 11:42:16 -07:00
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Martin Natano 78fb2e9fc3 Decouple <cstddef> 2023-04-20 11:21:29 +02:00
Martin Natano b68ca517e6 Clean up math functions
- Remove checking for standard functions from the build system
- Prefix all invocations with std::
- Replace suffixed functions with unprefixed versions
- Include <cmath> in all files that use it and remove the global include

e.g. floorf(x) -> std::floor(x)
2023-04-19 19:31:40 +02:00
Michael Sundqvist 0cba3579de Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
2022-07-31 22:14:38 +02:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Alexander Griffin c0981c42ec Changing BannerCache into ImageCache to support more imagetypes (#1532) 2017-09-19 14:49:42 -07:00
Drew Barbarello 557be7cf1b 5 1 new backport x11 fs rework (#1485)
* Use XRandR 1.2 to set fullscreen resolution for single output

Squash of roothorick's PR #497
(also includes Kyzentun's CMake changes from PR #716)

* Cherry-pick json c++1x stuff (b9e3d7174e)

* Cherry-pick c++11 support from 5bba5c0038 and 9f8b045309

* rework Linux (X11) fullscreen, improve display-related Graphics Options

Implement option to select between monitors for exclusive fullscreen mode
on X11 (using XRandR 1.2), or use a fullscreen borderless window.

Reimplement resolution/refresh rate/display mode-related option rows
using Lua, update choices dynamically so only known-good groupings of
resolution/refresh rate/aspect ratio can be selected.

Minimally update Windows/MacOS LowLevelWindow implementations to support
changes made for Linux side. Fullscreen Borderless Window/multi monitor
support from X11 not implemented for those in this commit.

* allow forcibly disabling xinerama use on Linux

When libXinerama is available, SM tries to use it to find the proper
monitor indexes to use to set _NET_WM_FULLSCREEN_MONITORS (on borderless
fullscreen). xfwm4 seems to assume that monitors are numbered in increasing
order from left to right (rather than using the Xinerama-assigned numbers),
so _NET_WM_FULLSCREEN_MONITORS misbehaves on Xfce.

This commit bypasses use of libXinerama, and instead forces SM to induce fullscreen
on the desired monitor in the backup, hacky way: remove all window hints, move window
to desired monitor, then add _NET_WM_STATE_FULLSCREEN hint. This works on
mutter and Xfce.

* Remove multiple warnings on redundant define.

This used to be hard-coded due to pthread related items, but now it's dynamically determined.

* fix _fallback menu behavior for unrecognized aspect ratios

* Fix error recreating existing FS texture

* Bump deployment target to 10.7 to use libc++ on XCode 8

* Add explicit casts to please clang

* Update changelog
2017-06-18 08:55:16 -07:00
Kyzentun dd9fa68fef Sprite:Load lua function can set additional texture hints by having a second argument. Also, rec_count_children slipped in Utilities somehow. (#1426) 2017-04-04 17:24:14 -07:00
Kyzentun 42b3a88516 Revert "Rewrote Sprite::ScaleToClipped and CropTo to actually work." 2015-10-06 00:53:22 -06:00
Kyzentun 8e7b4ee7ee Merge pull request #203 from kyzentun/FixScaleToClipped
Rewrote Sprite::ScaleToClipped and CropTo to actually work.
2015-10-03 21:31:45 -06:00
Kyzentun Keeslala a10c0c4f01 Added set_use_effect_clock_for_texcoords to Sprite. Updated changelog. 2015-09-21 20:42:56 -06:00
Kyzentun Keeslala e81ebfb5c5 Added AnimationFinished command to Sprite for when the animation starts over. 2015-07-15 01:35:30 -06:00
Kyzentun Keeslala f5aec7ed4b Why the One Definition Rule exists, and being able to hide members with local variables is bad, Exhibit A. 2015-05-15 02:55:40 -06:00
Kyzentun 2656123464 RageTextureManager now keeps a map of textures by pointer for quicker lookup when deleting.
RageTextureManager now keeps a map of textures that need updating, which is none of them because I couldn't find a class that inherits from RageTexture that doesn't have an empty Update function.
ArrowEffects now requires setting the current PlayerOptions before calling any functions.  This might make moving to per-column mods easier, and reduces the direct usage of PlayerState.
Tipsy calculations for each column are done in ArrowEffects::Update instead of GetYPos and GetYOffset.
DrawHold changed to only call DrawHoldBody once.  DrawHoldBody now does the normal and glow passes together instead of needing to be called twice.
DrawHoldPart changed to take most of its args in a struct.
Giant copy paste mess that NoteField was using to draw timing segment text replaced with a couple functions and a macro.
Selection glow for notefield is only calculated if a section is selected.
Added RageVector3 functions to CubicSplineN for NoteDisplay to use.
Actor effect period is cached now.  Sprites and Models cache their animation length now.
ReceptorArrowRow no longer calls ArrowEffects::Update in gameplay.
2015-04-24 15:55:54 -06:00
Kyzentun f4da2988d9 Moved GetTexturePath lua function from Sprite to RageTexture and renamed it to GetPath. Updated changelog. 2015-03-24 14:23:30 -06:00
Kyzentun d85ac9af85 Added GetTexturePath lua function to Sprite. 2015-03-15 00:34:21 -06:00
Kyzentun ad877b6dcb Changed BackgroundEffects files to apply the playback rate to videos. Added GetUpdateRate to ActorFrame and Get/SetDecodeMovie to Sprite. Hope nobody is caught off guard by checkerboard no longer playing videos back at 4x rate. 2015-02-05 00:37:08 -07:00
Kyzentun 6570db599c AMV animation state system added. 2015-02-01 17:01:15 -07:00
Kyzentun 58d3fd2b6f Fixed pump noteskin to not set zero delay on receptor sprites. Changed error messages from Sprite to give 1-indexed state numbers. 2015-01-28 07:53:55 -07:00
Kyzentun 259ef96493 Reset sprite state when setting new state properties. 2015-01-13 04:27:52 -07:00
Kyzentun 301d529b67 Negative state delays in a sprite cause an infinite loop. 2015-01-10 02:32:54 -07:00
Kyzentun 0a02dd2b7c Added SetStateProperties to Sprite. 2015-01-09 23:56:11 -07:00
Kyzentun 4f95bf08ad Function chaining for actors and singletons. 2014-12-01 22:31:30 -07:00
Kyzentun 2134151b90 Added Sprite::NewBlankSprite for use by NoteSkinManager. Removed default texture loading from Sprite::Sprite. Should fix problems with white banners and garbage on videos. 2014-08-02 00:38:40 -07:00
Kyzentun 88f56cb0ec Tested and fixed error reporting for NoteSkinManager. Changed Sprite::Sprite() to load the default texture. 2014-08-02 00:38:27 -07:00
Kyzentun 5df80b6e0e Changed many places that used RageException to use ReportScriptError instead. Wrote ScreenOptionsExample.ini as documentation example for the OptionRow system. Rewrote gamecommands.txt to include all GameCommands. Fixed Commands::GetOriginalCommandString to insert the semicolons that separated the original commands. Changed nonsensical boolean |= true statements in GameCommand.cpp to just use =. Added protection to ReportScriptError to keep it from recursing through itself when an error occurs in error reporting. Added UseAbort option to ReportScriptError for places that want to use an AbortRetryIgnore dialog to query the user. Added ScriptErrorMessage for places that need to handle the warning/dialog part separately. Added logging flag to MESSAGEMAN so that all messages broadcast can be logged when desired. Changed OptionRowHandler::LoadInternal to return a boolean success value as part of error handling. 2014-08-02 00:38:24 -07:00
Kyzentun a74a49af78 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-08-02 00:38:18 -07:00
Kyzentun 8fd8bc644b Rewrote Sprite::ScaleToClipped and CropTo to actually work reliably and do what their names say. 2014-06-21 19:40:14 -06:00
freem 59600538da Visual Studio was choking on isnan; it worked in StreamDisplay by including <float.h>, and that works here too. 2014-02-19 21:27:23 -06:00
Kyzentun d9b38234dd Added SetCustomPosCoords to Sprite. 2014-02-12 18:43:42 -07:00
Jason Felds 28e5148dec The big NULL replacement party part 5.
Right. ' = NULL' would get a lot of these.
2013-05-03 23:39:52 -04:00
Jason Felds 328c41eec0 The big NULL replacement party part 4.
...okay, not as big of a commit.
2013-05-03 23:24:23 -04:00
Jason Felds ba59dd1656 The big NULL replacement party part 2.
This may take a bit. Trying to do this by operator/command.
2013-05-03 23:11:42 -04:00
Jason Felds 9f24627bf9 The big NULL replacement party part 1.
This is meant to be a safer alternative since
NULL can often be 0. Let's not rely on that.

And yes, I know this is a lot of files. This is
a safer thing to do in big commits vs for loops.
2013-05-03 23:01:54 -04:00
Jason Felds c67419ecc8 There goes the macro file.
This is one of my bigger commits in this branch.

Still, shouldn't cause a problem.
2013-05-01 23:54:39 -04:00
Jason Felds 3171f15df2 I should be using + instead of += apparently.
Yay for ##c++ for pointing this out.
2013-04-30 20:36:04 -04:00
Jason Felds b1b55a42f6 Wait...const did work? Have to fix the other. 2013-04-28 17:23:38 -04:00
AJ Kelly da59479161 source the comment 2011-08-20 18:23:02 -05:00
AJ Kelly 38246f7fea silence warnings 2011-05-20 01:06:48 -05:00
AJ Kelly 27a6ebd187 remove support for diagonal banners; it's 2011, the theme should be taking care of banner rotation. plus this made things problematic for people wanting to use square banners. 2011-05-20 00:19:51 -05:00
AJ Kelly d136d19cef fix compile; don't add features early in the morning 2011-05-10 08:55:50 -05:00
AJ Kelly 4afa85c9f9 [Sprite] Added SetSecondsIntoAnimation(float) Lua binding. 2011-05-10 02:41:02 -05:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds 9d13036e08 Add @briefs to the Luna classes.
Yeah...there was a lot. */
2011-02-19 12:26:18 -05:00
Jason Felds 1bed6d3630 De-Python-ize REGISTER_ACTOR_CLASS(*). 2011-02-18 23:55:41 -05:00
AJ Kelly 853925c83b Added Sprite:SetAllStateDelays(fDelay) Lua binding
small cleanup on charmaps number comment
2010-12-17 01:07:50 -06:00