merge
This commit is contained in:
@@ -8,6 +8,36 @@ ________________________________________________________________________________
|
||||
StepMania 5.0 Preview 2 | 20110???
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
2011/06/13
|
||||
----------
|
||||
* [InputHandler_DirectInput] Fixed MouseWheel input not resetting. [AJ]
|
||||
* [ScreenTextEntry] Make it so only the keyboard's Enter key can finish the
|
||||
screen. Should fix issues with buttons whose secondary function is MenuStart. [AJ]
|
||||
* [InputMapper] Modify default mappings. Use the Hyphen key instead of the
|
||||
Numlock key for Player 2's GAME_BUTTON_BACK. This should address some
|
||||
issues with Player 2 being unable to back out if they use a laptop.
|
||||
[Wolfman2000]
|
||||
* [NoteDisplay] Add two new metrics.
|
||||
* DrawRollHeadForTapsOnSameRow: bool, similar to DrawHoldHeadForTapsOnSameRow
|
||||
* TapHoldRollOnRowMeansHold: bool, true means hold and false means roll
|
||||
* No noteskins should require updating, as these were placed in common/common
|
||||
for ease of use. [Wolfman2000]
|
||||
* [LifeMeterBattery] Added ChangeLives(int) Lua binding. [AJ]
|
||||
* [LifeMeterBattery] Added DangerThreshold metric. [AJ]
|
||||
* [LifeMeterBattery] Added some important metrics. [AJ]
|
||||
* MinScoreToKeepLife='TapNoteScore_*' - any score below this = loss of life.
|
||||
* SubtractLives=1 - how many lives are lost when going below MinScoreToKeepLife.
|
||||
* MinesSubtractLives=1 - how many lives are lost when hitting a mine.
|
||||
* HeldAddLives=0 - how many lives are gained when a hold is completed.
|
||||
* LetGoSubtractLives=1 - how many lives are lost on a dropped hold.
|
||||
|
||||
2011/06/12
|
||||
----------
|
||||
* [ScreenNetSelectMusic] Add PlayerOptionsScreen metric. [AJ]
|
||||
* [ScreenEdit] Restore the old PageUp/PageDown behavior, added Control +
|
||||
PageUp/PageDown to use recent time signature behavior. Laptop users, that
|
||||
includes you guys too: semicolon and apostrophe are still good. [Wolfman2000]
|
||||
|
||||
2011/06/11
|
||||
----------
|
||||
* [ScreenEdit] Allow setting the Music Preview via the Alter Menu. Just select
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
[NoteDisplay]
|
||||
DrawHoldHeadForTapsOnSameRow=1
|
||||
DrawRollHeadForTapsOnSameRow=1
|
||||
TapHoldRollOnRowMeansHold=1
|
||||
AnimationIsBeatBased=1
|
||||
TapNoteAnimationLength=1
|
||||
TapMineAnimationLength=1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
local function Beat(self)
|
||||
-- too many locals
|
||||
local this = self:GetChildren()
|
||||
local player = GAMESTATE:GetMasterPlayerNumber()
|
||||
local playerstate = GAMESTATE:GetPlayerState( player )
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#BACKGROUND:;
|
||||
#LYRICSPATH:;
|
||||
#CDTITLE:;
|
||||
#MUSIC:ScreenGameplaySyncMachine music.ogg;
|
||||
#MUSIC:_sync music.ogg;
|
||||
#OFFSET:-0.012;
|
||||
#SAMPLESTART:0.000;
|
||||
#SAMPLELENGTH:12.000;
|
||||
|
||||
@@ -20,12 +20,4 @@ local _screen = {
|
||||
h = SCREEN_HEIGHT,
|
||||
cx = SCREEN_CENTER_X,
|
||||
cy = SCREEN_CENTER_Y
|
||||
}
|
||||
|
||||
if Screen.String then
|
||||
ScreenString = Screen.String
|
||||
end
|
||||
|
||||
if Screen.Metric then
|
||||
ScreenMetric = Screen.Metric
|
||||
end
|
||||
}
|
||||
@@ -56,15 +56,6 @@ function ActorScroller:setfastcatchup(bFastCatchup)
|
||||
self:SetFastCatchup(bFastCatchup)
|
||||
end
|
||||
|
||||
-- renaming various StepMania functions to sm-ssc ones:
|
||||
if ScreenString then
|
||||
ScreenString = Screen.String
|
||||
end
|
||||
|
||||
if ScreenMetric then
|
||||
ScreenMetric = Screen.Metric
|
||||
end
|
||||
|
||||
--[[ GameState ]]
|
||||
--Aliases for old GAMESTATE timing functions.
|
||||
--These have been converted to SongPosition, but most themes still use these old functions.
|
||||
|
||||
@@ -114,17 +114,32 @@ function Actor:FullScreen()
|
||||
end
|
||||
|
||||
--[[ Typical background sizes:
|
||||
320x240 - DDR 1st-Extreme, most NVLM_ZK songs
|
||||
640x480 - most simfiles in distribution today are this big.
|
||||
768x480 - 16:10 aspect ratio backgrounds
|
||||
854x480 - pump it up pro
|
||||
320x240 - [4:3]
|
||||
640x480 - [4:3] (most simfiles in distribution today use this res.)
|
||||
768x480 - [16:10]
|
||||
854x480 - [16:9]
|
||||
]]
|
||||
-- "Most backgrounds are 640x480. Some are 768x480. Stretch the 4:3 ones."
|
||||
function Actor:scale_or_crop_background()
|
||||
if (self:GetWidth() * 3) / 4 == self:GetHeight() then
|
||||
local gw = self:GetWidth()
|
||||
local gh = self:GetHeight()
|
||||
|
||||
local graphicAspect = gw/gh
|
||||
local displayAspect = DISPLAY:GetDisplayWidth()/DISPLAY:GetDisplayHeight()
|
||||
|
||||
if graphicAspect == displayAspect then
|
||||
-- bga matches the current aspect, we can stretch it.
|
||||
self:stretchto( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT );
|
||||
else
|
||||
-- temp
|
||||
self:scaletocover( 0,0,SCREEN_WIDTH,SCREEN_HEIGHT );
|
||||
--[[
|
||||
-- bga doesn't match the aspect.
|
||||
if displayAspect > graphicAspect then
|
||||
-- the graphic is smaller than the display aspect ratio
|
||||
else
|
||||
-- the graphic is bigger than the display aspect ratio; crop me
|
||||
end
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -102,11 +102,13 @@ Screen.Metric = function ( sName )
|
||||
local sClass = Var "LoadingScreen"
|
||||
return THEME:GetMetric( sClass, sName )
|
||||
end
|
||||
ScreenMetric = Screen.Metric
|
||||
|
||||
Screen.String = function ( sName )
|
||||
local sClass = Var "LoadingScreen";
|
||||
return THEME:GetString( sClass, sName )
|
||||
end
|
||||
ScreenString = Screen.String
|
||||
|
||||
function TextBannerAfterSet(self,param)
|
||||
local Title=self:GetChild("Title");
|
||||
|
||||
@@ -606,7 +606,19 @@ OverY=0
|
||||
|
||||
[LifeMeterBattery]
|
||||
# The bar that shows up in Oni mode.
|
||||
# any score below this one will cause you to lose a life.
|
||||
MinScoreToKeepLife='TapNoteScore_W3'
|
||||
# how many lives you'll lose upon doing so.
|
||||
SubtractLives=1
|
||||
# how many lives you'll lose hitting a mine
|
||||
MinesSubtractLives=1
|
||||
# how many lives a successful hold will net you.
|
||||
HeldAddLives=0
|
||||
# how many lives an unsuccessful hold will cost you.
|
||||
LetGoSubtractLives=1
|
||||
|
||||
# How many lives trigger the "Danger" state.
|
||||
DangerThreshold=1
|
||||
# How long it flashes when you lose a life.
|
||||
BatteryBlinkTime=1.2
|
||||
# Where the batteries are
|
||||
@@ -614,11 +626,16 @@ BatteryP1X=-92
|
||||
BatteryP1Y=2
|
||||
BatteryP2X=92
|
||||
BatteryP2Y=2
|
||||
# Where your live count is
|
||||
# Where your life count is
|
||||
NumLivesFormat="x%d"
|
||||
NumLivesP1X=-92
|
||||
NumLivesP1Y=0
|
||||
NumLivesP1GainLifeCommand=
|
||||
NumLivesP1LoseLifeCommand=zoom,1.5;linear,0.15;zoom,1
|
||||
NumLivesP2X=92
|
||||
NumLivesP2Y=0
|
||||
NumLivesP2GainLifeCommand=
|
||||
NumLivesP2LoseLifeCommand=zoom,1.5;linear,0.15;zoom,1
|
||||
|
||||
[LifeMeterBattery Percent]
|
||||
# The percentage on the bar. I wouldn't even bother changing this, because I
|
||||
@@ -1527,7 +1544,7 @@ AllowRepeatingInput=false
|
||||
PreSwitchPageSeconds=0
|
||||
PostSwitchPageSeconds=0
|
||||
ScrollerSecondsPerItem=0
|
||||
ScrollerNumItemsToDraw=1024
|
||||
ScrollerNumItemsToDraw=16
|
||||
ScrollerTransform=function(self,offset,itemIndex,numItems) end
|
||||
ScrollerSubdivisions=1
|
||||
OverrideSleepAfterTweenOffSeconds=false
|
||||
@@ -1817,6 +1834,7 @@ ChoiceDouble="name,Double;style,double;text,Double;screen,"..Branch.AfterSelectP
|
||||
ChoiceSolo="name,Solo;style,solo;text,Solo;screen,"..Branch.AfterSelectPlayMode()
|
||||
ChoiceVersus="name,Versus;style,versus;text,Versus;screen,"..Branch.AfterSelectPlayMode()
|
||||
ChoiceCouple="name,Couple;style,couple;text,Couple;screen,"..Branch.AfterSelectPlayMode()
|
||||
ChoiceRoutine="name,Routine;style,routine;text,Routine;screen,"..Branch.AfterSelectPlayMode()
|
||||
ChoiceHalfDouble="name,HalfDouble;style,halfdouble;text,HalfDouble;screen,"..Branch.AfterSelectPlayMode()
|
||||
Choice5Keys="name,5Keys;style,single5;text,5Keys;screen,"..Branch.AfterSelectPlayMode()
|
||||
Choice7Keys="name,7Keys;style,single7;text,7Keys;screen,"..Branch.AfterSelectPlayMode()
|
||||
@@ -3951,6 +3969,7 @@ PrevScreen="ScreenNetRoom"
|
||||
NextScreen="ScreenStageInformation"
|
||||
NoSongsScreen=Branch.TitleMenu()
|
||||
RoomSelectScreen="ScreenNetRoom"
|
||||
PlayerOptionsScreen="ScreenPlayerOptions"
|
||||
Codes="CodeDetectorOnline"
|
||||
|
||||
ShowStyleIcon=false
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
@@ -705,7 +705,7 @@ IconChoiceDoubleX=SCREEN_CENTER_X-160
|
||||
IconChoiceDoubleY=SCREEN_CENTER_Y
|
||||
IconChoiceDoubleOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
IconChoiceDoubleOffCommand=linear,0.1175;zoomx,0
|
||||
#
|
||||
####
|
||||
IconChoiceSoloX=SCREEN_CENTER_X-160
|
||||
IconChoiceSoloY=SCREEN_CENTER_Y+96
|
||||
IconChoiceSoloOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
@@ -715,17 +715,22 @@ IconChoiceHalfDoubleX=SCREEN_CENTER_X-160
|
||||
IconChoiceHalfDoubleY=SCREEN_CENTER_Y+96
|
||||
IconChoiceHalfDoubleOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
IconChoiceHalfDoubleOffCommand=linear,0.1175;zoomx,0
|
||||
#
|
||||
####
|
||||
IconChoiceVersusX=SCREEN_CENTER_X+160
|
||||
IconChoiceVersusY=SCREEN_CENTER_Y-48
|
||||
IconChoiceVersusY=string.find(THEME:GetMetric("ScreenSelectStyle","ChoiceNames"),"Routine") and SCREEN_CENTER_Y-96 or SCREEN_CENTER_Y-48
|
||||
IconChoiceVersusOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
IconChoiceVersusOffCommand=linear,0.1175;zoomx,0
|
||||
#
|
||||
IconChoiceCoupleX=SCREEN_CENTER_X+160
|
||||
IconChoiceCoupleY=SCREEN_CENTER_Y+48
|
||||
IconChoiceCoupleY=string.find(THEME:GetMetric("ScreenSelectStyle","ChoiceNames"),"Routine") and SCREEN_CENTER_Y or SCREEN_CENTER_Y+48
|
||||
IconChoiceCoupleOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
IconChoiceCoupleOffCommand=linear,0.1175;zoomx,0
|
||||
#
|
||||
IconChoiceRoutineX=SCREEN_CENTER_X+160
|
||||
IconChoiceRoutineY=SCREEN_CENTER_Y+96
|
||||
IconChoiceRoutineOnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
IconChoiceRoutineOffCommand=linear,0.1175;zoomx,0
|
||||
#
|
||||
IconChoicekb7X=SCREEN_CENTER_X
|
||||
IconChoicekb7Y=SCREEN_CENTER_Y
|
||||
IconChoicekb7OnCommand=zoom,0;bounceend,0.35;zoom,1
|
||||
|
||||
@@ -7889,6 +7889,7 @@
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/../src/archutils/Darwin/StepMania.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../src",
|
||||
"$(SRCROOT)/../src/ffmpeg/include",
|
||||
@@ -7911,7 +7912,6 @@
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-finline-limit=300",
|
||||
"-fconstant-cfstrings",
|
||||
"-fsingle-precision-constant",
|
||||
"-fno-exceptions",
|
||||
"-falign-loops=16",
|
||||
);
|
||||
@@ -7946,7 +7946,7 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
|
||||
GCC_STRICT_ALIASING = YES;
|
||||
GCC_UNROLL_LOOPS = YES;
|
||||
GCC_VERSION = 4.0;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
@@ -8523,7 +8523,7 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_STRICT_ALIASING = YES;
|
||||
GCC_UNROLL_LOOPS = YES;
|
||||
GCC_VERSION = 4.0;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
@@ -8576,6 +8576,7 @@
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/../src/archutils/Darwin/StepMania.pch";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../src",
|
||||
"$(SRCROOT)/../src/ffmpeg/include",
|
||||
@@ -8598,7 +8599,6 @@
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-finline-limit=300",
|
||||
"-fconstant-cfstrings",
|
||||
"-fsingle-precision-constant",
|
||||
"-fno-exceptions",
|
||||
"-falign-loops=16",
|
||||
);
|
||||
@@ -8815,6 +8815,7 @@
|
||||
GCC_ENABLE_SSE3_EXTENSIONS = NO;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/../src/archutils/Darwin/StepMania.pch";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../src",
|
||||
"$(SRCROOT)/../src/ffmpeg/include",
|
||||
@@ -8837,7 +8838,6 @@
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-finline-limit=300",
|
||||
"-fconstant-cfstrings",
|
||||
"-fsingle-precision-constant",
|
||||
"-fno-exceptions",
|
||||
"-falign-loops=16",
|
||||
);
|
||||
@@ -8870,7 +8870,7 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_STRICT_ALIASING = YES;
|
||||
GCC_UNROLL_LOOPS = YES;
|
||||
GCC_VERSION = 4.0;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
@@ -8944,6 +8944,7 @@
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = NO;
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/../src/archutils/Darwin/StepMania.pch";
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(SRCROOT)/../src",
|
||||
"$(SRCROOT)/../src/ffmpeg/include",
|
||||
@@ -8966,7 +8967,6 @@
|
||||
OTHER_CPLUSPLUSFLAGS = (
|
||||
"-finline-limit=300",
|
||||
"-fconstant-cfstrings",
|
||||
"-fsingle-precision-constant",
|
||||
"-fno-exceptions",
|
||||
"-falign-loops=16",
|
||||
);
|
||||
@@ -9000,7 +9000,7 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_STRICT_ALIASING = YES;
|
||||
GCC_UNROLL_LOOPS = YES;
|
||||
GCC_VERSION = 4.0;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(sm-ssc, experimental, [http://ssc.ajworld.net/sm-ssc/], StepMania)
|
||||
AC_INIT(StepMania 5, experimental, [http://ssc.ajworld.net/sm-ssc/], StepMania)
|
||||
AC_CONFIG_SRCDIR([src/StepMania.cpp])
|
||||
AC_CONFIG_AUX_DIR(autoconf)
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
+3
-3
@@ -105,9 +105,9 @@ void Actor::InitState()
|
||||
#endif
|
||||
m_fSecsIntoEffect = 0;
|
||||
m_fEffectDelta = 0;
|
||||
m_fEffectRampUp = 0.5;
|
||||
m_fEffectRampUp = 0.5f;
|
||||
m_fEffectHoldAtHalf = 0;
|
||||
m_fEffectRampDown = 0.5;
|
||||
m_fEffectRampDown = 0.5f;
|
||||
m_fEffectHoldAtZero = 0;
|
||||
m_fEffectOffset = 0;
|
||||
m_EffectClock = CLOCK_TIMER;
|
||||
@@ -118,7 +118,7 @@ void Actor::InitState()
|
||||
m_bVisible = true;
|
||||
m_fShadowLengthX = 0;
|
||||
m_fShadowLengthY = 0;
|
||||
m_ShadowColor = RageColor(0,0,0,0.5);
|
||||
m_ShadowColor = RageColor(0,0,0,0.5f);
|
||||
m_bIsAnimating = true;
|
||||
m_fHibernateSecondsLeft = 0;
|
||||
m_iDrawOrder = 0;
|
||||
|
||||
+1
-1
@@ -256,7 +256,7 @@ void AdjustSync::AutosyncTempo()
|
||||
// keep only a fraction of the data, such as the 80% with the lowest
|
||||
// error. However, throwing away the ones with high error should
|
||||
// be enough in most cases.
|
||||
float fFilteredError = 0.0;
|
||||
float fFilteredError = 0;
|
||||
s_iStepsFiltered = s_vAutosyncTempoData.size();
|
||||
FilterHighErrorPoints( s_vAutosyncTempoData, fSlope, fIntercept, ERROR_TOO_HIGH );
|
||||
s_iStepsFiltered -= s_vAutosyncTempoData.size();
|
||||
|
||||
@@ -60,6 +60,8 @@ static ThemeMetric<float> MINI_PERCENT_BASE( "ArrowEffects", "MiniPercentBase" )
|
||||
static ThemeMetric<float> MINI_PERCENT_GATE( "ArrowEffects", "MiniPercentGate" );
|
||||
static ThemeMetric<bool> DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" );
|
||||
|
||||
float ArrowGetPercentVisible( const PlayerState* pPlayerState, float fYPosWithoutReverse );
|
||||
|
||||
static float GetNoteFieldHeight( const PlayerState* pPlayerState )
|
||||
{
|
||||
return SCREEN_HEIGHT + fabsf(pPlayerState->m_PlayerOptions.GetCurrent().m_fPerspectiveTilt)*200;
|
||||
@@ -236,7 +238,10 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float
|
||||
if( bShowEffects )
|
||||
fBeatsUntilStep = pCurSteps->m_Timing.GetDisplayedBeat(fNoteBeat) - pCurSteps->m_Timing.GetDisplayedBeat(fSongBeat);
|
||||
float fYOffsetBeatSpacing = fBeatsUntilStep;
|
||||
float fSpeedMultiplier = bShowEffects ? pCurSteps->m_Timing.GetDisplayedSpeedPercent( position.m_fSongBeatVisible, position.m_fMusicSecondsVisible ) : 1.0;
|
||||
float fSpeedMultiplier = bShowEffects ?
|
||||
pCurSteps->m_Timing.GetDisplayedSpeedPercent(
|
||||
position.m_fSongBeatVisible,
|
||||
position.m_fMusicSecondsVisible ) : 1.0f;
|
||||
fYOffset += fSpeedMultiplier * fYOffsetBeatSpacing * (1-pPlayerState->m_PlayerOptions.GetCurrent().m_fTimeSpacing);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "GameConstantsAndTypes.h" // for TapNoteScore
|
||||
#include "RageTexturePreloader.h"
|
||||
|
||||
RString GetAttackPieceName( const RString &sAttack );
|
||||
|
||||
class PlayerState;
|
||||
/** @brief A graphical display for attacks. */
|
||||
class AttackDisplay : public ActorFrame
|
||||
|
||||
@@ -242,7 +242,7 @@ void BeginnerHelper::DrawPrimitives()
|
||||
DISPLAY->SetLighting( true );
|
||||
DISPLAY->SetLightDirectional(
|
||||
0,
|
||||
RageColor(0.5,0.5,0.5,1),
|
||||
RageColor(0.5f,0.5f,0.5f,1),
|
||||
RageColor(1,1,1,1),
|
||||
RageColor(0,0,0,1),
|
||||
RageVector3(0, 0, 1) );
|
||||
@@ -271,7 +271,7 @@ void BeginnerHelper::DrawPrimitives()
|
||||
DISPLAY->SetLighting( true );
|
||||
DISPLAY->SetLightDirectional(
|
||||
0,
|
||||
RageColor(0.5,0.5,0.5,1),
|
||||
RageColor(0.5f,0.5f,0.5f,1),
|
||||
RageColor(1,1,1,1),
|
||||
RageColor(0,0,0,1),
|
||||
RageVector3(0, 0, 1) );
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "RageTextureID.h"
|
||||
#include "ActorUtil.h"
|
||||
|
||||
RString GetRandomFileInDir( RString sDir );
|
||||
|
||||
Character::Character(): m_sCharDir(""), m_sCharacterID(""),
|
||||
m_sDisplayName(""), m_sCardPath(""), m_sIconPath(""),
|
||||
m_bUsableInRave(false), m_iPreloadRefcount(0) {}
|
||||
|
||||
@@ -11,6 +11,10 @@ class XNode;
|
||||
class CourseEntry;
|
||||
class Song;
|
||||
|
||||
bool CompareCoursePointersBySortValueAscending( const Course *pSong1, const Course *pSong2 );
|
||||
bool CompareCoursePointersBySortValueDescending( const Course *pSong1, const Course *pSong2 );
|
||||
bool CompareCoursePointersByTitle( const Course *pCourse1, const Course *pCourse2 );
|
||||
|
||||
/** @brief Utility functions that deal with Courses. */
|
||||
namespace CourseUtil
|
||||
{
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "Model.h"
|
||||
|
||||
int Neg1OrPos1();
|
||||
|
||||
#define DC_X( choice ) THEME->GetMetricF("DancingCharacters",ssprintf("2DCharacterXP%d",choice+1))
|
||||
#define DC_Y( choice ) THEME->GetMetricF("DancingCharacters",ssprintf("2DCharacterYP%d",choice+1))
|
||||
|
||||
@@ -344,7 +346,7 @@ void DancingCharacters::DrawPrimitives()
|
||||
ambient,
|
||||
diffuse,
|
||||
specular,
|
||||
RageVector3(-3, -7.5, +9) );
|
||||
RageVector3(-3, -7.5f, +9) );
|
||||
|
||||
if( PREFSMAN->m_bCelShadeModels )
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "EnumHelper.h"
|
||||
#include <ctime>
|
||||
|
||||
int StringToDayInYear( RString sDayInYear );
|
||||
|
||||
/** @brief The number of days we check for previously. */
|
||||
const int NUM_LAST_DAYS = 7;
|
||||
/** @brief The number of weeks we check for previously. */
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace Enum
|
||||
const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_ptr<RString> *pNameCache ); // XToString helper
|
||||
|
||||
#define XToString(X) \
|
||||
const RString& X##ToString(X x); \
|
||||
COMPILE_ASSERT( NUM_##X == ARRAYLEN(X##Names) ); \
|
||||
const RString& X##ToString( X x ) \
|
||||
{ \
|
||||
@@ -66,6 +67,7 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_
|
||||
namespace StringConversion { template<> RString ToString<X>( const X &value ) { return X##ToString(value); } }
|
||||
|
||||
#define XToLocalizedString(X) \
|
||||
const RString &X##ToLocalizedString(X x); \
|
||||
const RString &X##ToLocalizedString( X x ) \
|
||||
{ \
|
||||
static auto_ptr<LocalizedString> g_##X##Name[NUM_##X]; \
|
||||
@@ -80,6 +82,7 @@ const RString &EnumToString( int iVal, int iMax, const char **szNameArray, auto_
|
||||
}
|
||||
|
||||
#define StringToX(X) \
|
||||
X StringTo##X(const RString&); \
|
||||
X StringTo##X( const RString& s ) \
|
||||
{ \
|
||||
for( unsigned i = 0; i < ARRAYLEN(X##Names); ++i ) \
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "PlayerNumber.h"
|
||||
#include <float.h>
|
||||
|
||||
RString StepsTypeToString( StepsType st );
|
||||
|
||||
static vector<RString> GenerateRankingToFillInMarker()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
class TimingData;
|
||||
class RageSound;
|
||||
struct lua_State;
|
||||
|
||||
int MusicThread_start( void *p );
|
||||
|
||||
/** @brief High-level sound utilities. */
|
||||
class GameSoundManager
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ class Style;
|
||||
class TimingData;
|
||||
class Trail;
|
||||
|
||||
SortOrder GetDefaultSort();
|
||||
|
||||
/** @brief Holds game data that is not saved between sessions. */
|
||||
class GameState
|
||||
{
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ static const AutoMappings g_DefaultKeyMappings = AutoMappings(
|
||||
AutoMappingEntry( 0, KEY_KP_C2, GAME_BUTTON_MENUDOWN, true ),
|
||||
AutoMappingEntry( 0, KEY_KP_ENTER, GAME_BUTTON_START, true ),
|
||||
AutoMappingEntry( 0, KEY_KP_C0, GAME_BUTTON_SELECT, true ),
|
||||
AutoMappingEntry( 0, KEY_NUMLOCK, GAME_BUTTON_BACK, true ),
|
||||
AutoMappingEntry( 0, KEY_HYPHEN, GAME_BUTTON_BACK, true ), // laptop keyboards.
|
||||
AutoMappingEntry( 0, KEY_F1, GAME_BUTTON_COIN, false ),
|
||||
AutoMappingEntry( 0, KEY_SCRLLOCK, GAME_BUTTON_OPERATOR, false )
|
||||
);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "ThemeMetric.h"
|
||||
#include "PlayerState.h"
|
||||
|
||||
void ReloadItems();
|
||||
|
||||
#define NUM_ITEM_TYPES THEME->GetMetricF("Inventory","NumItemTypes")
|
||||
#define ITEM_DURATION_SECONDS THEME->GetMetricF("Inventory","ItemDurationSeconds")
|
||||
|
||||
+1
-2
@@ -14,8 +14,7 @@ bool JsonUtil::LoadFromString(Json::Value &root, RString sData, RString &sErrorO
|
||||
if (!parsingSuccessful)
|
||||
{
|
||||
RString err = reader.getFormatedErrorMessages();
|
||||
sErrorOut = ssprintf("JSON: LoadFromFileShowErrors failed: %s", err.c_str());
|
||||
LOG->Warn(sErrorOut);
|
||||
LOG->Warn("JSON: LoadFromFileShowErrors failed: %s", err.c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -172,7 +172,7 @@ void LifeMeterBar::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
|
||||
switch( score )
|
||||
{
|
||||
case HNS_Held: fDeltaLife = +0; break;
|
||||
case HNS_LetGo: fDeltaLife = -1.0; break;
|
||||
case HNS_LetGo: fDeltaLife = -1.0f; break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
+63
-44
@@ -26,6 +26,14 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats *
|
||||
const RString sType = "LifeMeterBattery";
|
||||
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
||||
|
||||
MIN_SCORE_TO_KEEP_LIFE.Load(sType, "MinScoreToKeepLife");
|
||||
DANGER_THRESHOLD.Load(sType, "DangerThreshold");
|
||||
SUBTRACT_LIVES.Load(sType, "SubtractLives");
|
||||
MINES_SUBTRACT_LIVES.Load(sType, "MinesSubtractLives");
|
||||
HELD_ADD_LIVES.Load(sType, "HeldAddLives");
|
||||
LET_GO_SUBTRACT_LIVES.Load(sType, "LetGoSubtractLives");
|
||||
|
||||
LIVES_FORMAT.Load(sType, "NumLivesFormat");
|
||||
BATTERY_BLINK_TIME.Load(sType, "BatteryBlinkTime"); // 1.2f by default
|
||||
|
||||
bool bPlayerEnabled = GAMESTATE->IsPlayerEnabled( pPlayerState );
|
||||
@@ -101,42 +109,54 @@ void LifeMeterBattery::OnSongEnded()
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void LifeMeterBattery::SubtractLives( int iLives )
|
||||
{
|
||||
if( iLives <= 0 )
|
||||
return;
|
||||
|
||||
m_iTrailingLivesLeft = m_iLivesLeft;
|
||||
m_iLivesLeft -= iLives;
|
||||
m_soundLoseLife.Play();
|
||||
m_textNumLives.PlayCommand("LoseLife");
|
||||
|
||||
Refresh();
|
||||
m_fBatteryBlinkTime = BATTERY_BLINK_TIME;
|
||||
}
|
||||
|
||||
void LifeMeterBattery::AddLives( int iLives )
|
||||
{
|
||||
if( iLives <= 0 )
|
||||
return;
|
||||
|
||||
m_iTrailingLivesLeft = m_iLivesLeft;
|
||||
m_iLivesLeft += iLives;
|
||||
m_soundGainLife.Play();
|
||||
m_textNumLives.PlayCommand("GainLife");
|
||||
|
||||
Refresh();
|
||||
m_fBatteryBlinkTime = 0;
|
||||
}
|
||||
|
||||
void LifeMeterBattery::ChangeLives(int iLifeDiff)
|
||||
{
|
||||
if( iLifeDiff < 0 )
|
||||
SubtractLives( abs(iLifeDiff) );
|
||||
else if( iLifeDiff > 0 )
|
||||
AddLives(iLifeDiff);
|
||||
}
|
||||
|
||||
void LifeMeterBattery::ChangeLife( TapNoteScore score )
|
||||
{
|
||||
if( m_iLivesLeft == 0 )
|
||||
return;
|
||||
|
||||
// todo: let the themer decide how this is handled. -aj
|
||||
switch( score )
|
||||
// this probably doesn't handle hold checkpoints. -aj
|
||||
if( score == TNS_HitMine && MINES_SUBTRACT_LIVES > 0 )
|
||||
SubtractLives(MINES_SUBTRACT_LIVES);
|
||||
else
|
||||
{
|
||||
case TNS_W1:
|
||||
case TNS_W2:
|
||||
case TNS_W3:
|
||||
break;
|
||||
case TNS_W4:
|
||||
case TNS_W5:
|
||||
case TNS_Miss:
|
||||
case TNS_HitMine:
|
||||
m_iTrailingLivesLeft = m_iLivesLeft;
|
||||
m_iLivesLeft--;
|
||||
m_soundLoseLife.Play();
|
||||
|
||||
m_textNumLives.PlayCommand("LoseLife");
|
||||
/*
|
||||
m_textNumLives.SetZoom( 1.5f );
|
||||
m_textNumLives.BeginTweening( 0.15f );
|
||||
m_textNumLives.SetZoom( 1.0f );
|
||||
*/
|
||||
|
||||
Refresh();
|
||||
m_fBatteryBlinkTime = BATTERY_BLINK_TIME;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
/*
|
||||
// xxx: this doesn't handle hold checkpoints.
|
||||
ASSERT(0);
|
||||
*/
|
||||
if( score < MIN_SCORE_TO_KEEP_LIFE && SUBTRACT_LIVES > 0 )
|
||||
SubtractLives(SUBTRACT_LIVES);
|
||||
}
|
||||
|
||||
Message msg( "LifeChanged" );
|
||||
@@ -148,16 +168,13 @@ void LifeMeterBattery::ChangeLife( TapNoteScore score )
|
||||
|
||||
void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
|
||||
{
|
||||
switch( score )
|
||||
{
|
||||
case HNS_Held:
|
||||
break;
|
||||
case HNS_LetGo:
|
||||
ChangeLife( TNS_Miss ); // LetGo is the same as a miss
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
if( m_iLivesLeft == 0 )
|
||||
return;
|
||||
|
||||
if( score == HNS_Held && HELD_ADD_LIVES > 0 )
|
||||
AddLives(HELD_ADD_LIVES);
|
||||
if( score == HNS_LetGo && LET_GO_SUBTRACT_LIVES > 0 )
|
||||
SubtractLives(LET_GO_SUBTRACT_LIVES);
|
||||
}
|
||||
|
||||
void LifeMeterBattery::HandleTapScoreNone()
|
||||
@@ -171,12 +188,12 @@ void LifeMeterBattery::ChangeLife( float fDeltaLifePercent )
|
||||
|
||||
bool LifeMeterBattery::IsInDanger() const
|
||||
{
|
||||
return false;
|
||||
return m_iLivesLeft < DANGER_THRESHOLD;
|
||||
}
|
||||
|
||||
bool LifeMeterBattery::IsHot() const
|
||||
{
|
||||
return false;
|
||||
return m_iLivesLeft == GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives;
|
||||
}
|
||||
|
||||
bool LifeMeterBattery::IsFailing() const
|
||||
@@ -208,7 +225,8 @@ void LifeMeterBattery::Refresh()
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textNumLives.SetText( ssprintf("x%d", m_iLivesLeft-1) );
|
||||
//m_textNumLives.SetText( ssprintf("x%d", m_iLivesLeft-1) );
|
||||
m_textNumLives.SetText( ssprintf(LIVES_FORMAT.GetValue(), m_iLivesLeft-1) );
|
||||
m_sprBattery.SetState( 3 );
|
||||
}
|
||||
}
|
||||
@@ -244,13 +262,14 @@ class LunaLifeMeterBattery: public Luna<LifeMeterBattery>
|
||||
{
|
||||
public:
|
||||
static int GetLivesLeft( T* p, lua_State *L ) { lua_pushnumber( L, p->GetLivesLeft() ); return 1; }
|
||||
// is this right? wtf -q2x
|
||||
static int GetTotalLives( T* p, lua_State *L ) { lua_pushnumber( L, GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives ); return 1; }
|
||||
static int ChangeLives( T* p, lua_State *L ) { p->ChangeLives(IArg(1)); return 0; }
|
||||
|
||||
LunaLifeMeterBattery()
|
||||
{
|
||||
ADD_METHOD( GetLivesLeft );
|
||||
ADD_METHOD( GetTotalLives );
|
||||
ADD_METHOD( ChangeLives );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+11
-1
@@ -32,18 +32,28 @@ public:
|
||||
|
||||
void Refresh();
|
||||
int GetLivesLeft() { return m_iLivesLeft; }
|
||||
void ChangeLives(int iLifeDiff);
|
||||
|
||||
// Lua
|
||||
virtual void PushSelf( lua_State *L );
|
||||
|
||||
private:
|
||||
void SubtractLives( int iLives );
|
||||
void AddLives( int iLives );
|
||||
|
||||
int m_iLivesLeft; // dead when 0
|
||||
int m_iTrailingLivesLeft; // lags m_iLivesLeft
|
||||
|
||||
float m_fBatteryBlinkTime; // if > 0 battery is blinking
|
||||
|
||||
// theme metrics added for sm-ssc
|
||||
ThemeMetric<float> BATTERY_BLINK_TIME;
|
||||
ThemeMetric<TapNoteScore> MIN_SCORE_TO_KEEP_LIFE;
|
||||
ThemeMetric<int> DANGER_THRESHOLD;
|
||||
ThemeMetric<int> SUBTRACT_LIVES;
|
||||
ThemeMetric<int> MINES_SUBTRACT_LIVES;
|
||||
ThemeMetric<int> HELD_ADD_LIVES;
|
||||
ThemeMetric<int> LET_GO_SUBTRACT_LIVES;
|
||||
ThemeMetric<RString> LIVES_FORMAT;
|
||||
|
||||
AutoActor m_sprFrame;
|
||||
Sprite m_sprBattery;
|
||||
|
||||
@@ -220,9 +220,11 @@ inline bool MyLua_checkintboolean( lua_State *L, int iArg )
|
||||
#define FArg(n) ((float) luaL_checknumber(L,(n)))
|
||||
|
||||
#define LuaFunction( func, expr ) \
|
||||
int LuaFunc_##func( lua_State *L ); \
|
||||
int LuaFunc_##func( lua_State *L ) { \
|
||||
LuaHelpers::Push( L, expr ); return 1; \
|
||||
} \
|
||||
void LuaFunc_Register_##func( lua_State *L ); \
|
||||
void LuaFunc_Register_##func( lua_State *L ) { lua_register( L, #func, LuaFunc_##func ); } \
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaFunc_Register_##func );
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "ThemeMetric.h"
|
||||
#include "AutoActor.h"
|
||||
|
||||
RString WARNING_COMMAND_NAME( size_t i );
|
||||
|
||||
class MenuTimer : public ActorFrame
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "LuaManager.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
int OptionToPreferredColumn( RString sOptionText );
|
||||
|
||||
REGISTER_ACTOR_CLASS( ModIconRow );
|
||||
|
||||
ModIconRow::ModIconRow()
|
||||
|
||||
@@ -237,7 +237,7 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb
|
||||
if( !useSMserver ) //Make sure that we are using the network
|
||||
return;
|
||||
|
||||
LOG->Trace( ssprintf("Player ID %i combo = %i", playerID, combo) );
|
||||
LOG->Trace( "Player ID %i combo = %i", playerID, combo );
|
||||
m_packet.ClearPacket();
|
||||
|
||||
m_packet.Write1( NSCGSU );
|
||||
|
||||
@@ -778,13 +778,6 @@ void NoteDataUtil::LoadTransformedLightsFromTwo( const NoteData &marquee, const
|
||||
NoteDataUtil::RemoveMines( out );
|
||||
}
|
||||
|
||||
struct RadarStats {
|
||||
int taps;
|
||||
int jumps;
|
||||
int hands;
|
||||
int quads;
|
||||
};
|
||||
|
||||
RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
||||
{
|
||||
out.taps = 0;
|
||||
|
||||
@@ -10,6 +10,24 @@ class NoteData;
|
||||
class Song;
|
||||
struct AttackArray;
|
||||
|
||||
/** @brief A limited selection of the RadarValues. */
|
||||
struct RadarStats
|
||||
{
|
||||
/** @brief The number of tap notes in the song. */
|
||||
int taps;
|
||||
/** @brief The number of jumps in the song. */
|
||||
int jumps;
|
||||
/** @brief The number of 3 panel hits in the song. */
|
||||
int hands;
|
||||
/** @brief The number of 4 panel hits in the song. */
|
||||
int quads;
|
||||
};
|
||||
|
||||
void PlaceAutoKeysound( NoteData &out, int row, TapNote akTap );
|
||||
int FindLongestOverlappingHoldNoteForAnyTrack( const NoteData &in, int iRow );
|
||||
void LightTransformHelper( const NoteData &in, NoteData &out, const vector<int> &aiTracks );
|
||||
RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out );
|
||||
|
||||
/**
|
||||
* @brief Utility functions that deal with NoteData.
|
||||
*
|
||||
|
||||
+46
-1
@@ -46,6 +46,8 @@ static const NoteType MAX_DISPLAY_NOTE_TYPE = (NoteType)7;
|
||||
struct NoteMetricCache_t
|
||||
{
|
||||
bool m_bDrawHoldHeadForTapsOnSameRow;
|
||||
bool m_bDrawRollHeadForTapsOnSameRow;
|
||||
bool m_bTapHoldRollOnRowMeansHold;
|
||||
float m_fAnimationLength[NUM_NotePart];
|
||||
bool m_bAnimationIsVivid[NUM_NotePart];
|
||||
RageVector2 m_fAdditionTextureCoordOffset[NUM_NotePart];
|
||||
@@ -69,6 +71,8 @@ struct NoteMetricCache_t
|
||||
void NoteMetricCache_t::Load( const RString &sButton )
|
||||
{
|
||||
m_bDrawHoldHeadForTapsOnSameRow = NOTESKIN->GetMetricB(sButton,"DrawHoldHeadForTapsOnSameRow");
|
||||
m_bDrawRollHeadForTapsOnSameRow = NOTESKIN->GetMetricB(sButton,"DrawRollHeadForTapsOnSameRow");
|
||||
m_bTapHoldRollOnRowMeansHold = NOTESKIN->GetMetricB(sButton,"TapHoldRollOnRowMeansHold");
|
||||
FOREACH_NotePart( p )
|
||||
{
|
||||
const RString &s = NotePartToString(p);
|
||||
@@ -271,6 +275,11 @@ bool NoteDisplay::DrawHoldHeadForTapsOnSameRow() const
|
||||
return cache->m_bDrawHoldHeadForTapsOnSameRow;
|
||||
}
|
||||
|
||||
bool NoteDisplay::DrawRollHeadForTapsOnSameRow() const
|
||||
{
|
||||
return cache->m_bDrawRollHeadForTapsOnSameRow;
|
||||
}
|
||||
|
||||
void NoteDisplay::Update( float fDeltaTime )
|
||||
{
|
||||
/* This function is static: it's called once per game loop, not once per
|
||||
@@ -718,7 +727,13 @@ void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, in
|
||||
}
|
||||
}
|
||||
|
||||
void NoteDisplay::DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, float fPercentFadeToFail, float fReverseOffsetPixels, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar )
|
||||
void NoteDisplay::DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
bool bOnSameRowAsHoldStart, bool bOnSameRowAsRollStart,
|
||||
bool bIsAddition, float fPercentFadeToFail,
|
||||
float fReverseOffsetPixels,
|
||||
float fDrawDistanceAfterTargetsPixels,
|
||||
float fDrawDistanceBeforeTargetsPixels,
|
||||
float fFadeInPercentOfDrawFar)
|
||||
{
|
||||
Actor* pActor = NULL;
|
||||
NotePart part = NotePart_Tap;
|
||||
@@ -738,10 +753,40 @@ void NoteDisplay::DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSam
|
||||
pActor = GetTapActor( m_TapFake, NotePart_Fake, fBeat );
|
||||
part = NotePart_Fake;
|
||||
}
|
||||
// TODO: Simplify all of the below.
|
||||
else if (bOnSameRowAsHoldStart && bOnSameRowAsRollStart)
|
||||
{
|
||||
if (cache->m_bDrawHoldHeadForTapsOnSameRow && cache->m_bDrawRollHeadForTapsOnSameRow)
|
||||
{
|
||||
if (cache->m_bTapHoldRollOnRowMeansHold) // another new metric?
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, false, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, true, false );
|
||||
}
|
||||
}
|
||||
else if (cache->m_bDrawHoldHeadForTapsOnSameRow)
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, false, false );
|
||||
}
|
||||
else if (cache->m_bDrawRollHeadForTapsOnSameRow)
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, true, false );
|
||||
}
|
||||
}
|
||||
|
||||
else if( bOnSameRowAsHoldStart && cache->m_bDrawHoldHeadForTapsOnSameRow )
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, false, false );
|
||||
}
|
||||
|
||||
else if( bOnSameRowAsRollStart && cache->m_bDrawRollHeadForTapsOnSameRow )
|
||||
{
|
||||
pActor = GetHoldActor( m_HoldHead, NotePart_HoldHead, fBeat, true, false );
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
pActor = GetTapActor( m_TapNote, NotePart_Tap, fBeat );
|
||||
|
||||
+22
-2
@@ -80,13 +80,33 @@ public:
|
||||
|
||||
static void Update( float fDeltaTime );
|
||||
|
||||
void DrawTap( const TapNote& tn, int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition,
|
||||
float fPercentFadeToFail, float fReverseOffsetPixels, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar );
|
||||
/**
|
||||
* @brief Draw the TapNote onto the NoteField.
|
||||
* @param tn the TapNote in question.
|
||||
* @param iCol the column.
|
||||
* @param float fBeat the beat to draw them on.
|
||||
* @param bOnSameRowAsHoldStart a flag to see if a hold is on the same beat.
|
||||
* @param bOnSameRowAsRollStart a flag to see if a roll is on the same beat.
|
||||
* @param bIsAddition a flag to see if this note was added via mods.
|
||||
* @param fPercentFadeToFail at what point do the notes fade on failure?
|
||||
* @param fReverseOffsetPixels How are the notes adjusted on Reverse?
|
||||
* @param fDrawDistanceAfterTargetsPixels how much to draw after the receptors.
|
||||
* @param fDrawDistanceBeforeTargetsPixels how much ot draw before the receptors.
|
||||
* @param fFadeInPercentOfDrawFar when to start fading in. */
|
||||
void DrawTap(const TapNote& tn, int iCol, float fBeat,
|
||||
bool bOnSameRowAsHoldStart, bool bOnSameRowAsRollBeat,
|
||||
bool bIsAddition, float fPercentFadeToFail,
|
||||
float fReverseOffsetPixels,
|
||||
float fDrawDistanceAfterTargetsPixels,
|
||||
float fDrawDistanceBeforeTargetsPixels,
|
||||
float fFadeInPercentOfDrawFar );
|
||||
void DrawHold( const TapNote& tn, int iCol, int iRow, bool bIsBeingHeld, const HoldNoteResult &Result,
|
||||
bool bIsAddition, float fPercentFadeToFail, float fReverseOffsetPixels, float fDrawDistanceAfterTargetsPixels, float fDrawDistanceBeforeTargetsPixels,
|
||||
float fDrawDistanceBeforeTargetsPixels2, float fFadeInPercentOfDrawFar );
|
||||
|
||||
bool DrawHoldHeadForTapsOnSameRow() const;
|
||||
|
||||
bool DrawRollHeadForTapsOnSameRow() const;
|
||||
|
||||
private:
|
||||
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLength, bool bVivid );
|
||||
|
||||
+24
-2
@@ -20,6 +20,9 @@
|
||||
#include "Course.h"
|
||||
#include "NoteData.h"
|
||||
|
||||
float FindFirstDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistanceAfterTargetsPixels );
|
||||
float FindLastDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistanceBeforeTargetsPixels );
|
||||
|
||||
static ThemeMetric<bool> SHOW_BOARD( "NoteField", "ShowBoard" );
|
||||
static ThemeMetric<bool> SHOW_BEAT_BARS( "NoteField", "ShowBeatBars" );
|
||||
static ThemeMetric<float> FADE_BEFORE_TARGETS_PERCENT( "NoteField", "FadeBeforeTargetsPercent" );
|
||||
@@ -1257,13 +1260,31 @@ void NoteField::DrawPrimitives()
|
||||
{
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
{
|
||||
if( m_pNoteData->GetTapNote(c2, q).type == TapNote::hold_head)
|
||||
const TapNote &tmp = m_pNoteData->GetTapNote(c2, q);
|
||||
if(tmp.type == TapNote::hold_head &&
|
||||
tmp.subType == TapNote::hold_head_hold)
|
||||
{
|
||||
bHoldNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// do the same for a roll.
|
||||
bool bRollNoteBeginsOnThisBeat = false;
|
||||
if (m_pCurDisplay->display[c].DrawRollHeadForTapsOnSameRow() )
|
||||
{
|
||||
for( int c2=0; c2<m_pNoteData->GetNumTracks(); c2++ )
|
||||
{
|
||||
const TapNote &tmp = m_pNoteData->GetTapNote(c2, q);
|
||||
if(tmp.type == TapNote::hold_head &&
|
||||
tmp.subType == TapNote::hold_head_roll)
|
||||
{
|
||||
bRollNoteBeginsOnThisBeat = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool bIsInSelectionRange = false;
|
||||
if( m_iBeginMarker!=-1 && m_iEndMarker!=-1 )
|
||||
@@ -1273,7 +1294,8 @@ void NoteField::DrawPrimitives()
|
||||
bool bIsHopoPossible = (tn.bHopoPossible);
|
||||
bool bUseAdditionColoring = bIsAddition || bIsHopoPossible;
|
||||
NoteDisplayCols *displayCols = tn.pn == PLAYER_INVALID ? m_pCurDisplay : m_pDisplays[tn.pn];
|
||||
displayCols->display[c].DrawTap( tn, c, NoteRowToVisibleBeat(m_pPlayerState, q), bHoldNoteBeginsOnThisBeat,
|
||||
displayCols->display[c].DrawTap(tn, c, NoteRowToVisibleBeat(m_pPlayerState, q),
|
||||
bHoldNoteBeginsOnThisBeat, bRollNoteBeginsOnThisBeat,
|
||||
bUseAdditionColoring, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail,
|
||||
m_fYReverseOffsetPixels, iDrawDistanceAfterTargetsPixels, iDrawDistanceBeforeTargetsPixels,
|
||||
FADE_BEFORE_TARGETS_PERCENT );
|
||||
|
||||
@@ -200,7 +200,7 @@ bool NoteSkinManager::DoesNoteSkinExist( const RString &sSkinName )
|
||||
vector<RString> asSkinNames;
|
||||
GetAllNoteSkinNamesForGame( GAMESTATE->m_pCurGame, asSkinNames );
|
||||
for( unsigned i=0; i<asSkinNames.size(); i++ )
|
||||
if( sSkinName.EqualsNoCase(asSkinNames[i]) )
|
||||
if( 0==stricmp(sSkinName, asSkinNames[i]) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
Difficulty DwiCompatibleStringToDifficulty( const RString& sDC );
|
||||
|
||||
static std::map<int,int> g_mapDanceNoteToNoteDataColumn;
|
||||
|
||||
/** @brief The different types of core DWI arrows and pads. */
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Steps.h"
|
||||
#include "GameManager.h"
|
||||
|
||||
void Deserialize(BPMSegment &seg, const Json::Value &root);
|
||||
|
||||
void NotesLoaderJson::GetApplicableFiles( const RString &sPath, vector<RString> &out )
|
||||
{
|
||||
GetDirListing( sPath + RString("*.json"), out );
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include "Song.h"
|
||||
#include "Steps.h"
|
||||
|
||||
RString OptimizeDWIString( RString holds, RString taps );
|
||||
|
||||
/**
|
||||
* @brief Optimize an individual pair of characters whenever possible.
|
||||
* @param c1 the first character.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "NoteData.h"
|
||||
#include "GameManager.h"
|
||||
|
||||
void Serialize(const BPMSegment &seg, Json::Value &root)
|
||||
static void Serialize(const BPMSegment &seg, Json::Value &root)
|
||||
{
|
||||
root["Beat"] = seg.GetBeat();
|
||||
root["BPM"] = seg.GetBPM();
|
||||
|
||||
+7
-9
@@ -42,6 +42,9 @@
|
||||
#include "LocalizedString.h"
|
||||
#include "AdjustSync.h"
|
||||
|
||||
RString ATTACK_DISPLAY_X_NAME( size_t p, size_t both_sides );
|
||||
void TimingWindowSecondsInit( size_t /*TimingWindow*/ i, RString &sNameOut, float &defaultValueOut );
|
||||
|
||||
/**
|
||||
* @brief Helper class to ensure that each row is only judged once without taking too much memory.
|
||||
*/
|
||||
@@ -1323,14 +1326,9 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
|
||||
// Possibly fixed.
|
||||
if( tn.iKeysoundIndex >= 0 && tn.iKeysoundIndex < (int) m_vKeysounds.size() )
|
||||
{
|
||||
if( tn.subType == TapNote::hold_head_roll )
|
||||
{
|
||||
m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0, min(1.0, fLifeFraction * 2.0)));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0, min(1.0, fLifeFraction * 10.0 - 8.5)));
|
||||
}
|
||||
float factor = (tn.subType == TapNote::hold_head_roll ? 2 : 10.0f - 8.5f);
|
||||
factor *= fLifeFraction;
|
||||
m_vKeysounds[tn.iKeysoundIndex].SetProperty ("Volume", max(0.0f, min(1.0f, factor)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2870,7 +2868,7 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
||||
/* Update hold checkpoints
|
||||
*
|
||||
* TODO: Move this to a separate function. */
|
||||
if( HOLD_CHECKPOINTS )
|
||||
if( HOLD_CHECKPOINTS && m_pPlayerState->m_PlayerController != PC_AUTOPLAY )
|
||||
{
|
||||
int iCheckpointFrequencyRows = ROWS_PER_BEAT/2;
|
||||
if( CHECKPOINTS_USE_TICKCOUNTS )
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "CommonMetrics.h"
|
||||
#include <float.h>
|
||||
|
||||
void NextFloat( float fValues[], int size );
|
||||
void NextBool( bool bValues[], int size );
|
||||
|
||||
ThemeMetric<float> RANDOM_SPEED_CHANCE ( "PlayerOptions", "RandomSpeedChance" );
|
||||
ThemeMetric<float> RANDOM_REVERSE_CHANCE ( "PlayerOptions", "RandomReverseChance" );
|
||||
ThemeMetric<float> RANDOM_DARK_CHANCE ( "PlayerOptions", "RandomDarkChance" );
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
class IniFile;
|
||||
|
||||
void ValidateDisplayAspectRatio( float &val );
|
||||
void ValidateSongsPerPlay( int &val );
|
||||
|
||||
/** @brief How many songs can be played during a normal game max?
|
||||
*
|
||||
* This assumes no extra stages, no event mode, no course modes. */
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ public:
|
||||
bpp(0), rate(0), vsync(false), interlaced(false),
|
||||
bSmoothLines(false), bTrilinearFiltering(false),
|
||||
bAnisotropicFiltering(false), sWindowTitle(RString()),
|
||||
sIconFile(RString()), PAL(false), fDisplayAspectRatio(0.0) {}
|
||||
sIconFile(RString()), PAL(false), fDisplayAspectRatio(0.0f) {}
|
||||
|
||||
bool windowed;
|
||||
int width;
|
||||
|
||||
@@ -31,6 +31,13 @@ using namespace RageDisplay_Legacy_Helpers;
|
||||
#define glFlush()
|
||||
#endif
|
||||
|
||||
RString GetInfoLog( GLhandleARB h );
|
||||
GLhandleARB CompileShader( GLenum ShaderType, RString sFile, vector<RString> asDefines );
|
||||
GLhandleARB LoadShader( GLenum ShaderType, RString sFile, vector<RString> asDefines );
|
||||
void InitShaders();
|
||||
void SetupExtensions();
|
||||
void SetPixelMapForSurface( int glImageFormat, int glTexFormat, const RageSurfacePalette *palette );
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
@@ -2561,7 +2568,7 @@ RString RageDisplay_Legacy::GetTextureDiagnostics(unsigned iTexture) const
|
||||
void RageDisplay_Legacy::SetAlphaTest(bool b)
|
||||
{
|
||||
// Previously this was 0.01, rather than 0x01.
|
||||
glAlphaFunc(GL_GREATER, 0.00390625 /* 1/256 */);
|
||||
glAlphaFunc(GL_GREATER, 0.00390625f /* 1/256 */);
|
||||
if (b)
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
else
|
||||
|
||||
@@ -10,6 +10,10 @@ namespace RageFileManagerUtil
|
||||
class RageFileDriver;
|
||||
class RageFileBasic;
|
||||
struct lua_State;
|
||||
|
||||
bool ilt( const RString &a, const RString &b );
|
||||
bool ieq( const RString &a, const RString &b );
|
||||
|
||||
/** @brief File utilities and high-level manager for RageFile objects. */
|
||||
class RageFileManager
|
||||
{
|
||||
|
||||
@@ -26,7 +26,6 @@ enum tagtype {
|
||||
TAGTYPE_ID3V2_FOOTER
|
||||
};
|
||||
|
||||
typedef unsigned long id3_length_t;
|
||||
static const int ID3_TAG_FLAG_FOOTERPRESENT = 0x10;
|
||||
|
||||
static tagtype tagtype( const unsigned char *data, id3_length_t length )
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
|
||||
struct madlib_t;
|
||||
|
||||
typedef unsigned long id3_length_t;
|
||||
|
||||
signed long id3_tag_query( const unsigned char *data, id3_length_t length );
|
||||
void fill_frame_index_cache( madlib_t *mad );
|
||||
|
||||
class RageSoundReader_MP3: public RageSoundReader_FileReader
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
RageSoundReader_Pan::RageSoundReader_Pan( RageSoundReader *pSource ):
|
||||
RageSoundReader_Filter( pSource )
|
||||
{
|
||||
m_fPan = 0.0;
|
||||
m_fPan = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "RageFile.h"
|
||||
|
||||
struct WavReader;
|
||||
|
||||
RString ReadString( RageFileBasic &f, int iSize, RString &sError );
|
||||
|
||||
class RageSoundReader_WAV: public RageSoundReader_FileReader
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <math.h>
|
||||
|
||||
bool HexToBinary(const RString&, RString&);
|
||||
void utf8_sanitize(RString &);
|
||||
void UnicodeUpperLower(wchar_t *, size_t, const unsigned char *);
|
||||
|
||||
RandomGen g_RandomNumberGenerator;
|
||||
|
||||
MersenneTwister::MersenneTwister( int iSeed ) : m_iNext(0)
|
||||
|
||||
+21
-2
@@ -41,7 +41,7 @@
|
||||
static Preference<float> g_iDefaultRecordLength( "DefaultRecordLength", 4 );
|
||||
static Preference<bool> g_bEditorShowBGChangesPlay( "EditorShowBGChangesPlay", true );
|
||||
|
||||
// Defines specific to ScreenEdit
|
||||
/** @brief How long must the button be held to generate a hold in record mode? */
|
||||
const float RECORD_HOLD_SECONDS = 0.3f;
|
||||
|
||||
#define PLAYER_X (SCREEN_CENTER_X)
|
||||
@@ -128,6 +128,17 @@ void ScreenEdit::InitEditMappings()
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_UP_PAGE][1] = DeviceInput(DEVICE_KEYBOARD, KEY_SEMICOLON);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_DOWN_PAGE][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PGDN);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_DOWN_PAGE][1] = DeviceInput(DEVICE_KEYBOARD, KEY_SQUOTE);
|
||||
|
||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SCROLL_UP_TS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL);
|
||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SCROLL_UP_TS][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_UP_TS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PGUP);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_UP_TS][1] = DeviceInput(DEVICE_KEYBOARD, KEY_SEMICOLON);
|
||||
|
||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SCROLL_DOWN_TS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL);
|
||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SCROLL_DOWN_TS][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_DOWN_TS][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PGDN);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_DOWN_TS][1] = DeviceInput(DEVICE_KEYBOARD, KEY_SQUOTE);
|
||||
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_HOME][0] = DeviceInput(DEVICE_KEYBOARD, KEY_HOME);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_END][0] = DeviceInput(DEVICE_KEYBOARD, KEY_END);
|
||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SCROLL_NEXT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_PERIOD);
|
||||
@@ -1490,8 +1501,10 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
break;
|
||||
case EDIT_BUTTON_SCROLL_UP_LINE:
|
||||
case EDIT_BUTTON_SCROLL_UP_PAGE:
|
||||
case EDIT_BUTTON_SCROLL_UP_TS:
|
||||
case EDIT_BUTTON_SCROLL_DOWN_LINE:
|
||||
case EDIT_BUTTON_SCROLL_DOWN_PAGE:
|
||||
case EDIT_BUTTON_SCROLL_DOWN_TS:
|
||||
{
|
||||
float fBeatsToMove=0.f;
|
||||
switch( EditB )
|
||||
@@ -1505,10 +1518,16 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
break;
|
||||
case EDIT_BUTTON_SCROLL_UP_PAGE:
|
||||
case EDIT_BUTTON_SCROLL_DOWN_PAGE:
|
||||
fBeatsToMove = beatsPerMeasure;
|
||||
fBeatsToMove = 4;
|
||||
if( EditB == EDIT_BUTTON_SCROLL_UP_PAGE )
|
||||
fBeatsToMove *= -1;
|
||||
break;
|
||||
case EDIT_BUTTON_SCROLL_UP_TS:
|
||||
case EDIT_BUTTON_SCROLL_DOWN_TS:
|
||||
fBeatsToMove = beatsPerMeasure;
|
||||
if( EditB == EDIT_BUTTON_SCROLL_UP_TS )
|
||||
fBeatsToMove *= -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if( m_PlayerStateEdit.m_PlayerOptions.GetSong().m_fScrolls[PlayerOptions::SCROLL_REVERSE] > 0.5 )
|
||||
|
||||
@@ -62,8 +62,10 @@ enum EditButton
|
||||
|
||||
EDIT_BUTTON_SCROLL_UP_LINE,
|
||||
EDIT_BUTTON_SCROLL_UP_PAGE,
|
||||
EDIT_BUTTON_SCROLL_UP_TS,
|
||||
EDIT_BUTTON_SCROLL_DOWN_LINE,
|
||||
EDIT_BUTTON_SCROLL_DOWN_PAGE,
|
||||
EDIT_BUTTON_SCROLL_DOWN_TS,
|
||||
EDIT_BUTTON_SCROLL_NEXT_MEASURE,
|
||||
EDIT_BUTTON_SCROLL_PREV_MEASURE,
|
||||
EDIT_BUTTON_SCROLL_HOME,
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#include "RageLog.h"
|
||||
#include "UnlockManager.h"
|
||||
|
||||
RString COLUMN_DIFFICULTY_NAME( size_t i );
|
||||
RString COLUMN_STEPS_TYPE_NAME( size_t i );
|
||||
|
||||
static const char *HighScoresTypeNames[] = {
|
||||
"AllSteps",
|
||||
"NonstopCourses",
|
||||
|
||||
@@ -41,6 +41,9 @@ struct PlayAfterLaunchInfo
|
||||
}
|
||||
};
|
||||
|
||||
void InstallSmzipOsArg( const RString &sOsZipFile, PlayAfterLaunchInfo &out );
|
||||
PlayAfterLaunchInfo DoInstalls( CommandLineActions::CommandLineArgs args );
|
||||
|
||||
static void Parse( const RString &sDir, PlayAfterLaunchInfo &out )
|
||||
{
|
||||
vector<RString> vsDirParts;
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "OptionRowHandler.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
void PrepareToLoadScreen( const RString &sScreenName );
|
||||
void FinishedLoadingScreen();
|
||||
|
||||
AutoScreenMessage( SM_GoToOK );
|
||||
AutoScreenMessage( SM_GoToCancel );
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ void ScreenNetSelectMusic::Init()
|
||||
|
||||
SAMPLE_MUSIC_PREVIEW_MODE.Load( m_sName, "SampleMusicPreviewMode" );
|
||||
MUSIC_WHEEL_TYPE.Load( m_sName, "MusicWheelType" );
|
||||
PLAYER_OPTIONS_SCREEN.Load( m_sName, "PlayerOptionsScreen" );
|
||||
|
||||
FOREACH_EnabledPlayer (p)
|
||||
{
|
||||
@@ -331,7 +332,7 @@ void ScreenNetSelectMusic::MenuUp( const InputEventPlus &input )
|
||||
{
|
||||
NSMAN->ReportNSSOnOff(3);
|
||||
GAMESTATE->m_EditMode = EditMode_Full;
|
||||
SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromPlayerOptions );
|
||||
SCREENMAN->AddNewScreenToTop( PLAYER_OPTIONS_SCREEN, SM_BackFromPlayerOptions );
|
||||
}
|
||||
|
||||
void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
|
||||
|
||||
@@ -44,6 +44,7 @@ protected:
|
||||
RString m_sRandomMusicPath;
|
||||
|
||||
ThemeMetric<RString> MUSIC_WHEEL_TYPE;
|
||||
ThemeMetric<RString> PLAYER_OPTIONS_SCREEN;
|
||||
|
||||
private:
|
||||
MusicWheel m_MusicWheel;
|
||||
|
||||
@@ -40,14 +40,10 @@ ScreenReloadSongs::~ScreenReloadSongs()
|
||||
delete loadWin;
|
||||
}
|
||||
|
||||
int ScreenReloadSongs::loadingThreadProc(void *thisAsVoidPtr) {
|
||||
|
||||
ScreenReloadSongs *self=(ScreenReloadSongs *)thisAsVoidPtr;
|
||||
|
||||
int ScreenReloadSongs::loadingThreadProc(void *thisAsVoidPtr)
|
||||
{
|
||||
SONGMAN->Reload( false );
|
||||
|
||||
SCREENMAN->PostMessageToTopScreen( SM_GoToNextScreen, 0 );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void ScreenTestFonts::Init()
|
||||
|
||||
font.SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y+100 );
|
||||
font.LoadFromFont( THEME->GetPathF("Common", "normal") );
|
||||
font.SetZoom(.5);
|
||||
font.SetZoom(.5f);
|
||||
this->AddChild(&font);
|
||||
|
||||
txt.SetName( "Text" );
|
||||
|
||||
@@ -17,7 +17,7 @@ void ScreenTestSound::Init()
|
||||
|
||||
HEEEEEEEEELP.SetXY(450, 400);
|
||||
HEEEEEEEEELP.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||
HEEEEEEEEELP.SetZoom(.5);
|
||||
HEEEEEEEEELP.SetZoom(.5f);
|
||||
HEEEEEEEEELP.SetText(
|
||||
"p Play\n"
|
||||
"s Stop\n"
|
||||
@@ -29,7 +29,7 @@ void ScreenTestSound::Init()
|
||||
{
|
||||
this->AddChild(&s[i].txt);
|
||||
s[i].txt.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||
s[i].txt.SetZoom(.5);
|
||||
s[i].txt.SetZoom(.5f);
|
||||
}
|
||||
|
||||
s[0].txt.SetXY(150, 100);
|
||||
|
||||
@@ -258,7 +258,8 @@ void ScreenTextEntry::BackspaceInAnswer()
|
||||
|
||||
void ScreenTextEntry::MenuStart( const InputEventPlus &input )
|
||||
{
|
||||
if( input.type==IET_FIRST_PRESS )
|
||||
// HACK: Only allow the screen to end on the Enter key.-aj
|
||||
if( input.DeviceI == DeviceInput(DEVICE_KEYBOARD, KEY_ENTER) && input.type==IET_FIRST_PRESS )
|
||||
End( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ void ScreenUnlockStatus::Init()
|
||||
break;
|
||||
default:
|
||||
text->SetText( "" );
|
||||
text->SetDiffuse( RageColor(0.5,0,0,1) );
|
||||
text->SetDiffuse( RageColor(0.5f,0,0,1) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ class StepsID;
|
||||
struct lua_State;
|
||||
struct BackgroundChange;
|
||||
|
||||
void FixupPath( RString &path, const RString &sSongPath );
|
||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
||||
|
||||
/** @brief The version of the .ssc file format. */
|
||||
const static float STEPFILE_VERSION_NUMBER = 0.7f;
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ struct lua_State;
|
||||
#include "RageTexturePreloader.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
RString SONG_GROUP_COLOR_NAME( size_t i );
|
||||
RString COURSE_GROUP_COLOR_NAME( size_t i );
|
||||
bool CompareNotesPointersForExtra(const Steps *n1, const Steps *n2);
|
||||
|
||||
/** @brief The max number of edit steps a profile can have. */
|
||||
const int MAX_EDIT_STEPS_PER_PROFILE = 200;
|
||||
/** @brief The max number of edit courses a profile can have. */
|
||||
|
||||
@@ -13,6 +13,8 @@ class Steps;
|
||||
class Profile;
|
||||
class XNode;
|
||||
|
||||
void AppendOctal( int n, int digits, RString &out );
|
||||
|
||||
/** @brief The criteria for dealing with songs. */
|
||||
class SongCriteria
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "Actor.h"
|
||||
#include "RageTextureID.h"
|
||||
|
||||
void TexCoordArrayFromRect( float fImageCoords[8], const RectF &rect );
|
||||
|
||||
class RageTexture;
|
||||
/** @brief A bitmap Actor that animates and moves around. */
|
||||
class Sprite: public Actor
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
void ShutdownGame();
|
||||
bool HandleGlobalInputs( const InputEventPlus &input );
|
||||
void HandleInputEvents(float fDeltaTime);
|
||||
|
||||
static Preference<bool> g_bAllowMultipleInstances( "AllowMultipleInstances", false );
|
||||
|
||||
void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut )
|
||||
|
||||
+6
-6
@@ -821,10 +821,10 @@ void TimingData::GetBeatAndBPSFromElapsedTimeNoOffset( float fElapsedTime, float
|
||||
|
||||
int iLastRow = 0;
|
||||
float fLastTime = -m_fBeat0OffsetInSeconds;
|
||||
float fBPS = GetBPMAtRow(0) / 60.0;
|
||||
float fBPS = GetBPMAtRow(0) / 60.0f;
|
||||
|
||||
float bIsWarping = false;
|
||||
float fWarpDestination = 0.0;
|
||||
float fWarpDestination = 0;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
@@ -923,10 +923,10 @@ float TimingData::GetElapsedTimeFromBeatNoOffset( float fBeat ) const
|
||||
|
||||
int iLastRow = 0;
|
||||
float fLastTime = -m_fBeat0OffsetInSeconds;
|
||||
float fBPS = GetBPMAtRow(0) / 60.0;
|
||||
float fBPS = GetBPMAtRow(0) / 60.0f;
|
||||
|
||||
float bIsWarping = false;
|
||||
float fWarpDestination = 0.0;
|
||||
float fWarpDestination = 0;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
@@ -1004,7 +1004,7 @@ float TimingData::GetElapsedTimeFromBeatNoOffset( float fBeat ) const
|
||||
float TimingData::GetDisplayedBeat( float fBeat ) const
|
||||
{
|
||||
vector<ScrollSegment>::const_iterator it = m_ScrollSegments.begin(), end = m_ScrollSegments.end();
|
||||
float fOutBeat = 0.0;
|
||||
float fOutBeat = 0;
|
||||
for( ; it != end; it++ )
|
||||
{
|
||||
if( it+1 == end || fBeat <= (it+1)->GetBeat() )
|
||||
@@ -1508,7 +1508,7 @@ float TimingData::GetDisplayedSpeedPercent( float fSongBeat, float fMusicSeconds
|
||||
|
||||
if( ( index == 0 && m_SpeedSegments[0].GetLength() > 0.0 ) && fCurTime < fStartTime )
|
||||
{
|
||||
return 1.0;
|
||||
return 1.0f;
|
||||
}
|
||||
else if( fEndTime >= fCurTime && ( index > 0 || m_SpeedSegments[0].GetLength() > 0.0 ) )
|
||||
{
|
||||
|
||||
@@ -384,6 +384,10 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm )
|
||||
if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED )
|
||||
return;
|
||||
|
||||
// reset mousewheel
|
||||
ButtonPressed( DeviceInput(device.dev, MOUSE_WHEELUP, 0, tm) );
|
||||
ButtonPressed( DeviceInput(device.dev, MOUSE_WHEELDOWN, 0, tm) );
|
||||
|
||||
for( unsigned i = 0; i < device.Inputs.size(); ++i )
|
||||
{
|
||||
const input_t &in = device.Inputs[i];
|
||||
@@ -476,6 +480,12 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
||||
return;
|
||||
}
|
||||
|
||||
// reset mousewheel
|
||||
DeviceInput diUp = DeviceInput(device.dev, MOUSE_WHEELUP, 0.0f, tm);
|
||||
ButtonPressed( diUp );
|
||||
DeviceInput diDown = DeviceInput(device.dev, MOUSE_WHEELDOWN, 0.0f, tm);
|
||||
ButtonPressed( diDown );
|
||||
|
||||
for( int i = 0; i < (int) numevents; ++i )
|
||||
{
|
||||
for(unsigned j = 0; j < device.Inputs.size(); ++j)
|
||||
@@ -522,6 +532,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
|
||||
GetCursorPos(&cursorPos);
|
||||
// convert screen coordinates to client
|
||||
ScreenToClient(GraphicsWindow::GetHwnd(), &cursorPos);
|
||||
|
||||
switch(in.ofs)
|
||||
{
|
||||
case DIMOFS_X:
|
||||
|
||||
@@ -62,7 +62,7 @@ extern "C" void SetProgress( int progress, int totalWork )
|
||||
|
||||
extern "C" void SetIndeterminate( bool indeterminate )
|
||||
{
|
||||
// TODO: Implement this!
|
||||
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressBar));
|
||||
gtk_main_iteration_do(FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "arch/RageDriver.h"
|
||||
#include <map>
|
||||
|
||||
void ForceToAscii( RString &str );
|
||||
|
||||
class RageMovieTexture : public RageTexture
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace avcodec
|
||||
#endif
|
||||
};
|
||||
|
||||
int URLRageFile_open( avcodec::URLContext *h, const char *filename, int flags );
|
||||
int URLRageFile_read( avcodec::URLContext *h, unsigned char *buf, int size );
|
||||
int URLRageFile_close( avcodec::URLContext *h );
|
||||
|
||||
/*
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "ffmpeg/lib/avcodec.lib")
|
||||
|
||||
@@ -28,6 +28,8 @@ extern const char *const version_date;
|
||||
extern const char *const version_time;
|
||||
#endif
|
||||
|
||||
bool child_read( int fd, void *p, int size );
|
||||
|
||||
const char *g_pCrashHandlerArgv0 = NULL;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user