cleaned up background, multiple palettes

This commit is contained in:
Thorn Avery 2020-05-31 16:08:57 +12:00
parent 5a14e2f17f
commit ad72f02c91
8 changed files with 59 additions and 95 deletions

5
ass/grass.ass Normal file
View File

@ -0,0 +1,5 @@
SECTION "Grass Tile", ROM0
grassTiles::
DB $00,$00,$00,$00,$20,$00,$02,$00
DB $04,$00,$44,$00,$20,$00,$00,$00
grassTilesEnd::

View File

@ -5,25 +5,25 @@ DB $1F,$18,$3F,$20,$7F,$48,$74,$57
DB $26,$25,$0E,$09,$0E,$0A,$1E,$12
DB $F8,$18,$FC,$04,$FE,$12,$2E,$EA
DB $64,$A4,$70,$90,$70,$50,$78,$48
DB $0F,$08,$1F,$12,$1D,$14,$1F,$10
DB $0F,$08,$1F,$12,$1D,$16,$1F,$10
DB $0F,$09,$07,$04,$03,$02,$07,$04
DB $F0,$10,$F8,$48,$B8,$28,$F8,$08
DB $F0,$10,$F8,$48,$B8,$68,$F8,$08
DB $F0,$90,$E0,$20,$C0,$40,$E0,$20
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $01,$01,$03,$02,$03,$02,$07,$04
DB $00,$00,$00,$00,$00,$00,$00,$00
DB $80,$80,$C0,$40,$C0,$40,$E0,$20
DB $0F,$08,$1F,$10,$1F,$12,$1D,$14
DB $0F,$08,$1F,$10,$1F,$12,$1D,$16
DB $0F,$08,$07,$05,$03,$02,$07,$04
DB $F0,$10,$F8,$08,$F8,$48,$B8,$28
DB $F0,$10,$F8,$08,$F8,$48,$B8,$68
DB $F0,$10,$E0,$A0,$C0,$40,$E0,$20
DB $07,$04,$1F,$18,$3F,$20,$7C,$4F
DB $76,$55,$2E,$29,$0E,$0A,$1E,$12
DB $E0,$20,$F8,$18,$FC,$04,$3E,$F2
DB $6E,$AA,$74,$94,$70,$50,$78,$48
DB $0F,$08,$1F,$12,$1D,$14,$1F,$10
DB $0F,$08,$1F,$12,$1D,$16,$1F,$10
DB $0F,$09,$07,$04,$03,$02,$1F,$1C
DB $F0,$10,$F8,$48,$B8,$28,$F8,$08
DB $F0,$10,$F8,$48,$B8,$68,$F8,$08
DB $F0,$90,$E0,$20,$C0,$40,$F8,$38
DB $3F,$20,$7F,$48,$77,$54,$24,$27
DB $06,$05,$0E,$09,$0E,$0A,$1E,$12

Binary file not shown.

View File

@ -68,8 +68,8 @@ VillagerWaving::
db (.vwFrame01End - @) / 4
db 8, -16, 17, 0
db 8, -8, 18, 0
db 0, -16, 19, 0
db 0, -8, 20, 0
db 0, -16, 19, OAMF_PAL1
db 0, -8, 20, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame01End
@ -78,8 +78,8 @@ VillagerWaving::
db (.vwFrame02End - @) / 4
db 8, -16, 17, 0
db 8, -8, 18, 0
db 0, -16, 23, 0
db 0, -8, 24, 0
db 0, -16, 23, OAMF_PAL1
db 0, -8, 24, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame02End
@ -88,8 +88,8 @@ VillagerWaving::
db (.vwFrame03End - @) / 4
db 8, -16, 25, 0
db 8, -8, 26, 0
db 0, -16, 23, 0
db 0, -8, 24, 0
db 0, -16, 23, OAMF_PAL1
db 0, -8, 24, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame03End
@ -98,8 +98,8 @@ VillagerWaving::
db (.vwFrame04End - @) / 4
db 8, -16, 17, 0
db 8, -8, 18, 0
db 0, -16, 23, 0
db 0, -8, 24, 0
db 0, -16, 23, OAMF_PAL1
db 0, -8, 24, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame04End
@ -108,8 +108,8 @@ VillagerWaving::
db (.vwFrame05End - @) / 4
db 8, -16, 17, 0
db 8, -8, 18, 0
db 0, -16, 19, 0
db 0, -8, 20, 0
db 0, -16, 19, OAMF_PAL1
db 0, -8, 20, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame05End
@ -118,8 +118,8 @@ VillagerWaving::
db (.vwFrame06End - @) / 4
db 8, -16, 29, 0
db 8, -8, 30, 0
db 0, -16, 27, 0
db 0, -8, 28, 0
db 0, -16, 27, OAMF_PAL1
db 0, -8, 28, OAMF_PAL1
db -8, -16, 21, 0
db -8, -8, 22, 0
.vwFrame06End

View File

