Glenn Maynard
2aecc20155
don't call Init from LoadMenu; split out SetOKMessage, SetCancelMessage to allow reusing screen without using LoadMenu (which is cheap but not free)
2005-07-19 21:39:25 +00:00
Glenn Maynard
798c100457
Init -> LoadMenu, to maintain the normal virtual Init(), and allow calling LoadMenu again without reloading the whole screen
2005-07-19 21:35:38 +00:00
Glenn Maynard
c84ff55345
remove m_Background; use underlay
2005-07-19 21:12:01 +00:00
Glenn Maynard
fb1e7325b2
background -> underlay
2005-07-19 21:09:30 +00:00
Glenn Maynard
845c857962
ScreenMiniMenu::BeginScreen
2005-07-19 21:05:57 +00:00
Glenn Maynard
a10e6f3d36
handle re-calling InitMenu (fairly cheaply)
2005-07-19 21:03:56 +00:00
Glenn Maynard
019000a40e
remove m_bIsTransparent
2005-07-19 21:01:50 +00:00
Glenn Maynard
61bf554727
remove IsTransparent. Since we have a separate background layer now, every screen is transparent.
2005-07-19 20:59:15 +00:00
Glenn Maynard
38566406ec
typo
2005-07-19 18:58:12 +00:00
Glenn Maynard
9fb747a820
simplify
2005-07-19 18:56:50 +00:00
Glenn Maynard
f9e40278dd
fix uninitialized
2005-07-19 08:52:36 +00:00
Glenn Maynard
2dd114942b
cleanup
2005-07-19 08:36:02 +00:00
Glenn Maynard
56fa4fe4b2
Don't create a TempState for every actor. If we use it, we always use it
...
right away, inside DrawPrimitives(). This cuts down the size of Actor by
about 25%.
2005-07-19 07:54:32 +00:00
Glenn Maynard
df19b084fd
sanity check (m_pTempState points somewhere in the other actor)
2005-07-19 07:52:11 +00:00
Glenn Maynard
2e05545ec7
fix memleak
2005-07-19 07:46:45 +00:00
Glenn Maynard
8f8f8d7782
compile fix
2005-07-19 06:54:49 +00:00
Glenn Maynard
bd26915d01
don't use deque here; too big for Actor
...
(not a performance issue; we don't queue up tons of messages. only use
deque when you really need constant time access to the beginning, eg.
for large objects, since deque has both memory overhead and is much
slower than vector for access to the end of the list, since it can't reserve like
vector can)
2005-07-19 06:34:00 +00:00
Glenn Maynard
c05cf4806a
yuck. implement copy ctor to copy tweening queue
2005-07-19 06:21:10 +00:00
Glenn Maynard
a305c072c0
cleanup
2005-07-19 06:20:18 +00:00
Glenn Maynard
c4495e3900
Don't use deque in Actor; it allocates too much. Store pointers; moving
...
pointers around is cheap enough.
2005-07-19 05:56:36 +00:00
Glenn Maynard
1783fe71ef
simplify
2005-07-19 03:15:24 +00:00
Glenn Maynard
daf3688409
We don't actually care that GetMicrosecondsSinceStart returns a time since
...
start; only that it's self-consistent. If we want time since start, we
can record it ourself instead of making platform-specific code do it, and
only GetTimeSinceStart needs to do that, not RageTimers.
2005-07-19 03:09:20 +00:00
Glenn Maynard
71c765ba66
warnings
2005-07-19 00:55:02 +00:00
Glenn Maynard
c23d0ae90e
fix warning
2005-07-19 00:51:54 +00:00
Glenn Maynard
e1fdd56297
not virtual
2005-07-19 00:46:48 +00:00
Glenn Maynard
a5bed04ed3
Copy()
2005-07-19 00:18:32 +00:00
Glenn Maynard
2f8f782c47
use Copy()
2005-07-18 23:01:06 +00:00
Glenn Maynard
47489964d2
copy children if m_bDeleteChildren; this allows copying ActorFrames, including
...
ones loaded from XML
2005-07-18 22:59:34 +00:00
Glenn Maynard
ab07232a8b
undo unintentional behavior change; comment it for next time
2005-07-18 22:58:06 +00:00
Glenn Maynard
55d6382c49
add virtual Copy() to Actor
2005-07-18 22:00:19 +00:00
Glenn Maynard
d7c7780f65
ShowUnderlines=1
2005-07-18 21:41:07 +00:00
Glenn Maynard
576a82f895
metrics
2005-07-18 21:26:16 +00:00
Glenn Maynard
5bf4e9323f
don't set up actors that we're not using; we create lots of OptionRows
2005-07-18 21:25:07 +00:00
Glenn Maynard
cece1f837c
don't set up actors that we're not using; we create lots of OptionRows
2005-07-18 21:03:43 +00:00
Glenn Maynard
d34a45252c
fix accessing unloaded m_MenuTimer
2005-07-18 20:42:13 +00:00
Glenn Maynard
f7af079f63
noisy
2005-07-18 19:49:46 +00:00
Glenn Maynard
5856678140
forgotton commit
2005-07-18 19:30:36 +00:00
Glenn Maynard
9ef48d4a48
reuse preloaded sounds
2005-07-18 19:09:31 +00:00
Glenn Maynard
2493236cea
add reference counting for preloaded sounds
...
This doesn't give full refcounting: loading a sound that isn't preloaded
will still go through a full load (eg. initting Vorbis, etc). This handles the
most expensive case, where the whole sound is loaded. This case is
easy because we can make free copies, and track the number of copies
remaining to handle cleanup.
2005-07-18 19:08:28 +00:00
Glenn Maynard
c3ff27796a
add GetReferenceCount
2005-07-18 19:06:32 +00:00
Glenn Maynard
c76799ffa0
do slow loads in ScreenOptions::Init, not ScreenOptions::InitMenu
2005-07-18 03:42:10 +00:00
Glenn Maynard
e2086bcb5b
import options in ScreenOptions::BeginScreen, not ScreenOptions::InitMenu, so
...
we'll re-import if the screen is re-pushed
2005-07-18 03:41:15 +00:00
Glenn Maynard
a087e02054
cleanup
2005-07-18 03:16:18 +00:00
Glenn Maynard
6d89d0325c
cleanup
2005-07-18 02:47:16 +00:00
Glenn Maynard
cc00fbb7ef
simplify
2005-07-18 02:45:40 +00:00
Glenn Maynard
a37a18aada
unneeded
2005-07-18 02:42:26 +00:00
Glenn Maynard
15558d4cac
cleanup: don't need a special case for this anymore
2005-07-18 02:39:51 +00:00
Glenn Maynard
93f9d0e3e5
cleanup
2005-07-18 02:36:03 +00:00
Glenn Maynard
5161a06e08
simplify
2005-07-18 02:31:51 +00:00
Glenn Maynard
5ee52b0db5
The screen that pushes a screen sets the pop message, not the pushed screen.
...
This pushing screens without them needing to be aware of it. (This will also allow
a pushed screen to replace itself with another pushed screen without having to
propagate the finalization message across; that'll make more sense if the rest of
this pans out ...)
2005-07-18 02:28:16 +00:00
Glenn Maynard
d2e4190a4e
explicit load for MenuTimer, so we don't load anything if we don't want it
2005-07-18 02:08:15 +00:00
Glenn Maynard
18910dd754
cleanup
2005-07-16 10:17:10 +00:00
Glenn Maynard
0fcda13da1
temp fix for double-free
2005-07-16 10:16:23 +00:00
Glenn Maynard
d8bf6df4aa
move metrics into OptionRowType, too
2005-07-16 03:23:53 +00:00
Glenn Maynard
ee791b9c9c
fix copying when unloaded
2005-07-16 03:10:59 +00:00
Glenn Maynard
99d4f12881
copy ctor
2005-07-16 02:52:16 +00:00
Glenn Maynard
b925b2d7ca
instead of loading actors inside OptionRow, load a single copy of each
...
one we need, and then make copies as needed. This avoids lots of
extra loading (which can be slow, even with refcounted data; lots of path
lookups, etc). (Trying to get this to the point where we can construct new
OptionRows for a menu without making a whole new menu.) This approach
means we don't lose the potential to have different sTypes of OptionRow
in a single menu. (The annoying bit is that any actor we copy has to handle
copying, which is tricky for ActorFrame and doesn't work yet for AutoActor.
Working on it ...)
2005-07-16 02:51:17 +00:00
Glenn Maynard
a75ef49210
preparatory (s/m_sType/sType/, no other changes)
2005-07-16 02:44:48 +00:00
Glenn Maynard
19d43d20d1
init m_vbSelected, like LoadNormal
2005-07-16 01:26:56 +00:00
Glenn Maynard
e0bf0e285c
do call InitText and AfterImportOptions on exit row
2005-07-16 01:24:54 +00:00
Glenn Maynard
42e531768c
make LoadExit a bit less of a special case
2005-07-16 01:23:36 +00:00
Glenn Maynard
e3d19324db
explicitly hide underline if ROW_EXIT
2005-07-16 01:21:42 +00:00
Glenn Maynard
7b0bf75ebb
explicitly hide title and bullets if ROW_EXIT
2005-07-16 01:20:05 +00:00
Glenn Maynard
e8656a2420
hide
2005-07-15 23:31:58 +00:00
Glenn Maynard
a18ec93ccf
wrap ROW_SONG
2005-07-15 23:30:31 +00:00
Glenn Maynard
082ceeecaa
EditMenu::GetRowSize
2005-07-15 23:27:51 +00:00
Glenn Maynard
7dbfde93c9
ShowGroups=1
2005-07-15 23:26:58 +00:00
Glenn Maynard
71892143d3
allow hiding group list
2005-07-15 23:21:23 +00:00
Glenn Maynard
28c84b4002
cleanup
2005-07-15 22:58:11 +00:00
Glenn Maynard
3a0d10dff7
cleanup
2005-07-15 21:49:12 +00:00
Glenn Maynard
ca6d18745f
cleanup
...
InitText in OptionRow::Reload instead of UpdateText
2005-07-15 21:48:06 +00:00
Glenn Maynard
2a90e103a3
update
2005-07-15 21:46:24 +00:00
Glenn Maynard
bc3228ec2d
compile fix
2005-07-15 21:45:14 +00:00
Glenn Maynard
4cb5ac76c3
unused
2005-07-15 21:40:56 +00:00
Glenn Maynard
d23b98694e
update
2005-07-15 21:37:17 +00:00
Glenn Maynard
a5d574e414
incomplete for almost two years; a reasonable grace period, I hope :)
2005-07-15 21:36:11 +00:00
Glenn Maynard
d0c2daeadb
fix crash when no choices due to m_iChoiceInRowWithFocus not being
...
set to -1 yet
2005-07-15 07:19:36 +00:00
Glenn Maynard
618f71f3d4
separate initializing text and setting m_iChoiceInRowWithFocus
2005-07-15 06:54:10 +00:00
Glenn Maynard
ff5f5f4035
separate frame for deleted objects
2005-07-15 06:34:06 +00:00
Glenn Maynard
3bdcdc8943
use m_textItemParent
2005-07-15 06:28:13 +00:00
Glenn Maynard
4e4c7e5617
re-play On and the loaded sound on reset
2005-07-15 05:44:06 +00:00
Glenn Maynard
d9068e601d
LoadOptionIcon -> SetOptionIcon
2005-07-15 05:43:10 +00:00
Glenn Maynard
5c441a5fdf
We load lots of the same thing in OptionRows. Instead of loading each one
...
individually, just load one and copy it for the rest; this avoids doing
the whole "search, read redir, find refcounted" code path for every
option. Don't load data from OptionRow::AfterImportOptions.
2005-07-15 05:34:54 +00:00
Glenn Maynard
7afc69b2fd
OnePassed binding
2005-07-15 04:48:36 +00:00
Glenn Maynard
0cf94e1ada
fix copy
2005-07-15 04:22:23 +00:00
Glenn Maynard
2aa932ca3a
Sprite copy ctor, same reason (refcounted textures)
...
this is the sort of thing HiddenPtr is meant to avoid, but I'm not ready to
start using it on refcounted objects just yet ...
2005-07-15 04:16:31 +00:00
Glenn Maynard
ff2c101d82
BitmapText copy ctor to fix refcount desync
2005-07-15 03:50:56 +00:00
Glenn Maynard
6d275d4f95
cleanup
2005-07-15 03:49:55 +00:00
Glenn Maynard
051903ecf4
FontManager::CopyFont
2005-07-15 03:49:29 +00:00
Glenn Maynard
ddedfe25bc
cleanup (trying to do only what's needed in ScreenOptions::InitMenu, to make
...
things saner)
2005-07-15 03:33:53 +00:00
Glenn Maynard
d7d070077e
simplify: add SetInputMode, like SetNavigation
2005-07-15 03:31:26 +00:00
Glenn Maynard
1f3ac4613c
simplify: add SetInputMode, like SetNavigation (rest of commit coming)
2005-07-15 03:28:09 +00:00
Glenn Maynard
84f85f086c
load as much as possible in ScreenOptions::Init
2005-07-15 03:21:31 +00:00
Glenn Maynard
8161a04c1c
cleanup
2005-07-15 02:32:24 +00:00
Glenn Maynard
b5d68fc123
call base ScreenOptions::Init after handling forceallplayers
2005-07-15 02:27:37 +00:00
Glenn Maynard
5c7fb961e4
move m_OptionsNavigation init to ctor
2005-07-15 02:25:09 +00:00
Glenn Maynard
5dd564cfcc
sort after sending On commands
2005-07-15 02:10:46 +00:00
Glenn Maynard
ca74ac58d1
work on BeginScreen, TweenOnScreen. (screen isn't correct yet;
...
there's no way to reuse the screen with different available options, etc.,
only with the same settings)
2005-07-15 02:06:46 +00:00
Glenn Maynard
82073cc6b4
fix options menu names
2005-07-15 01:38:25 +00:00
Glenn Maynard
a4841c349b
ScreenWithMenuElements::BeginScreen: start tweening, and also reset
...
any previous transitions.
2005-07-15 01:18:42 +00:00