zladx / LADX-Disassembly

Disassembly of Legend of Zelda: Links Awakening DX
832 stars 80 forks source link

Use `DEF` for defining constants #557

Closed Rangi42 closed 9 months ago

Rangi42 commented 10 months ago

RGBDS 0.5.0 introduced DEF syntax for defining constants, which improves on the old x EQU y syntax by being indentable (and in 0.7.0 the old syntax is deprecated).

RGBDS 0.5.0 also introduced FOR loops, which save a few lines over manually DEFining and incrementing a variable inside a REPT. There are three instances of those in LADX.

I tried to stick with each file's local conventions of capitalization and indentation.

Rangi42 commented 10 months ago

Maybe we should standardize capitalization across the project...

Maybe so, I didn't want to decide a convention for you.

Rangi42 commented 10 months ago

(Just rebased to fix a merge conflict in src/constants/sfx.asm.)

kemenaran commented 10 months ago

About the capitalization, I would put every assembler commands in uppercase – except I'm not sure we'd want DS and DB.

But it's probably better to have either def or DEF everywhere. @daid @tobiasvl any thoughts on this?

daid commented 10 months ago

I like them as CAPS as well. As for db and dw I see those more as asm instructions then commands, so I keep those lower case as well. But that's just my personal preference.

Rangi42 commented 9 months ago

Okay! It's standardized on capital DEF.

tobiasvl commented 9 months ago

Sounds good!