mirror of
https://github.com/wavemotion-dave/NINTV-DS.git
synced 2025-06-18 13:55:33 -04:00
v5.1a with improved MOB collision detection (fixes GORF) and improved JLP detection.
This commit is contained in:
parent
8fe9b416c6
commit
f729b116ba
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ include $(DEVKITARM)/ds_rules
|
||||
|
||||
export TARGET := NINTV-DS
|
||||
export TOPDIR := $(CURDIR)
|
||||
export VERSION := 5.1
|
||||
export VERSION := 5.1a
|
||||
|
||||
ICON := -b $(CURDIR)/logo.bmp "NINTV-DS $(VERSION);wavemotion-dave;https://github.com/wavemotion-dave/NINTV-DS"
|
||||
|
||||
|
BIN
NINTV-DS.nds
BIN
NINTV-DS.nds
Binary file not shown.
@ -3497,38 +3497,38 @@ void display_debug(void)
|
||||
case 0:
|
||||
sprintf(dbg, "MOBS:");
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "XLOC: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].xLocation, debug_stic->mobs[1].xLocation, debug_stic->mobs[2].xLocation, debug_stic->mobs[3].xLocation, debug_stic->mobs[4].xLocation, debug_stic->mobs[5].xLocation, debug_stic->mobs[6].xLocation, debug_stic->mobs[7].xLocation);
|
||||
sprintf(dbg, "XLOC: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].xLocation, mobs[1].xLocation, mobs[2].xLocation, mobs[3].xLocation, mobs[4].xLocation, mobs[5].xLocation, mobs[6].xLocation, mobs[7].xLocation);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "YLOC: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].yLocation, debug_stic->mobs[1].yLocation, debug_stic->mobs[2].yLocation, debug_stic->mobs[3].yLocation, debug_stic->mobs[4].yLocation, debug_stic->mobs[5].yLocation, debug_stic->mobs[6].yLocation, debug_stic->mobs[7].yLocation);
|
||||
sprintf(dbg, "YLOC: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].yLocation, mobs[1].yLocation, mobs[2].yLocation, mobs[3].yLocation, mobs[4].yLocation, mobs[5].yLocation, mobs[6].yLocation, mobs[7].yLocation);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "CARD: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].cardNumber, debug_stic->mobs[1].cardNumber, debug_stic->mobs[2].cardNumber, debug_stic->mobs[3].cardNumber, debug_stic->mobs[4].cardNumber, debug_stic->mobs[5].cardNumber, debug_stic->mobs[6].cardNumber, debug_stic->mobs[7].cardNumber);
|
||||
sprintf(dbg, "CARD: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].cardNumber, mobs[1].cardNumber, mobs[2].cardNumber, mobs[3].cardNumber, mobs[4].cardNumber, mobs[5].cardNumber, mobs[6].cardNumber, mobs[7].cardNumber);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "FORE: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].foregroundColor, debug_stic->mobs[1].foregroundColor, debug_stic->mobs[2].foregroundColor, debug_stic->mobs[3].foregroundColor, debug_stic->mobs[4].foregroundColor, debug_stic->mobs[5].foregroundColor, debug_stic->mobs[6].foregroundColor, debug_stic->mobs[7].foregroundColor);
|
||||
sprintf(dbg, "FORE: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].foregroundColor, mobs[1].foregroundColor, mobs[2].foregroundColor, mobs[3].foregroundColor, mobs[4].foregroundColor, mobs[5].foregroundColor, mobs[6].foregroundColor, mobs[7].foregroundColor);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "GROM: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].isGrom, debug_stic->mobs[1].isGrom, debug_stic->mobs[2].isGrom, debug_stic->mobs[3].isGrom, debug_stic->mobs[4].isGrom, debug_stic->mobs[5].isGrom, debug_stic->mobs[6].isGrom, debug_stic->mobs[7].isGrom);
|
||||
sprintf(dbg, "GROM: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].isGrom, mobs[1].isGrom, mobs[2].isGrom, mobs[3].isGrom, mobs[4].isGrom, mobs[5].isGrom, mobs[6].isGrom, mobs[7].isGrom);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "VISB: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].isVisible, debug_stic->mobs[1].isVisible, debug_stic->mobs[2].isVisible, debug_stic->mobs[3].isVisible, debug_stic->mobs[4].isVisible, debug_stic->mobs[5].isVisible, debug_stic->mobs[6].isVisible, debug_stic->mobs[7].isVisible);
|
||||
sprintf(dbg, "VISB: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].isVisible, mobs[1].isVisible, mobs[2].isVisible, mobs[3].isVisible, mobs[4].isVisible, mobs[5].isVisible, mobs[6].isVisible, mobs[7].isVisible);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "DBLW: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].doubleWidth, debug_stic->mobs[1].doubleWidth, debug_stic->mobs[2].doubleWidth, debug_stic->mobs[3].doubleWidth, debug_stic->mobs[4].doubleWidth, debug_stic->mobs[5].doubleWidth, debug_stic->mobs[6].doubleWidth, debug_stic->mobs[7].doubleWidth);
|
||||
sprintf(dbg, "DBLW: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].doubleWidth, mobs[1].doubleWidth, mobs[2].doubleWidth, mobs[3].doubleWidth, mobs[4].doubleWidth, mobs[5].doubleWidth, mobs[6].doubleWidth, mobs[7].doubleWidth);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "DBLY: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].doubleYResolution, debug_stic->mobs[1].doubleYResolution, debug_stic->mobs[2].doubleYResolution, debug_stic->mobs[3].doubleYResolution, debug_stic->mobs[4].doubleYResolution, debug_stic->mobs[5].doubleYResolution, debug_stic->mobs[6].doubleYResolution, debug_stic->mobs[7].doubleYResolution);
|
||||
sprintf(dbg, "DBLY: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].doubleYResolution, mobs[1].doubleYResolution, mobs[2].doubleYResolution, mobs[3].doubleYResolution, mobs[4].doubleYResolution, mobs[5].doubleYResolution, mobs[6].doubleYResolution, mobs[7].doubleYResolution);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "DBLH: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].doubleHeight, debug_stic->mobs[1].doubleHeight, debug_stic->mobs[2].doubleHeight, debug_stic->mobs[3].doubleHeight, debug_stic->mobs[4].doubleHeight, debug_stic->mobs[5].doubleHeight, debug_stic->mobs[6].doubleHeight, debug_stic->mobs[7].doubleHeight);
|
||||
sprintf(dbg, "DBLH: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].doubleHeight, mobs[1].doubleHeight, mobs[2].doubleHeight, mobs[3].doubleHeight, mobs[4].doubleHeight, mobs[5].doubleHeight, mobs[6].doubleHeight, mobs[7].doubleHeight);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "QUAH: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].quadHeight, debug_stic->mobs[1].quadHeight, debug_stic->mobs[2].quadHeight, debug_stic->mobs[3].quadHeight, debug_stic->mobs[4].quadHeight, debug_stic->mobs[5].quadHeight, debug_stic->mobs[6].quadHeight, debug_stic->mobs[7].quadHeight);
|
||||
sprintf(dbg, "QUAH: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].quadHeight, mobs[1].quadHeight, mobs[2].quadHeight, mobs[3].quadHeight, mobs[4].quadHeight, mobs[5].quadHeight, mobs[6].quadHeight, mobs[7].quadHeight);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "FLAG: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].flagCollisions, debug_stic->mobs[1].flagCollisions, debug_stic->mobs[2].flagCollisions, debug_stic->mobs[3].flagCollisions, debug_stic->mobs[4].flagCollisions, debug_stic->mobs[5].flagCollisions, debug_stic->mobs[6].flagCollisions, debug_stic->mobs[7].flagCollisions);
|
||||
sprintf(dbg, "FLAG: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].flagCollisions, mobs[1].flagCollisions, mobs[2].flagCollisions, mobs[3].flagCollisions, mobs[4].flagCollisions, mobs[5].flagCollisions, mobs[6].flagCollisions, mobs[7].flagCollisions);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "HMIR: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].horizontalMirror, debug_stic->mobs[1].horizontalMirror, debug_stic->mobs[2].horizontalMirror, debug_stic->mobs[3].horizontalMirror, debug_stic->mobs[4].horizontalMirror, debug_stic->mobs[5].horizontalMirror, debug_stic->mobs[6].horizontalMirror, debug_stic->mobs[7].horizontalMirror);
|
||||
sprintf(dbg, "HMIR: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].horizontalMirror, mobs[1].horizontalMirror, mobs[2].horizontalMirror, mobs[3].horizontalMirror, mobs[4].horizontalMirror, mobs[5].horizontalMirror, mobs[6].horizontalMirror, mobs[7].horizontalMirror);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "VMIR: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].verticalMirror, debug_stic->mobs[1].verticalMirror, debug_stic->mobs[2].verticalMirror, debug_stic->mobs[3].verticalMirror, debug_stic->mobs[4].verticalMirror, debug_stic->mobs[5].verticalMirror, debug_stic->mobs[6].verticalMirror, debug_stic->mobs[7].verticalMirror);
|
||||
sprintf(dbg, "VMIR: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].verticalMirror, mobs[1].verticalMirror, mobs[2].verticalMirror, mobs[3].verticalMirror, mobs[4].verticalMirror, mobs[5].verticalMirror, mobs[6].verticalMirror, mobs[7].verticalMirror);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "BEHI: %02X %02X %02X %02X %02X %02X %02X %02X", debug_stic->mobs[0].behindForeground, debug_stic->mobs[1].behindForeground, debug_stic->mobs[2].behindForeground, debug_stic->mobs[3].behindForeground, debug_stic->mobs[4].behindForeground, debug_stic->mobs[5].behindForeground, debug_stic->mobs[6].behindForeground, debug_stic->mobs[7].behindForeground);
|
||||
sprintf(dbg, "BEHI: %02X %02X %02X %02X %02X %02X %02X %02X", mobs[0].behindForeground, mobs[1].behindForeground, mobs[2].behindForeground, mobs[3].behindForeground, mobs[4].behindForeground, mobs[5].behindForeground, mobs[6].behindForeground, mobs[7].behindForeground);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
idx++;
|
||||
sprintf(dbg, "COLLISIONS:");
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "%03X %03X %03X %03X %03X %03X %03X %03X", debug_stic->mobs[0].collisionRegister, debug_stic->mobs[1].collisionRegister, debug_stic->mobs[2].collisionRegister, debug_stic->mobs[3].collisionRegister, debug_stic->mobs[4].collisionRegister, debug_stic->mobs[5].collisionRegister, debug_stic->mobs[6].collisionRegister, debug_stic->mobs[7].collisionRegister);
|
||||
sprintf(dbg, "%03X %03X %03X %03X %03X %03X %03X %03X", mobs[0].collisionRegister, mobs[1].collisionRegister, mobs[2].collisionRegister, mobs[3].collisionRegister, mobs[4].collisionRegister, mobs[5].collisionRegister, mobs[6].collisionRegister, mobs[7].collisionRegister);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
sprintf(dbg, "BC=%02X BL=%d BT=%d HOff=%d VOff=%d", debug_stic->borderColor, debug_stic->blockLeft, debug_stic->blockTop, debug_stic->horizontalOffset, debug_stic->verticalOffset);
|
||||
dsPrintValue(0, idx++, 0, dbg);
|
||||
|
@ -1078,7 +1078,9 @@ ITCM_CODE void AY38900::copyMOBsToStagingArea()
|
||||
{
|
||||
for (INT8 i = 7; i >= 0; i--)
|
||||
{
|
||||
if (mobs[i].xLocation == 0 || mobs[i].xLocation > 167 || (!mobs[i].flagCollisions && !mobs[i].isVisible))
|
||||
// A mob X location of zero is special and is not rendered. A Y location of zero is not special.
|
||||
// But we do also check the out of bounds X (167) and Y (104) and don't bother to render offscreen MOBs.
|
||||
if (mobs[i].xLocation == 0 || mobs[i].xLocation >= 167 || (!mobs[i].flagCollisions && !mobs[i].isVisible) || mobs[i].yLocation >= 104)
|
||||
continue;
|
||||
|
||||
BOOL borderCollision = FALSE;
|
||||
@ -1190,13 +1192,17 @@ ITCM_CODE void AY38900::determineMOBCollisions()
|
||||
{
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
if (mobs[i].xLocation == 0 || !mobs[i].flagCollisions || mobs[i].xLocation > 167)
|
||||
// Technically there is nothing special about a Y location of zero (0) but at least one game (GORF) uses it to move the
|
||||
// object off-screen. This is a bit non-standard as one pixel is still visible (better would be to move the object to
|
||||
// an X position of 0 or beyond 168) but we don't bother to check collisions when the object has just one pixel hanging
|
||||
// on the screen - it's easier than having a more complex mob collision algorithm and fixes games like GORF.
|
||||
if (mobs[i].xLocation == 0 || !mobs[i].flagCollisions || mobs[i].xLocation >= 167 || mobs[i].yLocation >= 104 || mobs[i].yLocation == 0)
|
||||
continue;
|
||||
|
||||
//check MOB on MOB collisions
|
||||
for (int j = i+1; j < 8; j++)
|
||||
{
|
||||
if (mobs[j].xLocation == 0 || !mobs[j].flagCollisions || mobs[j].xLocation > 167)
|
||||
if (mobs[j].xLocation == 0 || !mobs[j].flagCollisions || mobs[j].xLocation >= 167 || mobs[j].yLocation >= 104 || mobs[i].yLocation == 0)
|
||||
continue;
|
||||
|
||||
if (mobsCollide(i, j)) {
|
||||
|
@ -438,7 +438,19 @@ Rip* Rip::LoadBinCfg(const CHAR* configFile, UINT32 crc, size_t size)
|
||||
{
|
||||
if (strstr(ptr, "jlp") || strstr(ptr, "jlp_accel") || strstr(ptr, "jlp_flash"))
|
||||
{
|
||||
bUseJLP = 1;
|
||||
// If we haven't already enabled JLP, see if this config entry turns it on...
|
||||
if (bUseJLP == 0)
|
||||
{
|
||||
u8 zeros = 0;
|
||||
u8 nonzeros = 0;
|
||||
for (int i=0; i<strlen(ptr); i++)
|
||||
{
|
||||
if (ptr[i] == '0') zeros++;
|
||||
else if ((ptr[i] >= '1') && (ptr[i] <= '9')) nonzeros++;
|
||||
|
||||
}
|
||||
bUseJLP = ((zeros == 1) && (nonzeros == 0)) ? 0:1; // If the line was "= 0", we keep JLP disabled
|
||||
}
|
||||
}
|
||||
if (strstr(ptr, "voice"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user