Fixed routine notefield not being centered correctly. Hid couple-edit and threepanel styles because they don't seem intended to be playable.
This commit is contained in:
@@ -102,7 +102,6 @@ function GameCompatibleModes()
|
|||||||
-- todo: add versus modes for technomotion
|
-- todo: add versus modes for technomotion
|
||||||
techno = "Single4,Single5,Single8,Double4,Double5,Double8",
|
techno = "Single4,Single5,Single8,Double4,Double5,Double8",
|
||||||
lights = "Single", -- lights shouldn't be playable
|
lights = "Single", -- lights shouldn't be playable
|
||||||
kickbox= "Human,Quadarm,Insect,Arachnid",
|
|
||||||
}
|
}
|
||||||
return Modes[CurGameName()]
|
return Modes[CurGameName()]
|
||||||
end
|
end
|
||||||
@@ -119,8 +118,12 @@ function ScreenSelectStyleChoices()
|
|||||||
for i, style in ipairs(styles) do
|
for i, style in ipairs(styles) do
|
||||||
local name= style:GetName()
|
local name= style:GetName()
|
||||||
local cap_name= upper_first_letter(name)
|
local cap_name= upper_first_letter(name)
|
||||||
choices[#choices+1]= "name," .. cap_name .. ";style," .. name .. ";text,"
|
-- couple-edit and threepanel don't seem like they should actually be
|
||||||
.. cap_name .. ";screen," .. Branch.AfterSelectStyle()
|
-- selectable. -Kyz
|
||||||
|
if name ~= "couple-edit" and name ~= "threepanel" then
|
||||||
|
choices[#choices+1]= "name," .. cap_name .. ";style," .. name ..
|
||||||
|
";text," .. cap_name .. ";screen," .. Branch.AfterSelectStyle()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return choices
|
return choices
|
||||||
end
|
end
|
||||||
@@ -129,19 +132,32 @@ end
|
|||||||
function ScreenSelectStylePositions(count)
|
function ScreenSelectStylePositions(count)
|
||||||
local poses= {}
|
local poses= {}
|
||||||
local columns= 1
|
local columns= 1
|
||||||
if count > 4 then columns= 2 end
|
local choice_height= 96
|
||||||
local start_y= _screen.cy - (_screen.h / (math.ceil(count/columns) / 2))
|
local column_x= {_screen.cx, _screen.cx + 160}
|
||||||
for i= 1, count do
|
if count > 4 then
|
||||||
poses[i]= {}
|
column_x[1]= _screen.cx - 160
|
||||||
if i <= count/columns then
|
columns= 2
|
||||||
poses[i][1]= _screen.cx - 160
|
end
|
||||||
poses[i][2]= start_y + (96 * i)
|
if count > 8 then
|
||||||
|
column_x[1]= _screen.cx - 240
|
||||||
|
column_x[2]= _screen.cx
|
||||||
|
column_x[3]= _screen.cx + 240
|
||||||
|
columns= 3
|
||||||
|
end
|
||||||
|
local num_per_column= {math.ceil(count/columns), math.floor(count/columns)}
|
||||||
|
if count > 8 then
|
||||||
|
if count % 3 == 0 then
|
||||||
|
num_per_column[3]= count/columns
|
||||||
|
elseif count % 3 == 1 then
|
||||||
|
num_per_column[3]= num_per_column[2]
|
||||||
else
|
else
|
||||||
poses[i][1]= _screen.cx + 160
|
num_per_column[3]= num_per_column[1]
|
||||||
poses[i][2]= start_y + (96 * (i-(count/2)))
|
|
||||||
end
|
end
|
||||||
if columns == 1 then
|
end
|
||||||
poses[i][1]= _screen.cx
|
for c= 1, columns do
|
||||||
|
local start_y= _screen.cy - (choice_height * ((num_per_column[c] / 2)+.5))
|
||||||
|
for i= 1, num_per_column[c] do
|
||||||
|
poses[#poses+1]= {column_x[c], start_y + (choice_height * i)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return poses
|
return poses
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ void ScreenGameplay::Init()
|
|||||||
right_marge= margins[pi->m_pn][1];
|
right_marge= margins[pi->m_pn][1];
|
||||||
field_space= screen_space - left_marge - right_marge;
|
field_space= screen_space - left_marge - right_marge;
|
||||||
if(Center1Player() ||
|
if(Center1Player() ||
|
||||||
|
style->m_StyleType == StyleType_TwoPlayersSharedSides ||
|
||||||
(style_width > field_space && GAMESTATE->GetNumPlayersEnabled() == 1
|
(style_width > field_space && GAMESTATE->GetNumPlayersEnabled() == 1
|
||||||
&& (bool)ALLOW_CENTER_1_PLAYER))
|
&& (bool)ALLOW_CENTER_1_PLAYER))
|
||||||
CENTER_PLAYER_BLOCK
|
CENTER_PLAYER_BLOCK
|
||||||
|
|||||||
Reference in New Issue
Block a user