Commit Graph
28 Commits
Author SHA1 Message Date
Martin Natano bacecae1f7 Decouple <vector> 2023-04-21 22:13:41 +02:00
Michael SundqvistandMartin Natano 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
Prcuvu 123b01930e Force Lua to be compiled as C++ code when using MSVC
The setjmp/longjmp error handling mechanism may fail with Microsoft C++ since
they utilize the same stack-unwinding mechanism with C++ exception handling.
Lua calling longjmp after luaD_rawrunprotected returns causes unpredictable
behaviour. On Windows x64 build, this causes lua_error to crash the whole
StepMania program.

Lua provides the same macros to utilize C++ throw/catch, which effectively
solve the problem. Just specify Lua library as C++ code to enable them.

Reference: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/longjmp
2019-12-22 18:38:07 +08:00
Prcuvu 96db8d3be7 Update VDI format for Windows x64
Update VDI format to utilize 64-bit pointer types for stack tracing.
Revise mapconv and CrashHandlerChild.
Tested on both 32-bit and 64-bit builds to be working properly.
2019-10-05 05:08:20 +08:00
teejusb 7e3789b131 Integrate C++11 branch into 5_1-new 2019-06-22 12:35:38 -07:00
Colby Klein b4e02821e8 Revert "Improve handling of errors in lua functions and speed up calls. (#1427)"
This reverts commit f10e3ae36a.

(it was a joke PR, do not fear)
2017-04-04 17:21:55 -07:00
KyzentunandColby Klein f10e3ae36a Improve handling of errors in lua functions and speed up calls. (#1427) 2017-04-04 11:36:23 -07:00
Jason Felds dc94728628 Introduce cmake (min 2.8.12) to StepMania.
tl-dr: view the Build directory to see.

This is intended to replace the project files that we presently maintain
so that only a single set is needed instead of multiples.

The following setups were used for testing:

* Windows 8 and Visual Studio 2013 Desktop Express
* Windows 7 and Visual Studio 2012
* Mac OS X Mavericks and Xcode
* Ubuntu and makefiles
* Fedora 21 and makefiles

All three operating systems can generate projects, compile, link, and
run. Windows and Mac OS X users will find their compiled binary in the
same location as before, but Linux users will be surprised: it goes
straight into the root directory, along with a symlinked GtkModules.so
as appropriate. There is no more need for a manual symlinking step.

Known issues:

* At this time, MinGW likely does not work. Extra time will be needed.
* The WITH_JPEG option may go away, and we'll just always require it.
* Some linux libraries can use the system equivalents, but that is not up yet.

For more information, check out the Build directory.
2015-03-21 20:15:15 -04:00
Kyzentun 3fb36af157 Separate styles for players. Notefields positioned between margins. Edit mode works for kickbox. 2014-12-09 22:27:00 -07:00
Kyzentun ca4eb65b61 Added lerp, lerp_color, approach, and multiapproach lua functions. 2014-10-23 00:13:13 -06:00
KyzentunandJonathan Payne 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
KyzentunandJonathan Payne a74a49af78 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-08-02 00:38:18 -07:00
KyzentunandJonathan Payne 95fe1a17e9 Replaced every use of lua_call with RunScriptOnStack. Modified RunScriptOnStack to report an error to log and system message using a passed in context string. Modified every use of RunScriptOnStack to avoid crashing so that the reported error can be seen. 2014-08-02 00:38:17 -07:00
Kyzentun dcf819d297 Moved all sanity checking for OptionRowHandlerLua to a separate function so that a malformed row does not crash StepMania, and instead prints an error to the log file, and creates a row that does nothing. Added AllowAnything arg to CheckEnum. 2014-06-25 12:08:57 -06:00
Devin J. Pohly a9d5931533 Command/LuaManager: add legacy command parsing
Only enabled when compiling via CompileXNodeTree.
2014-02-20 10:59:49 -05:00
Ben "root" Anderson 5762f44c36 Someone missed a (SM_)UNIQUE_NAME and it didn't matter for the longest time because UNIQUE_NAME wasn't doing what it's supposed to 2013-10-24 20:02:08 -05:00
Ben "root" Anderson b3c76a3814 UNIQUE_NAME -> SM_UNIQUE_NAME (avoid conflict with MinGW headers) 2013-10-24 19:27:23 -05:00
Jason Felds 4bb0b28fc8 Good old warning fixes...how I missed thee. 2011-06-12 03:30:57 -04:00
Jason Felds b17536b649 [sm130futures] Windows builds fine w/Lua location.
Linux side needs to be updated...but still more to move.
2011-05-04 21:23:09 -04:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
Jason Felds b7a5fd9e90 More warning squishing.
Make a note of LuaManager: either define the needed items
or hide them away.
2011-03-14 14:26:29 -04:00
Jason Felds 1a1ff7d701 Give @briefs to all namespaces.
This will force recompilation of all files.
2011-02-19 12:09:03 -05:00
Jason Felds 2d76ee1023 Move some top comments to above the class.
The original attempt was not working for doxygen purposes.
2011-02-18 21:24:00 -05:00
Jason Felds 6f276da825 Document all FOREACH loops. 2011-02-18 21:16:11 -05:00
AJ Kelly dca9182138 various cleanup and commenting 2010-03-14 19:46:05 -05:00
AJ Kelly 5c5ef54a48 various changes from sm4 and sm-ssc (svn); see updated changelog for the full information 2010-02-18 23:17:24 -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