diff -ur tworld-1.1.3/Changelog tworld-1.1.3.ss2/Changelog --- tworld-1.1.3/Changelog 2003-03-15 09:24:39.000000000 -0500 +++ tworld-1.1.3.ss2/Changelog 2003-11-28 11:24:43.000000000 -0500 @@ -1,4 +1,18 @@ +2003 Nov 28: version 1.1.3.ss2 +* Unofficial update by Shmuel Siegel and Anders Kaseorg. +* Another fix by Shmuel Siegel: the previous update was incomplete when + a sliding block was pushed onto a bear trap. + +2003 Nov 26: version 1.1.3.ss1 +* Unofficial update by Shmuel Siegel and Anders Kaseorg. +* Add MS logic fixes by Shmuel Siegel: tanks on clone machines can turn + (fixes PieGuy1 #1); a pushed block is not moved to the end of the slip + list (fixes CCLP2 #123); and a slipping object that clones another + slipping object affects slide delay (fixes CC1 #116). +* #include in various files and remove a "trigraph," to fix + compile warnings. + 2003 Mar 15: version 1.1.3 * Put the display code through another significant rewrite. This time, the rewrite seems to have succeeded in improving speeds, at all pixel depths. diff -ur tworld-1.1.3/lxlogic.c tworld-1.1.3.ss2/lxlogic.c --- tworld-1.1.3/lxlogic.c 2003-03-14 02:06:48.000000000 -0500 +++ tworld-1.1.3.ss2/lxlogic.c 2003-11-27 10:44:26.000000000 -0500 @@ -5,6 +5,7 @@ */ #include +#include #include "defs.h" #include "err.h" #include "state.h" diff -ur tworld-1.1.3/mslogic.c tworld-1.1.3.ss2/mslogic.c --- tworld-1.1.3/mslogic.c 2003-03-09 00:07:33.000000000 -0500 +++ tworld-1.1.3.ss2/mslogic.c 2003-11-28 11:24:43.000000000 -0500 @@ -5,12 +5,15 @@ */ #include +#include #include "defs.h" #include "err.h" #include "state.h" #include "random.h" #include "logic.h" +#define SSCHANGES + #ifdef NDEBUG #define _assert(test) #else @@ -645,9 +648,13 @@ for (n = 0 ; n < creaturecount ; ++n) { if (creatures[n]->hidden || creatures[n]->id != Tank) continue; +#ifdef SSCHANGES + /* Allow tanks on clone machines to turn. */ +#else if (cellat(creatures[n]->pos)->bot.id == CloneMachine && !(creatures[n]->state & CS_CLONING)) continue; +#endif creatures[n]->dir = back(creatures[n]->dir); if (!(creatures[n]->state & CS_TURNING)) creatures[n]->state |= CS_TURNING | CS_HASMOVED; @@ -708,6 +715,9 @@ { creature *cr; int slipdir; +#ifdef SSCHANGES + int ret; +#endif _assert(cellat(pos)->top.id == Block_Static); _assert(dir != NIL); @@ -721,11 +731,22 @@ slipdir = getslipdir(cr); if (dir == slipdir || dir == back(slipdir)) return FALSE; +#ifdef SSCHANGES + /* Pushing does not move the block to end of slip list. */ +#else endfloormovement(cr); +#endif } if (collapse && cellat(pos)->bot.id == Block_Static) cellat(pos)->bot.id = Empty; +#ifdef SSCHANGES + ret = advancecreature(cr, dir); + if (!ret) + endfloormovement(cr); + return ret; +#else return advancecreature(cr, dir); +#endif } /* @@ -1527,8 +1548,15 @@ startfloormovement(cr, floor); else if (isslide(floor) && (cr->id != Chip || !possession(Boots_Slide))) startfloormovement(cr, floor); +#ifdef SSCHANGES + else if (floor == Beartrap && cr->id == Block && wasslipping) + startfloormovement(cr, floor); + else + cr->state &= ~(CS_SLIP | CS_SLIDE); +#else else if (floor != Beartrap || cr->id != Block) cr->state &= ~(CS_SLIP | CS_SLIDE); +#endif if (!wasslipping && (cr->state & (CS_SLIP | CS_SLIDE)) && cr->id != Chip) controllerdir() = getslipdir(cr); @@ -1591,8 +1619,14 @@ creature *cr; int floor, slipdir; int n; +#ifdef SSCHANGES + int initialSlipCount; +#endif for (n = 0 ; n < slipcount ; ++n) { +#ifdef SSCHANGES + initialSlipCount = slipcount; +#endif cr = slips[n].cr; if (!(slips[n].cr->state & (CS_SLIP | CS_SLIDE))) continue; @@ -1621,6 +1655,15 @@ } if (checkforending()) return; +#ifdef SSCHANGES + /* This is another case where MS CC doesn't recognize that the + * current item was removed from the slip list, and therefore the + * iterator is improperly advanced. + */ + if ((cr->state & (CS_SLIP | CS_SLIDE)) == 0 && cr->id != Chip + && slipcount == initialSlipCount+1) + n++; +#endif } for (n = slipcount - 1 ; n >= 0 ; --n) diff -ur tworld-1.1.3/oshw-sdl/sdltext.c tworld-1.1.3.ss2/oshw-sdl/sdltext.c --- tworld-1.1.3/oshw-sdl/sdltext.c 2003-03-15 09:02:37.000000000 -0500 +++ tworld-1.1.3.ss2/oshw-sdl/sdltext.c 2003-11-27 10:44:26.000000000 -0500 @@ -366,7 +366,7 @@ static void _puttext(SDL_Rect *rect, char const *text, int len, int flags) { if (!sdlg.font.h) - die("no font available! (how did I get this far??)"); + die("no font available! (how did I get this far?)"); if (len < 0) len = text ? strlen(text) : 0; diff -ur tworld-1.1.3/play.c tworld-1.1.3.ss2/play.c --- tworld-1.1.3/play.c 2003-03-10 01:27:56.000000000 -0500 +++ tworld-1.1.3.ss2/play.c 2003-11-27 10:44:26.000000000 -0500 @@ -5,6 +5,7 @@ */ #include +#include #include "defs.h" #include "err.h" #include "state.h" diff -ur tworld-1.1.3/solution.c tworld-1.1.3.ss2/solution.c --- tworld-1.1.3/solution.c 2003-02-16 11:14:02.000000000 -0500 +++ tworld-1.1.3.ss2/solution.c 2003-11-27 10:44:26.000000000 -0500 @@ -7,6 +7,7 @@ #include #include #include +#include #include "defs.h" #include "err.h" #include "fileio.h" diff -ur tworld-1.1.3/ver.h tworld-1.1.3.ss2/ver.h --- tworld-1.1.3/ver.h 2003-03-15 09:13:57.000000000 -0500 +++ tworld-1.1.3.ss2/ver.h 2003-11-28 11:24:43.000000000 -0500 @@ -1 +1 @@ -#define VERSION "1.1.3" +#define VERSION "1.1.3.ss2"