SAGA2: Add more debug messages

This commit is contained in:
a/ 2021-06-14 00:47:21 +09:00 committed by Eugene Sandulenko
parent 97f7a0e529
commit 6d09e62b2b
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -2927,6 +2927,8 @@ inline void drawMetaTiles(void) {
* tileDX) * tileDX)
- tileScroll.y; - tileScroll.y;
debugC(2, kDebugTiles, "viewPos = (%d,%d)", viewPos.x, viewPos.y);
// coordinates of the view window upper left corner in U,V // coordinates of the view window upper left corner in U,V
baseCoords.u = ((2 * (viewPos.y >> tileDXShift) + metaDY / 16) + viewPos.x) baseCoords.u = ((2 * (viewPos.y >> tileDXShift) + metaDY / 16) + viewPos.x)
@ -2935,6 +2937,8 @@ inline void drawMetaTiles(void) {
/ (platformWidth * 2); / (platformWidth * 2);
baseCoords.z = 0; baseCoords.z = 0;
debugC(2, kDebugTiles, "baseCoords = (%d,%d,%d)", baseCoords.u, baseCoords.v, baseCoords.z);
setAreaSound(baseCoords); //+TilePoint(tileRectWidth, tileRectHeight,0)); setAreaSound(baseCoords); //+TilePoint(tileRectWidth, tileRectHeight,0));
updateHandleRefs(baseCoords); // viewPoint, &sti ); updateHandleRefs(baseCoords); // viewPoint, &sti );
@ -2946,6 +2950,8 @@ inline void drawMetaTiles(void) {
metaPos.y = viewPos.y metaPos.y = viewPos.y
- (baseCoords.u + baseCoords.v) * metaDY; - (baseCoords.u + baseCoords.v) * metaDY;
debugC(2, kDebugTiles, "metaPos = (%d,%d)", metaPos.x, metaPos.y);
// Loop through each horizontal row of metatiles // Loop through each horizontal row of metatiles
// REM: also account for highest possible platform // REM: also account for highest possible platform
// (replace 256 constant with better value) // (replace 256 constant with better value)
@ -4613,6 +4619,7 @@ void updateMainDisplay(void) {
// Get the coordinates of the object which the camera is tracking // Get the coordinates of the object which the camera is tracking
getViewTrackPos(trackPos); getViewTrackPos(trackPos);
debugC(1, kDebugTiles, "trackPos = (%d,%d,%d)", trackPos.u, trackPos.v, trackPos.z);
viewDiff = trackPos - lastViewLoc; viewDiff = trackPos - lastViewLoc;
lastViewLoc = trackPos; lastViewLoc = trackPos;
@ -4631,6 +4638,7 @@ void updateMainDisplay(void) {
targetScroll.y = targetScroll.y =
curMap->mapHeight - (trackPos.u + trackPos.v) curMap->mapHeight - (trackPos.u + trackPos.v)
- trackPos.z - tileRect.height / 2 - 32; - trackPos.z - tileRect.height / 2 - 32;
debugC(1, kDebugTiles, "targetScroll = (%d,%d)", targetScroll.x, targetScroll.y);
// Compute the delta vector between the current scroll position // Compute the delta vector between the current scroll position
// and the desired scroll position, and also compute the // and the desired scroll position, and also compute the