Releases: huderlem/poryscript
Releases · huderlem/poryscript
3.0.0
Changed
- Font configuration file is now called
font_config.json
, and each font in that file contains amaxLineLength
used byformat()
. The command-line option-fw
has been renamed to-fc
to reflect the new name of the font configuration file.
2.14.0
Added
- Add the ability to define sub-labels inside
script
statements. This is useful in some cases where it's more ergonomic to directly jump to a desired location inside a script, similar to C's goto labels.
2.13.0
Added
- Add
mart
statement, which is a convenient way to define a list of items used with the decomp'spokemart
script command. Prior to this addition, the mart data had to be encoded using Poryscript'sraw
statement.
2.12.0
Added
- Add
value()
operator, which can be used on the right-hand side of avar()
comparison. It will force acompare_var_to_value
command to be output. This makes it possible to compare values that occupy the same range as vars (0x4000 <= x <= 0x40FF
and0x8000 <= x <= 0x8015
). - Add ability to author inifinite loops using the
while
statement without any boolean expression.
2.11.0
Added
- Added -l command-line option to define default line length for formatted text.
- Added -f command-line option to define default font id from
font_widths.json
for formatted text.
2.10.0
Added
- Added ability to specify custom directives for text. (e.g.
ascii"My ASCII text"
will result in.ascii "My ASCII text\0"
)
2.9.0
Added
- Added optional maximum line length parameter to
format()
operator.
2.8.1
Fixed
- Fix bug where
switch
statementdefault
case didn't work properly when combined with other cases.
2.9.0-gen2-preview
First preview release for pokecrystal
support. The README has not been updated to reflect the few differences between Gen 3 and Gen 2 syntax. Most of the README is still valid for Gen 2, though.
When running Poryscript, specify the -gen 2
command line option. It runs in -gen 3
mode by default, which is for the Gen 3 decomp projects (e.g. pokeemerald
).
Example command:
poryscript.exe -gen 2 -i test.pory -o test.asm
Some examples of valid Gen 2 syntax:
script MyScript {
if (myarbitrarycommand(param1) == 4) {
...
} else if (othercommand || !randomcommand) {
...
}
}
mapscripts MyMapscripts {
scenes [
{ } // dummy script
Scene2Script // label, instead of inlining script
{ // inlined script
prioritysjump("other")
}
]
MAPCALLBACK_NEWMAP {
if (checkflag(ENGINE_BUG_CONTEST_TIMER)) {
setscene("other")
} else {
setscene("third")
}
}
MAPCALLBACK_OBJECTS {
switch (readvar(VAR_WEEKDAY)) {
case TUESDAY:
case THURSDAY:
case SATURDAY:
appear("whatever")
disappear("whatever")
disappear("other")
return
default:
if (checkflag(ENGINE_BUG_CONTEST_TIMER)) {
setscene(SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY)
} else {
disappear(ROUTE35NATIONALPARKGATE_OFFICER1)
appear(ROUTE35NATIONALPARKGATE_YOUNGSTER)
appear(ROUTE35NATIONALPARKGATE_OFFICER2)
}
}
}
}
2.8.0
Added
- Add ability to use the NOT (
!
) operator in front of nested boolean expressions. Example:
if (flag(A) && !(flag(B) || flag(C)))