Mercurial > LightClone
comparison LightClone/Source/Bot.cpp @ 42:91e927584f92
Code cleanup
author | koryspansel |
---|---|
date | Thu, 22 Sep 2011 10:38:54 -0700 |
parents | 2caa7c7e2cb5 |
children | 95677f648a2c |
comparison
equal
deleted
inserted
replaced
41:a986355cca5f | 42:91e927584f92 |
---|---|
382 kContext.DrawTriangles(Vertex::Block::Declaration, pVertexBuffer, sizeof(Vertex::Block), FacesPerCube * TrianglesPerFace); | 382 kContext.DrawTriangles(Vertex::Block::Declaration, pVertexBuffer, sizeof(Vertex::Block), FacesPerCube * TrianglesPerFace); |
383 | 383 |
384 pEffect->EndPass(); | 384 pEffect->EndPass(); |
385 pEffect->End(); | 385 pEffect->End(); |
386 } | 386 } |
387 | |
388 /* | |
389 * Compile | |
390 */ | |
391 /* | |
392 ErrorCode Bot::Compile(Code* pInstance, uint8* pData, uint32 nSize) | |
393 { | |
394 const uint32 nLength = pInstance->GetLength(); | |
395 | |
396 for(uint32 i = 0; i < nLength; ++i) | |
397 { | |
398 const uint32 nAction = pInstance->GetSlot(i); | |
399 | |
400 if(Action_Forward <= nAction && nAction <= Action_Light) | |
401 { | |
402 if(nSize < 2) | |
403 return Error_Fail; | |
404 | |
405 *pData++ = Instruction_Action; | |
406 *pData++ = nAction; | |
407 | |
408 nSize -= 2; | |
409 } | |
410 else | |
411 | |
412 if(Action_FunctionA <= nAction && nAction <= Action_FunctionB) | |
413 { | |
414 if(nSize < 2) | |
415 return Error_Fail; | |
416 | |
417 *pData++ = Instruction_Call; | |
418 *pData++ = nAction - Action_FunctionA + 1; | |
419 | |
420 nSize -= 2; | |
421 } | |
422 } | |
423 | |
424 return Error_Success; | |
425 } | |
426 */ | |
427 | 387 |
428 /* | 388 /* |
429 * SetupVertexBuffer | 389 * SetupVertexBuffer |
430 */ | 390 */ |
431 ErrorCode Bot::SetupVertexBuffer() | 391 ErrorCode Bot::SetupVertexBuffer() |