CROSSCUT_NLS_DATA int main (int argc, char *argv[]) { int memkind, handle; char loop1, loop2; struct dfree free; char buf[BUFFERSIZE]; char cmpbuf[BUFFERSIZE]; unsigned long sector, total, disksize, allocated, beginsector, endsector; unsigned long FilledDiskSize, FilledTotal, FileSize = 0; int Arg1IsFile, Arg2IsFile; int UseImageFile, ImageModus, Overwrite; int i, enable; int audible, verify, fallthrough, askdisk, asktdisk; char sdrive, tdrive; int HardDiskOk; int informative, copyfast; char switchchar; int tocopysectors; unsigned tobuffer; #ifndef ALL_RECOVERY_MODE int recoverymode; #endif int bytespersector; int CopyingToSameDisk = FALSE; int action, success; struct LFNAttribute attr; struct IniParserStruct *ParsedData; struct TwoDriveCopyData tdrvdata; attr.output = TRUE; memkind = UNALLOCATED; UseImageFile = FALSE; SetExePath (argv[0]); /* Remember executable's path. */ CriticalHandlerOn (); /* Install critical handler. */ InitLFNAPI (); /* Initialise LFN API. */ CROSSCUT_NLS_OPEN switchchar = SwitchChar (); /* Check arguments */ if ((argc == 2) && ((argv[1][0] == '/') || (argv[1][0] == switchchar)) && (argv[1][1] == '?') && (argv[1][2] == '\0')) { ShowHelp (switchchar); return COPYSUCCESS; } if (argc > 2) { Arg1IsFile = IsFile (argv[1]); Arg2IsFile = IsFile (argv[2]); } #ifdef DEF_HELP if (argc < 3) { /* The way we do it. */ ShowHelp (switchchar); return INITERROR; } else if ((!HasFloppyForm (argv[1]) && !Arg1IsFile) || (!HasFloppyForm (argv[2]) && !Arg2IsFile)) #else if ((argc < 3) || (!HasFloppyForm (argv[1]) && !Arg1IsFile) || (!HasFloppyForm (argv[2]) && !Arg2IsFile)) #endif { /* The way (DR and MS) DOS does it. */ NLS_PUTSTRING (1, 0, "Invalid drive specification or non removable media."); return INITERROR; } if (ParseIniFile (NULL) < 0) /* Parse .ini file. */ { NLS_PUTSTRING (1, 1, "Error reading configuration file."); return INITERROR; } ParsedData = GetParsedData (); audible = ParsedData->audible; verify = ParsedData->verify; HardDiskOk = ParsedData->UseSWAP; informative = ParsedData->informative; Overwrite = ParsedData->overwrite; fallthrough = ParsedData->autoexit; askdisk = ParsedData->askdisk; asktdisk = ParsedData->asktdisk; copyfast = (ParsedData->speed == FAST); #ifndef ALL_RECOVERY_MODE recoverymode = ParsedData->mode; #endif /* Check arguments. */ for (i = 3; i < argc; i++) { if (strlen (argv[i]) > 3) { NLS_PRINTSTRING (1, 2, "Invalid switch:"); printf (" %s\n", argv[i]); return INITERROR; } enable = TRUE; if (strlen (argv[i]) == 3) { if (argv[i][2] == '-') { enable = FALSE; } else { NLS_PRINTSTRING (1, 2, "Invalid switch"); printf (" %s\n", argv[i]); return INITERROR; } } if ((argv[i][0] == switchchar) || (argv[i][0] == '/')) switch (argv[i][1]) { case 'a': /* DOS is case insensitive. */ case 'A': audible = enable; break; case 'v': case 'V': verify = enable; break; case 'm': case 'M': HardDiskOk = !enable; break; case 'i': case 'I': informative = enable; break; case 'o': case 'O': Overwrite = enable; break; case 'x': case 'X': fallthrough = enable; break; case 'd': case 'D': askdisk = !enable; break; case 'f': case 'F': copyfast = enable; break; #ifndef ALL_RECOVERY_MODE case 'r': case 'R': recoverymode = enable; break; #else case 'r': case 'R': #endif case 't': case 'T': asktdisk = !enable; break; case '1': NLS_PRINTSTRING (2, 0, "Warning: option"); printf (" %s ", argv[i]); NLS_PUTSTRING (2, 1, "doesn't do anything!"); break; default: NLS_PRINTSTRING (1, 2, "Invalid switch"); printf (" %s\n", argv[i]); return INITERROR; } else { NLS_PRINTSTRING (1, 3, "Too many parameters:"); printf (" %s\n", argv[i]); return INITERROR; } } if (Arg1IsFile && Arg2IsFile) { ConvertToSFN (argv[1], INFILE_ID); ConvertToSFN (argv[2], OUTFILE_ID); SetLFNAttribute (&attr, OUTFILE_ID); if ((access (GetSFN (OUTFILE_ID), EXISTS) == 0) && Overwrite && (remove (GetSFN (OUTFILE_ID)) == -1)) { NLS_PUTSTRING (1, 4, "File is write protected!"); return INITERROR; } if (CopyFile (GetSFN (INFILE_ID), GetSFN (OUTFILE_ID))) { printf ("%s ", argv[1]); NLS_PRINTSTRING (1, 5, "copied to"); printf (" %s", argv[2]); if (audible) Beep (); SynchronizeLFNs (); return COPYSUCCESS; } else { NLS_PRINTSTRING (3, 0, "Problem copying"); printf (" %s ", argv[1]); NLS_PRINTSTRING (3, 1, "to"); printf (" %s.\n", argv[2]); return CRITICAL; } } else if (Arg1IsFile) { ConvertToSFN (argv[1], INFILE_ID); if (access (GetSFN (INFILE_ID), READPERMISSION) != 0) { NLS_PRINTSTRING (1, 6, "File not found:"); printf (" %s\n", argv[1]); return INITERROR; } CopyingToSameDisk = IsCopyToSameDisk (argv[1], argv[2]); UseImageFile = TRUE; ImageModus = READIMAGE; } else if (Arg2IsFile) { CopyingToSameDisk = IsCopyToSameDisk (argv[2], argv[1]); ConvertToSFN (argv[2], OUTFILE_ID); SetLFNAttribute (&attr, OUTFILE_ID); if (!CopyingToSameDisk) { if (access (GetSFN (OUTFILE_ID), EXISTS) == 0) { if (Overwrite) { if (remove (GetSFN (OUTFILE_ID)) != 0) { NLS_PRINTSTRING (1, 4, "File is write protected!"); return INITERROR; } } else { NLS_PRINTSTRING (1, 7, "File already exists!"); return INITERROR; } } } if (CopyingToSameDisk) copyfast = TRUE; UseImageFile = TRUE; ImageModus = WRITEIMAGE; } sdrive = (char) toupper (argv[1][0]) - 65; tdrive = (char) toupper (argv[2][0]) - 65; loop1 = CatYES; /* initialize loop1 */ loop2 = CatYES; /* initialize loop2 */ ctrlbrk (OnCBreak); SavedCBreak = getcbrk (); setcbrk (1); /* set control-break to ON */ atexit (OnExit); /* make sure that all allocated memory is released when program stops. */ if ((sdrive != tdrive) && (!UseImageFile) && BiosReportsTwoDrives ()) { tdrvdata.sourcedrv = sdrive; tdrvdata.destdrv = tdrive; tdrvdata.cpybuf = buf; tdrvdata.cmpbuf = cmpbuf; tdrvdata.bufsize = BUFFERSIZE; tdrvdata.bel = audible; tdrvdata.fallthrough = fallthrough; tdrvdata.askdisk = askdisk; tdrvdata.copyfast = copyfast; tdrvdata.verify = verify; #ifndef ALL_RECOVERY_MODE tdrvdata.recoverymode = recoverymode; #endif #ifdef UPDATE_SERIALNUM tdrvdata.updateserial = ParsedData->serialnumber; #endif TwoDriveCopy (&tdrvdata); return COPYSUCCESS; } endsector = 0; while (!NLS_TEST_NO (loop1)) /* loop1 */ { if (!UseImageFile || (ImageModus == WRITEIMAGE)) { if (askdisk) { puts (""); NLS_PRINTSTRING (1, 8, "Insert SOURCE diskette into drive"); printf (" %s\n\n", argv[1]); NLS_PRINTSTRING (1, 9, "Press any key to continue . . ."); WaitForInput (); puts (""); } else askdisk = TRUE; /* Always ask after the first run. */ } if (endsector == 0) { if (!UseImageFile || (ImageModus == WRITEIMAGE)) { if (!DiskReadBootInfo (sdrive, &free) || (DetermineFATType() != FAT12)) { puts (""); NLS_PUTSTRING (1, 10, "Disk not ready!"); return CRITICAL; } } else { /* Remember file size */ handle = open (GetSFN (INFILE_ID), O_RDONLY | O_BINARY); if (handle < 0) { puts (""); NLS_PUTSTRING (1, 11, "Unable to open image file."); return INITERROR; } FileSize = filelength (handle); close (handle); if (!FileReadBootInfo (GetSFN (INFILE_ID), &free)) { puts (""); NLS_PUTSTRING (1, 11, "Unable to open image file."); return INITERROR; } } total = free.df_total * free.df_sclus; bytespersector = free.df_bsec; disksize = total * bytespersector; if (disksize == 0) { puts (""); NLS_PUTSTRING (1, 0, "Invalid drive specification or non removable media."); return INITERROR; } /* Initialize fast copy: - After checking if disk in drive is ok, BUT - before initializing memory */ /* In case of writing an image file to disk. We'd like the program to succeed regardless of wether we used the /f switch or corresponding .ini file entry */ if (((copyfast) || ((UseImageFile && (ImageModus == READIMAGE)) && disksize != FileSize)) && (disksize != FileSize)) { SetCopySpeed (FAST); if (!UseImageFile || (ImageModus == WRITEIMAGE)) { if (!DiskReadFatInfo (sdrive)) SetCopySpeed (FULL); } else if (!FileReadFatInfo (GetSFN (INFILE_ID))) { NLS_PUTSTRING (1, 32, "Can not copy image file"); return INITERROR; } } else SetCopySpeed (FULL); } puts (""); /* Get the size of the meaningfull data on the disk */ FilledDiskSize = GetDiskFilledSize (BUFFERSIZE); FilledTotal = (FilledDiskSize / free.df_bsec) / free.df_sclus; if ((UseImageFile) && (!CopyingToSameDisk)) switch (SetImageFile (GetSFN (ImageModus - 1), ImageModus, FilledDiskSize)) { case EZERO: allocated = disksize; break; case DISKTOSMALL: puts (""); NLS_PUTSTRING (1, 12, "Not enough disk space on target drive!"); return INITERROR; default: NLS_PRINTSTRING (1, 13, "Error accessing image file:"); printf (" %s\n", argv[ImageModus]); return INITERROR; } else { if (CopyingToSameDisk) switch (ImageModus) { case READIMAGE: memkind = InitializeFittingMemory (FilledDiskSize, HardDiskOk, &allocated, '\0', argv[2][0]); break; case WRITEIMAGE: memkind = InitializeFittingMemory (FilledDiskSize, HardDiskOk, &allocated, argv[1][0], '\0'); break; } else memkind = InitializeFittingMemory (FilledDiskSize, HardDiskOk, &allocated, argv[1][0], argv[2][0]); if (memkind == 0) { NLS_PUTSTRING (1, 14, "Insufficient memory for disk copy.\n"); return INITERROR; } } if (CopyingToSameDisk) { if (allocated != FilledDiskSize) { NLS_PUTSTRING (1, 14, "Insufficient memory for disk copy.\n"); return INITERROR; } if (ImageModus == READIMAGE) { PrepareForWriting (); if (!ReadFileIntoMemory (GetSFN (INFILE_ID), buf, BUFFERSIZE)) { NLS_PUTSTRING (1, 33, "Problem reading image file."); return CRITICAL; } } else /* ImageModus == WRITEIMAGE */ if (!asktdisk) { if (!DiskLargeEnough (GetSFN (OUTFILE_ID), FilledDiskSize)) { puts (""); NLS_PUTSTRING (1, 12, "Not enough disk space on target drive!"); return INITERROR; } } } if (!UseImageFile || (ImageModus == WRITEIMAGE)) { beginsector = endsector; endsector += allocated / BYTESPERSECTOR; if ((endsector > total) || (allocated == FilledDiskSize)) endsector = total; } if (!UseImageFile || (ImageModus == WRITEIMAGE)) { NLS_PRINTSTRING (4, 0, "Copying"); printf (" %d ", (int) FilledTotal); NLS_PRINTSTRING (4, 1, "clusters"); printf (", %d ", free.df_sclus); NLS_PRINTSTRING (4, 2, "sectors per cluster"); printf (", %d ", free.df_bsec); NLS_PRINTSTRING (4, 3, "bytes per sector"); puts ("."); NLS_PRINTSTRING (4, 4, "Relevant drive size is"); printf (" %lu ", FilledDiskSize); NLS_PRINTSTRING (4, 5, "bytes"); printf ("."); } if (informative && (!UseImageFile)) { printf (" "); NLS_PRINTSTRING (1, 15, "Using"); printf (" "); switch (memkind) { case EMS: puts ("EMS.\n"); break; case XMS: puts ("XMS.\n"); break; case HARDDISK: NLS_PUTSTRING (1, 16, "temporary file"); puts (""); break; case BUFFERS: NLS_PRINTSTRING (5, 0, "buffer of"); printf (" %ld ", allocated); NLS_PUTSTRING (5, 1, "bytes."); puts (""); break; } } else if (!UseImageFile || (ImageModus == WRITEIMAGE)) puts ("\n"); if (!UseImageFile || (ImageModus == WRITEIMAGE)) { for (action = DISKREADING; (verify) ? (action <= VERIFICATION) : (action < VERIFICATION); action++) { if (action == DISKREADING) { if (!UseImageFile) { NLS_PRINTSTRING (1, 17, "Reading SOURCE diskette . . ."); } else NLS_PRINTSTRING (1, 34, "Creating image file . . ."); PrepareForWriting (); } else { puts (""); NLS_PRINTSTRING (1, 38, "Verifying . . ."); PrepareForReading (); } for (sector = beginsector; sector < endsector; sector = sector + TOCOPYSECTORS) { if (sector < endsector - TOCOPYSECTORS) tocopysectors = TOCOPYSECTORS; else tocopysectors = (int) (endsector - sector); tobuffer = (unsigned) (tocopysectors * BYTESPERSECTOR); if (IsDiskReadRequired (sector, tocopysectors)) /* Fast copy */ { #ifndef ALL_RECOVERY_MODE if (recoverymode) #endif ReadSectors (sdrive, tocopysectors, (int) sector, buf, bytespersector); #ifndef ALL_RECOVERY_MODE else if (absread (sdrive, tocopysectors, (int) sector, buf) != 0) { puts (""); NLS_PRINTSTRING (1, 18, "Media error reading from sector"); printf (" %ld.\n", sector); } #endif if (action == DISKREADING) success = WriteMemoryBlock (buf, tobuffer); else success = ReadMemoryBlock (cmpbuf, tobuffer); if (!success) { puts (""); NLS_PUTSTRING (1, 20, "Unsuspected memory error."); SetErrorStopped (); return CRITICAL; } if (action == VERIFICATION) { if (memcmp (buf, cmpbuf, 5 /*tobuffer */ ) != 0) { puts (""); NLS_PRINTSTRING (1, 37, "Compare error on sector"); printf (" %ld.\n", sector); } } } } } } if (audible && (!UseImageFile)) Beep (); if (!UseImageFile || (ImageModus == READIMAGE)) { while (!NLS_TEST_NO (loop2)) /* loop2 */ { if (askdisk) { if (!UseImageFile) puts ("\n"); NLS_PRINTSTRING (1, 21, "Insert TARGET diskette into drive"); printf (" %s\n\n", argv[2]); NLS_PRINTSTRING (1, 9, "Press any key to continue . . ."); WaitForInput (); } else askdisk = TRUE; /* Check disk capacity is the same as that of the original diskette. */ for (;;) { if (!DiskReadBootInfo (tdrive, &free)) { puts (""); NLS_PUTSTRING (1, 10, "Disk not ready!"); total = 0; } else total = free.df_total * free.df_sclus; if (((UseImageFile) && (FileSize != FilledDiskSize)) || (disksize != total * free.df_bsec)) { puts (""); NLS_PUTSTRING (1, 22, "Diskette does not have the same capacity as the original."); if (fallthrough) return NONFATAL; puts (""); NLS_PRINTSTRING (1, 23, "Put a diskette with the right capacity in drive"); printf (" %s, \n", argv[2]); NLS_PUTSTRING (1, 24, "or press CTRL-C to cancel."); WaitForInput (); /* When the user presses CTRL-C this function does not return */ } else break; } if (UseImageFile) { puts ("\n"); NLS_PRINTSTRING (4, 0, "Copying"); printf (" %d ", (int) FilledTotal); NLS_PRINTSTRING (4, 1, "clusters"); printf (", %d ", free.df_sclus); NLS_PRINTSTRING (4, 2, "sectors per cluster"); printf (", %d ", free.df_bsec); NLS_PRINTSTRING (4, 3, "bytes per sector"); puts ("."); NLS_PRINTSTRING (4, 4, "Relevant drive size is"); printf (" %lu ", FilledDiskSize); NLS_PRINTSTRING (4, 5, "bytes"); puts ("."); beginsector = endsector; endsector += allocated / BYTESPERSECTOR; if (endsector > total) endsector = total; } for (action = DISKWRITING; (verify) ? (action <= VERIFICATION) : (action < VERIFICATION); action++) { if (action == DISKWRITING) { if (UseImageFile) { puts (""); NLS_PRINTSTRING (1, 35, "Writing image file . . ."); } else { puts ("\n"); NLS_PRINTSTRING (1, 25, "Writing to TARGET diskette in drive . . ."); } PrepareForReading (); } else /* VERIFICATION */ { puts (""); NLS_PRINTSTRING (1, 38, "Verifying . . ."); PrepareForReading (); /* Rewind */ } for (sector = beginsector; sector < endsector; sector = sector + TOCOPYSECTORS) { if (sector < endsector - TOCOPYSECTORS) tocopysectors = TOCOPYSECTORS; else tocopysectors = (int) (endsector - sector); tobuffer = (unsigned) (tocopysectors * BYTESPERSECTOR); if (IsDiskReadRequired (sector, tocopysectors)) { if (!ReadMemoryBlock (buf, tobuffer)) { puts (""); NLS_PUTSTRING (1, 20, "Unsuspected memory error."); SetErrorStopped (); return CRITICAL; } if (action == DISKWRITING) { #ifdef UPDATE_SERIALNUM if (sector == 0) { if (ParsedData->serialnumber == UPDATE) UpdateDiskSerialNumber (buf); } #endif if (abswrite (tdrive, tocopysectors, (int) sector, buf) != 0) { if (sector == 0) { if (abswrite(tdrive, 1, 0, buf) != 0) { puts("\n"); NLS_PRINTSTRING(1, 41, "Sector 0 unwritable! Write protected?"); if (FilledDiskSize == allocated) break; else return CRITICAL; } } puts (""); NLS_PRINTSTRING (1, 27, "Media error writing to sector"); printf (" %ld.\n", sector); } } else { if (absread (tdrive, tocopysectors, (int) sector, cmpbuf) != 0) { puts (""); NLS_PRINTSTRING (1, 18, "Media error reading from sector"); printf (" %ld.\n", sector); } if (sector == 0) { if (ParsedData->serialnumber == UPDATE) { ClearDiskSerialNumber (buf); ClearDiskSerialNumber (cmpbuf); } } if (memcmp (buf, cmpbuf, tobuffer) != 0) { puts (""); NLS_PRINTSTRING (1, 37, "Compare error on sector"); printf (" %ld.\n", sector); } } } } } if (!UseImageFile) puts (""); if (UseImageFile || (FilledDiskSize == allocated)) /* If everything fitted in memory */ { loop2 = (fallthrough) ? CatNO : CatNO + 1; if (loop2 == CatYES) loop2++; while (!NLS_TEST_YES_NO (loop2)) { ClrKbd (); if (audible) Beep (); puts (""); if (UseImageFile) puts (""); NLS_PRINTSTRING (1, 28, "Do you want another copy of this "); if (UseImageFile) { endsector = 0; NLS_PRINTSTRING (1, 29, "image file (Y/N)?"); } else NLS_PRINTSTRING (1, 30, "disk (Y/N)?"); loop2 = toupper (getch ()); puts (""); } if (UseImageFile && (NLS_TEST_YES (loop2))) puts (""); } else { puts (""); loop2 = CatNO; } /* Change the serial number of the target disk. */ #ifdef UPDATE_SERIALNUM if (ParsedData->serialnumber == UPDATE) { puts (""); PrintDiskSerialNumber (); puts (""); } #endif } /* loop2 */ loop2 = CatYES; if (loop2 == CatNO) loop2++; ReleaseMemory (); } else { if (CopyingToSameDisk) { PrepareForReading (); if (!WriteFileFromMemory (GetSFN (OUTFILE_ID), buf, BUFFERSIZE, FilledDiskSize, asktdisk, fallthrough, Overwrite)) { NLS_PUTSTRING (1, 36, "Problem writing image file."); return CRITICAL; } } } loop1 = CatYES + 1; if (loop1 == CatNO) loop1++; if (!UseImageFile && !fallthrough && (endsector == total)) { while (!NLS_TEST_YES_NO (loop1)) { ClrKbd (); puts (""); NLS_PRINTSTRING (1, 31, "Copy another disk (Y/N)?"); loop1 = toupper (getch ()); puts (""); endsector = 0; } } else if (UseImageFile || (fallthrough && (endsector == total))) { loop1 = CatNO; if (fallthrough) puts (""); else if (audible && (ImageModus == WRITEIMAGE)) Beep (); } } /* end loop1 */ if ((UseImageFile) && (ImageModus == WRITEIMAGE)) puts (""); return COPYSUCCESS; }
void CIFXPointSetEncoder::MakeContinuationBlockX(IFXString &rName, IFXDataBlockQueueX &rDataBlockQueue) { // get the pointset description m_pPointSetDescription = m_pAuthorPointSet->GetMaxPointSetDesc(); if(m_pPointSetDescription->m_numNormals) PrepareForWriting(); U32 uMinResolution = 0 ; U32 uMaxResolution = m_pPointSetDescription->m_numPositions ; U32 uNumResCoded = uMinResolution; while (uNumResCoded < uMaxResolution) { U32 uStartResolution = uNumResCoded; U32 uEndResolution = uStartResolution + 4096; if(uEndResolution > uMaxResolution) uEndResolution = uMaxResolution; // Create a bitstream IFXDECLARELOCAL(IFXBitStreamCompressedX,pBitStreamX); IFXCHECKX(IFXCreateComponent(CID_IFXBitStreamX,IID_IFXBitStreamCompressedX,(void**)&pBitStreamX)); U32 uProfile; m_pCoreServices->GetProfile(uProfile); pBitStreamX->SetNoCompressionMode((uProfile & IFXPROFILE_NOCOMPRESSION) ? TRUE : FALSE); // // Write the Continutaion block info for AuthorPointSet // // 1. Name // 2. Chain Index (always 0 for this block) // 3. Resolution Range // 3.1 U32 StartResultion; // 3.2 U32 EndResulution; // 4. Point Description (= Verstex Update) [NumVertexUpdates] // 4.1 U32[rCurrentPositionCount] Split Positions index // 4.2 New Poistion Info (as quantized position difference) // 4.2.1 U8[cDiffPosSign] position Difference Signs // 4.2.2 U32[cDiffPos] position difference X // 4.2.3 U32[cDiffPos] position difference Y // 4.2.4 U32[cDiffPos] position difference Z // 4.3 U32[cNormlCnt]:New Normal Count // 4.4 New Normal Info [New Normal Count] // 4.4.1 U8[cDiffNormalSign] position Difference Signs // 4.4.2 U32[cDiffNormal] normal difference X // 4.4.3 U32[cDiffNormal] normal difference Y // 4.4.4 U32[cDiffNormal] normal difference Z // 4.5 U32[cPointCnt]:New Point Count // 4.6 New Point Info [New Point Count] // 4.6.1 U32[cShading] Shading ID // 4.6.2 U32[cNormlIndx] normal local index // 4.6.3 New Point Diffuse Colors (presented only if Shading uses diffuse color) // 4.6.4 New Point Specular Colors (presented only if Shading uses specular color) // 4.6.5 New Point Texture Colors // // 1. Name pBitStreamX->WriteIFXStringX(rName); // 2. Chain Index pBitStreamX->WriteU32X( 0 ); // 3. Base PointSet Description // 3.1 U32 StartResultion; pBitStreamX->WriteU32X(uStartResolution); // 3.2 U32 EndResultion; pBitStreamX->WriteU32X(uEndResolution); U32 currPosInd; m_uPositionsWritten = (U32)-1; m_uCurrentTexCoordCount = 0; m_uCurrentNumDiffuseColors = 0; m_uCurrentNumSpecularColors = 0; m_uCurrentNumTexCoord = 0; m_uLastDiffuseColorInd = (U32)-1; m_uLastSpecularColorInd = (U32)-1; m_uLastTexCoordInd = (U32)-1; #ifdef DEBUG_VERBOSE DumpAuthorPointSet(); #endif for (currPosInd=uStartResolution; currPosInd < uEndResolution; currPosInd++) { WritePointUpdateX(currPosInd, pBitStreamX); IFXTRACE_GENERIC(L"[PointSet ENCODING UPDATE] %i \n", currPosInd); } // Get the data block IFXDECLARELOCAL(IFXDataBlockX,pDataBlockX); pBitStreamX->GetDataBlockX(pDataBlockX); IFXASSERT(pDataBlockX); // Set block type pDataBlockX->SetBlockTypeX( BlockType_GeneratorPointSetContinuationU3D ); // Set block priority pDataBlockX->SetPriorityX( m_uPriorityCurrent ); m_uPriorityCurrent += m_uPriorityIncrement; // set metadata IFXDECLARELOCAL(IFXMetaDataX, pBlockMD); IFXDECLARELOCAL(IFXMetaDataX, pObjectMD); pDataBlockX->QueryInterface(IID_IFXMetaDataX, (void**)&pBlockMD); m_pPointSetResource->QueryInterface(IID_IFXMetaDataX, (void**)&pObjectMD); pBlockMD->AppendX(pObjectMD); // Add block to queue rDataBlockQueue.AppendBlockX(*pDataBlockX); uNumResCoded = uEndResolution; } }