Changeset 7258c6a in buchla-68k for ram/wsdsp.c


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/wsdsp.c

    r0292fbb r7258c6a  
    2424/* things defined elsewhere */
    2525
    26 extern  unsigned        exp_c(unsigned c);
    27 
    28 extern  void    (*point)(short x, short y, short pen);
    29 
    30 extern  unsigned        *obj0;
    31 
    32 extern  char    bfs[];
    33 
    34 extern  char    *wdbxlb0[];
    35 extern  char    *wdbxlb1[];
    36 
    37 extern  short   wdbox[][8];
     26extern  uint16_t        exp_c(uint16_t c);
     27
     28extern  void    (*point)(int16_t x, int16_t y, int16_t pen);
     29
     30extern  uint16_t        *obj0;
     31
     32extern  int8_t  bfs[];
     33
     34extern  int8_t  *wdbxlb0[];
     35extern  int8_t  *wdbxlb1[];
     36
     37extern  int16_t wdbox[][8];
    3838
    3939extern  struct  instdef vbufs[];
     
    4343*/
    4444
    45 extern  short   curinst;
    46 extern  short   curvce;
    47 extern  short   curwave;        /* current waveshape library slot */
    48 extern  short   curwdth;        /* current waveshape cursor width */
    49 extern  short   curwfnl;        /* current waveshape final value */
    50 extern  short   curwhrm;        /* current waveshape harmonic number */
    51 extern  short   curwhrv;        /* current waveshape harmonic value */
    52 extern  short   curwpnt;        /* current waveshape point number */
    53 extern  short   curwoff;        /* current waveshape offset value */
    54 extern  short   curwslt;        /* current waveshape instrument slot */
    55 extern  short   cxval;
    56 extern  short   cyval;
    57 extern  short   lstwoff;
    58 extern  short   lstwpnt;
    59 extern  short   stccol;
    60 extern  short   stcrow;
    61 extern  short   wpntsv;         /* waveshape point selection state variable */
    62 extern  short   wplast;
    63 extern  short   wvlast;
    64 
    65 extern  short   vmtab[NUMHARM];         /* harmonic table */
    66 extern  short   wsbuf[NUMWPCAL];        /* waveshape generation buffer */
    67 
    68 extern  long    vknm[NUMHARM][NUMWPCAL];        /* scaled harmonics */
    69 
    70 extern  unsigned *waveob;               /* waveshape display object pointer */
    71 
    72 extern  short   wsnmod[12][2];          /* waveshape number or data modified */
     45extern  int16_t curinst;
     46extern  int16_t curvce;
     47extern  int16_t curwave;        /* current waveshape library slot */
     48extern  int16_t curwdth;        /* current waveshape cursor width */
     49extern  int16_t curwfnl;        /* current waveshape final value */
     50extern  int16_t curwhrm;        /* current waveshape harmonic number */
     51extern  int16_t curwhrv;        /* current waveshape harmonic value */
     52extern  int16_t curwpnt;        /* current waveshape point number */
     53extern  int16_t curwoff;        /* current waveshape offset value */
     54extern  int16_t curwslt;        /* current waveshape instrument slot */
     55extern  int16_t cxval;
     56extern  int16_t cyval;
     57extern  int16_t lstwoff;
     58extern  int16_t lstwpnt;
     59extern  int16_t stccol;
     60extern  int16_t stcrow;
     61extern  int16_t wpntsv;         /* waveshape point selection state variable */
     62extern  int16_t wplast;
     63extern  int16_t wvlast;
     64
     65extern  int16_t vmtab[NUMHARM];         /* harmonic table */
     66extern  int16_t wsbuf[NUMWPCAL];        /* waveshape generation buffer */
     67
     68extern  int32_t vknm[NUMHARM][NUMWPCAL];        /* scaled harmonics */
     69
     70extern  uint16_t *waveob;               /* waveshape display object pointer */
     71
     72extern  int16_t wsnmod[12][2];          /* waveshape number or data modified */
    7373
    7474extern  struct  wstbl   wslib[NUMWAVS]; /* waveshape library */
     
    7878/* forward references */
    7979
    80 void    wdpoint(short x, short y, short pen);
    81 
    82 /*
    83 
    84 */
    85 
    86 short   wavpal[16][3] = {       /* waveshape display color palette */
     80void    wdpoint(int16_t x, int16_t y, int16_t pen);
     81
     82/*
     83
     84*/
     85
     86int16_t wavpal[16][3] = {       /* waveshape display color palette */
    8787
    8888        {0, 0, 0},      /* 0 */
     
    116116void advwcur(void)
    117117{
    118         register short newcol;
     118        register int16_t newcol;
    119119
    120120        newcol = stccol + 1;
     
    134134*/
    135135
    136 void hdraw(short *hv, short h)
    137 {
    138         register short  bc, bx, by, j;
     136void hdraw(int16_t *hv, int16_t h)
     137{
     138        register int16_t  bc, bx, by, j;
    139139
    140140        bx = (h << 4) + 4;
     
    168168*/
    169169
    170 void dsws(short how)
     170void dsws(int16_t how)
    171171{
    172172        register struct instdef *ip;
    173         register short *fv, *hv, *ov;
    174         register short i;
    175         short cx;
     173        register int16_t *fv, *hv, *ov;
     174        register int16_t i;
     175        int16_t cx;
    176176
    177177        cx = exp_c(wdbox[0][0]);
     
    221221*/
    222222
    223 void wdswin(short n)
    224 {
    225         register short cx, wval;
    226         register char wsgn;
     223void wdswin(int16_t n)
     224{
     225        register int16_t cx, wval;
     226        register int8_t wsgn;
    227227
    228228        cx = wdbox[n][5];
     
    373373void wwins(void)
    374374{
    375         register short i;
     375        register int16_t i;
    376376
    377377        for (i = 0; i < 6; i++)
     
    385385*/
    386386
    387 void wdpoint(short x, short y, short pen)
     387void wdpoint(int16_t x, int16_t y, int16_t pen)
    388388{
    389389        if (v_regs[5] & 0x0180)
     
    473473void iniwslb(void)
    474474{
    475         register short i, j;
     475        register int16_t i, j;
    476476
    477477        memsetw(wsnmod, FALSE, (sizeof wsnmod) / 2);
Note: See TracChangeset for help on using the changeset viewer.