Author Topic: Object library  (Read 149 times)

juangenial452

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Object library
« 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);
jo_delete_object();
jo_delete_all_objects();
Is possible?

ponut64

  • Full Member
  • ***
  • Posts: 182
  • Karma: +13/-0
    • View Profile
Re: Object library
« Reply #1 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]){
slPushMatrix();
jo_3d_translate_matrix(loc[X], loc[Y], loc[Z]);
display_ztp(&entities[entityNumber], false);
slPopMatrix();
}
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.

juangenial452

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Object library
« Reply #2 on: October 19, 2018, 11:31:07 pm »
I don't understand that. It looks very confusing.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 
SMF spam blocked by CleanTalk