pmdsky-debug-py 7.0.8__py3-none-any.whl → 7.0.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pmdsky_debug_py/na.py CHANGED
@@ -53,11 +53,13 @@ class NaArm9Functions:
53
53
  None,
54
54
  "Sets global parameters for the memory allocator.\n\nThis includes"
55
55
  " MEMORY_ALLOCATION_ARENA_GETTERS and some other stuff.\n\nDungeon mode uses"
56
- " the default arena getters. Ground mode uses its own arena getters, which are"
57
- " defined in overlay 11 and set (by calling this function) at the start of"
58
- " GroundMainLoop.\n\nr0: GetAllocArena function pointer (GetAllocArenaDefault"
59
- " is used if null)\nr1: GetFreeArena function pointer (GetFreeArenaDefault is"
60
- " used if null)",
56
+ " the default arena getters. Ground mode uses its own arena getters that return"
57
+ " custom arenas for some flag values, which are defined in overlay 11 and set"
58
+ " (by calling this function) at the start of GroundMainLoop. Note that the"
59
+ " sound memory arena is provided explicitly to MemLocateSet in the sound code,"
60
+ " so doesn't go through this path.\n\nr0: GetAllocArena function pointer"
61
+ " (GetAllocArenaDefault is used if null)\nr1: GetFreeArena function pointer"
62
+ " (GetFreeArenaDefault is used if null)",
61
63
  )
62
64
 
63
65
  GetAllocArenaDefault = Symbol(
@@ -2377,6 +2379,21 @@ class NaArm9Functions:
2377
2379
  " command list'\n\nr0: Command to send",
2378
2380
  )
2379
2381
 
2382
+ InitSoundSystem = Symbol(
2383
+ [0x18C28],
2384
+ [0x2018C28],
2385
+ None,
2386
+ "Initialize the DSE sound engine?\n\nThis function is called somewhere in the"
2387
+ " hierarchy under TaskProcBoot and appears to allocate a bunch of memory"
2388
+ " (including a dedicated memory arena, see SOUND_MEMORY_ARENA) for sound data,"
2389
+ " and reads a bunch of core sound files.\n\nFile paths referenced:\n-"
2390
+ " SOUND/SYSTEM/se_sys.swd\n- SOUND/SYSTEM/se_sys.sed\n- SOUND/SE/motion.swd\n-"
2391
+ " SOUND/SE/motion.sed\n- SOUND/BGM/bgm.swd (this is the main sample bank, see"
2392
+ " https://projectpokemon.org/home/docs/mystery-dungeon-nds/pok%C3%A9mon-mystery-dungeon-explorers-r78/)\n\nDebug"
2393
+ " strings:\n- entry system se swd %04x\n\n- entry system se sed %04x\n\n- entry"
2394
+ " motion se swd %04x\n\n- entry motion se sed %04x\n",
2395
+ )
2396
+
2380
2397
  ManipBgmPlayback = Symbol(
2381
2398
  [0x18EA4],
2382
2399
  [0x2018EA4],
@@ -2483,6 +2500,32 @@ class NaArm9Functions:
2483
2500
  " field 0x43 to 0xFF\n\nr0: animation control\nr1: sprite id in WAN_TABLE",
2484
2501
  )
2485
2502
 
2503
+ SetAnimationForAnimationControlInternal = Symbol(
2504
+ None,
2505
+ None,
2506
+ None,
2507
+ "Set the wan animation (and other related settings) of an"
2508
+ " animation_control\nUsed by SetAnimationForAnimationControl\n\nr0:"
2509
+ " animation_control\nr1: wan_header\nr2: animation group id\nr3: animation"
2510
+ " id\nstack[0]: ?\nstack[1] (0x4): palette pos low (see the field on"
2511
+ " animation_control)\nstack[2] (0x8): ?\nstack[3] (0xC): ?\nstack[4] (0x10):"
2512
+ " palette_bank (directly set to the animation_control field with said name)",
2513
+ )
2514
+
2515
+ SetAnimationForAnimationControl = Symbol(
2516
+ None,
2517
+ None,
2518
+ None,
2519
+ "Set the animation to play with this animation control, but do not start"
2520
+ " it.\n\n(args same as SetAndPlayAnimationForAnimationControl)\nr0:"
2521
+ " animation_control\nr1: animation key (either an animation or animation group"
2522
+ " depending on the type of sprite and if it does have animation group with this"
2523
+ " animation key as index)\nr2: direction_id (unsure) (the key to the"
2524
+ " wan_animation in itself, only used when animation key represent a"
2525
+ " wan_animation_group)\nr3: ?\nstack[0]: low_palette_pos\nstack[1] (0x4):"
2526
+ " ?\nstack[2] (0x8): ?\nstack[3] (0xC): ?",
2527
+ )
2528
+
2486
2529
  GetWanForAnimationControl = Symbol(
2487
2530
  None,
2488
2531
  None,
@@ -2492,6 +2535,19 @@ class NaArm9Functions:
2492
2535
  " animation_control\nreturn: wan_header",
2493
2536
  )
2494
2537
 
2538
+ SetAndPlayAnimationForAnimationControl = Symbol(
2539
+ None,
2540
+ None,
2541
+ None,
2542
+ "Set the animation to play with the animation control, and start it.\n\nr0:"
2543
+ " animation_control\nr1: animation key (either an animation or animation group"
2544
+ " depending on the type of sprite and if it does have animation group with this"
2545
+ " animation key as index)\nr2: direction_id (unsure) (the key to the"
2546
+ " wan_animation in itself, only used when animation key represent a"
2547
+ " wan_animation_group)\nr3: ?\nstack[0]: low_palette_pos\nstack[1] (0x4):"
2548
+ " ?\nstack[2] (0x8): ?\nstack[3] (0xC): ?",
2549
+ )
2550
+
2495
2551
  SwitchAnimationControlToNextFrame = Symbol(
2496
2552
  None,
2497
2553
  None,
@@ -2681,6 +2737,60 @@ class NaArm9Functions:
2681
2737
  " unk_pal\nr2: unk_tex\nr3: unk_tex_param",
2682
2738
  )
2683
2739
 
2740
+ GeomSetTexImageParam = Symbol(
2741
+ None,
2742
+ None,
2743
+ None,
2744
+ "Send the 'TEXIMAGE_PARAM' geometry engine command, that defines some"
2745
+ " parameters for the texture\nSee"
2746
+ " http://problemkaputt.de/gbatek.htm#ds3dtextureattributes for more information"
2747
+ " on the parameters\n\nr0: texture format\nr1: texture coordinates"
2748
+ " transformation modes\nr2: texture S-Size\nr3: texture T-Size\nstack[0] (0x0):"
2749
+ " repeat in S Direction\nstack[1] (0x4): flip in S direction\nstack[2] (0x8):"
2750
+ " What to make of color 0 (bit 29)\nstack[3] (0xC): Texture VRAM offset (Will"
2751
+ " be divided by 8)",
2752
+ )
2753
+
2754
+ GeomSetVertexCoord16 = Symbol(
2755
+ None,
2756
+ None,
2757
+ None,
2758
+ "Send the 'VTX_16' geometry engine command, that defines the coordinate of a"
2759
+ " point of a polygon, using 16 bits.\nInputs are clamped over their 16 lower"
2760
+ " bits\n\nr0: x coordinate\nr1: y coordinate\nr2: z coordinate",
2761
+ )
2762
+
2763
+ InitRender3dData = Symbol(
2764
+ None, None, None, "Initialize the global 'RENDER_3D' structure.\n\nNo params."
2765
+ )
2766
+
2767
+ GeomSwapBuffers = Symbol(
2768
+ None,
2769
+ None,
2770
+ None,
2771
+ "Call the 'SWAP_BUFFERS' command. This will swap the geometry buffer. The"
2772
+ " parameter of 1 is provided, which enables manual Y-sorting of translucent"
2773
+ " polygons.\n\nNo params.",
2774
+ )
2775
+
2776
+ InitRender3dElement = Symbol(
2777
+ [0x1E730],
2778
+ [0x201E730],
2779
+ None,
2780
+ "Initialize the render_3d_element structure (without performing any drawing or"
2781
+ " external data access)\n\nr0: render_3d_element",
2782
+ )
2783
+
2784
+ Generate3dCanvasBorder = Symbol(
2785
+ None,
2786
+ None,
2787
+ None,
2788
+ "Draw the border for dialogue box and other menus, using the 3D engine.\nThe"
2789
+ " render_3d_element contains certain value that needs to be set to a correct"
2790
+ " value for it to work.\nThe element is not immediately sent to the geometry"
2791
+ " engine, but is queued up in RENDER_3D\n\nr0: render_3d_element",
2792
+ )
2793
+
2684
2794
  HandleSir0Translation = Symbol(
2685
2795
  [0x1F4B4],
2686
2796
  [0x201F4B4],
@@ -3549,7 +3659,13 @@ class NaArm9Functions:
3549
3659
  [0x4CA94],
3550
3660
  [0x204CA94],
3551
3661
  None,
3552
- "Note: unverified, ported from Irdkwia's notes\n\nr0: flag_id\nreturn: ?",
3662
+ "Returns the value of one of the flags in VAR_PERFORMANCE_PROGRESS_LIST, with"
3663
+ " some edge cases.\n\nList of cases where the function behaves differently:\n-"
3664
+ " If the requested flag is 0, returns true if and only if SCENARIO_MAIN =="
3665
+ " 0x35\n- If the requested flag is 1 or 2 and GAME_MODE =="
3666
+ " GAME_MODE_SPECIAL_EPISODE, returns true\n- If the requested flag is between 3"
3667
+ " and 7 (both included) and GAME_MODE == GAME_MODE_SPECIAL_EPISODE, returns"
3668
+ " false\n\nr0: ID of the flag to get\nreturn: Value of the flag",
3553
3669
  )
3554
3670
 
3555
3671
  GetScenarioBalance = Symbol(
@@ -3997,7 +4113,8 @@ class NaArm9Functions:
3997
4113
  [0x204FC28],
3998
4114
  None,
3999
4115
  "Increments by 1 the number of dungeons cleared.\n\nImplements"
4000
- " SPECIAL_PROC_0x3A (see ScriptSpecialProcessCall).\n\nNo params.",
4116
+ " SPECIAL_PROC_INCREMENT_DUNGEONS_CLEARED (see ScriptSpecialProcessCall).\n\nNo"
4117
+ " params.",
4001
4118
  )
4002
4119
 
4003
4120
  GetNbDungeonsCleared = Symbol(
@@ -4111,7 +4228,8 @@ class NaArm9Functions:
4111
4228
  [0x204FEC8],
4112
4229
  None,
4113
4230
  "Increments by 1 the number of big treasure wins.\n\nImplements"
4114
- " SPECIAL_PROC_0x3B (see ScriptSpecialProcessCall).\n\nNo params.",
4231
+ " SPECIAL_PROC_INCREMENT_BIG_TREASURE_WINS (see"
4232
+ " ScriptSpecialProcessCall).\n\nNo params.",
4115
4233
  )
4116
4234
 
4117
4235
  SetNbBigTreasureWins = Symbol(
@@ -5854,11 +5972,33 @@ class NaArm9Functions:
5854
5972
  [0x70674], [0x2070674], None, "Note: unverified, ported from Irdkwia's notes"
5855
5973
  )
5856
5974
 
5975
+ ParseDseEvents = Symbol(
5976
+ [0x71224],
5977
+ [0x2071224],
5978
+ None,
5979
+ "From https://projectpokemon.org/docs/mystery-dungeon-nds/procyon-studios-digital-sound-elements-r12/",
5980
+ )
5981
+
5982
+ UpdateSequencerTracks = Symbol(
5983
+ [0x713E8],
5984
+ [0x20713E8],
5985
+ None,
5986
+ "From https://projectpokemon.org/docs/mystery-dungeon-nds/procyon-studios-digital-sound-elements-r12/",
5987
+ )
5988
+
5857
5989
  UpdateChannels = Symbol(
5858
5990
  [0x7448C],
5859
5991
  [0x207448C],
5860
5992
  None,
5861
- "Note: unverified, ported from Irdkwia's notes\n\nNo params.",
5993
+ "From https://projectpokemon.org/docs/mystery-dungeon-nds/procyon-studios-digital-sound-elements-r12/"
5994
+ " and Irdkwia's notes.\n\nNo params.",
5995
+ )
5996
+
5997
+ UpdateTrackVolumeEnvelopes = Symbol(
5998
+ [0x74E0C],
5999
+ [0x2074E0C],
6000
+ None,
6001
+ "From https://projectpokemon.org/docs/mystery-dungeon-nds/procyon-studios-digital-sound-elements-r12/",
5862
6002
  )
5863
6003
 
5864
6004
  EnableVramBanksInSetDontSave = Symbol(
@@ -7376,6 +7516,14 @@ class NaArm9Data:
7376
7516
  "pointer to the list of wan sprite loaded in RAM\n\nstruct wan_table*",
7377
7517
  )
7378
7518
 
7519
+ RENDER_3D = Symbol(
7520
+ None,
7521
+ None,
7522
+ None,
7523
+ "The (seemingly) unique instance render_3d_global in the game\n\ntype: struct"
7524
+ " render_3d_global",
7525
+ )
7526
+
7379
7527
  LANGUAGE_INFO_DATA = Symbol([0xAFCE8], [0x20AFCE8], None, "[Runtime]")
7380
7528
 
7381
7529
  TBL_TALK_GROUP_STRING_ID_START = Symbol(
@@ -7471,7 +7619,9 @@ class NaArm9Data:
7471
7619
  [0xB0B90],
7472
7620
  [0x20B0B90],
7473
7621
  0x1FC,
7474
- "Irdkwia's notes: named DSEEventFunctionPtrTable with length 0x3C0 (note the"
7622
+ "Table of all DSE events, see"
7623
+ " https://projectpokemon.org/docs/mystery-dungeon-nds/procyon-studios-digital-sound-elements-r12/\n\nIrdkwia's"
7624
+ " notes: named DSEEventFunctionPtrTable with length 0x3C0 (note the"
7475
7625
  " disagreement), 240*0x4.",
7476
7626
  )
7477
7627
 
@@ -7523,6 +7673,24 @@ class NaArm9Section:
7523
7673
 
7524
7674
 
7525
7675
  class NaItcmFunctions:
7676
+ AllocateRender3dElement = Symbol(
7677
+ None,
7678
+ None,
7679
+ None,
7680
+ "Return a new render_3d_element from RENDER_3D, to be to draw a new element"
7681
+ " using the 3d render engine later in the frame.\n\nreturn: render_3d_element"
7682
+ " or NULL if there is no more available space in the stack",
7683
+ )
7684
+
7685
+ Render3dStack = Symbol(
7686
+ None,
7687
+ None,
7688
+ None,
7689
+ "Perform rendering of the render_stack of RENDER_3D structure. Does nothing if"
7690
+ " there are no elements, otherwise, sort them based on a value, and render them"
7691
+ " all consecutively.\n\nNo params.",
7692
+ )
7693
+
7526
7694
  GetKeyN2MSwitch = Symbol(
7527
7695
  [0x1434],
7528
7696
  [0x20B47B4],
@@ -7649,6 +7817,14 @@ class NaItcmData:
7649
7817
  " mem_block[256]",
7650
7818
  )
7651
7819
 
7820
+ RENDER_3D_FUNCTIONS = Symbol(
7821
+ None,
7822
+ None,
7823
+ None,
7824
+ "Pointers to the 4 functions available from render_3d_element (in"
7825
+ " ITCM)\n\ntype: render_3d_element_concrete[4]",
7826
+ )
7827
+
7652
7828
 
7653
7829
  class NaItcmSection:
7654
7830
  name = "itcm"
@@ -12096,8 +12272,10 @@ class NaOverlay11Functions:
12096
12272
  [0x22E935C],
12097
12273
  None,
12098
12274
  "The GetAllocArena function used for ground mode. See SetMemAllocatorParams for"
12099
- " more information.\n\nr0: initial memory arena pointer, or null\nr1: flags"
12100
- " (see MemAlloc)\nreturn: memory arena pointer, or null",
12275
+ " more information.\n\nFor (flags & 0xFF):\n 8, 15, 16:"
12276
+ " GROUND_MEMORY_ARENA_1\n 14: GROUND_MEMORY_ARENA_2\n other: null (default"
12277
+ " arena)\n\nr0: initial memory arena pointer, or null\nr1: flags (see"
12278
+ " MemAlloc)\nreturn: memory arena pointer, or null",
12101
12279
  )
12102
12280
 
12103
12281
  GetFreeArenaGround = Symbol(
@@ -12490,6 +12668,8 @@ class NaOverlay11Data:
12490
12668
  " scene\n\ntype: struct main_ground_data",
12491
12669
  )
12492
12670
 
12671
+ WORLD_MAP_MODE = Symbol([0x48BA4], [0x2324DE4], 0x4, "The current world map")
12672
+
12493
12673
 
12494
12674
  class NaOverlay11Section:
12495
12675
  name = "overlay11"
@@ -19154,7 +19334,7 @@ class NaOverlay29Functions:
19154
19334
  [0x59748],
19155
19335
  [0x2335988],
19156
19336
  None,
19157
- "Note: unverified, ported from Irdkwia's notes\n\nr0: call_back_str\nr1: x"
19337
+ "Note: unverified, ported from Irdkwia's notes\n\nr0: render_3d_element\nr1: x"
19158
19338
  " position\nr2: y position\nr3: char_id\nstack[0]: ?\nreturn: ?",
19159
19339
  )
19160
19340
 
@@ -22440,6 +22620,36 @@ class NaRamFunctions:
22440
22620
 
22441
22621
 
22442
22622
  class NaRamData:
22623
+ DEFAULT_MEMORY_ARENA_MEMORY = Symbol(
22624
+ [0xB4BC0],
22625
+ [0x20B4BC0],
22626
+ 0x1E6400,
22627
+ "The memory region for the default memory arena.\n\nThe length is defined by"
22628
+ " DEFAULT_MEMORY_ARENA_SIZE.\n\nOne mode that uses this region for heap"
22629
+ " allocations is dungeon mode.",
22630
+ )
22631
+
22632
+ GROUND_MEMORY_ARENA_2 = Symbol(
22633
+ [0x145A08],
22634
+ [0x2145A08],
22635
+ 0x1C,
22636
+ "This is a memory subarena under DEFAULT_MEMORY_ARENA used for some things in"
22637
+ " ground mode.\n\nIt's used for user_flags 14.\n\nIncluding the allocator"
22638
+ " metadata, this arena occupies 0xB0000 bytes of space.\n\ntype: struct"
22639
+ " mem_arena",
22640
+ )
22641
+
22642
+ GROUND_MEMORY_ARENA_2_BLOCKS = Symbol(
22643
+ [0x145A24],
22644
+ [0x2145A24],
22645
+ 0x300,
22646
+ "The block array for GROUND_MEMORY_ARENA_2.\n\ntype: struct mem_block[32]",
22647
+ )
22648
+
22649
+ GROUND_MEMORY_ARENA_2_MEMORY = Symbol(
22650
+ [0x145D24], [0x2145D24], 0xAFCE4, "The memory region for GROUND_MEMORY_ARENA_2."
22651
+ )
22652
+
22443
22653
  DUNGEON_COLORMAP_PTR = Symbol(
22444
22654
  [0x1B9CF4],
22445
22655
  [0x21B9CF4],
@@ -22469,6 +22679,33 @@ class NaRamData:
22469
22679
  " ARM 9 binary.\n\ntype: struct move_data_table",
22470
22680
  )
22471
22681
 
22682
+ SOUND_MEMORY_ARENA = Symbol(
22683
+ [0x24EFA0],
22684
+ [0x224EFA0],
22685
+ 0x1C,
22686
+ "This is a memory subarena under DEFAULT_MEMORY_ARENA that seems to be used"
22687
+ " exclusively for sound data.\n\nIncluding allocator metadata, this subarena"
22688
+ " occupies 0x3C000 bytes of space within the default arena.\n\nIt's referenced"
22689
+ " by various sound functions like LoadDseFile, PlaySeLoad, and PlayBgm when"
22690
+ " allocating memory.\n\ntype: struct mem_arena",
22691
+ )
22692
+
22693
+ SOUND_MEMORY_ARENA_BLOCKS = Symbol(
22694
+ [0x24EFBC],
22695
+ [0x224EFBC],
22696
+ 0x1E0,
22697
+ "The block array for SOUND_MEMORY_ARENA.\n\ntype: struct mem_block[20]",
22698
+ )
22699
+
22700
+ SOUND_MEMORY_ARENA_MEMORY = Symbol(
22701
+ [0x24F19C],
22702
+ [0x224F19C],
22703
+ 0x3BE04,
22704
+ "The memory region for SOUND_MEMORY_ARENA.\n\nThis region appears to be used"
22705
+ " for sound-related heap allocations, like when loading sound files into"
22706
+ " memory.",
22707
+ )
22708
+
22472
22709
  FRAMES_SINCE_LAUNCH = Symbol(
22473
22710
  [0x2A354C, 0x2A359C],
22474
22711
  [0x22A354C, 0x22A359C],
@@ -22594,6 +22831,10 @@ class NaRamData:
22594
22831
  None, None, None, "animation_control of 'FONT/alter.wan'"
22595
22832
  )
22596
22833
 
22834
+ SOUND_MEMORY_ARENA_PTR = Symbol(
22835
+ [0x2A4E54], [0x22A4E54], 0x4, "Pointer to SOUND_MEMORY_ARENA."
22836
+ )
22837
+
22597
22838
  DIALOG_BOX_LIST = Symbol(
22598
22839
  [0x2A88DC], [0x22A88DC], None, "Array of allocated dialog box structs."
22599
22840
  )
@@ -22716,7 +22957,33 @@ class NaRamData:
22716
22957
  " the game is running.",
22717
22958
  )
22718
22959
 
22719
- WORLD_MAP_MODE = Symbol([0x324DE4], [0x2324DE4], 0x4, "The current world map")
22960
+ GROUND_MEMORY_ARENA_1_PTR = Symbol(
22961
+ [0x324CB4], [0x2324CB4], 0x4, "Pointer to GROUND_MEMORY_ARENA_1."
22962
+ )
22963
+
22964
+ GROUND_MEMORY_ARENA_2_PTR = Symbol(
22965
+ [0x324CB8], [0x2324CB8], 0x4, "Pointer to GROUND_MEMORY_ARENA_2."
22966
+ )
22967
+
22968
+ GROUND_MEMORY_ARENA_1 = Symbol(
22969
+ [0x324FC0],
22970
+ [0x2324FC0],
22971
+ 0x1C,
22972
+ "This is a top-level memory arena used for some things in ground mode.\n\nIt's"
22973
+ " used for user_flags 8, 15, and 16.\n\nIncluding the allocator metadata, this"
22974
+ " arena occupies 0x64000 bytes of space.\n\ntype: struct mem_arena",
22975
+ )
22976
+
22977
+ GROUND_MEMORY_ARENA_1_BLOCKS = Symbol(
22978
+ [0x324FDC],
22979
+ [0x2324FDC],
22980
+ 0x4E0,
22981
+ "The block array for GROUND_MEMORY_ARENA_1.\n\ntype: struct mem_block[52]",
22982
+ )
22983
+
22984
+ GROUND_MEMORY_ARENA_1_MEMORY = Symbol(
22985
+ [0x3254BC], [0x23254BC], 0x63B04, "The memory region for GROUND_MEMORY_ARENA_1."
22986
+ )
22720
22987
 
22721
22988
  SENTRY_DUTY_STRUCT = Symbol([0x37A5D0], [0x237A5D0], 0x38D4, "")
22722
22989