Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 05233a7af8 use LowLevelWindow::IsSoftwareRenderer 2005-11-13 18:54:09 +00:00
Glenn Maynard 071ff2adb5 LowLevelWindow::IsSoftwareRenderer 2005-11-13 18:53:48 +00:00
Glenn Maynard 9c17980ed5 move some GLX-specific stuff into LowLevelWindow_X11 2005-11-13 18:43:22 +00:00
Glenn Maynard 7f95e0a309 calling straightforward code an "ugly hackish mess" falls just short of productive and appropriate 2005-11-13 18:38:55 +00:00
Glenn Maynard fec044a796 general minor cosmetics 2005-11-13 18:22:52 +00:00
Glenn Maynard 4f52fab65a In OpenGL (not D3D), it's our job to unset and reset the full-screen video mode
when we lose focus.
2005-11-11 21:22:18 +00:00
Glenn Maynard 4d8ab8a6f6 use ArchHooks::CheckForMultipleInstances. Uses AllowMultipleInstances
pref to disable for advanced use; I sometimes start multiple windows, to
eg. compare D3D and OGL live.
2005-11-11 21:13:13 +00:00
Glenn Maynard f0bb643e11 add ArchHooks::CheckForMultipleInstances 2005-11-11 21:10:10 +00:00
Glenn Maynard cbc31d637b easier to search for by class name 2005-11-11 21:08:35 +00:00
Glenn Maynard 799655dfa5 remove spurious warning 2005-11-11 21:05:05 +00:00
Glenn Maynard 9b39cc4f02 (untested) fix vsync on osx 2005-11-11 21:04:14 +00:00
Glenn Maynard 99fdf95d8e possibly fix stale extension function pointer use after losing context 2005-11-11 21:01:58 +00:00
Glenn Maynard 45650f732d cleanup 2005-11-11 20:58:07 +00:00
Glenn Maynard 3bbfe9ebc0 Two tests for not filling a buffer:
if( m_iBufferBytesFilled > m_iWriteAhead )

	int iNumBytesEmpty = m_iWriteAhead - m_iBufferBytesFilled;
	if( iNumBytesEmpty < iChunksize )

The latter, manipulated a bit, is actually:

	if( m_iBufferBytesFilled+iChunksize >= m_iWriteAhead )

These do almost the same thing.  This isn't what was intended.  The
former checks whether we *want* to write another buffer (based on our
preferred writeahead).  The latter was meant to check whether it's *possible*
to fit another chunk into the buffer.  It should check against m_iBufferSize,
not m_iWriteAhead.

