Commit Graph

36 Commits

Author SHA1 Message Date
Kyzentun f10e3ae36a Improve handling of errors in lua functions and speed up calls. (#1427) 2017-04-04 11:36:23 -07:00
Kyzentun Keeslala a888506b32 Expose the optional argument for ResolvePath to lua and add it to ResolveRelativePath. 2015-07-16 17:54:48 -06:00
Kyzentun Keeslala 829e861192 ActorUtil lua functions now check whether the actor has a name, which is required. 2015-06-11 19:36:25 -06:00
Kyzentun e22e99251e Added functions to ActorUtil for converting the extension to a file type and changed various places that had lists of extensions to use ActorUtil instead of duplicating the list of extensions. Added webm and wmv to list of video types. 2014-11-09 00:04:47 -07:00
Kyzentun f2fdaa0cf5 Massively improved Config Key/Joy Mappings screen.
Warning is dismissable now, and cursor does not start in a position that will change a setting.
New special actions added:  ClearToDefault, ReloadFromDisk, SaveToDisk, SetListMode.  Exit is a special action.
Player is prompted to save when exiting screen instead of saving after every action.
Special actions fallback on Graphics/SMC action if they don't have their own.
Moved SMC overlay to Graphics/SMC warning.
Metrics for configuring input lock time, warning autodismiss time, lines visible, and NoSetListPrompt autodismiss time.
Header row added for cursor to start on.
ScreenMapControllers2 deleted as obsolete.
BitmapText:maxwidth changed to factor the zoom of the actor into the calculation.
2014-09-04 01:23:28 -06:00
Kyzentun a41d9c0467 Changed GetAttrPath to not warn on optional paths. 2014-08-25 03:38:22 -06:00
Kyzentun 076d67132d Reverted BitmapText::LoadFromNode back to previous logic.
BitmapText now looks up font names in Fonts/ if the path doesn't resolve, so LoadFont is obsolete.
Added optional arg to ActorUtil::ResolvePath and GetAttrPath to make them not report an error when something is optional.
2014-07-29 12:09:40 -06:00
Kyzentun 273b76d3c7 ActorUtil::ResolvePath updated for error reporting. Changed BitmapText to work with either a font name or a path. ThemeManager::GetPathInfoRaw fixed to use correct error dialog. ThemeManager::GetPathInfo fixed to report correct error for missing theme elements. 2014-07-14 18:02:28 -06:00
Kyzentun 026f968fa4 Changed many uses of Dialog::OK and LOG->Warn to use ReportScriptError. 2014-07-07 00:39:27 -06:00
Kyzentun a7a98a690e 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-07-05 01:34:05 -06:00
Devin J. Pohly 77ece5a414 Process FT_Xml as legacy actors
Everything from here on out is edge cases.
2014-02-20 10:59:50 -05:00
Devin J. Pohly 60ce34cfaa Reconnect legacy sprites 2014-02-20 10:59:50 -05:00
Devin J. Pohly cd526b8e44 ActorUtil: add loading behavior for legacy actors
Filetypes are not yet linked in, so this shouldn't change anything.

The loading/guessing logic is ported from OpenITG.
2014-02-20 10:59:49 -05: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
Devin J. Pohly 80bf2f8d93 Re-add FT_Xml and FT_Sprite to FileType enum
Doesn't associate any behavior with them yet.
2014-02-20 10:59:48 -05:00
Devin J. Pohly a8018575b8 Use non-const XNode in ActorUtil::LoadFromNode
No-op aside from constness.  Need this later.
2014-02-20 10:59:48 -05:00
Devin J. Pohly 4298f2542d Check MakeActor rvs for NULL 2013-11-02 04:11:30 -04:00
Devin J. Pohly 4aee1ed738 Allow more movie types for bgchanges 2013-06-02 03:41:33 -04:00
Devin J. Pohly feb919f0bf Revert memory leak commits
5f7001e: "Added a new branch"
01456ed: "Fixed a lot of memory leaks"
dac4493: "Fixed all remaining memory leaks that I could figure out"
0792db7: "Removed the smnew macro and the call to _CrtSetDbgFlag()"

Some of these caused destructor-time problems due to static initialization
order fiasco and related issues.  Notably, the program would no longer exit on
OSX and had to be killed.

There were probably legitimate fixes in here, but since these are monolithic
commits it's too much work to extract them now.  Let's reapply them
individually and in the forward direction.
2013-04-27 00:05:14 -04:00
Jason Felds 0c4fe367cc Fix duplication symbol issue on Mac.
This may have affected Linux as well.
2013-04-21 09:31:45 -04:00
Shenjoku 0792db752a Removed the smnew macro and the call to _CrtSetDbgFlag() to get ready for
merging with the main branch.
2013-04-19 20:34:11 -07:00
Shenjoku 01456ed0b9 Fixed a lot of memory leaks caused by static globals never getting
deleted and some other objects not getting deleted properly due to missing
destructors.
2013-04-18 21:17:57 -07:00
Shenjoku 5f7001ef0a Added a new branch that implements support for outputting all memory leaks to
the debug output for the Debug and FastDebug project configurations. This
requires replacing all instances of new with a macro, smnew, that defines a
special form of new which outputs file and line number information along with
the memory leak details. This makes finding memory leaks much easier since you
can just double-click the leak in the output window and it will take you to the
line that caused it.
2013-04-17 20:42:29 -07:00
Devin J. Pohly 0b32d2bf9a ActorUtil: retry is simpler and more obvious with tail-calls 2013-01-25 18:08:00 -05:00
Jason Felds fbc605302d More goto removals.
Note: unsure if the path must be collapsed each time.
2013-01-24 22:38:24 -05:00
Devin J. Pohly bd0e2074ad replace ASSERT(0) with useful fail messages 2012-12-27 16:59:35 -05:00
Jason Felds a15cbc431d War on -Werror, part 14: More hodgepodge. 2012-12-27 12:45:04 -05:00
AJ Kelly 2f57a6cb78 actually get this to compile. 2012-07-20 23:51:28 -05:00
Jonathan Payne 7d9441cbfe update small new stuff, ActorUtil additions. 2012-07-20 12:54:39 -07:00
AJ Kelly c7fab6014f [Various] Allow loading of *.jpeg in addition to *.jpg. 2011-12-17 03:21:12 -06:00
Jason Felds 78043121a2 Allow for slightly better error message. 2011-05-20 22:34:34 -04:00
Jason Felds a085d0d1da Line endings...be normalized! 2011-03-17 01:47:30 -04:00
AJ Kelly f4a6c11160 I can update a comment 2010-08-18 02:40:37 -05:00
AJ Kelly 02c7037721 sm-ssc v1.0 Public Beta 1 code changes 2010-03-01 00:44:39 -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