If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!
The 4th Unit (Sharp X68000)
Jump to navigation
Jump to search
Cleanup > Pages missing date references
Cleanup > Pages missing developer references
Cleanup > Pages missing publisher references
Cleanup > To do
Games > Games by content > Games with uncompiled source code
Games > Games by developer > Games developed by Data West
Games > Games by platform > Sharp X68000 games
Games > Games by publisher > Games published by Data West
Games > Games by release date > Games released in 1988
Games > Games by release date > Games released in December
Games > Games by release date > Games released in December > Games released on December 5
The 4th Unit |
---|
Also known as: Dai 4 no Unit This game has uncompiled source code. |
To do: There also seems to be an SDK "X68k BASIC to C Converter" on Disk 1 and other .X executables. |
Contents
- 1 Leftover SDK Headers
- 1.1 ctype.h
- 1.2 assert.h
- 1.3 fefunc.h
- 1.4 conio.h
- 1.5 float.h
- 1.6 iocslib.h
- 1.7 jstring.h
- 1.8 error.h
- 1.9 limits.h
- 1.10 math.h
- 1.11 setjmp.h
- 1.12 stdio.h
- 1.13 basic.h
- 1.14 time.h
- 1.15 signal.h
- 1.16 stat.h
- 1.17 fcntl.h
- 1.18 class.h
- 1.19 mouse.h
- 1.20 stick.h
- 1.21 sprite.h
- 1.22 doslib.h
- 1.23 music.h
- 1.24 audio.h
- 1.25 basic0.h
- 1.26 graph.h
- 1.27 string.h
- 1.28 image.h
- 1.29 stdlib.h
- 1.30 process.h
- 1.31 direct.h
- 1.32 utime.h
- 1.33 timeb.h
- 1.34 jfctype.h
- 1.35 fctype.h
- 1.36 io.h
- 1.37 fdef.h
- 2 C Source
- 3 BASIC Sprite Pattern Editor
Leftover SDK Headers
Present throughout Disk 1 are various .h files that seem to be from the X68000 SDK. Although the files don't have filenames (due to not being in the file table), they are labelled in a comment at the start of the file. Judging by the deleted files and folders listed in the filetables, it appears that the source was stored on the master disk but later deleted before copying.
ctype.h
/* * ctype.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define __U 1 #define __L 2 #define __N 4 #define __S 8 #define __P 16 #define __C 32 #define __B 64 #define __X 128 extern char _ctype[]; /*********** ctype macros ****************/ #define isalpha(c) (_ctype[(c)+1]&(__U|__L)) #define isupper(c) (_ctype[(c)+1]&__U) #define islower(c) (_ctype[(c)+1]&__L) #define isdigit(c) (_ctype[(c)+1]&__N) #define isxdigit(c) (_ctype[(c)+1]&__X) #define isspace(c) (_ctype[(c)+1]&__S) #define ispunct(c) (_ctype[(c)+1]&__P) #define isalnum(c) (_ctype[(c)+1]&(__U|__L|__N)) #define isprint(c) (_ctype[(c)+1]&(__P|__U|__L|__N|__B)) #define isgraph(c) (_ctype[(c)+1]&(__P|__U|__L|__N)) #define iscntrl(c) (_ctype[(c)+1]&__C) #define isascii(c) ((unsigned)(c)<=127) #define iscsym(c) (isalnum(c)||(((c)&127)==0x5f)) #define iscsymf(c) (isalpha(c)||(((c)&127)==0x5f)) #define toupper(c) (islower(c)?((c)-('a'-'A')):(c)) #define tolower(c) (isupper(c)?((c)+('a'-'A')):(c)) #define toascii(c) ((c)&127) #ifndef NULL #define NULL 0 #endif
assert.h
/* * assert.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifndef NDEBUG #define assert(exp) {if (!(exp)) {fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}} #else #define assert(exp) #endif /* NDEBUG */
fefunc.h
.nlist * * fefunc.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson * FPACK macro callname dc.w callname endm **************************************** __LMUL EQU $FE00 d0=d0*d1 __LDIV EQU $FE01 d0=d0/d1 __LMOD EQU $FE02 d0=d0 mod d1 * EQU $FE03 __UMUL EQU $FE04 d0=d0*d1 __UDIV EQU $FE05 d0=d0/d1 __UMOD EQU $FE06 d0=d0 mod d1 * EQU $FE07 __IMUL EQU $FE08 d0d1=d0*d1 __IDIV EQU $FE09 d0アマリd1=d0/d1 * EQU $FE0A * EQU $FE0B __RANDOMIZE EQU $FE0C err=d0(0~65535) __SRAND EQU $FE0D err=d0(-32768~32767) __RAND EQU $FE0E d0=rand() * EQU $FE0F ************************************* __STOL EQU $FE10 d0=(a0).10進 __LTOS EQU $FE11 (a0)..=d0 __STOH EQU $FE12 d0=(a0).16進 __HTOS EQU $FE13 (a0)..=d0 __STOO EQU $FE14 d0=(a0).8進 __OTOS EQU $FE15 (a0)..=d0 __STOB EQU $FE16 d0=(a0).2進 __BTOS EQU $FE17 (a0)..=d0 __IUSING EQU $FE18 (a0)..=d0,d1桁 * EQU $FE19 ************************************* __LTOD EQU $FE1A d0d1=d0 __DTOL EQU $FE1B d0=d0d1 __LTOF EQU $FE1C d0=d0 __FTOL EQU $FE1D d0=d0 __FTOD EQU $FE1E d0d1=d0 __DTOF EQU $FE1F d0=d0d1 ************************************* __VAL EQU $FE20 d0d1=(a0).16/10/8/2進 __USING EQU $FE21 (a0)..=d0d1,d2.d3,d4 __STOD EQU $FE22 d0d1,d2,d3=(a0)10進 __DTOS EQU $FE23 (a0)..=d0d1 __ECVT EQU $FE24 (a0),d0,d1=d0d1,d2全体桁 __FCVT EQU $FE25 (a0),d0,d1=d0d1,d2小数点桁 __GCVT EQU $FE26 (a0)..=d0d1,d2全体桁 * EQU $FE27 ************************************* __DTST EQU $FE28 z=d0d1 __DCMP EQU $FE29 z,c=d0d1-d2d3 __DNEG EQU $FE2A d0d1=neg(d0d1) __DADD EQU $FE2B d0d1=d0d1+d2d3 __DSUB EQU $FE2C d0d1=d0d1-d2d3 __DMUL EQU $FE2D d0d1=d0d1*d2d3 __DDIV EQU $FE2E d0d1=d0d1/d2d3 __DMOD EQU $FE2F d0d1=d0d1 mod d2d3 ************************************* __DABS EQU $FE30 d0d1=abs(d0d1) __DCEIL EQU $FE31 d0d1=ceil(d0d1) __DFIX EQU $FE32 d0d1=fix(d0d1) __DFLOOR EQU $FE33 d0d1=floor(d0d1) __DFRAC EQU $FE34 d0d1=frac(d0d1) __DSGN EQU $FE35 d0d1=sgn(d0d1) __SIN EQU $FE36 d0d1=sin(d0d1) __COS EQU $FE37 d0d1=cos(d0d1) __TAN EQU $FE38 d0d1=tan(d0d1) __ATAN EQU $FE39 d0d1=atan(d0d1) __LOG EQU $FE3A d0d1=ln(d0d1) __EXP EQU $FE3B d0d1=exp(d0d1) __SQR EQU $FE3C d0d1=sqr(d0d1) __PI EQU $FE3D d0d1=pi() __NPI EQU $FE3E d0d1=pi(d0d1) __POWER EQU $FE3F d0d1=pow(d0d1,d2d3) __RND EQU $FE40 d0d1=rnd() * EQU $FE41 * EQU $FE42 * EQU $FE43 * EQU $FE44 * EQU $FE45 * EQU $FE46 * EQU $FE47 * EQU $FE48 __DFREXP EQU $FE49 D0D1,D2=D0D1 __DLDEXP EQU $FE4A D0D1=D0D1,D2 __DADDONE EQU $FE4B d0d1=d0d1+1# __DSUBONE EQU $FE4C d0d1=d0d1-1# __DDIVTWO EQU $FE4D d0d1=d0d1/2# __DIEECNV EQU $FE4E d0d1=d0d1 __IEEDCNV EQU $FE4F d0d1=d0d1 ************************************* __FVAL EQU $FE50 __FUSING EQU $FE51 __STOF EQU $FE52 __FTOS EQU $FE53 __FECVT EQU $FE54 __FFCVT EQU $FE55 __FGCVT EQU $FE56 * EQU $FE57 ************************************* __FTST EQU $FE58 __FCMP EQU $FE59 __FNEG EQU $FE5A __FADD EQU $FE5B __FSUB EQU $FE5C __FMUL EQU $FE5D __FDIV EQU $FE5E __FMOD EQU $FE5F ************************************* __FABS EQU $FE60 __FCEIL EQU $FE61 __FFIX EQU $FE62 __FFLOOR EQU $FE63 __FFRAC EQU $FE64 __FSGN EQU $FE65 __FSIN EQU $FE66 __FCOS EQU $FE67 __FTAN EQU $FE68 __FATAN EQU $FE69 __FLOG EQU $FE6A __FEXP EQU $FE6B __FSQR EQU $FE6C __FPI EQU $FE6D __FNPI EQU $FE6E __FPOWER EQU $FE6F __FRND EQU $FE70 * EQU $FE71 * EQU $FE72 * EQU $FE73 * EQU $FE74 * EQU $FE75 * EQU $FE76 * EQU $FE77 * EQU $FE78 __FFREXP EQU $FE79 __FLDEXP EQU $FE7A __FADDONE EQU $FE7B __FSUBONE EQU $FE7C __FDIVTWO EQU $FE7D __FIEECNV EQU $FE7E __IEEFCNV EQU $FE7F __CLMUL EQU $FEE0 __CLDIV EQU $FEE1 __CLMOD EQU $FEE2 __CUMUL EQU $FEE3 __CUDIV EQU $FEE4 __CUMOD EQU $FEE5 __CLTOD EQU $FEE6 __CDTOL EQU $FEE7 __CLTOF EQU $FEE8 __CFTOL EQU $FEE9 __CFTOD EQU $FEEA __CDTOF EQU $FEEB __CDCMP EQU $FEEC __CDADD EQU $FEED __CDSUB EQU $FEEE __CDMUL EQU $FEEF __CDDIV EQU $FEF0 __CDMOD EQU $FEF1 __CFCMP EQU $FEF2 __CFADD EQU $FEF3 __CFSUB EQU $FEF4 __CFMUL EQU $FEF5 __CFDIV EQU $FEF6 __CFMOD EQU $FEF7 __CDTST EQU $FEF8 __CFTST EQU $FEF9 __CDINC EQU $FEFA __CFINC EQU $FEFB __CDDEC EQU $FEFC __CFDEC EQU $FEFD __FEVARG EQU $FEFE >d0,d1 __FEVECS EQU $FEFF d0,a0>d0 .list
conio.h
/* * conio.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD char *cgets(char *); int cprintf(char *,); void cputs(char *); int cscanf(char *,); int getch(); int getche(); int kbhit(); void putch(int); int ungetch(int); #else char *cgets(); int cprintf(); void cputs(); int cscanf(); int getch(); int getche(); int kbhit(); void putch(); int ungetch(); #endif
float.h
/* * float.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define FLT_RADIX 2 /* radix of exponent */ #define DBL_MAX_EXP 308 /* max decimal exponent for double */ #define DBL_MIN_EXP -308 /* min decimal exponent for double */ #define DBL_DIG 14 /* max decimal digits for double */ #define HUGE_VAL 3.5953862697246E+308 /* huge double value */ /* 1.1125369292536E-308 */ #ifndef NULL #define NULL 0 #endif
iocslib.h
/* * iocslib.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #include <class.h> struct REGS { int d0; int d1; int d2; int d3; int d4; int d5; int d6; int d7; int a1; int a2; int a3; int a4; int a5; int a6; }; /* * */ struct FNTBUF { WORD xl; WORD yl; UBYTE buffer[72]; /* #define FNT_PAT_BUF 72 (=MAX) */ }; /* * */ struct CLIPXY { WORD xs; WORD ys; WORD xe; WORD ye; }; /* * */ struct CHAIN { INT adr; UWORD len; }; /* * */ struct CHAIN2 { INT adr; UWORD len; struct CHAIN2 *next; /* =NULLPTRなら終わり。 */ }; /* * */ struct PSETPTR{ WORD x; WORD y; UWORD color; }; /* * */ struct POINTPTR{ WORD x; WORD y; UWORD color; }; /* * */ struct LINEPTR{ WORD x1; WORD y1; WORD x2; WORD y2; UWORD color; UWORD linestyle; }; /* * */ struct BOXPTR{ WORD x1; WORD y1; WORD x2; WORD y2; UWORD color; UWORD linestyle; }; /* * */ struct FILLPTR{ WORD x1; WORD y1; WORD x2; WORD y2; UWORD color; }; /* * */ struct CIRCLEPTR{ WORD x; WORD y; UWORD radius; UWORD color; WORD start; WORD end; UWORD ratio; }; /* * */ struct PAINTPTR{ WORD x; WORD y; UWORD color; UBYTE * buf_start; UBYTE * buf_end; }; /* * */ struct SYMBOLPTR{ WORD x1; WORD y1; UBYTE *string_address; UBYTE mag_x; UBYTE mag_y; UWORD color; UBYTE font_type; UBYTE angle; }; /* * */ struct GETPTR{ WORD x1; WORD y1; WORD x2; WORD y2; UBYTE * buf_start; UBYTE * buf_end; }; /* * */ struct PUTPTR{ WORD x1; WORD y1; WORD x2; WORD y2; UBYTE * buf_start; UBYTE * buf_end; }; /* * */ struct XLINEPTR{ UWORD vram_page; WORD x; WORD y; WORD x1; UWORD line_style; }; /* * */ struct YLINEPTR{ UWORD vram_page; WORD x; WORD y; WORD y1; UWORD line_style; }; /* * */ struct TBOXPTR{ UWORD vram_page; WORD x; WORD y; WORD x1; WORD y1; UWORD line_style; }; /* * */ struct TXFILLPTR{ UWORD vram_page; WORD x; WORD y; WORD x1; WORD y1; UWORD fill_patn; }; /* * */ struct TREVPTR{ UWORD vram_page; WORD x; WORD y; WORD x1; WORD y1; }; /* * PATST */ struct PATST { short OFFSETX; short OFFSETY; short shadow[16]; short pattern[16]; }; /* * */ #ifdef FORWORD int TRAP15(struct REGS *,struct REGS *); int B_KEYINP(); int B_KEYSNS(); int B_SFTSNS(); int BITSNS(int); void SKEYSET(int); void TVCTRL(int); void LEDMOD(int,int); int TGUSEMD(int,int); int DEFCHR(int,int,UBYTE *); int CRTMOD(int); int CONTRAST(int); int HSVTORGB(int,int,int); int TPALET(int,int); int TPALET2(int,int); void TCOLOR(int); int FNTGET(int,int,struct FNTBUF *); void TEXTGET(int,int,struct FNTBUF *); void TEXTPUT(int,int,struct FNTBUF *); void CLIPPUT(int,int,struct FNTBUF *,struct CLIPXY *); int SCROLL(int,int,int); void B_CURON(); void B_CUROFF(); int B_PUTC(int); int B_PRINT(UBYTE *); int B_COLOR(int); int B_LOCATE(int,int); void B_DOWN_S(); void B_UP_S(); void B_UP(int); void B_DOWN(int); void B_RIGHT(int); void B_LEFT(int); void B_CLR_ED(); void B_CLR_ST(); void B_CLR_AL(); void B_ERA_ED(); void B_ERA_ST(); void B_ERA_AL(); void B_INS(int); void B_DEL(int); int B_CONSOL(int,int,int,int); int B_PUTMES(int,int,int,int,UBYTE *); int SET232C(int); int LOF232C(); int INP232C(); int ISNS232C(); int OSNS232C(); void OUT232C(int); int JOYGET(int); int INIT_PRN(int,int); int SNSPRN(); void OUTLPT(int); void OUTPRN(int); int B_SEEK(int,int); int B_VERIFY(int,int,int,UBYTE *); int B_READDI(int,int,int,UBYTE *); int B_DSKINI(UBYTE *,int); int B_DRVSNS(int); int B_WRITE(int,int,int,UBYTE *); int B_READ(int,int,int,UBYTE *); int B_RECALI(int); int B_ASSIGN(int,int,int,UBYTE *); int B_WRITED(int,int,int,UBYTE *); int B_READID(int,int,UBYTE *); int B_BADFMT(int,int,int); int B_READDL(int,int,int,UBYTE *); int B_FORMAT(int,int,int,UBYTE *); int B_DRVCHK(int,int); int B_EJECT(int); int BINDATEBCD(int); void BINDATESET(int); int TIMEBCD(int); void TIMESET(int); int BINDATEGET(); int DATEBIN(int); int TIMEGET(); int TIMEBIN(int); int DATECNV(UBYTE *); int TIMECNV(UBYTE *); int DATEASC(int,UBYTE *); int TIMEASC(int,UBYTE *); void DAYASC(int,UBYTE *); int ALARMMOD(int); int ALARMSET(int,int,int); int ALARMGET(int*,int*,int*); void ADPCMOUT(UBYTE *,int,int); void ADPCMINP(UBYTE *,int,int); void ADPCMAOT(struct CHAIN *,int,int); void ADPCMAIN(struct CHAIN *,int,int); void ADPCMLOT(struct CHAIN2 *,int); void ADPCMLIN(struct CHAUN2 *,int); int ADPCMSNS(); void ADPCMMOD(int); int OPMSET(int,int); int OPMSNS(); int OPMINTST(UBYTE *); int TIMERDST(UBYTE *,int,int); int VDISPST(UBYTE *,int,int); int CRTCRAS(UBYTE *,int); int HSYNCST(UBYTE *); int PRNINTST(UBYTE *); void MS_INIT(); void MS_CURON(); void MS_CUROF(); int MS_STAT(); int MS_GETDT(); int MS_CURGT(); int MS_CURST(int,int); int MS_LIMIT(int,int,int,int); int MS_OFFTM(int,int); int MS_ONTM(int,int); void MS_PATST(int,struct PATST *); void MS_SEL(int); void MS_SEL2(UBYTE *); int SKEY_MOD(int,int,int); void DENSNS(); int ONTIME(); int B_INTVCS(int,int); int B_SUPER(int); int B_BPEEK(UBYTE *); int B_WPEEK(UWORD *); int B_LPEEK(ULONG *); void B_MEMSTR(UBYTE *,UBYTE *,int); void B_BPOKE(UBYTE *,int); void B_WPOKE(UWORD *,int); void B_LPOKE(ULONG *,int); void B_MEMSET(UBYTE *,UBYTE *,int); void DMAMOVE(UBYTE *,UBYTE *,int,int); void DMAMOV_A(struct CHAIN *,UBYTE*,int,int); void DMAMOV_L(struct CHAIN2 *,UBYTE *,int); int DMAMODE(); int BOOTINF(); int ROMVER(); void G_CLR_ON(); int GPALET(int,int); int SFTJIS(int); int JISSFT(int); int AKCONV(int,int); int RMACNV(int,UBYTE *,UBYTE *); int DAKJOB(UBYTE *); int HANJOB(UBYTE *); void OS_CURON(); void OS_CUROF(); int APAGE(int); int VPAGE(int); int HOME(int,int,int); int WINDOW(int,int,int,int); int WIPE(); int PSET(struct PSETPTR *); int POINT(struct POINTPTR *); int LINE(struct LINEPTR *); int BOX(struct BOXPTR *); int FILL(struct FILLPTR *); int CIRCLE(struct CIRCLEPTR *); int PAINT(struct PAINTPTR *); int SYMBOL(struct SYMBOLPTR *); int GETGRM(struct GETPTR *); int PUTGRM(struct PUTPTR *); int SP_INIT(); int SP_ON(); void SP_OFF(); int SP_CGCLR(int); void SP_DEFCG(int,int,UBYTE *); int SP_GTPCG(int,int,UBYTE *); int SP_REGST(int,int,int,int,int,int); int SP_REGGT(int,int*,int*,int*,int*); int BGSCRLST(int,int,int); int BGSCRLGT(int,int*,int*); int BGCTRLST(int,int,int); int BGCTRLGT(int); int BGTEXTCL(int,int); int BGTEXTST(int,int,int,int); int BGTEXTGT(int,int,int); int SPALET(int,int,int); void TXXLINE(struct XLINEPTR *); void TXYLINE(struct YLINEPTR *); void TXBOX(struct XBOXPTR *); void TXFILL(struct TXFILLPTR *); void TXREV(struct TREVPTR *); void TXRASCPY(int,int,int); void ABORTRST(); void IPLERR(); void ABORTJOB(); #else int TRAP15(); int B_KEYINP(); int B_KEYSNS(); int B_SFTSNS(); int BITSNS(); void SKEYSET(); void TVCTRL(); void LEDMOD(); int TGUSEMD(); int DEFCHR(); int CRTMOD(); int CONTRAST(); int HSVTORGB(); int TPALET(); int TPALET2(); void TCOLOR(); int FNTGET(); void TEXTGET(); void TEXTPUT(); void CLIPPUT(); int SCROLL(); void B_CURON(); void B_CUROFF(); int B_PUTC(); int B_PRINT(); int B_COLOR(); int B_LOCATE(); void B_DOWN_S(); void B_UP_S(); void B_UP(); void B_DOWN(); void B_RIGHT(); void B_LEFT(); void B_CLR_ED(); void B_CLR_ST(); void B_CLR_AL(); void B_ERA_ED(); void B_ERA_ST(); void B_ERA_AL(); void B_INS(); void B_DEL(); int B_CONSOL(); int B_PUTMES(); int SET232C(); int LOF232C(); int INP232C(); int ISNS232C(); int OSNS232C(); void OUT232C(); int JOYGET(); int INIT_PRN(); int SNSPRN(); void OUTLPT(); void OUTPRN(); int B_SEEK(); int B_VERIFY(); int B_READDI(); int B_DSKINI(); int B_DRVSNS(); int B_WRITE(); int B_READ(); int B_RECALI(); int B_ASSIGN(); int B_WRITED(); int B_READID(); int B_BADFMT(); int B_READDL(); int B_FORMAT(); int B_DRVCHK(); int B_EJECT(); int BINDATEBCD(); void BINDATESET(); int TIMEBCD(); void TIMESET(); int BINDATEGET(); int DATEBIN(); int TIMEGET(); int TIMEBIN(); int DATECNV(); int TIMECNV(); int DATEASC(); int TIMEASC(); void DAYASC(); int ALARMMOD(); int ALARMSET(); int ALARMGET(); void ADPCMOUT(); void ADPCMINP(); void ADPCMAOT(); void ADPCMAIN(); void ADPCMLOT(); void ADPCMLIN(); int ADPCMSNS(); void ADPCMMOD(); int OPMSET(); int OPMSNS(); int OPMINTST(); int TIMERDST(); int VDISPST(); int CRTCRAS(); int HSYNCST(); int PRNINTST(); void MS_INIT(); void MS_CURON(); void MS_CUROF(); int MS_STAT(); int MS_GETDT(); int MS_CURGT(); int MS_CURST(); int MS_LIMIT(); int MS_OFFTM(); int MS_ONTM(); void MS_PATST(); void MS_SEL(); void MS_SEL2(); int SKEY_MOD(); void DENSNS(); int ONTIME(); int B_INTVCS(); int B_SUPER(); int B_BPEEK(); int B_WPEEK(); int B_LPEEK(); void B_MEMSTR(); void B_BPOKE(); void B_WPOKE(); void B_LPOKE(); void B_MEMSET(); void DMAMOVE(); void DMAMOV_A(); void DMAMOV_L(); int DMAMODE(); int BOOTINF(); int ROMVER(); void G_CLR_ON(); int GPALET(); int SFTJIS(); int JISSFT(); int AKCONV(); int RMACNV(); int DAKJOB(); int HANJOB(); void OS_CURON(); void OS_CUROF(); int APAGE(); int VPAGE(); int HOME(); int WINDOW(); int WIPE(); int PSET(); int POINT(); int LINE(); int BOX(); int FILL(); int CIRCLE(); int PAINT(); int SYMBOL(); int GETGRM(); int PUTGRM(); int SP_INIT(); int SP_ON(); void SP_OFF(); int SP_CGCLR(); void SP_DEFCG(); int SP_GTPCG(); int SP_REGST(); int SP_REGGT(); int BGSCRLST(); int BGSCRLGT(); int BGCTRLST(); int BGCTRLGT(); int BGTEXTCL(); int BGTEXTST(); int BGTEXTGT(); int SPALET(); void TXXLINE(); void TXYLINE(); void TXBOX(); void TXFILL(); void TXREV(); void TXRASCPY(); void ABORTRST(); void IPLERR(); void ABORTJOB(); #endif
jstring.h
/* * jstring.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int jstrcmp(unsigned char *,unsigned char *); int jstrncmp(unsigned char *,unsigned char *,int); unsigned char *jstrrchr(unsigned char *,int); unsigned char *jstrchr(unsigned char *,int); #else int jstrcmp(); int jstrncmp(); unsigned char *jstrrchr(); unsigned char *jstrchr(); #endif
error.h
/* * error.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define EPERM 1 #define ENOENT 2 #define ESRCH 3 #define EINTR 4 #define EIO 5 #define ENXIO 6 #define E2BIG 7 #define ENOEXEC 8 #define EBADF 9 #define ECHILD 10 #define EAGAIN 11 #define ENOMEM 12 #define EACCES 13 #define EFAULT 14 #define ENOTBLK 15 #define EBUSY 16 #define EEXIST 17 #define EXDEV 18 #define ENODEV 19 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 #define ENFILE 23 #define EMFILE 24 #define ENOTTY 25 #define ETXTBSY 26 #define EFBIG 27 #define ENOSPC 28 #define ESPIPE 29 #define EROFS 30 #define EMLINK 31 #define EPIPE 32 #define EDOM 33 #define ERANGE 34 extern int errno; #ifndef NULL #define NULL 0 #endif
limits.h
/* * limits.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define CHAR_BIT 8 /* bits per char */ #define CHAR_MAX 127 /* max value for char */ #define CHAR_MIN -128 /* min value for char */ #define SCHAR_MAX 127 /* max value for signed char */ #define SCHAR_MIN -128 /* min value for signed char */ #define UCHAR_MAX 255 /* max value for unsigned char */ #define SHRT_MAX 32767 /* max value for short int */ #define SHRT_MIN -32768 /* min value for short int */ #define USHRT_MAX 65535 /* max value for unsigned short int */ #define INT_MAX 2147483647 /* max value for int */ #define INT_MIN -2147483648 /* min value for int */ #define UINT_MAX 4294967295 /* max value for unsigned int */ #define LONG_MAX 2147483647 /* max value for long int */ #define LONG_MIN -2147483648 /* min value for long int */ #define ULONG_MAX 4294967295 /* max value for unsigned long int */ #ifndef NULL #define NULL 0 #endif
math.h
/* * math.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ /***** math exceptions ****/ struct exception { int type; char *name; double arg1, arg2; double retval; }; struct complex { double x,y; }; /** Exception type codes**/ #define DOMAIN 1 #define SING 2 #define OVERFLOW 3 #define UNDERFLOW 4 #define TLOSS 5 #define PLOSS 6 #define PI 3.1415926535898 #define PID2 1.5707963267949 /* PI/2 */ #define PID4 0.78539816339745 /* PI/4 */ #define I_PI 0.31830988618379 /* 1/PI */ #define I_PID2 0.63661977236758 /* 1/PID2 */ extern int errno; #ifdef FORWORD double atof(char *); double acos(double); double asin(double); double atan(double); double atan2(double, double); double cos(double); double sin(double); double tan(double); double cosh(double); double sinh(double); double tanh(double); double exp(double); double frexp(double, int *); double ldexp(double, int); double log(double); double log10(double); double modf(double, double *); double pow(double, double); double sqrt(double); double ceil(double); double fabs(double); double floor(double); double fmod(double, double); double hypot(double, double); double except(int, char *, double, double, double); int matherr(struct exception *); double cabs(struct complex *); #else double atof(); double acos(); double asin(); double atan(); double atan2(); double cos(); double sin(); double tan(); double cosh(); double sinh(); double tanh(); double exp(); double frexp(); double ldexp(); double log(); double log10(); double modf(); double pow(); double sqrt(); double ceil(); double fabs(); double floor(); double fmod(); double hypot(); double except(); int matherr(); double cabs(); #endif
setjmp.h
/* * setjmp.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ typedef struct { int _D3; int _D4; int _D5; int _D6; int _D7; int _A3; int _A4; int _A5; int _A6; int _A7; int _PC; } jmp_buf; #ifdef FORWORD int setjmp(jmp_buf *); void longjmp(jmp_buf *, int); #else int setjmp(); void longjmp(); #endif
stdio.h
/* * stdio.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ /* *#define MACRO stream function is macro ? */ #ifndef BUFSIZ #define BUFSIZ 1024 /* 書き直し注意 */ #endif #ifndef _NFILE #define _NFILE 40 /* 書き直し注意 */ #endif /* * CLIBを変更しなければ意味がありません * 変更ファイル STDIO.MAC * AS AR実行ファイル __MAIN.S _GETIOB.S FCLOSEAL.S FLUSHALL.S * FCLOSE.S SETBUF.S FREOPEN.S FOPEN.S */ #ifndef EOF #define EOF (-1) #endif #ifndef EOS #define EOS '\0' #endif #ifndef NULL #define NULL (char *)0 #endif typedef struct _iobuf { char *_ptr; int _cnt; char *_base; int _flag; int _bsize; char _file; char _pback; } FILE; extern FILE _iob[_NFILE]; #define stdin (&_iob[0]) #define stdout (&_iob[1]) #define stderr (&_iob[2]) #define stdaux (&_iob[3]) #define stdprn (&_iob[4]) #define _IOFBF 0x00 #define _IOREAD 0x01 #define _IOWRT 0x02 #define _IORW 0x100 #define _IONBF 0x08 #define _IOMYBUF 0x10 #define _IOEOF 0x20 #define _IOERR 0x40 #define _IOLBF 0x80 #ifdef MACRO #define getc(f) (--(f)->_cnt >= 0 ? 0xff & *(f)->_ptr++ : _filbuf(f)) #define putc(c,f) (--(f)->_cnt >= 0 ? 0xff & (*(f)->_ptr++ = (c)) : _flsbuf((c),(f))) #define getchar() getc(stdin) #define putchar(c) putc((c),stdout) #define feof(f) ((f)->_flag & _IOEOF) #define ferror(f) ((f)->_flag & _IOERR) #define fileno(f) ((f)->_file) #define clearerr(f) ((f)->_flag &= ~(_IOEOF+_IOERR)) #else #ifdef FORWORD int getc(FILE *); int putc(int,FILE *); int getchar(void); int putchar(int); int feof(FILE *); int ferror(FILE *); int fileno(FILE *); void clearerr(FILE *); #else int getc(); int putc(); int getchar(); int putchar(); int feof(); int ferror(); int fileno(); void clearerr(); #endif #endif #ifdef FORWORD int fclose(FILE *); int fflush(FILE *); FILE *fopen(char *, char *); FILE *freopen(char *, char *, FILE *); void setbuf(FILE *, char *); int setvbuf(FILE *, char *, int, int); int fprintf(FILE *, char *,); int fscanf(FILE *, char *,); int printf(char *,); int scanf(char *,); int sprintf(char *, char *,); int sscanf(char *, char *,); int fgetc(FILE *); char *fgets(char *, int, FILE *); int fputc(int, FILE *); int fputs(char *, FILE *); char *gets(char *); int puts(char *); int ungetc(int, FILE *); int fread(char *, int, int, FILE *); int fwrite(char *, int, int, FILE *); int fseek(FILE *, long, int); long ftell(FILE *); void rewind(FILE *); void perror(char *); int fcloseall(void); int flushall(void); int fputchar(int); void clrerr(FILE *); void fmode(FILE *, int); int getw(FILE *); int fgetchar(void); int getl(FILE *); int putl(long,FILE *); int putw(short,FILE *); int setnbf(FILE *); FILE *fdopen(int, char *); #else int fclose(); int fflush(); FILE *fopen(); FILE *freopen(); void setbuf(); int setvbuf(); int fprintf(); int fscanf(); int printf(); int scanf(); int sprintf(); int sscanf(); int fgetc(); char *fgets(); int fputc(); int fputs(); char *gets(); int puts(); int ungetc(); int fread(); int fwrite(); int fseek(); long ftell(); void rewind(); void perror(); int fcloseall(); int flushall(); int fputchar(); void clrerr(); void fmode(); int getw(); int fgetchar(); int getl(); int putl(); int putw(); int setnbf(); FILE *fdopen(); #endif /* * end of stdio.h */
basic.h
/* * basic.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int asc(char *); double atof(char *); int atoi(char *); char *b_binS(char *,int); char *b_chrS(char *,int); char *ecvt(double,int,int *,int *); char *fcvt(double,int,int *,int *); double fix(double); char *gcvt(double,int,char *); char *b_hexS(char *,int); char *b_itoa(char *,int); char *b_octS(char *,int); int toascii(char); int tolower(char); int toupper(char); double val(char *); int dskf(int); int b_fclose(int); int b_fcloseall(void); int b_feof(int); int b_fgetc(int); int b_fopen(char *,char *); int b_fputc(char,int); int b_fread(void *,int,int,int); int b_freads(char *,int,int); int b_fseek(int,int,int); int b_fwrite(void *,int,int,int); int b_fwrites(char *,int); double atan(double); double cos(double); double exp(double); double log(double); double pow(double,double); int rand(void); void randomize(int); double rnd(void); double sgn(double); double sin(double); double sqrt(double); void srand(int); double tan(double); int instr(int,char *,char *); int isalnum(char); int isalpha(char); int isascii(char); int iscntrl(char); int isdigit(char); int isgraph(char); int islower(char); int isprint(char); int ispunct(char); int isspace(char); int isupper(char); int isxdigit(char); char *b_leftS(char *,char *,int); char *b_midS(char *,char *,int,int); char *b_mirrorS(char *,char *); char *b_rightS(char *,char *,int); int b_strchr(char *,char); int strcspn(char *,char *); char *b_stringS(char *,int,char *); int strlen(char *); char *strlwr(char *); char *strnset(char *,char,int); int b_strrchr(char *,char); char *strrev(char *); char *strset(char *,char); int strspn(char *,char *); char *b_strtok(char *,char *); char *strupr(char *); void frename(char *,char *); void fdelete(char *); #else int asc(); double atof(); int atoi(); char *b_binS(); char *b_chrS(); char *ecvt(); char *fcvt(); double fix(); char *gcvt(); char *b_hexS(); char *b_itoa(); char *b_octS(); int toascii(); int tolower(); int toupper(); double val(); int dskf(); int b_fclose(); int b_fcloseall(); int b_feof(); int b_fgetc(); int b_fopen(); int b_fputc(); int b_fread(); int b_freads(); int b_fseek(); int b_fwrite(); int b_fwrites(); double atan(); double cos(); double exp(); double log(); double pow(); int rand(); void randomize(); double rnd(); double sgn(); double sin(); double sqrt(); void srand(); double tan(); int instr(); int isalnum(); int isalpha(); int isascii(); int iscntrl(); int isdigit(); int isgraph(); int islower(); int isprint(); int ispunct(); int isspace(); int isupper(); int isxdigit(); char *b_leftS(); char *b_midS(); char *b_mirrorS(); char *b_rightS(); int b_strchr(); int strcspn(); char *b_stringS(); int strlen(); char *strlwr(); char *strnset(); int b_strrchr(); char *strrev(); char *strset(); int strspn(); char *b_strtok(); char *strupr(); void frename(); void fdelete(); #endif
time.h
/* * time.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ extern int daylight; extern long timezone; extern char *tzname[2]; extern char tzstn[]; extern char tzdtn[]; /* template of tm "gmtime" */ struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; }; #ifndef NULL #define NULL 0 #endif #ifdef FORWORD long time(long *); char *asctime(struct tm *); char *ctime(long *); struct tm *gmtime(long *); struct tm *localtime(long *); void tzset(void); #else long time(); char *asctime(); char *ctime(); struct tm *gmtime(); struct tm *localtime(); void tzset(); #endif
signal.h
/* * signal.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define NSIG 1 #define SIG_DFL (int (*)())0 #define SIG_IGN (int (*)())1 #define SIGINT 0xfff1 /*rts dc.w $fff1 */ #ifdef FORWORD void (*signal(int, void (*)()))(int); #else void (*signal())(); #endif
stat.h
/* * stat.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ struct stat { short st_dev; /*デバイス番号(ディスク・ドライブ番号)*/ int st_ino; /*inode番号*/ short st_mode; /*ファイルタイプとファイル属性*/ short st_nlink; /*(1)リンクカウント*/ short st_uid; /*(0)ユーザID*/ short st_gid; /*(0)グループID*/ short st_rdev; /*rawデバイス番号*/ int st_size; /*ファイル・サイズ*/ int st_atime; /*アクセス時刻*/ int st_mtime; /*モディファィ時刻*/ int st_ctime; /*クリエイト時刻*/ }; /*st_mode*/ #define S_IREAD 0 /*読み込み可能*/ #define S_IWRITE 1 /*書き込み可能*/ #define S_IFDIR 16 /*ディレクトリー*/ #define S_IFREG 32 /*通常*/ #define S_IEXEC 64 /*実行*/ #define S_IFCHR 128 /*デバイス*/ #ifdef FORWORD int fstat(int, struct stat *); int stat(char *, struct stat *); #else int fstat(); int stat(); #endif
fcntl.h
/* * fcntl.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ /*************************************************************************/ /** ストリーム入出力,低水準I/O関数用マクロ 2 **/ /*************************************************************************/ #define O_RDONLY 0x00000001 /*読み込み専用 */ #define O_WRONLY 0x00000002 /*書き込み専用 */ #define O_APPEND 0x00000004 /*アペンド・モード */ #define O_RDWR 0x00000100 /*読み書き可能 */ #define O_BINARY 0x00000400 /*バイナリ・モード */ #define O_TEXT 0x00000800 /*テキスト・モード */ #define O_TRUNC 0x00001000 /*ファイル・サイズを0に切り詰める */ #define O_EXCL 0x00002000 /*ファイルが存在している時エラーとする */ #define O_CREAT 0x00004000 /*ファイルが存在しない時は作成 */ #define O_EOF 0x00008000 /*EOFに達したことを表す */ #define STDIN 0 #define STDOUT 1 #define STDERR 2 #define STDAUX 3 #define STDPRN 4
class.h
/* * class.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define INT int #define UINT unsigned int #define WORD short #define UWORD unsigned short #define BYTE char #define UBYTE unsigned char #define VOID void #define DEFAULT int #define BOOLEAN int #define LONG long #define ULONG unsigned long /* */ #define REG register #define LOCAL auto #define MLOCAL static #define EXTERN extern
mouse.h
/* * mouse.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int mouse(int); int msarea(int,int,int,int); int msbtn(int,int,int); int mspos(int *,int*); int msstat(int *,int *,int *,int *); int setmspos(int,int); #else int mouse(); int msarea(); int msbtn(); int mspos(); int msstat(); int setmspos(); #endif
stick.h
/* * stick.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int stick(int); int strig(int); #else int stick(); int strig(); #endif
sprite.h
/* * sprite.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD void sp_clr(int,int); int sp_color(char,int,int); void sp_def(char,char *,int); void sp_disp(char); void sp_move(char,int,int,int); void sp_off(int,int); void sp_on(int,int); void sp_pat(char,char *,int); int sp_init(void); int sp_set(char,int,int,int,int); int sp_stat(char,char); int bg_scroll(char,int,int); int bg_set(char,int,int); int bg_stat(char,char); int bg_fill(char,int); int bg_put(char,char,char,int); int bg_get(char,char,char); #else void sp_clr(); int sp_color(); void sp_def(); void sp_disp(); void sp_move(); void sp_off(); void sp_on(); void sp_pat(); int sp_init(); int sp_set(); int sp_stat(); int bg_scroll(); int bg_set(); int bg_stat(); int bg_fill(); int bg_put(); int bg_get(); #endif
doslib.h
/* * doslib.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #include <class.h> /* * */ struct PDBADR{ UINT env; UINT exit; UINT ctrlc; UINT errexit; UINT comline; UBYTE handle[12]; UINT bss; UINT heep; UINT stack; UINT usp; UINT ssp; UWORD sr; UWORD abort_sr; UINT abort_ssp; UINT trap10; UINT trap11; UINT trap12; UINT trap13; UINT trap14; UINT osflg; UBYTE reserve[28]; UBYTE exe_path[68]; UBYTE exe_name[24]; }; struct INPPTR{ UBYTE max; UBYTE length; UBYTE buffer[256]; }; /* * */ struct COMLINE{ UBYTE len; UBYTE buffer[255]; }; /* * */ struct NAMESTBUF{ UBYTE flg; UBYTE drive; UBYTE path[65]; UBYTE name1[8]; UBYTE ext[3]; UBYTE name2[10]; }; /* * */ struct FREEINF{ UWORD free; UWORD max; UWORD sec; UWORD byte; }; /* * */ struct NAMECKBUF{ UBYTE drive[2]; UBYTE path[65]; UBYTE name[19]; UBYTE ext[5]; }; /* * */ struct DPBPTR{ UBYTE drive; UBYTE unit; UWORD byte; UBYTE sec; UBYTE shift; UWORD fatsec; UBYTE fatcount; UBYTE fatlen; UWORD dircount; UWORD datasec; UWORD maxfat; UWORD dirsec; INT driver; UBYTE id; UBYTE flg; struct DPBPTR * next; UWORD dirfat; UBYTE dirbuf[64]; }; /* * */ struct FILBUF{ UBYTE os[21]; UBYTE atr; UWORD time; UWORD date; UINT filelen; UBYTE name[23]; }; /* * */ #ifdef FORWORD void EXIT(); int GETCHAR(); void PUTCHAR(int); int COMINP(); void COMOUT(int); void PRNOUT(int); int INPOUT(int); int INKEY(); int GETC(); void PRINT(UBYTE *); int GETS(struct INPPTR *); int KEYSNS(); int KFLUSHGP(); int KFLUSHIO(int); int KFLUSHIN(); int KFLUSHGC(); int KFLUSHGS(struct INPPTR *); int FFLUSH(); int CHGDRV(int); int DRVCTRL(int,int); int CONSNS(); int PRNSNS(); int CINSNS(); int COUTSNS(); int FATCHK(UBYTE *,UWORD *); int HENDSPMO(); int HENDSPMP(int,UBYTE *); int HENDSPMR(int,UBYTE *); void HENDSPMC(); int HENDSPIO(); int HENDSPIP(int,UBYTE *); int HENDSPIR(int,UBYTE *); int HENDSPIC(int); int HENDSPSO(); int HENDSPSP(int,UBYTE *); int HENDSPSR(int,UBYTE *); void HENDSPSC(); int CURDRV(); int GETSS(struct INPPTR *); int FGETC(int); int FGETS(struct INPPTR *,int); void FPUTC(int,int); void FPUTS(UBYTE *,int); void ALLCLOSE(); int SUPER(int); void FNCKEYGT(int,UBYTE *); void FNCKEYST(int,UBYTE *); int C_PUTC(int); int C_PRINT(UBYTE *); int C_COLOR(int); int C_LOCATE(int,int); int C_DOWN_S(); int C_UP_S(); int C_UP(int); int C_DOWN(int); int C_RIGHT(int); int C_LEFT(int); int C_CLS_ED(); int C_CLS_ST(); int C_CLS_AL(); int C_ERA_ED(); int C_ERA_ST(); int C_ERA_AL(); int C_INS(int); int C_DEL(int); int C_FNKMOD(int); int C_WINDOW(int,int); int C_WIDTH(int); int C_CURON(); int C_CUROFF(); int K_KEYINP(); int K_KEYSNS(); int K_SFTSNS(); int K_KEYBIT(int); void K_INSMOD(int); int INTVCS(int, char *); void PSPSET(struct PDBADR *); int GETTIM2(); int SETTIM2(int); int NAMESTS(UBYTE *,struct NAMESTBUF *); int GETDATE(); int SETDATE(int); int GETTIME(); int SETTIME(int); void VERIFY(int); int DUP0(int,int); int VERNUM(); void KEEPPR(int,int); int GETDPB(int,struct DPBPTR *); int BREAKCK(int); void DRVXCHG(int,int); int INTVCG(int); int DSKFRE(int,struct FREEINF *); int NAMECK(UBYTE *,struct NAMECKBUF *); int MKDIR(UBYTE *); int RMDIR(UBYTE *); int CHDIR(UBYTE *); int CREATE(UBYTE *,int); int OPEN(UBYTE *,int); int CLOSE(int); int READ(int,UBYTE *,int); int WRITE(int,UBYTE *,int); int DELETE(UBYTE *); int SEEK(int,int,int); int CHMOD(UBYTE *,int); int IOCTRLGT(int); int IOCTRLST(int,int); int IOCTRLRH(int,UBYTE *,int); int IOCTRLWH(int,UBYTE *,int); int IOCTRLRD(int,UBYTE *,int); int IOCTRLWD(int,UBYTE *,int); int IOCTRLIS(int); int IOCTRLOS(int); int DUP(int); int DUP2(int); int CURDIR(int,UBYTE *); int MALLOC(int); int MFREE(int); int SETBLOCK(int,int); int LOADEXEC(UBYTE *,struct COMLINE *,UBYTE *); int LOAD(UBYTE *,struct COMLINE *,UBYTE *); int PATHCHK(UBYTE *,struct COMLINE *,UBYTE *); int LOADONLY(UBYTE *,UBYTE *,UBYTE *); int EXECONLY(int); void EXIT2(int); int WAIT(); int FILES(struct FILBUF *,UBYTE *,int); int NFILES(struct FILBUF *); int SETPDB(struct PDBADR *); struct PDBADR * GETPDB(); int SETENV(int,UBYTE *,UBYTE *); int GETENV(int,UBYTE *,UBYTE *); int VERIFYG(); int MOVE(UBYTE *,UBYTE *); int RENAME(UBYTE *,UBYTE *); int FILEDATE(int,int); void DISKRED(UBYTE *,int,int,int); void DISKWRT(UBYTE *,int,int,int); #else void EXIT(); int GETCHAR(); void PUTCHAR(); int COMINP(); void COMOUT(); void PRNOUT(); int INPOUT(); int INKEY(); int GETC(); void PRINT(); int GETS(); int KEYSNS(); int KFLUSHGP(); int KFLUSHIO(); int KFLUSHIN(); int KFLUSHGC(); int KFLUSHGS(); int FFLUSH(); int CHGDRV(); int DRVCTRL(); int CONSNS(); int PRNSNS(); int CINSNS(); int COUTSNS(); int FATCHK(); int HENDSPMO(); int HENDSPMP(); int HENDSPMR(); void HENDSPMC(); int HENDSPIO(); int HENDSPIP(); int HENDSPIR(); int HENDSPIC(); int HENDSPSO(); int HENDSPSP(); int HENDSPSR(); void HENDSPSC(); int CURDRV(); int GETSS(); int FGETC(); int FGETS(); void FPUTC(); void FPUTS(); void ALLCLOSE(); int SUPER(); int FNCKEYGT(); void FNCKEYST(); int C_PUTC(); int C_PRINT(); int C_COLOR(); int C_LOCATE(); int C_DOWN_S(); int C_UP_S(); int C_UP(); int C_DOWN(); int C_RIGHT(); int C_LEFT(); int C_CLS_ED(); int C_CLS_ST(); int C_CLS_AL(); int C_ERA_ED(); int C_ERA_ST(); int C_ERA_AL(); int C_INS(); int C_DEL(); int C_FNKMOD(); int C_WINDOW(); int C_WIDTH(); int C_CURON(); int C_CUROFF(); int K_KEYINP(); int K_KEYSNS(); int K_SFTSNS(); int K_KEYBIT(); void K_INSMOD(); int INTVCS(); void PSPSET(); int GETTIM2(); int SETTIM2(); int NAMESTS(); int GETDATE(); int SETDATE(); int GETTIME(); int SETTIME(); void VERIFY(); int DUP0(); int VERNUM(); void KEEPPR(); int GETDPB(); int BREAKCK(); void DRVXCHG(); int INTVCG(); int DSKFRE(); int NAMECK(); int MKDIR(); int RMDIR(); int CHDIR(); int CREATE(); int OPEN(); int CLOSE(); int READ(); int WRITE(); int DELETE(); int SEEK(); int CHMOD(); int IOCTRLGT(); int IOCTRLST(); int IOCTRLRH(); int IOCTRLWH(); int IOCTRLRD(); int IOCTRLWD(); int IOCTRLIS(); int IOCTRLOS(); int DUP(); int DUP2(); int CURDIR(); int MALLOC(); int MFREE(); int SETBLOCK(); int LOADEXEC(); int LOAD(); int PATHCHK(); int LOADONLY(); int EXECONLY(); void EXIT2(); int WAIT(); int FILES(); int NFILES(); int SETPDB(); struct PDBADR * GETPDB(); int SETENV(); int GETENV(); int VERIFYG(); int MOVE(); int RENAME(); int FILEDATE(); void DISKRED(); void DISKWRT(); #endif
music.h
/* * music.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int m_alloc(char,int); int m_assign(char,char); int m_cont(int,int,int,int,int,int,int,int); int m_free(char); void m_init(void); int m_play(int,int,int,int,int,int,int,int); int m_stat(char); int m_stop(int,int,int,int,int,int,int,int); int m_tempo(char); int m_trk(char,char *); int m_vget(char,char *); int m_vset(char,char *); #else int m_alloc(); int m_assign(); int m_cont(); int m_free(); void m_init(); int m_play(); int m_stat(); int m_stop(); int m_tempo(); int m_trk(); int m_vget(); int m_vset(); #endif
audio.h
/* * audio.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD void a_play(void *,int,int,int,int); void a_rec(void *,int,int,int); int a_stat(); void a_end(); void a_stop(); void a_cont(); #else void a_play(); void a_rec(); int a_stat(); void a_end(); void a_stop(); void a_cont(); #endif
basic0.h
/* * basic0.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ static char STRCRLF[3]={13,10,0}; static char STRTAB[2]={9,0}; #ifdef FORWORD char *b_dateS(char *); char *b_timeS(char *); char *b_dayS(char *); int b_free(void); char *b_inkeyS(char *); char *b_inkey0(char *); char *b_striS(char *,int); char *b_strfS(char *,double); int csrlin(void); int pos(void); char *b_spaceS(char *,int); char *using(char *,char *,); void beep(void); void cls(void); void b_exit(int); void width(int); void color(int); void console(int,int,int); void b_input(char *,int,); void b_linput(char *,int); void locate(int,int); void b_sprint(char *); void b_iprint(int); void b_fprint(double); void b_tprint(int); void b_slprint(char *); void b_ilprint(int); void b_flprint(double); void b_tlprint(int); void key(int,char *); void screen(int,int,int,int); double pi(); double b_pi(double); int abs(int); double fabs(double); void b_setdate(char *); void b_settime(char *); void b_csw(int); void b_tpalet(int,int,int,int); void b_strncpy(int,char *,char *); int b_strcmp(char *,int,char *); char *b_stradd(char *,char *,char *,); void b_init(); int b_int(double); #else char *b_dateS(); char *b_timeS(); char *b_dayS(); int b_free(); char *b_inkeyS(); char *b_inkey0(); char *b_striS(); char *b_strfS(); int csrlin(); int pos(); char *b_spaceS(); char *using(); void beep(); void cls(); void b_exit(); void width(); void color(); void console(); void b_input(); void b_linput(); void locate(); void b_sprint(); void b_iprint(); void b_fprint(); void b_tprint(); void b_slprint(); void b_ilprint(); void b_flprint(); void b_tlprint(); void key(); void screen(); double pi(); double b_pi(); int abs(); double fabs(); void b_setdate(); void b_settime(); void b_csw(); void b_tpalet(); void b_strncpy(); int b_strcmp(); char *b_stradd(); void b_init(); int b_int(); #endif
graph.h
/* * graph.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD void apage(char); void box(int,int,int,int,int,int); void circle(int,int,int,int,int,int,int); void contrast(int); void fill(int,int,int,int,int); void get(int,int,int,int,void *,int); void home(int,int,int); int hsv(int,int,int); void line(int,int,int,int,int,int); void paint(int,int,int); void palet(int,int); int point(int,int); void pset(int,int,int); void put(int,int,int,int,void *,int); int rgb(int,int,int); void symbol(int,int,char *,char,char,int,int,int); void vpage(char); void window(int,int,int,int); void wipe(void); #else void apage(); void box(); void circle(); void contrast(); void fill(); void get(); void home(); int hsv(); void line(); void paint(); void palet(); int point(); void pset(); void put(); int rgb(); void symbol(); void vpage(); void window(); void wipe(); #endif
string.h
/* * string.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define stricmp strcmpi #ifndef NULL #define NULL #endif #ifdef FORWORD void *memcpy(char *, char *, int); char *strcpy(char *, char *); char *strncpy(char *, char *, int); char *strcat(char *, char *); char *strncat(char *, char *, int); int memcmp(void *, void *, int); int strcmpi(char *, char *); int strcmp(char *, char *); int strncmp(char *, char *, int); void *memchr(void *, int, int); char *strchr(char *, char); int strcspn(char *, char *); char *strpbrk(char *, char *); char *strrchr(char *, char); int strspn(char *, char *); char *strtok(char *, char *); void *memset(void *, int, int); int strlen(char *); char *strnset(char *, char, unsigned int); char *strlwr(char *); char *strupr(char *); char *strset(char *, char); char *strrev(char *); char *strdup(char *); void strins(char *, char *); void strsfn(char *, char *, char *, char *, char *); void strmfe(char *, char *, char *); void strmfn(char *, char *, char *, char *, char *); void strmfp(char *, char *, char *); int stcgfe(char *, char *); int strbpl(char **, int, char *); int stcgfn(char *, char *); long strtol(char *, char **, int); void strsrt(char **, int); char *memccpy(char *, char *, char, int); void movedata(char *,char *,int); void setmem(char *, unsigned, int); void movmem(char *, char *, int); void swmem(char *, char *, unsigned); void repmem(char *, char *, unsigned, int); #else void *memcpy(); char *strcpy(); char *strncpy(); char *strcat(); char *strncat(); int memcmp(); int strcmpi(); int strcmp(); int strncmp(); void *memchr(); char *strchr(); int strcspn(); char *strpbrk(); char *strrchr(); int strspn(); char *strtok(); void *memset(); int strlen(); char *strnset(); char *strlwr(); char *strupr(); char *strset(); char *strrev(); char *strdup(); void strins(); void strsfn(); void strmfe(); void strmfn(); void strmfp(); int stcgfe(); int strbpl(); int stcgfn(); long strtol(); void strsrt(); char *memccpy(); void movedata(); void setmem(); void movmem(); void swmem(); void repmem(); #endif
image.h
/* * image.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD void img_set(char,int,int,int,int); void img_still(char); void img_pos(char); void img_color(char); void v_cut(char); void crt(char); void img_ht(int,int,int,int,char,char); int img_save(char *,int,int); int img_load(char *,int,int,int); void img_scrn(char,char,char); void img_put(int,int,int,int,void *,int); int keysns(void); void img_home(int,int,char,char,char); #else void img_set(); void img_still(); void img_pos(); void img_color(); void v_cut(); void crt(); void img_ht(); int img_save(); int img_load(); void img_scrn(); void img_put(); int keysns(); void img_home(); #endif
stdlib.h
/* * stdlib.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ extern int errno; extern int _doserrno; extern unsigned char **environ; extern unsigned int _PSP; extern int _fmode; extern char *sys_errlist[]; extern int sys_nerr; #ifdef FORWORD int atoi(char *); long atol(char *); int rand(void); void srand(unsigned); void *calloc(unsigned, unsigned); void free(void *); void *malloc(unsigned); void *realloc(void *, unsigned); void abort(void); void exit(int); void _exit(int); char *getenv(char *); int system(char *); void *bsearch(void *, void *, unsigned, unsigned, int (*)(void *, void *)); void qsort(void *, unsigned, unsigned, int (*)(void *, void *)); int abs(int); short wabs(short); long labs(long); char *sbrk(int); int rlsmem(char *, unsigned); int rlsml(char *, long); char *getmem(unsigned); char *getml(long); void rbrk(void); void rstmem(void); long chkml(void); long sizmem(void); int bldmem(void); int allmem(void); int putenv(char *); void swaw(int *, int *, int); void swab(char *, char *, int); void lqsort(long *, int); void sqsort(short *, int); void fqsort(float *, int); void dqsort(double *, int); void tqsort(char **, int); char *itoa(int, char *, int); char *ltoa(long, char *, int); char *wtoa(short, char *, int); char *fcvt(double, int, int *, int *); char *gcvt(double, int, char *); short atow(char *); char *uitoa(unsigned int); char *ultoa(unsigned long); char *uwtoa(unsigned short); char *ecvt(double, int, int *, int *); #else int atoi(); long atol(); int rand(); void srand(); void *calloc(); void free(); void *malloc(); void *realloc(); void abort(); void exit(); void _exit(); char *getenv(); int system(); void *bsearch(); void qsort(); int abs(); short wabs(); long labs(); char *sbrk(); int rlsmem(); int rlsml(); char *getmem(); char *getml(); void rbrk(); void rstmem(); long chkml(); long sizmem(); int bldmem(); int allmem(); int putenv(); void swaw(); void swab(); void lqsort(); void sqsort(); void fqsort(); void dqsort(); void tqsort(); char *itoa(); char *ltoa(); char *wtoa(); char *fcvt(); char *gcvt(); short atow(); char *uitoa(); char *ultoa(); char *uwtoa(); char *ecvt(); #endif
process.h
/* * process.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #define P_WAIT 0 #ifdef FORWORD int getpid(void); int execve(char *, char **, char **); int execvpe(char *, char **, char **); int execl(char *, char *, ); int execlp(char *, char *, ); int execv(char *, char **); int execvp(char *, char **); int execle(char *, char *, ); int execlpe(char *, char *, ); int spawnl(int, char *, char *, ); int spawnlp(int, char *, char *, ); int spawnv(int, char *, char **); int spawnvp(int, char *, char **); int spawnle(int, char *, char *, ); int spawnve(int, char *, char **, char **); #else int getpid(); int execve(); int execvpe(); int execl(); int execlp(); int execv(); int execvp(); int execle(); int execlpe(); int spawnl(); int spawnlp(); int spawnv(); int spawnvp(); int spawnle(); int spawnve(); #endif
direct.h
/* * direct.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD char *getcwd(char *, int); int mkdir(char *); int rmdir(char *); int chdir(char *); #else char *getcwd(); int mkdir(); int rmdir(); int chdir(); #endif
utime.h
/* * utime.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ struct utimbuf { int actime; int modtime; }; #ifdef FORWORD int utime(char *, struct utimbuf *); #else int utime(); #endif
timeb.h
/* * timeb.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ struct timeb { int time; unsigned short millitim; short timezone; short dstflag; }; #ifdef FORWORD void ftime(struct timeb *); #else void ftime(); #endif
jfctype.h
/* * jfctype.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int iskpun(int); int iskmoji(int); int iskana(int); int isalnmkana(int); int isprkana(int); int isalkana(int); int isgrkana(int); int iskanji2(int); int jislower(int); int iskanji(int); int jisupper(int); int jisalpha(int); int jisl2(int); int jisl1(int); int jisl0(int); int jiszen(int); int jisdigit(int); int jiskata(int); int jishira(int); int jiskigou(int); int jisspace(int); int ispnkana(int); int hantozen(int); int zentohan(int); #else int iskmoji(); int iskana(); int isalnmkana(); int isprkana(); int isalkana(); int isgrkana(); int iskanji2(); int jislower(); int iskanji(); int jisupper(); int jisalpha(); int jisl2(); int jisl1(); int jisl0(); int jiszen(); int jisdigit(); int jiskata(); int jishira(); int jiskigou(); int jisspace(); int ispnkana(); int hantozen(); int zentohan(); #endif
fctype.h
/* * fctype.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int isalnum(int); int isalpha(int); int iscntrl(int); int isdigit(int); int isgraph(int); int islower(int); int isprint(int); int ispunct(int); int isspace(int); int isupper(int); int isxdigit(int); int tolower(int); int toupper(int); int _tolower(int); int _toupper(int); int isascii(int); int iscsymf(int); int toascii(int); int iscsym(int); #else int isalnum(); int isalpha(); int iscntrl(); int isdigit(); int isgraph(); int islower(); int isprint(); int ispunct(); int isspace(); int isupper(); int isxdigit(); int tolower(); int toupper(); int _tolower(); int _toupper(); int isascii(); int iscsymf(); int toascii(); int iscsym(); #endif /* forword declaration list */ #ifndef NULL #define NULL 0 #endif
io.h
/* * io.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson */ #ifdef FORWORD int close(int); int eof(int); int open(char *, int, ); int dup(int); int write(int, char *, int); int read(int, char *, int); int creat(char *, int); long tell(int); int dup2(int, int); long lseek(int, long, int); int unlink(char *); int chmod(char *, int); int setmode(int, int); int access(char *, int); int chsize(int, long); char *mktemp(char *); int isatty(int); long filelength(int); int rename(char *,char *); #else int close(); int eof(); int open(); int dup(); int write(); int read(); int creat(); long tell(); int dup2(); long lseek(); int unlink(); int chmod(); int setmode(); int access(); int chsize(); char *mktemp(); int isatty(); long filelength(); int rename(); #endif
fdef.h
nlist * * fdef.h X68k XC Compiler v1.01 Copyright 1987 SHARP/Hudson * * * 引数コード dc.w ???? * float_val equ $0001 float型の値 int_val equ $0002 int型の値 char_val equ $0004 char型の値 str_val equ $0008 str型の値 * float_omt equ $0081 省略可能なfloat型の値 int_omt equ $0082 省略可能な int型の値 char_omt equ $0084 省略可能な char型の値 str_omt equ $0088 省略可能な str型の値 * float_vp equ $0011 float型の変数の値のポインタ int_vp equ $0012 int型の変数の値のポインタ char_vp equ $0014 char型の変数の値のポインタ str_vp equ $0018 str型の変数の値のポインタ * ary1 equ $003f 1次元配列(全ての型) ary1_i equ $0032 1次元配列(int型) ary1_fic equ $0037 1次元配列(float,int,char型) ary1_c equ $0034 1次元配列(char型) ary2_c equ $0054 2次元配列(char型) * float_ret equ $8000 返り値はfloat型 int_ret equ $8001 返り値はint型 str_ret equ $8003 返り値はstr型 void_ret equ $ffff 返り値はなし * * 引数オフセット sp+???? * par1 equ 6 第1引数FAC par2 equ 16 第2引数FAC par3 equ 26 第3引数FAC par4 equ 36 第4引数FAC par5 equ 46 第5引数FAC par6 equ 56 第6引数FAC par7 equ 66 第7引数FAC par8 equ 76 第8引数FAC par9 equ 86 第9引数FAC * list
C Source
#include <class.h> struct XLINEPTR{ UWORD vram_page; WORD x; WORD y; WORD x1; UWORD line_style; }; struct YLINEPTR{ UWORD vram_page; WORD x; WORD y; WORD y1; UWORD line_style; }; struct TXFILLPTR{ UWORD vram_page; WORD x; WORD y; WORD x2; WORD y2; UWORD fill_patn; }; main(argc) int argc; { struct XLINEPTR xbuf; struct YLINEPTR ybuf; struct TXFILLPTR xybuf; int xx,yy; xbuf.vram_page = 2; ybuf.vram_page = 2; xybuf.vram_page = 2; xybuf.x = 0; xybuf.y = 0; xybuf.x2 = 768; xybuf.y2 = 512; xybuf.fill_patn = 0; TXFILL(&xybuf); if(argc >1){TPALET(4,0xde6c); return(0);} TPALET(4,0x6b54); ybuf.y = 0; ybuf.y1 = 512-16; for(xx=8;xx<768;xx +=8) { if(xx % (5*8)) ybuf.line_style = 0x8888; else if(xx % (10*8)) ybuf.line_style = 0xf0f0; else ybuf.line_style = 0xffff; ybuf.x=xx-1; TXYLINE(&ybuf); } xbuf.x = 7; xbuf.x1 = 768-8-7; for(yy=0;yy<=512-16;yy +=16) { if(yy % (5*16)) xbuf.line_style = 0x8888; else if(yy % (10*16)) xbuf.line_style = 0xf0f0; else xbuf.line_style = 0xffff; xbuf.y=yy; TXXLINE(&xbuf); } }
BASIC Sprite Pattern Editor
10 /******************************/ 20 /* sprite pattern editor 30 /* Copyright (C) 1987 SHARP 100 /******initialize******** 105 wait=2000:/*basic=200 110 str help_file="\etc\def.hlp" 120 dim int pal(15,15) /*palet data*/ 130 dim char w(255) /*pattern work*/ 140 int l=1 /*lut no*/ 150 int p=0 /*palet code*/ 160 int c /*color code*/ 170 int b /*blue*/ 180 int r /*red*/ 190 int g /*green*/ 200 int i /*i*/ 210 int pf=0 /*palet flag*/ 220 int px,py /*mouse cusor position*/ 230 int f=15+1 /*number of functions*/ 240 int x,y /*mouse dx,dy*/ 250 int bl,br /*left and right sw.*/ 310 int X1=64,X2=192 /*position data*/ 320 int Y11=64,Y12=320 330 int Y13=400,Y14=448+8 340 int XX1=4,YY11=4 350 int X3=240,X4=272 360 int Y31=64,Y32=96 370 int Y33=400,Y34=440 380 int Y35=120-8,Y36 : Y36=Y35+16*f-1 390 int Y37,Y38 : Y37=Y36+1:Y38=Y37+12 400 int X5=320,X6=448 410 int Y51=64,Y52=192 420 int Y53=200,Y54=448 430 int XX5=40,YY51=8,YY53=25,YY54=57 440 int X7=456,X8=464 450 int Y71=64,Y72=192 460 int XX7=57,YY71=8 500 /* 510 width 64 520 color 5 530 locate 0,14 540 color 6 550 print " 説明は必要ですか?[Y/N]"; 560 color 3 570 if (tolower(asc(inkey$)) = 'y') then { 580 print "Y" 590 type_doc() 600 } 650 cls 900 init() 1000 /*********main*********** 1010 while(1) 1020 mspos(px,py) 1030 sp_move(0,px,py) 1040 msstat(x,y,bl,br) 1050 if (bl) then { 1060 if (px >= X1 and px < X2) then { 1070 if (py >= Y13 and py < Y14) then { 1080 mk_pal((px-X1)/4,(py-Y13)/8) 1090 } 1100 } else if (px >= X3 and px < X4) then { 1110 if (py >= Y33 and py < Y34) then { 1120 set_pal() 1130 } else if (py >= Y35 and py < Y36) then { 1140 sel_func((py-Y35)/4) 1150 } else if (py >= Y37 and py < Y38) then { 1160 if (term()) then end 1170 } 1180 } else if (px >= X5 and px < X6) then { 1190 if (py >= Y51 and py < Y52) then { 1200 mk_pat((px-X5)/8,(py-Y51)/8) 1210 } else if (py >= Y53+16 and py < Y54) then { 1220 sel_lut((px-X5)/8,(py-Y53)/8) 1230 } 1240 } else if (px >= X7 and px < X8) then { 1250 if (py >= Y71 and py < Y72) then { 1260 sel_pal((py-Y71)/8) 1270 } 1280 } 1290 } else if (br) then { 1300 if (px >= X5 and px < X6) then { 1310 if (py >= Y51 and py < Y52) then { 1320 mk_pat0((px-X5)/8,(py-Y51)/8) 1330 } 1340 } 1350 } 1360 endwhile 1370 end 10000 /************************ 10010 func sel_lut(x,y) 10020 int i 10030 if (y mod 2) then return() 10040 sp_set(0,,,253) 10050 dot(XX7+2,YY71+p,0) 10060 p=x 10070 dot(XX7+2,YY71+p,65535) 10080 i=y/2 10090 if (i = l) then { 10100 c=pal(l,p) 10110 pal_disp(c) 10120 } else { 10130 c=pal(i,p) 10140 pattern(i) 10150 } 10160 sp_set(0,,,254) 10170 endfunc 11000 /************************ 11010 func sel_pal(y) 11030 sp_set(0,,,253) 11040 dot(XX7+2,YY71+p,0) 11050 p=y 11060 dot(XX7+2,YY71+p,65535) 11070 c=pal(l,p) 11080 pal_disp(c) 11090 sp_set(0,,,254) 11100 endfunc 12000 /************************ 12010 func mk_pal(x,y) 12020 int wc 12030 if (y mod 2) then return() 12040 switch (y / 2) 12050 case 0: b=x 12060 pal_vol(0,b) 12070 break 12080 case 1: r=x 12090 pal_vol(1,r) 12100 break 12110 case 2: g=x 12120 pal_vol(2,g) 12130 break 12140 case 3: if (x > 1) then return() 12150 i=x 12160 pal_vol(3,i) 12170 break 12180 endswitch 12190 pf=0 12200 wc=rgb(r,g,b)+i 12210 fill(X3,Y33,X4-1,Y34-1,wc) 12220 mspos(px,py) 12230 sp_move(0,px,py) 12240 fill(X1+58,Y14,X1+81,Y14+11,0) 12250 symbol(X1+58,Y14,right$("000"+hex$(wc),4),1,1,0,65535,0) 12260 endfunc 13000 /************************ 13010 func mk_pat(x,y) 13030 if not(pf) then { 13040 sp_set(0,,,253) 13050 pal_disp(c) 13060 sp_set(0,,,254) 13070 } 13080 fill(X5+x*8,Y51+y*8,X5+x*8+7,Y51+y*8+7,c) 13090 fill(X3+x*2,Y31+y*2,X3+x*2+1,Y31+y*2+1,c) 13100 w(x+y*16)=p 13110 endfunc 13500 /************************ 13510 func mk_pat0(x,y) 13530 if not(pf or p) then { 13540 sp_set(0,,,253) 13550 pal_disp(c) 13560 sp_set(0,,,254) 13570 } 13580 fill(X5+x*8,Y51+y*8,X5+x*8+7,Y51+y*8+7,pal(l,0)) 13590 fill(X3+x*2,Y31+y*2,X3+x*2+1,Y31+y*2+1,pal(l,0)) 13600 w(x+y*16)=0 13610 endfunc 14000 /************************ 14010 func set_pal() 14020 int count=0,x,y,bl,br,c_old 14040 box(X3-1,Y33-1,X4,Y34,65472,65535) 14050 cls 14060 color 2 14070 print " パレットの設定" 14075 msbtn(0,0,0) 14080 while (count < wait) 14090 mspos(px,py) 14100 sp_move(0,px,py) 14110 msstat(x,y,bl,br) 14120 if (bl) then break else count=count+1 14130 endwhile 14140 if (count < wait and px >= X3 and px < X4 and py >= Y33 and py < Y34 ) then { 14150 sp_set(0,,,253) 14160 c_old=c 14170 c=rgb(r,g,b)+i 14180 pal(l,p)=c 14190 pattern(l) 14200 dot(XX5+p,YY53+l*2,c) 14210 dot(XX7,YY71+p,c) 14220 sp_color(p,c,l) 14230 sp_set(0,,,254) 14240 if (not sure()) then { 14250 sp_set(0,,,253) 14260 c=c_old 14270 pal(l,p)=c 14280 pattern(l) 14290 dot(XX5+p,YY53+l*2,c) 14300 dot(XX7,YY71+p,c) 14310 sp_color(p,c,l) 14320 sp_set(0,,,254) 14330 } 14340 } 14350 box(X3-1,Y33-1,X4,Y34,65535,65535) 14360 cls 14370 color 3 14380 endfunc 15000 /************************ 15010 func sel_func(n) 15020 int i=0,x,y,bl,br 15030 if (n mod 4 = 3) then return() else n=n/4 15040 if n > f then return() 15060 fill(X3,Y35+n*16,X4-1,Y35+n*16+11,62) 15070 set_func(n) 15080 set_msg(n) 15085 msbtn(0,0,0) 15090 while(i<wait) 15100 mspos(px,py) 15110 sp_move(0,px,py) 15120 msstat(x,y,bl,br) 15130 if (bl) then break else i=i+1 15140 endwhile 15150 if (i < wait and px >= X3 and px < X4 and py >= Y35+n*16 and py < Y35+n*16+11) then { 15160 fill(X3,Y35+n*16,X4-1,Y35+n*16+11,1984) 15170 set_func(n) 15180 if n < 8 then { 15190 rotate(n) 15200 } else { 15210 switch (n) 15220 case 8: get_pat() 15230 break; 15240 case 9: set_pat() 15250 break; 15260 case 10: fill_pat() 15270 break; 15280 case 11: program() 15290 break; 15300 case 12: sp_palet() 15310 break; 15320 case 13: init_pal() 15330 break; 15340 case 14: clr() 15350 break; 15360 case 15: help() 15370 break; 15380 endswitch 15390 } 15400 } 15410 cls 15420 color 3 15430 fill(X3,Y35+n*16,X4-1,Y35+n*16+11,0) 15440 set_func(n) 15450 endfunc 20000 /*+++++++++++++++++++++++ 20010 func rotate(n) 20020 int i,j,d(255) 20030 sp_set(0,,,253) 20040 switch (n) 20050 case 0: for i=0 to 15 20060 d(i)=w(i*16+15) 20070 next 20080 for i=0 to 254 20090 w(255-i)=w(254-i) 20100 mspos(px,py):sp_move(0,px,py) 20110 next 20120 for i=0 to 15 20130 w(i*16)=d(i) 20140 next 20150 break 20160 case 1: for i=0 to 15 20170 d(i)=w(i*16) 20180 next 20190 for i=0 to 254 20200 w(i)=w(i+1) 20210 mspos(px,py):sp_move(0,px,py) 20220 next 20230 for i=0 to 15 20240 w(i*16+15)=d(i) 20250 next 20260 break 20270 case 2: for i=0 to 15 20280 d(i)=w(i) 20290 next 20300 for i=0 to 239 20310 w(i)=w(i+16) 20320 mspos(px,py):sp_move(0,px,py) 20330 next 20340 for i=0 to 15 20350 w(i+240)=d(i) 20360 next 20370 break 20380 case 3: for i=0 to 15 20390 d(i)=w(i+240) 20400 next 20410 for i=0 to 239 20420 w(255-i)=w(239-i) 20430 mspos(px,py):sp_move(0,px,py) 20440 next 20450 for i=0 to 15 20460 w(i)=d(i) 20470 next 20480 break 20490 case 4: for i=0 to 15 20500 for j=0 to 15 20510 d(240-i*16+j)=w(j*16+i) 20520 next 20530 mspos(px,py):sp_move(0,px,py) 20540 next 20550 for i=0 to 255 20560 w(i)=d(i) 20570 mspos(px,py):sp_move(0,px,py) 20580 next 20590 break 20600 case 5: for i=0 to 255 20610 d(i)=w(i) 20620 mspos(px,py):sp_move(0,px,py) 20630 next 20640 for i=0 to 255 20650 w(i)=d(255-i) 20660 mspos(px,py):sp_move(0,px,py) 20670 next 20680 break 20690 case 6: for i=0 to 15 20700 for j=0 to 15 20710 d(j)=w(i+j*16) 20720 next 20730 mspos(px,py):sp_move(0,px,py) 20740 for j=0 to 15 20750 w(i+j*16)=d(15-j) 20760 next 20770 next 20780 break 20790 case 7: for i=0 to 15 20800 for j=0 to 15 20810 d(j)=w(i*16+j) 20820 next 20830 mspos(px,py):sp_move(0,px,py) 20840 for j=0 to 15 20850 w(i*16+j)=d(15-j) 20860 next 20870 next 20880 break 20890 endswitch 20900 pattern(l) 20910 sp_set(0,,,254) 20920 endfunc 21000 /*+++++++++++++++++++++++ 21010 func set_pat() 21020 int n,att 21030 dim char temp(255) 21040 n=get_no() 21050 sp_set(0,,,254) 21060 if (n >= 0) then { 21070 x0=n mod 8+4 21080 y0=n/8+4 21090 sp_pat(n,temp) 21100 att=bg_get(1,x0,y0) 21110 sp_def(n,w) 21120 bg_put(1,x0,y0,n+256*l) 21130 if (not sure()) then { 21140 sp_def(n,temp) 21150 bg_put(1,x0,y0,att) 21160 } 21170 restore(n) 21180 } 21190 sp_off(1) 21200 endfunc 22000 /*+++++++++++++++++++++++ 22010 func get_pat() 22020 int n 22030 n=get_no() 22040 if (n >= 0) then { 22050 sp_set(0,,,253) 22060 sp_pat(n,w) 22070 i=bg_get(1,n mod 8+4,n/8+4)/256 22080 pattern(i) 22090 restore(n) 22100 } 22110 sp_set(0,,,254) 22120 sp_off(1) 22130 endfunc 23000 /*+++++++++++++++++++++++ 23010 func fill_pat() 23020 int i,j,wp,x,y,bl=0,br=0 23030 cls 23040 print " パレットの指定" 23050 msbtn(0,0,0) 23060 while not(bl) 23070 mspos(px,py) 23080 sp_move(0,px,py) 23090 msstat(x,y,bl,br) 23100 endwhile 23110 if (px >= X5 and px < X6 and py >= Y53 and py < Y54 and not(py/8 mod 2)) then { 23120 sp_set(0,,,253) 23130 wp=(px-X5)/8 23140 for i=0 to 255 23150 w(i)=wp 23160 next 23170 i=(py-Y53)/16 23180 if (i <> l) then pal_blk(i) 23190 } else if (px >= X7 and px < X8 and py >= Y71 and py < Y72) then { 23200 sp_set(0,,,253) 23210 wp=(py-Y71)/8 23220 for i=0 to 255 23230 w(i)=wp 23240 next 23250 } 23260 mspos(px,py) 23270 sp_move(0,px,py) 23280 fill(X5,Y51,X6-1,Y52-1,pal(l,wp)) 23290 fill(X3,Y31,X4-1,Y32-1,pal(l,wp)) 23300 sp_set(0,,,254) 23310 endfunc 24000 /*+++++++++++++++++++++++ 24010 func program() 24020 int i=0 24030 mspos(px,py) 24040 sp_off(0) 24050 mouse(0) 24060 mouse(1) 24070 setmspos(px,py) 24080 mouse(2) 24090 console 22,2,1 24100 locate 0,22,1 24110 print " 1.パターン 2.パレット" 24120 print " [1or2]?"; 24130 i=instr(1,"12",inkey$) 24140 if (i = 1) then { 24150 wr_pattern() 24160 } else if (i = 2) then { 24170 wr_palet() 24180 } 24190 console 22,2,0 24200 locate 0,22,0 24210 mspos(px,py) 24220 sp_move(0,px,py) 24230 mouse(4) 24240 mouse(1) 24250 setmspos(px,py) 24260 mouse(2) 24270 sp_on(0) 24280 endfunc 25000 /*+++++++++++++++++++++++ 25010 func sp_palet() 25020 int i,n,x,y,bl=0,br 25030 n=get_no() 25040 if (n >= 0) then { 25050 sp_set(0,,,254) 25060 cls 25070 print " パレットブロックの指定" 25080 msbtn(0,0,0) 25090 while (not bl) 25100 mspos(px,py) 25110 sp_move(0,px,py) 25120 msstat(x,y,bl,br) 25130 endwhile 25140 if (px >= X5 and px < X6 and py >= Y53+16 and py < Y54) then { 25150 i=(py-Y53) 25160 if (i mod 16 < 11) then { 25170 bg_put(1,n mod 8+X1/16,n/8+Y11/16,i/16*256+n) 25180 msbtn(0,0,0) 25190 } 25200 } 25210 restore(n) 25220 sp_set(0,,,254) 25230 sp_off(1) 25240 } 25250 endfunc 26000 /*+++++++++++++++++++++++ 26010 func init_pal() 26020 int i,j 26030 if (not sure()) then return() 26040 sp_set(0,,,253) 26050 for i=1 to 15 26060 pal(i,0)=0 26070 pal(i,1)=&H5294 26080 pal(i,2)=&H20 26090 pal(i,3)=&H3E 26100 pal(i,4)=&H400 26110 pal(i,5)=&H7C0 26120 pal(i,6)=&H420 26130 pal(i,7)=&H7FE 26140 pal(i,8)=&H8000 26150 pal(i,9)=&HF800 26160 pal(i,10)=&H8020 26170 pal(i,11)=&HF83E 26180 pal(i,12)=&H8400 26190 pal(i,13)=&HFFC0 26200 pal(i,14)=&HAD6A 26210 pal(i,15)=&HFFFE 26220 for j=0 to 15 26230 sp_color(j,pal(i,j),i) 26240 dot(XX5+j,YY53+i*2,pal(i,j)) 26250 next 26260 next 26270 for i=0 to 15 26280 dot(XX7,YY71+i,pal(l,i)) 26290 next 26300 pattern(l) 26310 sp_set(0,,,254) 26320 endfunc 27000 /*++++++++++++++++++++++ 27010 func clr() 27030 if (sure()) then sp_clr(0,127) 27040 endfunc 28000 /*++++++++++++++++++++++ 28010 func int term() 28020 int i=0 28030 fill(X3,Y37,X4-1,Y38-1,62) 28040 set_func(16) 28050 set_msg(16) 28055 msbtn(0,0,0) 28060 while(i < wait) 28070 mspos(px,py) 28080 sp_move(0,px,py) 28090 msstat(x,y,bl,br) 28100 if (bl) then break else i=i+1 28110 endwhile 28120 if (i < wait and px >= X3 and px < X4 and py >= Y37 and py < Y38) then { 28130 fill(X3,Y37,X4-1,Y38-1,1984) 28140 set_func(16) 28150 console 0,31,1 28160 width 64 28170 mouse(0) 28180 return(-1) 28190 } else { 28200 fill(X3,Y37,X4-1,Y38-1,0) 28210 set_func(16) 28220 cls 28230 return(0) 28240 } 28250 endfunc 30000 /*---------------------- 30010 func pattern(ll) 30020 int i,j,brg,x5,x3,y51,y52,y31,y32 30030 if (ll <> l) then { 30040 fill(X5-16,Y53+l*16,X5-9,Y53+l*16+7,0) 30050 l=ll:fill(X5-16,Y53+l*16,X5-9,Y53+l*16+7,65535) 30060 for i=0 to 15 30070 dot(XX7,YY71+i,pal(l,i)) 30080 next 30090 } 30100 for i=0 to 15:y51=Y51+i*8:y52=y51+7:y31=Y31+i*2:y32=y31+1 30110 for j=0 to 15:brg=pal(l,w(i*16+j)):x5=X5+j*8:x3=X3+j*2:fill(x5,y51,x5+7,y52,brg):fill(x3,y31,x3+1,y32,brg):mspos(px,py):sp_move(0,px,py):next:next 30120 c=pal(l,p) 30130 pal_disp(c) 30140 endfunc 31000 /*---------------------- 31010 func dot(x,y,c) 31020 fill(x*8,y*8,x*8+7,y*8+7,c) 31030 mspos(px,py) 31040 sp_move(0,px,py) 31050 endfunc 32000 /*---------------------- 32010 func pal_blk(ll) 32020 int i 32030 fill(X5-16,Y53+l*16,X5-9,Y53+l*16+7,0) 32040 l=ll 32050 fill(X5-16,Y53+l*16,X5-9,Y53+l*16+7,65535) 32060 for i=0 to 15 32070 dot(XX7,YY71+i,pal(l,i)) 32080 next 32090 c=pal(l,p) 32100 pal_disp(c) 32110 endfunc 33000 /*---------------------- 33010 func pal_disp(c) 33030 fill(X3,Y33,X4-1,Y34-1,c) 33040 b=(c and &H3E) shr 1 33050 pal_vol(0,b) 33060 r=(c and &H7C0) shr 6 33070 pal_vol(1,r) 33080 g=(c and &HF800) shr 11 33090 pal_vol(2,g) 33100 i=c and 1 33110 pal_vol(3,i) 33120 pf=-1 33130 fill(X1+58,Y14,X1+81,Y14+11,0) 33140 symbol(X1+58,Y14,right$("000"+hex$(c),4),1,1,0,65535,0) 33150 endfunc 34000 /*---------------------- 34010 func pal_vol(c,v) 34020 int i,s,y,bc,c16 34030 if (c < 3) then { 34040 s=c*5+1 34050 bc=31 shl s 34060 } else { 34070 s=1 34080 bc =65535 34090 } 34100 c16=c*16 34110 fill(X1-13,Y13+c16-2,X1-2,Y13+c16+9,0) 34120 symbol(X1-13,Y13+c*16-2,right$(" "+str$(v),2),1,1,0,65535,0) 34130 symbol(X1-7,Y13+c*16-2,right$(str$(v),1),1,1,0,65535,0) 34140 y=Y13+c16 34150 for i=0 to v 34160 fill(X1+i*4,y,X1+i*4+3,y+7,i shl s) 34170 mspos(px,py) 34180 sp_move(0,px,py) 34190 next 34200 fill(X1+v*4,y,X1+v*4+3,y+7,bc) 34210 if (c = 3) then { 34220 if (v = 0) then fill(X1+4,y,X1+7,y+7,0) 34230 } else if (v < 31) then { 34240 fill(X1+i*4,y,X2-1,y+7,0) 34250 } 34260 endfunc 35000 /*----------------------- 35010 func get_no() 35020 int i,n,n16,x,y,bl=0,br,m,m8,flg=0 35030 int x0,x1,x2,x3,x4 : x0=X1-10:x1=X1-3:x2=X1-34+16:x4=X1-10 35040 str m$ 35050 dim int c(2)={63520,65472,34784} 35060 dim int y1(1) : y1(0)=Y11-18:y1(1)=Y12+2 35070 dim str num(7)={"0","1","2","3","4","5","6","7" } 35080 cls 35090 print " パターンの指定" 35100 msbtn(0,0,0) 35110 while not(bl) 35120 mspos(px,py) 35130 if (px >= X1 and px < X2 and py >= Y11 and py < Y12) then { 35140 tx=(px-X1)/16 35150 ty=(py-Y11)/16 35160 px=tx*16+X1 35170 py=ty*16+Y11 35180 if (flg) then { 35190 sp_move(0,px,py) 35200 i=(tx+ty*8) 35210 if (n/8 = i/8) then { 35220 if (n <> i) then { 35230 fill(x0,y0,x1,y0+15,0) 35240 symbol(x3,y1(m8),m$,1,1,1,c(m8),0) 35250 x3=px+4 35260 n=i 35270 m=n mod 16 35280 m8=m/8 35290 m$=hex$(m) 35300 symbol(x4,y0,m$,1,1,1,c(2),0) 35310 symbol(x3,y1(m8),m$,1,1,1,c(2),0) 35320 } 35330 } else { 35340 fill(x0,y0,x1,y0+15,0) 35350 symbol(x2,y0,num(n16)+"x",1,1,1,c(m/8),0) 35360 symbol(x3,y1(m8),m$,1,1,1,c(m8),0) 35370 x3=px+4 35380 y0=py 35390 n=i 35400 n16=n/16 35410 m=n mod 16 35420 m8=m/8 35430 m$=hex$(m) 35440 fill(x0,y0,x1,y0+15,0) 35450 symbol(x2,y0,num(n16)+m$,1,1,1,c(2),0) 35460 symbol(x3,y1(m8),m$,1,1,1,c(2),0) 35470 } 35480 } else { 35490 sp_set(0,px+16,py+16,252) 35500 x3=px+4 35510 y0=py 35520 n=(tx+ty*8) 35530 n16=n/16 35540 m=n mod 16 35550 m8=m/8 35560 m$=hex$(m) 35570 fill(x0,y0,x1,y0+15,0) 35580 symbol(x2,y0,num(n16)+m$,1,1,1,c(2),0) 35590 symbol(x3,y1(m8),m$,1,1,1,c(2),0) 35600 flg=-1 35610 } 35620 } else if (flg) then { 35630 sp_set(0,px+16,py+16,254) 35640 fill(x0,y0,x1,y0+15,0) 35650 symbol(x2,y0,num(n16)+"x",1,1,1,c(m8),0) 35660 symbol(x3,y1(m8),m$,1,1,1,c(m8),0) 35670 flg=0 35680 } else { 35690 sp_move(0,px,py) 35700 } 35710 msstat(x,y,bl,br) 35720 endwhile 35730 if (flg) then { 35740 sp_set(1,px+16,py+16,252,3) 35750 return( n ) 35760 } 35770 return( -1 ) 35780 endfunc 36000 /*----------------------- 36010 func restore(n) 36020 int x0,y0,m8 36030 str m$ 36040 dim int c(1)={63520,65472} 36050 dim int y1(1) : y1(0)=Y11-18:y1(1)=Y12+2 36060 x0=sp_stat(1,0)-12 36070 y0=sp_stat(1,1)-16 36080 m$=hex$(n mod 16) 36090 m8=(n mod 16)/8 36100 fill(X1-10,y0,X1-3,y0+15,0) 36110 symbol(X1-18,y0,itoa(n/16)+"x",1,1,1,c(m8),0) 36120 symbol(x0,y1(m8),m$,1,1,1,c(m8),0) 36130 sp_set(0,,,254) 36140 sp_off(1) 36150 endfunc 37000 /*----------------------- 37010 func wr_pattern() 37020 int i,j,k,lno,n,no,no0,no1 37030 str file,a[80] 37040 dim char d(255) 37050 error off 37060 cls 37070 print " ファイル名" 37080 input " ";file 37090 if (file = "") then return() 37100 cls 37110 input " 先頭パターン番号 =";no0 37120 input " 最終パターン番号 =";no1 37130 if (no1 = 0) then no1=no0 37140 print file 37150 print "no.";itoa(no0); 37160 if (no0 <> no1) then print "��;itoa(no1); 37170 locate 10,23,1 37180 print " OK?[YorN]"; 37190 if (tolower(asc(inkey$)) <> 'y') then return() 37200 print "Y"; 37210 locate 0,22,0 37220 no=no1-no0 37230 if (no0 < 0 or no0 > no1 or no1 > 127) then { 37240 ferr(2) 37250 return() 37260 } 37270 fp=fopen(file,"c") 37280 if (fp = -1) then { 37290 ferr(0) 37300 return() 37310 } 37320 a=" 10 sprite_pattern():end"+chr$(13)+chr$(10) 37330 if (fwrites(a,fp) = -1) then { 37340 ferr(1) 37350 return() 37360 } 37370 a="60000 func sprite_pattern()"+chr$(13)+chr$(10) 37380 if (fwrites(a,fp) = -1) then { 37390 ferr(1) 37400 return() 37410 } 37420 a="60010 dim char c(255)"+chr$(13)+chr$(10) 37430 if (fwrites(a,fp) = -1) then { 37440 ferr(1) 37450 return() 37460 } 37470 for i=0 to no 37480 sp_pat(no0+i,d) 37490 lno=60020+i*20 37500 a=itoa(lno)+" c={"+chr$(13)+chr$(10) 37510 if (fwrites(a,fp) = -1) then { 37520 ferr(1) 37530 return() 37540 } 37550 for j=0 to 15 37560 lno=lno+1 37570 a=itoa(lno)+" " 37580 for k=0 to 15 37590 n=d(j*16+k) 37600 a=a+right$(itoa(n),2)+"," 37610 next 37620 if (j <> 15) then { 37630 a=a+chr$(13)+chr$(10) 37640 if (fwrites(a,fp) = -1) then { 37650 ferr(1) 37660 return() 37670 } 37680 } else { 37690 a=left$(a,strlen(a)-1)+chr$(13)+chr$(10) 37700 if (fwrites(a,fp) = -1) then { 37710 ferr(1) 37720 return() 37730 } 37740 } 37750 next 37760 a=itoa(lno+1)+" }"+chr$(13)+chr$(10) 37770 if (fwrites(a,fp) = -1) then { 37780 ferr(1) 37790 return() 37800 } 37810 a=itoa(lno+2)+" sp_def("+itoa(no0+i)+",c)"+chr$(13)+chr$(10) 37820 if (fwrites(a,fp) = -1) then { 37830 ferr(1) 37840 return() 37850 } 37860 next 37870 a=itoa(lno+4)+" endfunc"+chr$(13)+chr$(10)+chr$(26) 37880 if (fwrites(a,fp) = -1) then { 37890 ferr(1) 37900 return() 37910 } 37920 fclose(fp) 37930 cls 37940 error on 37950 endfunc 38000 /*----------------------- 38010 func wr_palet() 38020 int i,j,lno 38030 str file,a[80],i$ 38040 error off 38050 cls 38060 print " ファイル名" 38070 input " ";file 38080 if (file = "") then return() 38090 print file 38100 print " OK?[YorN]"; 38110 if (tolower(asc(inkey$)) <> 'y') then return() 38120 print "Y"; 38130 fp=fopen(file,"c") 38140 if (fp = -1) then { 38150 ferr(0) 38160 return() 38170 } 38180 a=" 10 sprite_pallet():end"+chr$(13)+chr$(10) 38190 if (fwrites(a,fp) = -1) then { 38200 ferr(1) 38210 return() 38220 } 38230 a="60000 func sprite_pallet()"+chr$(13)+chr$(10) 38240 if (fwrites(a,fp) = -1) then { 38250 ferr(1) 38260 return() 38270 } 38280 lno=60010 38290 for i=1 to 15 38300 i$=itoa(i) 38310 for j=0 to 15 38320 a=itoa(lno)+" sp_color("+itoa(j)+","+itoa(pal(i,j))+","+i$+")"+chr$(13)+chr$(10) 38330 if (fwrites(a,fp) = -1) then { 38340 ferr(1) 38350 return() 38360 } 38370 lno=lno+10 38380 next 38390 next 38400 a=itoa(lno)+" endfunc"+chr$(13)+chr$(10)+chr$(26) 38410 if (fwrites(a,fp) = -1) then { 38420 ferr(1) 38430 return() 38440 } 38450 fclose(fp) 38460 cls 38470 sp_on(0) 38480 error on 38490 endfunc 39000 /*---------------------- 39010 func ferr(mode) 39020 int i=0,x,y,bl,br 39030 dim str msg(2)[34] 39040 msg(0)="ファイルのオープンに"+chr$(13)+chr$(10)+"失敗しました", 39050 msg(1)="ファイルの書き込みに"+chr$(13)+chr$(10)+"失敗しました", 39070 msg(2)="パターン番号が無効です" 39080 /* 39090 cls 39100 locate 0,22,0 39110 color 9 39120 print msg(mode); 39130 color 3 39140 msbtn(1,0,2000) 39150 endfunc 40000 /*---------------------- 40010 func set_msg(n) 40020 int i 40030 cls 40040 color 2 40050 switch (n) 40060 case 0: print " 1ドット右へシフト" 40070 break 40080 case 1: print " 1ドット左へシフト" 40090 break 40100 case 2: print " 1ドット上へシフト" 40110 break 40120 case 3: print " 1ドット下へシフト" 40130 break 40140 case 4: print " 90度回転" 40150 break 40160 case 5: print " 180度回転" 40170 break 40180 case 6: print " 上下反転" 40190 break 40200 case 7: print " 左右反転" 40210 break 40220 case 8: print " パターン取り込み" 40230 break 40240 case 9: print " パターン定義" 40250 break 40260 case 10: print " ぬりつぶし" 40270 break 40280 case 11: print "パターン又はパレットのセーブ" 40290 break 40300 case 12: print " パレットブロックの変更" 40310 break 40320 case 13: print " パレットの初期化" 40330 break 40340 case 14: print " 全パターンのクリア" 40350 break 40360 case 15: print " ヘルプファイルの表示" 40370 break 40380 case 16: print " プログラムの終了" 40390 break 40400 endswitch 40410 color 3 40420 endfunc 41000 /*---------------------- 41010 func sure() 41020 int i,x,y,bl=0,br,XS,XE,YS,YE : XS=X1:XE=X1+30:YS=22*16:YE=23*16 41030 msbtn(0,0,0) 41040 cls 41050 box(XS-1,YS-1,XE,YE,65535,65535) 41060 symbol(XS+7,YS,"OK",1,1,1,65535,0) 41070 while (not bl) 41080 mspos(px,py) 41090 sp_move(0,px,py) 41100 msstat(x,y,bl,br) 41110 endwhile 41120 fill(XS-1,YS-1,XE,YE,0) 41130 if (px >= XS and px < XE and py >= YS and py < YE) then return(-1) 41140 return(0) 41150 endfunc 42000 /*---------------------- 42010 func help() 42030 mspos(px,py) 42040 sp_off(0) 42050 bg_set(0,,0) 42060 vpage(0) 42070 console 0,31,0 42080 cls 42090 type_doc() 42100 cls 42110 vpage(1) 42120 console 22,2,0 42130 vpage(1) 42140 mouse(1) 42150 setmspos(px,py) 42160 mouse(2) 42170 sp_on(0) 42180 bg_set(0,,1) 42190 endfunc 50000 /*********************** 50010 func init() 50020 int i 50030 screen 1,3,1,1 50040 console 22,2,0 50050 locate 0,22,0 50060 symbol(130,4,"Sprite pattern editor",1,1,2,65472,0) 50070 sp_off() 50080 bg_fill(1,255) 50090 sp_clr(255) 50100 bg_set(0,1,1) 50110 bg_scroll(0,0,0) 50120 sp_disp(1) 50130 set_mscursor() 50140 pat_disp() 50150 lut_disp() 50160 c=pal(l,p) 50170 box(X5-1,Y51-1,X6,Y52,65535,65535) 50180 fill(X5,Y51,X6-1,Y52-1,c) 50190 box(X3-1,Y31-1,X4,Y32,65535,65535) 50200 fill(X3,Y31,X4-1,Y32-1,c) 50210 box(X1-1,Y13-1,X2,Y13+8,&H3E,65535) 50220 box(X1-1,Y13+15,X2,Y13+24,&H7C0,65535) 50230 box(X1-1,Y13+31,X2,Y13+40,&HF800,65535) 50240 box(X1-1,Y13+47,X1+8,Y14,&HFFFF,65535) 50250 box(X3-1,Y33-1,X4,Y34,65535,65535) 50260 pal_disp(c) 50270 symbol(X1+46,Y14,"&h",1,1,0,65535,0) 50280 for i=0 to f 50290 set_func(i) 50300 next 50310 mouse(4) 50320 msarea(0,0,511,511) 50330 mouse(1) 50340 setmspos(X5,Y51) 50350 mouse(2) 50360 sp_set(0,X5+16,Y51+16,254,3) 50370 endfunc 51000 /*----------------------- 51010 func pat_disp() 51020 int i 51030 dim int c(1)={63520,65472} 51040 box(X1-1,Y11-1,X2,Y12,65535,65535) 51050 for i=0 to 7 51060 symbol(X1+i*16+4,Y11-18,hex$(i),1,1,1,c(0),0) 51070 next 51080 for i=0 to 7 51090 symbol(X1+i*16+4,Y12+2,hex$(i+8),1,1,1,c(1),0) 51100 next 51110 for i=0 to 7 51120 symbol(X1-18,Y11+i*32,hex$(i)+"x",1,1,1,c(0),0) 51130 symbol(X1-18,Y11+i*32+16,hex$(i)+"x",1,1,1,c(1),0) 51140 next 51150 for i=0 to 15 51160 for j=0 to 7 51170 bg_put(1,XX1+j,YY11+i,256+i*8+j) 51180 next 51190 next 51200 endfunc 52000 /*---------------------- 52010 func lut_disp() 52020 int i,j 52030 for i=1 to 15 52040 box(X5-1,Y53+i*16-1,X6,Y53+i*16+8,65535,65535) 52050 for j=0 to 15 52060 pal(i,j)=sp_color(j,,i) 52070 fill(X5+j*8,Y53+i*16,X5+j*8+7,Y53+i*16+7,pal(i,j)) 52080 next 52090 next 52100 box(X7-1,Y71-1,X8,Y72,65535,65535) 52110 for i=0 to 15 52120 dot(XX7,YY71+i,pal(l,i)) 52130 next 52140 dot(XX5-2,YY53+l*2,65535) 52150 dot(XX7+2,YY71+p,65535) 52160 endfunc 53000 /*----------------------- 53010 func set_func(n) 53020 int x : x=(X4+X3)/2 53030 box(X3-1,Y35+n*16-1,X4,Y35+n*16+12,65535,65535) 53040 switch (n) 53050 case 0: symbol(x-3,Y35+n*16,chr$(28),1,1,0,65472,0) 53060 break; 53070 case 1: symbol(x-3,Y35+n*16,chr$(29),1,1,0,65472,0) 53080 break; 53090 case 2: symbol(x-3,Y35+n*16,chr$(30),1,1,0,65472,0) 53100 break; 53110 case 3: symbol(x-3,Y35+n*16,chr$(31),1,1,0,65472,0) 53120 break; 53130 case 4: symbol(x-6,Y35+n*16,"90",1,1,0,65472,0) 53140 break; 53150 case 5: symbol(x-9,Y35+n*16,"180",1,1,0,65472,0) 53160 break; 53170 case 6: symbol(x-6,Y35+n*16,chr$(31)+chr$(30),1,1,0,65472,0) 53180 break; 53190 case 7: symbol(x-6,Y35+n*16,chr$(29)+chr$(28),1,1,0,65472,0) 53200 break; 53210 case 8: symbol(x-9,Y35+n*16,"get",1,1,0,65472,0) 53220 break; 53230 case 9: symbol(x-9,Y35+n*16,"put",1,1,0,65472,0) 53240 break; 53250 case 10: symbol(x-12,Y35+n*16,"fill",1,1,0,65472,0) 53260 break; 53270 case 11: symbol(x-12,Y35+n*16,"save",1,1,0,65472,0) 53280 break; 53290 case 12: symbol(x-15,Y35+n*16,"palet",1,1,0,65472,0) 53300 break; 53310 case 13: symbol(x-12,Y35+n*16,"init",1,1,0,65472,0) 53320 break; 53330 case 14: symbol(x-9,Y35+n*16,"clr",1,1,0,65472,0) 53340 break; 53350 case 15: symbol(x-12,Y35+n*16,"help",1,1,0,65472,0) 53360 break; 53370 case 16: symbol(x-9,Y35+n*16,"end",1,1,0,65472,0) 53380 break; 53390 endswitch 53400 endfunc 54000 /*********************** 54010 func type_doc() 54020 int fp,i,j,c 54030 str s[80] 54040 error off 54050 fp=fopen(help_file,"r") 54060 if (fp < 0) then { 54070 locate 0,22,0 54080 print " ";chr$(34);help_file;chr$(34) 54090 color 2 54100 print " がオープンできませんでした。" 54110 print " 何かキーを押して下さい。" 54120 color 3 54130 error on 54140 s=inkey$ 54150 return() 54160 } 54170 repeat 54180 cls 54190 for i=0 to 29 54200 freads(s,fp) 54210 print s 54220 next 54230 c=asc(inkey$) 54240 if (c <> ' ') then break 54250 until feof(fp) 54260 fclose(fp) 54270 error on 54280 endfunc 60000 /*********************** 60010 func set_mscursor() 60020 dim char c(255) 60030 c={ 60031 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, 60032 4,8,8,8,8,8,8,8,8,8,8,8,8,8,8,4, 60033 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60034 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60035 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60036 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60037 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60038 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60039 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60040 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60041 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60042 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60043 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60044 4,8,0,0,0,0,0,0,0,0,0,0,0,0,8,4, 60045 4,8,8,8,8,8,8,8,8,8,8,8,8,8,8,4, 60046 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 60047 } 60048 sp_def(252,c) 60050 c={ 60051 0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0, 60052 0,0,0,4,8,8,8,8,4,0,0,0,0,0,0,0, 60053 0,0,0,4,8,8,8,8,4,0,0,0,0,0,0,0, 60054 0,0,4,8,4,4,4,4,8,4,0,0,0,0,0,0, 60055 0,4,8,4,4,8,4,4,4,8,4,0,0,0,0,0, 60056 0,4,8,4,4,8,4,4,4,8,4,0,0,0,0,0, 60057 4,8,4,4,4,8,4,4,4,4,8,4,0,0,0,0, 60058 4,8,4,4,4,8,4,4,4,4,8,4,0,0,0,0, 60059 4,8,4,4,4,8,4,4,4,4,8,4,0,0,0,0, 60060 4,8,4,4,4,8,8,8,8,4,8,4,0,0,0,0, 60061 4,8,4,4,4,4,4,4,4,4,8,4,0,0,0,0, 60062 0,4,8,4,4,4,4,4,4,8,4,0,0,0,0,0, 60063 0,4,8,4,4,4,4,4,4,8,4,0,0,0,0,0, 60064 0,0,4,8,4,4,4,4,8,4,0,0,0,0,0,0, 60065 0,0,0,4,8,8,8,8,4,0,0,0,0,0,0,0, 60066 0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0 60067 } 60068 sp_def(253,c) 60070 c={ 60071 4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 60072 4,8,4,0,0,0,0,0,0,0,0,0,0,0,0,0, 60073 4,8,8,4,0,0,0,0,0,0,0,0,0,0,0,0, 60074 4,8,8,8,4,0,0,0,0,0,0,0,0,0,0,0, 60075 4,8,8,8,8,4,0,0,0,0,0,0,0,0,0,0, 60076 4,8,8,8,8,8,4,0,0,0,0,0,0,0,0,0, 60077 4,8,8,8,8,8,8,4,0,0,0,0,0,0,0,0, 60078 4,8,8,8,8,8,8,8,4,0,0,0,0,0,0,0, 60079 4,8,8,8,8,4,4,4,4,4,0,0,0,0,0,0, 60080 4,8,8,4,8,8,4,0,0,0,0,0,0,0,0,0, 60081 4,8,4,0,8,8,4,0,0,0,0,0,0,0,0,0, 60082 4,4,0,0,4,8,8,4,0,0,0,0,0,0,0,0, 60083 4,0,0,0,4,8,8,4,0,0,0,0,0,0,0,0, 60084 0,0,0,0,0,4,8,8,4,0,0,0,0,0,0,0, 60085 0,0,0,0,0,4,8,8,4,0,0,0,0,0,0,0, 60086 0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,0 60087 } 60088 sp_def(254,c) 60090 endfunc
Cleanup > Pages missing date references
Cleanup > Pages missing developer references
Cleanup > Pages missing publisher references
Cleanup > To do
Games > Games by content > Games with uncompiled source code
Games > Games by developer > Games developed by Data West
Games > Games by platform > Sharp X68000 games
Games > Games by publisher > Games published by Data West
Games > Games by release date > Games released in 1988
Games > Games by release date > Games released in December
Games > Games by release date > Games released in December > Games released on December 5