Martin Griffin
bb781f21a1
Arbitrary trainer scripts + map script/trigger softlock prevention ( #5033 )
...
Script_RunImmediatelyUntilEffect runs a script until either a specified
effect may occur or it reaches an end.
All existing script commands and natives, and some specials, call
Script_RequestEffects which allows us to analyze them.
Any downstream script commands/natives/specials will be statically known
not to call Script_RequestEffects and treated as if they have all
effects. Manually tagging them with requests_effects=1 and calling
Script_RequestEffects will make them analyzable.
Using these, we're able to execute scripts until they either exit with
no effect, or would possibly have an effect. This allows us to:
1. Not run on frame map scripts or triggers if they would have no
effect.
2. Immediately run triggers if they only affect flags/vars. This removes
the lag frames when biking into the Cycling Road, for example.
3. Migrate on load/on transition/on resume/on return to field/on dive
warp scripts onto the global script context if they would block
(approximated via SCREFF_HARDWARE).
4. Support arbitrary control flow in trainer scripts. The trainer does
not see the player if the script has no effect, and the trainer will
use whichever trainerbattle command is branched to.
5. Support arbitrary scripts in trainer scripts. cant_see and
cant_see_if_* commands have been introduced so that scripts are able
to do something when the player interacts with the trainer even if
that trainer wouldn't see them.
2025-01-08 10:27:00 +00:00
GriffinR
4439253f39
Add include guards for assembly constants files
2023-09-03 20:57:54 -04:00
Martin Griffin
912a80e27a
Reference TMs and HMs by move instead of number ( #1732 )
2023-08-09 10:51:01 -04:00
Kurausukun
c96a52b1f7
use constant for max directsound channels
...
makes it easier to modify the size of the struct used in m4a_1
2021-01-16 04:18:45 -05:00
Michael Panzlaff
15ff55eee5
use better m4a variable/constant names
2020-12-11 16:33:55 +01:00
aaaaaa123456789
7dc95a0103
Undo PokeCodec's PRs
...
This commit undoes most of PokeCodec's PRs after the debate in chat. Some
harmless or completely superseded PRs have been left alone, as there is not
much benefit in attempting to undo them.
Reverts #1104 , #1108 , #1115 , #1118 , #1119 , #1124 , #1126 , #1127 , #1132 , #1136 ,
#1137 , #1139 , #1140 , #1144 , #1148 , #1149 , #1150 , #1153 , #1155 , #1177 , #1179 ,
#1180 , #1181 , #1182 and #1183 .
2020-09-13 06:30:55 -03:00
pi1024e
bdb976dc27
fixed mistakes
2020-08-29 13:18:35 -04:00
PokeCodec
cbb94035e3
Cleaned up the libraries.
2020-08-22 00:52:45 -04:00
GriffinR
aca50c87be
Continue new contest documentation
2020-07-24 00:14:53 -04:00
GriffinR
347d1e20b6
Use constants in io_reg.s
2019-11-04 16:26:09 -06:00
GriffinR
1ffa890d27
Consolidate remaining pokemon constants
2019-09-22 08:14:22 -05:00
GriffinR
06af24bce5
Use misc ScrCmd constants
2019-09-16 19:44:47 -05:00
Melody
6d556f8cf7
improve checkplayergender calls
...
clean up constant definitions
make tweaks from review
2018-12-28 08:22:21 -06:00
garak
d6a88e0eaa
remove frontier asm constants to fix build
2018-12-03 16:39:51 -05:00
garak
462e7c8295
begin batle tower data
2018-12-02 23:22:42 -05:00
Marcus Huderle
acc1a5d446
Get all map constants from include/ rather than constants/
2018-06-15 07:49:21 -05:00
Slawter666
a49f80d552
Convert item_descriptions.inc to .h
...
OK
2018-04-25 01:41:04 +01:00
DizzyEggg
919f803214
correct move target defines
2018-02-26 13:24:46 +01:00
DizzyEggg
bce01bc518
battle labels merge with master
2018-02-09 00:43:07 +01:00
DizzyEggg
96290f4ee3
pokemon and battle constants
2018-02-08 11:17:41 +01:00
DizzyEggg
a10fd5a7c4
create more battle constants
2018-02-08 00:35:13 +01:00
DizzyEggg
4b7d778a5c
move mon data fix conflicts
2018-02-07 20:17:55 +01:00
DizzyEggg
ae8e89a10d
move some pokemon data to c
2018-02-05 17:39:26 +01:00
camthesaxman
c3c13d0acf
more renaming
2018-01-16 15:12:38 -06:00
camthesaxman
157b88b6db
identity -> position
2018-01-16 14:01:31 -06:00
Diegoisawesome
2d04eb22ab
Split rom_81370FC and port function names
2017-12-28 02:09:11 -06:00
DizzyEggg
bb82032208
battle setup review changes
2017-12-16 01:15:19 +01:00
DizzyEggg
44abbae60b
nerge with master, fix conflicts
2017-12-16 01:08:55 +01:00
camthesaxman
9525fdd54d
convert more constants
2017-12-11 12:41:13 -06:00
camthesaxman
c681b482c2
convert more constants
2017-12-11 12:27:51 -06:00
camthesaxman
19fbf024ff
fix merge conflicts
2017-12-05 12:42:30 -06:00
camthesaxman
caa13f8777
convert some constants to C headers
2017-12-05 11:55:48 -06:00
DizzyEggg
790df7159e
more battlescript labels
2017-12-03 00:47:21 +01:00
DizzyEggg
e10aea9a51
give some more labels to battle struct fields
2017-12-02 23:31:58 +01:00
DizzyEggg
10470ef536
start working on battle setup
2017-11-28 23:02:09 +01:00
DizzyEggg
9886eeb5d8
fix, rename, label battle labels and battlescripts
2017-11-26 13:26:58 +01:00
DizzyEggg
76f4a8b195
clean up and use names for printfromtable
2017-11-26 00:33:40 +01:00
DizzyEggg
9151a6d094
dump battlescripts, rename battlescripts
2017-11-25 18:42:31 +01:00
DizzyEggg
4e25ef10f2
wild encounter review changes
2017-11-20 16:40:02 +01:00
DizzyEggg
1b7246395d
merge conflicts, review changes, daycare
2017-11-17 19:31:03 +01:00
Diegoisawesome
f497c1508b
Split files from event_scripts.s
...
Also move maps/scripts to scripts/maps
2017-11-11 16:10:17 -06:00
Diegoisawesome
a6c30ba951
More file organization
2017-11-10 13:20:27 -06:00
Diegoisawesome
75b5792aa8
Update flags.inc
2017-11-09 12:49:35 -06:00
Diegoisawesome
e6ef86e4b0
Update variable and flag names
2017-11-08 15:20:10 -06:00
Diegoisawesome
60bb83144b
Update variable constants
2017-10-30 14:37:54 -05:00
Diegoisawesome
d9dd2aa582
Add songs.inc constants
2017-10-27 13:51:31 -05:00
Diegoisawesome
118b29ed03
Update map_object_constants
2017-10-24 17:12:57 -05:00
Diegoisawesome
17303d963e
More prep
2017-10-24 00:11:26 -05:00
Diegoisawesome
d1efbcd282
Extract scattered baseroms and cleanup
2017-09-25 16:27:02 -05:00
Diegoisawesome
f5743c7d6f
Ported libmks4agb from pokeruby
2016-11-01 21:48:22 -05:00