This fixes writeahead: 4096 means "write if we have less than 4096 frames
buffered", not "write if writing the new chunk would result in still having
less than 4096 frames buffered".  This is important on slower devices, like
USB headsets.
2005-11-10 22:10:05 +00:00
Glenn Maynard 553bc91559 cleanup 2005-11-09 14:23:23 +00:00
Glenn Maynard 48ce4bf80c cleanup 2005-11-09 14:10:48 +00:00
Glenn Maynard 9d090cbe7d static 2005-11-09 13:34:17 +00:00
Glenn Maynard 089a187a6c fix empty loading window title 2005-11-09 03:57:29 +00:00
Glenn Maynard 6671b6b207 fix memory log 2005-11-09 02:01:56 +00:00
Glenn Maynard 946fce020b If BeginFrame returns false (eg. we have no drawing context), then EndFrame
will never be called.  This caused messages to not be handled when we lose
focus in fullscreen, so we could never regain focus.
2005-11-09 00:19:02 +00:00
Glenn Maynard 8e976a275a simplify FindSystemFile 2005-11-07 16:26:47 +00:00
Glenn Maynard b35541b4ce simplify 2005-11-06 23:03:23 +00:00
Glenn Maynard f5c9f4661f Modify the existing viewport, instead of constructing a new one. Fixes
resizing problems.
2005-11-06 23:02:23 +00:00
Glenn Maynard 4c874a943b include cleanup 2005-11-06 18:03:47 +00:00
Glenn Maynard 95b71dbd3b cleanup 2005-11-06 15:24:26 +00:00
Glenn Maynard b691117e2c cleanup 2005-11-06 13:00:34 +00:00
Glenn Maynard a8247bd45b threaded linux driver 2005-11-06 12:18:37 +00:00
Glenn Maynard 499dcf9c32 debouncing code broke handling of threaded inputs; fix 2005-11-06 12:14:35 +00:00
Glenn Maynard 40b0dec7c4 clean up weird capitalization 2005-11-06 12:12:18 +00:00
Glenn Maynard d508be4b88 fix RageTimer::Half averaging backwards
cleanup comment
2005-11-06 02:41:26 +00:00
Glenn Maynard 3f5a42adc6 fix texture leak.
D3D has the best response to these reference leaks ever: on shutdown, some
part of window closing or screen mode resetting will freeze for about five seconds,
depending on the window mode.  No indication why is given.
2005-11-05 16:48:35 +00:00
Glenn Maynard 36b7ba7d0c revert horrible WinCVS braindamage 2005-11-05 16:20:53 +00:00
Glenn Maynard d7c160865a cvs upd -D "one week ago" RageDisplay_D3D.cpp 2005-11-05 16:18:56 +00:00
Glenn Maynard e378390803 fix non-sphere map path in RageDisplay_D3D::SendCurrentMatrices ignores 'tu'
fix SetTextureModeAdd alpha component (behavior to match GL_ADD)
2005-11-05 04:27:36 +00:00
Glenn Maynard 7cbba09b89 SetZBias in SetDefaultRenderStates 2005-11-04 15:42:20 +00:00
Glenn Maynard dc9f0ce241 fix D3D z-bias to work like OpenGL's glDepthRange 2005-11-04 15:04:35 +00:00
Glenn Maynard c8f38629ef ThemeManager::ReloadMetrics: only reload metrics, not the whole theme. This
is much less unintrusive, and fixes crashes on most "retry" theme dialogs due
to reloading and resetting Lua and other things unexpectedly in the middle of
a screen load.
2005-11-03 19:53:27 +00:00
Glenn Maynard c85965d054 handle language tags in files for translations 2005-11-03 18:11:40 +00:00
Glenn Maynard cfed90cfec Stop keeping theme metrics for each fallback theme separate. Just merge them
into one theme.  I'm not sure why this was done originally, but it was probably
related to the ugly "fallback themes can fork Fallback" behavior that was
removed recently.

This is simpler, and reduces overhead in looking up theme metrics.
2005-11-03 17:24:56 +00:00
Glenn Maynard 43acb27d00 cleanup 2005-11-03 16:38:15 +00:00
Glenn Maynard 4a37f2ecdc cleanup 2005-11-02 15:53:02 +00:00
Glenn Maynard f90a88719d "" -> CString() 2005-11-02 15:52:08 +00:00
Glenn Maynard 6c859a7631 cleanup 2005-11-02 15:45:45 +00:00
Glenn Maynard 067365215c simplify, compile fix 2005-11-01 23:54:19 +00:00
Glenn Maynard 4c2a8e3ba0 separate practice help, no record mappings in practice 2005-11-01 22:17:07 +00:00
Glenn Maynard 7465821f46 simplify 2005-11-01 21:43:10 +00:00
Glenn Maynard 9c0670b104 don't reset graphics for changing the language 2005-11-01 19:29:10 +00:00
Glenn Maynard a46086fdda Avoid extra work when changing the language and not the theme. 2005-11-01 19:15:26 +00:00
Glenn Maynard 826804bf84 It's too early to DoesLanguageExist at this point. Just return the preferred language; we'll fall back on BASE_LANGUAGE anyway. 2005-11-01 19:14:38 +00:00
Glenn Maynard fae57b297c fix log 2005-11-01 19:12:13 +00:00
Glenn Maynard 92b93dc689 fixing up language reverting to english 2005-11-01 18:13:32 +00:00
Glenn Maynard fe52b72f25 log in LoadThemeMetrics 2005-11-01 18:08:56 +00:00
Glenn Maynard 51e06fdc2b pass the language to LoadThemeRecursive and rename to LoadThemeMetrics 2005-11-01 18:04:59 +00:00
Glenn Maynard 1851fda405 move --metric hanlding to LoadThemeRecursive 2005-11-01 17:46:48 +00:00
Glenn Maynard 485bab571f move clean up of old themes to LoadThemeRecursive 2005-11-01 17:42:48 +00:00
Glenn Maynard b2aa109cbc GetLanguages: check all loaded themes 2005-11-01 17:05:07 +00:00
Glenn Maynard cbce8648e7 cleanup 2005-11-01 15:00:50 +00:00
Glenn Maynard c0094aecbf comment 2005-11-01 00:18:09 +00:00
Glenn Maynard ff0d50a6ab EDIT_MODE_PRACTICE bindings 2005-11-01 00:17:26 +00:00
Glenn Maynard 24f5e87e60 predict_meter -> EDIT_MODE_FULL 2005-10-31 23:54:36 +00:00
Glenn Maynard b339832bbf GetSystemDefaultLangID -> GetUserDefaultLangID. (Like GetUserDefaultUILanguage,
this reports the correct answer on my system.  GUDUIL() is for multilanguage
versions of Windows, I think.)
2005-10-31 23:51:52 +00:00
Glenn Maynard 7d3bb719f6 GetLineWidthInSourcePixels including overdraw causes a problem. Text is left-
aligned by default; we add the value of GetLineWidthInSourcePixels to right-
align (and n/2 to center-align).  This causes left-alignment to be flush, with
overdraw over the alignment (correct), but right-alignment to align against
the overdraw.  This causes fonts with borders to align with the border over
the edge on the left and against the edge on the right.

