From 24e26b852cde4b7a380bc0d1dcf07e3b6a91bd66 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 21 Sep 2021 07:24:21 +0000 Subject: [PATCH] Setup column collision ranges for collision checking. --- Meteo_Engine.jar | Bin 8016 -> 8600 bytes src/sig/BlockClump.java | 44 ++++++++++++++++++++++++++++++++++------ src/sig/Board.java | 2 +- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/Meteo_Engine.jar b/Meteo_Engine.jar index 6912362617aa03a9a79ed43cc536904c3ee34184..b496c05e00750c4e93ca540918ac8888d725f6a3 100644 GIT binary patch delta 2943 zcmZ9OXEfaF7RJpWGfec(jG7^c7NQJBi#kyv8EqnZyU|6I;I9Qy!yrVTi0IKf=jg{7 zEr=2&M6~FlM89#)y6c>E-w*GzpY`s&-*3P545QQ3t{Y%T$rwqXP$&Q@Mt-dL9h99YI6*Q&l{yAbJ$mYR3UI2UO0 z&4N_kwFyEL*{ zdb^DoQas69dV`He8;vUpLyaqQXS@3=A|wL4SQ1T%QtPe+K2|CM0CB)(;!j$l>%mg- zePS&6zPM-)C4P5_VC{S4JJh1u(>41!6ki$VQmlBUT+WbqZGbS&h-^ zAvVo#AA$pzt3+SNbJVS+X=b43DtZ+zj8;86~-8J*q!h@1RU zuAe{tVB>4G?XEhv3CLebY#ot36T=-EN~n1I8VBTLy{VHlN_zUeWAnuhg=jQ$X{o0r zDuvk9@0D7rs>`E*$=FJ2V{aN3o`1tNI{cD>{nn!u{!~v#6Ae}6X>CmBy04lV>n1y| z;nQ66?r0$5hM~|1J6c0S-6$+BGs4DKyOU~WtRngjRsGJ(2vFwujvyMZ;!5PMZ+zFB zN3&9TccvdYmMT#{$YPd2RO)3hoLNZqsVhfCh-K}5b^@hDpLZoT6j;%^Re2)8dN-uq zx!7NqS69#(Z?Z$34gskTH^s9G%!nP`eMGgqE$wWWi@RpUyn9vU>zW3q0tcN8AYf?Y`GMLdr{EuaA`TRX zwVXjgDWgtCMc{)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;z{R^*ciSr;mC-Wxcbw$R#CU<@PGA-bs@6&@aDpx68p|m~MCH=){eL>GuohO|6jHpxK zH4V37Eq~$XyfmEphDcst>F}&smW*;9Cpk;M8_H0Ml_+V=S;6Fp-e!6^u`4ahuNC3J zPFvSDIqI5w;yR=bNiE1N9S?)5r-5%>@l-ym-S0f%J+ j3IhIlvZj65NIzPK4FIUz-~Sd%h*HBOB{{Oi4rc!cSo$nt diff --git a/src/sig/BlockClump.java b/src/sig/BlockClump.java index 84a812f..f3ee125 100644 --- a/src/sig/BlockClump.java +++ b/src/sig/BlockClump.java @@ -1,25 +1,57 @@ package sig; import java.awt.Graphics; +import java.util.Arrays; import java.util.List; public class BlockClump { - List blocks; + private List blocks; double x,y; //the lower-left origin of this block clump. Every block positions relative to this. double yspd; - public BlockClump(List blockList, double x, double y, double startspd) { - this.blocks = blockList; + int[][] collisionColumnRanges; + public BlockClump(List blockList, double x, double y, double startspd, int width) { + collisionColumnRanges = new int[width][]; + + for (int i=0;ib.y) { + collisionColumnRanges[b.x][0]=b.y; + } else + if (collisionColumnRanges[b.x][1]==-1||collisionColumnRanges[b.x][1]