Overview
Comment: | Change a comment in exec.c explaining another reason why finding loops in deferred movement might sometimes not find one, and why it doesn't matter in that case. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a1dab8cccd2eb8214764d33301bc123a |
User & Date: | user on 2021-04-08 21:25:37 |
Other Links: | manifest | tags |
Context
2021-04-09
| ||
23:23 | Add the possibility to rename a picture in the picture editor. check-in: 602174dd57 user: user tags: trunk | |
2021-04-08
| ||
21:25 | Change a comment in exec.c explaining another reason why finding loops in deferred movement might sometimes not find one, and why it doesn't matter in that case. check-in: a1dab8cccd user: user tags: trunk | |
14:44 | Add a compile-time assertion that multi-character literals are implemented in a suitable way. check-in: 6cb45f70ee user: user tags: trunk | |
Changes
Modified exec.c from [bd128e8f11] to [d7feec84d8].
︙ | ︙ | |||
2046 2047 2048 2049 2050 2051 2052 | // If a loop is found, call the handle_colliding function to determine what to do next. // If there is no loop, allow the move to be retried later, trying objE's location next. // Since there may be multiple objects in a location, which move in different directions, // a variable "ch" mentions the next object to try, if it is VOIDLINK. If not, then once // it reaches the end without finding a loop, it can try the next one, resetting ch to // VOIDLINK. This will find not only loops, but also if there is a branch that is later // merged; due to what this program needs to do, and how they will be dealt with after | | > > > | 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 | // If a loop is found, call the handle_colliding function to determine what to do next. // If there is no loop, allow the move to be retried later, trying objE's location next. // Since there may be multiple objects in a location, which move in different directions, // a variable "ch" mentions the next object to try, if it is VOIDLINK. If not, then once // it reaches the end without finding a loop, it can try the next one, resetting ch to // VOIDLINK. This will find not only loops, but also if there is a branch that is later // merged; due to what this program needs to do, and how they will be dealt with after // the potential loop is found, that isn't a problem. This algorithm also will not find // some loops with multiple branches, but that is also OK, since the main handling of // deferred movements will eventually try every object as an origin, and this will cause // the loop to eventually be found. static sqlite3_uint64 board[64]; // bit board for locations with possible collisions Object*o=objects[obj]; Uint32 ch=VOIDLINK; // first object found in same place as other where it must be checked Uint8 x=o->x; Uint8 y=o->y; Uint32 n,nn; memset(board,0,sizeof(board)); |
︙ | ︙ |