First of all, did you change the code so that the new size is taken into account when jumping to the desired technique? Originally every technique has size 8, so after loading the TechniqueData, it gets the index of the technique and multiplies this index by 8 (shift left by 3). So the code looks like this:
- Code: Select all
lea (TechniqueData).l, a3
move.b (technique_index).w, d0
andi.w #$3F, d0
lsl.w #3, d0
adda.w d0, a3
Now your size has become 10, so obviously you need to change that part of code a bit. You can change the lsl.w #3 instruction into
- Code: Select all
mulu.w #$A, d0 <-- multiply d0 by 10 (unsigned multiplication)
However a single multiplication instruction takes many clock cycles to execute; to make it faster you can store the original index in another register, multiply that by 2, multiply the original index by 8 (shift by 3) and then sum the results of both registers to get a multiplication of 10. So it should be like this:
- Code: Select all
lea (TechniqueData).l, a3
move.b (technique_index).w, d0
andi.w #$3F, d0
move.w d0, d1 ; move original index
add.w d1, d1 ; multiply this by 2
lsl.w #3, d0 ; multiply original index by 8
add.w d1, d0 ; add the results of both register (multiply by 10)
adda.w d0, a3
This technique uses more instructions and requires another register which must be unused in the current part of code, otherwise you'll break the functionality. If you don't feel comfortable doing this, just use the mulu instruction... The game won't lag anyway, since the code doesn't do many calculations in one frame (at least relatively).
The other thing you need to do is expand the windows and make sure that the code writes all 7 characters. The pointers and art data for the windows are right below the TechniqueData; I typed some notes so explain what that data represents. There's data like coordinates, the pointer to art data, and the length of the rows and columns of each window. We can see one easy example: the USE/GIV/TOS window. Go to the label WindowArt_ItemDecideAction; you can see by the border macro that the length of a row must be 5, so it fills the top border ($B9) and the bottom border ($B9). The cursorbox macro already prints $B4 and $B5 so you need to print the remaining 3 characters. The other empty rows must have 5 spaces. So if we change the strings to read USE/GIVE/TOSS, we need to make the length 6. So change the 5 to 6 and make sure every other row is 6 bytes long. However you need to define this length, so in the WindowArtLayoutPtrs go to the definition of the WindowArt_ItemDecideAction window. Under the dc.l you will see the first byte which has value $06: that defines the number of bytes to draw in a single row. It's 1 byte longer than the content can hold because it's most likely taking the left border into account. Anyway change that $06 to $07 and now your window will allow 6 characters inside your window. Try it out.
You will need to do the same for every window that holds the technique names. The technique art data is defined in the section I labelled DynamicWindowsStart. I called them "dynamic" because the content changes according to the values stored in RAM. So when changing the dynamic windows, you need to change code instructions as well.
Go to the WindowsIndexTable label: this holds every routine that processes every window that you open. I also put the index for every window so that it's easier to refer to the desired window when looking at the code, and the indices are the same as those of the WindowArtLayoutPtrs so you can map them easily. To see which window deals with technique strings, just search for the word technique in the range of the start of the WindowsIndexTable and the end of this table. When you see technique_data or TechniqueData, you'll know that these windows deal with techniques. Try looking for them yourself first, if you have trouble I can help you locate them, but not in this post as I realized it's very long and typed lots of info. You might have gotten a little confused so I'll just stop here for now =)