Refactor uses of PaintAddImageAsParent in Monorail.cpp

This commit is contained in:
Matt 2021-03-08 17:09:59 +02:00
parent 2aed03ca5f
commit 74f0cf8063
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 8 additions and 8 deletions

View File

@ -426,11 +426,11 @@ static void paint_monorail_track_flat(
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height);
PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
}
else
{
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height);
PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
}
if (direction == 0 || direction == 2)
@ -515,11 +515,11 @@ static void paint_monorail_track_25_deg_up(
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height);
PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
}
else
{
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height);
PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
}
switch (direction)
@ -557,11 +557,11 @@ static void paint_monorail_track_flat_to_25_deg_up(
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height);
PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
}
else
{
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height);
PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
}
switch (direction)
@ -599,11 +599,11 @@ static void paint_monorail_track_25_deg_up_to_flat(
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height);
PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
}
else
{
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height);
PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
}
switch (direction)