diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-10 20:33:58 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-10 20:33:58 -0500 |
commit | 74dd414d3f0db95c6403fea5bb1f91f0e33fde26 (patch) | |
tree | b9fbb103b72edd3876c9efc4f77aed0455c0c55d | |
parent | Added coupons to card display (diff) | |
download | 7w-74dd414d3f0db95c6403fea5bb1f91f0e33fde26.tar.gz 7w-74dd414d3f0db95c6403fea5bb1f91f0e33fde26.tar.bz2 7w-74dd414d3f0db95c6403fea5bb1f91f0e33fde26.zip |
Bug fixes
-rw-r--r-- | io.c | 14 | ||||
-rw-r--r-- | main.c | 1 |
2 files changed, 8 insertions, 7 deletions
@@ -63,9 +63,9 @@ int c; void io_printname(int x, int y, int era, int card) { - mvprintw(y, x, "# "); + mvprintw(y, x, "# "); attron(COLOR_PAIR(gettypecolor(cards_gettype(era, card)))); - printw("%-24s", cards_getname(era, card)); + printw("%-23s", cards_getname(era, card)); attrset(A_NORMAL); printw(" #"); } @@ -99,19 +99,19 @@ void io_printcard(int x, int y, int era, int card) if(coupons[1] || coupons[3]) { //print the coupons! mvprintw(y++, x, "# Coupon for: #"); - if(coupons[1] != 0) + if(coupons[1]) io_printname(x, y++, coupons[0], coupons[1]); - if(coupons[3] != 0) + if(coupons[3]) io_printname(x, y++, coupons[2], coupons[3]); } coupons = cards_getcouponed(era, card); - if(coupons[0] || coupons[2]) + if(coupons[1] || coupons[3]) { //print the coupons! mvprintw(y++, x, "# Free if owned: #"); - if(coupons[0] != 0) + if(coupons[1]) io_printname(x, y++, coupons[0], coupons[1]); - if(coupons[2] != 0) + if(coupons[3]) io_printname(x, y++, coupons[2], coupons[3]); } @@ -19,6 +19,7 @@ main() io_printcard(0, 6, 2, 14); io_printcard(0, 20, 2, 3); io_printcard(31, 0, 1, 12); + io_printcard(31, 20, 1, 20); io_getkey(); halt(); } |