Special Feature Special features of Snake Tail Hack
This sample was created in order to meet the following requests. Please play with it and re-create it.
I want to display 2D images as well.
A 2D image was displayed in the center of the stage as a texture.
Since the original size of the texture is 64dots X 64dots, it is not possible to map it to one surface as it is. In reality, it is mapped after data is divided into 32dots X 32dots.
Reference: DrawMovie() of map.c
: : /* 64dots X 64dots texture is divided into 4 and read. */ /* In other words, 4 32dots X 32dots-textures are read. */ /* Read texture data (upper left portion�j */ gDPLoadTextureTile(glistp++, bmp, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 64, 0, 0, 31, 31, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_NOLOD, G_TX_NOLOD); gSP2Triangles(glistp++,0,1,2,0,0,2,3,0); : :
I want to try 3D display.
The stage map is polygon-displayed.
By moving the C button of the Controller up and down, the position of image point can be changed.
Reference: DrawMapObj() of map.c
Model data that was output by a modeling tool using gSPDisplayList() is actually output. : the portion of gSPDisplayList(glistp++,kabe_mdl_model0); :
I want to display a screen with sound.
It can be done rather easily as NuSystem is used. Sequece and sound effect are emitted with screen display.
Reference:mainproc() of gamemain.c
sequence : nuAuSeqPlayerSetNo(0,0); nuAuSeqPlayerPlay(0); :Reference:updateGame() of gamemain.c
sound effect : nuAuSndPlayerPlay(EFF_PAUSE); nuAuSndPlayerSetPitch(44100.0/32000); :
I want to use 4 Controllers and 4 Controller Paks.
Created a game which uses 4 Controllers. Also, it uses 4 Controller Paks. It should be a reference as an error process sample, too.
Reference:updateGame() of gamemain.c
: : /* Updating process for each pad */ the portion of for(padnum = 0; padnum < NU_CONT_MAXCONTROLLERS; padnum++){ : :
I want to proceed with a program while bringing a program or data from the ROM area.
Reading to a fixed area as an example of not only the data that is read first, but also the data which I brought from the ROM later. Image data in the center of the screen is read one by one.
Reference:ReadMovie() of gamemain.c
: /* Actually copy data from ROM to RDRAM. */ the portion of nuPiReadRom( (u32)(_moviedataSegmentRomStart + onecutlen * MovieNum), (void *)&MovieBuf[0], onecutlen ); : :