mirror of
https://github.com/pret/pmd-red.git
synced 2026-10-01 05:18:28 -05:00
add team base constants
This commit is contained in:
@@ -233,4 +233,9 @@ enum {
|
||||
MAP_COUNT,
|
||||
};
|
||||
|
||||
// These are automatically adjusted via GetAdjustedGroundMap.
|
||||
#define MAP_TEAM_BASE MAP_TEAM_BASE_PIKACHU_BASIC
|
||||
#define MAP_TEAM_BASE_INSIDE MAP_TEAM_BASE_INSIDE_PIKACHU_BASIC
|
||||
#define TEAM_BASE_MAPS_PER_SPECIES 6 // 3 on the inside and 3 on the outside (basic, construction, final)
|
||||
|
||||
#endif // GUARD_CONSTANTS_GROUND_MAP_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "ground_script.h"
|
||||
#include "event_flag.h"
|
||||
#include "constants/item.h"
|
||||
#include "constants/ground_map.h"
|
||||
#define LPARRAY(x) (sizeof(x)/sizeof(*(x))), x
|
||||
|
||||
#define CPOS_HALFTILE 0x2
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#define GUARD_GROUND_MAP_H
|
||||
|
||||
void GroundMap_Reset(void);
|
||||
|
||||
void AllocGroundMapAction(void);
|
||||
void FreeGroundMapAction(void);
|
||||
void sub_80A4B38(void);
|
||||
void sub_80A4B54(void);
|
||||
s16 GetAdjustedGroundMap(s32 mapId);
|
||||
|
||||
#endif // GUARD_GROUND_MAP_H
|
||||
|
||||
@@ -184,26 +184,21 @@ bool8 sub_80A4D48(s16 index)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 GetAdjustedGroundMap(s16 param_1)
|
||||
s16 GetAdjustedGroundMap(s32 mapId)
|
||||
{
|
||||
s32 iVar5;
|
||||
s32 retMapId = (s16) mapId;
|
||||
|
||||
iVar5 = param_1;
|
||||
|
||||
switch(iVar5)
|
||||
{
|
||||
case 9:
|
||||
case 0xC:
|
||||
iVar5 = (s16)(iVar5 + ((GetScriptVarValue(NULL, BASE_KIND) * 6) + GetScriptVarValue(NULL, BASE_LEVEL)));
|
||||
switch (retMapId) {
|
||||
case MAP_TEAM_BASE:
|
||||
case MAP_TEAM_BASE_INSIDE:
|
||||
retMapId = (s16)(retMapId + ((GetScriptVarValue(NULL, BASE_KIND) * TEAM_BASE_MAPS_PER_SPECIES) + GetScriptVarValue(NULL, BASE_LEVEL)));
|
||||
break;
|
||||
case 2:
|
||||
case MAP_WHISCASH_POND:
|
||||
if (sub_80023E4(6)) {
|
||||
iVar5 = 3;
|
||||
retMapId = MAP_WHISCASH_POND_OPEN;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return iVar5;
|
||||
return retMapId;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@ void sub_809D1E4(s32, s32, s32);
|
||||
void sub_809D208(s32, PixelPos*, s32);
|
||||
void sub_809D220(s32, s32, s32);
|
||||
void GroundScriptLockJumpZero(s16);
|
||||
s16 GetAdjustedGroundMap(s32);
|
||||
void sub_80A87AC(s32, s32);
|
||||
void sub_80A8BD8(s16, s32*);
|
||||
u32 sub_80A8C2C();
|
||||
|
||||
Reference in New Issue
Block a user