Advertisement
Guest User

Untitled

a guest
Jul 15th, 2011
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. public void method50(int i, int lineColor, int l, int secondaryColor, int j1) {
  2. int k1 = worldController.method300(j1, l, i);
  3. if ((k1 ^ 0xffffffffffffffffL) != -1L) {
  4. int l1 = worldController.method304(j1, l, i, k1);
  5. int direction = l1 >> 6 & 3;
  6. int type = l1 & 0x1f;
  7. int color = lineColor;
  8. if(k1 > 0)
  9. color = secondaryColor;
  10. int mapPixels[] = miniMap.myPixels;
  11. int pixel = 24624 + l * 4 + (103 - i) * 512 * 4;
  12. int objectID = k1 >> 14 & 0x7fff;
  13. ObjectDef object = ObjectDef.forID(objectID);
  14. if ((object.mapSceneID ^ 0xffffffff) == 0) {
  15. if (type == 0 || type == 2) {
  16. if (direction == 0) {
  17. mapPixels[pixel] = color;
  18. mapPixels[pixel + 512] = color;
  19. mapPixels[1024 + pixel] = color;
  20. mapPixels[1536 + pixel] = color;
  21. } else if ((direction ^ 0xffffffff) == -2) {
  22. mapPixels[pixel] = color;
  23. mapPixels[pixel + 1] = color;
  24. mapPixels[pixel + 2] = color;
  25. mapPixels[3 + pixel] = color;
  26. } else if (direction == 2) {
  27. mapPixels[pixel - -3] = color;
  28. mapPixels[3 + (pixel + 512)] = color;
  29. mapPixels[3 + (pixel + 1024)] = color;
  30. mapPixels[1536 + (pixel - -3)] = color;
  31. } else if (direction == 3) {
  32. mapPixels[pixel + 1536] = color;
  33. mapPixels[pixel + 1536 + 1] = color;
  34. mapPixels[2 + pixel + 1536] = color;
  35. mapPixels[pixel + 1539] = color;
  36. }
  37. }
  38. if(type == 3)
  39. if(direction == 0)
  40. mapPixels[pixel] = color;
  41. else if(direction == 1)
  42. mapPixels[pixel + 3] = color;
  43. else if(direction == 2)
  44. mapPixels[pixel + 3 + 1536] = color;
  45. else if(direction == 3)
  46. mapPixels[pixel + 1536] = color;
  47. if(type == 2)
  48. if(direction == 3) {
  49. mapPixels[pixel] = color;
  50. mapPixels[pixel + 512] = color;
  51. mapPixels[pixel + 1024] = color;
  52. mapPixels[pixel + 1536] = color;
  53. } else if(direction == 0) {
  54. mapPixels[pixel] = color;
  55. mapPixels[pixel + 1] = color;
  56. mapPixels[pixel + 2] = color;
  57. mapPixels[pixel + 3] = color;
  58. } else if(direction == 1) {
  59. mapPixels[pixel + 3] = color;
  60. mapPixels[pixel + 3 + 512] = color;
  61. mapPixels[pixel + 3 + 1024] = color;
  62. mapPixels[pixel + 3 + 1536] = color;
  63. } else if(direction == 2) {
  64. mapPixels[pixel + 1536] = color;
  65. mapPixels[pixel + 1536 + 1] = color;
  66. mapPixels[pixel + 1536 + 2] = color;
  67. mapPixels[pixel + 1536 + 3] = color;
  68. }
  69. }
  70. }
  71. k1 = worldController.method302(j1, l, i);
  72. if(k1 != 0) {
  73. int i2 = worldController.method304(j1, l, i, k1);
  74. int l2 = i2 >> 6 & 3;
  75. int j3 = i2 & 0x1f;
  76. int l3 = k1 >> 14 & 0x7fff;
  77. ObjectDef object = ObjectDef.forID(l3);
  78. if(object.mapSceneID != -1) {
  79. IndexedImage scene = mapScenes[object.mapSceneID];
  80. if(scene != null) {
  81. int x = (object.anInt744 * 4 - scene.anInt1452) / 2;
  82. int y = (object.anInt761 * 4 - scene.anInt1453) / 2;
  83. scene.drawBackground(48 + l * 4 + x, 48 + (104 - i - object.anInt761) * 4 + y);
  84. }
  85. } else if(j3 == 9) {
  86. int color = 0xeeeeee;
  87. if(k1 > 0)
  88. color = 0xee0000;
  89. int mapPixels[] = miniMap.myPixels;
  90. int pixel = 24624 + l * 4 + (103 - i) * 512 * 4;
  91. if(l2 == 0 || l2 == 2) {
  92. mapPixels[pixel + 1536] = color;
  93. mapPixels[pixel + 1024 + 1] = color;
  94. mapPixels[pixel + 512 + 2] = color;
  95. mapPixels[pixel + 3] = color;
  96. } else {
  97. mapPixels[pixel] = color;
  98. mapPixels[pixel + 512 + 1] = color;
  99. mapPixels[pixel + 1024 + 2] = color;
  100. mapPixels[pixel + 1536 + 3] = color;
  101. }
  102. }
  103. }
  104. k1 = worldController.method303(j1, l, i);
  105. if(k1 != 0) {
  106. int objectID = k1 >> 14 & 0x7fff;
  107. ObjectDef object = ObjectDef.forID(objectID);
  108. if(object.mapSceneID != -1) {
  109. IndexedImage scene = mapScenes[object.mapSceneID];
  110. if(scene != null) {
  111. int x = (object.anInt744 * 4 - scene.anInt1452) / 2;
  112. int y = (object.anInt761 * 4 - scene.anInt1453) / 2;
  113. scene.drawBackground(48 + l * 4 + x, 48 + (104 - i - object.anInt761) * 4 + y);
  114. }
  115. }
  116. }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement