Skip to content

Commit

Permalink
Tournament Ingame statistics
Browse files Browse the repository at this point in the history
Added drought, burn, and tetris rate. Added a 100 spanning just 2 tiles
and arrows depicting the leader.
  • Loading branch information
TGGC authored Feb 9, 2020
1 parent 88045e0 commit ae5cbe3
Show file tree
Hide file tree
Showing 6 changed files with 679 additions and 37 deletions.
19 changes: 19 additions & 0 deletions tournament.romlayout.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
TRATE_P1 = 0
TRATE_P2 = 1
BURN_P1 = 2
BURN_P2 = 3
DROUGHT_P1 = 4
DROUGHT_P2 = 5
SCORELEAD = 6 ; 3-byte bcd number
LEADERID = 9 ; id of leading player

;this should be stored in zeropage for a bit faster access
tournamentRenderFlags = $07
tournamentRenderFlagsLeadArrow = $01
tournamentRenderFlagsLead = $02
tournamentRenderFlagsTetrisRate = $04
tournamentRenderFlagsBurn = $08
tournamentRenderFlagsDrought = $10
tournamentCalcFlagsTetrisRate = $20
tournamentTmp4 = $10
tournamentTmp5 = $11
43 changes: 43 additions & 0 deletions tournament.screenlayout.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,32 @@ INGAME_LAYOUT_P1_PREVIEW_Y = 3*8
INGAME_LAYOUT_P2_PREVIEW_X = 24*8
INGAME_LAYOUT_P2_PREVIEW_Y = 3*8

INGAME_LAYOUT_P1_TRT_X = 13
INGAME_LAYOUT_P1_TRT_Y = 8

INGAME_LAYOUT_P2_TRT_X = 17
INGAME_LAYOUT_P2_TRT_Y = 8

INGAME_LAYOUT_P1_BURN_X = 13
INGAME_LAYOUT_P1_BURN_Y = 11

INGAME_LAYOUT_P2_BURN_X = 17
INGAME_LAYOUT_P2_BURN_Y = 11

INGAME_LAYOUT_P1_DROUGHT_X = 13
INGAME_LAYOUT_P1_DROUGHT_Y = 14

INGAME_LAYOUT_P2_DROUGHT_X = 17
INGAME_LAYOUT_P2_DROUGHT_Y = 14

INGAME_LAYOUT_LEAD_X = 13
INGAME_LAYOUT_LEAD_Y = 17

INGAME_LAYOUT_P1_ARROW_X = 13
INGAME_LAYOUT_P1_ARROW_Y = 18

INGAME_LAYOUT_P2_ARROW_X = 17
INGAME_LAYOUT_P2_ARROW_Y = 18

INGAME_LAYOUT_P1_LEVEL= ($2000+INGAME_LAYOUT_P1_LEVEL_X+INGAME_LAYOUT_P1_LEVEL_Y*32)
INGAME_LAYOUT_P2_LEVEL= ($2000+INGAME_LAYOUT_P2_LEVEL_X+INGAME_LAYOUT_P2_LEVEL_Y*32)
Expand All @@ -32,3 +57,21 @@ INGAME_LAYOUT_P2_LINES= ($2000+INGAME_LAYOUT_P2_LINES_X+INGAME_LAYOUT_P2_LINES_Y

INGAME_LAYOUT_P1_SCORE= ($2000+INGAME_LAYOUT_P1_SCORE_X+INGAME_LAYOUT_P1_SCORE_Y*32)
INGAME_LAYOUT_P2_SCORE= ($2000+INGAME_LAYOUT_P2_SCORE_X+INGAME_LAYOUT_P2_SCORE_Y*32)

INGAME_LAYOUT_P1_TRT= ($2000+INGAME_LAYOUT_P1_TRT_X+INGAME_LAYOUT_P1_TRT_Y*32)
INGAME_LAYOUT_P2_TRT= ($2000+INGAME_LAYOUT_P2_TRT_X+INGAME_LAYOUT_P2_TRT_Y*32)

INGAME_LAYOUT_P1_BURN= ($2000+INGAME_LAYOUT_P1_BURN_X+INGAME_LAYOUT_P1_BURN_Y*32)
INGAME_LAYOUT_P2_BURN= ($2000+INGAME_LAYOUT_P2_BURN_X+INGAME_LAYOUT_P2_BURN_Y*32)

INGAME_LAYOUT_P1_DROUGHT= ($2000+INGAME_LAYOUT_P1_DROUGHT_X+INGAME_LAYOUT_P1_DROUGHT_Y*32)
INGAME_LAYOUT_P2_DROUGHT= ($2000+INGAME_LAYOUT_P2_DROUGHT_X+INGAME_LAYOUT_P2_DROUGHT_Y*32)

INGAME_LAYOUT_LEAD= ($2000+INGAME_LAYOUT_LEAD_X+INGAME_LAYOUT_LEAD_Y*32)

INGAME_LAYOUT_P1_ARROW= ($2000+INGAME_LAYOUT_P1_ARROW_X+INGAME_LAYOUT_P1_ARROW_Y*32)
INGAME_LAYOUT_P2_ARROW= ($2000+INGAME_LAYOUT_P2_ARROW_X+INGAME_LAYOUT_P2_ARROW_Y*32)

INGAME_LAYOUT_CHARID_HUNDRED = $40
INGAME_LAYOUT_CHARID_ARROWS = $42

21 changes: 21 additions & 0 deletions twoplayer-CHR-01.chr.ips.s
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ IPSCHROFFSET = 0

.ifdef TOURNAMENT_MODE
NEXT_ON_TOP = 0

.include "tournament.screenlayout.inc"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_HUNDRED
.incbin "build/twoplayer.chrs/1a"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_HUNDRED+1
.incbin "build/twoplayer.chrs/1b"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_ARROWS
.incbin "build/twoplayer.chrs/1e"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_ARROWS+1
.incbin "build/twoplayer.chrs/1f"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_ARROWS+2
.incbin "build/twoplayer.chrs/1c"

ips_tilehdr CHR_RIGHT,INGAME_LAYOUT_CHARID_ARROWS+3
.incbin "build/twoplayer.chrs/1d"

.endif

.ifdef NEXT_ON_TOP
Expand Down
Loading

0 comments on commit ae5cbe3

Please sign in to comment.