This fixes a bug where opening the course editor and pressing down
immediately CTDs.
There is still a bug where sometimes a "random" stepchart has an
uninitialized StepsType. This can be reliably triggered by going to the
Course Editor, creating a new course, and exiting without changing
the course any. It will have one random song with an uninitialized
StepsType, causing a CTD.
Although AdjustSync would not alter anything in CourseMode, it would
sometimes announce it had. It would be better to simply remove the
Autosync line from the options in CourseMode, but I don't know how to
do that.
In edit mode, though, AdjustSync should only save to memory, giving the
user a chance to save later. This change adds a SongChanged message
to the MessageManager. Making the ScreenEdit class listen to this
message allows the AdjustSync class to mark a song as dirty rather than
saving it to disk when in edit mode.
R=steve chekoway
of a m_bDirty bit, not by reusing the m_bHasUndo bit. This fixes two bugs:
1) Save & revert wouldn't clear the dirty bit before
2) Some operations such as tempo and stop changes wouldn't make
the song dirty
R=Steve Chekoway
This is to provide parameters to loading Actor definitions, in a way that
does not need to be explicitly propagated to nested definitions; I want
loading a sub-definition to remain a simple function call with no mandatory
(prescribed) parameters. This provides a general context to pass information
to Lua about what it's loading, such as LoadingScreen.
These are scoped to the running thread, unlike global variables. This prevents
possible threading problems.
All thread variables are scoped: set a variable, do something, unset it; when
finished, all thread variables are unset.
These are no longer available after load. By design, to use these later,
use upvalues:
local color = lua.GetVar("color");
return Def.Quad {
OnCommand=cmd(diffuse,color);
}