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

BuildEggMoveset Use local Space #6193

Open
ExMingYan opened this issue Feb 6, 2025 · 0 comments
Open

BuildEggMoveset Use local Space #6193

ExMingYan opened this issue Feb 6, 2025 · 0 comments
Labels
feature-request Requests a new feature

Comments

@ExMingYan
Copy link

Description

daycare.c's head add line

#include "malloc.h"

Change daycare.c's line 41-45 to

EWRAM_DATA static u16 *sHatchedEggLevelUpMoves = NULL;
EWRAM_DATA static u16 *sHatchedEggFatherMoves = NULL;
EWRAM_DATA static u16 *sHatchedEggFinalMoves = NULL;
EWRAM_DATA static u16 *sHatchedEggEggMoves = NULL;
EWRAM_DATA static u16 *sHatchedEggMotherMoves = NULL;

Add to BuildEggMoveset's head

sHatchedEggLevelUpMoves = (u16*)AllocZeroed(sizeof(u16) * EGG_LVL_UP_MOVES_ARRAY_COUNT);
sHatchedEggEggMoves = (u16*)AllocZeroed(sizeof(u16) * EGG_MOVES_ARRAY_COUNT);
sHatchedEggFatherMoves = (u16*)AllocZeroed(sizeof(u16) * MAX_MON_MOVES);
sHatchedEggMotherMoves = (u16*)AllocZeroed(sizeof(u16) * MAX_MON_MOVES);
sHatchedEggFinalMoves = (u16*)AllocZeroed(sizeof(u16) * MAX_MON_MOVES);

Add to BuildEggMoveset's end

Free(sHatchedEggLevelUpMoves);
Free(sHatchedEggEggMoves);
Free(sHatchedEggFatherMoves);
Free(sHatchedEggMotherMoves);
Free(sHatchedEggFinalMoves);
sHatchedEggLevelUpMoves = NULL;
sHatchedEggEggMoves = NULL;
sHatchedEggFatherMoves = NULL;
sHatchedEggMotherMoves = NULL;
sHatchedEggFinalMoves = NULL;

Discord contact info

No response

@ExMingYan ExMingYan added the feature-request Requests a new feature label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Requests a new feature
Projects
None yet
Development

No branches or pull requests

1 participant