Devilution
Diablo devolved - magic behind the 1996 computer game
|
Go to the documentation of this file.
96 pSBFile =
LoadFileInMem(
"Levels\\TownData\\Town.SOL", &dwTiles);
116 for (i = 1; i <= dwTiles; i++) {
136 int i, x, y, lv, blocks;
151 for (y = 0; y <
MAXDUNY; y++) {
152 for (x = 0; x <
MAXDUNX; x++) {
161 for (i = 0; i < blocks; i++)
162 pMap->
mt[i] = SDL_SwapLE16(pPiece[(i & 1) + blocks - 2 - (i & 0xE)]);
164 for (i = 0; i < blocks; i++)
187 for (j = y1; j <= y2; j++) {
188 for (i = x1; i <= x2; i++) {
200 for (j = y1; j <= y2; j++) {
201 for (i = x1; i <= x2; i++) {
219 for (i = 0; i < num; i++) {
233 for (i = 0; i < num; i++) {
255 int i, j, x, y, w, h;
262 for (j = 0; j < h; j++) {
263 for (i = 0; i < w; i++) {
264 dFlags[i + x][j + y] |= 8;
272 int i, j, dx, dy, dh, dw;
279 for (j = 0; j < dh; j++) {
280 for (i = 0; i < dw; i++) {
281 dFlags[i + dx][j + dy] |= 8;
289 int xSmallest, ySmallest;
290 int xArray[20], yArray[20];
300 if (x >
DMAXX - maxSize || y >
DMAXY - maxSize) {
307 memset(xArray, 0,
sizeof(xArray));
308 memset(yArray, 0,
sizeof(yArray));
310 for (ii = 0; ii < maxSize; ii++) {
312 for (xx = x; xx < x + maxSize; xx++) {
313 if (
dungeon[xx][y + ii] != floor) {
328 for (yy = y; yy < y + maxSize; yy++) {
329 if (
dungeon[x + ii][yy] != floor) {
345 for (ii = 0; ii < minSize; ii++) {
346 if (xArray[ii] < minSize || yArray[ii] < minSize) {
351 xSmallest = xArray[0];
352 ySmallest = yArray[0];
354 for (ii = 0; ii < maxSize; ii++) {
355 if (xArray[ii] < minSize || yArray[ii] < minSize) {
358 if (xArray[ii] < xSmallest) {
359 xSmallest = xArray[ii];
361 if (yArray[ii] < ySmallest) {
362 ySmallest = yArray[ii];
366 *width = xSmallest - 2;
367 *height = ySmallest - 2;
385 }
else if (xx ==
themeLoc[themeIndex].x
404 }
else if (xx ==
themeLoc[themeIndex].x
423 }
else if (xx ==
themeLoc[themeIndex].x
503 for (j = 0; j <
DMAXY; j++) {
504 for (i = 0; i <
DMAXX; i++) {
510 if (rv2 >= min && rv2 <= max)
515 if (rv2 >= min && rv2 <= max)
525 DRLG_RectTrans(2 * i + 20, 2 * j + 20, 2 * (i + themeW) + 15, 2 * (j + themeH) + 15);
void DRLG_CopyTrans(int sx, int sy, int dx, int dy)
BYTE dungeon[DMAXX][DMAXY]
BYTE pdungeon[DMAXX][DMAXY]
void Make_SetPC(int x, int y, int w, int h)
void DRLG_ListTrans(int num, BYTE *List)
void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rndSize)
char dObject[MAXDUNX][MAXDUNY]
char dLight[MAXDUNX][MAXDUNY]
int dPiece[MAXDUNX][MAXDUNY]
BOOLEAN nSolidTable[2049]
List of path blocking dPieces.
void DRLG_MRectTrans(int x1, int y1, int x2, int y2)
void app_fatal(const char *pszFmt,...)
#define DEVILUTION_END_NAMESPACE
BOOLEAN nMissileTable[2049]
List of missile blocking dPieces.
THEME_LOC themeLoc[MAXTHEMES]
BYTE * LoadFileInMem(char *pszName, DWORD *pdwFileLen)
Load a file in to a buffer.
BOOL SkipThemeRoom(int x, int y)
char dMissile[MAXDUNX][MAXDUNY]
char dItem[MAXDUNX][MAXDUNY]
void DRLG_HoldThemeRooms()
MICROS dpiece_defs_map_2[MAXDUNX][MAXDUNY]
void DRLG_CreateThemeRoom(int themeIndex)
char dPreLight[MAXDUNX][MAXDUNY]
char dTransVal[MAXDUNX][MAXDUNY]
void FillSolidBlockTbls()
char dflags[DMAXX][DMAXY]
char dSpecial[MAXDUNX][MAXDUNY]
int random_(BYTE idx, int v)
Main RNG function.
char block_lvid[2049]
List of transparancy masks to use for dPieces.
BOOLEAN nTransTable[2049]
List of transparent dPieces.
void mem_free_dbg(void *p)
Multithreaded safe memfree.
BOOL DRLG_WillThemeRoomFit(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)
int dMonster[MAXDUNX][MAXDUNY]
char dPlayer[MAXDUNX][MAXDUNY]
char dFlags[MAXDUNX][MAXDUNY]
DEVILUTION_BEGIN_NAMESPACE WORD level_frame_types[MAXTILES]
void DRLG_AreaTrans(int num, BYTE *List)
void DRLG_RectTrans(int x1, int y1, int x2, int y2)
char dDead[MAXDUNX][MAXDUNY]
BOOLEAN nBlockTable[2049]
List of light blocking dPieces.