37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
import com.danitheskunk.skunkworks.*;
|
|
|
|
public class Test {
|
|
public static void main(String[] args) {
|
|
var engine = new Engine();
|
|
var window = engine.openWindow(new Vec2i(1280, 720), "Skunkworks");
|
|
var img = engine.loadImage("C:\\Users\\dani\\Videos\\Screenshot 2022-06-25 17-00-59.png");
|
|
var tex2 = window.loadTexture("C:\\art\\pixel stuff.png");
|
|
var tileset = window.loadTextureArray("C:\\stream\\coding\\rlc\\tilemap.png", new Vec2i(16, 16));
|
|
var font = window.loadFontTileset("EGA8x14.png");
|
|
//img.drawImage(img2, Vec2i.ZERO);
|
|
var tex = window.loadTexture(img);
|
|
window.setDebug(false);
|
|
|
|
while(!window.shouldClose()) {
|
|
window.tick();
|
|
var renderContext = window.renderStart();
|
|
renderContext.drawTextureRectangle(
|
|
new Recti(0, 0, 1280, 720),
|
|
tex
|
|
);
|
|
renderContext.drawTextureRectangle(
|
|
new Recti(new Vec2i(200, 100), tex2.getSize()),
|
|
tex2
|
|
);
|
|
|
|
renderContext.drawTextureRectangle(
|
|
new Recti(new Vec2i(400, 400), new Vec2i(16, 16)),
|
|
tileset.get(0x30)
|
|
);
|
|
|
|
renderContext.drawString(new Vec2i(100, 100), "hello world mew", font);
|
|
window.renderFinish(renderContext);
|
|
}
|
|
}
|
|
}
|