91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

OPenGL采用LOD等技術對地形進行時適渲染.該程序為一論壇中下載保存,感覺不錯.需要的朋友可參考.

資源截圖

代碼片段和文件信息

/*
???Class?Name:

??????CCommandscript.h.

???Created?by:

??????Allen?Sherrod?(Programming?Ace?of?www.UltimateGameProgramming.com).

???Description:

??????This?class?represents?a?simple?command?scripting?system.
*/


#include“CCommandscript.h“
#include

using?std::ifstream;
using?std::filebuf;
using?std::ios;


CCommandscript::CCommandscript()?:?totalscriptLines(0)?currentLine(0)
???????????????????????????????????currentLineChar(0)?m_script(0)
{
}


CCommandscript::~CCommandscript()
{
???Shutdown();
}


bool?CCommandscript::LoadscriptFile(char?*filename)
{
???ifstream?input?input2;
???char?tempLine[MAX_LINE_SIZE];
???
???input.open(filename);
???if(!input.is_open())?
???return?false;
???
???Shutdown();

???//?Open?and?get?number?of?lines.
???while(!input.eof())
??????{
?????????input.getline(tempLine?MAX_LINE_SIZE?‘\n‘);
?????????totalscriptLines++;
??????}
???
???input.close();
???
???input2.open(filename);
???if(!input2.is_open())?return?false;

???//?Load?in?every?line?of?text.???
???m_script?=?new?char*[totalscriptLines];
???
???for(int?i?=?0;?i?riptLines;?i++)
??????{
?????????m_script[i]?=?new?char[MAX_LINE_SIZE?+?1];
?????????input2.getline(m_script[i]?MAX_LINE_SIZE?‘\n‘);
??????}
???
???input2.close();
???return?true;
}


void?CCommandscript::ParseCommand(char?*destCommand)
{
???//?This?function?will?take?the?first?word?of?the?current
???//?line?and?save?it?in?destCommand.

???int?commandSize?=?0;

???//?If?destcommand?is?NULL?or?if?we?run?out?of?lines?or?at?the?end
???//?of?the?current?line?then?we?return.
???if(!destCommand)?return;
???if(currentLine?>=?totalscriptLines)?return;
???if(currentLineChar?>=?(int)strlen(m_script[currentLine]))
??????{
?????????//?Its?easier?to?just?treat?it?as?a?comment.
?????????destCommand[0]?=?‘#‘;
?????????destCommand[1]?=?‘\0‘;
?????????return;
??????}

???//?Init?string.
???destCommand[0]?=?‘\0‘;
???
???//?Since?commands?start?each?line?we?can?say?that?if?there?is
???//?a?#?at?the?start?of?the?line?then?this?is?a?comment.
???if(IsLineComment())
??????{
?????????destCommand[0]?=?‘#‘;
?????????destCommand[1]?=?‘\0‘;
?????????return;
??????}

???//?Loop?through?every?character?until?you?find?a?space?or?newline.
???//?That?means?we?are?at?the?end?of?a?command.
???while(currentLineChar?ript[currentLine]))
??????{
?????????if(m_script[currentLine][currentLineChar]?==?‘?‘?||
????????????m_script[currentLine][currentLineChar]?==?‘\n‘)
????????????break;

?????????//?Save?the?text?in?the?array.
?????????destCommand[commandSize]?=?m_script[currentLine][currentLineChar];
?????????commandSize++;
?????????currentLineChar++;
??????}

???//?Skip?next?space?or?newline.
???currentLineChar++;
???destCommand[commandSize]?=?‘\0‘;
}


void?CCommandscript::ParseStringParam(char?*destString)
{
???//?This?function?will?take?a?text?inside?“?and?“?and?sa

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????8955??2007-03-06?22:22??地層時適渲染(LOD)\APP.CPP

?????文件???????8663??2007-03-06?22:16??地層時適渲染(LOD)\CAMERA.CPP

?????文件???????1549??2007-03-06?21:57??地層時適渲染(LOD)\CAMERA.H

?????文件???????8807??2007-03-05?18:45??地層時適渲染(LOD)\CCommandscript.cpp

?????文件???????1188??2006-12-12?18:43??地層時適渲染(LOD)\CCommandscript.h

?????文件????????475??2007-03-07?15:03??地層時適渲染(LOD)\CONFIG.INI

?????文件???????4085??2007-03-06?20:07??地層時適渲染(LOD)\CTgaLoader.cpp

?????文件????????853??2007-03-05?19:36??地層時適渲染(LOD)\CTgaLoader.h

?????文件????1050625??2007-02-12?23:10??地層時適渲染(LOD)\DATA\1.RAW

?????文件?????197147??2000-12-11?21:13??地層時適渲染(LOD)\DATA\Colour0.tga

?????文件?????196626??2001-03-04?14:26??地層時適渲染(LOD)\DATA\Colour1.tga

?????文件????3145728??2009-05-22?18:03??地層時適渲染(LOD)\DATA\Colour1024.raw

?????文件?????196626??2001-02-16?23:52??地層時適渲染(LOD)\DATA\Colour2.tga

?????文件?????196626??2001-03-04?15:27??地層時適渲染(LOD)\DATA\Colour3.tga

?????文件?????786971??2000-11-13?15:17??地層時適渲染(LOD)\DATA\DETAIL.TGA

?????文件?????196626??2001-03-05?13:18??地層時適渲染(LOD)\DATA\sky.tga

?????文件????1050625??2009-05-22?17:57??地層時適渲染(LOD)\DATA\vars.raw

?????文件???????4449??2005-11-25?15:01??地層時適渲染(LOD)\Demo.cpp

?????文件??????84672??2005-11-25?14:59??地層時適渲染(LOD)\DEMO.DAT

?????文件???????1698??2005-11-25?14:55??地層時適渲染(LOD)\Demo.h

?????文件????????775??2004-02-25?15:28??地層時適渲染(LOD)\Doc\threadmarks.files\FEATURES.CSS

?????文件???????4858??2004-02-25?15:27??地層時適渲染(LOD)\Doc\threadmarks.files\turner_01.gif

?????文件???????5865??2004-02-25?15:27??地層時適渲染(LOD)\Doc\threadmarks.files\turner_02.gif

?????文件???????5925??2004-02-25?15:27??地層時適渲染(LOD)\Doc\threadmarks.files\turner_03a.gif

?????文件???????7538??2004-02-25?15:27??地層時適渲染(LOD)\Doc\threadmarks.files\turner_03b.gif

?????文件???????9654??2004-02-25?15:27??地層時適渲染(LOD)\Doc\threadmarks.files\turner_03c.gif

?????文件??????13278??2004-02-25?15:28??地層時適渲染(LOD)\Doc\threadmarks.files\turner_04.gif

?????文件???????7498??2004-02-25?15:28??地層時適渲染(LOD)\Doc\threadmarks.files\turner_05a.gif

?????文件??????13438??2004-02-25?15:28??地層時適渲染(LOD)\Doc\threadmarks.files\turner_05b.gif

?????文件??????16779??2004-02-25?15:28??地層時適渲染(LOD)\Doc\threadmarks.files\turner_05c.gif

............此處省略43個文件信息

評論

共有 條評論