Overview
Comment: | Write more in class.doc |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
01f32e4d017bcb0b6b3d54c3c97f3c6d |
User & Date: | user on 2021-01-05 19:20:08 |
Other Links: | manifest | tags |
Context
2021-01-06
| ||
01:14 | Change the code that sends MSG_CREATED and MSG_DESTROYED according to my testing of how Hero Mesh is working check-in: d81bafda40 user: user tags: trunk | |
2021-01-05
| ||
19:20 | Write more in class.doc check-in: 01f32e4d01 user: user tags: trunk | |
07:12 | Implement displaying the replay list check-in: d308a8c8ca user: user tags: trunk | |
Changes
Modified class.doc from [3662bf9dd0] to [7351e72438].
︙ | |||
214 215 216 217 218 219 220 221 222 223 224 225 226 227 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (@<name> <value>) Define a global variable and its initial value. (<message> <code...>) Defines a default message code for all classes which do not specify their own code for this message. === Class definitions === Within a class definition, the following definitions can be used. See also the section about variables; many of these definitions are used to specify the initial value for variables of objects of this class. Outside of code blocks, named constants are not normally interchangeable with the numbers having the same value. Abstract (Not implemented yet.) (Arrivals InPlace) This is an abbreviation for (Arrivals 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0). (Arrivals <numbers...>) Define the Arrivals variable for this class. This is twenty-five numbers each of which is either zero or one. They are meant to be on five lines of five numbers each, making a 5x5 matrix, where the centre means this object's location. (Climb <number>) Define the Climb variable for this class. Compatible Sets the Compatible flag for this class. ,Compatible Sets the Compatible flag for this class, but removes the restriction of some variables limited to 16-bits. (DefaultImage <list...>) Each entry is either a number of an image in this class, or two numbers in parentheses giving a range of images, or () to indicate that there are no default images. This specifies which images can be used in objects of this class which are initially present on the level (placed in the editor). If () is used, then this class is not available in the editor. If there is no (DefaultImage) block, all images are available. The (Image) block must come before this one. (Density <number>) Define the Density variable for this class. If you want the Density to be different in the editor, specify the value to use in the editor here, and then change the Density value in the INIT block. (Departures InPlace) This is an abbreviation for (Departures 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0). (Departures <numbers...>) Define the Departures variable for this class. The format is the same as for the Arrivals variable; see above. (EditorHelp <strings...>) A help message to display in the level editor; normally, this would explain what values are expected for Misc1, Misc2, Misc3, and Dir. Each string is one line of text. (Hard <number>) Define the hardness of this object on all four sides. (Hard <pairs...>) Define the hardness per direction. Each pair is in parentheses, and is a direction (E, N, W, or S) followed by a 16-bit number. If any direction is not specified, then the hardness is zero in that direction. (Height <number>) Define the Height variable for this class. (Help <strings...>) A help message for the game player, which would normally explain what this object does. Each string is one line of text. (Image <strings...>) Specify strings with the names of images. The first string is the name of the image numbered 0, next for the image numbered 1, etc. Input Set the Input flag for this class. Invisible Set the Invisible flag for this class. (Misc4 <numbers...>) Specify any combination of numbers and/or bit constants. Defines the Misc4 variable of this class to be the bitwise OR of the listed numbers. (Misc5 <numbers...>) Define the Misc5 variable for this class; see Misc4 above for details. (Misc6 <numbers...>) Define the Misc6 variable for this class; see Misc4 above for details. (Misc7 <numbers...>) Define the Misc7 variable for this class; see Misc4 above for details. Player Set the Player flag for this class. Quiz If specified, the internal variables of objects of this class cannot normally be examined by the player. However, the player can override this definition at run time; you cannot rely on it. Class codes cannot read the value of this flag. (Shape <number>) Define the shape of this object on all four sides, where 0 means flat, 1 means slanted to left, 2 means slanted to right, and 3 means slanted both left and right. (Shape <pairs...>) Define the shape of this object per side, similar to the (Hard) block. (Sharp <number>) Define the sharpness of this object on all four sides. (Sharp <pairs...>) Define sharpness per direction, as for the (Hard) block. Shovable Set the Shovable variable for this class to 0x55 (meaning it is shovable in all four directions). (Shovable <dir...>) Set this object to be shovable in the specified directions, which can be E, N, W, or S (diagonals are not allowed). (Shovable <number>) Set the Shovable variable to the specified 8-bit number. (You cannot set the initial value of any other bits; they are always clear.) Stealthy Set the Stealthy flag for this class. (Strength <number>) Define the Strength variable for this class. (SUBS <code...>) Make a code block with no entry point. This isn't very useful, but it is provided for compatibility with Hero Mesh. (Temperature <number>) Define the Temperature variable for this class. VisualOnly Set the VisualOnly flag for this class. (Volume <number>) Define the Volume variable for this class. (Weight <number>) Define the Weight variable for this class. (<label> <code...>) Make a code block whose entry point is the specified label. (<message> <code...>) Make a code block whose entry point is the specified message. (<key> <code...>) (This is not implemented yet.) === Data types === The following data types are available: * Number: A 32-bit integer. Whether it is treated as signed or unsigned depends on the context. In some cases, it is used as bit field data. |
︙ | |||
1086 1087 1088 1089 1090 1091 1092 | 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 | - + + | QueueTurn ( key -- ) ** Queue another turn after this one, using the specified key code, which must be a number from 0 to 255. The extra turn is not entered into the replay list and does not increase MoveNumber, but otherwise will act like any other turn. Popup messages are not removed; they will be retained, and these extra turns execute the input phase as though there |
︙ | |||
1242 1243 1244 1245 1246 1247 1248 | 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 | - + + + - + + | === Messages === This section describes when the various standard messages are sent to objects, and what return values are expected. (Do not confuse CREATE with CREATED or DESTROY with DESTROYED; they have different purposes.) ARRIVED |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 | - + + + + - + + + - + + + + - + + + + + + + + + + - + + + + + + + + + + | CREATE Sent when the object is created by the Create instruction. This is done after the object is created, but before sending any other messages. The From is the object that created it. The return value will be used as the Arg3 of the SUNK and CREATED messages it might send if appropriate. CREATED |
︙ | |||
1329 1330 1331 1332 1333 1334 1335 | 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | - + + + + + - + + + + + + + + - + + + + + + + + + | the Input flag set, or to only the current quiz object if there is one (whether or not it has the Input flag). Arg1 is the key code (the Key instruction can also be used), Arg2 is the return value of the previous KEY message (0 for the first one), and Arg3 is zero for normal input or one for a quiz. The return value is passed as Arg2 for the next object. LASTIMAGE |
︙ | |||
1501 1502 1503 1504 1505 1506 1507 1508 | 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 | + + | * Some bits are masked out of the return value from HIT and HITBY. * Many variables are limited to 16-bits. * Moving objects is not allowed during LASTIMAGE processing. * The way that the trigger phase works is different. * In the ARRIVED and DEPARTED messages, Arg1 is always zero. |
Modified fileform1.txt from [bbb40911a8] to [3531e0b394].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - + + | 10 WORD Number of picture sizes 12 WORD(8) Picture sizes 28 WORD Number of words in picture allocation table File version is 15 for Hero Mesh version 1.1c, and is 16 for Hero Mesh version 2.0. Other versions (if any) are unknown. The rest of this document is applicable to file version 16 (differences, if any, are |
︙ |