… | |
… | |
51 | |
51 | |
52 | // temporary storage for the los algorithm, |
52 | // temporary storage for the los algorithm, |
53 | // one los_info for each lightable map space |
53 | // one los_info for each lightable map space |
54 | static los_info los[MAP_CLIENT_X][MAP_CLIENT_Y]; |
54 | static los_info los[MAP_CLIENT_X][MAP_CLIENT_Y]; |
55 | |
55 | |
56 | struct point |
56 | struct point8 |
57 | { |
57 | { |
58 | sint8 x, y; |
58 | sint8 x, y; |
59 | }; |
59 | }; |
60 | |
60 | |
61 | // minimum size, but must be a power of two |
61 | // minimum size, but must be a power of two |
62 | #define QUEUE_LENGTH ((MAP_CLIENT_X + MAP_CLIENT_Y) * 2) |
62 | #define QUEUE_LENGTH ((MAP_CLIENT_X + MAP_CLIENT_Y) * 2) |
63 | |
63 | |
64 | // a queue of spaces to calculate |
64 | // a queue of spaces to calculate |
65 | static point queue [QUEUE_LENGTH]; |
65 | static point8 queue [QUEUE_LENGTH]; |
66 | static int q1, q2; // queue start, end |
66 | static int q1, q2; // queue start, end |
67 | |
67 | |
68 | /* |
68 | /* |
69 | * Clears/initialises the los-array associated to the player |
69 | * Clears/initialises the los-array associated to the player |
70 | * controlling the object. |
70 | * controlling the object. |