-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #373 from cbt6/npc-trade
Document npc_trade.c
- Loading branch information
Showing
34 changed files
with
453 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NPC_TRADE_KAZZA_ABRA | ||
NPC_TRADE_CHARAP_CHATOT | ||
NPC_TRADE_GASPAR_HAUNTER | ||
NPC_TRADE_FOOPA_MAGIKARP | ||
MAX_NPC_TRADES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#ifndef POKEPLATINUM_NPC_TRADE_H | ||
#define POKEPLATINUM_NPC_TRADE_H | ||
|
||
#include "field/field_system_decl.h" | ||
#include "overlay006/struct_ov6_02246254.h" | ||
|
||
#include "pokemon.h" | ||
|
||
typedef struct NpcTradeMon { | ||
u32 species; | ||
u32 hpIV; | ||
u32 atkIV; | ||
u32 defIV; | ||
u32 speedIV; | ||
u32 spAtkIV; | ||
u32 spDefIV; | ||
u32 unused1; | ||
u32 otID; | ||
u32 cool; | ||
u32 beauty; | ||
u32 cute; | ||
u32 smart; | ||
u32 tough; | ||
u32 personality; | ||
u32 heldItem; | ||
u32 otGender; | ||
u32 unused2; | ||
u32 language; | ||
u32 requestedSpecies; | ||
} NpcTradeMon; | ||
|
||
typedef struct NpcTradeData { | ||
NpcTradeMon *npcTradeMon; | ||
Pokemon *mon; | ||
TrainerInfo *trainerInfo; | ||
u32 npcTradeID; | ||
u32 heapID; | ||
} NpcTradeData; | ||
|
||
NpcTradeData *NpcTrade_Init(u32 heapID, u32 entryID); | ||
void NpcTrade_Free(NpcTradeData *data); | ||
u32 NpcTrade_GetSpecies(const NpcTradeData *data); | ||
u32 NpcTrade_GetRequestedSpecies(const NpcTradeData *data); | ||
void NpcTrade_ReceiveMon(FieldSystem *fieldSystem, NpcTradeData *data, int slot); | ||
void ov6_02246254(FieldSystem *fieldSystem, NpcTradeData *data, int slot, UnkStruct_ov6_02246254 *param3, Pokemon *givingMon, Pokemon *receivingMon); | ||
|
||
#endif // POKEPLATINUM_NPC_TRADE_H |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#ifndef POKEPLATINUM_UNK_0206C660_H | ||
#define POKEPLATINUM_UNK_0206C660_H | ||
|
||
#include "overlay006/struct_ov6_02246204_decl.h" | ||
#include "overlay006/npc_trade.h" | ||
|
||
#include "field_task.h" | ||
|
||
void sub_0206C740(FieldTask *param0, UnkStruct_ov6_02246204 *param1, int param2, u32 param3); | ||
void sub_0206C740(FieldTask *param0, NpcTradeData *data, int param2, u32 param3); | ||
|
||
#endif // POKEPLATINUM_UNK_0206C660_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
subdir('encounters') | ||
subdir('events') | ||
subdir('scripts') | ||
subdir('trades') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
npc_trades_bin_gen = generator( | ||
npc_trades_py, | ||
arguments: [ '@INPUT@', '@OUTPUT@', ], | ||
output: '@BASENAME@' | ||
) | ||
|
||
npc_trades_consts = fs.read(npc_trades_txt).splitlines() | ||
npc_trades_files = [] | ||
foreach npc_trade: npc_trades_consts | ||
if npc_trade.startswith('MAX_') | ||
continue | ||
endif | ||
npc_trades_files += files(npc_trade.to_lower() + '.json') | ||
endforeach | ||
|
||
npc_trades_order = files('npc_trades.order') | ||
npc_trades_narc = custom_target('fld_trade.narc', | ||
output: 'fld_trade.narc', | ||
input: npc_trades_bin_gen.process(npc_trades_files, env: json2bin_env), | ||
depends: [ py_consts_generators ], | ||
command: [ | ||
narc_exe, 'create', | ||
'--order', npc_trades_order, | ||
'--output', '@OUTPUT0@', | ||
'@PRIVATE_DIR@', | ||
] | ||
) | ||
|
||
nitrofs_files += npc_trades_narc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"species": "SPECIES_CHATOT", | ||
"hpIV": 15, | ||
"atkIV": 20, | ||
"defIV": 15, | ||
"speedIV": 25, | ||
"spAtkIV": 25, | ||
"spDefIV": 15, | ||
"unused1": 77, | ||
"otID": 44142, | ||
"cool": 20, | ||
"beauty": 20, | ||
"cute": 20, | ||
"smart": 20, | ||
"tough": 20, | ||
"personality": 2151, | ||
"heldItem": "ITEM_LEPPA_BERRY", | ||
"otGender": "GENDER_MALE", | ||
"unused2": 50, | ||
"language": 2, | ||
"requestedSpecies": "SPECIES_BUIZEL" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"species": "SPECIES_MAGIKARP", | ||
"hpIV": 15, | ||
"atkIV": 25, | ||
"defIV": 15, | ||
"speedIV": 20, | ||
"spAtkIV": 25, | ||
"spDefIV": 15, | ||
"unused1": 33, | ||
"otID": 53277, | ||
"cool": 0, | ||
"beauty": 0, | ||
"cute": 0, | ||
"smart": 0, | ||
"tough": 0, | ||
"personality": 1116, | ||
"heldItem": "ITEM_LUM_BERRY", | ||
"otGender": "GENDER_MALE", | ||
"unused2": 0, | ||
"language": 5, | ||
"requestedSpecies": "SPECIES_FINNEON" | ||
} |
Oops, something went wrong.