home *** CD-ROM | disk | FTP | other *** search
/ Media Gallery 1996 January / MG_0196.ISO / spea / graphiti / devlpmnt / sp3d / x86win / ap32init.c / ap32init.c
C/C++ Source or Header  |  1994-04-27  |  44KB  |  596 lines

  1. /***********************************/
  2. /*    ap32init.c      */
  3. /***********************************/
  4.  
  5. #include "windows.h"
  6. #include "string.h"
  7. #include "portable.h"
  8. #include "sp.h"
  9. #include "speawin.h"
  10. #include "winprote.h"
  11.  
  12. HINDIR sp3d_hindir[HINDIR_NUMBER];
  13.  
  14. int sp_use_16bit = 0;
  15.  
  16. #define GET_16BIT_PROC(a)   \
  17.      if ((fp=GetProcAddress(hlib32, PASS_WORD_AS_POINTER(a)))==NULL) return 0;
  18.  
  19. static HANDLE hlib32;
  20.  
  21. INT16 exit_sp3d_dll ( void )
  22. {
  23.   int i;
  24.   if ( hlib32 < 32 ) return 0;
  25.   for ( i = 2 ; i < HINDIR_NUMBER ; i++ ) {
  26.     if ( sp3d_hindir[i] ) {
  27.         free ( sp3d_hindir[i] );
  28.         sp3d_hindir[i] = NULL;
  29.     }
  30.   }
  31.   FreeLibrary ( hlib32 );
  32.   return 1;
  33. }
  34.  
  35. static int CheckDisplay ( void )
  36. {
  37.   HANDLE  hLib;
  38.   FARPROC fp;
  39.  
  40.   hLib = LoadLibrary ( "display.drv" );
  41.   if ( hLib < 32 ) return 1;
  42.   fp = GetProcAddress ( hLib, "SPEADIRECT860" );
  43.   FreeLibrary ( hLib );
  44.   if ( fp == (FARPROC)NULL ) return 2;
  45.   return ( 0 );
  46. }
  47.  
  48. INT16 init_sp3d_dll ( void ) 
  49. {
  50.   char buf[256];
  51.   int i;
  52.   if ( CheckDisplay() == 0 ) {
  53.      hlib32 = LoadLibrary ( SPEA_DLL16 );
  54.      if ( hlib32 < 32 ) {
  55.         strcpy(buf," 'sp3d_16.dll' not loaded\n");
  56.         strcat(buf," Try to load 'sp3d_32.dll'\n");
  57.         MessageBox(NULL,buf,"Warning", MB_OK | MB_TASKMODAL);
  58.      }
  59.      else  {
  60.         sp_use_16bit = 1;
  61.     init_16bit_functions() ;
  62.      }
  63.   }
  64.   if ( sp_use_16bit == 0 ) {
  65.      hlib32 = LoadLibrary ( "sp3d_32.dll" );
  66.      if ( hlib32 < 32 ) return 0;
  67.      init_32bit_functions();
  68.   }
  69.   for ( i = 2 ; i < HINDIR_NUMBER ; i++ ) {
  70.     if ( sp3d_hindir[i] == NULL ) {
  71.         strcpy(buf,"Could not allocate HANDLE :");
  72.         strcat(buf,"Out of Memory");
  73.         MessageBox(NULL,buf,"ERROR",MB_OK|MB_ICONHAND);
  74.         return 0;
  75.     }
  76.   }
  77.   return 1;
  78. }
  79.  
  80. static int init_32bit_functions ( void )
  81. {
  82.   FARPROC fp;
  83.   fp = GetProcAddress ( hlib32,"Win386LibEntry");
  84.   if ( fp == NULL ) return 0;
  85.   sp3d_hindir[SPFLMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  86.   sp3d_hindir[SPFLUSH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  87.   sp3d_hindir[SPSYNC]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  88.   sp3d_hindir[SPBOXFREE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  89.   sp3d_hindir[SPBOXREST]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  90.   sp3d_hindir[SPBOXINQ]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  91.   sp3d_hindir[SPBOXSAVE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  92.   sp3d_hindir[SPDPATT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  93.   sp3d_hindir[SPSPATT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  94.   sp3d_hindir[SPFPOLY]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  95.   sp3d_hindir[SPIRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  96.   sp3d_hindir[SPPOLY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  97.   sp3d_hindir[SPSETDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  98.   sp3d_hindir[SPGETDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  99.   sp3d_hindir[SPSETFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  100.   sp3d_hindir[SPTEXT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  101.   sp3d_hindir[SPCRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  102.   sp3d_hindir[SPDRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  103.   sp3d_hindir[SPTXTORI]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  104.   sp3d_hindir[SPTXTDIR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  105.   sp3d_hindir[SPCIRCLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  106.   sp3d_hindir[SPOCPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  107.   sp3d_hindir[SPCOPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  108.   sp3d_hindir[SPPFILL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  109.   sp3d_hindir[SPFILL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  110.   sp3d_hindir[SPARC]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  111.   sp3d_hindir[SPFCIRCLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  112.   sp3d_hindir[SPVGSIZE]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  113.   sp3d_hindir[SPVGZOOM]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  114.   sp3d_hindir[SPVZOOM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  115.   sp3d_hindir[SPVGDISP]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  116.   sp3d_hindir[SPVDISP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  117.   sp3d_hindir[SPVGWINDOW]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  118.   sp3d_hindir[SPVSWINDOW]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  119.   sp3d_hindir[SPVGPOS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  120.   sp3d_hindir[SPVSPOS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  121.   sp3d_hindir[SPVEINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  122.   sp3d_hindir[SPDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  123.   sp3d_hindir[SPCLRT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  124.   sp3d_hindir[SPCLR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  125.   sp3d_hindir[SPNOCLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  126.   sp3d_hindir[SPCLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  127.   sp3d_hindir[SPSPLIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  128.   sp3d_hindir[SPSHOW]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  129.   sp3d_hindir[SPSHWPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  130.   sp3d_hindir[SPSELPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  131.   sp3d_hindir[SPENFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  132.   sp3d_hindir[SPREMOVEFONT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  133.   sp3d_hindir[SPSELFONT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  134.   sp3d_hindir[SPRESETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  135.   sp3d_hindir[SPGETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  136.   sp3d_hindir[SPSETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  137.   sp3d_hindir[SPTRANSP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  138.   sp3d_hindir[SPL1STYLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  139.   sp3d_hindir[SPLSTYLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  140.   sp3d_hindir[SPOPMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  141.   sp3d_hindir[SPRGBBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  142.   sp3d_hindir[SPBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  143.   sp3d_hindir[SPIFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  144.   sp3d_hindir[SPICOLOR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  145.   sp3d_hindir[SPIPAGE]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  146.   sp3d_hindir[SPINFO]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  147.   sp3d_hindir[SPRGBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  148.   sp3d_hindir[SPCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  149.   sp3d_hindir[SPWVECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  150.   sp3d_hindir[SPVECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  151.   sp3d_hindir[SPEND]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  152.   sp3d_hindir[SPINIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  153.   sp3d_hindir[SPGVMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  154.   sp3d_hindir[SPSVMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  155.   sp3d_hindir[SPVMINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  156.   sp3d_hindir[SPDEVINFO]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  157.   sp3d_hindir[SPSELCARD]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  158.   sp3d_hindir[SPDEFFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  159.   sp3d_hindir[SPLDFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  160.   sp3d_hindir[COPYCLIP]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  161.   sp3d_hindir[SPCLMEM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  162.   sp3d_hindir[SPCLFREE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  163.   sp3d_hindir[SPCLINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  164.   sp3d_hindir[SPCLEXE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  165.   sp3d_hindir[SPCLDELETE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  166.   sp3d_hindir[SPCLCALL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  167.   sp3d_hindir[SPCLCLOSE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  168.   sp3d_hindir[SPCLOPEN]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  169.   sp3d_hindir[SP3VISIBLELINES]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  170.   sp3d_hindir[SP3GETERROR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  171.   sp3d_hindir[SP3LIGHTSWITCH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  172.   sp3d_hindir[SP3LIGHTDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  173.   sp3d_hindir[SP3LIGHTMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  174.   sp3d_hindir[SP3LIGHTAMBIENT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  175.   sp3d_hindir[SP3RESETSTACK]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  176.   sp3d_hindir[SP3LOADMATRIX]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  177.   sp3d_hindir[SP3MULTMATRIX]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  178.   sp3d_hindir[SP3TRANSLATE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  179.   sp3d_hindir[SP3SCALE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  180.   sp3d_hindir[SP3ROTATE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_CHAR,INDIR_WORD,INDIR_ENDLIST);
  181.   sp3d_hindir[SP3CONCATENATION]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  182.   sp3d_hindir[SP3POPMATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  183.   sp3d_hindir[SP3PUSHMATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  184.   sp3d_hindir[SP3TRANSFORM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  185.   sp3d_hindir[SP3CLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  186.   sp3d_hindir[SP3DCMAP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  187.   sp3d_hindir[SP3PROJECTION]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  188.   sp3d_hindir[SP3VIEW]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  189.   sp3d_hindir[SP3MATERIALSET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  190.   sp3d_hindir[SP3MATERIALDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  191.   sp3d_hindir[SP3LINETYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  192.   sp3d_hindir[SP3INTERIORTYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  193.   sp3d_hindir[SP3FACECULL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  194.   sp3d_hindir[SP3DEPTHCUE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  195.   sp3d_hindir[SP3DEFDEPTHCUE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  196.   sp3d_hindir[SP3OPACITY]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  197.   sp3d_hindir[SPCONCAVE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  198.   sp3d_hindir[SP3BORDERTYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  199.   sp3d_hindir[SP3BFDISTINGUISH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  200.   sp3d_hindir[SPANTIALIASSET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  201.   sp3d_hindir[SPANTIALIASDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  202.   sp3d_hindir[SP3POLYGONLIST]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  203.   sp3d_hindir[SP3POLYGON]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  204.   sp3d_hindir[SP3POLYGONHOLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  205.   sp3d_hindir[SP3POLYLINE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  206.   sp3d_hindir[SP3ZCLEAR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  207.   sp3d_hindir[SP3VPCLEAR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  208.   sp3d_hindir[SP3DATAFORMAT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  209.   sp3d_hindir[SP3ZBUFFER]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  210.   sp3d_hindir[SPESCAPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  211.   sp3d_hindir[SPSWAPBUFFERS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  212.   sp3d_hindir[SPDOUBLEBUFFER]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  213.   sp3d_hindir[SPCOLORRAMP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  214.   sp3d_hindir[SPFRAMECOPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  215.   sp3d_hindir[SPFRAMEDELETE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  216.   sp3d_hindir[SPFRAMESELECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  217.   sp3d_hindir[SPFRAMECREATE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  218.   sp3d_hindir[SP3EXIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  219.   sp3d_hindir[SP3INIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  220.   sp3d_hindir[SP3FLIPNORMAL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  221.   sp3d_hindir[SPVMOFFS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  222.   sp3d_hindir[SPSORG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  223.   sp3d_hindir[SPINQPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  224.   sp3d_hindir[SP3COLORGLOBAL]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  225.   sp3d_hindir[SPCLMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  226.   sp3d_hindir[SPCLMASK]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  227.   sp3d_hindir[SPCLOPTIMIZE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  228.   sp3d_hindir[SPUINIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  229.   sp3d_hindir[SPUEXIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  230.   sp3d_hindir[SPUGETERROR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  231.   sp3d_hindir[SPUBEGINTESS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  232.   sp3d_hindir[SPUENDTESS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  233.   sp3d_hindir[SPUGETTESS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  234.   sp3d_hindir[SPUPOLYGON]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  235.   sp3d_hindir[SP3MATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  236.   sp3d_hindir[SPUPOLYGONHOLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  237.   sp3d_hindir[SPIDENTADDR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  238.   sp3d_hindir[SP3ATTR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  239.   sp3d_hindir[SPUTEXTURE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_PTR,INDIR_DWORD,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  240.   sp3d_hindir[SP3TEXTUREDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  241.   sp3d_hindir[SP3TEXTURESET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  242.   sp3d_hindir[SP3SELECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  243.   sp3d_hindir[SP3GETSELECT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  244.   sp3d_hindir[SP3SETSELVOLUME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  245.   sp3d_hindir[SP3CLEARNAMES]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  246.   sp3d_hindir[SP3PUSHNAME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  247.   sp3d_hindir[SP3POPNAME]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  248.   sp3d_hindir[SP3LOADNAME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  249.   sp3d_hindir[SP3IMAGE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  250.   sp3d_hindir[SPUIMAGEIO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  251.   sp3d_hindir[SPSET]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  252.   sp3d_hindir[SP_WIN_FLUSH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_DWORD,INDIR_WORD,INDIR_ENDLIST);
  253.   return 1;
  254. }
  255. static int init_16bit_functions ( void )
  256. {
  257.   FARPROC fp;
  258.   GET_16BIT_PROC(SPFLMODE);
  259.   sp3d_hindir[SPFLMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  260.   GET_16BIT_PROC(SPFLUSH);
  261.   sp3d_hindir[SPFLUSH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  262.   GET_16BIT_PROC(SPSYNC);
  263.   sp3d_hindir[SPSYNC]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  264.   GET_16BIT_PROC(SPBOXFREE);
  265.   sp3d_hindir[SPBOXFREE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  266.   GET_16BIT_PROC(SPBOXREST);
  267.   sp3d_hindir[SPBOXREST]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  268.   GET_16BIT_PROC(SPBOXINQ);
  269.   sp3d_hindir[SPBOXINQ]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  270.   GET_16BIT_PROC(SPBOXSAVE);
  271.   sp3d_hindir[SPBOXSAVE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  272.   GET_16BIT_PROC(SPDPATT);
  273.   sp3d_hindir[SPDPATT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  274.   GET_16BIT_PROC(SPSPATT);
  275.   sp3d_hindir[SPSPATT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  276.   GET_16BIT_PROC(SPFPOLY);
  277.   sp3d_hindir[SPFPOLY]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  278.   GET_16BIT_PROC(SPIRCURS);
  279.   sp3d_hindir[SPIRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  280.   GET_16BIT_PROC(SPPOLY);
  281.   sp3d_hindir[SPPOLY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  282.   GET_16BIT_PROC(SPSETDOT);
  283.   sp3d_hindir[SPSETDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  284.   GET_16BIT_PROC(SPGETDOT);
  285.   sp3d_hindir[SPGETDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  286.   GET_16BIT_PROC(SPSETFONT);
  287.   sp3d_hindir[SPSETFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  288.   GET_16BIT_PROC(SPTEXT);
  289.   sp3d_hindir[SPTEXT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  290.   GET_16BIT_PROC(SPCRCURS);
  291.   sp3d_hindir[SPCRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  292.   GET_16BIT_PROC(SPDRCURS);
  293.   sp3d_hindir[SPDRCURS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  294.   GET_16BIT_PROC(SPTXTORI);
  295.   sp3d_hindir[SPTXTORI]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  296.   GET_16BIT_PROC(SPTXTDIR);
  297.   sp3d_hindir[SPTXTDIR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  298.   GET_16BIT_PROC(SPCIRCLE);
  299.   sp3d_hindir[SPCIRCLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  300.   GET_16BIT_PROC(SPOCPY);
  301.   sp3d_hindir[SPOCPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  302.   GET_16BIT_PROC(SPCOPY);
  303.   sp3d_hindir[SPCOPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  304.   GET_16BIT_PROC(SPPFILL);
  305.   sp3d_hindir[SPPFILL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  306.   GET_16BIT_PROC(SPFILL);
  307.   sp3d_hindir[SPFILL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  308.   GET_16BIT_PROC(SPARC);
  309.   sp3d_hindir[SPARC]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  310.   GET_16BIT_PROC(SPFCIRCLE);
  311.   sp3d_hindir[SPFCIRCLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  312.   GET_16BIT_PROC(SPVGSIZE);
  313.   sp3d_hindir[SPVGSIZE]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  314.   GET_16BIT_PROC(SPVGZOOM);
  315.   sp3d_hindir[SPVGZOOM]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  316.   GET_16BIT_PROC(SPVZOOM);
  317.   sp3d_hindir[SPVZOOM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  318.   GET_16BIT_PROC(SPVGDISP);
  319.   sp3d_hindir[SPVGDISP]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  320.   GET_16BIT_PROC(SPVDISP);
  321.   sp3d_hindir[SPVDISP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  322.   GET_16BIT_PROC(SPVGWINDOW);
  323.   sp3d_hindir[SPVGWINDOW]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  324.   GET_16BIT_PROC(SPVSWINDOW);
  325.   sp3d_hindir[SPVSWINDOW]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  326.   GET_16BIT_PROC(SPVGPOS);
  327.   sp3d_hindir[SPVGPOS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  328.   GET_16BIT_PROC(SPVSPOS);
  329.   sp3d_hindir[SPVSPOS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  330.   GET_16BIT_PROC(SPVEINFO);
  331.   sp3d_hindir[SPVEINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  332.   GET_16BIT_PROC(SPDOT);
  333.   sp3d_hindir[SPDOT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  334.   GET_16BIT_PROC(SPCLRT);
  335.   sp3d_hindir[SPCLRT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  336.   GET_16BIT_PROC(SPCLR);
  337.   sp3d_hindir[SPCLR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  338.   GET_16BIT_PROC(SPNOCLIP);
  339.   sp3d_hindir[SPNOCLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  340.   GET_16BIT_PROC(SPCLIP);
  341.   sp3d_hindir[SPCLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  342.   GET_16BIT_PROC(SPSPLIT);
  343.   sp3d_hindir[SPSPLIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  344.   GET_16BIT_PROC(SPSHOW);
  345.   sp3d_hindir[SPSHOW]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  346.   GET_16BIT_PROC(SPSHWPG);
  347.   sp3d_hindir[SPSHWPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  348.   GET_16BIT_PROC(SPSELPG);
  349.   sp3d_hindir[SPSELPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  350.   GET_16BIT_PROC(SPENFONT);
  351.   sp3d_hindir[SPENFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  352.   GET_16BIT_PROC(SPREMOVEFONT);
  353.   sp3d_hindir[SPREMOVEFONT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  354.   GET_16BIT_PROC(SPSELFONT);
  355.   sp3d_hindir[SPSELFONT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  356.   GET_16BIT_PROC(SPRESETVLU);
  357.   sp3d_hindir[SPRESETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  358.   GET_16BIT_PROC(SPGETVLU);
  359.   sp3d_hindir[SPGETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  360.   GET_16BIT_PROC(SPSETVLU);
  361.   sp3d_hindir[SPSETVLU]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  362.   GET_16BIT_PROC(SPTRANSP);
  363.   sp3d_hindir[SPTRANSP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  364.   GET_16BIT_PROC(SPL1STYLE);
  365.   sp3d_hindir[SPL1STYLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  366.   GET_16BIT_PROC(SPLSTYLE);
  367.   sp3d_hindir[SPLSTYLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  368.   GET_16BIT_PROC(SPOPMODE);
  369.   sp3d_hindir[SPOPMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  370.   GET_16BIT_PROC(SPRGBBCOLOR);
  371.   sp3d_hindir[SPRGBBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  372.   GET_16BIT_PROC(SPBCOLOR);
  373.   sp3d_hindir[SPBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  374.   GET_16BIT_PROC(SPIFONT);
  375.   sp3d_hindir[SPIFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  376.   GET_16BIT_PROC(SPICOLOR);
  377.   sp3d_hindir[SPICOLOR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  378.   GET_16BIT_PROC(SPIPAGE);
  379.   sp3d_hindir[SPIPAGE]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  380.   GET_16BIT_PROC(SPINFO);
  381.   sp3d_hindir[SPINFO]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  382.   GET_16BIT_PROC(SPRGBCOLOR);
  383.   sp3d_hindir[SPRGBCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  384.   GET_16BIT_PROC(SPCOLOR);
  385.   sp3d_hindir[SPCOLOR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  386.   GET_16BIT_PROC(SPWVECT);
  387.   sp3d_hindir[SPWVECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  388.   GET_16BIT_PROC(SPVECT);
  389.   sp3d_hindir[SPVECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  390.   GET_16BIT_PROC(SPEND);
  391.   sp3d_hindir[SPEND]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  392.   GET_16BIT_PROC(SPINIT);
  393.   sp3d_hindir[SPINIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  394.   GET_16BIT_PROC(SPGVMODE);
  395.   sp3d_hindir[SPGVMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  396.   GET_16BIT_PROC(SPSVMODE);
  397.   sp3d_hindir[SPSVMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  398.   GET_16BIT_PROC(SPVMINFO);
  399.   sp3d_hindir[SPVMINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  400.   GET_16BIT_PROC(SPDEVINFO);
  401.   sp3d_hindir[SPDEVINFO]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  402.   GET_16BIT_PROC(SPSELCARD);
  403.   sp3d_hindir[SPSELCARD]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  404.   GET_16BIT_PROC(SPDEFFONT);
  405.   sp3d_hindir[SPDEFFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  406.   GET_16BIT_PROC(SPLDFONT);
  407.   sp3d_hindir[SPLDFONT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  408.   GET_16BIT_PROC(COPYCLIP);
  409.   sp3d_hindir[COPYCLIP]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  410.   GET_16BIT_PROC(SPCLMEM);
  411.   sp3d_hindir[SPCLMEM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  412.   GET_16BIT_PROC(SPCLFREE);
  413.   sp3d_hindir[SPCLFREE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  414.   GET_16BIT_PROC(SPCLINFO);
  415.   sp3d_hindir[SPCLINFO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  416.   GET_16BIT_PROC(SPCLEXE);
  417.   sp3d_hindir[SPCLEXE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  418.   GET_16BIT_PROC(SPCLDELETE);
  419.   sp3d_hindir[SPCLDELETE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  420.   GET_16BIT_PROC(SPCLCALL);
  421.   sp3d_hindir[SPCLCALL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  422.   GET_16BIT_PROC(SPCLCLOSE);
  423.   sp3d_hindir[SPCLCLOSE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  424.   GET_16BIT_PROC(SPCLOPEN);
  425.   sp3d_hindir[SPCLOPEN]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  426.   GET_16BIT_PROC(SP3VISIBLELINES);
  427.   sp3d_hindir[SP3VISIBLELINES]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  428.   GET_16BIT_PROC(SP3GETERROR);
  429.   sp3d_hindir[SP3GETERROR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  430.   GET_16BIT_PROC(SP3LIGHTSWITCH);
  431.   sp3d_hindir[SP3LIGHTSWITCH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  432.   GET_16BIT_PROC(SP3LIGHTDEF);
  433.   sp3d_hindir[SP3LIGHTDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  434.   GET_16BIT_PROC(SP3LIGHTMODE);
  435.   sp3d_hindir[SP3LIGHTMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  436.   GET_16BIT_PROC(SP3LIGHTAMBIENT);
  437.   sp3d_hindir[SP3LIGHTAMBIENT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  438.   GET_16BIT_PROC(SP3RESETSTACK);
  439.   sp3d_hindir[SP3RESETSTACK]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  440.   GET_16BIT_PROC(SP3LOADMATRIX);
  441.   sp3d_hindir[SP3LOADMATRIX]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  442.   GET_16BIT_PROC(SP3MULTMATRIX);
  443.   sp3d_hindir[SP3MULTMATRIX]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  444.   GET_16BIT_PROC(SP3TRANSLATE);
  445.   sp3d_hindir[SP3TRANSLATE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  446.   GET_16BIT_PROC(SP3SCALE);
  447.   sp3d_hindir[SP3SCALE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  448.   GET_16BIT_PROC(SP3ROTATE);
  449.   sp3d_hindir[SP3ROTATE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_CHAR,INDIR_ENDLIST);
  450.   GET_16BIT_PROC(SP3CONCATENATION);
  451.   sp3d_hindir[SP3CONCATENATION]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  452.   GET_16BIT_PROC(SP3POPMATRIX);
  453.   sp3d_hindir[SP3POPMATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  454.   GET_16BIT_PROC(SP3PUSHMATRIX);
  455.   sp3d_hindir[SP3PUSHMATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  456.   GET_16BIT_PROC(SP3TRANSFORM);
  457.   sp3d_hindir[SP3TRANSFORM]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  458.   GET_16BIT_PROC(SP3CLIP);
  459.   sp3d_hindir[SP3CLIP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  460.   GET_16BIT_PROC(SP3DCMAP);
  461.   sp3d_hindir[SP3DCMAP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  462.   GET_16BIT_PROC(SP3PROJECTION);
  463.   sp3d_hindir[SP3PROJECTION]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  464.   GET_16BIT_PROC(SP3VIEW);
  465.   sp3d_hindir[SP3VIEW]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  466.   GET_16BIT_PROC(SP3MATERIALSET);
  467.   sp3d_hindir[SP3MATERIALSET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  468.   GET_16BIT_PROC(SP3MATERIALDEF);
  469.   sp3d_hindir[SP3MATERIALDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  470.   GET_16BIT_PROC(SP3LINETYPE);
  471.   sp3d_hindir[SP3LINETYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  472.   GET_16BIT_PROC(SP3INTERIORTYPE);
  473.   sp3d_hindir[SP3INTERIORTYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  474.   GET_16BIT_PROC(SP3FACECULL);
  475.   sp3d_hindir[SP3FACECULL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  476.   GET_16BIT_PROC(SP3DEPTHCUE);
  477.   sp3d_hindir[SP3DEPTHCUE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  478.   GET_16BIT_PROC(SP3DEFDEPTHCUE);
  479.   sp3d_hindir[SP3DEFDEPTHCUE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_PTR,INDIR_ENDLIST);
  480.   GET_16BIT_PROC(SP3OPACITY);
  481.   sp3d_hindir[SP3OPACITY]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  482.   GET_16BIT_PROC(SPCONCAVE);
  483.   sp3d_hindir[SPCONCAVE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  484.   GET_16BIT_PROC(SP3BORDERTYPE);
  485.   sp3d_hindir[SP3BORDERTYPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  486.   GET_16BIT_PROC(SP3BFDISTINGUISH);
  487.   sp3d_hindir[SP3BFDISTINGUISH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  488.   GET_16BIT_PROC(SPANTIALIASSET);
  489.   sp3d_hindir[SPANTIALIASSET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  490.   GET_16BIT_PROC(SPANTIALIASDEF);
  491.   sp3d_hindir[SPANTIALIASDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  492.   GET_16BIT_PROC(SP3POLYGONLIST);
  493.   sp3d_hindir[SP3POLYGONLIST]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  494.   GET_16BIT_PROC(SP3POLYGON);
  495.   sp3d_hindir[SP3POLYGON]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  496.   GET_16BIT_PROC(SP3POLYGONHOLE);
  497.   sp3d_hindir[SP3POLYGONHOLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  498.   GET_16BIT_PROC(SP3POLYLINE);
  499.   sp3d_hindir[SP3POLYLINE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  500.   GET_16BIT_PROC(SP3ZCLEAR);
  501.   sp3d_hindir[SP3ZCLEAR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  502.   GET_16BIT_PROC(SP3VPCLEAR);
  503.   sp3d_hindir[SP3VPCLEAR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_ENDLIST);
  504.   GET_16BIT_PROC(SP3DATAFORMAT);
  505.   sp3d_hindir[SP3DATAFORMAT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  506.   GET_16BIT_PROC(SP3ZBUFFER);
  507.   sp3d_hindir[SP3ZBUFFER]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  508.   GET_16BIT_PROC(SPESCAPE);
  509.   sp3d_hindir[SPESCAPE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  510.   GET_16BIT_PROC(SPSWAPBUFFERS);
  511.   sp3d_hindir[SPSWAPBUFFERS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  512.   GET_16BIT_PROC(SPDOUBLEBUFFER);
  513.   sp3d_hindir[SPDOUBLEBUFFER]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  514.   GET_16BIT_PROC(SPCOLORRAMP);
  515.   sp3d_hindir[SPCOLORRAMP]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  516.   GET_16BIT_PROC(SPFRAMECOPY);
  517.   sp3d_hindir[SPFRAMECOPY]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  518.   GET_16BIT_PROC(SPFRAMEDELETE);
  519.   sp3d_hindir[SPFRAMEDELETE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  520.   GET_16BIT_PROC(SPFRAMESELECT);
  521.   sp3d_hindir[SPFRAMESELECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  522.   GET_16BIT_PROC(SPFRAMECREATE);
  523.   sp3d_hindir[SPFRAMECREATE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  524.   GET_16BIT_PROC(SP3EXIT);
  525.   sp3d_hindir[SP3EXIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  526.   GET_16BIT_PROC(SP3INIT);
  527.   sp3d_hindir[SP3INIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  528.   GET_16BIT_PROC(SP3FLIPNORMAL);
  529.   sp3d_hindir[SP3FLIPNORMAL]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  530.   GET_16BIT_PROC(SPVMOFFS);
  531.   sp3d_hindir[SPVMOFFS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  532.   GET_16BIT_PROC(SPSORG);
  533.   sp3d_hindir[SPSORG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  534.   GET_16BIT_PROC(SPINQPG);
  535.   sp3d_hindir[SPINQPG]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  536.   GET_16BIT_PROC(SP3COLORGLOBAL);
  537.   sp3d_hindir[SP3COLORGLOBAL]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  538.   GET_16BIT_PROC(SPCLMODE);
  539.   sp3d_hindir[SPCLMODE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  540.   GET_16BIT_PROC(SPCLMASK);
  541.   sp3d_hindir[SPCLMASK]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  542.   GET_16BIT_PROC(SPCLOPTIMIZE);
  543.   sp3d_hindir[SPCLOPTIMIZE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  544.   GET_16BIT_PROC(SPUINIT);
  545.   sp3d_hindir[SPUINIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  546.   GET_16BIT_PROC(SPUEXIT);
  547.   sp3d_hindir[SPUEXIT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  548.   GET_16BIT_PROC(SPUGETERROR);
  549.   sp3d_hindir[SPUGETERROR]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  550.   GET_16BIT_PROC(SPUBEGINTESS);
  551.   sp3d_hindir[SPUBEGINTESS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  552.   GET_16BIT_PROC(SPUENDTESS);
  553.   sp3d_hindir[SPUENDTESS]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  554.   GET_16BIT_PROC(SPUGETTESS);
  555.   sp3d_hindir[SPUGETTESS]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  556.   GET_16BIT_PROC(SPUPOLYGON);
  557.   sp3d_hindir[SPUPOLYGON]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  558.   GET_16BIT_PROC(SP3MATRIX);
  559.   sp3d_hindir[SP3MATRIX]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  560.   GET_16BIT_PROC(SPUPOLYGONHOLE);
  561.   sp3d_hindir[SPUPOLYGONHOLE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  562.   GET_16BIT_PROC(SPIDENTADDR);
  563.   sp3d_hindir[SPIDENTADDR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  564.   GET_16BIT_PROC(SP3ATTR);
  565.   sp3d_hindir[SP3ATTR]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  566.   GET_16BIT_PROC(SPUTEXTURE);
  567.   sp3d_hindir[SPUTEXTURE]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_PTR,INDIR_DWORD,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  568.   GET_16BIT_PROC(SP3TEXTUREDEF);
  569.   sp3d_hindir[SP3TEXTUREDEF]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_PTR,INDIR_ENDLIST);
  570.   GET_16BIT_PROC(SP3TEXTURESET);
  571.   sp3d_hindir[SP3TEXTURESET]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  572.   GET_16BIT_PROC(SP3SELECT);
  573.   sp3d_hindir[SP3SELECT]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_ENDLIST);
  574.   GET_16BIT_PROC(SP3GETSELECT);
  575.   sp3d_hindir[SP3GETSELECT]=GetIndirectFunctionHandle (fp,INDIR_PTR,INDIR_DWORD,INDIR_ENDLIST);
  576.   GET_16BIT_PROC(SP3SETSELVOLUME);
  577.   sp3d_hindir[SP3SETSELVOLUME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_DWORD,INDIR_ENDLIST);
  578.   GET_16BIT_PROC(SP3CLEARNAMES);
  579.   sp3d_hindir[SP3CLEARNAMES]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  580.   GET_16BIT_PROC(SP3PUSHNAME);
  581.   sp3d_hindir[SP3PUSHNAME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_ENDLIST);
  582.   GET_16BIT_PROC(SP3POPNAME);
  583.   sp3d_hindir[SP3POPNAME]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_ENDLIST);
  584.   GET_16BIT_PROC(SP3LOADNAME);
  585.   sp3d_hindir[SP3LOADNAME]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_ENDLIST);
  586.   GET_16BIT_PROC(SP3IMAGE);
  587.   sp3d_hindir[SP3IMAGE]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_WORD,INDIR_PTR,INDIR_ENDLIST);
  588.   GET_16BIT_PROC(SPUIMAGEIO);
  589.   sp3d_hindir[SPUIMAGEIO]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_PTR,INDIR_WORD,INDIR_ENDLIST);
  590.   GET_16BIT_PROC(SPSET);
  591.   sp3d_hindir[SPSET]=GetIndirectFunctionHandle (fp,INDIR_DWORD,INDIR_ENDLIST);
  592.   GET_16BIT_PROC(SP_WIN_FLUSH);
  593.   sp3d_hindir[SP_WIN_FLUSH]=GetIndirectFunctionHandle (fp,INDIR_WORD,INDIR_DWORD,INDIR_DWORD,INDIR_WORD,INDIR_DWORD,INDIR_ENDLIST);
  594.   return 1;
  595. }
  596.