* Initializes the map. */
| 124 | * Initializes the map. |
| 125 | */ |
| 126 | void Map::init() |
| 127 | { |
| 128 | // load the tiny arrow into a surface |
| 129 | int f = Palette::blockOffset(1); // yellow |
| 130 | int b = 15; // black |
| 131 | int pixels[81] = { 0, 0, b, b, b, b, b, 0, 0, |
| 132 | 0, 0, b, f, f, f, b, 0, 0, |
| 133 | 0, 0, b, f, f, f, b, 0, 0, |
| 134 | b, b, b, f, f, f, b, b, b, |
| 135 | b, f, f, f, f, f, f, f, b, |
| 136 | 0, b, f, f, f, f, f, b, 0, |
| 137 | 0, 0, b, f, f, f, b, 0, 0, |
| 138 | 0, 0, 0, b, f, b, 0, 0, 0, |
| 139 | 0, 0, 0, 0, b, 0, 0, 0, 0 }; |
| 140 | |
| 141 | _arrow = new Surface(9, 9); |
| 142 | _arrow->setPalette(this->getPalette()); |
| 143 | _arrow->lock(); |
| 144 | for (int y = 0; y < 9;++y) |
| 145 | for (int x = 0; x < 9; ++x) |
| 146 | _arrow->setPixel(x, y, pixels[x+(y*9)]); |
| 147 | _arrow->unlock(); |
| 148 | |
| 149 | _projectile = 0; |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Keeps the animation timers running. |
nothing calls this directly
no test coverage detected