Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-05-13 01:27:02

Chamber_
Member
Registered: 2013-12-31
Post 60/119

[GOLD]Load MiniSprites in Day care Routine

Recently I expanded the number of mini sprites to 255 in Pokemon Gold.

Hitmonlee%20GSC%20style2.gif

I have the problem that the day care only load the first 128 minis, for the assignment of the minis on the maps (the first 128 are people, are the other 128 pokemon).

I think the solution to this might be in the GetMonSprite routine:

GetMonSprite: ; 14259
; Return carry if a monster sprite was loaded.

    cp SPRITE_POKEMON
    jr c, .Normal
    cp SPRITE_DAYCARE_MON_1
    jr z, .BreedMon1
    cp SPRITE_DAYCARE_MON_2
    jr z, .BreedMon2
    cp SPRITE_VARS
    jr nc, .Variable
    jr .Icon

.Normal
    and a
    ret

.Icon
    sub SPRITE_POKEMON
    ld e, a
    ld d, 0
    ld hl, SpriteMons
    add hl, de
    ld a, [hl]
    jr .Mon

.BreedMon1
    ld a, [BreedMon1Species]
    jr .Mon

.BreedMon2
    ld a, [BreedMon2Species]

.Mon
    ld e, a
    and a
    jr z, .asm_1429f

    callba Function8e82b

    ld l, 1
    ld h, 0
    scf
    ret

.Variable
    sub SPRITE_VARS
    ld e, a
    ld d, 0
    ld hl, VariableSprites
    add hl, de
    ld a, [hl]
    and a
    jp nz, GetMonSprite

.asm_1429f
    ld a, 1
    ld l, 1
    ld h, 0
    and a
    ret

Could help me to load all minis?

Last edited by Chamber_ (2014-05-13 01:29:34)

Offline

#2 2014-05-13 08:09:34

comet
Member
Registered: 2012-04-09
Post 444/679

Re: [GOLD]Load MiniSprites in Day care Routine

Function8e82b: ; 8e82b
        ld a, e
        call ReadMonMenuIcon
        ld l, a
        ld h, 0
        add hl, hl
        ld de, IconPointers
        add hl, de
        ld a, [hli]
        ld e, a
        ld d, [hl]
        ld b, BANK(Icons)
        ld c, 8
        ret
; 8e83f

Whatever bank selection you used for GetIcon you'll need to use here too.

Offline

#3 2014-05-16 06:12:52

Chamber_
Member
Registered: 2013-12-31
Post 63/119

Re: [GOLD]Load MiniSprites in Day care Routine

@comet: Yes, I updated this routine too (forgot mention it), bunt don't work.

Any other suggestion?

Offline

#4 2014-05-17 11:23:58

RED
Member
From: Japan
Registered: 2012-09-03
Post 495/517

Re: [GOLD]Load MiniSprites in Day care Routine

Try this.
at &H14257 write:
FE FF (CP FFh) FF= maximum minisprite.

Last edited by RED (2014-05-17 11:24:46)


わたし の なまえ わ レン レン  でづ

Offline

Board footer

Powered by FluxBB