mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Rename ChildScreenSpritePositionMode enum values
This commit is contained in:
parent
0093ebe3a7
commit
d97968a4f9
@ -950,7 +950,7 @@ static void AddChildSpriteToFoundation(SpriteID image, PaletteID pal, const SubS
|
|||||||
int *old_child = _vd.last_child;
|
int *old_child = _vd.last_child;
|
||||||
_vd.last_child = _vd.last_foundation_child[foundation_part];
|
_vd.last_child = _vd.last_foundation_child[foundation_part];
|
||||||
|
|
||||||
AddChildSpriteScreen(image, pal, offs.x + extra_offs_x, offs.y + extra_offs_y, false, sub, false, ChildScreenSpritePositionMode::NON_RELATIVE);
|
AddChildSpriteScreen(image, pal, offs.x + extra_offs_x, offs.y + extra_offs_y, false, sub, false, ChildScreenSpritePositionMode::NonRelative);
|
||||||
|
|
||||||
/* Switch back to last ChildSprite list */
|
/* Switch back to last ChildSprite list */
|
||||||
_vd.last_child = old_child;
|
_vd.last_child = old_child;
|
||||||
@ -1051,7 +1051,7 @@ static void AddCombinedSprite(SpriteID image, PaletteID pal, int x, int y, int z
|
|||||||
bottom <= _vdd->dpi.top)
|
bottom <= _vdd->dpi.top)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AddChildSpriteScreen(image, pal, pt.x, pt.y, false, sub, false, ChildScreenSpritePositionMode::ABSOLUTE);
|
AddChildSpriteScreen(image, pal, pt.x, pt.y, false, sub, false, ChildScreenSpritePositionMode::Absolute);
|
||||||
if (left < _vd.combine_left) _vd.combine_left = left;
|
if (left < _vd.combine_left) _vd.combine_left = left;
|
||||||
if (right > _vd.combine_right) _vd.combine_right = right;
|
if (right > _vd.combine_right) _vd.combine_right = right;
|
||||||
if (top < _vd.combine_top) _vd.combine_top = top;
|
if (top < _vd.combine_top) _vd.combine_top = top;
|
||||||
@ -2052,15 +2052,15 @@ static void ViewportDrawParentSprites(const ViewportDrawerDynamic *vdd, const Dr
|
|||||||
int x = cs->x;
|
int x = cs->x;
|
||||||
int y = cs->y;
|
int y = cs->y;
|
||||||
switch (cs->position_mode) {
|
switch (cs->position_mode) {
|
||||||
case ChildScreenSpritePositionMode::RELATIVE:
|
case ChildScreenSpritePositionMode::Relative:
|
||||||
x += ps->left;
|
x += ps->left;
|
||||||
y += ps->top;
|
y += ps->top;
|
||||||
break;
|
break;
|
||||||
case ChildScreenSpritePositionMode::NON_RELATIVE:
|
case ChildScreenSpritePositionMode::NonRelative:
|
||||||
x += ps->x;
|
x += ps->x;
|
||||||
y += ps->y;
|
y += ps->y;
|
||||||
break;
|
break;
|
||||||
case ChildScreenSpritePositionMode::ABSOLUTE:
|
case ChildScreenSpritePositionMode::Absolute:
|
||||||
/* No adjustment */
|
/* No adjustment */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ void OffsetGroundSprite(int x, int y);
|
|||||||
void DrawGroundSprite(SpriteID image, PaletteID pal, const SubSprite *sub = nullptr, int extra_offs_x = 0, int extra_offs_y = 0);
|
void DrawGroundSprite(SpriteID image, PaletteID pal, const SubSprite *sub = nullptr, int extra_offs_x = 0, int extra_offs_y = 0);
|
||||||
void DrawGroundSpriteAt(SpriteID image, PaletteID pal, int32 x, int32 y, int z, const SubSprite *sub = nullptr, int extra_offs_x = 0, int extra_offs_y = 0);
|
void DrawGroundSpriteAt(SpriteID image, PaletteID pal, int32 x, int32 y, int z, const SubSprite *sub = nullptr, int extra_offs_x = 0, int extra_offs_y = 0);
|
||||||
void AddSortableSpriteToDraw(SpriteID image, PaletteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = nullptr);
|
void AddSortableSpriteToDraw(SpriteID image, PaletteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = nullptr);
|
||||||
void AddChildSpriteScreen(SpriteID image, PaletteID pal, int x, int y, bool transparent = false, const SubSprite *sub = nullptr, bool scale = true, ChildScreenSpritePositionMode position_mode = ChildScreenSpritePositionMode::RELATIVE);
|
void AddChildSpriteScreen(SpriteID image, PaletteID pal, int x, int y, bool transparent = false, const SubSprite *sub = nullptr, bool scale = true, ChildScreenSpritePositionMode position_mode = ChildScreenSpritePositionMode::Relative);
|
||||||
void ViewportAddString(ViewportDrawerDynamic *vdd, const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2 = 0, Colours colour = INVALID_COLOUR);
|
void ViewportAddString(ViewportDrawerDynamic *vdd, const DrawPixelInfo *dpi, ZoomLevel small_from, const ViewportSign *sign, StringID string_normal, StringID string_small, StringID string_small_shadow, uint64 params_1, uint64 params_2 = 0, Colours colour = INVALID_COLOUR);
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,9 +222,9 @@ enum ViewportMarkDirtyFlags : byte {
|
|||||||
DECLARE_ENUM_AS_BIT_SET(ViewportMarkDirtyFlags)
|
DECLARE_ENUM_AS_BIT_SET(ViewportMarkDirtyFlags)
|
||||||
|
|
||||||
enum class ChildScreenSpritePositionMode : uint8 {
|
enum class ChildScreenSpritePositionMode : uint8 {
|
||||||
RELATIVE,
|
Relative,
|
||||||
NON_RELATIVE,
|
NonRelative,
|
||||||
ABSOLUTE,
|
Absolute,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* VIEWPORT_TYPE_H */
|
#endif /* VIEWPORT_TYPE_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user