Skip to content

Commit

Permalink
Change: adjust sound name constants to match OpenTTD (closes OpenTTD#190
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andythenorth authored and FLHerne committed May 28, 2022
1 parent 0ea2453 commit fdf3e3b
Showing 1 changed file with 116 additions and 57 deletions.
173 changes: 116 additions & 57 deletions nml/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,79 +192,138 @@ def constant_number(name, info, pos):
"SOUND_EVENT_LOAD_UNLOAD" : 9,

# sound effects
"SOUND_SPLAT" : 0x00,
"SOUND_FACTORY_WHISTLE" : 0x01,
"SOUND_TRAIN" : 0x02,
"SOUND_CONSTRUCTION_WATER" : 0x00,
"SOUND_FACTORY" : 0x01,
"SOUND_DEPARTURE_STEAM" : 0x02,
"SOUND_TRAIN_THROUGH_TUNNEL" : 0x03,
"SOUND_SHIP_HORN" : 0x04,
"SOUND_FERRY_HORN" : 0x05,
"SOUND_PLANE_TAKE_OFF" : 0x06,
"SOUND_JET" : 0x07,
"SOUND_TRAIN_HORN" : 0x08,
"SOUND_MINING_MACHINERY" : 0x09,
"SOUND_ELECTRIC_SPARK" : 0x0A,
"SOUND_DEPARTURE_CARGO_SHIP" : 0x04,
"SOUND_DEPARTURE_FERRY" : 0x05,
"SOUND_TAKEOFF_PROPELLER" : 0x06,
"SOUND_TAKEOFF_JET" : 0x07,
"SOUND_DEPARTURE_TRAIN" : 0x08,
"SOUND_MINE" : 0x09,
"SOUND_POWER_STATION" : 0x0A,
"SOUND_STEAM" : 0x0B,
"SOUND_LEVEL_CROSSING" : 0x0C,
"SOUND_VEHICLE_BREAKDOWN" : 0x0D,
"SOUND_TRAIN_BREAKDOWN" : 0x0E,
"SOUND_BREAKDOWN_ROADVEHICLE" : 0x0D,
"SOUND_BREAKDOWN_TRAIN_SHIP" : 0x0E,
"SOUND_CRASH" : 0x0F,
"SOUND_EXPLOSION" : 0x10,
"SOUND_BIG_CRASH" : 0x11,
"SOUND_TRAIN_COLLISION" : 0x11,
"SOUND_CASHTILL" : 0x12,
"SOUND_BEEP" : 0x13,
"SOUND_MORSE" : 0x14,
"SOUND_NEWS_TICKER" : 0x14,
"SOUND_SKID_PLANE" : 0x15,
"SOUND_HELICOPTER" : 0x16,
"SOUND_BUS_START_PULL_AWAY" : 0x17,
"SOUND_BUS_START_PULL_AWAY_WITH_HORN" : 0x18,
"SOUND_TRUCK_START" : 0x19,
"SOUND_TRUCK_START_2" : 0x1A,
"SOUND_TAKEOFF_HELICOPTER" : 0x16,
"SOUND_DEPARTURE_OLD_RV_1" : 0x17,
"SOUND_DEPARTURE_OLD_RV_2" : 0x18,
"SOUND_DEPARTURE_MODERN_BUS" : 0x19,
"SOUND_DEPARTURE_OLD_BUS" : 0x1A,
"SOUND_APPLAUSE" : 0x1B,
"SOUND_OOOOH" : 0x1C,
"SOUND_SPLAT_2" : 0x1D,
"SOUND_SPLAT_3" : 0x1E,
"SOUND_JACKHAMMER" : 0x1F,
"SOUND_NEW_ENGINE" : 0x1C,
"SOUND_CONSTRUCTION_OTHER" : 0x1D,
"SOUND_CONSTRUCTION_RAIL" : 0x1E,
"SOUND_ROAD_WORKS" : 0x1F,
"SOUND_CAR_HORN" : 0x20,
"SOUND_CAR_HORN_2" : 0x21,
"SOUND_SHEEP" : 0x22,
"SOUND_COW" : 0x23,
"SOUND_HORSE" : 0x24,
"SOUND_BLACKSMITH_ANVIL" : 0x25,
"SOUND_FARM_1" : 0x22,
"SOUND_FARM_2" : 0x23,
"SOUND_FARM_3" : 0x24,
"SOUND_CONSTRUCTION_BRIDGE" : 0x25,
"SOUND_SAWMILL" : 0x26,
"SOUND_GOOD_YEAR" : 0x27,
"SOUND_BAD_YEAR" : 0x28,
"SOUND_RIP" : 0x29,
"SOUND_EXTRACT_AND_POP" : 0x2A,
"SOUND_COMEDY_HIT" : 0x2B,
"SOUND_MACHINERY" : 0x2C,
"SOUND_RIP_2" : 0x2D,
"SOUND_EXTRACT_AND_POP_2" : 0x2E,
"SOUND_POP" : 0x2F,
"SOUND_CARTOON_SOUND" : 0x30,
"SOUND_EXTRACT" : 0x31,
"SOUND_SUGAR_MINE_2" : 0x29,
"SOUND_TOY_FACTORY_3" : 0x2A,
"SOUND_TOY_FACTORY_2" : 0x2B,
"SOUND_TOY_FACTORY_1" : 0x2C,
"SOUND_SUGAR_MINE_1" : 0x2D,
"SOUND_BUBBLE_GENERATOR" : 0x2E,
"SOUND_BUBBLE_GENERATOR_FAIL" : 0x2F,
"SOUND_TOFFEE_QUARRY" : 0x30,
"SOUND_BUBBLE_GENERATOR_SUCCESS" : 0x31,
"SOUND_POP_2" : 0x32,
"SOUND_PLASTIC_MINE" : 0x33,
"SOUND_WIND" : 0x34,
"SOUND_COMEDY_BREAKDOWN" : 0x35,
"SOUND_CARTOON_CRASH" : 0x36,
"SOUND_BALLOON_SQUEAK" : 0x37,
"SOUND_CHAINSAW" : 0x38,
"SOUND_HEAVY_WIND" : 0x39,
"SOUND_COMEDY_BREAKDOWN_2" : 0x3A,
"SOUND_JET_OVERHEAD" : 0x3B,
"SOUND_COMEDY_CAR" : 0x3C,
"SOUND_ANOTHER_JET_OVERHEAD" : 0x3D,
"SOUND_COMEDY_CAR_2" : 0x3E,
"SOUND_COMEDY_CAR_3" : 0x3F,
"SOUND_COMEDY_CAR_START_AND_PULL_AWAY" : 0x40,
"SOUND_MAGLEV" : 0x41,
"SOUND_LOON_BIRD" : 0x42,
"SOUND_LION" : 0x43,
"SOUND_MONKEYS" : 0x44,
"SOUND_PLANE_CRASHING" : 0x45,
"SOUND_PLANE_ENGINE_SPUTTERING" : 0x46,
"SOUND_MAGLEV_2" : 0x47,
"SOUND_DISTANT_BIRD" : 0x48,
"SOUND_ARCTIC_SNOW_1" : 0x34,
"SOUND_BREAKDOWN_ROADVEHICLE_TOYLAND" : 0x35,
"SOUND_LUMBER_MILL_3" : 0x36,
"SOUND_LUMBER_MILL_2" : 0x37,
"SOUND_LUMBER_MILL_1" : 0x38,
"SOUND_ARCTIC_SNOW_2" : 0x39,
"SOUND_BREAKDOWN_TRAIN_SHIP_TOYLAND" : 0x3A,
"SOUND_TAKEOFF_JET_FAST" : 0x3B,
"SOUND_DEPARTURE_BUS_TOYLAND_1" : 0x3C,
"SOUND_TAKEOFF_JET_BIG" : 0x3D,
"SOUND_DEPARTURE_BUS_TOYLAND_2" : 0x3E,
"SOUND_DEPARTURE_TRUCK_TOYLAND_1" : 0x3F,
"SOUND_DEPARTURE_TRUCK_TOYLAND_2" : 0x40,
"SOUND_DEPARTURE_MAGLEV" : 0x41,
"SOUND_RAINFOREST_1" : 0x42,
"SOUND_RAINFOREST_2" : 0x43,
"SOUND_RAINFOREST_3" : 0x44,
"SOUND_TAKEOFF_PROPELLER_TOYLAND_1" : 0x45,
"SOUND_TAKEOFF_PROPELLER_TOYLAND_2" : 0x46,
"SOUND_DEPARTURE_MONORAIL" : 0x47,
"SOUND_RAINFOREST_4" : 0x48,

# legacy compatibility - see https://github.com/OpenTTD/nml/issues/190
"SOUND_SPLAT" : "SOUND_CONSTRUCTION_WATER",
"SOUND_FACTORY_WHISTLE" : "SOUND_FACTORY",
"SOUND_TRAIN" : "SOUND_DEPARTURE_STEAM",
"SOUND_SHIP_HORN" : "SOUND_DEPARTURE_CARGO_SHIP",
"SOUND_FERRY_HORN" : "SOUND_DEPARTURE_FERRY",
"SOUND_PLANE_TAKE_OFF" : "SOUND_TAKEOFF_PROPELLER",
"SOUND_JET" : "SOUND_TAKEOFF_JET",
"SOUND_TRAIN_HORN" : "SOUND_DEPARTURE_TRAIN",
"SOUND_MINING_MACHINERY" : "SOUND_MINE",
"SOUND_ELECTRIC_SPARK" : "SOUND_POWER_STATION",
"SOUND_VEHICLE_BREAKDOWN" : "SOUND_BREAKDOWN_ROADVEHICLE",
"SOUND_TRAIN_BREAKDOWN" : "SOUND_BREAKDOWN_TRAIN_SHIP",
"SOUND_BIG_CRASH" : "SOUND_TRAIN_COLLISION",
"SOUND_MORSE" : "SOUND_NEWS_TICKER",
"SOUND_HELICOPTER" : "SOUND_TAKEOFF_HELICOPTER",
"SOUND_BUS_START_PULL_AWAY" : "SOUND_DEPARTURE_OLD_RV_1",
"SOUND_BUS_START_PULL_AWAY_WITH_HORN" : "SOUND_DEPARTURE_OLD_RV_2",
"SOUND_TRUCK_START" : "SOUND_DEPARTURE_MODERN_BUS",
"SOUND_TRUCK_START_2" : "SOUND_DEPARTURE_OLD_BUS",
"SOUND_OOOOH" : "SOUND_NEW_ENGINE",
"SOUND_SPLAT_2" : "SOUND_CONSTRUCTION_OTHER",
"SOUND_SPLAT_3" : "SOUND_CONSTRUCTION_RAIL",
"SOUND_JACKHAMMER" : "SOUND_ROAD_WORKS",
"SOUND_SHEEP" : "SOUND_FARM_1",
"SOUND_COW" : "SOUND_FARM_2",
"SOUND_HORSE" : "SOUND_FARM_3",
"SOUND_BLACKSMITH_ANVIL" : "SOUND_CONSTRUCTION_BRIDGE",
"SOUND_RIP" : "SOUND_SUGAR_MINE_2",
"SOUND_EXTRACT_AND_POP" : "SOUND_TOY_FACTORY_3",
"SOUND_COMEDY_HIT" : "SOUND_TOY_FACTORY_2",
"SOUND_MACHINERY" : "SOUND_TOY_FACTORY_1",
"SOUND_RIP_2" : "SOUND_SUGAR_MINE_1",
"SOUND_EXTRACT_AND_POP_2" : "SOUND_BUBBLE_GENERATOR",
"SOUND_POP" : "SOUND_BUBBLE_GENERATOR_FAIL",
"SOUND_CARTOON_SOUND" : "SOUND_TOFFEE_QUARRY",
"SOUND_EXTRACT" : "SOUND_BUBBLE_GENERATOR_SUCCESS",
"SOUND_WIND" : "SOUND_ARCTIC_SNOW_1",
"SOUND_COMEDY_BREAKDOWN" : "SOUND_BREAKDOWN_ROADVEHICLE_TOYLAND",
"SOUND_CARTOON_CRASH" : "SOUND_LUMBER_MILL_3",
"SOUND_BALLOON_SQUEAK" : "SOUND_LUMBER_MILL_2",
"SOUND_CHAINSAW" : "SOUND_LUMBER_MILL_1",
"SOUND_HEAVY_WIND" : "SOUND_ARCTIC_SNOW_2",
"SOUND_COMEDY_BREAKDOWN_2" : "SOUND_BREAKDOWN_TRAIN_SHIP_TOYLAND",
"SOUND_JET_OVERHEAD" : "SOUND_TAKEOFF_JET_FAST",
"SOUND_COMEDY_CAR" : "SOUND_DEPARTURE_BUS_TOYLAND_1",
"SOUND_ANOTHER_JET_OVERHEAD" : "SOUND_TAKEOFF_JET_BIG",
"SOUND_COMEDY_CAR_2" : "SOUND_DEPARTURE_BUS_TOYLAND_2",
"SOUND_COMEDY_CAR_3" : "SOUND_DEPARTURE_TRUCK_TOYLAND_1",
"SOUND_COMEDY_CAR_START_AND_PULL_AWAY" : "SOUND_DEPARTURE_TRUCK_TOYLAND_2",
"SOUND_MAGLEV" : "SOUND_DEPARTURE_MAGLEV",
"SOUND_LOON_BIRD" : "SOUND_RAINFOREST_1",
"SOUND_LION" : "SOUND_RAINFOREST_2",
"SOUND_MONKEYS" : "SOUND_RAINFOREST_3",
"SOUND_PLANE_CRASHING" : "SOUND_TAKEOFF_PROPELLER_TOYLAND_1",
"SOUND_PLANE_ENGINE_SPUTTERING" : "SOUND_TAKEOFF_PROPELLER_TOYLAND_2",
"SOUND_MAGLEV_2" : "SOUND_DEPARTURE_MONORAIL",
"SOUND_DISTANT_BIRD" : "SOUND_RAINFOREST_4",

# sprite ids
"SPRITE_ID_NEW_TRAIN" : 0xFD,
Expand Down

0 comments on commit fdf3e3b

Please sign in to comment.