Sega Saturn Development > General Jo Engine Help

Text box for RPG

(1/1)

captstu:
I'm rather new to working with Jo Engine, but I've been coding on my own personal projects for some time. Currently I'm attempting to make an RPG (turn based, JRPG inspired) and the first building block I'm on is text boxes. I was able to write some code regarding background draws and centering text, but that seemed silly when the Saturn can manage 4 sided polys.

Here's the dilema, though. I've got some code the centers the text and places it inside the poly's "box". However, as I move down the screen, the text eventually stops being centered and appears higher than the box. I'm sure it's something simple, and likely something I've overlooked, but I'm currently stumped.

TLDR: I can't get jo_3d_quad_tb and jo_printf to line up reliably.

Attached is screenshot and sample code. Feel free to point and laugh, I'm just hoping for a second set of eyes. :) Thanks in advance!

ponut64:
Line 18 and 19:

--- Code: ---
start_y -= 122;
stop_y -= 122;
//I added 10 because I am using a base of 352x240 instead of 320x240, concept will be the same

--- End code ---

become instead:


--- Code: ---
start_y -= 122 + (0.5 * given_y);
stop_y -= 122 + (0.5 * given_y);
//for 320x240, try starting at 112

--- End code ---

Attached is a compiled sample.

captstu:
Excellent, thank you. I'm going to continue to tweak further, but that's what I was missing.

Navigation

[0] Message Index

Sitemap 1 2 3 4 5 6 7 8 9 10 
Go to full version