Hello I have some very weird DrawLayer behaviour... it does not seem to draw layer 6 and also sometimes has trouble drawing other layers(like only partially drawing them or sometimes drawing things that were already deleted, how that will work no idea...). In any case the script function that causes trouble:
CODE
void scroll(int old_screen,int old_map,int curscreen,int curmap,int frames_to_finish_scrolling,int y_scroll_speed, int x_scroll_speed){
for(int i=0;i<frames_to_finish_scrolling;i++){
NoAction();
Screen->Rectangle(6, 0, 0, 512, 512, 0, 1.0, 0, 0, 0, true, 128);
Screen->SetRenderTarget(1);
//handle Up and down scrolling
if(x_scroll_speed==0){
for(int j=0;j<7;j++){
if(j==3&&y_scroll_speed>0) Screen->FastTile( 3, Link->X, i*y_scroll_speed, Link->Tile, 6, 128 ); //draw link for upscroll
if(j==3&&y_scroll_speed<0) Screen->FastTile( 3, Link->X, 168+i*y_scroll_speed, Link->Tile, 6, 128 ); //draw Link for downscroll
Screen->DrawLayer(j, curmap, curscreen, j, 0, -(y_scroll_speed/Abs(y_scroll_speed))*176+i*y_scroll_speed, 0, 128);
Screen->DrawLayer(j, old_map, old_screen, j, 0, i*y_scroll_speed, 0, 128);
}
}
//handle Left and right scrolling
if(y_scroll_speed==0){
for(int j=0;j<7;j++){
if(j==3&&x_scroll_speed>0) Screen->DrawTile(3, i*x_scroll_speed, Link->Y, Link->Tile, Link->TileWidth, Link->TileHeight, 6, 16, 16, 0,0, 0, Link->Flip, true, 128);//draw Link for rightscroll
if(j==3&&x_scroll_speed<0) Screen->FastTile( 3, 248+i*x_scroll_speed, Link->Y, Link->Tile, 6, 128 ); //draw Link for leftscroll
Screen->DrawLayer(j, curmap, curscreen, j, -(x_scroll_speed/Abs(x_scroll_speed))*256+x_scroll_speed*i, 0, 0, 128);
Screen->DrawLayer(j, old_map, old_screen, j, x_scroll_speed*i, 0, 0, 128);
}
}
Screen->SetRenderTarget(-1);
Screen->DrawBitmap( 6, 1, 0, 0, 256, 176, 0, 56, 256, 176, 0, true);
Waitframe();
}
}
Additional notes:
-I set 2 to background layer in the editor.
-If needed i can give the beta-testing questfile per pm.
Edit:
One more note @Castchaos: (I also had trouble(at least in RC2 and RC3) with warps changing digit like you did). The problem was triggered when a sidewarp and a warp were both set to for example A(in my case to different screens). When i made one of them warp B the problem was gone. Maybe that will help.(judasrising offered me that advice back then)
Edited by aaa2, 28 August 2012 - 04:10 PM.