SH SERIES C Compiler (Ver. 5.0(Release10))       06-Jul-1998 19:37:36  PAGE    1

************ SOURCE LISTING ************

FILE NAME: .\test.c

  Seq       File  Line   0----+----1----+----2----+----3----+----4----+----5----
    1     test.c     1    /*
    2     test.c     2    Test ReadBNC for Official Format (BASIC)
    3     test.c     3    */
    4     test.c     4    
    5     test.c     5    #include <Shinobi.h>
 4760     test.c     6    #include <nindows.h>
 5310     test.c     7    #include <NinjaCnk.h>
 5700     test.c     8    #include <NinjaCnk2.h>
 5905     test.c     9    #include "NinjaBNF.h"
 5929     test.c    10    
 5930     test.c    11    
 5931     test.c    12    NJS_OBJECT *BSK_OBJECT;
 5932     test.c    13    NJS_MOTION *BSK_OBJECT_MOTION;
 5933     test.c    14    NJS_TEXLIST     *tlist1;
 5934     test.c    15    char *pFilename = "run_null3.nj";
 5935     test.c    16    char *pMFilename = "rocket03d_run.njm";
 5936     test.c    17    
 5937     test.c    18    
 5938     test.c    19    NJS_TEXMEMLIST  tex[100];
 5939     test.c    20    NJS_TEXINFO     info;
 5940     test.c    21    
 5941     test.c    22    
 5942     test.c    23    extern NJS_MATRIX       matrix[128];
 5943     test.c    24    extern Uint8 vbuf[];
 5944     test.c    25    /*extern NJS_VERTEX_BUF vbuf[4096];*/
 5945     test.c    26    
 5946     test.c    27    NJS_VIEW        view;
 5947     test.c    28    NJS_LIGHT       light;
 5948     test.c    29    
 5949     test.c    30    Uint32 count = 0;
 5950     test.c    31    
 5951     test.c    32    
 5952     test.c    33    
 5953     test.c    34    void Count(void)
 5954     test.c    35    {
 5955     test.c    36            count++;
 5956     test.c    37    
 5957     test.c    38    }
 5958     test.c    39    
 5959     test.c    40    
 5960     test.c    41    
 5961     test.c    42    void njUserInit(void)
 5962     test.c    43    {
 5963     test.c    44        Uint8 *work_buff;
 5964     test.c    45        Uint32 fpos = 0, rtype, fsize;
 5965     test.c    46    
 5966     test.c    47            /*sbInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEB
                         +UFFER_MODE_RGB555, 1 );*/
 5967     test.c    48  E     sbInitSystem( 5, 1, 1 );
 5968     test.c    49            njInitVertexBuffer( 800000, 0, 300000, 0 );
 5969     test.c    50            njInitMatrix( matrix, 128 , 1);
 5970     test.c    51            njInit3D( vbuf, 4096 );
 5971     test.c    52    
 5972     test.c    53    
 5973     test.c    54            njInitView( &view );
 5974     test.c    55            njTranslateViewRelative(&view, 0.f, 0.f, 100.f
                         +);
 5975     test.c    56            njSetView( &view );
 5976     test.c    57    
 5977     test.c    58    
 5978     test.c    59  E         njCreateLight( &light, 0x01 |0x02 |0x10  );
 5979     test.c    60            njSetLightIntensity( &light, 1.5f, 1.0f, 0.7f 
                         +);
 5980     test.c    61  E         njSetLightAngle( &light, ((Angle)(((3.141592 /
                         + 30.f) * 65536.0) / (2 * 3.141592))), ((Angle)(((3.141
                         +592 / 4.f) * 65536.0) / (2 * 3.141592))) );
 5981     test.c    62            /*njSetLightDirection( &light, 0, 0.707f, -0.7
                         +07f );*/
 5982     test.c    63            njSetLightDirection( &light, 0, 0.f, -1.f );
 5983     test.c    64    
 5984     test.c    65        /*-- OBJECT-------------------------*/
 5985     test.c    66        fpos = 0;
 5986     test.c    67        work_buff = nuOpenBNF(pFilename);
 5987     test.c    68        tlist1 = (NJS_TEXLIST *)nuReadBNF(work_buff, &fpos
                         +, &rtype);
 5988     test.c    69            BSK_OBJECT = (NJS_OBJECT *)nuReadBNF(work_buff
                         +, &fpos, &rtype);
 5989     test.c    70        nuCloseBNF(work_buff);
 5990     test.c    71        /*---------------------------------*/
 5991     test.c    72    
 5992     test.c    73        /*-- OBJECT MOTION-----------------*/
 5993     test.c    74        fpos = 0;
 5994     test.c    75        work_buff = nuOpenBNF(pMFilename);
 5995     test.c    76            BSK_OBJECT_MOTION = (NJS_MOTION *)nuReadBNF(wo
                         +rk_buff, &fpos, &rtype);
 5996     test.c    77        nuCloseBNF(work_buff);
 5997     test.c    78        /*---------------------------------*/
 5998     test.c    79    
 5999     test.c    80        njInitTextureBuffer(vbuf,4096*96);
 6000     test.c    81            njInitTexture( tex, 100 );
 6001     test.c    82            njLoadTexture( tlist1 );
 6002     test.c    83            njSetTexture( tlist1 );
 6003     test.c    84    
 6004     test.c    85            njSetBackColor(0x00000000,0x00000000,0x000000F
                         +F);
 6005     test.c    86    
 6006     test.c    87            njSetVSyncFunction(Count);
 6007     test.c    88  E         nwInitSystem(10,0 );
 6008     test.c    89    }
 6009     test.c    90    
 6010     test.c    91    
 6011     test.c    92    
 6012     test.c    93    Sint32 njUserMain(void)
 6013     test.c    94    {
 6014     test.c    95        static float frame = 0.f;
 6015     test.c    96    
 6016     test.c    97        njDrawMotion(BSK_OBJECT, BSK_OBJECT_MOTION, frame)
                         +;
 6017     test.c    98    
 6018     test.c    99  E     njPrintD(((3)<<16|(5)),count,8);
 6019     test.c   100  E     njPrintF(((3)<<16|(8)),frame,8);
 6020     test.c   101    
 6021     test.c   102        frame++;
 6022     test.c   103        if(frame > 17.f)
 6023     test.c   104            frame = 0.f;
 6024     test.c   105    
 6025     test.c   106            return nwExecute();
 6026     test.c   107    }
 6027     test.c   108    
 6028     test.c   109    void njUserExit(void)
 6029     test.c   110    {
 6030     test.c   111            nwExitSystem();
 6031     test.c   112            njExitTexture();
 6032     test.c   113            sbExitSystem();
 6033     test.c   114    }
 6034     test.c   115    
 6035     test.c   116    intcInit(){}
