Cave Story Tribute Site Forums

Noxid
Noxid
a dword is four bytes long
Noxid
Noxid
anyway for that function I'm pretty sure you have to push a pointer to an ASCII string and it reads the first four bytes from it, so no null terminator is needed
BLink
BLink
ah, that's what's wrong, I'm trying to store an entire address in a Dword's space:

MOV ECX,DWORD PTR DS:[4A5AD8]
ADD ECX,DWORD PTR DS:[4A5AE0]
CMP DWORD PTR DS:[ECX],5445533C ;TES< because reverse endianness
JNE next_TSC_command


MOV EAX,DWORD PTR DS:[4A5AE0]
ADD EAX,4
PUSH EAX
CALL 00421900
ADD ESP,4
mov edx eax
push edx

MOV EAX,DWORD PTR DS:[4A5AE0]
ADD EAX, D ; 13
PUSH EAX
CALL 00421900
ADD ESP,4
pop edx
mov [edx], al
:end
ADD [4A5AE0],F ;Fix the script position <SETXXXXXXXX:YY = F
JMP 004252A7 ;Jump back to the beginning of the TSC parser

It works just fine when I use a non variable address,

<SET0049E1C4:FF this is what the TSC looks like

I wnated to try what RuneLacer posted waaay back http://www.cavestory.org/forums/threads/the-dangers-of-flags.245/#post-6807
BLink
BLink
Basically I just need to know how to convert 0049E1C4 in ASCII to 0049E1C4 in hex.
Noxid
Noxid
like I said, the function only ever reads four bytes at a time. And it interprets them as ascii-encoded decimal, so you can't just chunk hex in and expect it to work

you'd be better off just decoding it by hand
BLink
BLink
ok, but how do I type 00 in ASCII, a blank space wont work cause that's like 20 or something, but yeah it should wok like that.
Noxid
Noxid
BLink
BLink
Ok, I got it to work, but now Boostrer's lab doesn't like certain characters and replaces them with square boxes that look like this when posted on the forums: �
andwhyisit
andwhyisit
00 is a control character. You can't type it.
Noxid
Noxid
you have to subtract from the hex value of the digit.. like '1' is 0x31 so subtract 0x30 and you get the right answer.
BLink
BLink
Well notepad++ let's me type it, and I just now fixed my equation; but BL still doesn't like the characters, it's like I would just have to go and do it straight to the tsc file to get any results... and I have no idea how to decode that...
Noxid
Noxid
blink cmon this is like, first year CS stuff. Just google "C string to int" for some examples or something
BLink
BLink
I looked and looked But I can't read C.. like at all... What's a string? or an integer? I googled, but it's not helping that much.

Are you trying to get me to look up how to convert characters into numbers and build a function into the game on how to do that?

Did I just miss a day of ASM class or something? 'Cause it looks like you need an intimate understanding on how coding works and knowledge on multiple languages to do the stuff you're asking, please remember I'm completely self taught and haven't really gotten a grasp of what you've said to me so far aside from the subtracting and not throwing raw hex into functions not build to handle it.

Maybe I need to go back to the boosters lab kittie sandbox and just play with everyone else instead of trying to toy with bigger things that I clearly have no understanding about. It just looks like I wandering through a for without a clue on what to do other then ask 'dumb' questions that make myself look like an ass in front of you and GiR and make you annoyed/facepalm.
Top