logo for the shell

This commit is contained in:
minjaesong
2020-09-30 18:30:25 +09:00
parent 516eced8e5
commit 084a9f7aab
8 changed files with 65 additions and 18 deletions

View File

@@ -20,7 +20,23 @@ GL.drawTexPattern = function(tex, x, y, width, height) {
}
}
};
/*
* Draws a texture verbatim - color of 255 will be written to the screen buffer
*/
GL.drawTexImage = function(tex, x, y) {
GL.drawTexPattern(tex, x, y, tex.width, tex.height);
};
/*
* Draws texture with blitting - color of 255 will pass-thru what's already on the screen buffer
*/
GL.drawTexImageOver = function(tex, x, y) {
for (var ty = 0; ty < tex.height; ty++) {
for (var tx = 0; tx < tex.width; tx++) {
var c = tex.texData[ty * tex.width + tx];
if (c != 255) {
graphics.plotPixel(x + tx, y + ty, c);
}
}
}
};
Object.freeze(GL);