You are not logged in.
Today I'm trying something interesting. I've created a dungeon that I want Flash to be required in, like Rock Tunnel. After searching through the disassembly I've figured out that when wMapPalOffset is 6 the map is dark, like in Rock Tunnel, I then found in home/overworld, WarpFound2, with this:
ld [wCurMap], a cp ROCK_TUNNEL_1F jr nz, .notRockTunnel ld a, $06 ld [wMapPalOffset], a call GBFadeOutToBlack .notRockTunnel call PlayMapChangeSound jr .done
This seems pretty obvious, it checks the current map for Rock Tunnel, if it is, give wMapPalOffset 6 so the map is dark, if its not, just end. So I change it to:
ld [wCurMap], a cp NEW_CAVE jr z, .needFlash cp ROCK_TUNNEL_1F jr nz, .notRockTunnel .needFlash ld a, $06 ld [wMapPalOffset], a call GBFadeOutToBlack .notRockTunnel call PlayMapChangeSound jr .done
Unless I'm wildly wrong, what this new code should do is check if its the new flash map, if it is jump and do the flash stuff, otherwise just continue on. Thing is, it works but when leaving the cave, the overworld is now dark as well, and the only way to reset it is to enter and exit a building. I'm thinking I'm missing a check somewhere but this is the only instance of Rock Tunnel, $06, and wMapPalOffset all in the same place. The other thought I had was maybe it has something to do with the way the maps are listed in constants, but Rock Tunnel's two floors aren't next to each other in the list, so I'm rather stumped.
I suppose you created the .blk file on /maps, the map constant on constants/map_constants.asm, the .asm file on data/mapheaders and the .asm file on /data/mapobjects, but i think you marked the actual map constants in the map objects .asm file instead of marking the $ff's
Try something like this:
db $(number of warps in hex)
db $(y coordinate in hex), $(x coordinate in hex), $(warp id of the destination map in hex), $ff
db $... other warps
EVENT_DISP NEW_CAVE_WIDTH(you should have included this on the /data/mapheaders .asm file), $(y coordinate in hex), $(x coordinate in hex)
Be sure to reference the actual map constant instead of $ff on warps that lead to another floors of the cave, if you made any.
Hope this helps
Ok that makes sense. I fixed up the warps in my data/mapObjects file and it works now. Originally had them pointing directly to the previous map they were from, but after changing it what was suggested Flash is only needed where I want it to be needed. Thanks!