CR feedback

This commit is contained in:
ZappoMan 2013-05-22 14:23:27 -07:00
parent 47c4ff887e
commit c2ebd6fc95
2 changed files with 12 additions and 6 deletions

View file

@ -33,4 +33,10 @@ const PACKET_HEADER PACKET_HEADER_ENVIRONMENT_DATA = 'e';
const PACKET_HEADER PACKET_HEADER_DOMAIN_LIST_REQUEST = 'L';
const PACKET_HEADER PACKET_HEADER_DOMAIN_RFD = 'C';
// These are supported Z-Command
#define ERASE_ALL_COMMAND "erase all"
#define ADD_SCENE_COMMAND "add scene"
#define TEST_COMMAND "a message"
#endif

View file

@ -594,9 +594,9 @@ int main(int argc, const char * argv[]) {
printf("insert voxels - wantColorRandomizer=%s NEW r=%d,g=%d,b=%d \n",
(::wantColorRandomizer?"yes":"no"),red,green,blue);
}
voxelData[voxelCodeSize + 0]=red;
voxelData[voxelCodeSize + 1]=green;
voxelData[voxelCodeSize + 2]=blue;
voxelData[voxelCodeSize + 0] = red;
voxelData[voxelCodeSize + 1] = green;
voxelData[voxelCodeSize + 2] = blue;
if (::shouldShowAnimationDebug) {
float* vertices = firstVertexForCode(voxelData);
@ -628,16 +628,16 @@ int main(int argc, const char * argv[]) {
printf("got Z message len(%ld)= %s\n", receivedBytes, command);
while (totalLength <= receivedBytes) {
if (strcmp(command, (char*)"erase all") == 0) {
if (strcmp(command, ERASE_ALL_COMMAND) == 0) {
printf("got Z message == erase all\n");
eraseVoxelTreeAndCleanupAgentVisitData();
}
if (strcmp(command, (char*)"add scene") == 0) {
if (strcmp(command, ADD_SCENE_COMMAND) == 0) {
printf("got Z message == add scene\n");
addSphereScene(&randomTree);
}
if (strcmp(command, (char*)"a message") == 0) {
if (strcmp(command, TEST_COMMAND) == 0) {
printf("got Z message == a message, nothing to do, just report\n");
}
totalLength += commandLength + 1; // 1 for null termination