Overview
Comment: | Change some things in game.c to use sizeof(MoveItem) instead of assuming that each move item is one byte long. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
f4c84adc9c16d8aed7afd8f3f7b9d473 |
User & Date: | user on 2022-06-30 02:50:45 |
Other Links: | manifest | tags |
Context
2022-06-30
| ||
05:46 | Implement the .saveSolutions.private option (and the SQL functions to work with it), and remove the unused .allowMouseWarp option. check-in: e71ea9875c user: user tags: trunk | |
02:50 | Change some things in game.c to use sizeof(MoveItem) instead of assuming that each move item is one byte long. check-in: f4c84adc9c user: user tags: trunk | |
2022-06-29
| ||
06:24 | FAQ entry about how was figuring out the working of the original game engine. check-in: 1f566350d9 user: user tags: trunk | |
Changes
Modified game.c from [941e9e54d5] to [2346a86e7d].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + - + | size_t replay_size; Uint16 replay_count,replay_pos,replay_mark; Uint8 solution_replay=255; static volatile Uint8 timerflag; static int exam_scroll; static MoveItem*inputs; static size_t inputs_size; |
︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + + + + | replay_count++; } fclose(o); if(replay_count && !replay_list) fatal("Allocation failed\n"); return replay_count; } #define MSIZ (sizeof(MoveItem)) #define memcpyM(a_,b_,c_) memcpy(a_,b_,(c_)*MSIZ); #define memmoveM(a_,b_,c_) memmove(a_,b_,(c_)*MSIZ); static void record_solution(void); static void setup_game(void) { const char*v; optionquery[1]=Q_showInventory; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; side_mode=boolxrm(v,1); |
︙ | |||
1169 1170 1171 1172 1173 1174 1175 | 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 | - - + + - - + + - + - - + + - + - + | replay_time=0; return -3; } if(solution_replay) { screen_message("You cannot play your own moves during the solution replay"); return -3; } |
︙ | |||
1384 1385 1386 1387 1388 1389 1390 | 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 | - - + + - + - + - - + | } if(!key_ignored) { if(inserting) { if(replay_pos>=0xFFFE || replay_pos==replay_count) { inserting=0; } else { if(replay_count>0xFFFE) replay_count=0xFFFE; |
︙ |