Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 87ddfb4c41 Up until now, we've been backing up profile data by copying it to the
backup directory immediately after a successful load.  This ensures that
the data we're copying is valid, so after a successful copy, the backup
is valid, too.  This has a couple problems:

 - Copying takes a while.  It's much faster to move data.
 - Data shouldn't be written during a profile read.  Players should be able
   to assume that it's safe to remove the memory card at any time except
   when the game is explicitly saving.
 - Copying good data from one place to another is just as prone to error as
   initially writing it.  It's at least as easy for the backup copy to fail
   and result in a bad backup as it is for a save to fail in the first place.

Instead, when we successfully load profile data (and not from a backup),
set a flag.  Later, when we save over that data, we'll clear the flag and
move the data we're about to overwrite to the backup.
2005-09-29 00:33:22 +00:00
Glenn Maynard 14ab43b2aa RageFileManager::MoveFile 2005-09-28 23:00:34 +00:00
Glenn Maynard 04ec4e66f4 add optional RageFileDriver::MoveFile override; implement for RageFileDriverDirect and RageFileDriverTimeout 2005-09-28 22:59:12 +00:00
Glenn Maynard ca1309c49d basealpha 2005-09-28 03:50:00 +00:00
Glenn Maynard c4150955bd split ScreenRanking specializations into ScreenRankingScroller (for
PAGE_TYPE_ALL_STEPS, PAGE_TYPE_*_COURSES) and ScreenRankingLines
(PAGE_TYPE_CATEGORY, PAGE_TYPE_TRAIL).

