summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaume Delclòs Coll <cosa@cosarara.me>2024-05-07 23:44:06 +0000
committerJaume Delclòs Coll <cosa@cosarara.me>2024-05-08 01:53:22 +0200
commit7679f0d88825dfd49e69bac0ded7f79f9e3b91f7 (patch)
treeefce3c77939945fc3e74642ae2ef2f85a8635d89
parentff6cb0538290005415a435812a2f36c79c0dfc6f (diff)
remove old commented out code
-rw-r--r--chess.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/chess.c b/chess.c
index 1b1f297..bdfb42f 100644
--- a/chess.c
+++ b/chess.c
@@ -371,10 +371,8 @@ threadmain(int, char **)
resizewin();
- // FETCH ASSETS
+ // LOAD ASSETS
- //int width = Dx(screen->r);
- //int height = Dy(screen->r);
Image* pieceimg[12];
for (int i=bB; i<=wR; i++) {
char* fn = "AA.image"; // build the filename
@@ -396,17 +394,6 @@ threadmain(int, char **)
Image* selcolor = allocimagemix(display, DWhite, DRed);
Image* poscolor = allocimagemix(display, DBlue, DWhite);
- /*
- int pawnfd = open("pawn.image", OREAD);
- Image *pawn = readimage(display, pawnfd, 0);
- close(pawnfd);
- // invert to make a mask
- Rectangle r50 = Rpt(ZP, Pt(50, 50));
- Image* pawnmask = allocimage(display, r50, RGB24, 0, DWhite);
- draw(pawnmask, r50, black, pawn, ZP);
- */
-
-
// SETUP EVENTS
Mousectl *mousectl;
@@ -440,6 +427,7 @@ threadmain(int, char **)
int prev_click = 0;
// SETUP GAME STATE
+
int board[8][8];
resetboard(board);
Player turn = White;
@@ -450,6 +438,7 @@ threadmain(int, char **)
memset(&cr, 0, sizeof(cr));
// MAIN LOOP
+
for(;;) {
// RENDER
draw(screen, screen->r, white, nil, ZP);
@@ -497,8 +486,8 @@ threadmain(int, char **)
black, ZP, font, dbgstring);
flushimage(display, 1);
-
// PROCESS EVENTS
+
Point hovered;
switch (alt(a)) {
case Eresize: