int VectorX3D(int distance, int yaw, int pitch){ return distance*Sin(pitch)*Cos(yaw); } int VectorY3D(int distance, int yaw, int pitch){ return distance*Sin(pitch)*Sin(yaw); } int VectorZ3D(int distance, int yaw, int pitch){ return distance*Cos(pitch); } void RotateX3D(int angle, int cx, int cy, int cz){ for(int i=0; iCollDetection = false; } } hero script scroll { void run() { // bitmap image1 = Game->AllocateBitmap(); // image1->Read(0,"test.png"); bitmap resized = Game->CreateBitmap(256, 256); bitmap scrn = Game->CreateBitmap(256, 256); bitmap fullmap = Game->CreateBitmap(256*16, 176*8); bitmap herosprite = Game->CreateBitmap(16,16); bitmap heroBUF = Game->CreateBitmap(16,16); for(int i=0; i<128; i++) { fullmap->DrawScreen(6, 1, i, (i%16)*256, Floor(i/16)*176, 0); } //scrn->Rectangle(6, 0, 0, 255, 175, 0x00, 1, 0, 0, 0, true, 128); //scrn->DrawLayer(6, 1, 0x01, 0, 0, 0, 0, 128); bitmap b = Game->CreateBitmap(256, 256); int xPos; int yPos; while(1) { this->X = ( 16*8 )-8; this->Y = (16*7.5)-56-8; LogPrint("Link->Tile is: %d \n", Link->Tile); herosprite->Clear(0); herosprite->FastTile(6, 0,0,Link->Tile, 6, 128); if(Link->InputLeft) xPos-=5; else if(Link->InputRight) xPos+=5; if(Link->InputUp) yPos-=5; else if(Link->InputDown) yPos+=5; xPos = Clamp(xPos, 0, 256*15); yPos = Clamp(yPos, 0, 176*7); scrn->BlitTo(6, fullmap, xPos, yPos, 256, 256, 0, 0, resized->Width, resized->Height, 0, 0, 0, 0, 0, false); int sW = 128; int sH = 128; scrn->Blit(7, -2, 0, 0, 256, 256, 0, -56, 256, 256, 0, 0, 0, 0, 0, false); herosprite->Blit(7, -2, 0, 0, 16, 16, this->X, this->Y, 16, 16, 0, 0, 0, (( this->Dir == DIR_LEFT ) ? BITDX_VFLIP : 0), 0, true); NoAction(); Waitframe(); } } }