aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2019-04-19 19:32:46 +0900
committerDevine Lu Linvega <[email protected]>2019-04-19 19:32:46 +0900
commitc944138415808587a292fa6c7c33bfad438bf861 (patch)
tree807075e5b12448d53833ecc4e7ebd527484e1d99
parentf8ea994e6a13183492115a86f91499cc72b0fdae (diff)
downloadOrca-c944138415808587a292fa6c7c33bfad438bf861.tar.gz
Orca-c944138415808587a292fa6c7c33bfad438bf861.zip
Removed vanilla fillText
-rw-r--r--desktop/core/library.js4
-rw-r--r--desktop/sources/scripts/renderer.js21
2 files changed, 6 insertions, 19 deletions
diff --git a/desktop/core/library.js b/desktop/core/library.js
index ebcbf2d..8b9fffe 100644
--- a/desktop/core/library.js
+++ b/desktop/core/library.js
@@ -43,5 +43,7 @@ module.exports = {
';': require('./library/_udp'),
'=': require('./library/_osc'),
'^': require('./library/_cc'),
- '.': require('./library/_null')
+ '.': require('./library/_null'),
+ '+': require('./library/_null'),
+ '@': require('./library/_null')
}
diff --git a/desktop/sources/scripts/renderer.js b/desktop/sources/scripts/renderer.js
index 56cc42f..6c7d613 100644
--- a/desktop/sources/scripts/renderer.js
+++ b/desktop/sources/scripts/renderer.js
@@ -25,8 +25,6 @@ function Renderer (terminal) {
this.drawProgram()
this.drawInterface()
-
- this.spritesheet.print(this.context)
}
this.clear = function () {
@@ -80,18 +78,6 @@ function Renderer (terminal) {
}
this.drawSprite = function (x, y, g, type) {
- const style = this.drawStyle(type)
- if (style.bg) {
- const bgrect = { x: x * this.tile.w * this.scale, y: (y) * this.tile.h * this.scale, w: this.tile.w * this.scale, h: this.tile.h * this.scale }
- this.context.fillStyle = style.bg
- this.context.fillRect(bgrect.x, bgrect.y, bgrect.w, bgrect.h)
- }
- if (style.fg) {
- const fgrect = { x: (x + 0.5) * this.tile.w * this.scale, y: (y + 1) * this.tile.h * this.scale, w: this.tile.w * this.scale, h: this.tile.h * this.scale }
- this.context.fillStyle = style.fg
- this.context.fillText(g, fgrect.x, fgrect.y)
- }
-
this.spritesheet.draw(this.context, x, y, g, type)
}
@@ -236,15 +222,14 @@ function Spritesheet (terminal) {
return { x: x, y: y, w: w, h: h }
}
-
this.draw = function (context, x, y, glyph, type) {
- const rect = this.getRect(glyph, type)
- context.drawImage(this.el, rect.x, rect.y, this.tile.w * this.scale, this.tile.h * this.scale, x * this.tile.w * this.scale, 0, this.tile.w * this.scale, this.tile.h * this.scale)
+ const rect = this.getRect(glyph, type)
+ context.drawImage(this.el, rect.x, rect.y, this.tile.w * this.scale, this.tile.h * this.scale, x * this.tile.w * this.scale, y * this.tile.h * this.scale, this.tile.w * this.scale, this.tile.h * this.scale)
}
this.print = function (context) {
// context.drawImage(img,sx,sy,swidth,sheight,x,y,width,height);
- // context.drawImage(this.el, 0, 0, this.el.width, this.el.height, 0, 0, this.el.width, this.el.height)
+ context.drawImage(this.el, 0, 0, this.el.width, this.el.height, 0, 0, this.el.width, this.el.height)
}
}