Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 5a75be89ec fix gcc warnings, maybe other problems 2005-02-21 03:18:08 +00:00
Glenn Maynard ee54b18b7c fix gcc warnings 2005-02-21 03:16:15 +00:00
Glenn Maynard 456c45473e ScreenSelectMaster defaults 2005-02-20 20:39:11 +00:00
Glenn Maynard df6c246af6 add settext lua method 2005-02-20 07:46:52 +00:00
Glenn Maynard e8ebcef410 add ConfOption::AddOption 2005-02-20 06:27:50 +00:00
Glenn Maynard 54f469c84e write extra mappings
don't write empty fields
2005-02-20 05:00:56 +00:00
Glenn Maynard 07f941f734 allow more than 3 mappings per GameInput (but don't show them in
ScreenMapControllers)
2005-02-20 04:53:57 +00:00
Glenn Maynard e9a6b578e3 fix (mostly bogus) warnings 2005-02-20 04:49:36 +00:00
Glenn Maynard f913346852 MoveMap for IPreference* 2005-02-20 04:20:46 +00:00
Glenn Maynard c1d741a54b inline 2005-02-20 03:43:32 +00:00
Glenn Maynard b90a6f1747 inline 2005-02-20 03:09:14 +00:00
Glenn Maynard 11f3514275 simplify 2005-02-20 02:56:51 +00:00
Glenn Maynard 3c49514422 FromString/ToString for strings (no-op) 2005-02-20 02:55:31 +00:00
Glenn Maynard 3c45bca547 fix freeze duration rendering 2005-02-20 01:18:03 +00:00
Glenn Maynard bb1e676460 fix options menu playing music too early 2005-02-20 00:22:37 +00:00
Glenn Maynard b8a9d0384a no, really, don't append a newline here 2005-02-19 10:09:20 +00:00
Glenn Maynard 410679fb44 apply commands to inactive players, too 2005-02-19 09:56:53 +00:00
Glenn Maynard 014a3d65b1 bring back old merged SongsPerPlayOrEvent conf option 2005-02-19 09:16:16 +00:00
Glenn Maynard 23dccd1af2 GzipString, GunzipString 2005-02-19 07:50:00 +00:00
Glenn Maynard d1fb6a41eb NotesWriterSM::GetEditFile 2005-02-19 07:48:16 +00:00
Glenn Maynard 3fb7238ac0 SMLoader::LoadEditFromBuffer, SMLoader::LoadEditFromMsd 2005-02-19 07:46:42 +00:00
Glenn Maynard d9da6cc9fc MsdFile::ReadFromString 2005-02-19 07:45:12 +00:00
Glenn Maynard 65b82c3e53 accessors 2005-02-19 01:59:31 +00:00
Glenn Maynard 8884936a17 const fix 2005-02-18 03:07:22 +00:00
Glenn Maynard ffcdaeb515 fix OnCommand not being sent 2005-02-18 00:13:53 +00:00
Glenn Maynard 2270e62eb4 fix expressions (mysterious forces contrived to make this appear to work) 2005-02-17 08:41:13 +00:00
Glenn Maynard e0853e489d fix g++ compile 2005-02-17 06:54:17 +00:00
Glenn Maynard 16969b1570 \ 2005-02-17 06:30:02 +00:00
Glenn Maynard 1601912c5a FirstUpdateCommand 2005-02-17 06:16:09 +00:00
Glenn Maynard 8a04a3eeeb Add ScreenWithMenuElements::FirstUpdateCommand, a Lua expression
that gets called on first update.  Note the difference between
using ThemeMetric<LuaExpression> and ThemeMetric<ActorCommands>:
with ActorCommands, you get the special, backwards-compatible
parsing; with LuaExpression, only a regular expression is parsed.

