14 void T_FillSector(BYTE *P3Tiles, BYTE *pSector,
int xi,
int yi,
int w,
int h)
16 int i, j, xx, yy, nMap;
17 long v1, v2, v3, v4, ii;
22 for (j = 0; j < h; j++) {
24 for (i = 0; i < w; i++) {
27 Map = (WORD *)&pSector[ii];
28 nMap = SDL_SwapLE16(*Map);
30 Sector = (((WORD *)&P3Tiles[(nMap - 1) * 8]));
31 v1 = SDL_SwapLE16(*(Sector + 0)) + 1;
32 v2 = SDL_SwapLE16(*(Sector + 1)) + 1;
33 v3 = SDL_SwapLE16(*(Sector + 2)) + 1;
34 v4 = SDL_SwapLE16(*(Sector + 3)) + 1;
45 dPiece[xx + 1][yy + 1] = v4;
65 Tiles = ((WORD *)&P3Tiles[(t - 1) * 8]);
66 v1 = SDL_SwapLE16(*(Tiles + 0)) + 1;
67 v2 = SDL_SwapLE16(*(Tiles + 1)) + 1;
68 v3 = SDL_SwapLE16(*(Tiles + 2)) + 1;
69 v4 = SDL_SwapLE16(*(Tiles + 3)) + 1;
74 dPiece[xx + 1][yy + 1] = v4;
83 BYTE *P3Tiles, *pSector;
85 for (yy = 0; yy <
MAXDUNY; yy += 2) {
86 for (xx = 0; xx <
MAXDUNX; xx += 2) {
90 dPiece[xx + 1][yy + 1] = 0;
95 pSector =
LoadFileInMem(
"Levels\\TownData\\Sector1s.DUN", NULL);
98 pSector =
LoadFileInMem(
"Levels\\TownData\\Sector2s.DUN", NULL);
101 pSector =
LoadFileInMem(
"Levels\\TownData\\Sector3s.DUN", NULL);
104 pSector =
LoadFileInMem(
"Levels\\TownData\\Sector4s.DUN", NULL);
123 for (x = 36; x < 46; x++) {
158 }
else if (entry == 1) {
161 }
else if (entry == 7) {
185 for (y = 0; y <
MAXDUNY; y++) {
186 for (x = 0; x <
MAXDUNX; x++) {
187 if (
dPiece[x][y] == 360) {
189 }
else if (
dPiece[x][y] == 358) {
191 }
else if (
dPiece[x][y] == 129) {
193 }
else if (
dPiece[x][y] == 130) {
195 }
else if (
dPiece[x][y] == 128) {
197 }
else if (
dPiece[x][y] == 117) {
199 }
else if (
dPiece[x][y] == 157) {
201 }
else if (
dPiece[x][y] == 158) {
203 }
else if (
dPiece[x][y] == 156) {
205 }
else if (
dPiece[x][y] == 162) {
207 }
else if (
dPiece[x][y] == 160) {
209 }
else if (
dPiece[x][y] == 214) {
211 }
else if (
dPiece[x][y] == 212) {
213 }
else if (
dPiece[x][y] == 217) {
215 }
else if (
dPiece[x][y] == 216) {