Use DynamicActorScroller for ScreenRankingScroller; reduces overhead
significantly.
2005-09-27 19:10:09 +00:00
Glenn Maynard b5006f6e09 cleanup weird includes 2005-09-27 19:01:53 +00:00
Glenn Maynard aab04cc13f update 2005-09-27 18:14:17 +00:00
Glenn Maynard 34116d9f36 DynamicActorScroller 2005-09-27 18:13:00 +00:00
Glenn Maynard ab8ed823b6 add experimental DynamicActorScroller. This allows creating lists like
ScreenCredits and ScreenRanking without constructing dozens or hundreds
of actors, which saves a lot of memory and is easier to manipulate.  This could
also be used to support CourseContentsLists for long courses cheaply, etc.
2005-09-27 07:55:14 +00:00
Glenn Maynard 18f40a2b8f Separate "number of Actors" from "number of items": allow having more items than
actors.  Derived classes do this by overriding ShiftSubActors and setting m_iNumItems
to something other than m_SubActors.size().
2005-09-27 07:49:12 +00:00
Glenn Maynard 384e26cbec ActorScroller doesn't SetDestinationItem anymore, but we still want this here and not in ActorScroller. 2005-09-27 07:40:34 +00:00
Glenn Maynard 4ae883a5c6 cleanup 2005-09-27 07:34:45 +00:00
Glenn Maynard 75484e193f cleanup: add children before calling Load 2005-09-27 05:40:09 +00:00
Glenn Maynard 71931135a3 implement BitmapText::operator= 2005-09-27 05:38:14 +00:00
Glenn Maynard cc737b0835 fix message 2005-09-27 03:32:14 +00:00
Glenn Maynard 71ad5179b4 Don't scroll by default; do it in OnCommand. 2005-09-27 03:20:07 +00:00
Glenn Maynard e1cf2c5484 add lua bindings 2005-09-27 03:18:57 +00:00
Glenn Maynard 2436ef26db simplify 2005-09-26 23:01:24 +00:00
Glenn Maynard e3d5437031 fix up names 2005-09-26 21:04:02 +00:00
Glenn Maynard 5ca840d259 simplify algebraically; nudge both cases to look the same 2005-09-26 21:03:09 +00:00
Glenn Maynard 9110303bff equivalent and easier to understand: fCurrentItem is simply centered 2005-09-26 20:43:45 +00:00
Glenn Maynard e24e9d8c99 cleanup 2005-09-26 19:53:11 +00:00
Glenn Maynard 1178d1df75 cleanup 2005-09-26 19:52:04 +00:00
Glenn Maynard a1d9d49d6c simplify: an ActorScroller is always an ActorScroller 2005-09-26 19:35:15 +00:00
Glenn Maynard 45c50c854d BGAnimation is no longer used for scrollers; use XML. 2005-09-26 19:34:07 +00:00
Glenn Maynard d3ecba30a0 cleanup test 2005-09-26 19:08:45 +00:00
Glenn Maynard 163aa1366a cleanup 2005-09-26 19:08:15 +00:00
Glenn Maynard d504a9f798 update 2005-09-25 02:30:29 +00:00
Glenn Maynard b6c84d5abb do credits screen in XML (can almost remove this; just the announcer ...) 2005-09-25 01:45:37 +00:00
Glenn Maynard a0da988918 GetRandomSongBackground 2005-09-25 01:41:26 +00:00
Glenn Maynard 3aa06cdf34 simplify 2005-09-24 23:54:24 +00:00
Glenn Maynard 3a185cc977 yuck. ActorScroller doesn't need UseScroller, but BGAnimation does. Move
the hack into BGAnimation, which is on its way out anyway.
2005-09-24 23:43:06 +00:00
Glenn Maynard b389ded342 Remove UseScroller; it's a holdover from when ActorScroller was part of
ActorFrame.  Now, if the class is ActorScroller, we always want a scroller.
2005-09-24 23:25:25 +00:00
Glenn Maynard a3bdc2e5ff move SetSize to Actor 2005-09-24 06:57:03 +00:00
Glenn Maynard 718cf1787a simplify 2005-09-24 04:04:01 +00:00
Glenn Maynard dbbe3c8af1 Fix mask. Traditionally, quads have been a little unusual: they have a size
of 1x1, and are sized by zooming.  That's unintuitive, commonly causes
problems when used in conjunction with other stretch effects, and all we have
to do is SetHeight/SetWidth to set the actual size, which will make it behave
exactly like any other sprite.  This one didn't work because m_exprTransformFunction
overrides the zoom, usually resetting it to 1x1.
2005-09-24 04:02:27 +00:00
Glenn Maynard 4722e1ca2e fix comment 2005-09-24 03:48:30 +00:00
Glenn Maynard f9258c60b9 fix div/0 in LuaExpressionTransform::PositionItem 2005-09-24 03:29:02 +00:00
Glenn Maynard 40251903ec legacy: bPosition is always true 2005-09-24 02:35:53 +00:00
Glenn Maynard 05514ab59e unused 2005-09-24 02:34:34 +00:00
Glenn Maynard c27ba8ca2f Don't SetZ masks; it breaks things in 3d. It's up to the renderer to activate
z-bias in BLEND_NO_EFFECT.
2005-09-24 02:31:55 +00:00
Glenn Maynard 7dce50ffbc simplify, don't store extra state 2005-09-24 02:18:09 +00:00
Glenn Maynard 615c470354 cleanup 2005-09-24 00:54:31 +00:00
Glenn Maynard 0581e0b3d0 const fix
hide implementation
2005-09-24 00:51:35 +00:00
Glenn Maynard 8b9f7c2889 sLine is a string, not a vector 2005-09-23 02:27:23 +00:00
Glenn Maynard 6ea2f37a36 Change MenuUp(pn,type) overrides to MenuUp(IEP), so info like DeviceI.ts is always accessible. 2005-09-23 00:44:52 +00:00
Glenn Maynard df8153cf7b cleanup 2005-09-23 00:13:04 +00:00
Glenn Maynard 2f3905325d style cleanup 2005-09-23 00:12:32 +00:00
Glenn Maynard 76e6382e7d Fix up repeat logic: instead of waiting g_fTimeBeforeSlow for the first repeat,
it was waiting g_fTimeBeforeSlow+g_fTimeBetweenRepeats, ignoring the
first repeat).  Adjust TIME_BEFORE_SLOW_REPEATS so the rate doesn't
actually change.  Set correct timestamps for IET_REPEAT events.
2005-09-22 23:59:31 +00:00
Glenn Maynard 87a9243dc5 use fNewHoldTime here, not fOldHoldTime 2005-09-22 23:53:50 +00:00
Glenn Maynard ee9fd1ecc2 remove fast repeat rate. It's the same as the slow rate, and nothing uses it. (IET_FAST_REPEAT kept for now, since some code uses it.) 2005-09-22 23:22:18 +00:00
Glenn Maynard eb8563ecd9 replace music (probably temps) 2005-09-22 05:47:26 +00:00
Glenn Maynard 86001c793c fix warning 2005-09-22 03:10:47 +00:00
Glenn Maynard 5d450f7f57 ranking update 2005-09-22 03:03:05 +00:00
Glenn Maynard 465c2e71ff pull out common code, prefer to set stuff up in Init, unfold conditionals; support
locked courses while we're at it
2005-09-22 01:49:07 +00:00
Glenn Maynard 602a62325c use GenericTweenOn(). (Just make sure ActorUtil::LoadAllCommands is
called and the actor is added to the tree, and OnCommand will be played.)
2005-09-22 01:28:56 +00:00
Glenn Maynard dae80d0805 add GenericTweenOn() 2005-09-22 01:27:00 +00:00
Glenn Maynard b7d8a64199 unneeded; these are children of m_ListScoreRowItems 2005-09-22 01:22:16 +00:00
Glenn Maynard 701aff5ee8 avoid GetPathS during BeginScreen 2005-09-22 01:17:35 +00:00
Glenn Maynard 026f13f765 Load commands in the template, not later when we call ON_COMMAND
on the copies.  This is a fairly major optimization: we only load the commands
once, rather than dozens of times, and we save memory, since the copies will
just take references to the generated Lua functions instead of making dozens
of functions.
2005-09-22 00:21:24 +00:00
Glenn Maynard 8e926829fc deep copy AutoActors 2005-09-22 00:19:21 +00:00
Glenn Maynard fb49d6a41a optimize, simplify 2005-09-22 00:08:59 +00:00
Glenn Maynard dce23e31b4 cleanup 2005-09-21 21:56:36 +00:00
Glenn Maynard 9960d6dd9f implement ScreenRanking::BeginScreen 2005-09-21 21:52:31 +00:00
Glenn Maynard 5e0680ed05 remove banner frame (do that in the overlay)
use AutoActor
merge code and metrics
2005-09-21 21:42:07 +00:00
Glenn Maynard 0293b5c205 Run SwitchPageCommand instead of OnCommand between pages (simpler and
more flexible).  Cleanup.
2005-09-21 21:14:09 +00:00
Glenn Maynard ec97b839e2 update 2005-09-21 20:54:57 +00:00
Glenn Maynard 67a4390f07 simplify 2005-09-21 20:54:28 +00:00
Glenn Maynard bb01b4c26b add GetCoursesToShowRanking 2005-09-21 20:53:20 +00:00
Glenn Maynard ff6b55fb17 Merge metrics and common code. 2005-09-21 20:43:07 +00:00
Glenn Maynard f6c3263f24 phase out bShow*. Still a lot of code, but the code path is more obvious. 2005-09-21 20:16:53 +00:00
Glenn Maynard 1b6574d241 phase out bShow*. Don't load and then hide; when possible, just don't load it
to begin with.  (This code assumed that we'd change PageTypes in the middle,
but that hasn't been allowed and hasn't been used, and it complicates things
too much.)
2005-09-21 19:48:56 +00:00
Glenn Maynard d47b926f05 Don't broadly Reset() actors; it's too heavy-handed. Just make sure that actor
commands set state properly.

