ZoriaRPG

ywkls: DrawMap Revision

May 8th, 2017
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void DrawMap(){
  2.     //Black out the screen, but not the subscreen,
  3.     Screen->Rectangle(6, 0, 0, 256,176, 0x0F, -1, 0,0,0, true, 128);
  4.     //Create the map object
  5.     Screen->SetRenderTarget(RT_BITMAP1);
  6.     //Black out the bitmap.
  7.     Screen->Rectangle(7, 0, 0, 512,512, 0x0F, -1, 0,0,0, true, 128);
  8.     //CLear the black? -That is what this does. -Z
  9.     Screen->Rectangle(7, 0, 0, 512,512, 0x00, -1, 0,0,0, true, 128);
  10.     //I presume that the whole map is pre-known for this.
  11.     Screen->DrawTile(7,0,0, SamusVars[MINIMAP_TILE],
  12.                      SamusVars[MINIMAP_WIDTH], SamusVars[MINIMAP_HEIGHT],
  13.                      2, -1, -1, 0, 0, 0, 0, true, 128);
  14.         //If we visited an area, tack it on?
  15.     if(SamusVars[CURRENT_AREA]==CRATERIA)
  16.         Screen->DrawTile(7,320,0, CRATERIA_EXTRA_TILE,
  17.                          1, 4, 2, -1, -1, 0, 0, 0, 0, true, 128);  
  18.     //Draw the map cvomposite to the screen.
  19.     Screen->SetRenderTarget(RT_SCREEN);
  20.    
  21.     if(GotMap(SamusVars[CURRENT_AREA])) {
  22.         Screen->DrawBitmap(7, RT_BITMAP1, SamusVars[MINIMAP_DRAW_X],
  23.                        SamusVars[MINIMAP_DRAW_Y],256,176,
  24.                        SamusVars[MAP_DRAW_X], SamusVars[MAP_DRAW_Y], 512, 352, 0, true); }
  25.     else { //Did you intend this else to cover the next three instructions, or only DrawBitmap, as it was doing?  -Z
  26.         Screen->DrawBitmap(7, RT_BITMAP1, SamusVars[MINIMAP_DRAW_X]+16,
  27.                        SamusVars[MINIMAP_DRAW_Y]+8,8,8,
  28.                        SamusVars[MAP_DRAW_X], SamusVars[MAP_DRAW_Y], 16, 16, 0, true);  
  29.         Screen->DrawCombo(6, SamusVars[MAP_SAMUS_X], SamusVars[MAP_SAMUS_Y],
  30.                       MAP_SAMUS_COMBO, 1, 1, MAP_SAMUS_CSET, -1, -1, 0, 0, 0, 48, 0, true, 128);
  31.         Screen->DrawTile(7, 0, 0, MAP_TILE, 16, 11,
  32.                      MAP_TILE_CSET, -1, -1, 0,  0,0, 0, true, 128);
  33.     }
  34. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×