- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- Location:
- vlib
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
vlib/cg2.c
r0292fbb r7258c6a 1 1 2 /* Character generator table -- 12V by 8H */ 2 3 3 int cg_rows = 12;4 5 int cgtable[12][256] = {4 int16_t cg_rows = 12; 5 6 int16_t cgtable[12][256] = { 6 7 7 8 { /* Scan line 0 */ -
vlib/cg3.c
r0292fbb r7258c6a 3 3 /* Generated: 1989-11-16 15:40:14 */ 4 4 5 /* int cg_rows = 14; */6 7 int cg3[14][256] = {5 /* int16_t cg_rows = 14; */ 6 7 int16_t cg3[14][256] = { 8 8 9 9 { /* Scan line 0 */ -
vlib/glcinit.c
r0292fbb r7258c6a 63 63 #include "glcdefs.h" 64 64 65 u nsignedlcdbase; /* LCD graphics base address */66 u nsignedlcdbit; /* LCD graphics pixel bit mask */67 u nsignedlcdcol; /* LCD text column */68 u nsignedlcdctl1; /* LCD display control -- command */69 u nsignedlcdctl2; /* LCD display control -- data */70 u nsignedlcdcurs; /* LCD graphics pixel byte address */71 u nsignedlcdrow; /* LCD text row */72 u nsignedlcdx; /* LCD graphics x */73 u nsignedlcdy; /* LCD graphics y */65 uint16_t lcdbase; /* LCD graphics base address */ 66 uint16_t lcdbit; /* LCD graphics pixel bit mask */ 67 uint16_t lcdcol; /* LCD text column */ 68 uint16_t lcdctl1; /* LCD display control -- command */ 69 uint16_t lcdctl2; /* LCD display control -- data */ 70 uint16_t lcdcurs; /* LCD graphics pixel byte address */ 71 uint16_t lcdrow; /* LCD text row */ 72 uint16_t lcdx; /* LCD graphics x */ 73 uint16_t lcdy; /* LCD graphics y */ 74 74 75 75 /* GLC initialization values */ 76 76 77 charglc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 };78 charglc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 };77 int8_t glc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 }; 78 int8_t glc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 }; 79 79 80 80 /* … … 89 89 */ 90 90 91 void GLCdisp( short dsp, short crs, short blk1, short blk2, short blk3)92 { 93 register short val;91 void GLCdisp(int16_t dsp, int16_t crs, int16_t blk1, int16_t blk2, int16_t blk3) 92 { 93 register int16_t val; 94 94 95 95 val = ((blk3 & 3) << 6) | ((blk2 & 3) << 4) | ((blk1 & 3) << 2) | … … 110 110 */ 111 111 112 void GLCcurs( short crs)112 void GLCcurs(int16_t crs) 113 113 { 114 114 lcdctl2 = (crs & 3) | (lcdctl2 & ~3); … … 131 131 void GLCinit(void) 132 132 { 133 register int i;134 register longic;135 register char*gp;133 register int16_t i; 134 register int32_t ic; 135 register int8_t *gp; 136 136 137 137 lcdbase = G_PLANE2; /* set defaults for graphics variables */ … … 205 205 */ 206 206 207 u nsigned GLCcrc(unsigned row, unsignedcol)208 { 209 u nsignedcurad;207 uint16_t GLCcrc(uint16_t row, uint16_t col) 208 { 209 uint16_t curad; 210 210 211 211 curad = col + (row * 85); /* calculate cursor location */ … … 235 235 */ 236 236 237 u nsigned GLCcxy(unsigned x, unsignedy)238 { 239 register u nsignedcurad, xby6;237 uint16_t GLCcxy(uint16_t x, uint16_t y) 238 { 239 register uint16_t curad, xby6; 240 240 241 241 /* calculate cursor address */ … … 277 277 */ 278 278 279 void GLCwrts( char*s)279 void GLCwrts(int8_t *s) 280 280 { 281 281 LCD_WC = G_CRSMRT; /* set cursor motion = right */ … … 304 304 */ 305 305 306 void GLCtext(u nsigned row, unsigned col, char*s)307 { 308 register u nsignedcurad;306 void GLCtext(uint16_t row, uint16_t col, int8_t *s) 307 { 308 register uint16_t curad; 309 309 310 310 curad = col + (row * 85); /* calculate cursor address */ -
vlib/lseg.c
r0292fbb r7258c6a 7 7 */ 8 8 9 void (*point)( short x, short y, short pen);9 void (*point)(int16_t x, int16_t y, int16_t pen); 10 10 11 11 #define ABS(x) ((x) < 0 ? (-(x)) : (x)) … … 41 41 */ 42 42 43 void lseg( short x1, short y1, short x2, short y2, short t)43 void lseg(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t t) 44 44 { 45 register short dx, dy, ptx, pty, p;46 short i, px, py;45 register int16_t dx, dy, ptx, pty, p; 46 int16_t i, px, py; 47 47 48 48 p = x2 - (ptx = x1); -
vlib/vbfill4.c
r0292fbb r7258c6a 8 8 */ 9 9 10 static short fm[] = { /* fill masks */10 static int16_t fm[] = { /* fill masks */ 11 11 12 12 0x000F, … … 29 29 */ 30 30 31 void vbfill4(u nsigned *obj, short obwidth, short xmin, short ymin, short xmax, short ymax, unsignedcolor)31 void vbfill4(uint16_t *obj, int16_t obwidth, int16_t xmin, int16_t ymin, int16_t xmax, int16_t ymax, uint16_t color) 32 32 { 33 short mw, nl, width;34 35 register u nsigned*fwp, *wp;36 37 register u nsignedlmask, rmask;38 register short i, j;39 40 fwp = obj + ( long)(xmin >> 2) + ((long)ymin * obwidth);33 int16_t mw, nl, width; 34 35 register uint16_t *fwp, *wp; 36 37 register uint16_t lmask, rmask; 38 register int16_t i, j; 39 40 fwp = obj + (int32_t)(xmin >> 2) + ((int32_t)ymin * obwidth); 41 41 width = xmax - xmin + 1; 42 42 nl = ymax - ymin + 1; -
vlib/vclrs.c
r0292fbb r7258c6a 16 16 */ 17 17 18 extern void vputc(u nsigned *sbase, unsigned row, unsigned col, unsigned c, unsignedattrib);18 extern void vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib); 19 19 20 20 /* … … 24 24 */ 25 25 26 void vclrs(u nsigned int obase[], int row, int col, int nc, int ch, int atr)26 void vclrs(uint16_t obase[], int16_t row, int16_t col, int16_t nc, int16_t ch, int16_t atr) 27 27 { 28 28 while (nc--) -
vlib/vhinit.c
r0292fbb r7258c6a 22 22 #define VREG(h,v) ((h<<10)|v) 23 23 24 extern int cgtable[][256];25 extern int cg_rows;24 extern int16_t cgtable[][256]; 25 extern int16_t cg_rows; 26 26 27 27 struct octent v_obtab[16]; /* object control table */ … … 29 29 struct octent *v_curob; /* current v_obtab pointer */ 30 30 31 int v_nobj; /* current object number */32 int v_obpri; /* current object priority */31 int16_t v_nobj; /* current object number */ 32 int16_t v_obpri; /* current object priority */ 33 33 34 34 /* … … 37 37 /* initialized variables */ 38 38 39 int vr_data[] = {39 int16_t vr_data[] = { 40 40 41 41 0x825B, /* R0 -- Mode word 0 */ -
vlib/vmput.c
r0292fbb r7258c6a 19 19 */ 20 20 21 typedef unsigned int uint; 22 23 extern void vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib); 21 extern void vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib); 24 22 25 23 /* … … 30 28 */ 31 29 32 void vmput(uint *sbase, uint row, uint col, uint ma, char*ms[])30 void vmput(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t ma, int8_t *ms[]) 33 31 { 34 register uint c, tc, tr;35 char*cp;32 register uint16_t c, tc, tr; 33 int8_t *cp; 36 34 37 35 tr = row; … … 58 56 */ 59 57 60 void vmputa(uint *sbase, uint row, uint col, uint *ma[], char*ms[])58 void vmputa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *ma[], int8_t *ms[]) 61 59 { 62 register uint c, tc, tr;63 uint *tm;64 char*cp;60 register uint16_t c, tc, tr; 61 uint16_t *tm; 62 int8_t *cp; 65 63 66 64 tr = row; -
vlib/vobjfns.c
r0292fbb r7258c6a 60 60 #include "vsddvars.h" 61 61 62 extern void vbank(u nsignedb);63 extern void objon(u nsigned obj, unsigned line, unsignednum);62 extern void vbank(uint16_t b); 63 extern void objon(uint16_t obj, uint16_t line, uint16_t num); 64 64 extern void VIint(void); 65 65 66 short wsize; /* object width calculated by SetObj() */67 short vi_dis; /* disable use of VIint */68 69 u nsignedvi_ctl; /* object unblank control bits */66 int16_t wsize; /* object width calculated by SetObj() */ 67 int16_t vi_dis; /* disable use of VIint */ 68 69 uint16_t vi_ctl; /* object unblank control bits */ 70 70 71 71 /* … … 79 79 */ 80 80 81 void SelObj(int obj)81 void SelObj(int16_t obj) 82 82 { 83 83 register struct octent *op; 84 register u nsignednewbank;84 register uint16_t newbank; 85 85 86 86 op = &v_obtab[obj]; … … 109 109 */ 110 110 111 void SetPri(int obj, int pri)111 void SetPri(int16_t obj, int16_t pri) 112 112 { 113 113 register struct octent *op; … … 121 121 v_odtab[pri][0] = op->odtw0 | V_BLA; /* start object as blanked */ 122 122 v_odtab[pri][1] = op->odtw1; 123 v_odtab[pri][2] = (( long)op->obase >> 1) & 0xFFFF;123 v_odtab[pri][2] = ((int32_t)op->obase >> 1) & 0xFFFF; 124 124 125 125 objon(pri, op->objy, op->ysize); /* enable access table bits */ … … 132 132 vi_ctl |= (1 << pri); /* set unblank bit */ 133 133 134 if (*(( long*)0x000064) NE &VIint) /* make sure VI vector is set */134 if (*((int32_t *)0x000064) NE &VIint) /* make sure VI vector is set */ 135 135 BIOS(B_SETV, 25, VIint); 136 136 … … 149 149 */ 150 150 151 void SetObj(int obj, int type, int bank, int xpix, int ypix, int x0, int y0, int flags, int pri, unsigned int *base)151 void SetObj(int16_t obj, int16_t type, int16_t bank, int16_t xpix, int16_t ypix, int16_t x0, int16_t y0, int16_t flags, int16_t pri, uint16_t *base) 152 152 { 153 153 register struct octent *op; … … 252 252 */ 253 253 254 void CpyObj(u nsigned *from, unsigned *to, unsigned w, unsigned h, unsignedsw)255 { 256 register u nsigned*tp;257 register u nsignedi, j;254 void CpyObj(uint16_t *from, uint16_t *to, uint16_t w, uint16_t h, uint16_t sw) 255 { 256 register uint16_t *tp; 257 register uint16_t i, j; 258 258 259 259 for (i = h; i--; ) { -
vlib/vputs.c
r0292fbb r7258c6a 14 14 #include <stddefs.h> 15 15 16 typedef unsigned int uint; 17 18 extern void vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib); 16 extern void vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib); 19 17 20 18 /* … … 27 25 */ 28 26 29 void vputs(uint *sbase, uint row, uint col, uint attrib, char*str)27 void vputs(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t attrib, int8_t *str) 30 28 { 31 uint c;29 uint16_t c; 32 30 33 31 while (c = *str++) { … … 57 55 */ 58 56 59 void vputsa(uint *sbase, uint row, uint col, uint *attrib, char*str)57 void vputsa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *attrib, int8_t *str) 60 58 { 61 uint c;59 uint16_t c; 62 60 63 61 while (c = *str++) { -
vlib/vputsv.c
r0292fbb r7258c6a 14 14 #include "stddefs.h" 15 15 16 typedef unsigned int uint; 17 18 extern void vputcv(unsigned *adr, unsigned row, unsigned col, unsigned char, unsigned atr, unsigned cols); 16 extern void vputcv(uint16_t *adr, uint16_t row, uint16_t col, uint8_t chr, uint16_t atr, uint16_t cols); 19 17 20 18 /* … … 27 25 */ 28 26 29 void vputsv(uint *sbase, uint row, uint col, char *str, uint attrib, uint len)27 void vputsv(uint16_t *sbase, uint16_t row, uint16_t col, int8_t *str, uint16_t attrib, uint16_t len) 30 28 { 31 uint c;29 uint16_t c; 32 30 33 31 while (c = *str++) { … … 58 56 */ 59 57 60 void vputsav(uint *sbase, uint row, uint col, char *str, uint *attrib, uint len)58 void vputsav(uint16_t *sbase, uint16_t row, uint16_t col, int8_t *str, uint16_t *attrib, uint16_t len) 61 59 { 62 uint c;60 uint16_t c; 63 61 64 62 while (c = *str++) { -
vlib/vsetpal.c
r0292fbb r7258c6a 6 6 */ 7 7 8 #define PALETTE ((u nsigned*)0x280000L)8 #define PALETTE ((uint16_t *)0x280000L) 9 9 10 short dfltpal[16][3] = {10 int16_t dfltpal[16][3] = { 11 11 12 12 /* R G B color */ … … 45 45 */ 46 46 47 void vsetpal(u nsigned slot, unsigned red, unsigned grn, unsignedblu)47 void vsetpal(uint16_t slot, uint16_t red, uint16_t grn, uint16_t blu) 48 48 { 49 register u nsignedpalval;50 u nsigned*pal;49 register uint16_t palval; 50 uint16_t *pal; 51 51 52 52 pal = PALETTE; … … 79 79 */ 80 80 81 void vsndpal( short pp[16][3])81 void vsndpal(int16_t pp[16][3]) 82 82 { 83 register short i;83 register int16_t i; 84 84 85 85 for (i = 0; i < 16; i++) -
vlib/vspray4.c
r0292fbb r7258c6a 9 9 #include "vsddsw.h" 10 10 11 static charcl[81];11 static int8_t cl[81]; 12 12 13 13 /* … … 30 30 */ 31 31 32 void vspray4(u nsigned *vobj, short vwid, short fg, short vb, short pitch, char*ml[])32 void vspray4(uint16_t *vobj, int16_t vwid, int16_t fg, int16_t vb, int16_t pitch, int8_t *ml[]) 33 33 { 34 register char*cp, *lp, c;35 register short j, k, row;34 register int8_t *cp, *lp, c; 35 register int16_t j, k, row; 36 36 37 37 row = 0; -
vlib/vtext.c
r0292fbb r7258c6a 8 8 */ 9 9 10 static int msk[] = { 0xFF00, 0x00FF };10 static int16_t msk[] = { 0xFF00, 0x00FF }; 11 11 12 void vtext(u nsigned *obj, unsigned nc, unsigned row, unsigned col, char*ip)12 void vtext(uint16_t *obj, uint16_t nc, uint16_t row, uint16_t col, int8_t *ip) 13 13 { 14 register u nsigned*op;14 register uint16_t *op; 15 15 16 16 while (*ip) { … … 18 18 op = obj + ((nc >> 1) * row) + (col >> 1); 19 19 20 *op = (*op & (u nsigned)msk[col & 1]) |20 *op = (*op & (uint16_t)msk[col & 1]) | 21 21 ((*ip++ & 0x00FF) << ((col & 1) ? 8 : 0)); 22 22 -
vlib/vwputm.c
r0292fbb r7258c6a 18 18 #include <vsdd.h> 19 19 20 extern void vwputs(int *obase, int nw, int fg, int bg, int row, int col, char*str);20 extern void vwputs(int16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *str); 21 21 22 22 /* … … 26 26 */ 27 27 28 void vwputm(u nsigned int *obase, int nw, int fg, int bg, int row, int col, char*ml[])28 void vwputm(uint16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *ml[]) 29 29 { 30 30 while (*ml) {
Note:
See TracChangeset
for help on using the changeset viewer.