OpenRCT2 / objects

Official objects for OpenRCT2
Creative Commons Attribution 4.0 International
24 stars 36 forks source link

Add all RCT1 walls #275

Closed ZeeMaji closed 10 months ago

ZeeMaji commented 10 months ago

Adds all of the RCT1 walls with different heights/colors as compat objects. For the RCT1AA glass wall i've taken the liberty of making the frame remappable for consistency with the RCT2 glass walls.

Currently the sceneryGroup option only allows for one scenery group. So the themed walls will be placed only within their original scenery groups and not within the general fences scenery group.

Note for maintainers: There's some hard coded color converters in S4Importer.cpp within ConvertWall, these will need to be changed to import the brown wooden fence gate properly and to remove the wooden fence color remapping that will be made redundant by these walls.

Gymnasiast commented 10 months ago

Could you provide a screenshot of their differences? There are some walls in this PR I didn’t hear about before.

ZeeMaji commented 10 months ago

Sure.

Green tile = RCT1 Red tile = RCT2 Screenshot_select-area_20240125162838 Screenshot_select-area_20240125162847

Gymnasiast commented 10 months ago

these will need to be changed to import the brown wooden fence gate properly

Can you clarify this? Seems the brown wooden fence gate has something specific going on?

ZeeMaji commented 10 months ago

Within ConvertWall in S4Importer, there's a switch case that remaps colors of walls during S4 import

void ConvertWall(const int32_t& type, colour_t colourA, colour_t colourB)

    {
        switch (type)
        {
            case RCT1_WALL_TYPE_WOODEN_PANEL_FENCE:
                *colourA = COLOUR_DARK_BROWN;
                break;
            case RCT1_WALL_TYPE_WHITE_WOODEN_PANEL_FENCE:
                *colourA = COLOUR_WHITE;
                break;
            case RCT1_WALL_TYPE_RED_WOODEN_PANEL_FENCE:
                *colourA = COLOUR_SALMON_PINK;
                break;
            case RCT1_WALL_TYPE_WOODEN_PANEL_FENCE_WITH_SNOW:
                *colourA = COLOUR_DARK_BROWN;
                break;
            case RCT1_WALL_TYPE_WOODEN_PANEL_FENCE_WITH_GATE:
                *colourB = *colourA;
                *colourA = COLOUR_DARK_BROWN;
                break;
            case RCT1_WALL_TYPE_GLASS_SMOOTH:
            case RCT1_WALL_TYPE_GLASS_PANELS:
                *colourB = COLOUR_WHITE;
                break;
            case RCT1_WALL_TYPE_SMALL_GREY_CASTLE:
            case RCT1_WALL_TYPE_LARGE_GREY_CASTLE:
            case RCT1_WALL_TYPE_LARGE_GREY_CASTLE_CROSS:
            case RCT1_WALL_TYPE_LARGE_GREY_CASTLE_GATE:
            case RCT1_WALL_TYPE_LARGE_GREY_CASTLE_WINDOW:
            case RCT1_WALL_TYPE_MEDIUM_GREY_CASTLE:
                *colourA = COLOUR_GREY;
                break;
        }
    }

The brown wooden fence gate (RCT1_WALL_TYPE_WOODEN_PANEL_FENCE_WITH_GATE) has it's RCT1 primary color set to it's OpenRCT2 secondary color during importing as the RCT2 wooden fence gate uses the secondary color for the gate, while RCT1 uses the primary color for it.