From 59cd5f78fa894ff681a53b9031ea98afb8b28529 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Tue, 9 May 2017 22:43:42 -0400 Subject: [PATCH] updated presets --- presets/coleco/siegegame.c | 4 ++-- src/pixed/pixeleditor.js | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/presets/coleco/siegegame.c b/presets/coleco/siegegame.c index 1dcf12fe..991af2e6 100644 --- a/presets/coleco/siegegame.c +++ b/presets/coleco/siegegame.c @@ -132,8 +132,8 @@ void init_game() { memset(players, 0, sizeof(players)); players[0].head_attr = CHAR('1'); players[1].head_attr = CHAR('2'); - players[0].tail_attr = 254; - players[1].tail_attr = 254; + players[0].tail_attr = '~'; + players[1].tail_attr = '@'; frames_per_move = START_SPEED; } diff --git a/src/pixed/pixeleditor.js b/src/pixed/pixeleditor.js index 0d65c377..52022c42 100644 --- a/src/pixed/pixeleditor.js +++ b/src/pixed/pixeleditor.js @@ -1,7 +1,5 @@ "use strict"; -var palette; - function PixelEditor(parentDiv, fmt, palette, initialData, thumbnails) { var self = this; var width = fmt.w; @@ -295,6 +293,9 @@ function convertPaletteBytes(arr,r0,r1,g0,g1,b0,b1) { return result; } +var palette; +var paletteSets; +var paletteSetIndex=0; var currentPixelEditor; var parentSource; var parentOrigin; @@ -306,7 +307,6 @@ var currentPaletteFmt; var allthumbs; function pixelEditorDecodeMessage(e) { - console.log(e.data); parentSource = e.source; parentOrigin = e.origin; currentFormat = e.data.fmt; @@ -326,6 +326,14 @@ function pixelEditorDecodeMessage(e) { palette = convertPaletteBytes(palbytes, 0, rr, rr, gg, rr+gg, bb); else palette = convertPaletteBytes(palbytes, rr+gg, bb, rr, gg, 0, rr); + if (currentPaletteFmt.n) { + paletteSets = []; + for (var i=0; i