Ink *NewInk();
-short tally(short tileValue);
-int DoSetWandState(SimView *view, short state);
+void DoSetWandState(SimView *view, short state);
+void DoPendTool(SimView *view, int tool, int x, int y);
+void EraserTo(SimView *view, int x, int y);
+void EraserStart(SimView *view, int x, int y);
+void DoShowZoneStatus(char *str, char *s0, char *s1, char *s2, char *s3, char *s4, int x, int y);
/*************************************************************************/
/* UTILITIES */
+void
setWandState(SimView *view, short state)
{
#if 0
void
check4x4border(short xMap, short yMap)
{
- Ptr tilePtr;
+ short *tilePtr;
short xPos, yPos;
short cnt;
xPos = xMap; yPos = yMap - 1;
for (cnt = 0; cnt < 4; cnt++) {
/* this will do the upper bordering row */
- tilePtr = (Ptr) &Map[xPos][yPos];
+ tilePtr = &Map[xPos][yPos];
ConnecTile(xPos, yPos, tilePtr, 0);
xPos++;
}
xPos = xMap - 1; yPos = yMap;
for (cnt = 0; cnt < 4; cnt++) {
/* this will do the left bordering row */
- tilePtr = (Ptr) &Map[xPos][yPos];
+ tilePtr = &Map[xPos][yPos];
ConnecTile(xPos, yPos, tilePtr, 0);
yPos++;
}
xPos = xMap; yPos = yMap + 4;
for (cnt = 0; cnt < 4;cnt++) {
/* this will do the bottom bordering row */
- tilePtr = (Ptr) &Map[xPos][yPos];
+ tilePtr = &Map[xPos][yPos];
ConnecTile(xPos, yPos, tilePtr, 0);
xPos++;
}
xPos = xMap + 4; yPos = yMap;
for (cnt = 0; cnt < 4; cnt++) {
/* this will do the right bordering row */
- tilePtr = (Ptr) &Map[xPos][yPos];
+ tilePtr = &Map[xPos][yPos];
ConnecTile(xPos, yPos, tilePtr, 0);
yPos++;
}
if (autoBulldoze) {
/* if autoDoze is enabled, add up the cost of bulldozed tiles */
- if (tileValue != 0)
+ if (tileValue != 0) {
if (tally(tileValue)) {
cost++;
} else {
flag = 0;
}
+ }
} else {
/* check and see if the tile is clear or not */
if (tileValue != 0) {
if (z > 100) return (19);
return (18);
}
+ return 0;
}
+void
doZoneStatus(short mapH, short mapV)
{
char localStr[256];
}
+void
DoShowZoneStatus(char *str, char *s0, char *s1, char *s2, char *s3, char *s4,
int x, int y)
{
/* comefrom: processWand */
+void
put3x3Rubble(short x, short y)
{
- register xx, yy, zz;
+ register int xx, yy, zz;
for (xx = x - 1; xx < x + 2; xx++) {
for (yy = y - 1; yy < y + 2; yy++) {
/* comefrom: processWand */
+void
put4x4Rubble(short x, short y)
{
- register xx, yy, zz;
+ register int xx, yy, zz;
for (xx = x - 1; xx < x + 3; xx++) {
for (yy = y - 1; yy < y + 3; yy++) {
/* comefrom: processWand */
+void
put6x6Rubble(short x, short y)
{
- register xx, yy, zz;
+ register int xx, yy, zz;
for (xx = x - 1; xx < x + 5; xx++) {
for (yy = y - 1; yy < y + 5; yy++) {
}
+void
DidTool(SimView *view, char *name, short x, short y)
{
char buf[256];
}
+void
DoSetWandState(SimView *view, short state)
{
char buf[256];
}
+void
ChalkStart(SimView *view, int x, int y, int color)
{
Ink *ink;
}
+void
ChalkTo(SimView *view, int x, int y)
{
+#ifdef MOTIONBUFFER
int x0, y0, lx, ly;
+#endif
Ink *ink = (Ink *)view->track_info;
#ifdef MOTIONBUFFER
}
+int
InkInBox(Ink *ink, int left, int top, int right, int bottom)
{
if ((left <= ink->right) &&
}
+void
EraserStart(SimView *view, int x, int y)
{
EraserTo(view, x, y);
}
+void
EraserTo(SimView *view, int x, int y)
{
- SimView *v;
Ink **ip, *ink;
for (ip = &sim->overlay; *ip != NULL;) {
}
+void
DoTool(SimView *view, short tool, short x, short y)
{
int result;
}
+void
ToolDown(SimView *view, int x, int y)
{
int result;
}
+void
ToolUp(SimView *view, int x, int y)
{
- int result;
-
- result = ToolDrag(view, x, y);
-
- return (result);
+ ToolDrag(view, x, y);
}
+void
ToolDrag(SimView *view, int px, int py)
{
int x, y, dx, dy, adx, ady, lx, ly, dist;
lx = view->last_x >> 4;
ly = view->last_y >> 4;
- reset:
-
dx = x - lx;
dy = y - ly;
}
+void
DoPendTool(SimView *view, int tool, int x, int y)
{
char buf[256];