Insert Script with Atlas *2 Pointer = Same texttarget*

Started by RedScorpion, February 20, 2016, 09:04:49 AM

Previous topic - Next topic

RedScorpion

Hi guys,

I have some trouble with my script and hope you could help me.

Work on BOF2 script to change some mistakes in the script.


Got this to Parts: Both Pointer has the same target in the rom, but if i insert with Atlas tool he writes the text two times?!

Use Autowrite: Seems this could the problem?

Settings:
#VAR(dialogue, TABLE)
#ADDTBL("BOF2.tbl", dialogue)
#ACTIVETBL(dialogue)

#VAR(Ptr2000, CUSTOMPOINTER)
#CREATEPTR(Ptr2000, "LINEAR", $150000, 16)

#VAR(PtrTbl, POINTERTABLE)
#PTRTBL(PtrTbl, $22FC86, 2, Ptr2000)

#AUTOWRITE(PtrTbl, "<ED>")

#HDR($200)
#JMP($370000)


#W16($22FCD2)
[Ja genau, das ist der Pilz! Jetzt gebe<NL1>
ich euch den Rest der Ausrüstung.<ED>
//POINTER #39 @ $22FCD4 - STRING #39 @ $370CEE

#W16($22FCD4)
[Ja genau, das ist der Pilz! Jetzt gebe<NL1>
ich euch den Rest der Ausrüstung.<ED>
//POINTER #40 @ $22FCD6 - STRING #40 @ $370D2A


Thanks

red

danke

#W16($22FCD2)
#W16($22FCD4)
[Ja genau, das ist der Pilz! Jetzt gebe<NL1>
ich euch den Rest der Ausrüstung.<ED>


That will print it only once.

VicVergil

You don't even need the lines defining Ptr2000 or the pointer table (or the AUTOWRITE, more on that later).

The line #W16($22FCD2) is more than self sufficient: 16-bit pointer (2 bytes), and it has the address where the pointer is stored so that it updates it as you write your differently long new text.
You only need for it a line in the beginning of the script (after VAR, ADDTBL, ACTIVETBL, HDR, JMP) with the pointer's type.
#SMA("LINEAR")
There's LINEAR (general case), GB (GameBoy pointers), and for the SNES there's: HIROM, LOROM00 (slow LoRom) and LOROM80 (fast LoRom). Those types have many weird rules defining them, LINEAR not having any. Since it's Breath of Fire 2, I'd check the ROM type if I were you (use any emulator).

...

By the way, AUTOWRITE itself is a WRITE instruction (using the pointer table) repeated for everything following it, each time there's an <END> instruction (or whatever specified in its parameter) it jumps to the following pointer in the pointer table defined before.
And you still have W16 (which is the same as WRITE but using the address specified).
Meaning you have 2 writes here.

RedScorpion