diff --git a/Icons/Coin/POW.png b/Icons/Coin/BlueCoin.png similarity index 100% rename from Icons/Coin/POW.png rename to Icons/Coin/BlueCoin.png diff --git a/Icons/Core/Conveyor.png b/Icons/Core/Conveyor.png index aee0d2f..fe774cc 100644 Binary files a/Icons/Core/Conveyor.png and b/Icons/Core/Conveyor.png differ diff --git a/Icons/Explode/Block.png b/Icons/Explode/Block.png new file mode 100644 index 0000000..0df7e2f Binary files /dev/null and b/Icons/Explode/Block.png differ diff --git a/Icons/Explode/Brick.png b/Icons/Explode/Brick.png new file mode 100644 index 0000000..f173fd6 Binary files /dev/null and b/Icons/Explode/Brick.png differ diff --git a/Icons/Explode/Red.png b/Icons/Explode/Red.png index 0df7e2f..63c052c 100644 Binary files a/Icons/Explode/Red.png and b/Icons/Explode/Red.png differ diff --git a/Icons/Explode/Wooden.png b/Icons/Explode/Wood.png similarity index 100% rename from Icons/Explode/Wooden.png rename to Icons/Explode/Wood.png diff --git a/Icons/Generic/PitLayer0.png b/Icons/Generic/PitLayer0.png new file mode 100644 index 0000000..16a6b76 Binary files /dev/null and b/Icons/Generic/PitLayer0.png differ diff --git a/Icons/Pipes/BlockCorner.png b/Icons/Pipes/BlockCorner.png new file mode 100644 index 0000000..3dc2c1d Binary files /dev/null and b/Icons/Pipes/BlockCorner.png differ diff --git a/Icons/Pipes/Horiz. On Top Mini-Junction.png b/Icons/Pipes/Horiz. On Top Mini-Junction.png deleted file mode 100644 index 212c7d5..0000000 Binary files a/Icons/Pipes/Horiz. On Top Mini-Junction.png and /dev/null differ diff --git a/Icons/Pipes/Horiz. Center Right(shouldnt be top and bottom no).png b/Icons/Pipes/HorizCenterBottom.png similarity index 100% rename from Icons/Pipes/Horiz. Center Right(shouldnt be top and bottom no).png rename to Icons/Pipes/HorizCenterBottom.png diff --git a/Icons/Pipes/Horiz. Center Left(shouldnt be top and bottom no).png b/Icons/Pipes/HorizCenterTop.png similarity index 100% rename from Icons/Pipes/Horiz. Center Left(shouldnt be top and bottom no).png rename to Icons/Pipes/HorizCenterTop.png diff --git a/Icons/Pipes/HorizLeftEntranceBottom ALT.png b/Icons/Pipes/HorizLeftBottom.png similarity index 100% rename from Icons/Pipes/HorizLeftEntranceBottom ALT.png rename to Icons/Pipes/HorizLeftBottom.png diff --git a/Icons/Pipes/HorizLeftEntranceTop ALT.png b/Icons/Pipes/HorizLeftTop.png similarity index 100% rename from Icons/Pipes/HorizLeftEntranceTop ALT.png rename to Icons/Pipes/HorizLeftTop.png diff --git a/Icons/Pipes/HorizMiniPipeCenterALT.png b/Icons/Pipes/HorizMiniCenter.png similarity index 100% rename from Icons/Pipes/HorizMiniPipeCenterALT.png rename to Icons/Pipes/HorizMiniCenter.png diff --git a/Icons/Pipes/HorizMiniJunction.png b/Icons/Pipes/HorizMiniJunction.png new file mode 100644 index 0000000..ef6d1ff Binary files /dev/null and b/Icons/Pipes/HorizMiniJunction.png differ diff --git a/Icons/Pipes/HorizMiniPipeLeft ALT.png b/Icons/Pipes/HorizMiniLeft.png similarity index 100% rename from Icons/Pipes/HorizMiniPipeLeft ALT.png rename to Icons/Pipes/HorizMiniLeft.png diff --git a/Icons/Pipes/HorizMiniPipeRight ALT.png b/Icons/Pipes/HorizMiniRight.png similarity index 100% rename from Icons/Pipes/HorizMiniPipeRight ALT.png rename to Icons/Pipes/HorizMiniRight.png diff --git a/Icons/Pipes/HorizOnTopJunctionBottom.png b/Icons/Pipes/HorizOnTopJunctionBottom.png deleted file mode 100644 index 093a3d9..0000000 Binary files a/Icons/Pipes/HorizOnTopJunctionBottom.png and /dev/null differ diff --git a/Icons/Pipes/HorizOnTopJunctionTop.png b/Icons/Pipes/HorizOnTopJunctionTop.png deleted file mode 100644 index 50af3d4..0000000 Binary files a/Icons/Pipes/HorizOnTopJunctionTop.png and /dev/null differ diff --git a/Icons/Pipes/HorizRightEntranceBottom.png b/Icons/Pipes/HorizRightBottom.png similarity index 100% rename from Icons/Pipes/HorizRightEntranceBottom.png rename to Icons/Pipes/HorizRightBottom.png diff --git a/Icons/Pipes/HorizRightEntranceTop.png b/Icons/Pipes/HorizRightTop.png similarity index 100% rename from Icons/Pipes/HorizRightEntranceTop.png rename to Icons/Pipes/HorizRightTop.png diff --git a/Icons/Pipes/PipeVerticalcenter.png b/Icons/Pipes/PipeVerticalcenter.png deleted file mode 100644 index 51c6709..0000000 Binary files a/Icons/Pipes/PipeVerticalcenter.png and /dev/null differ diff --git a/Icons/Pipes/VertBottomEntranceLeft ALT.png b/Icons/Pipes/VertBottomLeft.png similarity index 100% rename from Icons/Pipes/VertBottomEntranceLeft ALT.png rename to Icons/Pipes/VertBottomLeft.png diff --git a/Icons/Pipes/VertBottomEntranceRight ALT.png b/Icons/Pipes/VertBottomRight.png similarity index 100% rename from Icons/Pipes/VertBottomEntranceRight ALT.png rename to Icons/Pipes/VertBottomRight.png diff --git a/Icons/Pipes/VertCenterLeft ALT.png b/Icons/Pipes/VertCenterLeft.png similarity index 100% rename from Icons/Pipes/VertCenterLeft ALT.png rename to Icons/Pipes/VertCenterLeft.png diff --git a/Icons/Pipes/VertCenterRight ALT.png b/Icons/Pipes/VertCenterRight.png similarity index 100% rename from Icons/Pipes/VertCenterRight ALT.png rename to Icons/Pipes/VertCenterRight.png diff --git a/Icons/Pipes/VertMiniPipeBottomALT.png b/Icons/Pipes/VertMiniBottom.png similarity index 100% rename from Icons/Pipes/VertMiniPipeBottomALT.png rename to Icons/Pipes/VertMiniBottom.png diff --git a/Icons/Pipes/VertMiniPipeCenterALT.png b/Icons/Pipes/VertMiniCenter.png similarity index 100% rename from Icons/Pipes/VertMiniPipeCenterALT.png rename to Icons/Pipes/VertMiniCenter.png diff --git a/Icons/Pipes/VertMiniJunction.png b/Icons/Pipes/VertMiniJunction.png new file mode 100644 index 0000000..9317005 Binary files /dev/null and b/Icons/Pipes/VertMiniJunction.png differ diff --git a/Icons/Pipes/VertMiniPipeTop ALT.png b/Icons/Pipes/VertMiniTop.png similarity index 100% rename from Icons/Pipes/VertMiniPipeTop ALT.png rename to Icons/Pipes/VertMiniTop.png diff --git a/Icons/Pipes/VertTopEntranceLeft ALT.png b/Icons/Pipes/VertTopLeft.png similarity index 100% rename from Icons/Pipes/VertTopEntranceLeft ALT.png rename to Icons/Pipes/VertTopLeft.png diff --git a/Icons/Pipes/VertTopEntranceRight ALT.png b/Icons/Pipes/VertTopRight.png similarity index 100% rename from Icons/Pipes/VertTopEntranceRight ALT.png rename to Icons/Pipes/VertTopRight.png diff --git a/Icons/Prop/Invisible.png b/Icons/Prop/Invisible.png new file mode 100644 index 0000000..2d323ac Binary files /dev/null and b/Icons/Prop/Invisible.png differ diff --git a/Icons/QBlock/IceF.png b/Icons/QBlock/IceF.png index 8bd6596..ab3f258 100644 Binary files a/Icons/QBlock/IceF.png and b/Icons/QBlock/IceF.png differ diff --git a/Icons/Terrain/ConveyorLeft.png b/Icons/Terrain/ConveyorLeft.png new file mode 100644 index 0000000..fe774cc Binary files /dev/null and b/Icons/Terrain/ConveyorLeft.png differ diff --git a/Icons/Terrain/ConveyorRight.png b/Icons/Terrain/ConveyorRight.png new file mode 100644 index 0000000..9a6d283 Binary files /dev/null and b/Icons/Terrain/ConveyorRight.png differ diff --git a/Icons/Terrain/Dust.png b/Icons/Terrain/Dust.png new file mode 100644 index 0000000..c5a6f51 Binary files /dev/null and b/Icons/Terrain/Dust.png differ diff --git a/Icons/Terrain/Ladder.png b/Icons/Terrain/Ladder.png deleted file mode 100644 index 9adffbe..0000000 Binary files a/Icons/Terrain/Ladder.png and /dev/null differ diff --git a/Icons/Terrain/Pole.png b/Icons/Terrain/Pole.png new file mode 100644 index 0000000..9fd95a9 Binary files /dev/null and b/Icons/Terrain/Pole.png differ diff --git a/puzzle.py b/puzzle.py index c557c94..26a11ef 100644 --- a/puzzle.py +++ b/puzzle.py @@ -214,17 +214,17 @@ def __init__(self, window): path = 'Icons/' - self.coreTypes = [['Default', QtGui.QIcon(path + 'Core/Default.png'), 'The standard type for tiles.\n\nAny regular terrain or backgrounds\nshould be of generic type. It has no\n collision properties.'], + self.coreTypes = [['Default', QtGui.QIcon(path + 'Core/Default.png'), 'The standard type for tiles.\n\nAny regular terrain or backgrounds\nshould be of generic type. It has no\ncollision properties.'], ['Slope', QtGui.QIcon(path + 'Core/Slope.png'), 'Defines a sloped tile\n\nSloped tiles have sloped collisions,\nwhich Mario can slide on.\n\nNote: Do NOT set slopes to have solid collision.'], ['Reverse Slope', QtGui.QIcon(path + 'Core/RSlope.png'), 'Defines an upside-down slope.\n\nSloped tiles have sloped collisions,\nwhich Mario can slide on.\n\nNote: Do NOT set slopes to have solid collision.'], ['Partial Block', QtGui.QIcon(path + 'Partial/Full.png'), 'Used for blocks with partial collisions.\n\nVery useful for Mini-Mario secret\nareas, but also for providing a more\naccurate collision map for your tiles.'], - ['Coin', QtGui.QIcon(path + 'Core/Coin.png'), 'Creates a coin.\n\nCoins have no solid collision,\nand when touched will disappear\nand increment the coin counter.'], - ['Explodable Block', QtGui.QIcon(path + 'Core/Explode.png'), 'Specifies blocks which can explode.\n\nThese blocks will shatter into componenent\npieces when hit by a bom-omb or meteor.\nThe pieces themselves may be hardcoded\nand must be included in the tileset.\nBehaviour may be sporadic.'], + ['Coin', QtGui.QIcon(path + 'Core/Coin.png'), 'Creates a coin.\n\nCoins have no solid collision,\nand when touched will disappear\nand increment the coin counter.\n\nNote: This does NOT render a coin at the tile position.'], + ['Explodable Block', QtGui.QIcon(path + 'Core/Explode.png'), 'Specifies blocks which can explode.\n\nThese blocks will shatter into smaller\npieces when hit by a Bob-Omb, Broozer, meteor, etc.\nThe pieces themselves may be hardcoded\nand must be included in the tileset.\nBehaviour may be sporadic.'], ['Climable Grid', QtGui.QIcon(path + 'Core/Climb.png'), 'Creates terrain that can be climbed on.\n\nClimable terrain cannot be walked on.\nWhen Mario is overtop of a climable\ntile and the player presses up,\nMario will enter a climbing state.'], ['Spike', QtGui.QIcon(path + 'Core/Spike.png'), 'Dangerous Spikey spikes.\n\nSpike tiles will damage Mario one hit\nwhen they are touched.'], ['Pipe', QtGui.QIcon(path + 'Core/Pipe.png'), "Denotes a pipe tile.\n\nPipe tiles are specified according to\nthe part of the pipe. It's important\nto specify the right parts or\nentrances will not function correctly."], ['Rails', QtGui.QIcon(path + 'Core/Rails.png'), 'Used for all types of rails.\n\nPlease note that Pa3_rail.arc is hardcoded\nto replace rails with 3D models.'], - ['Conveyor Belt', QtGui.QIcon(path + 'Core/Conveyor.png'), 'Defines moving tiles.\n\nMoving tiles will move Mario in one\ndirection or another. Parameters are\nlargely unknown at this time.'], + ['Conveyor Belt', QtGui.QIcon(path + 'Core/Conveyor.png'), 'Defines moving tiles.\n\nMoving tiles will move Mario in the\ndirection specified by the terrain type.'], ['Question Block', QtGui.QIcon(path + 'Core/Qblock.png'), 'Creates question blocks.']] i = 0 @@ -265,11 +265,13 @@ def __init__(self, window): self.propertyGroup.setTitle('Properties:') propertyLayout = QtWidgets.QVBoxLayout() self.propertyWidgets = [] - propertyList = [['Solid', QtGui.QIcon(path + 'Prop/Solid.png'), 'Tiles you can walk on.\n\nThe tiles we be a solid basic square\nthrough which Mario can not pass.'], + propertyList = [['Solid', QtGui.QIcon(path + 'Prop/Solid.png'), 'Tiles you can walk on.\n\nThe tiles will be a solid basic square\nthrough which Mario can not pass.'], ['Block', QtGui.QIcon(path + 'Prop/Break.png'), 'This denotes breakable tiles such\nas brick blocks. It is likely that these\nare subject to the same issues as\nexplodable blocks. They emit a coin\nwhen hit.'], ['Falling Block', QtGui.QIcon(path + 'Prop/Fall.png'), 'Sets the block to fall after a set period. The\nblock is sadly replaced with a donut lift model.'], ['Ledge', QtGui.QIcon(path + 'Prop/Ledge.png'), 'A ledge tile with unique properties.\n\nLedges can be shimmied along or\nhung from, but not walked along\nas with normal terrain. Must have the\nledge terrain type set as well.'], - ['Meltable', QtGui.QIcon(path + 'Prop/Melt.png'), 'Supposedly allows melting the tile?']] + ['Unknown (Byte 0 && 0x2)', QtGui.QIcon(path + 'Unknown.png'), 'Formerly known as "Meltable".'], + ['Invisible Block', QtGui.QIcon(path + 'Prop/Invisible.png'), 'This denotes invisible blocks.\n\nIt is only an indicator that the tile may\nnot be valid terrain until hit, and is not\nrequired for invisible blocks to work.'], + ['Unknown (Byte 1 && 0x10)', QtGui.QIcon(path + 'Unknown.png'), 'Used in 07-21 Area 3 Zone 2.\n\nActs normal from sides and below,\nbut has strange slope-like collision\non the top.']] for item in range(len(propertyList)): self.propertyWidgets.append(QtWidgets.QCheckBox(propertyList[item][0])) @@ -292,9 +294,12 @@ def __init__(self, window): self.PassNone.setIconSize(QtCore.QSize(24, 24)) self.PassThrough.setToolTip('Allows Mario to jump through the bottom\nof the tile and land on the top.') - self.PassDown.setToolTip("Allows Mario to fall through the tile but\nbe able to jump up through it. Doesn't seem to actually do anything, though?") + self.PassDown.setToolTip("Allows Mario to fall through the tile but\nbe unable to jump up through it.") self.PassNone.setToolTip('Default setting') + # Select default pass behavior + self.PassNone.setChecked(True) + propertyLayout.addWidget(self.PassNone) propertyLayout.addWidget(self.PassThrough) propertyLayout.addWidget(self.PassDown) @@ -305,21 +310,21 @@ def __init__(self, window): # Terrain Type ComboBox self.terrainType = QtWidgets.QComboBox() - self.terrainLabel = QtWidgets.QLabel('Terrain Type') + self.terrainLabel = QtWidgets.QLabel('Terrain Type:') self.terrainTypes = [['Default', QtGui.QIcon(path + 'Core/Default.png')], ['Ice', QtGui.QIcon(path + 'Terrain/Ice.png')], ['Snow', QtGui.QIcon(path + 'Terrain/Snow.png')], ['Quicksand', QtGui.QIcon(path + 'Terrain/Quicksand.png')], - ['Conveyor Belt Right', QtGui.QIcon(path + 'Core/Conveyor.png')], - ['Conveyor Belt Left', QtGui.QIcon(path + 'Core/Conveyor.png')], + ['Conveyor Belt Right', QtGui.QIcon(path + 'Terrain/ConveyorRight.png')], + ['Conveyor Belt Left', QtGui.QIcon(path + 'Terrain/ConveyorLeft.png')], ['Horiz. Climbing Rope', QtGui.QIcon(path + 'Terrain/Rope.png')], - ['Anti Wall Jumps', QtGui.QIcon(path + 'Terrain/Spike.png')], + ['Anti Wall Jumps', QtGui.QIcon(path + 'Unknown.png')], ['Ledge', QtGui.QIcon(path + 'Terrain/Ledge.png')], - ['Ladder', QtGui.QIcon(path + 'Terrain/Ladder.png')], + ['Pole', QtGui.QIcon(path + 'Terrain/Pole.png')], ['Staircase', QtGui.QIcon(path + 'Terrain/Stairs.png')], ['Carpet', QtGui.QIcon(path + 'Terrain/Carpet.png')], - ['Dusty', QtGui.QIcon(path + 'Terrain/Dust.png')], + ['Desert Sand', QtGui.QIcon(path + 'Terrain/Dust.png')], ['Grass', QtGui.QIcon(path + 'Terrain/Grass.png')], ['Muffled', QtGui.QIcon(path + 'Unknown.png')], ['Beach Sand', QtGui.QIcon(path + 'Terrain/Sand.png')]] @@ -347,14 +352,14 @@ def __init__(self, window): 'Mario cannot wall-jump off of the tile.' '
  • Ledge:
    ' 'Must have ledge property set as well.
  • ' - '
  • Ladder:
    ' - 'Acts as a pole. Mario will face right or left as he climbs.
  • ' + '
  • Pole:
    ' + 'Mario will face right or left as he climbs.
  • ' '
  • Staircase:
    ' 'Does not allow Mario to slide.
  • ' '
  • Carpet:
    ' 'Will muffle footstep noises.
  • ' - '
  • Dusty:
    ' - 'Will emit puffs of dust.
  • ' + '
  • Desert Sand:
    ' + "Will create dusty sand tufts around Mario's feet.
  • " '
  • Muffled:
    ' 'Mostly muffles footstep noises.
  • ' '
  • Grass:
    ' @@ -368,7 +373,7 @@ def __init__(self, window): # Parameters ComboBox self.parameters = QtWidgets.QComboBox() - self.parameterLabel = QtWidgets.QLabel('Parameters') + self.parameterLabel = QtWidgets.QLabel('Parameters:') self.parameters.addItem('None') @@ -380,8 +385,8 @@ def __init__(self, window): ['Red Block Outline B', QtGui.QIcon(path + 'Generic/RedBlock.png')], ['Cave Entrance Right', QtGui.QIcon(path + 'Generic/Cave-Right.png')], ['Cave Entrance Left', QtGui.QIcon(path + 'Generic/Cave-Left.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Layer 0 Pit', QtGui.QIcon(path + 'Unknown.png')]] + ['Unknown 8', QtGui.QIcon(path + 'Unknown.png')], + ['Layer 0 Pit', QtGui.QIcon(path + 'Generic/PitLayer0.png')]] RailParams = [['None', QtGui.QIcon(path + 'Core/Default.png')], ['Rail: Upslope', QtGui.QIcon(path + '')], @@ -390,7 +395,7 @@ def __init__(self, window): ['Rail: 90 degree Corner', QtGui.QIcon(path + '')], ['Rail: Horizontal Rail', QtGui.QIcon(path + '')], ['Rail: Vertical Rail', QtGui.QIcon(path + '')], - ['Rail: Unknown', QtGui.QIcon(path + 'Unknown.png')], + ['Unknown 7', QtGui.QIcon(path + 'Unknown.png')], ['Rail: Gentle Upslope 2', QtGui.QIcon(path + '')], ['Rail: Gentle Upslope 1', QtGui.QIcon(path + '')], ['Rail: Gentle Downslope 2', QtGui.QIcon(path + '')], @@ -416,7 +421,7 @@ def __init__(self, window): ['Rail: 4x4 Circle Bottom Left', QtGui.QIcon(path + '')], ['Rail: 4x4 Circle Bottom Right', QtGui.QIcon(path + '')], ['Rail: 4x4 Circle Bottom Right Corner', QtGui.QIcon(path + '')], - ['Rail: Unknown', QtGui.QIcon(path + 'Unknown.png')], + ['Unknown 33', QtGui.QIcon(path + 'Unknown.png')], ['Rail: End Stop', QtGui.QIcon(path + '')]] ClimableGridParams = [['None', QtGui.QIcon(path + 'Core/Default.png')], @@ -433,51 +438,51 @@ def __init__(self, window): CoinParams = [['Generic Coin', QtGui.QIcon(path + 'QBlock/Coin.png')], - ['Coin', QtGui.QIcon(path + 'Unknown.png')], + ['Coin (1)', QtGui.QIcon(path + 'Unknown.png')], ['Nothing', QtGui.QIcon(path + 'Unknown.png')], - ['Coin', QtGui.QIcon(path + 'Unknown.png')], - ['Pow Block Coin', QtGui.QIcon(path + 'Coin/POW.png')]] + ['Coin (3)', QtGui.QIcon(path + 'Unknown.png')], + ['Blue Coin', QtGui.QIcon(path + 'Coin/BlueCoin.png')]] - ExplodableBlockParams = [['None', QtGui.QIcon(path + 'Core/Default.png')], + ExplodableBlockParams = [['Empty Block', QtGui.QIcon(path + 'Explode/Block.png')], ['Stone Block', QtGui.QIcon(path + 'Explode/Stone.png')], - ['Wooden Block', QtGui.QIcon(path + 'Explode/Wooden.png')], + ['Wooden Block', QtGui.QIcon(path + 'Explode/Wood.png')], ['Red Block', QtGui.QIcon(path + 'Explode/Red.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')]] - - PipeParams = [['Vert. Top Entrance Left', QtGui.QIcon(path + 'Pipes/')], - ['Vert. Top Entrance Right', QtGui.QIcon(path + '')], - ['Vert. Bottom Entrance Left', QtGui.QIcon(path + '')], - ['Vert. Bottom Entrance Right', QtGui.QIcon(path + '')], - ['Vert. Center Left', QtGui.QIcon(path + '')], - ['Vert. Center Right', QtGui.QIcon(path + '')], + ['Red Block (2)', QtGui.QIcon(path + 'Explode/Red.png')], + ['Brick Block', QtGui.QIcon(path + 'Explode/Brick.png')], + ['Brick Block (2)', QtGui.QIcon(path + 'Explode/Brick.png')]] + + PipeParams = [['Vert. Top Entrance Left', QtGui.QIcon(path + 'Pipes/VertTopLeft.png')], + ['Vert. Top Entrance Right', QtGui.QIcon(path + 'Pipes/VertTopRight.png')], + ['Vert. Bottom Entrance Left', QtGui.QIcon(path + 'Pipes/VertBottomLeft.png')], + ['Vert. Bottom Entrance Right', QtGui.QIcon(path + 'Pipes/VertBottomRight.png')], + ['Vert. Center Left', QtGui.QIcon(path + 'Pipes/VertCenterLeft.png')], + ['Vert. Center Right', QtGui.QIcon(path + 'Pipes/VertCenterRight.png')], ['Vert. On Top Junction Left', QtGui.QIcon(path + '')], ['Vert. On Top Junction Right', QtGui.QIcon(path + '')], - ['Horiz. Left Entrance Top', QtGui.QIcon(path + '')], - ['Horiz. Left Entrance Bottom', QtGui.QIcon(path + '')], - ['Horiz. Right Entrance Top', QtGui.QIcon(path + '')], - ['Horiz. Right Entrance Bottom', QtGui.QIcon(path + '')], - ['Horiz. Center Top', QtGui.QIcon(path + '')], - ['Horiz. Center Bottom', QtGui.QIcon(path + '')], + ['Horiz. Left Entrance Top', QtGui.QIcon(path + 'Pipes/HorizLeftTop.png')], + ['Horiz. Left Entrance Bottom', QtGui.QIcon(path + 'Pipes/HorizLeftBottom.png')], + ['Horiz. Right Entrance Top', QtGui.QIcon(path + 'Pipes/HorizRightTop.png')], + ['Horiz. Right Entrance Bottom', QtGui.QIcon(path + 'Pipes/HorizRightBottom.png')], + ['Horiz. Center Top', QtGui.QIcon(path + 'Pipes/HorizCenterTop.png')], + ['Horiz. Center Bottom', QtGui.QIcon(path + 'Pipes/HorizCenterBottom.png')], ['Horiz. On Top Junction Top', QtGui.QIcon(path + '')], ['Horiz. On Top Junction Bottom', QtGui.QIcon(path + '')], - ['Vert. Mini Pipe Top', QtGui.QIcon(path + '')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Vert. Mini Pipe Bottom', QtGui.QIcon(path + '')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Vert. On Top Mini-Junction', QtGui.QIcon(path + '')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Horiz. Mini Pipe Left', QtGui.QIcon(path + '')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Horiz. Mini Pipe Right', QtGui.QIcon(path + '')], - ['Unknown', QtGui.QIcon(path + 'Unknown.png')], - ['Vert. Mini Pipe Center', QtGui.QIcon(path + '')], - ['Horiz. Mini Pipe Center', QtGui.QIcon(path + '')], - ['Horiz. On Top Mini-Junction', QtGui.QIcon(path + '')], - ['Block Covered Corner', QtGui.QIcon(path + '')]] + ['Vert. Mini Pipe Top', QtGui.QIcon(path + 'Pipes/VertMiniTop.png')], + ['Unknown 17', QtGui.QIcon(path + 'Unknown.png')], + ['Vert. Mini Pipe Bottom', QtGui.QIcon(path + 'Pipes/VertMiniBottom.png')], + ['Unknown 19', QtGui.QIcon(path + 'Unknown.png')], + ['Unknown 20', QtGui.QIcon(path + 'Unknown.png')], + ['Unknown 21', QtGui.QIcon(path + 'Unknown.png')], + ['Vert. On Top Mini-Junction', QtGui.QIcon(path + 'Pipes/VertMiniJunction.png')], + ['Unknown 23', QtGui.QIcon(path + 'Unknown.png')], + ['Horiz. Mini Pipe Left', QtGui.QIcon(path + 'Pipes/HorizMiniLeft.png')], + ['Unknown 25', QtGui.QIcon(path + 'Unknown.png')], + ['Horiz. Mini Pipe Right', QtGui.QIcon(path + 'Pipes/HorizMiniRight.png')], + ['Unknown 27', QtGui.QIcon(path + 'Unknown.png')], + ['Vert. Mini Pipe Center', QtGui.QIcon(path + 'Pipes/VertMiniCenter.png')], + ['Horiz. Mini Pipe Center', QtGui.QIcon(path + 'Pipes/HorizMiniCenter.png')], + ['Horiz. On Top Mini-Junction', QtGui.QIcon(path + 'Pipes/HorizMiniJunction.png')], + ['Block Covered Corner', QtGui.QIcon(path + 'Pipes/BlockCorner.png')]] PartialBlockParams = [['None', QtGui.QIcon(path + 'Core/Default.png')], ['Upper Left', QtGui.QIcon(path + 'Partial/UpLeft.png')], @@ -485,7 +490,7 @@ def __init__(self, window): ['Top Half', QtGui.QIcon(path + 'Partial/TopHalf.png')], ['Lower Left', QtGui.QIcon(path + 'Partial/LowLeft.png')], ['Left Half', QtGui.QIcon(path + 'Partial/LeftHalf.png')], - ['Diagonal Downwards', QtGui.QIcon(path + 'Partial/DiagDn.png')], + ['Diagonal Upwards', QtGui.QIcon(path + 'Partial/DiagUp.png')], ['Upper Left 3/4', QtGui.QIcon(path + 'Partial/UpLeft3-4.png')], ['Lower Right', QtGui.QIcon(path + 'Partial/LowRight.png')], ['Diagonal Downwards', QtGui.QIcon(path + 'Partial/DiagDn.png')], @@ -545,18 +550,18 @@ def __init__(self, window): ['Single Downwards Spike', QtGui.QIcon(path + 'Spike/SingDown.png')], ['Spike Block', QtGui.QIcon(path + 'Unknown.png')]] - ConveyorBeltParams = [['Slow', QtGui.QIcon(path + 'Unknown.png')], - ['Fast', QtGui.QIcon(path + 'Unknown.png')]] + ConveyorBeltParams = [['Slow', QtGui.QIcon(path + '')], + ['Fast', QtGui.QIcon(path + '')]] - QBlockParams = [['Fire Flower', QtGui.QIcon(path + 'Qblock/Fire.png')], - ['Star', QtGui.QIcon(path + 'Qblock/Star.png')], - ['Coin', QtGui.QIcon(path + 'Qblock/Coin.png')], - ['Vine', QtGui.QIcon(path + 'Qblock/Vine.png')], - ['1-Up', QtGui.QIcon(path + 'Qblock/1up.png')], - ['Mini Mushroom', QtGui.QIcon(path + 'Qblock/Mini.png')], - ['Propeller Suit', QtGui.QIcon(path + 'Qblock/Prop.png')], - ['Penguin Suit', QtGui.QIcon(path + 'Qblock/Peng.png')], - ['Ice Flower', QtGui.QIcon(path + 'Qblock/IceF.png')]] + QBlockParams = [['Fire Flower', QtGui.QIcon(path + 'QBlock/Fire.png')], + ['Star', QtGui.QIcon(path + 'QBlock/Star.png')], + ['Coin', QtGui.QIcon(path + 'QBlock/Coin.png')], + ['Vine', QtGui.QIcon(path + 'QBlock/Vine.png')], + ['1-Up', QtGui.QIcon(path + 'QBlock/1up.png')], + ['Mini Mushroom', QtGui.QIcon(path + 'QBlock/Mini.png')], + ['Propeller Suit', QtGui.QIcon(path + 'QBlock/Prop.png')], + ['Penguin Suit', QtGui.QIcon(path + 'QBlock/Peng.png')], + ['Ice Flower', QtGui.QIcon(path + 'QBlock/IceF.png')]] self.ParameterList = [GenericParams, @@ -572,6 +577,43 @@ def __init__(self, window): ConveyorBeltParams, QBlockParams] + self.ParameterTips = [ + 'Default Parameters:' + '', + + None, # Slope + None, # Reverse Slope + None, # Partial Blocks + + 'Coin Parameters:' + '', + + None, # Explodable Blocks + None, # Climbable Grids + None, # Spikes + None, # Pipes + None, # Rails + None, # Conveyors + + 'Setting the parameter might not work, so set the item type by right-clicking any objects using this tile!', + ] + layout = QtWidgets.QGridLayout() layout.addWidget(self.coreType, 0, 1) @@ -580,11 +622,15 @@ def __init__(self, window): layout.addWidget(self.parameters, 1, 1) self.setLayout(layout) + # Select default core type + self.coreWidgets[0].setChecked(True) + self.swapParams() def swapParams(self): for item in range(12): if self.coreWidgets[item].isChecked(): self.parameters.clear() + self.parameters.setToolTip(self.ParameterTips[item]) for option in self.ParameterList[item]: self.parameters.addItem(option[1], option[0]) @@ -624,7 +670,7 @@ def updateAllTiles(): self.coreInfo = QtWidgets.QLabel() - self.propertyInfo = QtWidgets.QLabel(' \n\n\n\n\n') + self.propertyInfo = QtWidgets.QLabel('None') self.terrainInfo = QtWidgets.QLabel() self.paramInfo = QtWidgets.QLabel() @@ -640,7 +686,7 @@ def updateAllTiles(): self.LabelB = QtWidgets.QLabel('Properties:') self.LabelB.setFont(Font) - self.hexdata = QtWidgets.QLabel('Hex Data: 0x00 0x00 0x00 0x00\n 0x00 0x00 0x00 0x00') + self.hexdata = QtWidgets.QLabel('Hex Data:\n0x00 0x00 0x00 0x00\n0x00 0x00 0x00 0x00') self.hexdata.setFont(Font) @@ -753,8 +799,8 @@ class displayWidget(QtWidgets.QListView): def __init__(self, parent=None): super().__init__(parent) - self.setMinimumWidth(424) - self.setMaximumWidth(424) + self.setMinimumWidth(405) + self.setMaximumWidth(405) self.setMinimumHeight(404) self.setDragEnabled(True) self.setViewMode(QtWidgets.QListView.ViewMode.IconMode) @@ -824,7 +870,7 @@ def paint(self, painter, option, index): colour = QtGui.QColor(128,0,255, 120) elif curTile.byte5 == 8: # Ledge colour = QtGui.QColor(128,0,255, 120) - elif curTile.byte5 == 9: # Ladder + elif curTile.byte5 == 9: # Pole colour = QtGui.QColor(128,0,255, 120) elif curTile.byte5 == 10: # Staircase colour = QtGui.QColor(255, 0, 0, 120) @@ -884,6 +930,24 @@ def paint(self, painter, option, index): painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y + 12), QtCore.QPoint(x + 24, y + 24), QtCore.QPoint(x, y + 24)])) + elif curTile.byte7 == 6: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y + 24), + QtCore.QPoint(x + 12, y), + QtCore.QPoint(x + 24, y), + QtCore.QPoint(x + 24, y + 24)])) + elif curTile.byte7 == 7: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x + 12, y + 24), + QtCore.QPoint(x + 24, y), + QtCore.QPoint(x + 24, y + 24)])) + elif curTile.byte7 == 8: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x + 12, y), + QtCore.QPoint(x + 24, y + 24), + QtCore.QPoint(x, y + 24)])) + elif curTile.byte7 == 9: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x, y + 24), + QtCore.QPoint(x + 12, y + 24)])) elif curTile.byte7 == 10: painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), QtCore.QPoint(x, y + 24), @@ -955,6 +1019,24 @@ def paint(self, painter, option, index): painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y + 12), QtCore.QPoint(x, y), QtCore.QPoint(x + 24, y)])) + elif curTile.byte7 == 6: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x + 24, y), + QtCore.QPoint(x + 24, y + 24), + QtCore.QPoint(x + 12, y + 24)])) + elif curTile.byte7 == 7: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x + 12, y), + QtCore.QPoint(x + 24, y), + QtCore.QPoint(x + 24, y + 24)])) + elif curTile.byte7 == 8: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x + 24, y), + QtCore.QPoint(x + 12, y + 24), + QtCore.QPoint(x, y + 24)])) + elif curTile.byte7 == 9: + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x + 12, y), + QtCore.QPoint(x, y + 24)])) elif curTile.byte7 == 10: painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), QtCore.QPoint(x, y + 24), @@ -1045,12 +1127,12 @@ def paint(self, painter, option, index): QtCore.QPoint(x + 24, y + 24), QtCore.QPoint(x + 12, y + 24)])) elif curTile.byte7 == 9: - painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x + 24, y), - QtCore.QPoint(x + 24, y + 12), - QtCore.QPoint(x, y + 12), - QtCore.QPoint(x, y + 24), + painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x, y), + QtCore.QPoint(x + 12, y), QtCore.QPoint(x + 12, y + 24), - QtCore.QPoint(x + 12, y)])) + QtCore.QPoint(x + 24, y + 24), + QtCore.QPoint(x + 24, y + 12), + QtCore.QPoint(x, y + 12)])) elif curTile.byte7 == 10: painter.drawPolygon(QtGui.QPolygon([QtCore.QPoint(x + 12, y), QtCore.QPoint(x + 24, y), @@ -1159,19 +1241,42 @@ def paint(self, painter, option, index): QtCore.QPoint(x + 24, y), QtCore.QPoint(x + 12, y + 24)])) + if curTile.byte7 == 7: + painter.drawRect(x + 7, y + 7, 10, 10) + + spikes = [ + [QtCore.QPoint(x, y), QtCore.QPoint(x + 10, y + 6), QtCore.QPoint(x + 6, y + 10)], # Top left + [QtCore.QPoint(x + 24, y), QtCore.QPoint(x + 14, y + 6), QtCore.QPoint(x + 18, y + 10)], # Top right + [QtCore.QPoint(x, y + 24), QtCore.QPoint(x + 10, y + 18), QtCore.QPoint(x + 6, y + 14)], # Bottom left + [QtCore.QPoint(x + 24, y + 24), QtCore.QPoint(x + 14, y + 18), QtCore.QPoint(x + 18, y + 14)], # Bottom right + [QtCore.QPoint(x + 12, y - 1), QtCore.QPoint(x + 8, y + 8), QtCore.QPoint(x + 16, y + 8)], # Top + [QtCore.QPoint(x + 12, y + 25), QtCore.QPoint(x + 8, y + 16), QtCore.QPoint(x + 16, y + 16)], # Bottom + [QtCore.QPoint(x - 1, y + 12), QtCore.QPoint(x + 8, y + 8), QtCore.QPoint(x + 8, y + 16)], # Left + [QtCore.QPoint(x + 25, y + 12), QtCore.QPoint(x + 16, y + 8), QtCore.QPoint(x + 16, y + 16)], # Right + ] + + for spike in spikes: + painter.drawPolygon(QtGui.QPolygon(spike)) + elif curTile.byte3 & 2: # Coin if curTile.byte7 == 0: painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Coin/Coin.png')) if curTile.byte7 == 4: - painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Coin/POW.png')) + painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Coin/BlueCoin.png')) elif curTile.byte3 & 8: # Exploder - if curTile.byte7 == 1: - painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Explode/Stone.png')) - if curTile.byte7 == 2: - painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Explode/Wood.png')) - if curTile.byte7 == 3: - painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Explode/Red.png')) + names = [ + 'Explode/Block.png', + 'Explode/Stone.png', + 'Explode/Wood.png', + 'Explode/Red.png', + 'Explode/Red.png', + 'Explode/Brick.png', + 'Explode/Brick.png' + ] + + if curTile.byte7 <= 6: + painter.drawPixmap(option.rect, QtGui.QPixmap(path + names[curTile.byte7])) elif curTile.byte1 & 2: # Falling painter.drawPixmap(option.rect, QtGui.QPixmap(path + 'Prop/Fall.png')) @@ -1265,6 +1370,7 @@ def __init__(self): self.tilingMethod.activated.connect(self.setTiling) + self.enableButtons(False) # Layout layout = QtWidgets.QGridLayout() @@ -1292,6 +1398,17 @@ def __init__(self): + def enableButtons(self, enabled): + self.tiles.setVisible(enabled) + self.tilingMethod.setEnabled(enabled) + + self.addRow.setEnabled(enabled) + self.removeRow.setEnabled(enabled) + + self.addColumn.setEnabled(enabled) + self.removeColumn.setEnabled(enabled) + + def addObj(self): global Tileset @@ -1308,6 +1425,7 @@ def addObj(self): index = window.objectList.currentIndex() window.objectList.setCurrentIndex(index) self.setObject(index) + self.enableButtons(True) window.objectList.update() self.update() @@ -1334,6 +1452,7 @@ def removeObj(self): window.objectList.setCurrentIndex(index) self.setObject(index) + self.enableButtons(len(Tileset.objects) != 0) window.objectList.update() self.update() @@ -1341,6 +1460,7 @@ def removeObj(self): def setObject(self, index): global Tileset object = Tileset.objects[index.row()] + self.enableButtons(True) width = len(object.tiles[0])-1 height = len(object.tiles)-1 @@ -1854,7 +1974,7 @@ def contextMenuEvent(self, event): def mousePressEvent(self, event): global Tileset - if event.button() == 2: + if event.button() != Qt.MouseButton.LeftButton: return if window.tileDisplay.selectedIndexes() == []: @@ -1963,6 +2083,7 @@ def __init__(self): self.tileset = QtWidgets.QComboBox() self.tileset.addItems(['Pa0', 'Pa1', 'Pa2', 'Pa3']) + self.tileset.setMinimumWidth(48) self.tile = QtWidgets.QSpinBox() self.tile.setRange(0, 255) @@ -3565,12 +3686,16 @@ def updateInfo(self, x, y): propertyList.append('Pass-Through') if curTile.byte2 & 64: propertyList.append('Pass-Down') + if curTile.byte2 & 32: + propertyList.append('Invisible') if curTile.byte1 & 2: propertyList.append('Falling') if curTile.byte1 & 8: propertyList.append('Ledge') if curTile.byte0 & 2: - propertyList.append('Meltable') + propertyList.append('Unknown (Byte 0 & 0x2)') + if curTile.byte1 & 16: + propertyList.append('Unknown (Byte 1 & 0x10)') if len(propertyList) == 0: @@ -3604,9 +3729,7 @@ def updateInfo(self, x, y): info.terrainInfo.setText(palette.terrainTypes[curTile.byte5][0]) info.paramInfo.setText(parameter[0]) - info.hexdata.setText('Hex Data: {0} {1} {2} {3}\n {4} {5} {6} {7}'.format( - hex(curTile.byte0), hex(curTile.byte1), hex(curTile.byte2), hex(curTile.byte3), - hex(curTile.byte4), hex(curTile.byte5), hex(curTile.byte6), hex(curTile.byte7))) + info.hexdata.setText(f'Hex Data:\n0x{curTile.byte0:02x} 0x{curTile.byte1:02x} 0x{curTile.byte2:02x} 0x{curTile.byte3:02x}\n0x{curTile.byte4:02x} 0x{curTile.byte5:02x} 0x{curTile.byte6:02x} 0x{curTile.byte7:02x}') @@ -3629,10 +3752,12 @@ def paintFormat(self, index): curTile.byte0 = ((palette.propertyWidgets[4].isChecked() << 1)) curTile.byte1 = ((palette.coreWidgets[8].isChecked()) + (palette.propertyWidgets[2].isChecked() << 1) + - (palette.propertyWidgets[3].isChecked() << 3)) + (palette.propertyWidgets[3].isChecked() << 3) + + (palette.propertyWidgets[6].isChecked() << 4)) curTile.byte2 = ((palette.coreWidgets[6].isChecked() << 2) + (palette.coreWidgets[3].isChecked() << 3) + (palette.coreWidgets[7].isChecked() << 4) + + (palette.propertyWidgets[5].isChecked() << 5) + (palette.PassDown.isChecked() << 6) + (palette.PassThrough.isChecked() << 7)) curTile.byte3 = ((solid) +