##### Ninja Library - Texture Function

# njLoadTextureReqStop

Cancels immediate return texture loading.

### FORMAT

`

  #include <Ninja.h>
  Sint32 njLoadTextureReqStop( void )

`

### PARAMETER

  None

### RETURN

  1 | Success |
  -1 | Failure |

### DESCRIPTION

  Execute this function if you want to cancel the immediate return texture loading function `njLoadTextureReq()` while it is in use. This function cancels loading of the immediate return GD file and closes the file. As the GD does not automatically reinitialize, manually restart the GD.

### EXAMPLE

      Sint32 njUserMain(void)
      {
              per = pdGetPeripheral(PDD_PORT_A0);

              switch(Mode){
              case START:
                      GameInit();
                      Mode = TEX_LOAD;
                      break;
              case TEX_LOAD:
                      /* `Process during loading */
                      DrawLoading();
                      /* Load texture */
                      if(njLoadTextureReq(&texlist) == NJD_TEX_STAT_END){
                              Mode = GAME_MAIN;
                      }

                      /* When using soft reset */
                      if(per&SOFT_RESET){
                              Mode = RESET;
                      }
                      break;
              case RESET:
                      /* Cancel the immediate return function */
                      njLoadTextureReqStop();
                      /* GD reinitialization */
                      gdFsReinit();
                      /* Release texture because njLoadTextureReq function stops while in process of loading. */
                      njReleaseTexture(&texlist);
                      Mode = START;
                      break;
              case GAME_MAIN:
                              :
                              :
                      break;
              }
      }

### NOTE

  In the case of an error, the contents of the error are reported in gderr by the function `njGetTextureErrStat().` * Errors do not usually appear. If an error appears, it is a serious error.

### REFERENCE

  `njLoadTextureReq()
  `

njLoadTextureReqStop

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999