This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function maskFrame(theFrame,maskChar,maskAttr) { | |
| var x, y, xl, yl; | |
| xl = theFrame.data.length; | |
| for (x=0; x<xl; x++) { | |
| yl = theFrame.data[x].length; | |
| for (y=0; y<yl; y++) { | |
| var theChar = theFrame.data[x][y]; | |
| if (theChar.ch == maskChar && theChar.attr == maskAttr) { | |
| theFrame.data[x][y].ch = undefined; | |
| theFrame.data[x][y].attr = undefined; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gamePlay() { | |
| player.sprite = new Sprite.Profile("girl-walking", bgFrame, 18, 9, 'e', 'stand'); | |
| // Mask the sprite. 219 = solid block. 2 = green | |
| maskFrame( player.sprite.frame, ascii(219), 2 ); | |
| player.sprite.frame.draw(); | |
| var userInput = ''; | |
| while( ascii(userInput) != 13 ) { | |
| userInput = console.getkey(K_UPPER | K_NOCRLF); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.scrollCircular = function(x,y) { | |
| var update = false; | |
| if (typeof y == "number" && y > 0 && settings.v_scroll) { | |
| for (var i=0; i<y; i++) { | |
| var rowToMove = properties.data.shift(); | |
| properties.data.push(rowToMove); | |
| update = true; | |
| } | |
| } |
NewerOlder