...and another merge!
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Place announcer folders in this directory.
|
Place announcer folders in this directory.
|
||||||
|
|
||||||
[Announcer format]
|
[Announcer format]
|
||||||
sm-ssc's announcers look for certain names. These can either be a single sound,
|
StepMania's announcers look for certain names. These can either be a single sound,
|
||||||
or a folder containing many sounds (of which one is picked at random).
|
or a folder containing many sounds (of which one is picked at random).
|
||||||
|
|
||||||
[Announcer calls]
|
[Announcer calls]
|
||||||
|
|||||||
@@ -1,32 +1,23 @@
|
|||||||
// File for specifying Random Attacks, used by the Random Attacks mod and Attack Mines mod.
|
// File for specifying Random Attacks, used by the Random Attacks mod and Attack Mines mod.
|
||||||
// Only specify one modifier per attack.
|
|
||||||
//
|
//
|
||||||
// Sample lines:
|
// Sample lines:
|
||||||
//
|
|
||||||
// #ATTACK:drunk;
|
// #ATTACK:drunk;
|
||||||
// #ATTACK:30% tornado;
|
// #ATTACK:30% tornado;
|
||||||
// #ATTACK:-20% beat;
|
// #ATTACK:-20% beat;
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// Speed Mods
|
// Speed Mods
|
||||||
//
|
|
||||||
#ATTACK:0.5x;
|
#ATTACK:0.5x;
|
||||||
#ATTACK:1x;
|
#ATTACK:1x;
|
||||||
#ATTACK:1.5x;
|
#ATTACK:1.5x;
|
||||||
#ATTACK:2x;
|
#ATTACK:2x;
|
||||||
|
|
||||||
//
|
|
||||||
// Accel Mods
|
// Accel Mods
|
||||||
//
|
|
||||||
#ATTACK:boost;
|
#ATTACK:boost;
|
||||||
#ATTACK:brake;
|
#ATTACK:brake;
|
||||||
#ATTACK:wave;
|
#ATTACK:wave;
|
||||||
#ATTACK:expand;
|
#ATTACK:expand;
|
||||||
|
|
||||||
//
|
|
||||||
// Effect Mods
|
// Effect Mods
|
||||||
//
|
|
||||||
#ATTACK:drunk;
|
#ATTACK:drunk;
|
||||||
#ATTACK:dizzy;
|
#ATTACK:dizzy;
|
||||||
#ATTACK:confusion;
|
#ATTACK:confusion;
|
||||||
@@ -38,34 +29,24 @@
|
|||||||
#ATTACK:beat;
|
#ATTACK:beat;
|
||||||
#ATTACK:bumpy;
|
#ATTACK:bumpy;
|
||||||
|
|
||||||
//
|
|
||||||
// Appearance Mods
|
// Appearance Mods
|
||||||
//
|
|
||||||
#ATTACK:50% hidden;
|
#ATTACK:50% hidden;
|
||||||
#ATTACK:50% sudden;
|
#ATTACK:50% sudden;
|
||||||
#ATTACK:30% blink;
|
#ATTACK:30% blink;
|
||||||
|
|
||||||
//
|
|
||||||
// Hide Mods
|
// Hide Mods
|
||||||
//
|
|
||||||
#ATTACK:dark;
|
#ATTACK:dark;
|
||||||
#ATTACK:blind;
|
#ATTACK:blind;
|
||||||
|
|
||||||
//
|
|
||||||
// Transform Mods
|
// Transform Mods
|
||||||
//
|
|
||||||
#ATTACK:mines;
|
#ATTACK:mines;
|
||||||
|
|
||||||
//
|
|
||||||
// Scroll
|
// Scroll
|
||||||
//
|
|
||||||
#ATTACK:30% reverse;
|
#ATTACK:30% reverse;
|
||||||
#ATTACK:reverse;
|
#ATTACK:reverse;
|
||||||
#ATTACK:centered;
|
#ATTACK:centered;
|
||||||
|
|
||||||
//
|
|
||||||
// Perspective Mods
|
// Perspective Mods
|
||||||
//
|
|
||||||
#ATTACK:hallway;
|
#ATTACK:hallway;
|
||||||
#ATTACK:space;
|
#ATTACK:space;
|
||||||
#ATTACK:incoming;
|
#ATTACK:incoming;
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done.
|
|||||||
Implement .ssc at your own risk.
|
Implement .ssc at your own risk.
|
||||||
_______________________________________________________________________________
|
_______________________________________________________________________________
|
||||||
|
|
||||||
|
[v0.79] - freem
|
||||||
|
* Back to three significant decimal places.
|
||||||
|
|
||||||
[v0.78] - Wolfman2000
|
[v0.78] - Wolfman2000
|
||||||
* Use the step timing/attack tags only when required. The presence of even
|
* Use the step timing/attack tags only when required. The presence of even
|
||||||
ONE timing tag causes all to be used, so be careful with it.
|
ONE timing tag causes all to be used, so be careful with it.
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 $next | 2011????
|
StepMania 5.0 $next | 2011????
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2011/09/07
|
||||||
|
----------
|
||||||
|
* [Model] Added GetDefaultAnimation() Lua binding. [AJ]
|
||||||
|
* [GameState] Added GetEarnedExtraStage() Lua binding. [AJ]
|
||||||
|
|
||||||
2011/09/02
|
2011/09/02
|
||||||
----------
|
----------
|
||||||
* [MenuTimer] Added start(), disable() Lua bindings. Also renamed setseconds to
|
* [MenuTimer] Added start(), disable() Lua bindings. Also renamed setseconds to
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
[IMPORTANT INSTALL NOTE]
|
|
||||||
If you are using Windows Vista or Windows 7, please do not install StepMania 5 into the Program Files directory.
|
|
||||||
|
|
||||||
[Using Google Chrome?]
|
[Using Google Chrome?]
|
||||||
If you are using Google Chrome as your primary web browser, you will have to perform some extra steps to get stepmania:// URI handling to work:
|
If you are using Google Chrome as your primary web browser, you will have to perform some extra steps to get stepmania:// URI handling to work:
|
||||||
|
|
||||||
|
|||||||
@@ -38,34 +38,41 @@ local stepmania = {
|
|||||||
-- and various other contributors
|
-- and various other contributors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local oitg = {
|
||||||
|
"infamouspat",
|
||||||
|
"Mark Cannon (vyhd)",
|
||||||
|
}
|
||||||
|
|
||||||
local contrib = {
|
local contrib = {
|
||||||
"Aldo Fregoso (Aldo_MX)", -- delays
|
"Aldo Fregoso (Aldo_MX)", -- delays
|
||||||
"cerbo",
|
"cerbo",
|
||||||
"cesarmades", -- pump/cmd* noteskins
|
"cesarmades", -- pump/cmd* noteskins
|
||||||
"Chris Eldridge (kurisu)", -- dance-threepanel
|
"Chris Eldridge (kurisu)", -- dance-threepanel
|
||||||
"Christophe Goulet-LeBlanc (Kommisar)",
|
"Christophe Goulet-LeBlanc (Kommisar)", -- songs
|
||||||
"corec", -- various fixes
|
"corec", -- various fixes
|
||||||
"galopin", -- piu PlayStation2 usb mat support
|
"galopin", -- piu PlayStation2 usb mat support
|
||||||
"gholms", -- automake 1.11 support
|
"gholms", -- automake 1.11 support
|
||||||
"juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods
|
"juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods
|
||||||
"Kaox", -- pump/default noteskin
|
"Kaox", -- pump/default noteskin
|
||||||
|
"Petriform", -- Music
|
||||||
"NitroX72", -- pump/frame noteskin
|
"NitroX72", -- pump/frame noteskin
|
||||||
"sy567", -- beginner helper fix
|
"sy567", -- beginner helper fix
|
||||||
"v1toko", -- x-mode from StepNXA
|
"v1toko", -- x-mode from StepNXA
|
||||||
"waiei", -- custom scoring fixes + Hybrid scoring
|
"waiei", -- custom scoring fixes + Hybrid scoring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local translators = {
|
||||||
|
"John Reactor (Polish)",
|
||||||
|
}
|
||||||
|
|
||||||
local thanks = {
|
local thanks = {
|
||||||
"A Pseudonymous Coder", -- support
|
"A Pseudonymous Coder", -- support
|
||||||
"Bill Shillito (DM Ashura)", -- Music (not yet though)
|
"Bill Shillito (DM Ashura)", -- Music (not yet though)
|
||||||
"cpubasic13", -- testing (a lot)
|
"cpubasic13", -- testing (a lot)
|
||||||
"Dreamwoods",
|
"Dreamwoods",
|
||||||
"Infamouspat", -- oitg bro
|
|
||||||
"Jason Bolt (LightningXCE)",
|
"Jason Bolt (LightningXCE)",
|
||||||
"Jousway", -- Noteskins
|
"Jousway", -- Noteskins
|
||||||
"Matt1360", -- Automake magic + oitg bro
|
"Matt1360", -- Automake magic + oitg bro
|
||||||
"Mark Cannon (vyhd)", -- oitg bro + twirl/roll
|
|
||||||
"Petriform", -- Music
|
|
||||||
"Renard",
|
"Renard",
|
||||||
"Ryan McKanna (Plaguefox)",
|
"Ryan McKanna (Plaguefox)",
|
||||||
}
|
}
|
||||||
@@ -92,6 +99,8 @@ local sections = {
|
|||||||
{ "the spinal shark collective (project lead)", ssc },
|
{ "the spinal shark collective (project lead)", ssc },
|
||||||
{ "sm-ssc Team", sm_ssc },
|
{ "sm-ssc Team", sm_ssc },
|
||||||
{ "StepMania Team", stepmania },
|
{ "StepMania Team", stepmania },
|
||||||
|
{ "OpenITG Team", oitg },
|
||||||
|
{ "Translators", translators },
|
||||||
{ "Other Contributors", contrib },
|
{ "Other Contributors", contrib },
|
||||||
{ "Special Thanks", thanks },
|
{ "Special Thanks", thanks },
|
||||||
{ "Shoutouts", shoutout },
|
{ "Shoutouts", shoutout },
|
||||||
|
|||||||
@@ -3611,12 +3611,12 @@ PlayRecordHelpOnCommand=halign,0;valign,0;shadowlength,1
|
|||||||
|
|
||||||
LoopOnChartEnd=true
|
LoopOnChartEnd=true
|
||||||
|
|
||||||
CurrentBeatFormat="%s:\n %.6f\n"
|
CurrentBeatFormat="%s:\n %.3f\n"
|
||||||
CurrentSecondFormat="%s:\n %.6f\n"
|
CurrentSecondFormat="%s:\n %.3f\n"
|
||||||
SnapToFormat="%s: %s\n"
|
SnapToFormat="%s: %s\n"
|
||||||
SelectionBeatBeginFormat="%s:\n %.6f"
|
SelectionBeatBeginFormat="%s:\n %.3f"
|
||||||
SelectionBeatUnfinishedFormat=" ...\n"
|
SelectionBeatUnfinishedFormat=" ...\n"
|
||||||
SelectionBeatEndFormat="-%.6f\n"
|
SelectionBeatEndFormat="-%.3f\n"
|
||||||
DifficultyFormat="%s:\n %s\n"
|
DifficultyFormat="%s:\n %s\n"
|
||||||
RoutinePlayerFormat="%s: %d\n"
|
RoutinePlayerFormat="%s: %d\n"
|
||||||
DescriptionFormat="%s:\n %s\n"
|
DescriptionFormat="%s:\n %s\n"
|
||||||
@@ -3644,9 +3644,9 @@ NumRollsFormatTwoPlayer="%s: %d/%d\n"
|
|||||||
NumLiftsFormatTwoPlayer="%s: %d/%d\n"
|
NumLiftsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
NumFakesFormatTwoPlayer="%s: %d/%d\n"
|
NumFakesFormatTwoPlayer="%s: %d/%d\n"
|
||||||
TimingModeFormat="%s:\n %s\n"
|
TimingModeFormat="%s:\n %s\n"
|
||||||
Beat0OffsetFormat="%s:\n %.6f secs\n"
|
Beat0OffsetFormat="%s:\n %.3f secs\n"
|
||||||
PreviewStartFormat="%s:\n %.6f secs\n"
|
PreviewStartFormat="%s:\n %.3f secs\n"
|
||||||
PreviewLengthFormat="%s:\n %.6f secs\n"
|
PreviewLengthFormat="%s:\n %.3f secs\n"
|
||||||
|
|
||||||
[ScreenPracticeMenu]
|
[ScreenPracticeMenu]
|
||||||
Fallback="ScreenEditMenu"
|
Fallback="ScreenEditMenu"
|
||||||
|
|||||||
@@ -38,18 +38,24 @@ local stepmania = {
|
|||||||
-- and various other contributors
|
-- and various other contributors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local oitg = {
|
||||||
|
"infamouspat",
|
||||||
|
"Mark Cannon (vyhd)",
|
||||||
|
}
|
||||||
|
|
||||||
local contrib = {
|
local contrib = {
|
||||||
"Aldo Fregoso (Aldo_MX)", -- delays
|
"Aldo Fregoso (Aldo_MX)", -- delays
|
||||||
"cerbo",
|
"cerbo",
|
||||||
"cesarmades", -- pump/cmd* noteskins
|
"cesarmades", -- pump/cmd* noteskins
|
||||||
"Chris Eldridge (kurisu)", -- dance-threepanel
|
"Chris Eldridge (kurisu)", -- dance-threepanel
|
||||||
"Christophe Goulet-LeBlanc (Kommisar)",
|
"Christophe Goulet-LeBlanc (Kommisar)", -- songs
|
||||||
"corec", -- various fixes
|
"corec", -- various fixes
|
||||||
"galopin", -- piu PlayStation2 usb mat support
|
"galopin", -- piu PlayStation2 usb mat support
|
||||||
"gholms", -- automake 1.11 support
|
"gholms", -- automake 1.11 support
|
||||||
"juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods
|
"juanelote", -- SongManager:GetSongGroupByIndex, JumpToNext/PrevGroup logic mods
|
||||||
"Kaox", -- pump/default noteskin
|
"Kaox", -- pump/default noteskin
|
||||||
"NitroX72", -- pump/frame noteskin
|
"NitroX72", -- pump/frame noteskin
|
||||||
|
"Petriform", -- Music
|
||||||
"sy567", -- beginner helper fix
|
"sy567", -- beginner helper fix
|
||||||
"v1toko", -- x-mode from StepNXA
|
"v1toko", -- x-mode from StepNXA
|
||||||
"waiei", -- custom scoring fixes + Hybrid scoring
|
"waiei", -- custom scoring fixes + Hybrid scoring
|
||||||
@@ -64,12 +70,9 @@ local thanks = {
|
|||||||
"Bill Shillito (DM Ashura)", -- Music (not yet though)
|
"Bill Shillito (DM Ashura)", -- Music (not yet though)
|
||||||
"cpubasic13", -- testing (a lot)
|
"cpubasic13", -- testing (a lot)
|
||||||
"Dreamwoods",
|
"Dreamwoods",
|
||||||
"Infamouspat", -- oitg bro
|
|
||||||
"Jason Bolt (LightningXCE)",
|
"Jason Bolt (LightningXCE)",
|
||||||
"Jousway", -- Noteskins
|
"Jousway", -- Noteskins
|
||||||
"Matt1360", -- Automake magic + oitg bro
|
"Matt1360", -- Automake magic + oitg bro
|
||||||
"Mark Cannon (vyhd)", -- oitg bro + twirl/roll
|
|
||||||
"Petriform", -- Music
|
|
||||||
"Renard",
|
"Renard",
|
||||||
"Ryan McKanna (Plaguefox)",
|
"Ryan McKanna (Plaguefox)",
|
||||||
}
|
}
|
||||||
@@ -81,10 +84,10 @@ local shoutout = {
|
|||||||
"NAKET Coder",
|
"NAKET Coder",
|
||||||
"Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits
|
"Ciera Boyd", -- you bet your ass I'm putting my girlfriend in the credits
|
||||||
--Image(), -- we should have some logos probably to look super pro
|
--Image(), -- we should have some logos probably to look super pro
|
||||||
-- "Can't stop crying... buckets of tears!"
|
|
||||||
"#KBO",
|
"#KBO",
|
||||||
"AJ Kelly, without which this game would have never been.",
|
"Celestia Radio", -- LOVE AND TOLERANCE
|
||||||
"You showed us... your ultimate dance",
|
"You showed us... your ultimate dance",
|
||||||
|
-- "Can't stop crying... buckets of tears!"
|
||||||
}
|
}
|
||||||
|
|
||||||
local copyright = {
|
local copyright = {
|
||||||
@@ -97,15 +100,14 @@ local sections = {
|
|||||||
{ "the spinal shark collective (project lead)", ssc },
|
{ "the spinal shark collective (project lead)", ssc },
|
||||||
{ "sm-ssc Team", sm_ssc },
|
{ "sm-ssc Team", sm_ssc },
|
||||||
{ "StepMania Team", stepmania },
|
{ "StepMania Team", stepmania },
|
||||||
{ "Other Contributors", contrib },
|
{ "OpenITG Team", oitg },
|
||||||
{ "Translators", translators },
|
{ "Translators", translators },
|
||||||
|
{ "Other Contributors", contrib },
|
||||||
{ "Special Thanks", thanks },
|
{ "Special Thanks", thanks },
|
||||||
{ "Shoutouts", shoutout },
|
{ "Shoutouts", shoutout },
|
||||||
{ "Copyright", copyright },
|
{ "Copyright", copyright },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- To add people or sections modify the above.
|
-- To add people or sections modify the above.
|
||||||
|
|
||||||
local lineOn = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,3)
|
local lineOn = cmd(zoom,0.875;strokecolor,color("#444444");shadowcolor,color("#444444");shadowlength,3)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ local function CreateSegments(Player)
|
|||||||
-- Straight rip off NCRX
|
-- Straight rip off NCRX
|
||||||
local song = GAMESTATE:GetCurrentSong();
|
local song = GAMESTATE:GetCurrentSong();
|
||||||
local steps = GAMESTATE:GetCurrentSteps( Player );
|
local steps = GAMESTATE:GetCurrentSteps( Player );
|
||||||
|
if steps then
|
||||||
local timingData = steps:GetTimingData();
|
local timingData = steps:GetTimingData();
|
||||||
-- if we're using SSC, might as well use the StepsSeconds, which will
|
-- if we're using SSC, might as well use the StepsSeconds, which will
|
||||||
-- almost always be more proper than a r21'd file.
|
-- almost always be more proper than a r21'd file.
|
||||||
@@ -135,6 +136,7 @@ local function CreateSegments(Player)
|
|||||||
bars[#bars+1] = fakeFrame;
|
bars[#bars+1] = fakeFrame;
|
||||||
t[#t+1] = bars;
|
t[#t+1] = bars;
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
local t = LoadFallbackB()
|
local t = LoadFallbackB()
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -1,8 +1,15 @@
|
|||||||
-- comments show how this compares to a StepMania 3.9 BGAnimation.ini.
|
local t = Def.ActorFrame{
|
||||||
-- It should be noted that additional commands on the ActorFrame as a whole for
|
InitCommand=cmd(fov,70);
|
||||||
-- this file are in metrics.ini ([ScreenTitleMenu] ShowLogo, etc.)
|
LoadActor("_arrow")..{
|
||||||
local t = Def.ActorFrame{ -- [BGAnimation]
|
InitCommand=cmd(x,225;);
|
||||||
LoadActor("_logo"); -- [Layer1] Type=0 File=_ball.png
|
OnCommand=cmd(wag;effectmagnitude,0,0,16;effectperiod,2.5;);
|
||||||
|
};
|
||||||
|
LoadActor("_text");
|
||||||
|
LoadActor("_text")..{
|
||||||
|
Name="TextGlow";
|
||||||
|
InitCommand=cmd(blend,Blend.Add;diffusealpha,0.05;);
|
||||||
|
OnCommand=cmd(glowshift;effectperiod,2.5;effectcolor1,color("1,1,1,0.25");effectcolor2,color("1,1,1,1"););
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -604,8 +604,8 @@ ScrollerOnCommand=zoom,0;bounceend,0.35;zoom,1
|
|||||||
ShowLogo=true
|
ShowLogo=true
|
||||||
LogoX=SCREEN_CENTER_X
|
LogoX=SCREEN_CENTER_X
|
||||||
LogoY=SCREEN_CENTER_Y-68
|
LogoY=SCREEN_CENTER_Y-68
|
||||||
LogoOnCommand=bob;effectperiod,4;effectmagnitude,0,5.25,0;zoom,0;bounceend,0.35;zoom,0.75
|
LogoOnCommand=
|
||||||
LogoOffCommand=stopeffect;bouncebegin,0.35;zoom,0
|
LogoOffCommand=
|
||||||
#
|
#
|
||||||
ShowCurrentGametype=true
|
ShowCurrentGametype=true
|
||||||
CurrentGametypeX=SCREEN_WIDTH*0.01
|
CurrentGametypeX=SCREEN_WIDTH*0.01
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
In this folder are local copies of things required to properly build the
|
In this folder are local copies of things required to properly build the
|
||||||
StepMania installer.
|
StepMania installer.
|
||||||
|
|
||||||
Right now, this is just the GetVersion plugin (so that we can write the files
|
Right now, this is just the NSIS-OS plugin (so that we can write the files
|
||||||
to somewhere that isn't Program Files on Windows Vista/7).
|
to somewhere that isn't Program Files on Windows Vista/7).
|
||||||
|
|
||||||
The GetVersion plugin can alternatively be downloaded from here:
|
The NSIS-OS plugin can be alternatively downloaded from here:
|
||||||
http://nsis.sourceforge.net/GetVersion_%28Windows%29_plug-in
|
http://nsis.sourceforge.net/NSIS-OS_plug-in
|
||||||
Binary file not shown.
+6
-11
@@ -54,14 +54,6 @@
|
|||||||
; I think it may need actual admin privs for writing to the registry... -aj
|
; I think it may need actual admin privs for writing to the registry... -aj
|
||||||
;RequestExecutionLevel user
|
;RequestExecutionLevel user
|
||||||
|
|
||||||
;GetVersion::WindowsServicePackMajor
|
|
||||||
;Pop $R0
|
|
||||||
;${If} $R0 >= 6
|
|
||||||
; vista & 7
|
|
||||||
;${Else}
|
|
||||||
; xp and below
|
|
||||||
;${EndIf}
|
|
||||||
|
|
||||||
InstallDir "$PROGRAMFILES\${PRODUCT_ID}"
|
InstallDir "$PROGRAMFILES\${PRODUCT_ID}"
|
||||||
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}" ""
|
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${PRODUCT_ID}" ""
|
||||||
|
|
||||||
@@ -97,9 +89,6 @@
|
|||||||
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
|
||||||
; include various Windows-only notices
|
|
||||||
!insertmacro MUI_PAGE_LICENSE ".\Docs\WindowsNotes.txt"
|
|
||||||
|
|
||||||
;!insertmacro MUI_PAGE_COMPONENTS
|
;!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
@@ -681,6 +670,12 @@ FunctionEnd
|
|||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
|
||||||
|
nsisos::osversion
|
||||||
|
${If} $R0 >= 6
|
||||||
|
;vista & win7
|
||||||
|
StrCpy $INSTDIR "%HOMEPATH%\${PRODUCT_ID}"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; Force show language selection for debugging
|
; Force show language selection for debugging
|
||||||
;!define MUI_LANGDLL_ALWAYSSHOW
|
;!define MUI_LANGDLL_ALWAYSSHOW
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
|
|||||||
+1
-1
@@ -2791,8 +2791,8 @@ static const Game g_Game_Lights =
|
|||||||
|
|
||||||
static const Game *g_Games[] =
|
static const Game *g_Games[] =
|
||||||
{
|
{
|
||||||
&g_Game_Pump,
|
|
||||||
&g_Game_Dance,
|
&g_Game_Dance,
|
||||||
|
&g_Game_Pump,
|
||||||
&g_Game_KB7,
|
&g_Game_KB7,
|
||||||
&g_Game_Ez2,
|
&g_Game_Ez2,
|
||||||
&g_Game_Para,
|
&g_Game_Para,
|
||||||
|
|||||||
@@ -2261,6 +2261,7 @@ public:
|
|||||||
DEFINE_METHOD( IsExtraStage2, IsExtraStage2() )
|
DEFINE_METHOD( IsExtraStage2, IsExtraStage2() )
|
||||||
DEFINE_METHOD( GetCurrentStage, GetCurrentStage() )
|
DEFINE_METHOD( GetCurrentStage, GetCurrentStage() )
|
||||||
DEFINE_METHOD( HasEarnedExtraStage, HasEarnedExtraStage() )
|
DEFINE_METHOD( HasEarnedExtraStage, HasEarnedExtraStage() )
|
||||||
|
DEFINE_METHOD( GetEarnedExtraStage, GetEarnedExtraStage() )
|
||||||
DEFINE_METHOD( GetEasiestStepsDifficulty, GetEasiestStepsDifficulty() )
|
DEFINE_METHOD( GetEasiestStepsDifficulty, GetEasiestStepsDifficulty() )
|
||||||
DEFINE_METHOD( GetHardestStepsDifficulty, GetHardestStepsDifficulty() )
|
DEFINE_METHOD( GetHardestStepsDifficulty, GetHardestStepsDifficulty() )
|
||||||
DEFINE_METHOD( IsEventMode, IsEventMode() )
|
DEFINE_METHOD( IsEventMode, IsEventMode() )
|
||||||
@@ -2476,6 +2477,7 @@ public:
|
|||||||
ADD_METHOD( IsExtraStage2 );
|
ADD_METHOD( IsExtraStage2 );
|
||||||
ADD_METHOD( GetCurrentStage );
|
ADD_METHOD( GetCurrentStage );
|
||||||
ADD_METHOD( HasEarnedExtraStage );
|
ADD_METHOD( HasEarnedExtraStage );
|
||||||
|
ADD_METHOD( GetEarnedExtraStage );
|
||||||
ADD_METHOD( GetEasiestStepsDifficulty );
|
ADD_METHOD( GetEasiestStepsDifficulty );
|
||||||
ADD_METHOD( GetHardestStepsDifficulty );
|
ADD_METHOD( GetHardestStepsDifficulty );
|
||||||
ADD_METHOD( IsEventMode );
|
ADD_METHOD( IsEventMode );
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ public:
|
|||||||
Character* m_pCurCharacters[NUM_PLAYERS];
|
Character* m_pCurCharacters[NUM_PLAYERS];
|
||||||
|
|
||||||
bool HasEarnedExtraStage() const { return m_bEarnedExtraStage; }
|
bool HasEarnedExtraStage() const { return m_bEarnedExtraStage; }
|
||||||
|
EarnedExtraStage GetEarnedExtraStage() const { return CalculateEarnedExtraStage(); }
|
||||||
|
|
||||||
// Ranking Stuff
|
// Ranking Stuff
|
||||||
struct RankingFeat
|
struct RankingFeat
|
||||||
|
|||||||
@@ -778,6 +778,7 @@ public:
|
|||||||
static int position( T* p, lua_State *L ) { p->SetPosition( FArg(1) ); return 0; }
|
static int position( T* p, lua_State *L ) { p->SetPosition( FArg(1) ); return 0; }
|
||||||
static int playanimation( T* p, lua_State *L ) { p->PlayAnimation(SArg(1),FArg(2)); return 0; }
|
static int playanimation( T* p, lua_State *L ) { p->PlayAnimation(SArg(1),FArg(2)); return 0; }
|
||||||
static int SetDefaultAnimation( T* p, lua_State *L ) { p->SetDefaultAnimation(SArg(1),FArg(2)); return 0; }
|
static int SetDefaultAnimation( T* p, lua_State *L ) { p->SetDefaultAnimation(SArg(1),FArg(2)); return 0; }
|
||||||
|
static int GetDefaultAnimation( T* p, lua_State *L ) { lua_pushstring( L, p->GetDefaultAnimation() ); return 1; }
|
||||||
static int loop( T* p, lua_State *L ) { p->SetLoop(BArg(1)); return 0; }
|
static int loop( T* p, lua_State *L ) { p->SetLoop(BArg(1)); return 0; }
|
||||||
static int rate( T* p, lua_State *L ) { p->SetRate(FArg(1)); return 0; }
|
static int rate( T* p, lua_State *L ) { p->SetRate(FArg(1)); return 0; }
|
||||||
static int GetNumStates( T* p, lua_State *L ) { lua_pushnumber( L, p->GetNumStates() ); return 1; }
|
static int GetNumStates( T* p, lua_State *L ) { lua_pushnumber( L, p->GetNumStates() ); return 1; }
|
||||||
@@ -788,11 +789,13 @@ public:
|
|||||||
ADD_METHOD( position );
|
ADD_METHOD( position );
|
||||||
ADD_METHOD( playanimation );
|
ADD_METHOD( playanimation );
|
||||||
ADD_METHOD( SetDefaultAnimation );
|
ADD_METHOD( SetDefaultAnimation );
|
||||||
|
ADD_METHOD( GetDefaultAnimation );
|
||||||
ADD_METHOD( loop );
|
ADD_METHOD( loop );
|
||||||
ADD_METHOD( rate );
|
ADD_METHOD( rate );
|
||||||
// sm-ssc adds:
|
// sm-ssc adds:
|
||||||
ADD_METHOD( GetNumStates );
|
ADD_METHOD( GetNumStates );
|
||||||
//ADD_METHOD( CelShading );
|
//ADD_METHOD( CelShading );
|
||||||
|
// LoadMilkshapeAsciiBones?
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+16
-16
@@ -44,16 +44,16 @@ struct TimingTagWriter {
|
|||||||
|
|
||||||
void Write( const int row, const char *value )
|
void Write( const int row, const char *value )
|
||||||
{
|
{
|
||||||
m_pvsLines->push_back( m_sNext + ssprintf( "%.6f=%s", NoteRowToBeat(row), value ) );
|
m_pvsLines->push_back( m_sNext + ssprintf( "%.3f=%s", NoteRowToBeat(row), value ) );
|
||||||
m_sNext = ",";
|
m_sNext = ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write( const int row, const float value ) { Write( row, ssprintf( "%.6f", value ) ); }
|
void Write( const int row, const float value ) { Write( row, ssprintf( "%.3f", value ) ); }
|
||||||
void Write( const int row, const int value ) { Write( row, ssprintf( "%d", value ) ); }
|
void Write( const int row, const int value ) { Write( row, ssprintf( "%d", value ) ); }
|
||||||
void Write( const int row, const int a, const int b ) { Write( row, ssprintf( "%d=%d", a, b ) ); }
|
void Write( const int row, const int a, const int b ) { Write( row, ssprintf( "%d=%d", a, b ) ); }
|
||||||
void Write( const int row, const float a, const float b ) { Write( row, ssprintf( "%.6f=%.6f", a, b) ); }
|
void Write( const int row, const float a, const float b ) { Write( row, ssprintf( "%.3f=%.3f", a, b) ); }
|
||||||
void Write( const int row, const float a, const float b, const unsigned short c )
|
void Write( const int row, const float a, const float b, const unsigned short c )
|
||||||
{ Write( row, ssprintf( "%.6f=%.6f=%hd", a, b, c) ); }
|
{ Write( row, ssprintf( "%.3f=%.3f=%hd", a, b, c) ); }
|
||||||
|
|
||||||
void Init( const RString sTag ) { m_sNext = "#" + sTag + ":"; }
|
void Init( const RString sTag ) { m_sNext = "#" + sTag + ":"; }
|
||||||
void Finish( ) { m_pvsLines->push_back( ( m_sNext != "," ? m_sNext : "" ) + ";" ); }
|
void Finish( ) { m_pvsLines->push_back( ( m_sNext != "," ? m_sNext : "" ) + ";" ); }
|
||||||
@@ -235,9 +235,9 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
|||||||
f.PutLine( "#INSTRUMENTTRACK:" + s + ";\n" );
|
f.PutLine( "#INSTRUMENTTRACK:" + s + ";\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.PutLine( ssprintf( "#OFFSET:%.6f;", out.m_SongTiming.m_fBeat0OffsetInSeconds ) );
|
f.PutLine( ssprintf( "#OFFSET:%.3f;", out.m_SongTiming.m_fBeat0OffsetInSeconds ) );
|
||||||
f.PutLine( ssprintf( "#SAMPLESTART:%.6f;", out.m_fMusicSampleStartSeconds ) );
|
f.PutLine( ssprintf( "#SAMPLESTART:%.3f;", out.m_fMusicSampleStartSeconds ) );
|
||||||
f.PutLine( ssprintf( "#SAMPLELENGTH:%.6f;", out.m_fMusicSampleLengthSeconds ) );
|
f.PutLine( ssprintf( "#SAMPLELENGTH:%.3f;", out.m_fMusicSampleLengthSeconds ) );
|
||||||
|
|
||||||
f.Write( "#SELECTABLE:" );
|
f.Write( "#SELECTABLE:" );
|
||||||
switch(out.m_SelectionDisplay)
|
switch(out.m_SelectionDisplay)
|
||||||
@@ -256,9 +256,9 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
|||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_SPECIFIED:
|
case DISPLAY_BPM_SPECIFIED:
|
||||||
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax )
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.3f;", out.m_fSpecifiedBPMMin ) );
|
||||||
else
|
else
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:%.3f:%.3f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) );
|
||||||
break;
|
break;
|
||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) );
|
||||||
@@ -268,7 +268,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out )
|
|||||||
WriteTimingTags( f, out.m_SongTiming, true );
|
WriteTimingTags( f, out.m_SongTiming, true );
|
||||||
|
|
||||||
if( out.GetSpecifiedLastSecond() > 0 )
|
if( out.GetSpecifiedLastSecond() > 0 )
|
||||||
f.PutLine( ssprintf("#LASTSECONDHINT:%.6f;", out.GetSpecifiedLastSecond()) );
|
f.PutLine( ssprintf("#LASTSECONDHINT:%.3f;", out.GetSpecifiedLastSecond()) );
|
||||||
|
|
||||||
FOREACH_BackgroundLayer( b )
|
FOREACH_BackgroundLayer( b )
|
||||||
{
|
{
|
||||||
@@ -349,7 +349,7 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
|
|||||||
// XXX: Is there a better way to write this?
|
// XXX: Is there a better way to write this?
|
||||||
if (const_cast<TimingData &>(song.m_SongTiming) != in.m_Timing)
|
if (const_cast<TimingData &>(song.m_SongTiming) != in.m_Timing)
|
||||||
{
|
{
|
||||||
lines.push_back( ssprintf( "#OFFSET:%.6f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
|
lines.push_back( ssprintf( "#OFFSET:%.3f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
|
||||||
GetTimingTags( lines, in.m_Timing );
|
GetTimingTags( lines, in.m_Timing );
|
||||||
}
|
}
|
||||||
if (song.GetAttackString() != in.GetAttackString())
|
if (song.GetAttackString() != in.GetAttackString())
|
||||||
@@ -365,9 +365,9 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
|
|||||||
float small = in.GetMinBPM();
|
float small = in.GetMinBPM();
|
||||||
float big = in.GetMaxBPM();
|
float big = in.GetMaxBPM();
|
||||||
if (small == big)
|
if (small == big)
|
||||||
lines.push_back( ssprintf( "#DISPLAYBPM:%.6f;", small ) );
|
lines.push_back( ssprintf( "#DISPLAYBPM:%.3f;", small ) );
|
||||||
else
|
else
|
||||||
lines.push_back( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", small, big ) );
|
lines.push_back( ssprintf( "#DISPLAYBPM:%.3f:%.3f;", small, big ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DISPLAY_BPM_RANDOM:
|
case DISPLAY_BPM_RANDOM:
|
||||||
@@ -414,12 +414,12 @@ bool NotesWriterSSC::Write( RString sPath, const Song &out, const vector<Steps*>
|
|||||||
if( bSavingCache )
|
if( bSavingCache )
|
||||||
{
|
{
|
||||||
f.PutLine( ssprintf( "// cache tags:" ) );
|
f.PutLine( ssprintf( "// cache tags:" ) );
|
||||||
f.PutLine( ssprintf( "#FIRSTSECOND:%.6f;", out.GetFirstSecond() ) );
|
f.PutLine( ssprintf( "#FIRSTSECOND:%.3f;", out.GetFirstSecond() ) );
|
||||||
f.PutLine( ssprintf( "#LASTSECOND:%.6f;", out.GetLastSecond() ) );
|
f.PutLine( ssprintf( "#LASTSECOND:%.3f;", out.GetLastSecond() ) );
|
||||||
f.PutLine( ssprintf( "#SONGFILENAME:%s;", out.m_sSongFileName.c_str() ) );
|
f.PutLine( ssprintf( "#SONGFILENAME:%s;", out.m_sSongFileName.c_str() ) );
|
||||||
f.PutLine( ssprintf( "#HASMUSIC:%i;", out.m_bHasMusic ) );
|
f.PutLine( ssprintf( "#HASMUSIC:%i;", out.m_bHasMusic ) );
|
||||||
f.PutLine( ssprintf( "#HASBANNER:%i;", out.m_bHasBanner ) );
|
f.PutLine( ssprintf( "#HASBANNER:%i;", out.m_bHasBanner ) );
|
||||||
f.PutLine( ssprintf( "#MUSICLENGTH:%.6f;", out.m_fMusicLengthSeconds ) );
|
f.PutLine( ssprintf( "#MUSICLENGTH:%.3f;", out.m_fMusicLengthSeconds ) );
|
||||||
f.PutLine( ssprintf( "// end cache tags" ) );
|
f.PutLine( ssprintf( "// end cache tags" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -501,6 +501,21 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
return; // ignore
|
return; // ignore
|
||||||
|
|
||||||
// todo: Allow mousewheel to scroll MusicWheel -aj
|
// todo: Allow mousewheel to scroll MusicWheel -aj
|
||||||
|
/*
|
||||||
|
if( input.DeviceI.device == DEVICE_MOUSE )
|
||||||
|
{
|
||||||
|
if( input.DeviceI.button == MOUSE_WHEELUP )
|
||||||
|
{
|
||||||
|
MESSAGEMAN->Broadcast( "PreviousSong" );
|
||||||
|
m_MusicWheel.Move( -1 );
|
||||||
|
}
|
||||||
|
else if( input.DeviceI.button == MOUSE_WHEELDOWN )
|
||||||
|
{
|
||||||
|
MESSAGEMAN->Broadcast( "NextSong" );
|
||||||
|
m_MusicWheel.Move( +1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if( USE_PLAYER_SELECT_MENU )
|
if( USE_PLAYER_SELECT_MENU )
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath );
|
|||||||
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
RString GetSongAssetPath( RString sPath, const RString &sSongPath );
|
||||||
|
|
||||||
/** @brief The version of the .ssc file format. */
|
/** @brief The version of the .ssc file format. */
|
||||||
const static float STEPFILE_VERSION_NUMBER = 0.78f;
|
const static float STEPFILE_VERSION_NUMBER = 0.79f;
|
||||||
|
|
||||||
/** @brief How many edits for this song can each profile have? */
|
/** @brief How many edits for this song can each profile have? */
|
||||||
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
|
||||||
|
|||||||
+13
-2
@@ -59,7 +59,6 @@ static Preference<bool> g_bHideIncompleteCourses( "HideIncompleteCourses", false
|
|||||||
RString SONG_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "SongGroupColor%i", (int) i+1 ); }
|
RString SONG_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "SongGroupColor%i", (int) i+1 ); }
|
||||||
RString COURSE_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "CourseGroupColor%i", (int) i+1 ); }
|
RString COURSE_GROUP_COLOR_NAME( size_t i ) { return ssprintf( "CourseGroupColor%i", (int) i+1 ); }
|
||||||
|
|
||||||
|
|
||||||
SongManager::SongManager()
|
SongManager::SongManager()
|
||||||
{
|
{
|
||||||
// Register with Lua.
|
// Register with Lua.
|
||||||
@@ -585,7 +584,6 @@ RageColor SongManager::GetCourseColor( const Course* pCourse ) const
|
|||||||
if( pUE && USE_UNLOCK_COLOR.GetValue() )
|
if( pUE && USE_UNLOCK_COLOR.GetValue() )
|
||||||
return UNLOCK_COLOR.GetValue();
|
return UNLOCK_COLOR.GetValue();
|
||||||
|
|
||||||
|
|
||||||
if( USE_PREFERRED_SORT_COLOR )
|
if( USE_PREFERRED_SORT_COLOR )
|
||||||
{
|
{
|
||||||
FOREACH_CONST( CoursePointerVector, m_vPreferredCourseSort, v )
|
FOREACH_CONST( CoursePointerVector, m_vPreferredCourseSort, v )
|
||||||
@@ -780,6 +778,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
|||||||
vsCourseGroupNames.push_back( SpecialFiles::COURSES_DIR );
|
vsCourseGroupNames.push_back( SpecialFiles::COURSES_DIR );
|
||||||
SortRStringArray( vsCourseGroupNames );
|
SortRStringArray( vsCourseGroupNames );
|
||||||
|
|
||||||
|
int courseIndex = 0;
|
||||||
FOREACH_CONST( RString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/
|
FOREACH_CONST( RString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/
|
||||||
{
|
{
|
||||||
// Find all CRS files in this group directory
|
// Find all CRS files in this group directory
|
||||||
@@ -787,10 +786,17 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
|||||||
GetDirListing( *sCourseGroup + "/*.crs", vsCoursePaths, false, true );
|
GetDirListing( *sCourseGroup + "/*.crs", vsCoursePaths, false, true );
|
||||||
SortRStringArray( vsCoursePaths );
|
SortRStringArray( vsCoursePaths );
|
||||||
|
|
||||||
|
if( ld )
|
||||||
|
{
|
||||||
|
ld->SetIndeterminate( false );
|
||||||
|
ld->SetTotalWork( vsCoursePaths.size() );
|
||||||
|
}
|
||||||
|
|
||||||
FOREACH_CONST( RString, vsCoursePaths, sCoursePath )
|
FOREACH_CONST( RString, vsCoursePaths, sCoursePath )
|
||||||
{
|
{
|
||||||
if( ld )
|
if( ld )
|
||||||
{
|
{
|
||||||
|
ld->SetProgress(courseIndex);
|
||||||
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
||||||
Basename(*sCourseGroup).c_str(),
|
Basename(*sCourseGroup).c_str(),
|
||||||
Basename(*sCoursePath).c_str()));
|
Basename(*sCoursePath).c_str()));
|
||||||
@@ -806,9 +812,14 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pCourses.push_back( pCourse );
|
m_pCourses.push_back( pCourse );
|
||||||
|
courseIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ld ) {
|
||||||
|
ld->SetIndeterminate( true );
|
||||||
|
}
|
||||||
|
|
||||||
RefreshCourseGroupInfo();
|
RefreshCourseGroupInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ LowLevelWindow_X11::LowLevelWindow_X11()
|
|||||||
int iRevision = iXServerVersion / 1000; iXServerVersion %= 1000;
|
int iRevision = iXServerVersion / 1000; iXServerVersion %= 1000;
|
||||||
int iPatch = iXServerVersion;
|
int iPatch = iXServerVersion;
|
||||||
|
|
||||||
|
|
||||||
LOG->Info( "Display: %s (screen %i)", DisplayString(Dpy), iScreen );
|
LOG->Info( "Display: %s (screen %i)", DisplayString(Dpy), iScreen );
|
||||||
LOG->Info( "X server vendor: %s [%i.%i.%i.%i]", XServerVendor( Dpy ), iMajor, iMinor, iRevision, iPatch );
|
LOG->Info( "X server vendor: %s [%i.%i.%i.%i]", XServerVendor( Dpy ), iMajor, iMinor, iRevision, iPatch );
|
||||||
LOG->Info( "Server GLX vendor: %s [%s]", glXQueryServerString( Dpy, iScreen, GLX_VENDOR ), glXQueryServerString( Dpy, iScreen, GLX_VERSION ) );
|
LOG->Info( "Server GLX vendor: %s [%s]", glXQueryServerString( Dpy, iScreen, GLX_VENDOR ), glXQueryServerString( Dpy, iScreen, GLX_VERSION ) );
|
||||||
@@ -86,8 +85,8 @@ LowLevelWindow_X11::~LowLevelWindow_X11()
|
|||||||
void *LowLevelWindow_X11::GetProcAddress( RString s )
|
void *LowLevelWindow_X11::GetProcAddress( RString s )
|
||||||
{
|
{
|
||||||
// XXX: We should check whether glXGetProcAddress or
|
// XXX: We should check whether glXGetProcAddress or
|
||||||
// glXGetProcAddressARB is available, and go by that, instead of
|
// glXGetProcAddressARB is available/not NULL, and go by that,
|
||||||
// assuming like this.
|
// instead of assuming like this.
|
||||||
return (void*) glXGetProcAddressARB( (const GLubyte*) s.c_str() );
|
return (void*) glXGetProcAddressARB( (const GLubyte*) s.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +94,9 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
|
|||||||
{
|
{
|
||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
/* nVidia cards:
|
/* nVidia cards:
|
||||||
*
|
|
||||||
* This only works the first time we set up a window; after that, the
|
* This only works the first time we set up a window; after that, the
|
||||||
* drivers appear to cache the value, so you have to actually restart
|
* drivers appear to cache the value, so you have to actually restart
|
||||||
* the program to change it again.
|
* the program to change it again. */
|
||||||
*/
|
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
strcpy( buf, "__GL_SYNC_TO_VBLANK=" );
|
strcpy( buf, "__GL_SYNC_TO_VBLANK=" );
|
||||||
strcat( buf, p.vsync?"1":"0" );
|
strcat( buf, p.vsync?"1":"0" );
|
||||||
@@ -173,7 +170,6 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
XSelectInput( Dpy, Win, winAttrib.your_event_mask );
|
XSelectInput( Dpy, Win, winAttrib.your_event_mask );
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -243,9 +239,11 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
|
|||||||
XSetWMNormalHints( Dpy, Win, &hints );
|
XSetWMNormalHints( Dpy, Win, &hints );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Workaround for metacity and compiz, if the window have the same resolution or higher than the screen
|
/* Workaround for metacity and compiz: if the window have the same
|
||||||
// it gets automaximized even when the window is set to don't let do it.
|
* resolution or higher than the screen, it gets automaximized even
|
||||||
// This happens changing from fullscreen to window mode and our screen resolution is bigger.
|
* when the window is set to not let it happen. This happens when
|
||||||
|
* changing from fullscreen to window mode and our screen resolution
|
||||||
|
* is bigger. */
|
||||||
{
|
{
|
||||||
XEvent xev;
|
XEvent xev;
|
||||||
Atom wm_state = XInternAtom(Dpy, "_NET_WM_STATE", False);
|
Atom wm_state = XInternAtom(Dpy, "_NET_WM_STATE", False);
|
||||||
@@ -392,8 +390,8 @@ RenderTarget_X11::~RenderTarget_X11()
|
|||||||
glDeleteTextures( 1, reinterpret_cast<GLuint*>(&m_iTexHandle) );
|
glDeleteTextures( 1, reinterpret_cast<GLuint*>(&m_iTexHandle) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that although the texture size may need to be a power of 2, the Pbuffer
|
/* Note that although the texture size may need to be a power of 2,
|
||||||
* does not. */
|
* the Pbuffer does not. */
|
||||||
void RenderTarget_X11::Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut )
|
void RenderTarget_X11::Create( const RenderTargetParam ¶m, int &iTextureWidthOut, int &iTextureHeightOut )
|
||||||
{
|
{
|
||||||
//ASSERT( param.iWidth == power_of_two(param.iWidth) && param.iHeight == power_of_two(param.iHeight) );
|
//ASSERT( param.iWidth == power_of_two(param.iWidth) && param.iHeight == power_of_two(param.iHeight) );
|
||||||
@@ -515,9 +513,9 @@ RenderTarget *LowLevelWindow_X11::CreateRenderTarget()
|
|||||||
|
|
||||||
void LowLevelWindow_X11::BeginConcurrentRenderingMainThread()
|
void LowLevelWindow_X11::BeginConcurrentRenderingMainThread()
|
||||||
{
|
{
|
||||||
/* Move the main thread, which is going to be loading textures, etc. but
|
/* Move the main thread, which is going to be loading textures, etc.
|
||||||
* not rendering, to an undisplayed window. This results in smoother
|
* but not rendering, to an undisplayed window. This results in
|
||||||
* rendering. */
|
* smoother rendering. */
|
||||||
bool b = glXMakeCurrent( Dpy, g_AltWindow, g_pContext );
|
bool b = glXMakeCurrent( Dpy, g_AltWindow, g_pContext );
|
||||||
ASSERT(b);
|
ASSERT(b);
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-12
@@ -12,9 +12,10 @@ public:
|
|||||||
virtual void Halt( bool Kill ) = 0;
|
virtual void Halt( bool Kill ) = 0;
|
||||||
virtual void Resume() = 0;
|
virtual void Resume() = 0;
|
||||||
|
|
||||||
/* Get the identifier for this thread. The actual meaning of this is implementation-
|
/* Get the identifier for this thread. The actual meaning of this is
|
||||||
* defined, except that each thread has exactly one ID and each ID corresponds to
|
* implementation-defined, except that each thread has exactly one ID
|
||||||
* one thread. (This means that Win32 thread handles are not acceptable as ThreadIds.) */
|
* and each ID corresponds to one thread. (This means that Win32
|
||||||
|
* thread handles are not acceptable as ThreadIds.) */
|
||||||
virtual uint64_t GetThreadId() const = 0;
|
virtual uint64_t GetThreadId() const = 0;
|
||||||
|
|
||||||
virtual int Wait() = 0;
|
virtual int Wait() = 0;
|
||||||
@@ -28,17 +29,18 @@ public:
|
|||||||
MutexImpl( RageMutex *pParent ): m_Parent(pParent) {}
|
MutexImpl( RageMutex *pParent ): m_Parent(pParent) {}
|
||||||
virtual ~MutexImpl() { }
|
virtual ~MutexImpl() { }
|
||||||
|
|
||||||
/* Lock the mutex. If mutex timeouts are implemented, and the mutex times out,
|
/* Lock the mutex. If mutex timeouts are implemented, and the mutex
|
||||||
* return false and do not lock the mutex. No other failure return is allowed;
|
* times out, return false and do not lock the mutex. No other failure
|
||||||
* all other errors should fail with an assertion. */
|
* return is allowed; all other errors should fail with an assertion. */
|
||||||
virtual bool Lock() = 0;
|
virtual bool Lock() = 0;
|
||||||
|
|
||||||
/* Non-blocking lock. If locking the mutex would block because the mutex is already
|
/* Non-blocking lock. If locking the mutex would block because the mutex
|
||||||
* locked by another thread, return false; otherwise return true and lock the mutex. */
|
* is already locked by another thread, return false; otherwise
|
||||||
|
* return true and lock the mutex. */
|
||||||
virtual bool TryLock() = 0;
|
virtual bool TryLock() = 0;
|
||||||
|
|
||||||
/* Unlock the mutex. This must only be called when the mutex is locked; implementations
|
/* Unlock the mutex. This must only be called when the mutex is locked;
|
||||||
* may fail with an assertion if the mutex is not locked. */
|
* implementations may fail with an assertion if the mutex is not locked. */
|
||||||
virtual void Unlock() = 0;
|
virtual void Unlock() = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -74,8 +76,8 @@ EventImpl *MakeEvent( MutexImpl *pMutex );
|
|||||||
SemaImpl *MakeSemaphore( int iInitialValue );
|
SemaImpl *MakeSemaphore( int iInitialValue );
|
||||||
uint64_t GetThisThreadId();
|
uint64_t GetThisThreadId();
|
||||||
|
|
||||||
/* Since ThreadId is implementation-defined, we can't define a universal invalid
|
/* Since ThreadId is implementation-defined, we can't define a universal
|
||||||
* value. Return the invalid value for this implementation. */
|
* invalid value. Return the invalid value for this implementation. */
|
||||||
uint64_t GetInvalidThreadId();
|
uint64_t GetInvalidThreadId();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -19,17 +19,15 @@ void ThreadImpl_Pthreads::Halt( bool Kill )
|
|||||||
/* Linux:
|
/* Linux:
|
||||||
* Send a SIGSTOP to the thread. If we send a SIGKILL, pthreads will
|
* Send a SIGSTOP to the thread. If we send a SIGKILL, pthreads will
|
||||||
* "helpfully" propagate it to the other threads, and we'll get killed, too.
|
* "helpfully" propagate it to the other threads, and we'll get killed, too.
|
||||||
*
|
|
||||||
* This isn't ideal, since it can cause the process to background as far as
|
* This isn't ideal, since it can cause the process to background as far as
|
||||||
* the shell is concerned, so the shell prompt can display before the crash
|
* the shell is concerned, so the shell prompt can display before the crash
|
||||||
* handler actually displays a message.
|
* handler actually displays a message. */
|
||||||
*/
|
|
||||||
SuspendThread( threadHandle );
|
SuspendThread( threadHandle );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadImpl_Pthreads::Resume()
|
void ThreadImpl_Pthreads::Resume()
|
||||||
{
|
{
|
||||||
/* Linux: Send a SIGCONT to the thread. */
|
// Linux: Send a SIGCONT to the thread.
|
||||||
ResumeThread( threadHandle );
|
ResumeThread( threadHandle );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +64,7 @@ static void *StartThread( void *pData )
|
|||||||
pThis->threadHandle = GetCurrentThreadId();
|
pThis->threadHandle = GetCurrentThreadId();
|
||||||
*pThis->m_piThreadID = pThis->threadHandle;
|
*pThis->m_piThreadID = pThis->threadHandle;
|
||||||
|
|
||||||
/* Tell MakeThread that we've set m_piThreadID, so it's safe to return. */
|
// Tell MakeThread that we've set m_piThreadID, so it's safe to return.
|
||||||
pThis->m_StartFinishedSem->Post();
|
pThis->m_StartFinishedSem->Post();
|
||||||
|
|
||||||
int iRet = pThis->m_pFunc( pThis->m_pData );
|
int iRet = pThis->m_pFunc( pThis->m_pData );
|
||||||
@@ -86,7 +84,7 @@ ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThre
|
|||||||
int ret = pthread_create( &thread->thread, NULL, StartThread, thread );
|
int ret = pthread_create( &thread->thread, NULL, StartThread, thread );
|
||||||
ASSERT_M( ret == 0, ssprintf( "MakeThread: pthread_create: %s", strerror(errno)) );
|
ASSERT_M( ret == 0, ssprintf( "MakeThread: pthread_create: %s", strerror(errno)) );
|
||||||
|
|
||||||
/* Don't return until StartThread sets m_piThreadID. */
|
// Don't return until StartThread sets m_piThreadID.
|
||||||
thread->m_StartFinishedSem->Wait();
|
thread->m_StartFinishedSem->Wait();
|
||||||
delete thread->m_StartFinishedSem;
|
delete thread->m_StartFinishedSem;
|
||||||
|
|
||||||
@@ -105,12 +103,11 @@ MutexImpl_Pthreads::~MutexImpl_Pthreads()
|
|||||||
ASSERT_M( ret == 0, ssprintf("Error deleting mutex: %s", strerror(errno)) );
|
ASSERT_M( ret == 0, ssprintf("Error deleting mutex: %s", strerror(errno)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) || defined(HAVE_PTHREAD_COND_TIMEDWAIT)
|
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK) || defined(HAVE_PTHREAD_COND_TIMEDWAIT)
|
||||||
static bool UseTimedlock()
|
static bool UseTimedlock()
|
||||||
{
|
{
|
||||||
#if defined(LINUX)
|
#if defined(LINUX)
|
||||||
/* Valgrind crashes and burns on pthread_mutex_timedlock. */
|
// Valgrind crashes and burns on pthread_mutex_timedlock.
|
||||||
if( RunningUnderValgrind() )
|
if( RunningUnderValgrind() )
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
@@ -124,7 +121,7 @@ bool MutexImpl_Pthreads::Lock()
|
|||||||
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
#if defined(HAVE_PTHREAD_MUTEX_TIMEDLOCK)
|
||||||
if( UseTimedlock() )
|
if( UseTimedlock() )
|
||||||
{
|
{
|
||||||
int len = 10; /* seconds */
|
int len = 10; // seconds
|
||||||
int tries = 2;
|
int tries = 2;
|
||||||
|
|
||||||
while( tries-- )
|
while( tries-- )
|
||||||
@@ -149,9 +146,9 @@ bool MutexImpl_Pthreads::Lock()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case ETIMEDOUT:
|
case ETIMEDOUT:
|
||||||
/* Timed out. Probably deadlocked. Try again one more time, with a smaller
|
/* Timed out. Probably deadlocked. Try again one more time,
|
||||||
* timeout, just in case we're debugging and happened to stop while waiting
|
* with a smaller timeout, just in case we're debugging
|
||||||
* on the mutex. */
|
* and happened to stop while waiting on the mutex. */
|
||||||
len = 1;
|
len = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -205,8 +202,8 @@ MutexImpl *MakeMutex( RageMutex *pParent )
|
|||||||
return new MutexImpl_Pthreads( pParent );
|
return new MutexImpl_Pthreads( pParent );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if condattr_setclock is supported, and supports the clock that RageTimer
|
/* Check if condattr_setclock is supported, and supports the clock that
|
||||||
* selected. */
|
* RageTimer selected. */
|
||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include "arch/ArchHooks/ArchHooks_Unix.h"
|
#include "arch/ArchHooks/ArchHooks_Unix.h"
|
||||||
@@ -247,7 +244,7 @@ namespace
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we can set up the clock attribute. */
|
// Make sure that we can set up the clock attribute.
|
||||||
pthread_condattr_t condattr;
|
pthread_condattr_t condattr;
|
||||||
pthread_condattr_init( &condattr );
|
pthread_condattr_init( &condattr );
|
||||||
|
|
||||||
@@ -314,21 +311,21 @@ bool EventImpl_Pthreads::Wait( RageTimer *pTimeout )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the clock is not CLOCK_MONOTONIC, or we can't change the wait clock (no
|
/* If the clock is not CLOCK_MONOTONIC, or we can't change the wait clock
|
||||||
* condattr_setclock), pthread_cond_timedwait has an inherent race condition:
|
* (no condattr_setclock), pthread_cond_timedwait has an inherent race
|
||||||
* the system clock may change before we call it. */
|
* condition: the system clock may change before we call it. */
|
||||||
timespec abstime;
|
timespec abstime;
|
||||||
if( g_CondattrSetclock != NULL || GetClock() == CLOCK_REALTIME )
|
if( g_CondattrSetclock != NULL || GetClock() == CLOCK_REALTIME )
|
||||||
{
|
{
|
||||||
/* If we support condattr_setclock, we'll set the condition to use the same
|
/* If we support condattr_setclock, we'll set the condition to use
|
||||||
* clock as RageTimer and can use it directly. If the clock is CLOCK_REALTIME,
|
* the same clock as RageTimer and can use it directly. If the
|
||||||
* that's the default anyway. */
|
* clock is CLOCK_REALTIME, that's the default anyway. */
|
||||||
abstime.tv_sec = pTimeout->m_secs;
|
abstime.tv_sec = pTimeout->m_secs;
|
||||||
abstime.tv_nsec = pTimeout->m_us * 1000;
|
abstime.tv_nsec = pTimeout->m_us * 1000;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The RageTimer clock is different than the wait clock; convert it. */
|
// The RageTimer clock is different than the wait clock; convert it.
|
||||||
timeval tv;
|
timeval tv;
|
||||||
gettimeofday( &tv, NULL );
|
gettimeofday( &tv, NULL );
|
||||||
|
|
||||||
@@ -427,7 +424,7 @@ bool SemaImpl_Pthreads::TryWait()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* Use conditions, to work around OS X "forgetting" to implement semaphores. */
|
// Use conditions, to work around OS X "forgetting" to implement semaphores.
|
||||||
SemaImpl_Pthreads::SemaImpl_Pthreads( int iInitialValue )
|
SemaImpl_Pthreads::SemaImpl_Pthreads( int iInitialValue )
|
||||||
{
|
{
|
||||||
int ret = pthread_cond_init( &m_Cond, NULL );
|
int ret = pthread_cond_init( &m_Cond, NULL );
|
||||||
@@ -480,9 +477,9 @@ bool SemaImpl_Pthreads::Wait()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ETIMEDOUT:
|
case ETIMEDOUT:
|
||||||
/* Timed out. Probably deadlocked. Try again one more time, with a smaller
|
/* Timed out. Probably deadlocked. Try again one more time,
|
||||||
* timeout, just in case we're debugging and happened to stop while waiting
|
* with a smaller timeout, just in case we're debugging and
|
||||||
* on the mutex. */
|
* happened to stop while waiting on the mutex. */
|
||||||
++ts.tv_sec;
|
++ts.tv_sec;
|
||||||
tries--;
|
tries--;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ public:
|
|||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
|
||||||
/* Linux:
|
/* Linux:
|
||||||
* Keep a list of child PIDs, so we can send them SIGKILL. This has an
|
* Keep a list of child PIDs, so we can send them SIGKILL. This has
|
||||||
* added bonus: if this is corrupted, we'll just send signals and they'll
|
* an added bonus: if this is corrupted, we'll just send signals and
|
||||||
* fail; we won't blow up (unless we're root).
|
* they'll fail; we won't blow up (unless we're root). */
|
||||||
*/
|
|
||||||
uint64_t threadHandle;
|
uint64_t threadHandle;
|
||||||
|
|
||||||
/* These are only used during initialization. */
|
// These are only used during initialization.
|
||||||
int (*m_pFunc)( void *pData );
|
int (*m_pFunc)( void *pData );
|
||||||
void *m_pData;
|
void *m_pData;
|
||||||
uint64_t *m_piThreadID;
|
uint64_t *m_piThreadID;
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ bool MutexImpl_Win32::Lock()
|
|||||||
if( SimpleWaitForSingleObject( mutex, len ) )
|
if( SimpleWaitForSingleObject( mutex, len ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Timed out; probably deadlocked. Try a couple more times, with a smaller
|
/* Timed out; probably deadlocked. Try a couple more times, with
|
||||||
* timeout, just in case we're debugging and happened to stop while waiting
|
* a smaller timeout, just in case we're debugging and happened
|
||||||
* on the mutex. */
|
* to stop while waiting on the mutex. */
|
||||||
len = 1000;
|
len = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,8 +238,8 @@ void MutexImpl_Win32::Unlock()
|
|||||||
{
|
{
|
||||||
const bool ret = !!ReleaseMutex( mutex );
|
const bool ret = !!ReleaseMutex( mutex );
|
||||||
|
|
||||||
/* We can't ASSERT here, since this is called from checkpoints, which is
|
/* We can't ASSERT here, since this is called from checkpoints,
|
||||||
* called from ASSERT. */
|
* which is called from ASSERT. */
|
||||||
if( !ret )
|
if( !ret )
|
||||||
sm_crash( werr_ssprintf( GetLastError(), "ReleaseMutex failed" ) );
|
sm_crash( werr_ssprintf( GetLastError(), "ReleaseMutex failed" ) );
|
||||||
}
|
}
|
||||||
@@ -278,10 +278,11 @@ EventImpl_Win32::~EventImpl_Win32()
|
|||||||
CloseHandle( m_WaitersDone );
|
CloseHandle( m_WaitersDone );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SignalObjectAndWait is atomic, which leads to more fair event handling. However,
|
/* SignalObjectAndWait is atomic, which leads to more fair event handling.
|
||||||
* we don't guarantee or depend upon fair events, and SignalObjectAndWait is only
|
* However, we don't guarantee or depend upon fair events, and
|
||||||
* available in NT. I also can't find a single function to signal an object like
|
* SignalObjectAndWait is only available in NT. I also can't find a single
|
||||||
* SignalObjectAndWait, so we need to know if the object is a mutex or an event. */
|
* function to signal an object like SignalObjectAndWait, so we need to
|
||||||
|
* know if the object is a mutex or an event. */
|
||||||
static bool PortableSignalObjectAndWait( HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, bool bFirstParamIsMutex, unsigned iMilliseconds = INFINITE )
|
static bool PortableSignalObjectAndWait( HANDLE hObjectToSignal, HANDLE hObjectToWaitOn, bool bFirstParamIsMutex, unsigned iMilliseconds = INFINITE )
|
||||||
{
|
{
|
||||||
static bool bSignalObjectAndWaitUnavailable = false;
|
static bool bSignalObjectAndWaitUnavailable = false;
|
||||||
@@ -364,8 +365,9 @@ bool EventImpl_Win32::Wait( RageTimer *pTimeout )
|
|||||||
EnterCriticalSection( &m_iNumWaitingLock );
|
EnterCriticalSection( &m_iNumWaitingLock );
|
||||||
if( !bSuccess )
|
if( !bSuccess )
|
||||||
{
|
{
|
||||||
/* Avoid a race condition: someone may have signalled the object between PortableSignalObjectAndWait
|
/* Avoid a race condition: someone may have signalled the object
|
||||||
* and EnterCriticalSection. While we hold m_iNumWaitingLock, poll (with a zero timeout) the
|
* between PortableSignalObjectAndWait and EnterCriticalSection.
|
||||||
|
* While we hold m_iNumWaitingLock, poll (with a zero timeout) the
|
||||||
* object one last time. */
|
* object one last time. */
|
||||||
if( WaitForSingleObject( m_WakeupSema, 0 ) == WAIT_OBJECT_0 )
|
if( WaitForSingleObject( m_WakeupSema, 0 ) == WAIT_OBJECT_0 )
|
||||||
bSuccess = true;
|
bSuccess = true;
|
||||||
@@ -374,8 +376,8 @@ bool EventImpl_Win32::Wait( RageTimer *pTimeout )
|
|||||||
bool bLastWaiting = m_iNumWaiting == 0;
|
bool bLastWaiting = m_iNumWaiting == 0;
|
||||||
LeaveCriticalSection( &m_iNumWaitingLock );
|
LeaveCriticalSection( &m_iNumWaitingLock );
|
||||||
|
|
||||||
/* If we're the last waiter to wake up, and we were actually woken by another
|
/* If we're the last waiter to wake up, and we were actually woken by
|
||||||
* thread (not by timeout), wake up the signaller. */
|
* another thread (not by timeout), wake up the signaller. */
|
||||||
if( bLastWaiting && bSuccess )
|
if( bLastWaiting && bSuccess )
|
||||||
PortableSignalObjectAndWait( m_WaitersDone, m_pParent->mutex, false );
|
PortableSignalObjectAndWait( m_WaitersDone, m_pParent->mutex, false );
|
||||||
else
|
else
|
||||||
@@ -416,8 +418,8 @@ void EventImpl_Win32::Broadcast()
|
|||||||
|
|
||||||
LeaveCriticalSection( &m_iNumWaitingLock );
|
LeaveCriticalSection( &m_iNumWaitingLock );
|
||||||
|
|
||||||
/* The last waiter will touch m_WaitersDone, so we wait for all waiters to
|
/* The last waiter will touch m_WaitersDone, so we wait for all waiters
|
||||||
* wake up and start waiting for the mutex before returning. */
|
* to wake up and start waiting for the mutex before returning. */
|
||||||
WaitForSingleObject( m_WaitersDone, INFINITE );
|
WaitForSingleObject( m_WaitersDone, INFINITE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,9 +462,9 @@ bool SemaImpl_Win32::Wait()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Timed out; probably deadlocked. Try again a few more times, with a smaller
|
/* Timed out; probably deadlocked. Try again a few more times,
|
||||||
* timeout, just in case we're debugging and happened to stop while waiting
|
* with a smaller timeout, just in case we're debugging and
|
||||||
* on the mutex. */
|
* happened to stop while waiting on the mutex. */
|
||||||
len = 1000;
|
len = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,16 +43,15 @@ BEGIN
|
|||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,34,332,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,34,332,1
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LOADING_DIALOG DIALOGEX 0, 0, 317, 94
|
IDD_LOADING_DIALOG DIALOGEX 0, 0, 320, 94
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
|
||||||
EXSTYLE WS_EX_APPWINDOW
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
CAPTION "Stepmania"
|
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
CTEXT "line1",IDC_STATIC_MESSAGE1,7,43,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
CTEXT "line1",IDC_STATIC_MESSAGE1,7,43,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
||||||
CTEXT "line2",IDC_STATIC_MESSAGE2,7,52,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
CTEXT "line2",IDC_STATIC_MESSAGE2,7,52,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
||||||
CTEXT "line3",IDC_STATIC_MESSAGE3,7,61,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
CTEXT "line3",IDC_STATIC_MESSAGE3,7,61,303,10,SS_NOPREFIX | SS_CENTERIMAGE
|
||||||
CONTROL "",IDC_SPLASH,"Static",SS_BITMAP,0,0,310,25
|
CONTROL "",IDC_SPLASH,"Static",SS_BITMAP,0,0,316,25
|
||||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",0x0,7,73,303,14
|
CONTROL "",IDC_PROGRESS,"msctls_progress32",0x0,7,73,303,14
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user