Skip to content

Commit

Permalink
did stuff to make map editor work again, also made it have each tile …
Browse files Browse the repository at this point in the history
…be one pixel
  • Loading branch information
loglot committed Jan 17, 2025
1 parent e2f2333 commit a87110b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 27 deletions.
80 changes: 55 additions & 25 deletions lib/map-player/map/mapCarryers/Map.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/map-player/map/otherParts/MapEditor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const canvas = document.getElementById("game_screen");
const ctx = canvas.getContext("2d");
const playmapCanvas = document.getElementById("playMap");
const pmctx = playmapCanvas.getContext("2d");

export class Edit {

Expand Down Expand Up @@ -166,6 +168,8 @@ export class Edit {
} else{

this.game.map.mapBuffer[this.gridX][this.gridY]=this.selected
this.game.map.clearPixel(this.gridX,this.gridY)
this.game.map.changePixel(this.gridX,this.gridY,this.selected)
}
}
if(!this.saved){
Expand Down
3 changes: 1 addition & 2 deletions lib/variousParts/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export class Menu{
settingSelect=0
lastTick=false
preTick(){
this.game.map.makeMegaMap(25)
this.game.map.makeMegaMap(25)
this.game.map.makeMegaMap(1)
}
tick(){
var axes = []
Expand Down

0 comments on commit a87110b

Please sign in to comment.