Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8203 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer


Ignore:
Timestamp:
Jun 7, 2006, 4:42:44 PM (19 years ago)
Author:
patrick
Message:

bsp: some mods

Location:
branches/bsp_model/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/bsp_file.cc

    r8201 r8203  
    392392  ::std::string absFileName;
    393393   char* baseName = "/worlds/bsp";
    394  
     394
    395395  char fileName [500];
    396396  char ext [500];
     
    406406    if(strlen(fileName) == 0)
    407407    {
    408      
     408
    409409     //         Default Material
    410410    this->Materials[i].mat = new Material();
     
    428428    strcpy(ext, ".mov");
    429429    strncat (fileName, ext, strlen(fileName) );
    430    
     430
    431431    PRINTF(0)("BSP FILE: Name %s . \n", fileName);
    432432
     
    631631  sc =  ((unsigned char *)(&lightMapTexture))[i];
    632632  sc *= 1/255.0;
    633   scale = 1.0;
     633
     634  scale = 1.8; // Adjust brightness here
     635
    634636  if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp;
    635637  scale*=255.0;
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc

    r8195 r8203  
    11/*
    22   orxonox - the future of 3D-vertical-scrollers
    3  
     3
    44   Copyright (C) 2006 orx
    5  
     5
    66   This program is free software; you can redistribute it and/or modify
    77   it under the terms of the GNU General Public License as published by
    88   the Free Software Foundation; either version 2, or (at your option)
    99   any later version.
    10  
     10
    1111   ### File Specific:
    1212   main-programmer: bottac@ee.ethz.ch
    13  
     13
    1414   Inspired by:
    1515   Rendering Q3 Maps by Morgan McGuire                  http://graphics.cs.brown.edu/games/quake/quake3.html
    1616   Unofficial Quake 3 Map Specs by Kekoa Proudfoot      http://graphics.stanford.edu/~kekoa/q3/
    17  
     17
    1818   Collision detection adapted from:
    1919   Quake 3 Collision Detection by Nathan Ostgard        http://www.devmaster.net/articles/quake3collision/
     
    6767BspManager::BspManager(const TiXmlElement* root)
    6868{
    69  
    70  
     69
     70
    7171  if( root != NULL)
    7272    this->loadParams(root);
    73  
     73
    7474  CDEngine::getInstance()->setBSPModel(this);
    7575} */
     
    9999  this->root  = this->bspFile->get_root();
    100100  this->alreadyVisible = new bool [this->bspFile->numFaces];
    101  
     101
    102102  CDEngine::getInstance()->setBSPModel(this);
    103103}
     
    106106const void BspManager::tick(float time)
    107107{
    108  
     108
    109109}
    110110const void BspManager::draw()
     
    126126  this->drawDebugCube(&this->out1);
    127127  this->drawDebugCube(&this->out2);
    128  
     128
    129129  */
    130  
     130
    131131
    132132  // Draw Debug Terrain
     
    165165
    166166
    167  
     167
    168168 // this->checkCollision(this->root, &this->cam);   //!< Test Collision Detection
    169  
    170  
     169
     170
    171171  this->outputStartsOut = true;
    172172  this->outputAllSolid = false;
    173173  this->outputFraction = 1.0f;
    174174  this->checkCollision(State::getPlayer()->getPlayable());
    175  
     175
    176176
    177177  if ( viscluster < 0  || ((int *)(this->bspFile->header))[35] == 0 )  //!< if (sizeof(Visdata) == 0)
     
    188188
    189189      /** Do Frustum culling and draw 'em all **/
    190      
     190
    191191      Vector dir = State::getCameraNode()->getAbsDirX();
    192192
     
    829829void BspManager::checkCollisionBox(void)
    830830{
    831  
     831
    832832};
    833833
     
    873873  dest.z  += forwardDir.z;
    874874  Vector out = dest;
     875
     876
     877
     878
     879
     880
     881
     882
     883
    875884  if(!worldEntity->isA(CL_PLAYABLE)) {
    876885
     
    879888  }
    880889  else {
     890
    881891    bool collision = false;
    882892    Vector position1 = position + Vector(0.0,0.1,0.0);
     
    928938
    929939    // Return the normal here: Normal's stored in this->collPlane;
    930    
     940
    931941    if(collision) worldEntity->collidesWithGround(out,out1,out2);
     942//     registerCollision(WorldEntity* entity, Vector(this->collPlane.x, ), Vector position);
    932943
    933944  }
Note: See TracChangeset for help on using the changeset viewer.