Posts: 48
Threads: 10
Joined: May 2015
Reputation:
2
Hehe, yeah that's a cool effect. Math is fun (and hard).
Posts: 48
Threads: 10
Joined: May 2015
Reputation:
2
There's plenty of room for optimization. At the moment, it's still requesting map data from the server, which rips and assembles it. It would be nice to store the formatted data in a database, but I'm guessing I'd probably be crossing several legal lines there, which I probably already am. So what I'll probably do is leave it up to people to upload there own copy of the ROM and just store everything in the browser which should speed things up considerably and make everything nice and legal (of course it'll also mean a rewrite of a few hundred lines of code, but oh well). Since the ROM is so small I can store it in local storage on the user's computer too, so you wouldn't have to upload it every time.
Really it seems like that's something I'll have to do anyway since things like the event code and text jump around so much, it'd be way to much to be making requests to the server every time you open a dialog.
Speaking of the event code, does anyone know how the conditionals work? Also what does command 3D - create object xx mean?
Posts: 48
Threads: 10
Joined: May 2015
Reputation:
2
Thanks actually helps a lot, but I guess I'm still a bit confused on what I'm testing with a conditional.
So if I had something like "CO XX XX YY YY YY" I'd be grabbing the byte (I'm guessing from the RAM or SRAM) at location XX XX (is that added to 1E80?) and just checking if 0x8000 is set? That seems like a waste of bits, so I'm guessing there's more to it? Is the location broken up into xxxyyyyy yyyyyyyy or something in order to specify which bit you're checking?
Posts: 3,975
Threads: 278
Joined: Oct 2011
Reputation:
65
I guess I wasn't 100% clean in my explanation. Here's an existing example:
C1 90 80 8E 00 8B D6 01
If ($1E80($090) [$1E92, bit 0] is set) or ($1E80($08E) [$1E91, bit 6] is clear), branch to $CBD68B.
Yes, the parameter event bits are calculated from $1E80.
Posts: 48
Threads: 10
Joined: May 2015
Reputation:
2
Ahh... so it's the number of BITS past 1E80, not a byte pointer. That makes sense, thanks.