SH SERIES C Compiler (Ver. 5.0(Release10))       06-Jul-1998 19:37:36  PAGE    1


******** STATISTICS INFORMATION ********


********** ERROR INFORMATION ***********

NUMBER OF ERRORS:           0
NUMBER OF WARNINGS:         2




******* SOURCE LINE INFORMATION ********

COMPILED SOURCE LINE:      116



******* SECTION SIZE INFORMATION *******

PROGRAM  SECTION (P):                               00000274 Byte(s)
PROGRAM  SECTION (P$8):                             00000000 Byte(s)
CONSTANT SECTION (C):                               00000022 Byte(s)
CONSTANT SECTION (C$8):                             00000000 Byte(s)
DATA     SECTION (D):                               00000010 Byte(s)
DATA     SECTION (D$8):                             00000000 Byte(s)
BSS      SECTION (B):                               00001B08 Byte(s)
BSS      SECTION (B$8):                             00000000 Byte(s)

 TOTAL PROGRAM SIZE: 00001DAE Byte(s)



********** LABEL INFORMATION ***********

NUMBER OF EXTERNAL REFERENCE SYMBOLS:           30
NUMBER OF EXTERNAL DEFINITION SYMBOLS:          15
NUMBER OF INTERNAL/EXTERNAL SYMBOLS:            45
*** COMMAND PARAMETER ***


  .\test.c -ob=output\test.obj -define=__SHC__,__SET4__ -debug -sub=shc.sub 

