File: test2.hc

package info (click to toggle)
craft 3.5-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,000 kB
  • ctags: 1,602
  • sloc: cpp: 3,794; makefile: 2,319; ansic: 857; sh: 385
file content (30 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "morph.h"
#include "win.h"
#include "sound.h"
#include "xmath.h"
#include "xbm.h"

main (int num_params, char *shell_params [])
  {xbm *xb;

   xb = new xbm ("tt.xbm");
   for (int y = 0; y < xb->dy; y++)
     {for (int x = 0; x < xb->dx; x++)
        {print_bit;
        };
      printf ("\n");
     };
   ack ();
   xb->save ("lala.xbm");
   delete (xb);

.  print_bit
     {int b;

      xb->bit (x, y, b);
      if   (b)
           printf ("I");
      else printf (".");
     }.
 
  }