Merge pull request #276 from PikalaxALT/pikalax_work

Trainer parties to json; trainer frontpics to png; refactor graphics rules
This commit is contained in:
red031000
2020-08-31 21:57:56 +01:00
committed by GitHub
2114 changed files with 29200 additions and 3437 deletions

View File

@@ -247,41 +247,25 @@ PADDED_LZ_FILES := $(addsuffix .lz,$(wildcard \
$(PADDED_LZ_FILES): %.lz: %
$(NTRCOMP) -l2 -s -A4 -o $@ $<
$(CLOBBER_SIZE_NCGR_FILES): GFX_FLAGS = -clobbersize
$(CLOBBER_SIZE_VERSION101_NCGR_FILES): GFX_FLAGS = -clobbersize -version101
$(VERSION101_SOPC_8BPP_NCGR_FILES): GFX_FLAGS = -version101 -sopc -bitdepth 8
$(VERSION101_SOPC_NCGR_FILES): GFX_FLAGS = -version101 -sopc
$(SCANNED_NCGR_FILES): GFX_FLAGS = -scanned
$(IR_NCLR_FILES): GFX_FLAGS = -ir
$(4BPP_NCLR_FILES): GFX_FLAGS = -bitdepth 4
$(8BPP_COMP10_NOPAD_NCLR_PNG_FILES): GFX_FLAGS = -bitdepth 8 -nopad -comp 10
$(8BPP_COMP10_NOPAD_NCLR_PAL_FILES): GFX_FLAGS = -bitdepth 8 -nopad -comp 10
%.NCGR: %.png
$(GFX) $< $@
$(CLOBBER_SIZE_NCGR_FILES): %.NCGR: %.png
$(GFX) $< $@ -clobbersize
$(CLOBBER_SIZE_VERSION101_NCGR_FILES): %.NCGR: %.png
$(GFX) $< $@ -clobbersize -version101
$(VERSION101_SOPC_8BPP_NCGR_FILES): %.NCGR: %.png
$(GFX) $< $@ -version101 -sopc -bitdepth 8
$(VERSION101_SOPC_NCGR_FILES): %.NCGR: %.png
$(GFX) $< $@ -version101 -sopc
$(SCANNED_NCGR_FILES): %.NCGR: %.png
$(GFX) $< $@ -scanned
$(GFX) $< $@ $(GFX_FLAGS)
%.NCLR: %.png
$(GFX) $< $@
$(GFX) $< $@ $(GFX_FLAGS)
%.NCLR: %.pal
$(GFX) $< $@
$(IR_NCLR_FILES): %.NCLR: %.pal
$(GFX) $< $@ -ir
$(4BPP_NCLR_FILES): %.NCLR: %.pal
$(GFX) $< $@ -bitdepth 4
$(8BPP_COMP10_NOPAD_NCLR_PNG_FILES): %.NCLR: %.png
$(GFX) $< $@ -bitdepth 8 -nopad -comp 10
$(8BPP_COMP10_NOPAD_NCLR_PAL_FILES): %.NCLR: %.pal
$(GFX) $< $@ -bitdepth 8 -nopad -comp 10
$(GFX) $< $@ $(GFX_FLAGS)
%.png: ;
%.pal: ;

View File

@@ -2143,7 +2143,7 @@ _02039628: .word 0x00001388
FUN_0203962C: ; 0x0203962C
push {r3, lr}
mov r1, #0x9
bl FUN_0206AC74
bl TrainerData_GetAttr
cmp r0, #0x0
beq _0203963C
mov r0, #0x1

View File

@@ -304,7 +304,7 @@ _0204AD0A:
FUN_0204AD0C: ; 0x0204AD0C
push {r3-r5, lr}
mov r1, #0x1
bl FUN_0206AC74
bl TrainerData_GetAttr
lsl r0, r0, #0x18
lsr r5, r0, #0x18
ldr r0, _0204AD38 ; =0x0000044D

View File

@@ -5,13 +5,13 @@
.global UNK_020F8010
UNK_020F8010: ; 0x020F8010
.byte 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02
.byte 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02
.byte 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
.byte 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00
.byte 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00
.byte 0x01, 0x00, 0x00, 0x00
.byte 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0
.byte 0, 1, 1, 0, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 1, 2
.byte 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 2
.byte 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0
.byte 0, 0, 1, 0, 0, 1, 2, 0, 1, 0, 1, 0, 1, 1, 1, 0
.byte 1, 0, 2, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0
.byte 1, 0, 0, 0
.text
@@ -43,7 +43,7 @@ _0206ABF4:
cmp r0, #0x0
beq _0206AC48
add r1, sp, #0x14
bl FUN_0206ADE0
bl TrainerData_ReadTrData
ldr r3, [sp, #0x8]
add r6, sp, #0x14
add r3, #0x28
@@ -77,7 +77,7 @@ _0206AC3E:
ldr r0, [sp, #0x0]
ldr r2, [sp, #0x4]
add r1, r7, #0x0
bl FUN_0206AE0C
bl LoadTrainerParty
_0206AC48:
ldr r0, [sp, #0x8]
add r7, r7, #0x1
@@ -100,13 +100,13 @@ _0206AC48:
nop
_0206AC70: .word 0x0000022F
thumb_func_start FUN_0206AC74
FUN_0206AC74: ; 0x0206AC74
thumb_func_start TrainerData_GetAttr
TrainerData_GetAttr: ; 0x0206AC74
push {r4-r5, lr}
sub sp, #0x34
add r5, r1, #0x0
add r1, sp, #0x0
bl FUN_0206ADE0
bl TrainerData_ReadTrData
cmp r5, #0x9
bhi _0206ACCC
add r0, r5, r5
@@ -293,8 +293,8 @@ _0206ADD6:
nop
_0206ADDC: .word 0x0000022E
thumb_func_start FUN_0206ADE0
FUN_0206ADE0: ; 0x0206ADE0
thumb_func_start TrainerData_ReadTrData
TrainerData_ReadTrData: ; 0x0206ADE0
ldr r3, _0206ADEC ; =ReadWholeNarcMemberByIdPair
add r2, r0, #0x0
add r0, r1, #0x0
@@ -303,8 +303,8 @@ FUN_0206ADE0: ; 0x0206ADE0
nop
_0206ADEC: .word ReadWholeNarcMemberByIdPair
thumb_func_start FUN_0206ADF0
FUN_0206ADF0: ; 0x0206ADF0
thumb_func_start TrainerData_ReadTrPoke
TrainerData_ReadTrPoke: ; 0x0206ADF0
ldr r3, _0206ADFC ; =ReadWholeNarcMemberByIdPair
add r2, r0, #0x0
add r0, r1, #0x0
@@ -321,8 +321,8 @@ FUN_0206AE00: ; 0x0206AE00
nop
_0206AE08: .word UNK_020F8010
thumb_func_start FUN_0206AE0C
FUN_0206AE0C: ; 0x0206AE0C
thumb_func_start LoadTrainerParty
LoadTrainerParty: ; 0x0206AE0C
push {r3-r7, lr}
sub sp, #0x50
add r7, r1, #0x0
@@ -345,7 +345,7 @@ FUN_0206AE0C: ; 0x0206AE0C
add r0, r4, r6
ldr r0, [r0, #0x18]
ldr r1, [sp, #0x4c]
bl FUN_0206ADF0
bl TrainerData_ReadTrPoke
mov r0, #0x34
add r5, r7, #0x0
mul r5, r0

View File

@@ -4838,11 +4838,11 @@
.extern WazaGetMaxPp
.extern GetAttrFromWazaTbl
.extern FUN_0206ABC4
.extern FUN_0206AC74
.extern TrainerData_GetAttr
.extern FUN_0206ACD4
.extern FUN_0206AD4C
.extern FUN_0206ADE0
.extern FUN_0206ADF0
.extern TrainerData_ReadTrData
.extern TrainerData_ReadTrPoke
.extern FUN_0206AE00
.extern PCStorage_init
.extern PCStorage_sizeof

View File

@@ -11742,11 +11742,11 @@ MOD11_02234CFC: ; 0x02234CFC
str r0, [sp, #4]
ldrh r0, [r6, r0]
add r1, sp, #8
bl FUN_0206ADE0
bl TrainerData_ReadTrData
ldr r0, [sp, #4]
add r1, r4, #0
ldrh r0, [r6, r0]
bl FUN_0206ADF0
bl TrainerData_ReadTrPoke
add r0, sp, #8
ldrb r1, [r0]
cmp r1, #3

View File

@@ -1701,7 +1701,7 @@ _021D822A:
mov r1, #1
lsl r0, r0, #0x10
lsr r0, r0, #0x11
bl FUN_0206AC74
bl TrainerData_GetAttr
cmp r0, #0x3f
bne _021D828A
ldr r0, [r4, #0x50]

View File

@@ -17,6 +17,7 @@
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/sinnoh_dex.h"
#include "constants/trainer_classes.h"
#pragma thumb on
@@ -3701,21 +3702,21 @@ int FUN_0206AA30(int x)
{
switch (x)
{
case 63:
case TRAINER_CLASS_PKMN_TRAINER_BARRY:
return 2;
case 90:
case 91:
case 92:
case 93:
case 94:
return x - 87;
case TRAINER_CLASS_PKMN_TRAINER_AROMA_LADY:
case TRAINER_CLASS_PKMN_TRAINER_RICH_BOY:
case TRAINER_CLASS_PKMN_TRAINER_PICNICKER:
case TRAINER_CLASS_PKMN_TRAINER_CAMPER:
case TRAINER_CLASS_PKMN_TRAINER_POKEKID:
return x - TRAINER_CLASS_COMMANDER_JUPITER;
default:
if (FUN_0206AE00(x) == 1)
return 1;
else
return 0;
case 0:
case 1:
case TRAINER_CLASS_PKMN_TRAINER_M:
case TRAINER_CLASS_PKMN_TRAINER_F:
return x;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
{{ doNotModifyHeader }}
#include "global.h"
#include "trainer_data.h"
#include "constants/items.h"
#include "constants/trainer_classes.h"
u32 __size = sizeof(struct TrainerData);
const struct TrainerData __data[] = {
{},
## for trainer in trdata
{
{{ trainer.type }},
{{ trainer.class }},
{{ trainer.unk2 }},
{{ length(trainer.party) }},
{ {% for item in trainer.items %}{{ item }},{% endfor %} },
{{ trainer.unkC }},
{{ trainer.unk10 }}
},
## endfor
};

View File

@@ -1,2 +0,0 @@
*.png
*.pal

Some files were not shown because too many files have changed in this diff Show More