private static void a(int paramInt1, int paramInt2, int paramInt3, iP paramiP) { if (paramiP.d(paramInt1, paramInt2, paramInt3)) { return; } paramiP.reset(); tF localtF = cwO.dV(paramInt1, paramInt2); if (localtF == null) { return; } int i = localtF.BV().a(paramInt1, paramInt2, beo, 0); if (i == 0) { return; } for (int j = 0; j < i; j++) { bep localbep = beo[j]; if (localbep.aOl == paramInt3) { DisplayedScreenElement localDisplayedScreenElement = btb.bBd().c(localbep.hY, localbep.hZ, localbep.aOl, cWj.kJi); if (localDisplayedScreenElement != null) { cid localcid = localDisplayedScreenElement.bpc().ddL(); paramiP.aJo = localcid.cjI(); if (paramiP.aJo != 0) paramiP.aJp = ((byte) localcid.cjJ()); else { paramiP.aJp = 0; } paramiP.setPosition(paramInt1, paramInt2, paramInt3); break; } } } if (paramiP.aJs == 2147483647) { paramiP.aJo = 0; paramiP.aJp = 0; paramiP.setPosition(paramInt1, paramInt2, paramInt3); } }
public void update(final DisplayedScreenWorld world, final int deltaTime) { this.m_position += deltaTime; final ArrayList<DisplayedScreenMap> maps = world.getMaps(); for (int i = maps.size() - 1; i >= 0; --i) { final DisplayedScreenMap map = maps.get(i); if (map != null) { final DisplayedScreenElement[] elts = map.getElements(); if (elts != null) { for (final DisplayedScreenElement elt : elts) { if (elt.isVisible()) { final int id = elt.getElement().getCommonProperties().getId(); if (Sea.WATER_ELEMENTS.contains(id)) { final float x = elt.getWorldCellX(); final float y = elt.getWorldCellY(); final float d = (float) Math.sqrt(x * x + y * y) + this.m_speed * this.m_position / 1000.0f; float amplitude = this.m_amplitude * MathHelper.sinf(6.2831855f * d / this.m_width); if (amplitude < 0.0f) { amplitude *= 0.2f; } final BatchTransformer batchTransformer = elt.getEntitySprite().getTransformer(); final float tx = batchTransformer.getMatrix().getBuffer()[12]; final float ty = batchTransformer.getMatrix().getBuffer()[13]; batchTransformer .getMatrix() .set( new float[] { 1.0f + amplitude, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f + amplitude, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, tx, ty, 0.0f, 1.0f }); } } } } } } }