MicropolisEngine/src/main.cpp File Reference

#include "stdafx.h"
#include "micropolis.h"

Go to the source code of this file.

Defines

#define CLIPPER_LOOP_BODY(CODE)
#define HEAT
#define ECOMASK   0x3fc
#define ECO

Functions

static bool testDirectory (const std::string &dir, const char *envVar)


Detailed Description

Definition in file main.cpp.


Define Documentation

#define CLIPPER_LOOP_BODY ( CODE   ) 

Value:

src = cellSrc; dst = cellDst; \
    for (x = 0; x < WORLD_W;) { \
        short nw, n, ne, w, c, e, sw, s, se; \
        src = cellSrc + (x * SRCCOL); \
        dst = cellDst + (x * DSTCOL); \
        w = src[0]; c = src[SRCCOL]; e = src[2 * SRCCOL]; \
        sw = src[1]; s = src[SRCCOL + 1]; se = src[(2 * SRCCOL) + 1]; \
        for (y = 0; y < WORLD_H; y++) { \
            nw = w; w = sw; sw = src[2]; \
            n = c; c = s; s = src[SRCCOL + 2]; \
            ne = e; e = se; se = src[(2 * SRCCOL) + 2]; \
            { CODE } \
            src++; dst++; \
        } \
        x++; \
        src = cellSrc + ((x + 1) * SRCCOL) - 3; \
        dst = cellDst + ((x + 1) * DSTCOL) - 1; \
        nw = src[1]; n = src[SRCCOL + 1]; ne = src[(2 * SRCCOL) + 1]; \
        w = src[2]; c = src[SRCCOL + 2]; e = src[(2 * SRCCOL) + 2]; \
        for (y = WORLD_H - 1; y >= 0; y--) { \
            sw = w; w = nw; nw = src[0]; \
            s = c; c = n; n = src[SRCCOL]; \
            se = e; e = ne; ne = src[2 * SRCCOL]; \
            { CODE } \
            src--; dst--; \
        } \
        x++; \
    }

#define HEAT

Value:

a += nw + n + ne + w + e + sw + s + se + fl; \
    dst[0] = ((a >> 3) & LOMASK) | ANIMBIT | BURNBIT | BULLBIT; \
    a &= 7;


Function Documentation

static bool testDirectory ( const std::string &  dir,
const char *  envVar 
) [static]

Check whether dir points to a directory. If not, report an error.

Parameters:
dir Directory to search.
envVar Environment variable controlling searchpath of the directory.
Returns:
Directory has been found.

Definition at line 92 of file main.cpp.

Referenced by Micropolis::environmentInit().


Generated on Wed Feb 2 09:19:22 2011 for Micropolis by  doxygen 1.5.6