public LPad(int x, int y, LTexturePack p, float scale): base(x, y, (int)(p.GetEntry("fore").Width() * scale), (int)(p .GetEntry("fore").Height() * scale)) { this.offsetX = 6 * scale; this.offsetY = 6 * scale; this.pack = p; this.dotWidth = (int)(p.GetEntry("dot").Width() * scale); this.dotHeight = (int)(p.GetEntry("dot").Height() * scale); this.baseWidth = (int)(p.GetEntry("fore").Width() * scale); this.baseHeight = (int)(p.GetEntry("fore").Height() * scale); this.backWidth = (int)(p.GetEntry("back").Width() * scale); this.backHeight = (int)(p.GetEntry("back").Height() * scale); this.centerX = (baseWidth - dotWidth) / 2 + offsetX; this.centerY = (baseHeight - dotHeight) / 2 + offsetY; this.scale_pad = scale; p.SetFormat(Loon.Core.Graphics.Opengl.LTexture.Format.LINEAR); }
public TileMap(Field2D field, int mWidth, int mHeight, Loon.Core.Graphics.Opengl.LTexture.Format format) { this.field = field; this.maxWidth = mWidth; this.maxHeight = mHeight; this.offset = new Vector2f(0, 0); this.imgPack = new LTexturePack(); this.format = format; this.lastOffsetX = -1; this.lastOffsetY = -1; this.active = true; this.dirty = true; this.visible = true; imgPack.SetFormat(format); }