• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision961 (tree)
Time2013-11-06 03:02:06
Authorbarnsey123

Log Message

v0.073 broken at the moment, got to tidy up

Change Summary

Incremental Difference

--- users/barnsey123/HNEFATAFL/border.s (revision 960)
+++ users/barnsey123/HNEFATAFL/border.s (revision 961)
@@ -1,4 +1,4 @@
1-_BorderTiles
1+_BorderTiles2
22 .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
33 .byt $40,$40,$40,$40,$4f,$40,$40,$5f,$40,$40,$78,$40,$41,$70,$40,$41
44 .byt $60,$40,$4d,$6f,$40,$5d,$6f,$40,$79,$60,$40,$71,$60,$40,$71,$60
@@ -15,29 +15,19 @@
1515 .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
1616 .byt $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$7e,$40,$5f,$7f,$40,$7f
1717 .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
1929 .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
2830 .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
4333
--- users/barnsey123/HNEFATAFL/draw.s (revision 960)
+++ users/barnsey123/HNEFATAFL/draw.s (revision 961)
@@ -151,7 +151,7 @@
151151 ldx #33
152152 loop
153153 ldy #0
154- lda #%111111
154+ lda _bottompattern;
155155 sta (tmp1),y
156156 jsr _Add1
157157 dex
@@ -606,78 +606,3 @@
606606 ;.)
607607
608608
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
--- users/barnsey123/HNEFATAFL/main.c (revision 960)
+++ users/barnsey123/HNEFATAFL/main.c (revision 961)
@@ -52,6 +52,8 @@
5252 // 06-09-2013 NB v0.070 Bug in calcantake2 WAS: (ew < 10) NOW: (ew < 9)
5353 // 07-09-2013 NB v0.071 Adding flashing messages for multiple takes
5454 // 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
5557 #include <lib.h>
5658 #define NORTH 0
5759 #define SOUTH 1
@@ -90,6 +92,7 @@
9092 extern unsigned char PictureTiles[]; // standard graphics for pieces and backgrounds
9193 extern unsigned char RunicTiles[]; // Runic alphabet
9294 extern unsigned char TimerTiles[]; // display timer in central square when computer's turn
95+extern unsigned char BorderTiles2[]; // for Trophy Screen
9396 /*
9497 ; You simply replace the existing font from C doing this:
9598 ;
@@ -196,6 +199,8 @@
196199 void printmessage(); // prints message to screen
197200 void printpossiblemoves(); // Print possible moves
198201 //void printtitles(); // print the title screen (used in titles/menus etc)
202+void PrintTrophyScreen(); // prints the trophy screen
203+void PrintTrophyScreen1(); // sub of PrintTrophyScreen
199204 void printturnprompt(); // prints "your turn" message
200205 void prioritycalc(); // updates priority array
201206 void setpoints(); // set points to default value
@@ -378,6 +383,7 @@
378383 // first blood award.
379384 unsigned char erasetext; // how many lines to erase
380385 unsigned char takecounter; // how many pieces were taken in one move
386+unsigned char bottompattern; // draw full line or blank
381387 /****************** MAIN PROGRAM ***********************************/
382388 main(){
383389 //gameinput=0; // 0=undefined 1=play against computer, 2=human vs human
@@ -390,7 +396,6 @@
390396 setflags(0); // No keyclick, no cursor, no nothing
391397 */
392398 //printtitles();
393- inkcolor=6;inkasm();
394399 for(;;){ // endless loop
395400 //playertype=0; // 1=attacker, 2=defender (set at zero as incremented within loop)
396401 firstblood=1;
@@ -443,9 +448,9 @@
443448 game=-1 Stalemate.
444449 game=-2 Attacker wins.
445450 */
446- message="ATTACKER WINS! ODIN IS DISPLEASED!"; // default (game=-2)
451+ message="ATTACKER WINS!"; // default (game=-2)
447452 // king escapes or all attackers killed
448- if ( game == 0 ) message="KING WINS! ODIN IS PLEASED!";
453+ if ( game == 0 ) message="KING WINS!";
449454 // computer can't move
450455 if ( game == -1 ) message="STALEMATE - OR TURN LIMIT EXCEEDED";
451456 printmessage();
@@ -453,7 +458,7 @@
453458 message="\n*** PRESS A KEY ***";
454459 printline();
455460 flashon();
456- getchar();
461+ PrintTrophyScreen();
457462 }
458463 }
459464
@@ -1271,6 +1276,7 @@
12711276
12721277 // DRAW THE BOARD
12731278 void drawboard(){
1279+ inkcolor=6;inkasm();
12741280 deadtoggle=0; // ensure deadpile char=space
12751281 playertype=1;deadpile(); // clear the deadpile of defenders
12761282 playertype=2;deadpile(); // clear the deadpile of attackers
@@ -1290,6 +1296,7 @@
12901296 drawtiles(); // draw the background tiles
12911297 //curset(12,198,1);
12921298 //draw(198,0,1);
1299+ bottompattern=63;
12931300 drawbottom();
12941301 drawedge();
12951302 //draw(0,-198,1);
@@ -1982,6 +1989,28 @@
19821989 }
19831990 }
19841991 */
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+}
19852014 /*
19862015 // performs the rune flipping sequence in title screen
19872016 void fliprune() {
--- users/barnsey123/HNEFATAFL/osdk_config.bat (revision 960)
+++ users/barnsey123/HNEFATAFL/osdk_config.bat (revision 961)
@@ -9,5 +9,5 @@
99 ::SET OSDKFILE=MAIN draw data pictiles explode runes text font_6x8_runic1_full
1010 ::SET OSDKFILE=MAIN draw data pictiles explode border runes
1111 ::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
1313
--- users/barnsey123/HNEFATAFL/osdk_makedata.bat (revision 960)
+++ users/barnsey123/HNEFATAFL/osdk_makedata.bat (revision 961)
@@ -2,7 +2,7 @@
22
33 %OSDK%\bin\pictconv -m0 -f0 -o4_PictureTiles pics\tiles.png pictiles.s
44 %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
66 %OSDK%\bin\pictconv -m0 -f0 -o4_TitleTiles pics\defence-force2.png defence.s
77 %OSDK%\bin\pictconv -m0 -f0 -o4_RunicTiles pics\runes.png runes.s
88 %OSDK%\bin\pictconv -m0 -f0 -o4_TimerTiles pics\timer5.png timer.s
Show on old repository browser