Diff for /np2/io/gdc_sub.c between versions 1.17 and 1.20

version 1.17, 2004/02/21 00:25:33 version 1.20, 2004/07/01 11:42:54
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
   #if !defined(DISABLE_MATH_H)
 #include        <math.h>  #include        <math.h>
   #endif
 #include        "cpucore.h"  #include        "cpucore.h"
 #include        "pccore.h"  #include        "pccore.h"
 #include        "iocore.h"  #include        "iocore.h"
Line 14  enum { Line 16  enum {
         RT_TABLEMAX             = (1 << RT_TABLEBIT)          RT_TABLEMAX             = (1 << RT_TABLEBIT)
 };  };
   
   static  UINT16  gdc_rt[RT_TABLEMAX+1];
   
 typedef struct {  typedef struct {
         SINT16  x;          SINT16  x;
         SINT16  y;          SINT16  y;
Line 23  typedef struct { Line 27  typedef struct {
   
 const UINT32 gdcplaneseg[4] = {VRAM_E, VRAM_B, VRAM_R, VRAM_G};  const UINT32 gdcplaneseg[4] = {VRAM_E, VRAM_B, VRAM_R, VRAM_G};
   
 static  UINT16  gdc_rt[RT_TABLEMAX+1];  
   
 static const VECTDIR vectdir[16] = {  static const VECTDIR vectdir[16] = {
                                         { 0, 1, 1, 0}, { 1, 1, 1,-1},                                          { 0, 1, 1, 0}, { 1, 1, 1,-1},
                                         { 1, 0, 0,-1}, { 1,-1,-1,-1},                                          { 1, 0, 0,-1}, { 1,-1,-1,-1},
Line 90  REG8 gdcbitreverse(REG8 data) { Line 92  REG8 gdcbitreverse(REG8 data) {
   
 void gdcsub_initialize(void) {  void gdcsub_initialize(void) {
   
   #if !defined(DISABLE_MATH_H)
         int             i;          int             i;
   
         for (i=0; i<=RT_TABLEMAX; i++) {          for (i=0; i<=RT_TABLEMAX; i++) {
                 gdc_rt[i] = (UINT16)((double)(1 << RT_MULBIT) *                  gdc_rt[i] = (UINT16)((double)(1 << RT_MULBIT) *
                                 (1 - sqrt(1 - pow((0.70710678118654 * i) / RT_TABLEMAX, 2))));                                  (1 - sqrt(1 - pow((0.70710678118654 * i) / RT_TABLEMAX, 2))));
         }          }
   #endif
 }  }
   
 void gdcslavewait(NEVENTITEM item) {  void gdcslavewait(NEVENTITEM item) {
Line 179  void gdcsub_setvectl(GDCVECT *vect, int  Line 183  void gdcsub_setvectl(GDCVECT *vect, int 
                         }                          }
                 }                  }
         }          }
         if (ope & 1) {          if (!((ope + 1) & 2)) {
                 tmp = dx;                  tmp = dx;
                 dx = dy;                  dx = dy;
                 dy = tmp;                  dy = tmp;

Removed from v.1.17  
changed lines
  Added in v.1.20


RetroPC.NET-CVS <cvs@retropc.net>