diff --git a/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js b/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js index 5547736b..4971b259 100644 --- a/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js +++ b/OutlawEditor/src/main/resources/mythos/mythos-editor/js/mythos_uncompressed.js @@ -939,14 +939,14 @@ if (typeof Mythos === "undefined") { this.setPreviousStatement(true); this.setNextStatement(true); this.appendDummyInput() - .appendField("Swap tile from X/Y") + .appendField("Copy tile from X/Y") .appendField(new Blockly.FieldTextInput(""), "FROM_X") .appendField(new Blockly.FieldTextInput(""), "FROM_Y") .appendField("to X/Y") .appendField(new Blockly.FieldTextInput(""), "TO_X") .appendField(new Blockly.FieldTextInput(""), "TO_Y"); this.setOutput(false); - this.setTooltip('Swap the map tile between two locations'); + this.setTooltip('Copy a map tile from one spot to another (overwriting the latter)'); } }; Blockly.Blocks['graphics_clr_portrait'] = { diff --git a/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy b/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy index 8912eb4f..afc0c775 100644 --- a/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy +++ b/Platform/Apple/tools/PackPartitions/src/org/badvision/A2PackPartitions.groovy @@ -3824,7 +3824,7 @@ end case 'graphics_set_avatar': packSetAvatar(blk); break case 'graphics_swap_tile': - packSwapTile(blk); break + packCopyTile(blk); break case 'graphics_intimate_mode': packIntimateMode(blk); break case 'variables_set': @@ -4394,7 +4394,7 @@ end outIndented("scriptSetAvatar(${avatars[tileName.toLowerCase()]})\n") } - def packSwapTile(blk) + def packCopyTile(blk) { assert blk.field.size() == 4 assert blk.field[0].@name == 'FROM_X' @@ -4405,7 +4405,7 @@ end def fromY = blk.field[1].text().toInteger() def toX = blk.field[2].text().toInteger() def toY = blk.field[3].text().toInteger() - outIndented("scriptSwapTile($fromX, $fromY, $toX, $toY)\n") + outIndented("scriptCopyTile($fromX, $fromY, $toX, $toY)\n") } def packIntimateMode(blk) diff --git a/Platform/Apple/virtual/src/plasma/gamelib.plh b/Platform/Apple/virtual/src/plasma/gamelib.plh index 680b196a..9a691982 100644 --- a/Platform/Apple/virtual/src/plasma/gamelib.plh +++ b/Platform/Apple/virtual/src/plasma/gamelib.plh @@ -104,10 +104,10 @@ import gamelib predef roomInPack(p_player)#1 predef scanForNamedObj(p_obj, name)#1 predef scriptCombat(mapCode)#1 + predef scriptCopyTile(fromX, fromY, toX, toY)#0 predef scriptDisplayStr(str)#0 predef scriptEvent(event, param)#0 predef scriptSetAvatar(avatarTileNum)#0 - predef scriptSwapTile(fromX, fromY, toX, toY)#0 predef select(p, sel, num)#1 predef setCmd(key, func)#0 predef setCursor(x, y)#0 diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index 140d90d2..bfe02fa2 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -297,7 +297,7 @@ asm setAvatar(tileNum)#0 // tile number (in the global tileset) +asmPlasmNoRet 1 jmp $6021 end -asm swapTile(fromX, fromY, toX, toY)#0 +asm copyTile(fromX, fromY, toX, toY)#0 +asmPlasmNoRet 4 jmp $6024 end @@ -2731,9 +2731,9 @@ end /////////////////////////////////////////////////////////////////////////////////////////////////// // Called by scripts to swap a map tile. We set a flag noting we need to re-render, then use an // assembly routine to do the work. -export def scriptSwapTile(fromX, fromY, toX, toY)#0 +export def scriptCopyTile(fromX, fromY, toX, toY)#0 needRender = TRUE - swapTile(fromX, fromY, toX, toY) + copyTile(fromX, fromY, toX, toY) end /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Platform/Apple/virtual/src/raycast/render.s b/Platform/Apple/virtual/src/raycast/render.s index 22e49cef..8e35a4e7 100644 --- a/Platform/Apple/virtual/src/raycast/render.s +++ b/Platform/Apple/virtual/src/raycast/render.s @@ -40,7 +40,7 @@ NOTFLG_SPRITE = $FF-$80 jmp pl_texControl ; params: 0=unload textures, 1=load textures jmp pl_getScripts ; params: none jmp pl_setAvatar ; params: A=tile number - jmp pl_swapTile ; params: fromX, fromY, toX, toY + jmp pl_copyTile ; params: fromX, fromY, toX, toY ; Conditional assembly flags DEBUG = 0 ; 1=some logging, 2=lots of logging @@ -1872,11 +1872,11 @@ pl_advance: !zone rts ;------------------------------------------------------------------------------- -; Swap tiles at two positions. +; Copy a tile (destructively) from one position to another ; Params: fromX, fromY, toX, toY ; 3 2 1 0 ; Return: none -pl_swapTile: !zone +pl_copyTile: !zone ; Grab stuff from the PLASMA eval stack lda evalStkL+3,x ; fromX sta tmp @@ -1907,19 +1907,12 @@ pl_swapTile: !zone lda (pMap,x) ; grab fromTile sta tmp+1 lda (pTmp),y ; grab toTile - sta tmp eor tmp+1 ; grab all bits from fromTile and #FLG_AUTOMAP ; except automap mark eor tmp+1 sta (pTmp),y ; save toTile - lda tmp+1 - eor tmp ; grab all bits from toTile - and #FLG_AUTOMAP ; except automap mark - eor tmp - sta (pMap,x) ; save fromTile - rts ; all done ;------------------------------------------------------------------------------- diff --git a/Platform/Apple/virtual/src/tile/tileEngine.s b/Platform/Apple/virtual/src/tile/tileEngine.s index dfa9b2cb..8f434df5 100644 --- a/Platform/Apple/virtual/src/tile/tileEngine.s +++ b/Platform/Apple/virtual/src/tile/tileEngine.s @@ -119,7 +119,7 @@ next_zp = $AD JMP pl_texControl ; params: 1=load, 0=unload JMP pl_getScripts ; params: none JMP pl_setAvatarTile ; params: A=tile number - JMP pl_swapTile ; params: fromX, fromY, toX, toY + JMP pl_copyTile ; params: fromX, fromY, toX, toY ;---------------------------------------------------------------------- ; >> START LOADING MAP SECTIONS @@ -1201,10 +1201,10 @@ pl_setColor: rts ;---------------------------------------------------------------------- -; >> pl_swapTile +; >> pl_copyTile ; Not yet implemented for 2D mode, because very complex due to map ; segmenting. -pl_swapTile: +pl_copyTile: +prChr 'T' brk