| 198 | } |
| 199 | |
| 200 | void SetSpellTrans(char t) |
| 201 | { |
| 202 | int i; |
| 203 | |
| 204 | if (t == RSPLTYPE_SKILL) { |
| 205 | for (i = 0; i < 128; i++) |
| 206 | SplTransTbl[i] = i; |
| 207 | } |
| 208 | for (i = 128; i < 256; i++) |
| 209 | SplTransTbl[i] = i; |
| 210 | SplTransTbl[255] = 0; |
| 211 | |
| 212 | switch (t) { |
| 213 | case RSPLTYPE_SPELL: |
| 214 | SplTransTbl[PAL8_YELLOW] = PAL16_BLUE + 1; |
| 215 | SplTransTbl[PAL8_YELLOW + 1] = PAL16_BLUE + 3; |
| 216 | SplTransTbl[PAL8_YELLOW + 2] = PAL16_BLUE + 5; |
| 217 | for (i = PAL16_BLUE; i < PAL16_BLUE + 16; i++) { |
| 218 | SplTransTbl[PAL16_BEIGE - PAL16_BLUE + i] = i; |
| 219 | SplTransTbl[PAL16_YELLOW - PAL16_BLUE + i] = i; |
| 220 | SplTransTbl[PAL16_ORANGE - PAL16_BLUE + i] = i; |
| 221 | } |
| 222 | break; |
| 223 | case RSPLTYPE_SCROLL: |
| 224 | SplTransTbl[PAL8_YELLOW] = PAL16_BEIGE + 1; |
| 225 | SplTransTbl[PAL8_YELLOW + 1] = PAL16_BEIGE + 3; |
| 226 | SplTransTbl[PAL8_YELLOW + 2] = PAL16_BEIGE + 5; |
| 227 | for (i = PAL16_BEIGE; i < PAL16_BEIGE + 16; i++) { |
| 228 | SplTransTbl[PAL16_YELLOW - PAL16_BEIGE + i] = i; |
| 229 | SplTransTbl[PAL16_ORANGE - PAL16_BEIGE + i] = i; |
| 230 | } |
| 231 | break; |
| 232 | case RSPLTYPE_CHARGES: |
| 233 | SplTransTbl[PAL8_YELLOW] = PAL16_ORANGE + 1; |
| 234 | SplTransTbl[PAL8_YELLOW + 1] = PAL16_ORANGE + 3; |
| 235 | SplTransTbl[PAL8_YELLOW + 2] = PAL16_ORANGE + 5; |
| 236 | for (i = PAL16_ORANGE; i < PAL16_ORANGE + 16; i++) { |
| 237 | SplTransTbl[PAL16_BEIGE - PAL16_ORANGE + i] = i; |
| 238 | SplTransTbl[PAL16_YELLOW - PAL16_ORANGE + i] = i; |
| 239 | } |
| 240 | break; |
| 241 | case RSPLTYPE_INVALID: |
| 242 | SplTransTbl[PAL8_YELLOW] = PAL16_GRAY + 1; |
| 243 | SplTransTbl[PAL8_YELLOW + 1] = PAL16_GRAY + 3; |
| 244 | SplTransTbl[PAL8_YELLOW + 2] = PAL16_GRAY + 5; |
| 245 | for (i = PAL16_GRAY; i < PAL16_GRAY + 15; i++) { |
| 246 | SplTransTbl[PAL16_BEIGE - PAL16_GRAY + i] = i; |
| 247 | SplTransTbl[PAL16_YELLOW - PAL16_GRAY + i] = i; |
| 248 | SplTransTbl[PAL16_ORANGE - PAL16_GRAY + i] = i; |
| 249 | } |
| 250 | SplTransTbl[PAL16_BEIGE + 15] = 0; |
| 251 | SplTransTbl[PAL16_YELLOW + 15] = 0; |
| 252 | SplTransTbl[PAL16_ORANGE + 15] = 0; |
| 253 | break; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | /** |
no outgoing calls
no test coverage detected