1 #include <stdlib.h>
2 #include <conio.h>
3 #include "xtile20!.h"
4 #include <stdio.h>
5 #include <alloc.h>
6 #include <dos.h>
7
8
9 #define RELOAD (STORE + (1680/4) + 1)
10
11 #define AFTERSPLIT 3200
12
13 #define TRUE 1
14 #define FALSE 0
15
16
17 FILE *test;
18 void* far buf;
19 void* far buf1;
20 char* far mpoint;
21 char* far mmask;
22 char* far mask1;
23 char* far pal;
24 char* far font;
25 char* far fmask;
26
27 char* far hex;
28 char* far download;
29 char* far download2;
30
31 int Value;
32
33 int X, Y;
34 unsigned int SplitMFlag = NORMALPAGE;
35
36 void main( int argn, char* argc[] ) {
37
38
39 char What[20];
40 int Mode;
41
42 Mode = atoi( argc[1] );
43
44 test = fopen("thudd.pix", "rb");
45 buf = farmalloc( 64000 );
46 fread( buf, sizeof(char), 64000, test);
47 fclose( test );
48
49 test = fopen("thudd2.pix", "rb");
50 buf1 = farmalloc( 12800 );
51 fread( buf1, sizeof(char), 12800, test);
52 fclose( test );
53
54 test = fopen("mpoint.spi", "rb");
55 mpoint = farmalloc( 480 );
56 fread( mpoint, sizeof(char), 480, test);
57 fclose( test );
58
59 test = fopen("mpoint.spm", "rb");
60 mmask = farmalloc( 120 );
61 fread( mmask, sizeof(char), 120, test);
62 fclose( test );
63
64 test = fopen("1.pix", "rb");
65 hex = farmalloc( 408 );
66 download = farmalloc( 408 );
67 download2 = farmalloc( 408 );
68 fread( hex, sizeof(char), 408, test);
69 fclose( test );
70
71 /* test = fopen("test4.fnt", "rb");
72 font = farmalloc( 168 );
73 fread( font, sizeof(char), 168, test);
74 fclose( test );
75
76 test = fopen("test4.msf", "rb");
77 fmask = farmalloc( 24 );
78 fread( fmask, sizeof(char), 24, test);
79 fclose( test );
80 */
81
82 XClear(0);
83
84 XInit_Mode( Mode );
85
86 XClear(0);
87
88
89 XSet_Display_Page( AFTERSPLIT, 400, 300, 0, 0 );
90 XSet_Write_Page( AFTERSPLIT, 400 );
91
92 /* XSet_Box( 0, 0, 320, 240, 1 );
93
94
95 getch();
96 XPut_TileA( 16, 10, 24, 17, hex );
97 XPut_TileA( 17, 29, 24, 17, hex );
98 XPut_TileA( 18, 48, 24, 17, hex );
99 XPut_TileA( 19, 67, 24, 17, hex );
100
101 getch();
102 */
103 /* getch();
104 XPut_TileA( 48, 10, 24, 17, hex );
105 XPut_TileA( 49, 29, 24, 17, hex );
106 XPut_TileA( 50, 48, 24, 17, hex );
107 XPut_TileA( 51, 67, 24, 17, hex );
108
109 getch();
110 XPut_Tile_M( 80, 10, 24, 17, hex );
111
112 getch();
113 XPut_TileA_M( 112, 10, 24, 17, hex );
114 XPut_TileA_M( 113, 29, 24, 17, hex );
115 XPut_TileA_M( 114, 48, 24, 17, hex );
116 XPut_TileA_M( 115, 67, 24, 17, hex );
117
118 getch();
119 */
120
121 /* XUpload_Sprite( STORE, 480, mpoint );
122
123
124 XReload_TileW( 0,0,12,10, RELOAD);
125
126 do {
127
128 XPaste_Sprite_M( X, Y, 12, 10, STORE, mmask );
129
130 XWait_Retrace();
131
132 XPaste_Tile( X, Y, 12, 10, RELOAD );
133
134 X = X + 2;
135 Y++;
136
137 XReload_TileW( X, Y, 12, 10, RELOAD );
138
139 } while (X < 321 );
140 */
141 /* getch();
142
143 XReload_TileW( 16, 10, 24, 17, RELOAD );
144
145 XPaste_Tile ( 100, 10, 24, 17, RELOAD );
146
147
148 getch();
149
150 XDownload_TileS( RELOAD, 24, 17, download );
151
152 XPut_Tile( 140, 10, 24, 17, download );
153
154 getch();
155
156 XDownload_TileP( 16, 10, 24, 17, download2 );
157 XPut_Tile( 180, 10, 24, 17, download2 );
158 XDownload_TileP( 17, 29, 24, 17, download2 );
159 XPut_Tile( 180, 29, 24, 17, download2 );
160 XDownload_TileP( 18, 48, 24, 17, download2 );
161 XPut_Tile( 180, 48, 24, 17, download2 );
162 XDownload_TileP( 19, 67, 24, 17, download2 );
163 XPut_Tile( 180, 67, 24, 17, download2 );
164
165 getch();
166
167 */
168 XPut_Line( 10, 10, 10, 200, 1 );
169 XPut_Line( 10, 10, 200, 10, 1 );
170 XPut_Line( 10, 200, 200, 200, 1 );
171 XPut_Line( 200, 10, 200, 200, 1 );
172
173 XPut_Line( 10, 10, 200, 200, 2 );
174 XPut_Line( 10, 10, 200, 100, 2 );
175 XPut_Line( 10, 10, 100, 200, 2 );
176
177 getch();
178
179 };
180
|