Comments (3)
While it is true that it would be better to have a more descriptive name than wd74b, only bit 5 of that byte determines if the player has the Pokedex. This address is more generally a game progress flag, meaning each bit is a flag for a different game event.
In order to clean this up, I am considering changing wram.asm to something like:
wFlags_d74b:: ds 1
[...]
POKEDEX_OWNED EQU 5
This way, code can check if the player has the Pokedex by using:
ld a, [wFlags_d74b]
bit POKEDEX_OWNED, a
from pokered.
this flag looks like it was enumerated along with a host of others. for example
constants/event_flags.asm
check_flag: macro
ld a, [wEventFlags + flag_\1 / 8]
bit flag_\1 % 8, a
endm
flag: macro
enum flag_\1
endm
__enum__ = 0
flag 0
flag 1
flag 2
...
flag pokedex
...
NUM_EVENT_FLAGS equ __enum__
wram.asm
wEventFlags:
flag_array NUM_EVENT_FLAGS
then
check_flag pokedex
from pokered.
Handled by #107
from pokered.
Related Issues (20)
- Use tool to publish documentation of functions such as doctest. HOT 5
- Copy pokecrystal's handling of unused types
- Copy pokecrystal's `map_const` macro
- Comment about UndergroundPathNorthSouth's dimensions
- Distinguish "meta" constants from event constants
- Add constants and table macros for the map sprite sets
- How to open 2bpp file HOT 1
- Fadas to be added HOT 1
- `TrainerDataPointers` is missing `table_width/assert_table_length` macros
- Comment the wave pattern 5 data that happens to be read from SFX HOT 4
- Inaccurate comment in `UpdateNPCSprite`
- Split `hSpriteIndexOrTextID`
- Incorrect reference
- Stadium Checksum HOT 1
- Review and revise some maps' script and text labels
- Rename `wEvosMoves` and get rid of `MAX_EVOLUTIONS` and `EVOLUTION_SIZE`
- Have palfix.py always output grayscale
- is there a way to make a romhack as a save file like https://www.youtube.com/watch?v=VxzqtNMjEPQ ? HOT 1
- ``engine/events/starter_dex.asm`` contains an error in its comment HOT 1
- UndergroundPathNorthSouth.blk doesn't work with PolishedMap HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokered.