MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / ImagePhaseToTrack

Function ImagePhaseToTrack

source/DiskImage.cpp:241–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241UINT ImagePhaseToTrack(ImageInfo* const pImageInfo, const float phase, const bool limit/*=true*/)
242{
243 if (!pImageInfo)
244 return 0;
245
246 UINT track = pImageInfo->pImageType->PhaseToTrack(phase);
247
248 if (limit)
249 {
250 const UINT numTracksInImage = ImageGetNumTracks(pImageInfo);
251 track = (numTracksInImage == 0) ? 0
252 : MIN(numTracksInImage - 1, track);
253 }
254
255 return track;
256}
257
258UINT ImageGetMaxNibblesPerTrack(ImageInfo* const pImageInfo)
259{

Callers 4

GetCurrentTrackMethod · 0.85
GetTrackMethod · 0.85
ReadTrackMethod · 0.85
WriteTrackMethod · 0.85

Calls 2

ImageGetNumTracksFunction · 0.85
PhaseToTrackMethod · 0.80

Tested by

no test coverage detected