Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 74e02e55ef make sure that large updates don't throw hibernation timing out of sync;
this also affects small updates, preventing small sub-frame timing errors;
if there's 10ms of hibernation left, and a 17ms update arrives, we should
update for only 7ms, not 17ms
2005-02-24 20:37:39 +00:00
Glenn Maynard a6c189529a obey m_fHibernateSecondsLeft, so a 3-second TipShowTime that
starts by delaying off-screen for 2.5 seconds can instead hibernate,2.5,
to avoid showing the first tip for only .5 seconds
2005-02-24 20:32:10 +00:00
Glenn Maynard aa279e07e2 lua 2005-02-24 20:04:46 +00:00
Glenn Maynard 3b993dfa08 Replace PopStack with FromStack as a basic overloaded function.
Move Push and FromStack into a namespace, so other files can add to it;
that way, we can say Push(1) or Push(Actor*), instead of Push(1) and
pActor->PushSelf(), allowing easier templating.
Add presently unused/untested LuaHelpers::ReadArrayFromTable.
2005-02-24 20:03:07 +00:00
Glenn Maynard 155a7bacbc rename NumArcadeStages pref to SongsPerPlay, to match the options menu
(that name is more consistent); duplicate a bit less info
2005-02-24 06:41:50 +00:00
Glenn Maynard 37b4f67c9f simplify 2005-02-24 06:30:56 +00:00
Glenn Maynard 6fbc047fcf Caution -> ShowCaution 2005-02-24 06:28:49 +00:00
Glenn Maynard 37fdbdede3 move MovePref; rename Caution -> ShowCaution and simplify 2005-02-24 06:28:15 +00:00
Glenn Maynard d7800a2822 UseDedicatedMenuButtons -> OnlyDedicatedMenuButtons (fixes
input options)
2005-02-24 06:20:04 +00:00
Glenn Maynard a9c73de5b6 fix ZIP thread-safety? 2005-02-24 06:07:49 +00:00
Glenn Maynard 185966bd35 settext takes a string 2005-02-24 01:31:21 +00:00
Glenn Maynard 2da21b16d4 rename m_iNumSingleSongsPlayed -> m_iNumTotalSongsPlayed
replace GetTotalNumSongsPlayed
2005-02-23 22:59:56 +00:00
Glenn Maynard c6de356dca Keep track of number of songs played. The other stats all count per-
player: if one person plays on Hard and one on Easy, then each will
be incremented.  That's useful, but it's also helpful to track the simple
number of songs played, irrespective of how many people were playing
at the time.
2005-02-23 22:52:03 +00:00
Glenn Maynard 9ff32c8d25 fix init 2005-02-23 22:45:01 +00:00
Glenn Maynard 456c2074e7 do "skip screen" tests in Init(), since Init() is still called even if we
SetNewScreen() in the screen ctor
2005-02-23 22:36:00 +00:00
Glenn Maynard bf85d3d3ac fix update 2005-02-23 21:13:09 +00:00
Glenn Maynard 31fc8bc1e7 asserts 2005-02-23 20:59:07 +00:00
Glenn Maynard 148bee1c51 re-update 2005-02-23 20:58:07 +00:00
Glenn Maynard 4eeb0fd884 cleanup 2005-02-23 19:29:49 +00:00
Glenn Maynard 22b6a821d5 tabs 2005-02-23 19:22:52 +00:00
Glenn Maynard b46daecd2f Commit stats to profiles before loading ScreenEvaluation. 2005-02-23 19:18:11 +00:00
Glenn Maynard 53f7fbd890 fix VC7 compile 2005-02-23 19:11:40 +00:00
Glenn Maynard fc1c863f8a omit semicolon, so REGISTER_ACTOR_CLASS(x) can't be parsed as
a prototype
2005-02-23 19:09:13 +00:00
Glenn Maynard 09a94d3c97 fix ScreenEditMenu 2005-02-23 18:56:50 +00:00
Glenn Maynard b51b0cfb4c Use Init() for all screens, so we can set state before the base class
members are loaded--they'll see resets, score finalization, etc.  It
also results in smaller code, due to a g++ bug that causes constructors
to be emitted several times.
2005-02-23 06:29:05 +00:00
Glenn Maynard 1213a2c9b0 assert earlier 2005-02-23 06:18:38 +00:00
Glenn Maynard b35d1c806e fix LuaReference::operator=
add LuaReference::IsNil
2005-02-23 06:17:29 +00:00
Glenn Maynard 94f87f9b58 simplify 2005-02-23 04:46:05 +00:00
Glenn Maynard 4e4b6df7aa move code to StatsManager::CommitStatsToProfiles 2005-02-23 04:32:45 +00:00
Glenn Maynard e912b47839 move code around, comment 2005-02-23 03:40:47 +00:00
Glenn Maynard dfce58ed98 fix commands being parsed multiple times; eg. OnCommand=@'"x," .. foo()' can only run foo() once 2005-02-23 00:22:23 +00:00
Glenn Maynard fd6a03977d allow default.xml for backgrounds 2005-02-22 22:13:24 +00:00
Glenn Maynard 350faf7e01 cleanup 2005-02-22 21:44:54 +00:00
Glenn Maynard b93a347be7 fix crash 2005-02-22 20:18:22 +00:00
Glenn Maynard 61064820b9 SetFromStack 2005-02-22 04:22:24 +00:00
Glenn Maynard f762300f49 PopStack() calls 2005-02-22 04:20:58 +00:00
Glenn Maynard 61d94e97d8 convert prefs to Preference 2005-02-22 04:00:14 +00:00
Glenn Maynard 6c9cc1b273 disable MemoryCardManager::FlushAndReset 2005-02-22 03:58:22 +00:00
Glenn Maynard 7677c9d88f GetPreference, SetPreference. (not yet decided if I want to bring Preference itself into Lua) 2005-02-22 03:36:51 +00:00
Glenn Maynard fda3a8208b cleanup, pass pn to lua function 2005-02-22 03:34:56 +00:00
Glenn Maynard 2350cc9b77 don't assert if LuaManager::RunScript is called with stuff on the stack 2005-02-22 03:27:06 +00:00
Glenn Maynard f406e52db3 add LuaReference::Unset; LuaExpression sets nothing by default (so LuaExpressoin is "free" if not actually used) 2005-02-22 03:25:38 +00:00
Glenn Maynard 8a5faeb248 fix copied references being set when the source reference was not 2005-02-22 03:22:56 +00:00
Glenn Maynard efeabffb8e allow calling Lua from GameCommand 2005-02-22 01:50:44 +00:00
Glenn Maynard baf8ef940e RunScript cleanup, default to 0 return values 2005-02-22 01:21:38 +00:00
Glenn Maynard 1a58675664 cleanup, OnlyDedicatedMenuButtons -> UseDedicatedMenuButtons 2005-02-22 01:20:52 +00:00
Glenn Maynard 7135178e3f fix SaveTo not being used 2005-02-21 20:18:42 +00:00
Glenn Maynard b960e51f42 Profile::IsCodeUnlocked 2005-02-21 06:59:50 +00:00
Glenn Maynard a25eb2443c lua 2005-02-21 06:51:04 +00:00
Glenn Maynard 1b7d1943e3 lua GetTotalNumSongsPlayed 2005-02-21 06:39:03 +00:00
Glenn Maynard 7e6aaf71cb fix warning 2005-02-21 06:29:22 +00:00
Glenn Maynard 04ca6e051a UnlockSystem -> UnlockManager 2005-02-21 06:29:04 +00:00
Glenn Maynard c691cef8a2 UnlockSystem.cpp -> UnlockManager.cpp 2005-02-21 06:24:47 +00:00
Glenn Maynard 9dbeb4eeef rename UnlockSystem -> UnlockManager 2005-02-21 06:23:57 +00:00
Glenn Maynard 74d27315d3 s/UnlockSystem.h/UnlockManager.h/ 2005-02-21 06:22:46 +00:00
Glenn Maynard ec75aae7ac cleanup 2005-02-21 06:16:52 +00:00
Glenn Maynard afd53b6eb8 rename UnlockSystem to UnlockManager 2005-02-21 06:13:31 +00:00
Glenn Maynard aef09d0872 quiet down 2005-02-21 03:48:39 +00:00
Glenn Maynard 4b726d2e23 disable whitelisting (will hopefully go away entirely); fix product trimming; better logging 2005-02-21 03:47:47 +00:00
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