Advertisement
authorblues

Untitled

Apr 1st, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // the remainder of this method is dedicated to moving the overworld ghost sprites to the locations
  2.     // where the ghost houses have been moved. shoutouts to Nintendo for being kinda shitty at programming
  3.     rom.set(
  4.     [
  5.         0x00, 0x00, 0x01, 0xE0, 0x00,
  6.         0x03, 0x00, 0x00, 0x00, 0x00,
  7.         0x06, 0x70, 0x01, 0x20, 0x00,
  8.         0x07, 0x38, 0x00, 0x8A, 0x01,
  9.         0x00, 0x58, 0x00, 0x7A, 0x00,
  10.         0x08, 0x88, 0x01, 0x18, 0x00,
  11.         0x09, 0x48, 0x01, 0xFC, 0xFF
  12.     ],
  13.     0x27625);
  14.    
  15.     var ghostspritebase = 0x27625 + 35, ghostsubmapbase = 0x27666;
  16.     for (var i = 0; i < stages.length; ++i)
  17.         if (stages[i].copyfrom.ghost)
  18.         {
  19.             var x = stages[i].tile[0] * 2 - 0x10;
  20.             var y = stages[i].tile[1] * 2 - 0x08;
  21.            
  22.             rom.set([0x0A, x & 0xFF, (x >> 8) & 0xFF, y & 0xFF, (y >> 8) & 0xFF], ghostspritebase);
  23.             ghostspritebase += 5;
  24.            
  25.             rom[ghostsubmapbase] = (stages[i].tile[1] >= 0x20);
  26.             ghostsubmapbase += 1;
  27.         }
  28.        
  29.     rom.set([0x01, 0x20, 0x40, 0x60, 0x80, 0xA0], 0x2766F);
  30.     rom.set(
  31.     [
  32.         0xAD, 0x11, 0x1F, 0x29, 0x01, 0x5D, 0x5C, 0xF6, 0xD0, 0x2E, 0xA9, 0x34, 0xBC, 0x95, 0x0E,
  33.         0x30, 0x02, 0xA9, 0x44, 0xEB, 0xA9, 0x60, 0x20, 0x06, 0xFB, 0x80, 0x1D
  34.     ],
  35.     0x27D7C);
  36.    
  37.     rom[0x276B0] = 0x0A;
  38.     rom[0x27802] = 0x0A;
  39.    
  40.     rom.set([0x22, 0x97, 0xFD, 0x04], 0x01AA4);
  41.     rom.set([0x22, 0x77, 0xF6, 0x04, 0x5C, 0x00, 0x80, 0x7F], 0x27D97);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement