From 4d684ee294ace5a0a77db73f0ab4db777ce99529 Mon Sep 17 00:00:00 2001 From: dani <> Date: Thu, 24 Aug 2023 02:05:13 +0000 Subject: [PATCH] shifting in map edit --- examples/basic/gfx.gif | Bin 29370 -> 29547 bytes src/mapedit/constants.rs | 10 +++++++++- src/mapedit/mod.rs | 32 ++++++++++++++++++++++++++++++++ src/mapedit/stuff.rs | 5 +++++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/examples/basic/gfx.gif b/examples/basic/gfx.gif index b98b16915ef3f6e3aa68e8337f4db62268d3eff5..61999f105348be97dd46477e52343fb53cf75844 100644 GIT binary patch delta 8136 zcmV;(A2;B-dMB`IPe@K{(|B#p^R6Ww; z!pufE?jt|;qd)#*tJ%@4<0= zq)+}NP{P(FUSbvQf1t4pSYVyRtZso`T*V_3$eT+St3)};)+WVOvxJjvqbgodEGxRj^mBQQ}b=r2L&nXi6ki3Kd3*30s

``|Xmouhd?u)Z zE+~UGC~HLvecESzrXy0aq8~|EdY$B){Tg^C1&6%OP=V-&@>htGsDqv;il(TFt|&w) zBl zshrMf6ZM^)-YK5ush;jBpZ2Mr{wbgaYQk(Op%$v49%}DkU`PQ`gp$=w$$+Hvpy@dM(eyFTz|@39u4Ho zQ5MQ=*rWx}3|3${9?-CkE4h}dxt=S!YHG1Ee=EDTtGm7{ysrO?w9YHN)~mhh35fj` zg`UlZx}2?k)un-(B}Ue+rmMjoEW#$N!is9VHmt)wEX1Pfy-qB}R;KHAmk ze@uJPs>%*6(H5=IRw~QJtkNzm(<1B5J}uNnt<>5|VCqD{9xc{pt=6Jz(l)Kvel6JY z>C}!b*_N%@lEp`%O{PVvW%ZDC^;U0D3s|)xK5cEV(kb5NtsdGfuXb(N{w?4JZnK^( z;TEpp94gPW~|q|P24IYvJBF;ZpP%&=zMW*-{S7&>Mp1HZRq|k@ILJ64lnT*@8K3) z+H`9T_Tb~%nQx&ZcdjD_@h+%tF7;N|^=fYLZZG%7tnq#?_=fMzrmgCFMx@4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~-yF{4T+ZiQKEr&9%^c73 zT+jEM&->iZ{~XW*UC;-e&5LtWHIozzR+)K4ANQ(e_poz+|2)n6UfV_nu~oz`pJ)^8oxb6wYWo!5Ka z*MA+@gI(B%o!E=r*pD6AlU>>Wmz~+0-PxZV+M`|Cr=8lX-P*4m+p}HUx1BNDyWQKr z9o)lR+{c~V%iY}19o^Gi-PfJn+uhyY9p2+z-shd(>)qb(9pCd^-}jy0vwv2!8v%rq MG;)Cjy$T2bJGNe=b^rhX diff --git a/src/mapedit/constants.rs b/src/mapedit/constants.rs index 7a55fce..2f86435 100644 --- a/src/mapedit/constants.rs +++ b/src/mapedit/constants.rs @@ -18,12 +18,20 @@ pub const TILE_BUT_CREATE: u16 = 0x7213; pub const BUT_SAVE: usize = 0; pub const BUT_CREATE: usize = 1; + pub const BUT_LAYER1: usize = 3; pub const BUT_LAYER2: usize = 4; pub const BUT_LAYER3: usize = 5; pub const BUT_LAYERS: usize = 6; + pub const BUT_SHIFT_LEFT: usize = 8; pub const BUT_SHIFT_RIGHT: usize = 9; pub const BUT_SHIFT_UP: usize = 10; pub const BUT_SHIFT_DOWN: usize = 11; -pub const BUT_EXIT: usize = 13; + +pub const BUT_REDUCE_HORIZONTAL: usize = 13; +pub const BUT_ENLARGE_HORIZONTAL: usize = 14; +pub const BUT_REDUCE_VERTICAL: usize = 15; +pub const BUT_ENLARGE_VERTICAL: usize = 16; + +pub const BUT_EXIT: usize = 18; diff --git a/src/mapedit/mod.rs b/src/mapedit/mod.rs index d9731c4..342405e 100644 --- a/src/mapedit/mod.rs +++ b/src/mapedit/mod.rs @@ -252,6 +252,38 @@ pub(crate) fn run_mapedit() { stuff.gsa1.bg[1].shift_down(); stuff.gsa1.bg[2].shift_down(); } + BUT_REDUCE_HORIZONTAL => { + if stuff.gsa1.bg[0].size.x > 1 { + stuff.gsa1.bg[0].size.x -= 1; + stuff.gsa1.bg[1].size.x -= 1; + stuff.gsa1.bg[2].size.x -= 1; + stuff.update_status_bar(); + } + } + BUT_ENLARGE_HORIZONTAL => { + if stuff.gsa1.bg[0].size.x <= BACKGROUND_MAX_SIZE as i32 - 1 { + stuff.gsa1.bg[0].size.x += 1; + stuff.gsa1.bg[1].size.x += 1; + stuff.gsa1.bg[2].size.x += 1; + stuff.update_status_bar(); + } + } + BUT_REDUCE_VERTICAL => { + if stuff.gsa1.bg[0].size.y > 1 { + stuff.gsa1.bg[0].size.y -= 1; + stuff.gsa1.bg[1].size.y -= 1; + stuff.gsa1.bg[2].size.y -= 1; + stuff.update_status_bar(); + } + } + BUT_ENLARGE_VERTICAL => { + if stuff.gsa1.bg[0].size.y <= BACKGROUND_MAX_SIZE as i32 - 1 { + stuff.gsa1.bg[0].size.y += 1; + stuff.gsa1.bg[1].size.y += 1; + stuff.gsa1.bg[2].size.y += 1; + stuff.update_status_bar(); + } + } BUT_EXIT => { println!("exit"); *control_flow = ControlFlow::Exit; diff --git a/src/mapedit/stuff.rs b/src/mapedit/stuff.rs index 4cbf2b6..fdacd09 100644 --- a/src/mapedit/stuff.rs +++ b/src/mapedit/stuff.rs @@ -80,6 +80,11 @@ impl Stuff { self.gsa2.bg[2].tiles[0][BUT_SHIFT_UP] = 0x7316; self.gsa2.bg[2].tiles[0][BUT_SHIFT_DOWN] = 0x7317; + self.gsa2.bg[2].tiles[0][BUT_REDUCE_HORIZONTAL] = 0x7414; + self.gsa2.bg[2].tiles[0][BUT_ENLARGE_HORIZONTAL] = 0x7415; + self.gsa2.bg[2].tiles[0][BUT_REDUCE_VERTICAL] = 0x7416; + self.gsa2.bg[2].tiles[0][BUT_ENLARGE_VERTICAL] = 0x7417; + self.gsa2.bg[2].size = IVec2 { x: 120, y: 68 }; //enough to cover 4k monitors? <_< self.gsa2.bg[3].size = IVec2 { x: 240, y: 136 };