If we only include overdraw for cropping and scaling, and not positioning, then
we're inconsistent.  For example, if we have a border with 100 pixels of space,
and we scale to 100 pixels in this way, the text will be scaled to exactly 100
pixels, but if left- or right-aligned against the border, will overlap the border
and not actually use the whole space.  We need to be consistent: either consider
the overdraw part of the character or don't.

Ultimately, the overdraw was intended to not be considered part of the character
itself.  It's intended for use with fonts with borders/strokes/glow around lettering.
That causes every character in a font to be widened, usually uniformly.  This
tends to not increase the subjective width of the character: if aligning hard
against a border, these features should be ignored.  So, let's go back to the
original intent, and don't consider overdraw part of the character.
2005-10-31 14:56:27 +00:00
Glenn Maynard 92b790b9ee fix LoadingScreen not set correctly for SEdit MinMenus 2005-10-31 04:05:26 +00:00
Glenn Maynard 0361ad99d9 update comment 2005-10-31 04:03:16 +00:00
Glenn Maynard 00d4790a18 add SetCurrentTrail 2005-10-31 03:34:48 +00:00
Glenn Maynard 14b57d3833 return components in GetCurrentStepsCredits, not formatted 2005-10-31 03:34:05 +00:00
Glenn Maynard d10c1b08ad Avoid calling GetSongsValidForRandom for static courses. 2005-10-31 01:26:24 +00:00
Glenn Maynard d6ca8b3777 break out GetSongsValidForRandom 2005-10-31 01:19:54 +00:00
Glenn Maynard a58a2a2bb2 This seems to have optimized an uncommon case at the cost of the
common case.  Normally, most songs in most courses are static.  Previously,
in those cases, the filtered song list would never be generated; now it's
generated for every course.  Optimize the filtering (erase() on a vector is
slow).
2005-10-31 01:18:10 +00:00
Glenn Maynard 692a52673e Too-big commit in one chunk makes code review impossible--please break
things apart better.  Trying to figure out what just happened ...
2005-10-31 00:54:52 +00:00
Glenn Maynard 226e6fc3d8 unused metrics 2005-10-30 22:30:33 +00:00
Glenn Maynard ad69594521 Simplify options message. Remove m_sprOptionsMessage; show this in an overlay.
Remove m_bgOptionsOut, m_bgNoOptionsOut; these were only used for delays, which
we can do by sleeping on the options message commands.  Remove SM_TweenOffOptionsMessage;
treat that as part of FadingOut.
2005-10-30 22:23:07 +00:00
Glenn Maynard 3c11c86ea9 themable "N/A", "Other" 2005-10-30 20:58:42 +00:00
Glenn Maynard dd16deaf23 themable "N/A" 2005-10-30 20:58:08 +00:00
Glenn Maynard 76ade2280a static, cleanup 2005-10-30 20:14:58 +00:00
Glenn Maynard b66cdac7b9 static 2005-10-30 20:13:46 +00:00
Glenn Maynard 7edb143399 cleanup, const 2005-10-30 20:09:32 +00:00
Glenn Maynard 6d8349b6d2 update for 0-9 2005-10-30 20:07:49 +00:00
Glenn Maynard 39696c1a08 NUM -> 0-9 2005-10-30 19:58:00 +00:00
Glenn Maynard dfdc0e6713 metrics 2005-10-30 18:32:50 +00:00
Glenn Maynard 89f80eb2e5 more easily themable sort text
(Not sure whether to use the choice name or the GameCommand m_sName.
The GameCommand name is used to identify asset names.  However, we
already have a Choice name here, and it's weird having two names: the
GC name just seems like a confusing extra layer of indirection.  Hmm ...)
2005-10-30 18:31:18 +00:00
Glenn Maynard 65a16ed427 overwritten immediately 2005-10-30 18:14:52 +00:00
Glenn Maynard 519f720bb0 fix linux compile, or iter skipping an entry 2005-10-30 06:28:53 +00:00
Glenn Maynard 5d1eb4a5f6 more bindings 2005-10-30 04:06:04 +00:00
Glenn Maynard c622d1a559 lua PerDifficultyAwardToThemedString, PeakComboAwardToThemedString 2005-10-30 03:46:56 +00:00
Glenn Maynard 20274f070e bind PlayModeToThemedString 2005-10-30 02:36:02 +00:00
Glenn Maynard 999ec0bd15 change m_sprLineHighlight to AutoActor 2005-10-29 23:47:03 +00:00
Glenn Maynard 21fcc06b7e fix long-standing bug: resize image to fit the dialog for when the default
font size is changed (in Win2k, hidden away in display -> settings -> advanced ->
general)
2005-10-29 21:52:50 +00:00
Glenn Maynard 9b7346e607 oops, fix another crash. I guess the "pass pointer by reference and maybe automatically reallocate" idiom is error-prone. 2005-10-29 21:50:26 +00:00
Glenn Maynard 3bf8373588 fix crash 2005-10-29 21:15:55 +00:00
Glenn Maynard 7c42b794ea cleanup 2005-10-29 21:08:37 +00:00
Glenn Maynard f3d55ef26e allow disabling song backgrounds (without disabling backgrounds entirely
with 0% Brightness, which gives an ugly black background)
2005-10-29 20:59:08 +00:00
Glenn Maynard a7af61d74c simplify with GetTweenTimeLeft() 2005-10-29 20:09:10 +00:00
Glenn Maynard 8c9b57dbae m_BackgroundMode -> m_RandomBackgroundMode 2005-10-29 20:04:57 +00:00
Glenn Maynard 9f210adf3e don't THEME->EvaluateString here; it's unnecessary and actually using it is slow 2005-10-29 03:30:16 +00:00
Glenn Maynard 034c7f4a41 bring back MovieTexture_FFMpeg::RegisterProtocols 2005-10-29 03:25:39 +00:00
Glenn Maynard ac1a1e3817 remove hack 2005-10-29 03:13:48 +00:00
Glenn Maynard 4cee7a4045 This table will be accessed very often, so use the terse name "P", for eg. File="@P.File". 2005-10-29 01:35:53 +00:00
Glenn Maynard 938bfeb7b0 add ActorUtil::SetParamFromStack, ActorUtil::GetParam. Save params to
a table, not as global variables.  Saving and loading from globals is still
around temporarily.
2005-10-29 01:28:29 +00:00
Glenn Maynard fde59d8464 set the loading screen, so actors can use it as an input variable 2005-10-28 22:47:11 +00:00