Added floppy #2 saving, statistics to makefile.
This commit is contained in:
parent
6b21449d90
commit
f36d026c7b
|
@ -6,6 +6,8 @@
|
|||
# This software is licensed under the GPL v2
|
||||
#
|
||||
|
||||
FIND = find
|
||||
|
||||
# Figure out which system we're compiling for, and set the appropriate variables
|
||||
|
||||
ifeq "$(OSTYPE)" "msys" # Win32
|
||||
|
@ -159,6 +161,12 @@ $(TARGET)$(EXESUFFIX): $(OBJS)
|
|||
# strip --strip-all vj$(EXESUFFIX)
|
||||
# upx -9 vj$(EXESUFFIX)
|
||||
|
||||
statistics:
|
||||
@echo -n "Lines in source files: "
|
||||
@-$(FIND) ./src -name "*.cpp" | xargs cat | wc -l
|
||||
@echo -n "Lines in header files: "
|
||||
@-$(FIND) ./src -name "*.h" | xargs cat | wc -l
|
||||
|
||||
# Pull in dependencies autogenerated by gcc's -MMD switch
|
||||
# The "-" in front in there just in case they haven't been created yet
|
||||
|
||||
|
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -1531,7 +1531,8 @@ SDL_DestroySemaphore(mainSem);
|
|||
// Save state here...
|
||||
SaveApple2State(settings.autoStatePath);
|
||||
}
|
||||
floppyDrive.SaveImage();
|
||||
floppyDrive.SaveImage(0);
|
||||
floppyDrive.SaveImage(1);
|
||||
|
||||
SoundDone();
|
||||
VideoDone();
|
||||
|
|
|
@ -118,6 +118,7 @@ bool FloppyDrive::LoadImage(const char * filename, uint8_t driveNum/*= 0*/)
|
|||
|
||||
bool FloppyDrive::SaveImage(uint8_t driveNum/*= 0*/)
|
||||
{
|
||||
// Various sanity checks...
|
||||
if (driveNum > 1)
|
||||
{
|
||||
WriteLog("FLOPPY: Attempted to save image to drive #%u!\n", driveNum);
|
||||
|
@ -136,11 +137,13 @@ bool FloppyDrive::SaveImage(uint8_t driveNum/*= 0*/)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Handle nybbylization, if necessary
|
||||
if (diskType[driveNum] == DT_NYBBLE)
|
||||
memcpy(disk[driveNum], nybblizedImage[driveNum], 232960);
|
||||
else
|
||||
DenybblizeImage(driveNum);
|
||||
|
||||
// Finally, write the damn image
|
||||
FILE * fp = fopen(imageName[driveNum], "wb");
|
||||
|
||||
if (fp == NULL)
|
||||
|
|
Loading…
Reference in New Issue