diff --git a/bin/kk.c128 b/bin/kk.c128 index 358b7f5..d9425fe 100644 Binary files a/bin/kk.c128 and b/bin/kk.c128 differ diff --git a/bin/kk.c64 b/bin/kk.c64 index f76dd73..bae1389 100644 Binary files a/bin/kk.c64 and b/bin/kk.c64 differ diff --git a/bin/kk.cx16 b/bin/kk.cx16 index c52552b..bcdf80a 100644 Binary files a/bin/kk.cx16 and b/bin/kk.cx16 differ diff --git a/bin/kk.pet b/bin/kk.pet index 698ba9f..ab8aa76 100644 Binary files a/bin/kk.pet and b/bin/kk.pet differ diff --git a/bin/kk.plus4 b/bin/kk.plus4 index 8680a9e..338b5a4 100644 Binary files a/bin/kk.plus4 and b/bin/kk.plus4 differ diff --git a/src/kcore.c b/src/kcore.c index dfefd81..d66a796 100644 --- a/src/kcore.c +++ b/src/kcore.c @@ -59,10 +59,10 @@ const char *rownames[] = {"einer", "zweier", "dreier", const char *rownames[] = {"aces", "twos", "threes", "fours", "fives", "sixes", - "sum u", "bonus", "total", + "sum up", "bonus", "total", "3ofakind", "4ofakind", "sm. str.", "lg. str.", "f. house", "yahtzee", "chance", - "summe l", "total"}; + "sum low", "total"}; #endif diff --git a/src/kkniffel.c b/src/kkniffel.c index b40034e..04a8ac7 100644 --- a/src/kkniffel.c +++ b/src/kkniffel.c @@ -40,6 +40,12 @@ #endif // clang-format on +#ifdef __CX16__ +#define BOTTOMY 30 +#else +#define BOTTOMY 25 +#endif + char inbuf[40]; int roundResults[10][4]; // results for postgame @@ -65,6 +71,12 @@ void clearLower(void) cputs(" "); } +void centerLine(char line, char *msg) +{ + gotoxy(20 - (strlen(msg) / 2), line); + cputs(msg); +} + void centerLower(char *msg) { clearLower(); @@ -423,36 +435,40 @@ void displayBoard() void startgame() { - char i; - clrscr(); textcolor(colSplash); - cputs("### kkniffel v2.3 ###\r\n\r\n" - "written by herr k. @ k-burg, 2019-20\r\n\r\n" - "with special thanks to frau k.,\r\n" - "buba k., candor k., and - of course -\r\n" - "to the 7 turtles!\r\n"); - - do + clrscr(); + for (i = 0; i < 8; ++i) { - gotoxy(0, 9); - cclear(39); - gotoxy(0, 9); - textcolor(colText); - cprintf("# of players (2-4)? "); - input(inbuf); - numPlayers = atoi(inbuf); - if (numPlayers == 0) - { - numPlayers = 4; - cprintf("-> 4"); - } - } while (numPlayers < 2 || numPlayers > 4); + _plotDice(1 + (rand() % 6), i * 5, 0, 0); + _plotDice(1 + (rand() % 6), i * 5, BOTTOMY - 5, 0); + } + + textcolor(colText); + + revers(1); + centerLine(6, " * k k n i f f e l * "); + revers(0); + centerLine(8, "- version 2.23 -"); + centerLine(10,"written by stephan kleinert"); + centerLine(11,"at k-burg, bad honnef, 2019-2020"); + centerLine(12,"with special thanks to frau k.,"); + centerLine(13,"buba k., candor k. and of course"); + centerLine(14,"to the 7 turtles."); + textcolor(colLowerSum); + centerLine(16,"how many players (2-4)?"); + cursor(1); + + while (numPlayers<2 || numPlayers>4) { + numPlayers = cgetc()-'0'; + } + + clrscr(); namelength = (21 / numPlayers) - 1; - cputsxy(0,20,"(add 'shift+z' to player name to\r\ncreate a computer player!)"); + cputsxy(0, 20, "(add 'shift+z' to player name to\r\ncreate a computer player!)"); for (i = 0; i < numPlayers; i++) { @@ -492,6 +508,8 @@ void startgame() } strcpy(_pname[i], inbuf); } + + cursor(0); } char shouldCommitRow(unsigned char row) @@ -789,10 +807,10 @@ void mainloop() void splash() { startup(); - gotoxy(12 + 0, 11); + gotoxy(0, 0); cprintf("stephan katja"); textcolor(2); - gotoxy(12 + 8, 11); + gotoxy(8, 0); cputc(211); jiffySleep(23); initIO();