c2e.convert_special: 0
e2c.convert_num: 0
-openfiles: /dos/z/16/16/dos_gfx.cpp:9835:9075:0:
-openfiles: /dos/z/16/16/dos_gfx.h:391:285:0:
+openfiles: /dos/z/16/16/dos_gfx.cpp:150:0:0:
+openfiles: /dos/z/16/16/dos_gfx.h:156:0:0:
openfiles: /dos/z/16/16/dos_kb.c:1039:46:0:
openfiles: /dos/z/16/16/dos_kb.h:23:0:0:
-openfiles: /dos/z/16/16/lib/lib_com.cpp:0:0:0:
-openfiles: /dos/z/16/16/lib/lib_com.h:2503:1416:0:
+openfiles: /dos/z/16/16/lib/lib_com.cpp:2:0:0:
+openfiles: /dos/z/16/16/lib/lib_com.h:160:0:0:
openfiles: /dos/z/16/16/scroll.txt:5256:4537:0:
openfiles: /dos/z/16/16/project16.txt:8063:6091:0:
openfiles: /dos/z/16/16/16.txt:0:0:0:
-openfiles: /dos/z/16/16/lib/x/MODEX.H:3164:2733:0:
-openfiles: /dos/z/16/16/lib/intro/lib.c:2412:1757:0:
-openfiles: /dos/z/16/src/lib/dos_gfx.cpp:2364:1106:0:
-openfiles: /dos/z/16/src/lib/dos_gfx.h:0:0:0:
-openfiles: /dos/z/16/16/lib/x/MXBB.ASM:559:0:0:
-openfiles: /dos/z/16/16/scrasm/MAIN.ASM:4251:1619:0:
-openfiles: /dos/z/16/16/modex16/PCXTEST.C:1106:518:0:
-openfiles: /dos/z/16/16/modex16/MODEX16.C:3919:3533:1:
-openfiles: /dos/z/16/16/modex16/MODEX16.H:1533:436:0:
+openfiles: /dos/z/16/16/lib/x/MODEX.H:5511:4684:0:
+openfiles: /dos/z/16/16/modex16/PCXTEST.C:1143:421:0:
+openfiles: /dos/z/16/16/lib/MODEX16.C:141:0:0:
+openfiles: /dos/z/16/16/lib/MODEX16.H:444:0:0:
+openfiles: /dos/z/16/16/lib/TYPES.H:277:0:1:
snr_recursion_level: 0
convertcolumn_horizontally: 0
adv_open_matchname: 0
default_mime_type: text/plain
e2c.convert_xml: 1
c2e.convert_iso: 0
-opendir: file:///dos/z/16/16/modex16
+opendir: file:///dos/z/16/16/lib
wrap_text_default: 0
bookmarks_filename_mode: 1
-ssearch_text: modexDrawBm
+ssearch_text: bitmap_t
snr_casesens: 0
view_blocks: 1
name: project 16
e2c.convert_iso: 0
ssearch_casesens: 0
charmap_block: 1
-recent_files: file:///dos/z/4x4_16/tauron/C_SRC/MAINC.CPP
-recent_files: file:///dos/z/4x4_16/tauron/C_SRC/PALETTE.INC
-recent_files: file:///dos/z/4x4_16/tauron/C_SRC/TAURON.H
-recent_files: file:///dos/z/4x4_16/tauron/C_SRC/CLEAR.CPP
-recent_files: file:///dos/z/4x4_16/tauron/C_SRC/MODES_C.INC
recent_files: file:///dos/z/4x4_16/tauron/C_SRC/TESTS.CPP
recent_files: file:///dos/z/4x4_16/tauron/C_SRC/MODES.CPP
recent_files: file:///dos/z/4x4_16/tauron/C_SRC/FONT1.H
recent_files: file:///dos/z/16/src/lib/dos_gfx.cpp
recent_files: file:///dos/z/16/16/modex16/MODEX16.H
recent_files: file:///dos/z/16/16/modex16/MODEX16.C
+recent_files: file:///dos/z/4x4_16/w_modex/MODEX.CPP
+recent_files: file:///dos/z/16/16/TYPES.H
+recent_files: file:///dos/z/16/16/lib/MODEX16.H
+recent_files: file:///dos/z/16/16/lib/TYPES.H
+recent_files: file:///dos/z/16/16/lib/MODEX16.C
snr_replacetype: 0
-savedir: file:///dos/z/16/16/modex16
+savedir: file:///dos/z/16/16/lib
spell_check_default: 1
spell_insert_entities: 0
last_filefilter:
htmlbar_view: 0
spell_lang: en
ssearch_dotmatchall: 0
-searchlist: q
-searchlist: sx
-searchlist: bit
-searchlist: mxBitBlt
-searchlist: #ifdef TESTING
-searchlist: BUFFMX
-searchlist: (TILEWH*2))
-searchlist: VH
-searchlist: mxSetClipRegion
-searchlist: mxFillBox(
-searchlist: OP_SET
-searchlist: mxBitBlt( MXSINT sx, MXSINT sy, MXUINT width, MXUINT height, MXSINT dx, MXSINT dy );
-searchlist: mxpt
-searchlist: printf
-searchlist: modexDrawBm
+searchlist: main
+searchlist: word
+searchlist: syte
+searchlist: unsigned short
+searchlist: syte
+searchlist: unsigned int
+searchlist: #include "src\\lib\\lib_com.h"
+searchlist: word
+searchlist: sy
+searchlist: word
+searchlist: VGA
+searchlist: Page
+searchlist: modexll
+searchlist: load
+searchlist: bitmap_t
autocomplete: 1
outputb_show_all_output: 0
bookmarks_show_mode: 0
//DOS Graphics thingy by sparky4 licence GPL v2\r
//a special thanks to everyone to release source code for mode X\r
/*src\lib\*/\r
-#include "dos_gfx.h"\r
+#include "dos_gfx.h"
+//#include "lib\modex16.h" //____\r
\r
int old_mode;\r
//color \82Ä\82·\82Æ\r
\r
//\82Ä\82·\82Æ\r
short bakax = 0, bakay = 0;\r
-syte xx = rand()&0%SW, yy = rand()&0%SH, sx = 0, sy = 0;\r
+word xx = rand()&0%SW, yy = rand()&0%SH, sx = 0, sy = 0;\r
byte coor;\r
\r
byte *vga = (byte *) MK_FP(0xA000, 0);\r
*/\r
\r
int main(void)\r
- {\r
+ {
+ //bitmap_t bmp; //____
+ //bmp = modexLoadPcx("chikyuu.pcx"); //____\r
short key,d,xpos,ypos,xdir,ydir;\r
int ch=0x0;\r
// main variables\r
ypos=TILEWH*2;\r
xdir=1;\r
ydir=1;\r
- setvideo(1);\r
+ setvideo(1);
+ //modexPalUpdate(bmp.palette); //____
+ //modexDrawBmp(VGA, 0, 0, &bmp, 0); //____
+ //getch(); //____\r
// screen savers\r
\r
/*while(d!=0){ // on!\r
#include <iostream.h>\r
#include <stdlib.h>\r
#include "lib\lib_com.h"
-#include "lib\x\modex.h"\r
+#include "lib\x\modex.h"
+//#include "lib\modex16.h" //____\r
\r
#define NUM_COLORS 256 // number of colors in vga mode\r
//static lgq=NUM_COLORS/(1/8)\r
--- /dev/null
+#include <dos.h>\r
+#include <string.h>\r
+#include <mem.h>\r
+#include <conio.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include "lib\modex16.h"\r
+\r
+\r
+byte far* VGA=(byte far*) 0xA0000000; /* this points to video memory. */\r
+\r
+static void fadePalette(sbyte fade, sbyte start, word iter, byte *palette);\r
+static byte tmppal[PAL_SIZE];\r
+static struct pcxHeader {\r
+ byte id;\r
+ byte version;\r
+ byte encoding;\r
+ byte bpp;\r
+ word xmin;\r
+ word ymin;\r
+ word xmax;\r
+ word ymax;\r
+ word hres;\r
+ word vres;\r
+ byte pal16[48];\r
+ byte res1;\r
+ word bpplane;\r
+ word palType;\r
+ word hScreenSize;\r
+ word vScreenSize;\r
+ byte padding[54];\r
+};\r
+\r
+\r
+static void\r
+vgaSetMode(byte mode)\r
+{\r
+ union REGS regs;\r
+\r
+ regs.h.ah = SET_MODE;\r
+ regs.h.al = mode;\r
+ int86(VIDEO_INT, ®s, ®s);\r
+}\r
+\r
+\r
+/* -========================= Entry Points ==========================- */\r
+void\r
+modexEnter() {\r
+ word i;\r
+ dword far*ptr=(dword far*)VGA; /* used for faster screen clearing */\r
+ word CRTParms[] = {\r
+ 0x0d06, /* vertical total */\r
+ 0x3e07, /* overflow (bit 8 of vertical counts) */\r
+ 0x4109, /* cell height (2 to double-scan */\r
+ 0xea10, /* v sync start */\r
+ 0xac11, /* v sync end and protect cr0-cr7 */\r
+ 0xdf12, /* vertical displayed */\r
+ 0x0014, /* turn off dword mode */\r
+ 0xe715, /* v blank start */\r
+ 0x0616, /* v blank end */\r
+ 0xe317 /* turn on byte mode */\r
+ };\r
+ int CRTParmCount = sizeof(CRTParms) / sizeof(CRTParms[0]);\r
+\r
+ /* TODO save current video mode and palette */\r
+ vgaSetMode(VGA_256_COLOR_MODE);\r
+\r
+ /* disable chain4 mode */\r
+ outpw(SC_INDEX, 0x0604);\r
+\r
+ /* synchronous reset while setting Misc Output */\r
+ outpw(SC_INDEX, 0x0100);\r
+\r
+ /* select 25 MHz dot clock & 60 Hz scanning rate */\r
+ outp(MISC_OUTPUT, 0xe3);\r
+\r
+ /* undo reset (restart sequencer) */\r
+ outpw(SC_INDEX, 0x0300);\r
+\r
+ /* reprogram the CRT controller */\r
+ outp(CRTC_INDEX, 0x11); /* VSync End reg contains register write prot */\r
+ outp(CRTC_DATA, 0x7f); /* get current write protect on varios regs */\r
+\r
+ /* send the CRTParms */\r
+ for(i=0; i<CRTParmCount; i++) {\r
+ outpw(CRTC_INDEX, CRTParms[i]);\r
+ }\r
+\r
+ /* clear video memory */\r
+ outpw(SC_INDEX, 0x0f02);\r
+ for(i=0; i<0x8000; i++) {\r
+ ptr[i] = 0x0000;\r
+ }\r
+}\r
+\r
+\r
+void\r
+modexLeave() {\r
+ /* TODO restore original mode and palette */\r
+ vgaSetMode(TEXT_MODE);\r
+}\r
+\r
+\r
+void\r
+modexShowPage(page_t page) {\r
+ word high_address;\r
+ word low_address;\r
+\r
+ high_address = HIGH_ADDRESS | ((word)(page) & 0xff00);\r
+ low_address = LOW_ADDRESS | ((word)(page) << 8);\r
+\r
+ /* wait for appropriate timing */\r
+ while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE));\r
+ outpw(CRTC_INDEX, high_address);\r
+ outpw(CRTC_INDEX, low_address);\r
+\r
+ /* wait for one retrace */\r
+ while (!(inp(INPUT_STATUS_1) & VRETRACE)); \r
+}\r
+\r
+\r
+void\r
+modexPanPage(page_t *page, int dx, int dy) {\r
+ /* TODO figure out how the $@#! you do horizontal panning */\r
+ *page += dy * SCREEN_WIDTH;\r
+}\r
+\r
+\r
+void\r
+modexSelectPlane(byte plane) {\r
+ outp(SC_INDEX, MAP_MASK); /* select plane */\r
+ outp(SC_DATA, plane);\r
+}\r
+\r
+\r
+void\r
+modexClearRegion(page_t page, int x, int y, int w, int h, byte color) {\r
+ byte plane;\r
+ word endx = x + w;\r
+ word endy = y + h;\r
+ word dx, dy;\r
+\r
+ /* TODO Make this fast. It's SLOOOOOOW */\r
+ for(plane=0; plane < 4; plane++) {\r
+ modexSelectPlane(PLANE(plane+x));\r
+ for(dx = x; dx < endx; dx+=4) {\r
+ for(dy=y; dy<endy; dy++) {\r
+ page[PAGE_OFFSET(dx, dy)] = color;\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+\r
+void\r
+modexDrawBmp(page_t page, int x, int y, bitmap_t *bmp, byte sprite) {\r
+ byte plane;\r
+ word px, py;\r
+ word offset;\r
+\r
+ /* TODO Make this fast. It's SLOOOOOOW */\r
+ for(plane=0; plane < 4; plane++) {\r
+ modexSelectPlane(PLANE(plane+x));\r
+ for(px = plane; px < bmp->width; px+=4) {\r
+ offset=px;\r
+ for(py=0; py<bmp->height; py++) {
+ if(!sprite || bmp->data[offset])\r
+ page[PAGE_OFFSET(x+px, y+py)] = bmp->data[offset];\r
+ offset+=bmp->width;\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+\r
+/* fade and flash */\r
+void\r
+modexFadeOn(word fade, byte *palette) {\r
+ fadePalette(-fade, 64, 64/fade+1, palette);\r
+}\r
+\r
+\r
+void\r
+modexFadeOff(word fade, byte *palette) {\r
+ fadePalette(fade, 0, 64/fade+1, palette);\r
+}\r
+\r
+\r
+void\r
+modexFlashOn(word fade, byte *palette) {\r
+ fadePalette(fade, -64, 64/fade+1, palette);\r
+}\r
+\r
+\r
+void\r
+modexFlashOff(word fade, byte *palette) {\r
+ fadePalette(-fade, 0, 64/fade+1, palette);\r
+}\r
+\r
+\r
+static void\r
+fadePalette(sbyte fade, sbyte start, word iter, byte *palette) {\r
+ word i;\r
+ byte dim = start;\r
+\r
+ /* handle the case where we just update */\r
+ if(iter == 0) {\r
+ modexPalUpdate(palette);\r
+ return;\r
+ }\r
+\r
+ while(iter > 0) { /* FadeLoop */\r
+ for(i=0; i<PAL_SIZE; i++) { /* loadpal_loop */\r
+ tmppal[i] = palette[i] - dim;\r
+ if(tmppal[i] > 127) {\r
+ tmppal[i] = 0;\r
+ } else if(tmppal[i] > 63) {\r
+ tmppal[i] = 63;\r
+ }\r
+ }\r
+ modexPalUpdate(tmppal);\r
+ iter--;\r
+ dim += fade;\r
+ }\r
+}\r
+\r
+\r
+/* save and load */\r
+void\r
+modexPalSave(byte *palette) {\r
+ int i;\r
+\r
+ outp(PAL_READ_REG, 0); /* start at palette entry 0 */\r
+ for(i=0; i<PAL_SIZE; i++) {\r
+ palette[i] = inp(PAL_DATA_REG); /* read the palette data */\r
+ }\r
+}\r
+\r
+\r
+byte *\r
+modexNewPal() {\r
+ byte *ptr;\r
+ ptr = malloc(PAL_SIZE);\r
+\r
+ /* handle errors */\r
+ if(!ptr) {\r
+ printf("Could not allocate palette.\n");\r
+ exit(-1);\r
+ }\r
+\r
+ return ptr;\r
+}\r
+\r
+\r
+void\r
+modexLoadPalFile(byte *filename, byte **palette) {\r
+ FILE *file;\r
+ byte *ptr;\r
+\r
+ /* free the palette if it exists */\r
+ if(*palette) {\r
+ free(*palette);\r
+ }\r
+\r
+ /* allocate the new palette */\r
+ *palette = modexNewPal();\r
+\r
+ /* open the file */\r
+ file = fopen(filename, "rb");\r
+ if(!file) {\r
+ printf("Could not open palette file: %s\n", filename);\r
+ exit(-2);\r
+ }\r
+\r
+ /* read the file */\r
+ ptr = *palette;\r
+ while(!feof(file)) {\r
+ *ptr++ = fgetc(file);\r
+ }\r
+\r
+ fclose(file);\r
+}\r
+\r
+\r
+void\r
+modexSavePalFile(char *filename, byte *pal) {\r
+ unsigned int i;\r
+ FILE *file;\r
+\r
+ /* open the file for writing */\r
+ file = fopen(filename, "wb");\r
+ if(!file) {\r
+ printf("Could not open %s for writing\n", filename);\r
+ exit(-2);\r
+ }\r
+\r
+ /* write the data to the file */\r
+ fwrite(pal, 1, PAL_SIZE, file);\r
+ fclose(file);\r
+}\r
+\r
+\r
+/* blanking */\r
+void\r
+modexPalBlack() {\r
+ fadePalette(-1, 64, 1, tmppal);\r
+}\r
+\r
+\r
+void\r
+modexPalWhite() {\r
+ fadePalette(-1, -64, 1, tmppal);\r
+}\r
+\r
+\r
+/* utility */\r
+void\r
+modexPalUpdate(byte *p) {\r
+ int i;\r
+ modexWaitBorder();\r
+ outp(PAL_WRITE_REG, 0); /* start at the beginning of palette */\r
+ for(i=0; i<PAL_SIZE/2; i++) {\r
+ outp(PAL_DATA_REG, p[i]);\r
+ }\r
+ modexWaitBorder(); /* waits one retrace -- less flicker */\r
+ for(i=PAL_SIZE/2; i<PAL_SIZE; i++) {\r
+ outp(PAL_DATA_REG, p[i]);\r
+ }\r
+}\r
+\r
+\r
+void\r
+modexWaitBorder() {\r
+ while(inp(INPUT_STATUS_1) & 8) {\r
+ /* spin */\r
+ }\r
+\r
+ while(!(inp(INPUT_STATUS_1) & 8)) {\r
+ /* spin */\r
+ }\r
+}\r
+\r
+\r
+bitmap_t\r
+modexLoadPcx(char *filename) {\r
+ FILE *file;\r
+ bitmap_t result;\r
+ struct pcxHeader head;\r
+ long bufSize;\r
+ int index;\r
+ byte count, val;\r
+\r
+ /* open the PCX file for reading */\r
+ file = fopen(filename, "rb");\r
+ if(!file) {\r
+ printf("Could not open %s for reading.\n", filename);\r
+ exit(-2);\r
+ }\r
+\r
+ /* read the header */\r
+ fread(&head, sizeof(char), sizeof(struct pcxHeader), file);\r
+\r
+ /* make sure this is 8bpp */\r
+ if(head.bpp != 8) {\r
+ printf("I only know how to handle 8bpp pcx files!\n");\r
+ fclose(file);\r
+ exit(-2);\r
+ }\r
+\r
+ /* allocate the buffer */\r
+ result.width = head.xmax - head.xmin + 1;\r
+ result.height = head.ymax - head.ymin + 1;\r
+ bufSize = result.width * result.height;\r
+ result.data = malloc(bufSize);\r
+ if(!result.data) {\r
+ printf("Could not allocate memory for bitmap data.");\r
+ fclose(file);\r
+ exit(-1);\r
+ }\r
+\r
+ /* read the buffer in */\r
+ index = 0;\r
+ do {\r
+ /* get the run length and the value */\r
+ count = fgetc(file);\r
+ if(0xC0 == (count & 0xC0)) { /* this is the run count */\r
+ count &= 0x3f;\r
+ val = fgetc(file);\r
+ } else {\r
+ val = count;\r
+ count = 1;\r
+ }\r
+\r
+ /* write the pixel the specified number of times */\r
+ for(; count && index < bufSize; count--,index++) {\r
+ result.data[index] = val;\r
+ }\r
+ } while(index < bufSize);\r
+\r
+ /* handle the palette */\r
+ fseek(file, -769, SEEK_END);\r
+ val = fgetc(file);\r
+ result.palette = modexNewPal();\r
+ if(head.version == 5 && val == 12) {\r
+ /* use the vga palette */\r
+ for(index=0; !feof(file) && index < PAL_SIZE; index++) {\r
+ val = fgetc(file);\r
+ result.palette[index] = val >> 2;\r
+ }\r
+ } else {\r
+ /* use the 16 color palette */\r
+ for(index=0; index<48; index++) {\r
+ result.palette[index] = head.pal16[index];\r
+ }\r
+ }\r
+\r
+ fclose(file);\r
+\r
+ return result;\r
+}\r
--- /dev/null
+/*\r
+ * Functions for handling modex and doing other basic graphics stuff.\r
+ */\r
+#ifndef MODEX16_H\r
+#define MODEX16_H\r
+#include <conio.h>\r
+#include "lib\types.h"\r
+\r
+/* -========================== Types & Macros ==========================- */\r
+#define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2))\r
+#define PLANE(x) (1<< (x&3))\r
+typedef byte far* page_t;\r
+#define SELECT_ALL_PLANES() outpw(0x03c4, 0xff02)\r
+typedef struct {\r
+ byte *data;\r
+ word width;\r
+ word height;\r
+ byte *palette;\r
+} bitmap_t;\r
+\r
+/* -============================ Functions =============================- */\r
+/* mode switching, page, and plane functions */\r
+void modexEnter();\r
+void modexLeave();\r
+void modexShowPage(page_t page);\r
+void modexPanPage(page_t *page, int dx, int dy);\r
+void modexSelectPlane(byte plane);\r
+void modexClearRegion(page_t page, int x, int y, int w, int h, byte color);\r
+void modexDrawBmp(page_t page, int x, int y, bitmap_t *bmp, byte sprite);\r
+\r
+/* Palette fade and flash effects */\r
+void modexFadeOn(word fade, byte *palette);\r
+void modexFadeOff(word fade, byte *palette);\r
+void modexFlashOn(word fade, byte *palette);\r
+void modexFlashOff(word fade, byte *palette);\r
+\r
+/* palette loading and saving */\r
+void modexPalSave(byte *palette);\r
+byte *modexNewPal();\r
+void modexLoadPalFile(char *filename, byte **palette);\r
+void modexSavePalFile(char *filename, byte *palette);\r
+\r
+/* fixed palette functions */\r
+void modexPalBlack();\r
+void modexPalWhite();\r
+\r
+/* utility functions */\r
+void modexPalUpdate(byte *p);\r
+void modexWaitBorder();\r
+\r
+/* bitmap functions */\r
+bitmap_t modexLoadPcx(char *filename);\r
+\r
+/* -======================= Constants & Vars ==========================- */\r
+extern byte far* VGA; /* The VGA Memory */\r
+#define VIDEO_INT 0x10\r
+#define SET_MODE 0x00\r
+#define VGA_256_COLOR_MODE 0x13\r
+#define TEXT_MODE 0x03\r
+#define SCREEN_WIDTH 320\r
+#define SCREEN_HEIGHT 240\r
+#define PAGE_SIZE (word)(SCREEN_WIDTH/4 * SCREEN_HEIGHT)\r
+\r
+#define SC_INDEX 0x03c4\r
+#define SC_DATA 0x03c5\r
+#define CRTC_INDEX 0x03d4\r
+#define CRTC_DATA 0x03d5\r
+#define MISC_OUTPUT 0x03c2\r
+#define HIGH_ADDRESS 0x0C\r
+#define LOW_ADDRESS 0x0D\r
+#define VRETRACE 0x08\r
+#define INPUT_STATUS_1 0x03da\r
+#define DISPLAY_ENABLE 0x01\r
+#define MAP_MASK 0x02\r
+#define PAL_READ_REG 0x03C7 /* Color register, read address */\r
+#define PAL_WRITE_REG 0x03C8 /* Color register, write address */\r
+#define PAL_DATA_REG 0x03C9 /* Color register, data port */\r
+#define PAL_SIZE (256 * 3)\r
+#endif\r
--- /dev/null
+/*\r
+ * Just some handy typedefs that make it easier to think about the low\r
+ * level code\r
+ */\r
+\r
+typedef unsigned char byte;\r
+typedef unsigned short word;\r
+typedef unsigned long dword;\r
+typedef signed char sbyte;\r
+typedef signed short sword;\r
+typedef signed long sdword;
-#include "src\lib\lib_com.h"\r
+//#include "src\lib\lib_com.h"
+#include "lib\lib_com.h"
\r
/* local function */\r
void wait(clock_t wait);\r
#include <dos.h>\r
#include <stdio.h>\r
#include <conio.h> // just for wait\r
-#include <time.h> // just for wait\r
+#include <time.h> // just for wait
+#include "lib\types.h"\r
\r
/* Control codes for all keys on the keyboard */\r
//here temperarly\r
#define KEY_MENU (0x75)\r
\r
\r
-typedef unsigned char byte;
-typedef unsigned int word;
-typedef unsigned short syte;\r
+//typedef unsigned char byte;
+//typedef unsigned int word;
+//typedef unsigned short syte;\r
\r
void wait(clock_t wait);\r
\r
\r
/* don't show the drawing page */
// printf("=======\n");\r
- modexShowPage(VGA + PAGE_SIZE);\r
+ //modexShowPage(VGA + PAGE_SIZE);\r
// printf("========\n");
\r
/* clear and draw one sprite and one bitmap */
// printf("=========\n");\r
- modexClearRegion(VGA, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
+ //modexClearRegion(VGA, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
// printf("==========\n");\r
/*modexDrawBmp(VGA, 20, 20, &bmp2, 0);\r
modexDrawBmp(VGA, 180, 20, &bmp, 1);\r
//modexDrawBmp(VGA, 100, 40, &bmp2, 1);\r
//modexDrawBmp(VGA, 0, 20, &bmp3, 0);\r
//modexDrawBmp(VGA, 120, 60, &bmp3, 1);\r
- modexShowPage(VGA);\r
+ //modexShowPage(VGA);\r
// for(index = 0; index<500; index++) {\r
//while(1/*!kbhit()*/){ // conditions of screen saver\r
while (!kbhit()){ /* Wait for a keystroke */\r
-wpp /d1 /0 /ml dos_gfx\r
+wpp /d2 /0 /ml dos_gfx
+rem wcl -0 -d2 -ml -c lib\modex16.c
wlink debug c option cvp file 'dos_gfx' library 'lib\x\modex.lib' name dos_gfx\r
copy /y dos_gfx.exe c:\z\bakapi.exe\r