1 <% #include "knot.h" %>
3 <% static void print_img(int ptrn) { %>
5 <img src="img/<% if (ptrn & LEFT ) printf("l"); %>
6 <% if (ptrn & RIGHT) printf("r"); %>
7 <% if (ptrn & UP ) printf("u"); %>
8 <% if (ptrn & DOWN ) printf("d"); %>.png">
12 <% void print_index(tile_t **tiles) { %>
13 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
14 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
15 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
17 <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
19 <style type="text/css">
20 * { border:0; margin:0; padding:0; }
21 table { border-collapse:separate; margin:auto; width:1800px;}
22 td { width:64px; height:64px; border-spacing:0px 0px;}
23 img { position:absolute; }
27 <table cellpadding="0" cellspacing="0">
28 <% for (int row = 1; row < 10; row++) { %>
30 <% for (int col = 1; col < 30; col++) { %>
32 <% print_img(tiles[row][col].bot); %>
33 <% print_img(tiles[row][col].top); %>