Jo Engine Forum

Sega Saturn Development => Jo Engine Wish List => Topic started by: juangenial452 on October 19, 2018, 05:03:33 pm

Title: Object library
Post by: juangenial452 on October 19, 2018, 05:03:33 pm
Something like:
Code: [Select]
jo_object Obj01;
jo_create_object(ring.h, Obj01);
jo_add_object(Obj01, x, y);
Is possible?
Title: Re: Object library
Post by: ponut64 on October 19, 2018, 09:32:28 pm
Those are abstractions of creating sprites, defining a location, and so forth yes?

If so, you can create those yourself.

Here's an example of how that looks in 3D:

Code: [Select]
void	stuff2(Uint8 entity_number, Sint16 loc[XYZ]){
jo_3d_translate_matrix(loc[X], loc[Y], loc[Z]);
display_ztp(&entities[entityNumber], false);
To remove that, you set up a condition wherein it is included or not included in the runtime.

Of course you want things structured a little differently, but know this:
Much of your object data is the textures and model data itself, which is already contained and can be referenced and edited.
There are also jo_sprite and jo_vector data handlers that you can integrate into your ideal concept of "jo_object".

What I read below like "jo_create_object" and "jo_delete_object" are structured as if console commands to be used in runtime and run only once.
The "run only once part" complicates the structure of your code as what you are presently working with in jo engine is a giant loop.

You might also be confused by how to organize your matrix, but I'm sure you can figure that one out with trial and error.
Title: Re: Object library
Post by: juangenial452 on October 19, 2018, 11:31:07 pm
I don't understand that. It looks very confusing.