{
if (argc > 1)
{
- if (strcmp(argv[1], "--help") == 0)
+ if ((strcmp(argv[1], "--help") == 0) || (strcmp(argv[1], "-h") == 0)
+ || (strcmp(argv[1], "-?") == 0))
{
printf("Virtual Jaguar 2.0.0 help\n");
printf("\n");
- printf("This is an experimental branch of Virtual Jaguar, how did you get it?\n");
+ printf("Command line interface is non-functional ATM, but may return if there is\n"
+ "enough demand for it. :-)\n");
return 0;
}
}
WriteLog("VJ: SDL (joystick, audio) successfully initialized.\n");
App app(argc, argv); // Declare an instance of the application
retVal = app.exec(); // And run it!
+
+ // Free SDL components last...!
+ SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO);
+ SDL_Quit();
}
LogDone(); // Close logfile
ypos = TOMReadWord(0xF00046, OP) / 2; // Get the VDB value
#endif
// Actually, no. Any item less than VDB will get only the lines that hang over VDB displayed.
-// So we need to fix this somehow...
+// So we need to fix this somehow... (and it has... in tom.cpp :-P)
uint32 height = (p0 & 0xFFC000) >> 14;
uint32 oldOPP = op_pointer - 8;
// for use when using endian-corrected data (i.e., any of the *ReadWord functions!)
uint16 * paletteRAM16 = (uint16 *)paletteRAM;
- uint8 hscale = p2 & 0xFF;
+ uint16 hscale = p2 & 0xFF;
// Hmm. It seems that fixing the horizontal scale necessitated re-fixing this. Not sure why,
// but seems to be consistent with the vertical scaling now (and it may turn out to be wrong!)...
- uint8 horizontalRemainder = hscale; // Not sure if it starts full, but seems reasonable [It's not!]
+ uint16 horizontalRemainder = hscale; // Not sure if it starts full, but seems reasonable [It's not!]
// uint8 horizontalRemainder = 0; // Let's try zero! Seems to work! Yay! [No, it doesn't!]
int32 scaledWidthInPixels = (iwidth * phraseWidthToPixels[depth] * hscale) >> 5;
uint32 scaledPhrasePixels = (phraseWidthToPixels[depth] * hscale) >> 5;
currentLineBuffer += lbufDelta;
+/*
+The reason we subtract the horizontalRemainder *after* the test is because we had too few
+bytes for horizontalRemainder to properly recognize a negative number. But now it's 16 bits
+wide, so we could probably go back to that (as long as we make it an int16 and not a uint16!)
+*/
/* horizontalRemainder -= 0x20; // Subtract 1.0f in [3.5] fixed point format
while (horizontalRemainder & 0x80)
{
pixCount++;
pixels <<= 1;
}//*/
- while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+// while (horizontalRemainder <= 0x20) // I.e., it's <= 1.0 (*before* subtraction)
+ while (horizontalRemainder < 0x20) // I.e., it's <= 1.0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixCount++;
pixels <<= 2;
}//*/
- while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+// while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+ while (horizontalRemainder < 0x20) // I.e., it's <= 1.0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixCount++;
pixels <<= 4;
}//*/
- while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+// while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+ while (horizontalRemainder < 0x20) // I.e., it's <= 0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
currentLineBuffer += lbufDelta;
- while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+// while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+ while (horizontalRemainder < 0x20) // I.e., it's <= 1.0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;
pixCount++;
pixels <<= 16;
}//*/
- while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+// while (horizontalRemainder <= 0x20) // I.e., it's <= 0 (*before* subtraction)
+ while (horizontalRemainder < 0x20) // I.e., it's <= 1.0 (*before* subtraction)
{
horizontalRemainder += hscale;
pixCount++;