| 123 | //=========================================================================== |
| 124 | |
| 125 | void ImageReadTrack( ImageInfo* const pImageInfo, |
| 126 | float phase, // phase [0..79] +/- 0.5 |
| 127 | LPBYTE pTrackImageBuffer, |
| 128 | int* pNibbles, |
| 129 | UINT* pBitCount, |
| 130 | bool enhanceDisk) |
| 131 | { |
| 132 | _ASSERT(phase >= 0); |
| 133 | if (phase < 0) |
| 134 | phase = 0; |
| 135 | |
| 136 | const UINT track = pImageInfo->pImageType->PhaseToTrack(phase); |
| 137 | |
| 138 | if (pImageInfo->pImageType->AllowRW()) |
| 139 | { |
| 140 | pImageInfo->pImageType->Read(pImageInfo, phase, pTrackImageBuffer, pNibbles, pBitCount, enhanceDisk); |
| 141 | } |
| 142 | else |
| 143 | { |
| 144 | *pNibbles = (int) ImageGetMaxNibblesPerTrack(pImageInfo); |
| 145 | for (int i = 0; i < *pNibbles; i++) |
| 146 | pTrackImageBuffer[i] = (BYTE)(rand() & 0xFF); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | //=========================================================================== |
| 151 |
no test coverage detected