Revision | 961 (tree) |
---|---|
Time | 2013-11-06 03:02:06 |
Author | barnsey123 |
v0.073 broken at the moment, got to tidy up
@@ -1,4 +1,4 @@ | ||
1 | -_BorderTiles | |
1 | +_BorderTiles2 | |
2 | 2 | .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 |
3 | 3 | .byt $40,$40,$40,$40,$4f,$40,$40,$5f,$40,$40,$78,$40,$41,$70,$40,$41 |
4 | 4 | .byt $60,$40,$4d,$6f,$40,$5d,$6f,$40,$79,$60,$40,$71,$60,$40,$71,$60 |
@@ -15,29 +15,19 @@ | ||
15 | 15 | .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 |
16 | 16 | .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$7e,$40,$5f,$7f,$40,$7f |
17 | 17 | .byt $41,$61,$60,$40,$73,$40,$40,$56,$40,$7f,$4c,$7f,$7f,$5a,$7f,$40 |
18 | - .byt $73,$40,$41,$61,$60,$43,$40,$70,$7e,$40,$5f,$7c,$40,$4f,$40,$40 | |
18 | + .byt $73,$40,$41,$61,$60,$43,$40,$70,$7e,$40,$5f,$7c,$40,$4f,$7c,$40 | |
19 | + .byt $4f,$7e,$40,$5f,$43,$40,$70,$41,$61,$60,$40,$73,$40,$7f,$5a,$7f | |
20 | + .byt $7f,$4c,$7f,$40,$56,$40,$40,$73,$40,$41,$61,$60,$7f,$40,$7f,$7e | |
21 | + .byt $40,$5f,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
22 | + .byt $40,$40,$40,$40,$40,$71,$63,$40,$71,$63,$40,$73,$63,$40,$59,$43 | |
23 | + .byt $40,$4c,$43,$40,$46,$43,$40,$53,$43,$40,$79,$63,$40,$71,$63,$40 | |
24 | + .byt $71,$63,$40,$71,$73,$40,$70,$66,$40,$70,$4c,$40,$70,$58,$40,$70 | |
25 | + .byt $72,$40,$71,$67,$40,$71,$63,$40,$71,$63,$71,$63,$40,$71,$63,$40 | |
26 | + .byt $71,$73,$40,$70,$66,$40,$70,$4c,$40,$70,$58,$40,$70,$72,$40,$71 | |
27 | + .byt $67,$40,$71,$63,$40,$71,$63,$40,$73,$63,$40,$59,$43,$40,$4c,$43 | |
28 | + .byt $40,$46,$43,$40,$53,$43,$40,$79,$63,$40,$71,$63,$40,$71,$63,$40 | |
19 | 29 | .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 |
20 | - .byt $7e,$40,$5f,$7f,$40,$7f,$41,$61,$60,$40,$73,$40,$40,$5a,$40,$7f | |
21 | - .byt $4c,$7f,$7f,$56,$7f,$40,$73,$40,$41,$61,$60,$43,$40,$70,$7e,$40 | |
22 | - .byt $5f,$7c,$40,$4f,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
23 | - .byt $40,$40,$40,$40,$40,$40,$7e,$40,$5f,$7f,$40,$7f,$41,$61,$60,$40 | |
24 | - .byt $73,$40,$40,$40,$40,$7f,$7f,$7f,$7f,$7f,$7f,$40,$40,$40,$41,$61 | |
25 | - .byt $60,$43,$40,$70,$7e,$40,$5f,$7c,$40,$4f,$7c,$40,$4f,$7e,$40,$5f | |
26 | - .byt $43,$40,$70,$41,$61,$60,$40,$73,$40,$7f,$5a,$7f,$7f,$4c,$7f,$40 | |
27 | - .byt $56,$40,$40,$73,$40,$41,$61,$60,$7f,$40,$7f,$7e,$40,$5f,$40,$40 | |
28 | 30 | .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 |
29 | - .byt $7c,$40,$4f,$7e,$40,$5f,$43,$40,$70,$41,$61,$60,$40,$73,$40,$7f | |
30 | - .byt $56,$7f,$7f,$4c,$7f,$40,$5a,$40,$40,$73,$40,$41,$61,$60,$7f,$40 | |
31 | - .byt $7f,$7e,$40,$5f,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
32 | - .byt $40,$40,$40,$40,$40,$40,$7c,$40,$4f,$7e,$40,$5f,$43,$40,$70,$41 | |
33 | - .byt $61,$60,$40,$40,$40,$7f,$7f,$7f,$7f,$7f,$7f,$40,$40,$40,$40,$73 | |
34 | - .byt $40,$41,$61,$60,$7f,$40,$7f,$7e,$40,$5f,$40,$40,$40,$40,$40,$40 | |
35 | - .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$71,$63,$40 | |
36 | - .byt $71,$63,$40,$73,$63,$40,$59,$43,$40,$4c,$43,$40,$46,$43,$40,$53 | |
37 | - .byt $43,$40,$79,$63,$40,$71,$63,$40,$71,$63,$40,$71,$73,$40,$70,$66 | |
38 | - .byt $40,$70,$4c,$40,$70,$58,$40,$70,$72,$40,$71,$67,$40,$71,$63,$40 | |
39 | - .byt $71,$63,$71,$63,$40,$71,$63,$40,$71,$73,$40,$70,$66,$40,$70,$4c | |
40 | - .byt $40,$70,$58,$40,$70,$72,$40,$71,$67,$40,$71,$63,$40,$71,$63,$40 | |
41 | - .byt $73,$63,$40,$59,$43,$40,$4c,$43,$40,$46,$43,$40,$53,$43,$40,$79 | |
42 | - .byt $63,$40,$71,$63,$40,$71,$63,$40 | |
31 | + .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40 | |
32 | + .byt $40,$40,$40,$40,$40,$40 | |
43 | 33 |
@@ -151,7 +151,7 @@ | ||
151 | 151 | ldx #33 |
152 | 152 | loop |
153 | 153 | ldy #0 |
154 | - lda #%111111 | |
154 | + lda _bottompattern; | |
155 | 155 | sta (tmp1),y |
156 | 156 | jsr _Add1 |
157 | 157 | dex |
@@ -606,78 +606,3 @@ | ||
606 | 606 | ;.) |
607 | 607 | |
608 | 608 | |
609 | -;_hiresasm | |
610 | -; LDA $02C0 | |
611 | -; PHA | |
612 | -; AND #$02 | |
613 | -; BEQ $EBF4 | |
614 | -; PLA | |
615 | -; ORA #$01 | |
616 | -; STA $02C0 | |
617 | -; JSR _sethires | |
618 | -; RTS | |
619 | -; | |
620 | -;_sethires | |
621 | -; PHA | |
622 | -; LDA $021F | |
623 | -; BNE $F92B | |
624 | -; LDX #$0B | |
625 | -; JSR _subhires1 | |
626 | -; LDA #$FE | |
627 | -; AND $026A | |
628 | -; STA $026A | |
629 | -; LDA #$1E | |
630 | -; STA $BFDF | |
631 | -; LDA #$40 | |
632 | -; STA $A000 | |
633 | -; LDX #$17 | |
634 | -; JSR _subhires1 | |
635 | -; LDA #$00 | |
636 | -; STA $0219 | |
637 | -; STA $021A | |
638 | -; STA $10 | |
639 | -; LDA #$A0 | |
640 | -; STA $11 | |
641 | -; LDA #$20 | |
642 | -; STA $0215 | |
643 | -; LDA #$FF | |
644 | -; STA $0213 | |
645 | -; JSR $F8DC | |
646 | -; LDA #$01 | |
647 | -; ORA $026A | |
648 | -; STA $026A | |
649 | -; PLA | |
650 | -; RTS | |
651 | - | |
652 | -; F982 | |
653 | -;_subhires1 | |
654 | -; LDY #$06 | |
655 | -;loop | |
656 | -; LDA $F992,X | |
657 | -; STA $000B,Y | |
658 | -; DEX | |
659 | -; DEY | |
660 | -; BNE loop | |
661 | -; JSR _subhires1A | |
662 | -; RTS | |
663 | -; | |
664 | -;EDC4 | |
665 | -;_s;ubhires1A | |
666 | -; LDX #$00 | |
667 | -; LDY #$00 | |
668 | -;bra3 | |
669 | -; CPY $10 | |
670 | -; BNE bra2 | |
671 | -; CPX $11 | |
672 | -; BEQ bra1 | |
673 | -;bra2 | |
674 | -; LDA ($0C),Y | |
675 | -; STA ($0E),Y | |
676 | -; INY | |
677 | -; BNE bra3 | |
678 | -; INC $0D | |
679 | -; INC $0F | |
680 | -; INX | |
681 | -; JMP $EDC8 | |
682 | -;bra1 | |
683 | -; RTS | |
\ No newline at end of file |
@@ -52,6 +52,8 @@ | ||
52 | 52 | // 06-09-2013 NB v0.070 Bug in calcantake2 WAS: (ew < 10) NOW: (ew < 9) |
53 | 53 | // 07-09-2013 NB v0.071 Adding flashing messages for multiple takes |
54 | 54 | // 04-11-2013 NB v0.072 To be called from VIKLOADER (this version has no font data loaded) and NO FLIPRUNE |
55 | +// 05-11-2013 NB v0.073 Calling hires from CopyFont in Loader saving 3 bytes! | |
56 | +// Also adding border tiles for Trophy Display | |
55 | 57 | #include <lib.h> |
56 | 58 | #define NORTH 0 |
57 | 59 | #define SOUTH 1 |
@@ -90,6 +92,7 @@ | ||
90 | 92 | extern unsigned char PictureTiles[]; // standard graphics for pieces and backgrounds |
91 | 93 | extern unsigned char RunicTiles[]; // Runic alphabet |
92 | 94 | extern unsigned char TimerTiles[]; // display timer in central square when computer's turn |
95 | +extern unsigned char BorderTiles2[]; // for Trophy Screen | |
93 | 96 | /* |
94 | 97 | ; You simply replace the existing font from C doing this: |
95 | 98 | ; |
@@ -196,6 +199,8 @@ | ||
196 | 199 | void printmessage(); // prints message to screen |
197 | 200 | void printpossiblemoves(); // Print possible moves |
198 | 201 | //void printtitles(); // print the title screen (used in titles/menus etc) |
202 | +void PrintTrophyScreen(); // prints the trophy screen | |
203 | +void PrintTrophyScreen1(); // sub of PrintTrophyScreen | |
199 | 204 | void printturnprompt(); // prints "your turn" message |
200 | 205 | void prioritycalc(); // updates priority array |
201 | 206 | void setpoints(); // set points to default value |
@@ -378,6 +383,7 @@ | ||
378 | 383 | // first blood award. |
379 | 384 | unsigned char erasetext; // how many lines to erase |
380 | 385 | unsigned char takecounter; // how many pieces were taken in one move |
386 | +unsigned char bottompattern; // draw full line or blank | |
381 | 387 | /****************** MAIN PROGRAM ***********************************/ |
382 | 388 | main(){ |
383 | 389 | //gameinput=0; // 0=undefined 1=play against computer, 2=human vs human |
@@ -390,7 +396,6 @@ | ||
390 | 396 | setflags(0); // No keyclick, no cursor, no nothing |
391 | 397 | */ |
392 | 398 | //printtitles(); |
393 | - inkcolor=6;inkasm(); | |
394 | 399 | for(;;){ // endless loop |
395 | 400 | //playertype=0; // 1=attacker, 2=defender (set at zero as incremented within loop) |
396 | 401 | firstblood=1; |
@@ -443,9 +448,9 @@ | ||
443 | 448 | game=-1 Stalemate. |
444 | 449 | game=-2 Attacker wins. |
445 | 450 | */ |
446 | - message="ATTACKER WINS! ODIN IS DISPLEASED!"; // default (game=-2) | |
451 | + message="ATTACKER WINS!"; // default (game=-2) | |
447 | 452 | // king escapes or all attackers killed |
448 | - if ( game == 0 ) message="KING WINS! ODIN IS PLEASED!"; | |
453 | + if ( game == 0 ) message="KING WINS!"; | |
449 | 454 | // computer can't move |
450 | 455 | if ( game == -1 ) message="STALEMATE - OR TURN LIMIT EXCEEDED"; |
451 | 456 | printmessage(); |
@@ -453,7 +458,7 @@ | ||
453 | 458 | message="\n*** PRESS A KEY ***"; |
454 | 459 | printline(); |
455 | 460 | flashon(); |
456 | - getchar(); | |
461 | + PrintTrophyScreen(); | |
457 | 462 | } |
458 | 463 | } |
459 | 464 |
@@ -1271,6 +1276,7 @@ | ||
1271 | 1276 | |
1272 | 1277 | // DRAW THE BOARD |
1273 | 1278 | void drawboard(){ |
1279 | + inkcolor=6;inkasm(); | |
1274 | 1280 | deadtoggle=0; // ensure deadpile char=space |
1275 | 1281 | playertype=1;deadpile(); // clear the deadpile of defenders |
1276 | 1282 | playertype=2;deadpile(); // clear the deadpile of attackers |
@@ -1290,6 +1296,7 @@ | ||
1290 | 1296 | drawtiles(); // draw the background tiles |
1291 | 1297 | //curset(12,198,1); |
1292 | 1298 | //draw(198,0,1); |
1299 | + bottompattern=63; | |
1293 | 1300 | drawbottom(); |
1294 | 1301 | drawedge(); |
1295 | 1302 | //draw(0,-198,1); |
@@ -1982,6 +1989,28 @@ | ||
1982 | 1989 | } |
1983 | 1990 | } |
1984 | 1991 | */ |
1992 | +void PrintTrophyScreen(){ | |
1993 | + inkcolor=3;inkasm(); // yellow, erm...gold | |
1994 | + row=0;a=0;b=4;c=1; // print top row of border | |
1995 | + PrintTrophyScreen1(); | |
1996 | + a=6;b=8;c=7; | |
1997 | + for (row=1;row<10;row++){ | |
1998 | + PrintTrophyScreen1(); // print middle rows of border | |
1999 | + } | |
2000 | + row=10;a=2;b=5;c=3; | |
2001 | + PrintTrophyScreen1(); // print bottom row of border | |
2002 | + bottompattern=0;drawbottom(); // blank out line at bottom | |
2003 | + getchar(); | |
2004 | +} | |
2005 | +void PrintTrophyScreen1(){ | |
2006 | + for (col=0; col<13; col++){ | |
2007 | + tiletodraw=b; | |
2008 | + if (col==0) tiletodraw=a; | |
2009 | + if (col==12) tiletodraw=c; | |
2010 | + ptr_graph=BorderTiles2; | |
2011 | + drawtile(); | |
2012 | + } | |
2013 | +} | |
1985 | 2014 | /* |
1986 | 2015 | // performs the rune flipping sequence in title screen |
1987 | 2016 | void fliprune() { |
@@ -9,5 +9,5 @@ | ||
9 | 9 | ::SET OSDKFILE=MAIN draw data pictiles explode runes text font_6x8_runic1_full |
10 | 10 | ::SET OSDKFILE=MAIN draw data pictiles explode border runes |
11 | 11 | ::SET OSDKFILE=MAIN draw data pictiles explode border defence runes font_6x8_runic1_full |
12 | -SET OSDKFILE=MAIN draw data pictiles explode text game timer | |
12 | +SET OSDKFILE=MAIN draw data pictiles explode text game timer border | |
13 | 13 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | |
3 | 3 | %OSDK%\bin\pictconv -m0 -f0 -o4_PictureTiles pics\tiles.png pictiles.s |
4 | 4 | %OSDK%\bin\pictconv -m0 -f0 -o4_ExplodeTiles pics\explode.png explode.s |
5 | -%OSDK%\bin\pictconv -m0 -f0 -o4_BorderTiles pics\bordertiles.png border.s | |
5 | +%OSDK%\bin\pictconv -m0 -f0 -o4_BorderTiles2 pics\bordertiles2.png border.s | |
6 | 6 | %OSDK%\bin\pictconv -m0 -f0 -o4_TitleTiles pics\defence-force2.png defence.s |
7 | 7 | %OSDK%\bin\pictconv -m0 -f0 -o4_RunicTiles pics\runes.png runes.s |
8 | 8 | %OSDK%\bin\pictconv -m0 -f0 -o4_TimerTiles pics\timer5.png timer.s |