@ -17,10 +17,11 @@ Start:
call Clear_Map
call Clear_OAM
call Load_Tiles
; call Load_Map
call Load_Map
ld a, %11100100
ld [rBGP], a
ld [rOBP0], a
ld a, %11000100
ld [rOBP1], a
xor a
ld [rSCY], a
@ -29,23 +30,24 @@ Start:
call CopyDMARoutine
ld a, 100
ld a, $3F
ld [Player_YPos], a
ld a, 40
ld a, $3A
ld [Player_XPos], a
ld a, $FF
ld [Player_GFXCounter], a
xor a
ld a, 1
ld [Player_GFXState], a
xor a
ld [Player_TileData], a
ld a, HIGH(ActorROM)
ld [Player_GFXData+1], a
ld a, LOW(ActorROM)
ld [Player_GFXData], a
ld a, 24
ld a, $71
ld [NPC01_YPos], a
ld a, 24
ld a, $8C
ld [NPC01_XPos], a
ld a, 20
ld [NPC01_GFXCounter], a
@ -58,56 +60,60 @@ Start:
ld a, LOW(ActorROM)
ld [NPC01_GFXData], a
ld a, 48
ld a, $15
ld [NPC02_YPos], a
ld a, 48
ld a, $1C
ld [NPC02_XPos], a
ld a, 30
ld [NPC02_GFXCounter], a
xor a
ld a, 1
ld [NPC02_GFXState], a
xor a
ld [NPC02_TileData], a
ld a, HIGH(ActorROM)
ld [NPC02_GFXData+1], a
ld a, LOW(ActorROM)
ld [NPC02_GFXData], a
ld a, 72
ld a, $29
ld [NPC03_YPos], a
ld a, 72
ld a, $90
ld [NPC03_XPos], a
ld a, 40
ld [NPC03_GFXCounter], a
xor a
ld a, 1
ld [NPC03_GFXState], a
xor a
ld [NPC03_TileData], a
ld a, HIGH(ActorROM)
ld [NPC03_GFXData+1], a
ld a, LOW(ActorROM)
ld [NPC03_GFXData], a
ld a, 96
ld a, $71
ld [NPC04_YPos], a
ld a, 96
ld a, $4F
ld [NPC04_XPos], a
ld a, 50
ld [NPC04_GFXCounter], a
xor a
ld a, 1
ld [NPC04_GFXState], a
xor a
ld [NPC04_TileData], a
ld a, HIGH(ActorROM)
ld [NPC04_GFXData+1], a
ld a, LOW(ActorROM)
ld [NPC04_GFXData], a
ld a, 130
ld a, $4A
ld [NPC05_YPos], a
ld a, 130
ld a, $67
ld [NPC05_XPos], a
ld a, 10
ld a, $FF
ld [NPC05_GFXCounter], a
xor a
ld a, 1
ld [NPC05_GFXState], a
xor a
ld [NPC05_TileData], a
ld a, HIGH(ActorROM)
ld [NPC05_GFXData+1], a

View File

@ -2,6 +2,7 @@ INCLUDE "inc/hardware.inc"
INCLUDE "inc/structs.asm"
INCLUDE "ass/parecivo.ass"
INCLUDE "ass/tiles.ass"
INCLUDE "ass/grass.ass"
INCLUDE "ass/villager.ass"
INCLUDE "ass/map.ass"
INCLUDE "src/animation.asm"

View File

@ -82,6 +82,10 @@ Clear_Map:
ret
Load_Tiles:
ld hl, _BGTILES
ld de, grassTiles
ld bc, grassTilesEnd - grassTiles
call MemCpy
ld hl, _VRAM
ld de, parecivo_tile_data
ld bc, parecivo_tile_data_size
@ -92,9 +96,11 @@ Load_Tiles:
ret
Load_Map:
xor a
ld hl, _SCRN0
ld de, Map
ld bc, Map_Size
call MemCpy
ld c, 0
.loop
ld [hl], a
dec c
jr nz, .loop
ret

View File

@ -1,54 +0,0 @@
PlayerGfx::
INCLUDE "res/actors/player.pal.asm" ; CGB palette
db OAMF_PAL1 ; Additional attr
dw PlayerTiles
PlayerTiles:
; number of tiles:
db (.displayStructs - .tiles) / 16
.tiles
INCBIN "res/actors/player.2bpp"
.displayStructs
dw PlayerStandingUp
dw PlayerWalkingUp
dw PlayerStandingDown
dw PlayerWalkingDown
dw PlayerStandingLeft
dw PlayerWalkingLeft
dw PlayerStandingRight
dw PlayerWalkingRight
PlayerWalkingDown:
db $20
db 8
dw .frame0
db 8
dw .frame1
db 8
dw .frame0
db 8
dw .frame2
.frame0
db (.frame0End - @) / 4
db -31, -8, 0, 0
db -15, -8, 2, 0
db -31, 0, 4, 0
db -15, 0, 6, 0
.frame0End
.frame1
db (.frame1End - @) / 4
db -31, -8, 8, 0
db -15, -8, 10, 0
db -31, 0, 12, 0
db -15, 0, 14, 0
.frame1End
.frame2
db (.frame2End - @) / 4
db -31, -8, 16, 0
db -15, -8, 18, 0
db -31, 0, 20, 0
db -15, 0, 22, 0
.frame2End