Remove some SetHidden() calls that assumed Reset() would un-hide them.
2005-09-21 19:45:40 +00:00
Glenn Maynard 86449bba80 PageType is a whole-screen property, not per-page. Eliminates m_sprPageType
hack (avoid loading stuff mid-screen).
2005-09-21 19:19:35 +00:00
Glenn Maynard fb2fa37cc6 minor revert 2005-09-21 19:13:40 +00:00
Glenn Maynard 3ea889296c replace mutually-exclusive metrics with Type, like eval 2005-09-21 19:13:13 +00:00
Glenn Maynard 386cdfe707 use SetZTestMode to enable masking; only use SetUseZBuffer for regular zbuffering (for models) 2005-09-21 18:21:14 +00:00
Glenn Maynard 35b1059e05 fix x/y set in InitCommand sometimes overridden 2005-09-21 17:45:34 +00:00
Glenn Maynard a288441843 use BeginScreen 2005-09-21 17:23:11 +00:00
Glenn Maynard 1c158bcc6c fix screens not set when reused 2005-09-21 17:14:43 +00:00
Glenn Maynard be73671d02 cleanup 2005-09-19 09:55:05 +00:00
Glenn Maynard 075b132f89 nudge RebuildWheelItems and RebuildMusicWheelItems together 2005-09-19 09:48:41 +00:00
Glenn Maynard d2616b08d9 nudge RebuildWheelItems and RebuildMusicWheelItems together 2005-09-19 09:37:47 +00:00
Glenn Maynard 3dac531b1d nudge RebuildWheelItems and RebuildMusicWheelItems together 2005-09-19 09:36:21 +00:00
Glenn Maynard 4f1e6add01 remove function overload that doesn't change anything
cleanup
2005-09-19 09:33:05 +00:00
Glenn Maynard 646afd1051 remove "inline" (let the compiler decide) 2005-09-19 09:30:15 +00:00
Glenn Maynard 6a0c91e07e STATE_SELECTING_GENERIC -> STATE_SELECTING 2005-09-19 09:27:43 +00:00
Glenn Maynard ccc567b85c There were two "selecting" states, and several functions from WheelBase duplicated
in MusicWheel that just had one replaced with the other.  Merge them.  Multiple
selection "modes" are implemented by having different sorts containing different
selections, not with a high-level mode.
2005-09-19 09:26:42 +00:00
Glenn Maynard 97ddf1ca86 cleanup 2005-09-19 09:20:57 +00:00
Glenn Maynard 3876bc1a2c quick style pass 2005-09-19 09:19:54 +00:00
Glenn Maynard 142fc408ab fix "holding left and pressing right ignores wheel lock" 2005-09-19 09:01:21 +00:00
Glenn Maynard 5f9c33fd01 cleanup 2005-09-19 08:49:09 +00:00
Glenn Maynard 1df0a43b3f implement generic high-level input debouncing 2005-09-19 07:09:55 +00:00
Glenn Maynard e308f7e6ea cleanup 2005-09-19 04:51:49 +00:00
Glenn Maynard 393b4c55f9 cleanup 2005-09-18 11:43:32 +00:00
Glenn Maynard 31a1f078ea Clarify the select path: when select is pressed, stop the wheel immediately.
Previously, if select was pressed while holding left/right, it would stop on the
next repeat.  That's OK, since the button repeat is much faster than the wheel,
but it's confusing.
2005-09-18 11:41:44 +00:00
Glenn Maynard f60111be68 cleanup: if neither pressed, stop. This probably shouldn't happen; it used
to happen due to the bSelectIsPressed case.
2005-09-18 11:31:49 +00:00
Glenn Maynard 2822b320fd compile fixes 2005-09-12 17:49:53 +00:00
Glenn Maynard 20d0d2f2e6 done by ScreenWithMenuElements::BeginScreen 2005-09-12 02:13:22 +00:00
Glenn Maynard 20a08d0942 cleanup 2005-09-12 02:07:56 +00:00