Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

ISO directdraw border question

This topic is 4752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I draw a black border all around my map so I dont get
void draw_tiles(void)
{
    for(Tileset.y=0; Tileset.y <Mapy;Tileset.y++)
    {for(Tileset.x=0; Tileset.x < Mapx; Tileset.x++)
    {  //what does this do?
    
    Tileset.scroll_x = Tileset.x + (Tileset.world_camerax/Tileset.Tile_Width  );//this allows scrolling on y axis
    Tileset.scroll_y  =Tileset.y+ (Tileset.world_cameray/Tileset.Tile_Hight );//this allows scrolling on x axis
      
  
      Tileset.offset_x= Tileset.world_camerax+ (screenx/2);
      Tileset.offset_y=Tileset.world_cameray+(screeny/2);
     
             
           Tileset.tiles = map[Tileset.y ][Tileset.x ];       

 
    tile_src.left = ((Tileset.tiles - 1)%14) *Tileset.Tile_Width;
    tile_src.top =  ((Tileset.tiles - 1) /14) * Tileset.Tile_Hight ;
    tile_src.right = tile_src.left + Tileset.Tile_Width ;
    tile_src.bottom = tile_src.top + Tileset.Tile_Hight  ; 

dstr.left= ((Tileset.x-Tileset.y)*Tileset.Tile_Width/2)+Tileset.offset_x;//+(800/2);
dstr.top=  ((Tileset.y+Tileset.x)*Tileset.Tile_Hight/2)-Tileset.offset_y;//-(600/2);


dstr.right = dstr.left +Tileset.Tile_Width ;
dstr.bottom = dstr.top +(Tileset.Tile_Hight + Tileset.Tile_Width) ;


//bout<<dstr.left<<" "<<dstr.top<<endl;


lpBackBuffer->Blt(&dstr,g_pddTile,&tile_src,DDBLT_WAIT|DDBLT_KEYSRC,NULL);  
}  
 }
 } 




[Edited by - kingpinzs on May 21, 2005 6:08:11 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!