Go Back   EQEmulator Home > EQEmulator Forums > Archives > OpenEQ > OpenEQ::Development

OpenEQ::Development Development discussion for OpenEQ. Do not post for support.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 11-26-2004, 04:36 AM
daeken_bb
Discordant
 
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
Default

This is really starting to bug the hell out of me now lol.

It seems that I'm not only doing the scaling properly, but also the rotation seems waaaaay off. I tried converting radians into degrees, but that just made the problem worse heh.

I'm about ready to call sony up and ask for a bit of help on this

Here's the code for the placeable object draw routine, in case this is where the problem is:
Code:
  for(j = 0; j < this->model_data->plac_count; ++j) {
    plac = this->model_data->placeable[j];
    glPushMatrix();
    glLoadIdentity();
    
    glRotatef(270, 1.0, 0.0, 0.0);
    glRotatef(rot[1], 1.0, 0.0, 0.0);
    glRotatef(rot[0], 0.0, 0.0, 1.0);

    glScalef(plac->scale, plac->scale, plac->scale);
    
    glTranslatef(trans[0], trans[1], trans[2]);

    glTranslatef(plac->x, plac->y, plac->z);
    
    glRotatef(plac->rx, 1.0f, 0.0f, 0.0f);
    glRotatef(plac->ry, 0.0f, 1.0f, 0.0f);
    glRotatef(plac->rz, 0.0f, 0.0f, 1.0f);
    
    glCallList(this->model_lists[plac->model]);
    
    glPopMatrix();
  }
And here's the code for the placeable object placement/rotation loader from zon.cpp:
Code:
  for(i = 0; i < hdr->obj_count; ++i) {
    plac = (zon_placeable *) buffer;

    this->model_data.placeable[i] = new Placeable;

    this->model_data.placeable[i]->x = plac->x;
    this->model_data.placeable[i]->y = plac->y;
    this->model_data.placeable[i]->z = plac->z;

    this->model_data.placeable[i]->rx = plac->rx;
    this->model_data.placeable[i]->ry = plac->ry;
    this->model_data.placeable[i]->rz = plac->rz;

    this->model_data.placeable[i]->scale = plac->scale;
    this->model_data.placeable[i]->model = 0;

    zon_tmp = zon_orig + plac->loc;
    while(zon_tmp[strlen((char *) zon_tmp) - 4] != '.')
      zon_tmp += strlen((char *) zon_tmp) + 1;
    for(j = 0; j < this->model_data.model_count; ++j) {
      if(!strcmp(model_names[j], (char *) zon_tmp)) {
        this->model_data.placeable[i]->model = j;
        break;
      }
    }

    buffer += sizeof(zon_placeable);
  }
If you see anything obviously wrong, please let me know hehe.

Happy Hacking,
Lord Daeken M. BlackBlade
(Cody Brocious)
__________________
Keep me unemployed and working on OpenEQ, PM me about donating

Check out my deviantART page at http://daeken.deviantart.com/
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:13 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3