bees wip
This commit is contained in:
parent
b1f451710a
commit
b936a110ea
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.6 KiB |
|
@ -0,0 +1,4 @@
|
|||
move.w #$000,COLOR24(a6)
|
||||
move.w #$f00,COLOR25(a6)
|
||||
move.w #$0f0,COLOR26(a6)
|
||||
move.w #$00f,COLOR27(a6)
|
|
@ -52,24 +52,30 @@ ITEM_SPRITE_NUM_VERTICAL_SPRITES equ 6
|
|||
ITEM_SPRITE_VERTICAL_BYTES equ ((ITEM_SPRITE_HEIGHT*4)+4)
|
||||
ITEM_SPRITE_BYTES equ (ITEM_SPRITE_NUM_VERTICAL_SPRITES*ITEM_SPRITE_VERTICAL_BYTES)+4
|
||||
ITEM_SPRITE_VSTART equ 149
|
||||
ITEM_NUM_SLOTS equ (8*3)
|
||||
ITEM_NUM_BEES equ 2
|
||||
ITEM_NUM_SLOTS equ ((8*3)+ITEM_NUM_BEES)
|
||||
ITEM_SPRITE_HORIZONTAL_START_PIXELS equ 32
|
||||
ITEM_SPRITE_Y_COLLISION_OFFSET equ 1
|
||||
|
||||
ITEM_SPRITE_BEE_INDEX equ 24
|
||||
ITEM_SPRITE_ARROW_INDEX equ 16
|
||||
ITEM_SPRITE_COINB_INDEX equ 8
|
||||
|
||||
;item control struct offsets
|
||||
ITEM_X equ 0
|
||||
ITEM_LAGX equ 2
|
||||
ITEM_Y_OFFSET equ 2
|
||||
ITEM_Y equ 4
|
||||
ITEM_SPRITE equ 6
|
||||
ITEM_INDEX equ 8
|
||||
ITEM_SPRITE_ENABLED equ 10
|
||||
ITEM_SPRITE_ADDRESS equ 12
|
||||
ITEM_STRUCT_SIZE equ 16
|
||||
|
||||
ITEM_STRUCT_MULU_SHIFT equ 4
|
||||
ITEM_NUM_COIN_ANIMS equ 7
|
||||
|
||||
ITEM_Y_OFFSET_SHIFT_CONVERT equ 1
|
||||
BEE_COLLIDE_SIZE equ 5
|
||||
|
||||
BIGBANG_ANIM_DELAY equ 4
|
||||
BIGBANG_POST_DELAY equ 15
|
||||
|
|
|
@ -242,6 +242,8 @@ GameLoop:
|
|||
|
||||
Update:
|
||||
jsr UpdatePlayer
|
||||
jsr VerticalScrollBees
|
||||
jsr DetectBeeCollisions
|
||||
|
||||
.backgroundUpdates:
|
||||
add.l #BACKGROUND_SCROLL_PIXELS,backgroundScrollX
|
||||
|
@ -250,6 +252,7 @@ Update:
|
|||
beq .skipForegroundUpdates
|
||||
;; ---- Foreground updates ----------------------------------------
|
||||
.foregroundUpdates:
|
||||
|
||||
move.l foregroundScrollX,d0
|
||||
lsr.l #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||
andi.l #$f,d0
|
||||
|
@ -260,7 +263,7 @@ Update:
|
|||
add.l d0,foregroundScrollX
|
||||
|
||||
jsr ScrollSprites
|
||||
|
||||
|
||||
move.l foregroundScrollX,d0
|
||||
lsr.l #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||
andi.l #$f,d0
|
||||
|
@ -630,7 +633,6 @@ Level3InterruptHandler:
|
|||
InstallSpriteColorPalette:
|
||||
jsr InstallPlayerColorPalette
|
||||
include "out/sprite_coin-1-palette.s"
|
||||
include "out/sprite_arrow-1-palette.s"
|
||||
rts
|
||||
|
||||
|
||||
|
|
168
028.bs/items.s
168
028.bs/items.s
|
@ -9,13 +9,51 @@
|
|||
xdef InitialiseItems
|
||||
xdef SwitchItemSpriteBuffers
|
||||
xdef PrepareItemSpriteData
|
||||
xdef VerticalScrollBees
|
||||
xdef DetectBeeCollisions
|
||||
|
||||
DeleteItemSprite:
|
||||
move.w #0,ITEM_SPRITE(a1)
|
||||
move.w #0,ITEM_X(a1)
|
||||
move.w #0,ITEM_LAGX(a1)
|
||||
move.w #0,ITEM_Y_OFFSET(a1)
|
||||
move.w ITEM_Y(a1),d2
|
||||
rts
|
||||
|
||||
VerticalScrollBees:
|
||||
lea item25,a1
|
||||
move.w #ITEM_NUM_BEES-1,d6
|
||||
.loop:
|
||||
cmp.w #0,ITEM_SPRITE(a1)
|
||||
beq .done
|
||||
move.w ITEM_Y(a1),d4
|
||||
mulu.w #ITEM_SPRITE_SPACING,d4
|
||||
add.w #ITEM_SPRITE_VSTART,d4
|
||||
lsl.w #ITEM_Y_OFFSET_SHIFT_CONVERT,d4
|
||||
move.w ITEM_Y_OFFSET(a1),d0
|
||||
add.w d0,d4
|
||||
cmp.w #1,beeMovingDown
|
||||
bne .up
|
||||
.down:
|
||||
add.w #1,d0
|
||||
bra .c1
|
||||
.up:
|
||||
sub.w #1,d0
|
||||
.c1:
|
||||
move.w d0,ITEM_Y_OFFSET(a1)
|
||||
cmp.w #(ITEM_SPRITE_VSTART+(16*5))<<ITEM_Y_OFFSET_SHIFT_CONVERT,d4
|
||||
bge .beeAtBottom
|
||||
cmp.w #0,d0
|
||||
ble .beeAtTop
|
||||
bra .done
|
||||
.beeAtTop:
|
||||
move.w #1,beeMovingDown
|
||||
bra .done
|
||||
.beeAtBottom:
|
||||
move.w #0,beeMovingDown
|
||||
.done:
|
||||
add.l #ITEM_STRUCT_SIZE,a1
|
||||
dbra d6,.loop
|
||||
rts
|
||||
|
||||
ScrollItemSprites:
|
||||
move.w #ITEM_NUM_SLOTS-1,d1
|
||||
|
@ -29,7 +67,7 @@ ScrollItemSprites:
|
|||
bgt .skip
|
||||
move.w #0,ITEM_SPRITE(a1)
|
||||
move.w #0,ITEM_X(a1)
|
||||
move.w #0,ITEM_LAGX(a1)
|
||||
move.w #0,ITEM_Y_OFFSET(a1)
|
||||
move.w ITEM_Y(a1),d2
|
||||
.skip:
|
||||
add.l #ITEM_STRUCT_SIZE,a1 ; multiply by 16 (item control structure size)
|
||||
|
@ -37,7 +75,7 @@ ScrollItemSprites:
|
|||
rts
|
||||
|
||||
DetectItemCollisions:
|
||||
move.w #ITEM_NUM_SLOTS-1,d1
|
||||
move.w #ITEM_NUM_SLOTS-ITEM_NUM_BEES-1,d1
|
||||
lea item1,a1
|
||||
.loop:
|
||||
cmp.w #0,ITEM_SPRITE_ENABLED(a1)
|
||||
|
@ -79,6 +117,59 @@ DetectItemCollisions:
|
|||
rts
|
||||
|
||||
|
||||
DetectBeeCollisions:
|
||||
lea item25,a1
|
||||
move.w #ITEM_NUM_BEES-1,d7
|
||||
.loop:
|
||||
cmp.w #0,ITEM_SPRITE_ENABLED(a1)
|
||||
beq .skip
|
||||
cmp.w #0,ITEM_SPRITE(a1)
|
||||
beq .skip
|
||||
move.w spriteX,d2
|
||||
move.w ITEM_X(a1),d3
|
||||
move.w ITEM_Y(a1),d4
|
||||
mulu.w #ITEM_SPRITE_SPACING,d4
|
||||
add.w #ITEM_SPRITE_VSTART,d4
|
||||
move.w ITEM_Y_OFFSET(a1),d5
|
||||
lsr.l #ITEM_Y_OFFSET_SHIFT_CONVERT,d5
|
||||
add.w d5,d4
|
||||
lsr.w #FOREGROUND_SCROLL_SHIFT_CONVERT,d3 ; convert to pixels
|
||||
add.w #ITEM_SPRITE_HORIZONTAL_START_PIXELS,d3
|
||||
move.w spriteY,d5
|
||||
;; d2 = playerX pixels
|
||||
;; d3 = beeX pixels
|
||||
;; d4 = beeY pixels
|
||||
;; d5 = player Y pixels
|
||||
|
||||
|
||||
move.w d3,d6
|
||||
add.w #BEE_COLLIDE_SIZE,d6
|
||||
cmp.w d2,d6 ; r1.x >= r2.x+w
|
||||
ble .skip
|
||||
|
||||
move.w d2,d6
|
||||
add.w #BEE_COLLIDE_SIZE,d6
|
||||
cmp.w d3,d6 ; r1.x+w <= r2.x
|
||||
ble .skip
|
||||
|
||||
move.w d4,d6
|
||||
add.w #BEE_COLLIDE_SIZE,d6
|
||||
cmp.w d5,d6 ; r1.y >= r2.y+h
|
||||
ble .skip
|
||||
|
||||
move.w d5,d6
|
||||
add.w #BEE_COLLIDE_SIZE,d6
|
||||
cmp.w d4,d6 ; r1.y+h < r2.y
|
||||
ble .skip
|
||||
|
||||
bsr DeleteItemSprite
|
||||
jmp BigBang
|
||||
.skip:
|
||||
add.w #ITEM_STRUCT_SIZE,a1
|
||||
dbra d7,.loop
|
||||
rts
|
||||
|
||||
|
||||
RenderCoinScore:
|
||||
lea coinCounterText,a1
|
||||
move.w #31,d0
|
||||
|
@ -95,7 +186,6 @@ ResetItems:
|
|||
.loop1:
|
||||
move.w #0,ITEM_SPRITE(a1)
|
||||
move.w #0,ITEM_X(a1)
|
||||
move.w #0,ITEM_LAGX(a1)
|
||||
move.w ITEM_Y(a1),d2
|
||||
add.l #ITEM_STRUCT_SIZE,a1 ; multiply by 16 (item control structure size)
|
||||
dbra d1,.loop1
|
||||
|
@ -112,7 +202,6 @@ SwitchItemSpriteBuffers:
|
|||
move.w d1,d0
|
||||
lea item1,a1
|
||||
.loop:
|
||||
move.w ITEM_X(a1),ITEM_LAGX(a1)
|
||||
adda.l #ITEM_STRUCT_SIZE,a1
|
||||
dbra d1,.loop
|
||||
rts
|
||||
|
@ -124,6 +213,7 @@ PrepareItemSpriteData:
|
|||
move.l #deadSprite,sprite2Pointer
|
||||
move.l #deadSprite,sprite3Pointer
|
||||
move.l #deadSprite,sprite4Pointer
|
||||
move.l #deadSprite,sprite5Pointer
|
||||
rts
|
||||
|
||||
.enableSprites:
|
||||
|
@ -137,6 +227,7 @@ SetupItemSpriteData:
|
|||
move.l sprite2Pointer,SPR2PTH(a6)
|
||||
move.l sprite3Pointer,SPR3PTH(a6)
|
||||
move.l sprite4Pointer,SPR4PTH(a6)
|
||||
move.l sprite5Pointer,SPR5PTH(a6)
|
||||
cmp.w #0,spriteBufferIndex
|
||||
beq .zero
|
||||
move.w #0,spriteBufferIndex
|
||||
|
@ -157,7 +248,7 @@ _SetupItemSpriteData:
|
|||
|
||||
cmpi.w #0,ITEM_SPRITE_ENABLED(a1)
|
||||
beq .spriteIsNotEnabled
|
||||
|
||||
|
||||
move.w ITEM_Y(a1),d2
|
||||
move.l ITEM_SPRITE_ADDRESS(a1),a0
|
||||
|
||||
|
@ -182,7 +273,6 @@ _SetupItemSpriteData:
|
|||
add.l d2,a0
|
||||
|
||||
move.w ITEM_X(a1),d0
|
||||
;; move.w ITEM_LAGX(a1),d0
|
||||
lsr.w #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
|
||||
|
||||
add.w #ITEM_SPRITE_HORIZONTAL_START_PIXELS,d0
|
||||
|
@ -192,9 +282,25 @@ _SetupItemSpriteData:
|
|||
lsr.l #1,d0
|
||||
move.b d0,1(a0) ;spriteHStart
|
||||
|
||||
move.w ITEM_Y_OFFSET(a1),d1
|
||||
cmp.w #0,d1
|
||||
;; beq .noYOffset
|
||||
|
||||
move.w ITEM_Y(a1),d0
|
||||
mulu.w #16,d0
|
||||
lsr.w #ITEM_Y_OFFSET_SHIFT_CONVERT,d1
|
||||
add.w d1,d0
|
||||
add.w #ITEM_SPRITE_VSTART,d0
|
||||
move.b d0,(a0) ; spriteVStart
|
||||
add.w #ITEM_SPRITE_HEIGHT,d0
|
||||
move.b d0,2(a0) ; spriteVStart
|
||||
|
||||
.noYOffset:
|
||||
.c1:
|
||||
|
||||
sub.l d2,a0 ;#1*ITEM_SPRITE_VERTICAL_BYTES,a0
|
||||
cmp.b #ITEM_SPRITE_BEE_INDEX,d4
|
||||
bge .beeSprite
|
||||
cmp.b #ITEM_SPRITE_ARROW_INDEX,d4
|
||||
bge .arrowSprite
|
||||
cmp.b #ITEM_SPRITE_COINB_INDEX,d4
|
||||
|
@ -207,6 +313,15 @@ _SetupItemSpriteData:
|
|||
bra .done
|
||||
.arrowSprite:
|
||||
move.l a0,sprite4Pointer
|
||||
cmp.w #0,ITEM_X(a1)
|
||||
beq .done
|
||||
bsr InstallArrowPalette
|
||||
bra .done
|
||||
.beeSprite:
|
||||
move.l a0,sprite5Pointer
|
||||
cmp.w #0,ITEM_X(a1)
|
||||
beq .done
|
||||
bsr InstallBeePalette
|
||||
bra .done
|
||||
|
||||
.done:
|
||||
|
@ -243,8 +358,8 @@ GetSpriteSlot:
|
|||
move.w #336<<FOREGROUND_SCROLL_SHIFT_CONVERT,ITEM_X(a1)
|
||||
sub.l #1,d2
|
||||
move.w d2,ITEM_Y(a1)
|
||||
move.w ITEM_X(a1),ITEM_LAGX(a1)
|
||||
|
||||
move.w #0,ITEM_Y_OFFSET(a1)
|
||||
|
||||
add.w #1,d1
|
||||
move.w d1,ITEM_SPRITE(a1)
|
||||
|
||||
|
@ -255,6 +370,14 @@ dontAddSprite:
|
|||
EnableItemSprites:
|
||||
move.l #1,itemSpritesEnabled
|
||||
rts
|
||||
|
||||
InstallBeePalette:
|
||||
include "bee-palette.s"
|
||||
rts
|
||||
|
||||
InstallArrowPalette:
|
||||
include "out/sprite_arrow-1-palette.s"
|
||||
rts
|
||||
|
||||
itemSpritesEnabled:
|
||||
dc.l 0
|
||||
|
@ -267,7 +390,11 @@ sprite2Pointer:
|
|||
sprite3Pointer:
|
||||
dc.l 0
|
||||
sprite4Pointer:
|
||||
dc.l 0
|
||||
dc.l 0
|
||||
sprite5Pointer:
|
||||
dc.l 0
|
||||
beeMovingDown:
|
||||
dc.w 1
|
||||
|
||||
;; coinA
|
||||
ItemControl item1,spriteCoinA1,1
|
||||
|
@ -299,6 +426,14 @@ sprite4Pointer:
|
|||
ItemControl item23,spriteArrow1,0
|
||||
ItemControl item24,spriteArrow1,0
|
||||
|
||||
;; bee
|
||||
ItemControl item25,spriteBee1,1
|
||||
ItemControl item26,spriteBee1,1
|
||||
if 0
|
||||
ItemControl item27,spriteArrow1,1
|
||||
ItemControl item28,spriteArrow1,1
|
||||
endif
|
||||
|
||||
ItemSprite spriteCoinA1,sprite_coin-0.bin
|
||||
ItemSprite spriteCoinA2,sprite_coin-0.bin
|
||||
ItemSprite spriteCoinA3,sprite_coin-1.bin
|
||||
|
@ -324,7 +459,18 @@ sprite4Pointer:
|
|||
ItemSprite spriteArrow5,sprite_arrow-3.bin
|
||||
ItemSprite spriteArrow6,sprite_arrow-2.bin
|
||||
ItemSprite spriteArrow7,sprite_arrow-1.bin
|
||||
ItemSprite spriteArrow8,sprite_arrow-1.bin
|
||||
ItemSprite spriteArrow8,sprite_arrow-1.bin
|
||||
|
||||
ItemSprite spriteBee1,sprite_arrow-1.bin
|
||||
ItemSprite spriteBee2,sprite_arrow-2.bin
|
||||
ItemSprite spriteBee3,sprite_arrow-3.bin
|
||||
ItemSprite spriteBee4,sprite_arrow-1.bin
|
||||
ItemSprite spriteBee5,sprite_arrow-2.bin
|
||||
ItemSprite spriteBee6,sprite_arrow-3.bin
|
||||
ItemSprite spriteBee7,sprite_arrow-1.bin
|
||||
ItemSprite spriteBee8,sprite_arrow-2.bin
|
||||
|
||||
|
||||
|
||||
nextSpriteSlot:
|
||||
dc.w 0
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</layer>
|
||||
<layer name="items" width="100" height="8">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJztld0OwiAMheHRlE1R5yRR3/9VlESSjgD9ARcu+C7Z6Wl7ejGlBj1x1PyaA7HGaV6PoLsKZsI896JFP59vKWOjt1qJP/S4IB63yp1Mg0ykHpS6J6IJGVOyhrebMvol857Tx5Tu9arIOjeXFMo+0ize3+/zL2sLtC6qg/dwjDsGZoIW9qTo74TdesXvF8+P5WkJN+FwQmokni36r4l3bNYSKT+pJ/c/wc3wXND/+x61PDqfb9CODwNcEqE=
|
||||
eJztlUsOgzAMRMnRCrRAv5FaNnD/e1SRqORG8S9OKQveBilMxvZYgqra2RK1S59PyHngQLyDeEfXwHo5C/Uaz7UoUS/kS2XcuG9tjj/0GBiPi3GmpkAmuR6Se09G88lYkjXcXbs85+jeFfFphTNS+3oZssb6ykUyjyWL45J1D7Q+ugf34RV7hDU4YE2J/sZoxpW/WRrCfHH/XJ69YCcaTo7+P+V4auunuCfOMa2ElJ/V81d0f9yHlcfG+9spxxtPYBLK
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
|
|
|
@ -84,7 +84,7 @@ ItemControl: macro
|
|||
\1:
|
||||
.itemX:
|
||||
dc.w 0
|
||||
.itemLagX:
|
||||
.itemYOffset:
|
||||
dc.w 0
|
||||
.itemY:
|
||||
dc.w 0
|
||||
|
|
|
@ -250,7 +250,6 @@ SetupSpriteData:
|
|||
jsr SetupItemSpriteData
|
||||
|
||||
move.l #deadSprite,SPR1PTH(a6) ; unused - could only use if sprite resused player sprite palette
|
||||
move.l #deadSprite,SPR5PTH(a6) ; unused - we only allow one arrow per line per screen
|
||||
move.l #deadSprite,SPR6PTH(a6) ; unused - incompatible with oversize playfield data fetch
|
||||
move.l #deadSprite,SPR7PTH(a6) ; unused - incompatible with oversize playfield data fetch
|
||||
rts
|
||||
|
|
|
@ -15,6 +15,7 @@ PlayNextSound:
|
|||
xdef PlayChachingSound
|
||||
xdef PlayWhooshSound
|
||||
xdef PlayYaySound
|
||||
xdef PlayZapSound
|
||||
|
||||
PlayJumpSound:
|
||||
lea jump(pc),a1
|
||||
|
@ -64,7 +65,17 @@ PlayYaySound:
|
|||
move.w #64,AUD3VOL(a6)
|
||||
move.w #(endYay-yay)/2,AUD3LEN(a6) ;Set length in words
|
||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||
rts
|
||||
rts
|
||||
|
||||
PlayZapSound:
|
||||
KillSound
|
||||
lea zap,a1
|
||||
move.l a1,AUD3LCH(a6)
|
||||
move.w #124,AUD3PER(a6)
|
||||
move.w #64,AUD3VOL(a6)
|
||||
move.w #(endZap-zap)/2,AUD3LEN(a6) ;Set length in words
|
||||
move.w #(DMAF_AUD3|DMAF_SETCLR),DMACON(a6)
|
||||
rts
|
||||
|
||||
align 4
|
||||
jump:
|
||||
|
@ -85,7 +96,12 @@ endWhoosh:
|
|||
align 4
|
||||
yay:
|
||||
incbin "out/yay.raw"
|
||||
endYay:
|
||||
endYay:
|
||||
zap:
|
||||
;; incbin "out/zap.raw"
|
||||
incbin "out/yay.raw"
|
||||
endZap:
|
||||
align 4
|
||||
|
||||
align 2
|
||||
emptySound:
|
||||
|
|
|
@ -76,12 +76,12 @@ palette_output(imagecon_image_t* ic, char* outFilename)
|
|||
paletteGreyPaletteFP = file_openWrite("%s-grey.pal", outFilename);
|
||||
paletteGreyTableFP = file_openWrite("%s-grey-table.s", outFilename);
|
||||
paletteGreyCopperFP = file_openWrite("%s-grey-copper.s", outFilename);
|
||||
fprintf(paletteGreyFP, "\tmovem.l d0-a6,-(sp)\n\tlea CUSTOM,a6\n");
|
||||
// fprintf(paletteGreyFP, "\tmovem.l d0-a6,-(sp)\n\tlea CUSTOM,a6\n");
|
||||
}
|
||||
|
||||
if (config.outputPaletteAsm) {
|
||||
paletteAsmFP = file_openWrite("%s-palette.s", outFilename);
|
||||
fprintf(paletteAsmFP, "\tmovem.l d0-a6,-(sp)\n\tlea CUSTOM,a6\n");
|
||||
// fprintf(paletteAsmFP, "\tmovem.l d0-a6,-(sp)\n\tlea CUSTOM,a6\n");
|
||||
}
|
||||
|
||||
if (config.verbose) {
|
||||
|
@ -106,12 +106,12 @@ palette_output(imagecon_image_t* ic, char* outFilename)
|
|||
}
|
||||
}
|
||||
if (paletteAsmFP) {
|
||||
fprintf(paletteAsmFP, "\tlea COLOR%02d(a6),a0\n\tmove.w #$%03x,(a0)\n", i+config.paletteOffset, RGB24TORGB12(ic->palette[i].r) << 8 | RGB24TORGB12(ic->palette[i].g) << 4 | RGB24TORGB12(ic->palette[i].b));
|
||||
fprintf(paletteAsmFP, "\tmove.w #$%03x,COLOR%02d(a6)\n", RGB24TORGB12(ic->palette[i].r) << 8 | RGB24TORGB12(ic->palette[i].g) << 4 | RGB24TORGB12(ic->palette[i].b), i+config.paletteOffset);
|
||||
}
|
||||
if (paletteGreyFP) {
|
||||
// TODO: this is for compat, can be better
|
||||
unsigned grey = ((RGB24TORGB12(ic->palette[i].r) + RGB24TORGB12(ic->palette[i].g) + RGB24TORGB12(ic->palette[i].b))/3);
|
||||
fprintf(paletteGreyFP, "\tlea COLOR%02d(a6),a0\n\tmove.w #$%03x,(a0)\n", i, grey << 8 | grey << 4 | grey);
|
||||
fprintf(paletteGreyFP, "\tmove.w #$%03x,COLOR%02d(a6)\n", grey << 8 | grey << 4 | grey, i);
|
||||
grey = (((ic->palette[i].r) + (ic->palette[i].g) + (ic->palette[i].b))/3);
|
||||
fprintf(paletteGreyPaletteFP, "%03d %03d %03d 255\n", grey, grey, grey);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ palette_output(imagecon_image_t* ic, char* outFilename)
|
|||
}
|
||||
|
||||
if (paletteGreyFP) {
|
||||
fprintf(paletteGreyFP, "\tmovem.l (sp)+,d0-a6\n");
|
||||
// fprintf(paletteGreyFP, "\tmovem.l (sp)+,d0-a6\n");
|
||||
fclose(paletteGreyFP);
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ palette_output(imagecon_image_t* ic, char* outFilename)
|
|||
}
|
||||
|
||||
if (paletteAsmFP) {
|
||||
fprintf(paletteAsmFP, "\tmovem.l (sp)+,d0-a6\n");
|
||||
// fprintf(paletteAsmFP, "\tmovem.l (sp)+,d0-a6\n");
|
||||
fclose(paletteFP);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue