Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom item support #93

Merged
merged 10 commits into from
Oct 19, 2024
2 changes: 2 additions & 0 deletions generated/dol_symbol_table/1.01.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
0x80091ac0 EnableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80091b14 GetPowerUp__12CPlayerStateFQ212CPlayerState9EItemType
0x80091b3c HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091b70 GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091b98 GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091c10 DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80091c6c IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80091de4 InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei
Expand Down
2 changes: 2 additions & 0 deletions generated/dol_symbol_table/jpn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
0x80092c3c DisableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80092c90 EnableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80092d0c HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
0x80092d40 GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType
0x80092d68 GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType
0x80092de0 DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80092e3c IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80092f4c ResetAndIncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
Expand Down
2 changes: 2 additions & 0 deletions generated/dol_symbol_table/kor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
0x80091ab8 EnableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80091b0c GetPowerUp__12CPlayerStateFQ212CPlayerState9EItemType
0x80091b34 HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091b68 GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091b90 GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091c08 DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80091c64 IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80091ddc InitializePowerUp__12CPlayerStateFQ212CPlayerState9EItemTypei
Expand Down
2 changes: 2 additions & 0 deletions generated/dol_symbol_table/pal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@
0x80091d54 DisableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80091da8 EnableItem__12CPlayerStateFQ212CPlayerState9EItemType
0x80091e24 HasPowerUp__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091e58 GetItemCapacity__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091e80 GetItemAmount__12CPlayerStateCFQ212CPlayerState9EItemType
0x80091ef8 DecrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80091f54 IncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
0x80092064 ResetAndIncrPickUp__12CPlayerStateFQ212CPlayerState9EItemTypei
Expand Down
6 changes: 6 additions & 0 deletions ppcasm/ppcasm_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ decl_instrs! {
addc[o][.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (?o) | (9;10) | (?.);
addi, (r:d), (r:a), (i:imm) => (6;14) | d | a | (16;imm);
addic[.], (r:d), (r:a), (i:imm) => (5;6) | (?.) | d | a | (16;imm);
and[.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (10;28) | (?.);
andi, (r:d), (r:a), (i:imm) => (6;28) | d | a | (16;imm);
andis, (r:d), (r:a), (i:imm) => (6;29) | d | a | (16;imm);
b[l][a], (l:li) => (6;18) | (24;li) | (?a) | (?l);
Expand Down Expand Up @@ -409,11 +410,16 @@ decl_instrs! {
mr, (r:a), (r:s) => (6;31) | s | a | s | (10;444) | (1;0);
mtlr, (r:d) => (6;31) | d | (10;0x100) | (10;467) | (1;0);
mullw[o][.],(r:d), (r:a), (r:b) => (6;31) | d | a | b | (?o) | (9;235) | (?.);
neg, (r:d), (r:a) => (6;31) | d | a | (16;208);
nop => (32;0x60000000);
nor[.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (10;124) | (?.);
not, (r:a), (r:s) => (6;31) | s | a | s | (10;124) | (1;0);
or[.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (10;444) | (?.);
ori, (r:d), (r:a), (i:imm) => (6;24) | d | a | (16;imm);
oris, (r:d), (r:a), (i:imm) => (6;25) | d | a | (16;imm);
slw[.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (10;24) | (?.);
slwi, (r:a), (r:s), (i:n) => (6;21) | s | a | (5;{#n}) | (5;0) |(5;{31 - #n}) | (1;0);
srw[.], (r:d), (r:a), (r:b) => (6;31) | d | a | b | (10;536) | (?.);
srwi, (r:a), (r:s), (i:n) => (6;21) | s | a | (5;{32 - #n}) | (5;n) |(5;31) | (1;0);
rlwimi[.], (r:a), (r:s), (i:sh), (i:mb), (i:me) =>
(6;20) | s | a | (5;sh) | (5;mb) |(5;me) | (?.);
Expand Down
229 changes: 131 additions & 98 deletions schema/randomprime.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,22 @@
"type": "string"
},
"springBall": {
"description": "Restores the Spring Ball feature from Metroid Prime Trilogy. Use C-Stick Up while being morphed to use Spring Ball. NOTE: You need Morph Ball Bombs to use Spring Ball just like in Metroid Prime Trilogy.",
"description": "[Deprecated] Restores the Spring Ball feature from Metroid Prime Trilogy. Use C-Stick Up while being morphed to use Spring Ball. NOTE: You need Morph Ball Bombs to use Spring Ball just like in Metroid Prime Trilogy.",
"type": "boolean",
"default": false
"default": false,
"deprecated": true
},
"springBallItem": {
"description": "Spring Ball will require this item to be obtained before being able to use it.",
"$ref": "#/$defs/pickupType",
"not": {
"enum": [
"Nothing",
"Floaty Jump",
"Ice Trap"
]
},
"default": "Spring Ball"
},
"warpToStart": {
"description": "Refusing to save at any Save Station while holding L + R will warp you to the starting location (by default, Samus' Ship in Tallon Overworld: Landing Site)",
Expand Down Expand Up @@ -470,9 +483,10 @@
"default": false
},
"enableIceTraps": {
"description": "Set to true if Ice Traps items are used in this layout.",
"description": "[Deprecated] Does not do anything anymore",
"type": "boolean",
"default": false
"default": false,
"deprecated": true
},
"missileStationPbRefill": {
"description": "If enabled, Missile Stations also refill Power Bomb ammunition.",
Expand Down Expand Up @@ -2492,6 +2506,12 @@
"type": "boolean",
"default": false
},
"powerSuit": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295,
"default": 0
},
"variaSuit": {
"type": "boolean",
"default": false
Expand Down Expand Up @@ -2535,6 +2555,32 @@
"flamethrower": {
"type": "boolean",
"default": false
},
"unknownItem1": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295,
"default": 0
},
"unlimitedMissiles": {
"type": "boolean",
"default": false
},
"unlimitedPowerBombs": {
"type": "boolean",
"default": false
},
"missileLauncher": {
"type": "boolean",
"default": true
},
"powerBombLauncher": {
"type": "boolean",
"default": true
},
"springBall": {
"type": "boolean",
"default": false
}
},
"required": [
Expand All @@ -2552,6 +2598,7 @@
"bombs",
"spiderBall",
"boostBall",
"powerSuit",
"variaSuit",
"gravitySuit",
"phazonSuit",
Expand All @@ -2562,7 +2609,13 @@
"superMissile",
"wavebuster",
"iceSpreader",
"flamethrower"
"flamethrower",
"unknownItem1",
"unlimitedMissiles",
"unlimitedPowerBombs",
"missileLauncher",
"powerBombLauncher",
"springBall"
],
"default": {
"combatVisor": true,
Expand All @@ -2579,6 +2632,7 @@
"bombs": false,
"spiderBall": false,
"boostBall": false,
"powerSuit": 0,
"variaSuit": false,
"gravitySuit": false,
"phazonSuit": false,
Expand All @@ -2589,7 +2643,13 @@
"superMissile": false,
"wavebuster": false,
"iceSpreader": false,
"flamethrower": false
"flamethrower": false,
"unknownItem1": 0,
"unlimitedMissiles": false,
"unlimitedPowerBombs": false,
"missileLauncher": true,
"powerBombLauncher": true,
"springBall": false
},
"additionalProperties": false
},
Expand Down Expand Up @@ -2693,53 +2753,7 @@
},
"type": {
"description": "Defines what is acquired when the pickup is obtained.",
"type": "string",
"enum": [
"Power Beam",
"Ice Beam",
"Wave Beam",
"Plasma Beam",
"Missile",
"Scan Visor",
"Morph Ball Bomb",
"Power Bomb",
"Flamethrower",
"Thermal Visor",
"Charge Beam",
"Super Missile",
"Grapple Beam",
"X-Ray Visor",
"Ice Spreader",
"Space Jump Boots",
"Morph Ball",
"Combat Visor",
"Boost Ball",
"Spider Ball",
"Power Suit",
"Gravity Suit",
"Varia Suit",
"Phazon Suit",
"Energy Tank",
"Unknown Item 1",
"Health Refill",
"Unknown Item 2",
"Wavebuster",
"Artifact of Truth",
"Artifact of Strength",
"Artifact of Elder",
"Artifact of Wild",
"Artifact of Lifegiver",
"Artifact of Warrior",
"Artifact of Chozo",
"Artifact of Nature",
"Artifact of Sun",
"Artifact of World",
"Artifact of Spirit",
"Artifact of Newborn",
"Nothing",
"Floaty Jump",
"Ice Trap"
],
"$ref": "#/$defs/pickupType",
"default": "Nothing"
},
"scanText": {
Expand Down Expand Up @@ -3918,51 +3932,16 @@
"default": 0
},
"itemId": {
"type": "string",
"enum": [
"PowerBeam",
"IceBeam",
"WaveBeam",
"PlasmaBeam",
"Missile",
"ScanVisor",
"MorphBallBomb",
"PowerBomb",
"Flamethrower",
"ThermalVisor",
"ChargeBeam",
"SuperMissile",
"GrappleBeam",
"XRayVisor",
"IceSpreader",
"SpaceJumpBoots",
"MorphBall",
"CombatVisor",
"BoostBall",
"SpiderBall",
"PowerSuit",
"GravitySuit",
"VariaSuit",
"PhazonSuit",
"EnergyTank",
"UnknownItem1",
"HealthRefill",
"UnknownItem2",
"Wavebuster",
"ArtifactOfTruth",
"ArtifactOfStrength",
"ArtifactOfElder",
"ArtifactOfWild",
"ArtifactOfLifegiver",
"ArtifactOfWarrior",
"ArtifactOfChozo",
"ArtifactOfNature",
"ArtifactOfSun",
"ArtifactOfWorld",
"ArtifactOfSpirit",
"ArtifactOfNewborn"
],
"default": "PowerBeam"
"description": "Any custom items will be stored in UnknownItem2",
"$ref": "#/$defs/pickupType",
toasterparty marked this conversation as resolved.
Show resolved Hide resolved
"not": {
"enum": [
"Nothing",
"Floaty Jump",
"Ice Trap"
]
},
"default": "Power Beam"
},
"active": {
"type": "boolean",
Expand Down Expand Up @@ -5820,6 +5799,60 @@
"Disabled",
"Enemy"
]
},
"pickupType": {
"type": "string",
"enum": [
"Power Beam",
"Ice Beam",
"Wave Beam",
"Plasma Beam",
"Missile",
"Scan Visor",
"Morph Ball Bomb",
"Power Bomb",
"Flamethrower",
"Thermal Visor",
"Charge Beam",
"Super Missile",
"Grapple Beam",
"X-Ray Visor",
"Ice Spreader",
"Space Jump Boots",
"Morph Ball",
"Combat Visor",
"Boost Ball",
"Spider Ball",
"Power Suit",
"Gravity Suit",
"Varia Suit",
"Phazon Suit",
"Energy Tank",
"Unknown Item 1",
"Health Refill",
"Unknown Item 2",
"Wavebuster",
"Artifact of Truth",
"Artifact of Strength",
"Artifact of Elder",
"Artifact of Wild",
"Artifact of Lifegiver",
"Artifact of Warrior",
"Artifact of Chozo",
"Artifact of Nature",
"Artifact of Sun",
"Artifact of World",
"Artifact of Spirit",
"Artifact of Newborn",
"Unlimited Missiles",
"Unlimited Power Bombs",
"Missile Launcher",
"Main Power Bomb",
"Spring Ball",
"Nothing",
"Floaty Jump",
"Ice Trap"
]
}
}
}
Loading
Loading