You can still only (cleanly) call one function, since "return"
is prepended: if you say "f() g()", it'll try to run "return f() g()".
I tried having a separate type for "expression" and "script", but
it seems confusing to have some metrics parsed as scripts and
some as expressions, allowing multiple functions in only specific
metrics.  If you want to do that much, it's cleaner to create
a function and call it, anyway.  If you just want to add diagnostics
quickly, you can say "Foo=(function() x() y() z() end)()".  (I might
revisit this later.)
2005-02-17 06:13:23 +00:00
Glenn Maynard 01ae30ddd9 Add ThemeManager::GetMetric(LuaExpression) 2005-02-17 06:09:08 +00:00
Glenn Maynard 6f88bf18c0 Cleanup: change RunExpression to a RunScript helper. Never tack on
"return "; the caller can do that if it wants.  Instead, just act as a helper to
display a generic dialog on error.
2005-02-17 05:46:31 +00:00
Glenn Maynard d66163ab74 fix error dialog displayed twice: error handling for RunScript is up to the caller 2005-02-17 05:32:50 +00:00
Glenn Maynard e16b72f5ed Actor::RunCommands, etc. can take any LuaReference, not just
ActorCommands
2005-02-17 05:12:23 +00:00
Glenn Maynard 725a50985f add constructor 2005-02-17 04:59:54 +00:00
Glenn Maynard 72435f148c explicit types 2005-02-17 04:55:41 +00:00
Glenn Maynard d6b13fb134 pronoun 2005-02-17 00:44:26 +00:00
Glenn Maynard 8a62baa1d1 cleanup 2005-02-17 00:41:30 +00:00
Glenn Maynard 45159de835 cleanup 2005-02-17 00:00:04 +00:00
Glenn Maynard 7a7233140b fix makefile 2005-02-16 22:09:45 +00:00
Glenn Maynard ce1e6203ee license 2005-02-16 08:37:08 +00:00
Glenn Maynard f710506c6c add TableMetricLookup 2005-02-16 07:50:46 +00:00
Glenn Maynard 97498a4a3e allow specifying the default 2005-02-16 06:50:37 +00:00
Glenn Maynard d5cfb74709 split GameState::ApplyGameCommand from GameState::ApplyCmdline;
expose to Lua
2005-02-16 06:24:33 +00:00
Glenn Maynard f4cd02eca8 utils 2005-02-16 06:12:48 +00:00
Glenn Maynard 44b3d97b38 not local 2005-02-16 05:57:40 +00:00
Glenn Maynard cdf0626ba5 OptionRowTable 2005-02-16 05:56:13 +00:00
Glenn Maynard ac1d2de3ea bring back self parameters 2005-02-16 05:26:11 +00:00
Glenn Maynard 1db4aa2600 SetSelections -> SaveSelections, GetSelections -> LoadSelections 2005-02-16 04:47:01 +00:00
Glenn Maynard 073e891589 SetSelections -> SaveSelections, GetSelections -> LoadSelections to avoid
confusion with OptionRow
2005-02-16 04:45:47 +00:00
Glenn Maynard e67d2eee02 zero selections 2005-02-16 04:12:07 +00:00
Glenn Maynard d470fe11fe fix assertion failure: SetSelections and GetSelections (currently) take no
"self" parameter--you can store the table index in an upvalue if you need
it.  (I havn't worked with this enough, yet, to tell which method is better ...)
2005-02-16 03:45:28 +00:00
Glenn Maynard 51d23bb03c fix comments 2005-02-16 03:40:44 +00:00
Glenn Maynard 6cb8d3fe64 GetMachineProfile 2005-02-16 02:48:50 +00:00
Glenn Maynard 0a0da9809e allow saving a lua table for each profile 2005-02-16 02:46:43 +00:00
Glenn Maynard 69e57a659e GetMachineProfile 2005-02-16 02:45:23 +00:00
Glenn Maynard b8605eebf0 fix warning (atof returns a double, not a float) 2005-02-16 02:42:57 +00:00
Glenn Maynard 69383384bf add LuaData::Serialize, LuaData::LoadFromString; fix stack overflow 2005-02-16 02:42:05 +00:00
Glenn Maynard 4376c828e5 fix LuaData::BeforeReset 2005-02-16 01:46:29 +00:00
Glenn Maynard 6175a16f24 Add LuaData, a reference type that restores itself over Lua resets. This
works only with static data types that can be restored: tables, strings,
numbers, and not functions, userdata, etc.
2005-02-16 00:38:40 +00:00
Glenn Maynard 40fde98efa add license--just as important for Lua scripts as C++ source 2005-02-16 00:15:36 +00:00
Glenn Maynard 0d8a3723ef add serialization script 2005-02-16 00:14:17 +00:00
Glenn Maynard 8584cbc0d7 when compiling a script from a file, don't dump the entire contents of the
script to the log/dialog
2005-02-15 07:17:49 +00:00
Glenn Maynard 0a0ad8714c allow LuaManager::RunExpression to return a function
show the filename when a full script has an error
use LuaManager::RunExpression in LuaExpression
2005-02-15 02:15:26 +00:00
Glenn Maynard 004d774889 simplify 2005-02-15 02:07:59 +00:00
Glenn Maynard 2103eb0531 bring RunExpression and RunScript closer together 2005-02-15 02:02:08 +00:00
Glenn Maynard 22eee805b9 show the resulting invalid color value when a color metric using a Lua
function returns garbage, not the text of the lua call
2005-02-15 01:53:30 +00:00
Glenn Maynard 831e7c1825 remove LuaManager::PushNopFunction(). Just compile an empty function;
it'll be tiny, anyway.
2005-02-15 01:49:03 +00:00
Glenn Maynard db9cd87c34 fix push 2005-02-14 05:57:40 +00:00
Glenn Maynard 0ba4a0b715 test menu 2005-02-14 02:13:55 +00:00
Glenn Maynard bcd60d35cf menu sample code 2005-02-14 02:12:37 +00:00
Glenn Maynard b8e863610f ThemeMetric.h 2005-02-14 01:47:10 +00:00
Glenn Maynard 3c65876ed3 Lua interface to creating options menu rows. The code's a little ugly;
cleanups and samples coming in a bit.
2005-02-14 01:42:21 +00:00
Glenn Maynard 33b74d0fc3 simplify 2005-02-14 01:38:57 +00:00
Glenn Maynard 230ba5b9a9 allow GetOneSelection to return -1 when there are none selected 2005-02-14 01:36:54 +00:00
Glenn Maynard ab39fa278e fix compile 2005-02-14 01:33:53 +00:00
Glenn Maynard e24c79048e add LuaReference::GetLuaType, LuaExpression 2005-02-14 01:31:10 +00:00
Glenn Maynard 6c5450edd8 ThemeMetric.h 2005-02-14 01:25:01 +00:00
Glenn Maynard e4448c7484 metrics 2005-02-14 01:18:10 +00:00
Glenn Maynard e73a167761 fix positioning for hidden items 2005-02-14 01:16:08 +00:00
Glenn Maynard 470b308fe0 comment 2005-02-13 20:10:27 +00:00
Glenn Maynard 12e7f2d5da comments 2005-02-13 04:48:05 +00:00
Glenn Maynard bdf3e4ddd8 warning: `class ProfileManager' has virtual functions but non-virtual destructor 2005-02-13 04:14:33 +00:00
Glenn Maynard 7a2a367522 warning: `class GameState' has virtual functions but non-virtual destructor 2005-02-13 04:12:02 +00:00
Glenn Maynard fe6cd41543 update
add LuaManager::CreateTableFromArray, LuaManager::ReadArrayFromTable
2005-02-13 04:09:28 +00:00
Glenn Maynard 11002ff5b2 ActorCommands is a LuaReference 2005-02-13 04:07:29 +00:00
Glenn Maynard 40f82442b0 add assert (because ActorCommands.PushSelf() no longer does it) 2005-02-13 04:06:14 +00:00
Glenn Maynard 4a25a4b43a update 2005-02-13 04:04:43 +00:00
Glenn Maynard c423e070aa Move Lua reference handling into a generic base class. 2005-02-13 04:00:48 +00:00
Glenn Maynard 97277824d9 comment, cleanup (dear god this is boring) 2005-02-13 03:50:51 +00:00
Glenn Maynard 2412c73b22 comment, cleanup 2005-02-13 03:40:37 +00:00
Glenn Maynard 5531efed09 comments, cleanup 2005-02-13 03:27:21 +00:00
Glenn Maynard 0e8b4b8371 comments, cleanup 2005-02-13 03:21:22 +00:00
Glenn Maynard f07ac5cf74 comment, cleanup 2005-02-13 03:13:33 +00:00
Glenn Maynard 91e8e6a430 comment 2005-02-13 03:08:45 +00:00
Glenn Maynard fa32951449 cleanup 2005-02-13 03:05:19 +00:00
Glenn Maynard 3380df27cd cleanup, const 2005-02-13 03:00:19 +00:00
Glenn Maynard 55c67ef857 shorten (the extra stuff in this was out of date, anyway; best to keep the brief description simple enough that it doesn't easily become outdated) 2005-02-13 02:57:11 +00:00
Glenn Maynard de99ad0e03 style cleanup; move the license text to the bottom 2005-02-13 02:52:44 +00:00
Glenn Maynard b86576a6d7 style cleaup 2005-02-13 02:50:14 +00:00