handle 4 corner walls

This commit is contained in:
2022-06-11 01:47:29 +00:00
parent 251c3cad78
commit 6c7ebaa6da
3 changed files with 31 additions and 34 deletions

View File

@@ -4,40 +4,20 @@
begindefineterrain 6; // nw wall
te_icon_offset_y = -10;
begindefineterrain 7; // ws wall
te_which_icon = 0;
te_ed_which_icon = 5;
te_cutaway_which_sheet = -1;
te_full_move_block = 0;
te_full_look_block = 0;
te_blocks_view_n = 0;
te_move_block_s = 1;
te_look_block_s = 1;
te_blocks_view_s = 1;
te_move_block_w = 1;
te_look_block_w = 1;
te_blocks_view_w = 1;
te_which_icon = 1;
te_icon_offset_x = -18;
te_icon_offset_y = -12;
te_stamp_icon = 0;
te_stamp_icon_offset_x = 0;
begindefineterrain 8; // se wall
te_ed_which_icon = 6;
te_full_move_block = 0;
te_full_look_block = 0;
te_blocks_view_w = 0;
te_move_block_s = 1;
te_look_block_s = 1;
te_blocks_view_s = 1;
te_move_block_e = 1;
te_look_block_e = 1;
te_blocks_view_e = 1;
te_which_icon = 0;
te_stamp_icon = 1;
te_stamp_icon_offset_y = -1;
begindefineterrain 9; // en wall
te_ed_which_icon = 7;
te_full_move_block = 0;
te_full_look_block = 0;
te_blocks_view_s = 0;
te_move_block_n = 1;
te_look_block_n = 1;
te_blocks_view_n = 1;
te_move_block_e = 1;
te_look_block_e = 1;
te_blocks_view_e = 1;
te_which_icon = 0;
te_icon_offset_x = 18;
te_icon_offset_y = -12;
te_stamp_icon = 1;
// second set of walls
begindefineterrain 38;

View File

@@ -89,6 +89,19 @@ class ScenData {
sprite.loadGraphicFromSprite(sheet);
sprite.animation.frameIndex = td.which_icon;
// ADDED: stamp an icon on another one (for corner walls)
if (td.stamp_icon != -1) {
var stampSprite = new FlxSprite();
stampSprite.loadGraphicFromSprite(sheet);
stampSprite.animation.frameIndex = td.stamp_icon;
var stampedSprite = new FlxSprite(-92/4, -110/4);
stampedSprite.makeGraphic(92, 110, FlxColor.TRANSPARENT, true);
stampedSprite.stamp(sprite, Std.int(92/4)+td.icon_offset_x, Std.int(110/4)+td.icon_offset_y);
stampedSprite.stamp(stampSprite, Std.int(92/4)+td.stamp_icon_offset_x, Std.int(110/4)+td.stamp_icon_offset_y);
return stampedSprite;
}
sprite.x += td.icon_offset_x;
sprite.y += td.icon_offset_y;

View File

@@ -79,14 +79,18 @@ class TerrainData {
public var default_script:String = "Unused";
public var which_sheet:Int = 0;
public var which_icon:Int = 0;
public var icon_offset_x:Int = 0;
public var icon_offset_y:Int = 0;
// ADDED: stamp_icon for handling some corner walls
public var stamp_icon:Int = -1;
public var stamp_icon_offset_x:Int = 0;
public var stamp_icon_offset_y:Int = 0;
public var icon_adjust:Int = 0;
public var ed_which_sheet:Int = 0;
public var ed_which_icon:Int = 0;
public var cutaway_which_sheet:Int = -1;
public var cutaway_which_icon:Int = 0;
public var cutaway_icon_adjust:Int = 0;
public var icon_offset_x:Int = 0;
public var icon_offset_y:Int = 0;
public var second_icon:Int = -1;
public var second_icon_offset_x:Int = 0;
public var second_icon_offset_y:Int = 0;