Libraries for common use
Posted: 07 May 2016, 10:53
List of libraries
1. Inserting more than 2 messages in a level
2. Using sublevels 1E0-1FF as ordinary levels
3. Level info and powerup filters
4. 121+ Events
5. Movie System
6. Lock System
1. Inserting more than 2 messages in a level
The extra message ASM has been included in the base ROM since ver 0.06, and you are allowed to have more than 2 messages in a single level. I'm giving some instructions to use it.
1) Inserting extra messages
Open PATCH/ExtraMsgData.asm first. Assuming the message box sprite is in sublevel xxx, you'll want to write a messages under the label ".extra_msg_xxx".
Eash sublevel can have more than one extra message. Each message should consist of 8 rows and 18 columns, and each line should be wrapped by " " after the db command. If these conditions are not satisfied, your messages will be misaligned.
Here's an example. There are two extra messages in sublevel 1B. To apply your modification, open asar.exe in PATCH folder, and insert "asar_patch.asm" into the ROM (not "ExtraMsgData.asm"). When asar asks patch name, just enter asar_patch.asm.
2) Which message will be shown?
Suppose there are n extra messages in sublevel xxx, and the sublevel is a part of level yyy. Also suppose the horizontal position of a message box in the sublevel xxx is X, and there are n extra messages in sublevel xxx.
If n = 0 (default), the message box will show one of the regular messages of level yyy. (exactly same as vanilla)
If n > 0, X modulo n (i.e. X % n) is the index of the message to be shown. Here's an example table for n=3
Pos = 0/1/2/3/4/5/6/7/...
Msg = 0/1/2/0/1/2/0/1/... (the number starts from zero, so the index of the first extra msg is 0)
So, if your level yyy consists of 3 sublevel (including yyy) and each has 0, 1, 3 extra messages, your level can show at most 2(regular)+1+3=6 different messages.
1. Inserting more than 2 messages in a level
2. Using sublevels 1E0-1FF as ordinary levels
3. Level info and powerup filters
4. 121+ Events
5. Movie System
6. Lock System
1. Inserting more than 2 messages in a level
The extra message ASM has been included in the base ROM since ver 0.06, and you are allowed to have more than 2 messages in a single level. I'm giving some instructions to use it.
1) Inserting extra messages
Open PATCH/ExtraMsgData.asm first. Assuming the message box sprite is in sublevel xxx, you'll want to write a messages under the label ".extra_msg_xxx".
Eash sublevel can have more than one extra message. Each message should consist of 8 rows and 18 columns, and each line should be wrapped by " " after the db command. If these conditions are not satisfied, your messages will be misaligned.
Here's an example. There are two extra messages in sublevel 1B. To apply your modification, open asar.exe in PATCH folder, and insert "asar_patch.asm" into the ROM (not "ExtraMsgData.asm"). When asar asks patch name, just enter asar_patch.asm.
2) Which message will be shown?
Suppose there are n extra messages in sublevel xxx, and the sublevel is a part of level yyy. Also suppose the horizontal position of a message box in the sublevel xxx is X, and there are n extra messages in sublevel xxx.
If n = 0 (default), the message box will show one of the regular messages of level yyy. (exactly same as vanilla)
If n > 0, X modulo n (i.e. X % n) is the index of the message to be shown. Here's an example table for n=3
Pos = 0/1/2/3/4/5/6/7/...
Msg = 0/1/2/0/1/2/0/1/... (the number starts from zero, so the index of the first extra msg is 0)
So, if your level yyy consists of 3 sublevel (including yyy) and each has 0, 1, 3 extra messages, your level can show at most 2(regular)+1+3=6 different messages.