HotIce: Fix EciToh lava with Sky background

install-platforms
Lukas Werling 2018-01-14 21:27:16 +01:00
parent 42dfc79359
commit 417d10ed97
2 changed files with 13 additions and 11 deletions

View File

@ -21,7 +21,7 @@ public func InitializeMap(proplist map)
if (g_theme.BackgroundMat)
map->Draw(g_theme.BackgroundMat, nil, [0,0,w,h]);
// Bottom lava lake
map->Draw("^DuroLava", nil, [0,h*4/5,w,h/5]);
map->Draw(g_theme.LavaMat, nil, [0,h*4/5,w,h/5]);
if (t == 0) DrawBigIslandMap(map);
if (t == 1) DrawSmallIslandsMap(map);
@ -29,8 +29,8 @@ public func InitializeMap(proplist map)
// Alternate texctures
var icealt_tex = { Algo=MAPALGO_RndChecker, Wdt=2, Hgt=3, Ratio=g_theme.AltMatRatio };
icealt_tex = { Algo=MAPALGO_Turbulence, Op=icealt_tex };
icealt_tex = { Algo=MAPALGO_And, Op=[Duplicate(RegexMatch(g_theme.MatNames[1], "\\w+", Regex_FirstOnly)[0][0]), icealt_tex]};
map->Draw(g_theme.MatNames[0], icealt_tex);
icealt_tex = { Algo=MAPALGO_And, Op=[Duplicate(RegexMatch(g_theme.IceMats[1], "\\w+", Regex_FirstOnly)[0][0]), icealt_tex]};
map->Draw(g_theme.IceMats[0], icealt_tex);
// Return true to tell the engine a map has been successfully created.
return true;
@ -61,16 +61,16 @@ func DrawBigIslandMap(proplist map)
// Big
var island = { Algo=MAPALGO_Polygon, X=[0,w,w*6/8,w*2/8], Y=[h*4/10,h*4/10,h*7/10,h*7/10] };
island = { Algo=MAPALGO_Turbulence, Op=island, Amplitude=[0, 8] };
map->Draw(g_theme.MatNames[1], island, [w/10,h*13/20,w*8/10,h*3/20]);
map->Draw(g_theme.IceMats[1], island, [w/10,h*13/20,w*8/10,h*3/20]);
// Make sure one row of inner island is drawn because it's used for player spawns
map->Draw(g_theme.MatNames[1], nil, [w*3/10,h*13/20,w*4/10+1,1]);
map->Draw(g_theme.IceMats[1], nil, [w*3/10,h*13/20,w*4/10+1,1]);
// Smaller floating
var n_islands = 12;
while(n_islands--)
{
var x = w*1/10 + Random(w*8/10);
var y = h*2/10 + Random(h*3/10);
map->Draw(g_theme.MatNames[1], nil, [x,y,1,1]);
map->Draw(g_theme.IceMats[1], nil, [x,y,1,1]);
}
// Player spawns simply in middle of big island
var plrcnt = SpawnPositionCount();
@ -96,7 +96,7 @@ func DrawSmallIslandsMap(proplist map)
szy = 1;
if (y > h/2) szy += Random(2); // lower islands sometimes taller
if (Abs(x-w/2) < w/10) szx += Random(3); // central islands sometimes wider
map->Draw(g_theme.MatNames[1], nil, [x-szx,y,1+2*szx,szy]);
map->Draw(g_theme.IceMats[1], nil, [x-szx,y,1+2*szx,szy]);
}
// Balloon spawn: do nothing further
if (SCENPAR_SpawnType == 1)
@ -109,7 +109,7 @@ func DrawSmallIslandsMap(proplist map)
var x = w*2/10 + i * (w*6/10) / (spawn_island_count - 1);
var y = Max(1, h/10) + Abs(x-w/2) * 3*h/10/w;
if (SCENPAR_Weapons) y += 4; // Grenade launcher mode needs lower starting islands to prevent camping
map->Draw(g_theme.MatNames[1], nil, [x,y,1,1]);
map->Draw(g_theme.IceMats[1], nil, [x,y,1,1]);
g_player_spawn_positions[i] = [x, y-1];
}
return true;

View File

@ -470,7 +470,8 @@ func IsFirestoneSpot(int x, int y)
// ============= Themes =============
static const HotIce = new Global {
InitializeRound = func() { },
MatNames = ["^Ice-ice", "^Ice-ice2"],
LavaMat = "^DuroLava",
IceMats = ["^Ice-ice", "^Ice-ice2"],
AltMatRatio = 50,
BackgroundMat = nil,
Sky = "Default",
@ -492,13 +493,14 @@ static const HotIce = new Global {
};
static const EciToh = new HotIce {
MatNames = ["Coal", "Rock-rock"],
LavaMat = "DuroLava",
IceMats = ["Coal", "Rock-rock"],
AltMatRatio = 8,
BackgroundMat = "Tunnel",
};
static const MiamiIce = new HotIce {
MatNames = ["^BlackIce-black", "^BlackIce-black"],
IceMats = ["^BlackIce-black", "^BlackIce-black"],
Sky = "SkyMiami",
PlayList =
{