Skip to content

Commit

Permalink
removed unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
saramibreak committed Nov 29, 2023
1 parent 0bf6d6b commit 5a908ee
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DiscImageCreator/DiscImageCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int execForDumping(PEXEC_TYPE pExecType, PEXT_ARG pExtArg, _TCHAR* pszFullPath,
throw FALSE;
}

InitMainDataHeader(pExecType, pExtArg, &mainHeader, (INT)s_nStartLBA);
InitMainDataHeader(pExecType, &mainHeader, (INT)s_nStartLBA);
if (!InitSubData(pExecType, &pDisc)) {
throw FALSE;
}
Expand Down
8 changes: 4 additions & 4 deletions DiscImageCreator/execScsiCmdforCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ BOOL ReadCDAll(
OutputString("\rChecking SubQ ctl (Track) %2u/%2u", p + 1, pDisc->SCSI.toc.LastTrack);
}
OutputString("\n");
SetCDOffset(pExecType, pExtArg->byBe, pDevice->byPlxtrDrive, pDisc, 0, pDisc->SCSI.nAllLength);
SetCDOffset(pExecType, pDevice->byPlxtrDrive, pDisc, 0, pDisc->SCSI.nAllLength);

pDiscPerSector->byTrackNum = pDisc->SCSI.toc.FirstTrack;
INT n1stLBAForSub = 0;
Expand Down Expand Up @@ -1523,7 +1523,7 @@ BOOL ReadCDForSwap(
type = CDFLAG::_READ_CD::All;
}
SetReadDiscCommand(pExtArg, pDevice, byTransferLen, type, c2, pDevice->sub, lpCmd, TRUE);
SetCDOffset(pExecType, pExtArg->byBe, pDevice->byPlxtrDrive, pDisc, nStart, nEnd);
SetCDOffset(pExecType, pDevice->byPlxtrDrive, pDisc, nStart, nEnd);
pDiscPerSector->byTrackNum = 1;

INT n1stLBA = nStart + pDisc->MAIN.nOffsetStart;
Expand Down Expand Up @@ -2016,7 +2016,7 @@ BOOL ReadCDPartial(
}
OutputString("\n");
}
SetCDOffset(pExecType, pExtArg->byBe, pDevice->byPlxtrDrive, pDisc, nStart, nEnd);
SetCDOffset(pExecType, pDevice->byPlxtrDrive, pDisc, nStart, nEnd);
#ifdef _DEBUG
OutputString(
"byBe: %d, nCombinedOffset: %d, uiMainDataSlideSize: %u, nOffsetStart: %d, nOffsetEnd: %d, nFixStartLBA: %d, nFixEndLBA: %d\n"
Expand Down Expand Up @@ -2522,7 +2522,7 @@ BOOL ReadCDOutOfRange(
if (pDisc->MAIN.nCombinedOffset < 0) {
nOverreadSize = pDisc->MAIN.nAdjustSectorNum;
}
SetCDOffset(pExecType, pExtArg->byBe, pDevice->byPlxtrDrive, pDisc, 0, pDisc->SCSI.nAllLength);
SetCDOffset(pExecType, pDevice->byPlxtrDrive, pDisc, 0, pDisc->SCSI.nAllLength);

if (pDisc->SCSI.by1stMultiSessionTrkNum) {
SetReadDiscCommand(pExtArg, pDevice, 2
Expand Down
2 changes: 0 additions & 2 deletions DiscImageCreator/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,13 @@ BOOL InitTocTextData(

VOID InitMainDataHeader(
PEXEC_TYPE pExecType,
PEXT_ARG pExtArg,
PMAIN_HEADER pMain,
INT nLBA
) {
memcpy(pMain->current, g_aSyncHeader, sizeof(g_aSyncHeader));
BYTE m, s, f;
LBAtoMSF(nLBA + 150, &m, &s, &f);
if (*pExecType != data) {
// if (!pExtArg->byBe && *pExecType != data) {
pMain->current[12] = (BYTE)(DecToBcd(m) ^ 0x01);
pMain->current[13] = (BYTE)(DecToBcd(s) ^ 0x80);
}
Expand Down
1 change: 0 additions & 1 deletion DiscImageCreator/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ BOOL InitTocTextData(

VOID InitMainDataHeader(
PEXEC_TYPE pExecType,
PEXT_ARG pExtArg,
PMAIN_HEADER pMain,
INT nLBA
);
Expand Down
3 changes: 0 additions & 3 deletions DiscImageCreator/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,15 +1101,13 @@ VOID SetAndOutputCDOffset(

VOID SetCDOffset(
PEXEC_TYPE pExecType,
BYTE byBe,
BYTE byPlxtrDrive,
PDISC pDisc,
INT nStartLBA,
INT nEndLBA
) {
if (pDisc->MAIN.nCombinedOffset > 0) {
if (*pExecType == data) {
// if (*pExecType != gd && byBe && pDisc->SCSI.trkType != TRACK_TYPE::audioOnly) {
pDisc->MAIN.uiMainDataSlideSize = 0;
pDisc->MAIN.nOffsetStart = 0;
pDisc->MAIN.nOffsetEnd = 0;
Expand All @@ -1133,7 +1131,6 @@ VOID SetCDOffset(
}
else if (pDisc->MAIN.nCombinedOffset < 0) {
if (*pExecType == data) {
// if (*pExecType != gd && byBe && pDisc->SCSI.trkType != TRACK_TYPE::audioOnly) {
pDisc->MAIN.uiMainDataSlideSize = 0;
pDisc->MAIN.nOffsetStart = 0;
pDisc->MAIN.nOffsetEnd = 0;
Expand Down
1 change: 0 additions & 1 deletion DiscImageCreator/set.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ VOID SetAndOutputCDOffset(

VOID SetCDOffset(
PEXEC_TYPE pExecType,
BYTE byBe,
BYTE byPlxtrDrive,
PDISC pDisc,
INT nStartLBA,
Expand Down

0 comments on commit 5a908ee

Please sign in to comment.