Free Hero Mesh

Check-in [c8c249b7be]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Add an assertion to check that the value of N_MESSAGES is correct. Also add a note about unused standard message names in class.doc.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c8c249b7be9defe2019c26c53201cbfc6e1e4c5e
User & Date: user on 2021-02-22 03:16:38
Other Links: manifest | tags
Context
2021-02-22
04:53
Add a mark type and some instructions dealing with it. check-in: 902bd1a80d user: user tags: trunk
03:16
Add an assertion to check that the value of N_MESSAGES is correct. Also add a note about unused standard message names in class.doc. check-in: c8c249b7be user: user tags: trunk
2021-02-21
00:51
Add editor help for objects, and add support for number pad in some more contexts. check-in: 131e9f9ca6 user: user tags: trunk
Changes

Modified class.doc from [d804ddb1d2] to [1c5b1a0868].

1462
1463
1464
1465
1466
1467
1468





1469
1470
1471
1472
1473
1474
1475


=== 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
  Sent during the trigger phase if the Arrived value is nonzero. Arg1 is
  the saved Arrived value. The Arrived variable will usually be set
  automatically; see the section about variables.

BEGIN_TURN







>
>
>
>
>







1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480


=== 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.)

(Some standard messages are in the names.js file but not used; do not use
them in your own code, since their names and meaning may change later. The
ones listed here are (probably) considered stable, and their numeric value
(used in level files) will (probably) remain unchanged.)

ARRIVED
  Sent during the trigger phase if the Arrived value is nonzero. Arg1 is
  the saved Arrived value. The Arrived variable will usually be set
  automatically; see the section about variables.

BEGIN_TURN

Modified main.c from [1f36d14fae] to [23edf40a2c].

20
21
22
23
24
25
26




27
28
29
30
31
32
33
#include <unistd.h>
#include "sqlite3.h"
#include "smallxrm.h"
#include "names.h"
#include "quarks.h"
#include "cursorshapes.h"
#include "heromesh.h"





static const char schema[]=
  "BEGIN;"
  "PRAGMA APPLICATION_ID(1296388936);"
  "PRAGMA RECURSIVE_TRIGGERS(1);"
  "CREATE TABLE IF NOT EXISTS `USERCACHEINDEX`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `TIME` INT);"
  "CREATE TABLE IF NOT EXISTS `USERCACHEDATA`(`ID` INTEGER PRIMARY KEY, `FILE` INT, `LEVEL` INT, `NAME` TEXT COLLATE NOCASE, `OFFSET` INT, `DATA` BLOB, `USERSTATE` BLOB);"







>
>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <unistd.h>
#include "sqlite3.h"
#include "smallxrm.h"
#include "names.h"
#include "quarks.h"
#include "cursorshapes.h"
#include "heromesh.h"

typedef struct {
  char a[(N_MESSAGES==sizeof(standard_message_names)/sizeof(*standard_message_names))?1:-9];
} ASSERTION;

static const char schema[]=
  "BEGIN;"
  "PRAGMA APPLICATION_ID(1296388936);"
  "PRAGMA RECURSIVE_TRIGGERS(1);"
  "CREATE TABLE IF NOT EXISTS `USERCACHEINDEX`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `TIME` INT);"
  "CREATE TABLE IF NOT EXISTS `USERCACHEDATA`(`ID` INTEGER PRIMARY KEY, `FILE` INT, `LEVEL` INT, `NAME` TEXT COLLATE NOCASE, `OFFSET` INT, `DATA` BLOB, `USERSTATE` BLOB);"