Git Product home page Git Product logo

Comments (7)

vulcandth avatar vulcandth commented on September 23, 2024

From a cursory look at the address. I don't believe wd732 to be specific to Cycling Road. It appears to handle setting warp flags for all warps. It just also happens to contain a flag for Debug and Cycling Road Bike Riding.

It looks like the following addresses all contain various flags similar to pokecrystals' engine_flags... just without dedicated functions to process them like pokecrystal:

wd728:: db
wBeatGymFlags:: db
wd72c:: db
wd72d:: db
wd72e:: db
wd730:: db
wd732:: db
wFlags_D733:: db
wBeatLorelei:: db
wd736:: db
wCompletedInGameTradeFlags:: dw <- possibly.

My recommendation would be to rename these to something along the lines of wFlags#; and create constants for each of the bits referenced in their wram comments.

As far as the documentation piece goes, this can be something added when #258 is done. An easy fix for this could be something like (Assuming the end user wants to keep those debug features for the debug rom).

In engine/movie/oak_speech/oak_speech.asm

 SetDefaultNames:
 	ld a, [wLetterPrintingDelayFlags]
 	push af
 	ld a, [wOptions]
 	push af
+IF DEF(_DEBUG)
 	ld a, [wd732]
 	push af
+ENDC
 	ld hl, wPlayerName
... 
 	call FillMemory
+IF DEF(_DEBUG)
 	pop af
 	ld [wd732], a
+ENDC
 	pop af
 	ld [wOptions], a
 	pop af
 	ld [wLetterPrintingDelayFlags], a
....

from pokered.

spixi avatar spixi commented on September 23, 2024

As far as the documentation piece goes, this can be something added when #258 is done. An easy fix for this could be something like (Assuming the end user wants to keep those debug features for the debug rom).

The code which preserves that byte is in fact in the production build and not only in the debug build of the games.

from pokered.

vulcandth avatar vulcandth commented on September 23, 2024

The code which preserves that byte is in fact in the production build and not only in the debug build of the games.

Hence, why my suggested bug fix action (to go in the future bug docs) forces the code to only build if you are building the debug rom.

from pokered.

vulcandth avatar vulcandth commented on September 23, 2024

It looks like the start of the Bug Documentation for this has been created here. This will eventually be included in pokered's future docs/bugs_and_glitches.md (#258). This wram address and the remaining unnamed wram addresses still require proper names, but this would be a seperate issue. I believe we can close this issue for now.

Edit: I guess it's been moved here now...

from pokered.

SatoMew avatar SatoMew commented on September 23, 2024

I added a temporary comment in #410 that documents this:

; Retrieve BIT_DEBUG_MODE set in DebugMenu for StartNewGameDebug.
; BUG: StartNewGame carries over bit 5 from previous save files,
; which causes CheckForceBikeOrSurf to not return.
; To fix this in debug builds, reset bit 5 here or in StartNewGame.
; In non-debug builds, the instructions can be removed.
ld a, [wd732]
push af

The simplest fix is to add res 5, [hl] here:

StartNewGame:
ld hl, wd732
; Ensure debug mode is not used when
; starting a regular new game.
; Debug mode persists in saved games for
; both debug and non-debug builds, and is
; only reset here by the main menu.
res BIT_DEBUG_MODE, [hl]
; fallthrough
StartNewGameDebug:
call OakSpeech
ld c, 20
call DelayFrames

Does this help, @spixi?

from pokered.

spixi avatar spixi commented on September 23, 2024

Well done @SatoMew, but I still think that wd732 needs a proper constant name.

from pokered.

SatoMew avatar SatoMew commented on September 23, 2024

I still think that wd732 needs a proper constant name.

That will be taken care of eventually.

from pokered.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.