X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FInfotrons.c;h=49d23c5cd19d1999d2375062e88d40eaa5b8bf44;hb=949580a3bafe5c8abd1fac99202411b65900b883;hp=bcede9d48d6d55d4fab243313674c96e792a872d;hpb=5ba7f2d9a3f07f342afdf215a3307d5487cb6d43;p=rocksndiamonds.git diff --git a/src/game_sp/Infotrons.c b/src/game_sp/Infotrons.c index bcede9d4..49d23c5c 100644 --- a/src/game_sp/Infotrons.c +++ b/src/game_sp/Infotrons.c @@ -4,7 +4,8 @@ #include "Infotrons.h" -static char *VB_Name = "modInfotron"; +// static char *VB_Name = "modInfotron"; + // --- Option Explicit // ========================================================================== @@ -19,8 +20,10 @@ int subAnimateInfotrons(int si) int tFld; // PseudoRegisters: - int ax, bx, cx, dx, di, X, Y; - int ah, bh, ch, dh, al, bl, cl, dl; + // int ax, bx, cx, dx, di, X, Y; + // int ah, bh, ch, dh, al, bl, cl, dl; + int ax, bx, dx, X, Y; + int al, bl; tFld = PlayField16[si]; if ((tFld & 0xFF) != fiInfotron) @@ -119,8 +122,13 @@ loc_g_1242: // infotron comes falling from above X = GetStretchX(si); Y = GetStretchY(si - FieldWidth); dx = bl & 0x7; +#if 1 + StretchedSprites.BltImg(X, Y, aniSpace, 0); + StretchedSprites.BltImg(X, Y + TwoPixels * (dx + 1), aniInfotron, dx); +#else StretchedSprites.BltEx(X, Y, 0); StretchedSprites.BltEx(X, Y + TwoPixels * (dx + 1), fiInfotron); +#endif // +++++++++++++++++++++++++++++++++++++++++++++++++++++ bl = HighByte(PlayField16[si]) + 1; if (bl == 0x16) @@ -165,7 +173,19 @@ loc_g_1242: // infotron comes falling from above if (ax == fiOrangeDisk) // orange disk hit goto loc_g_1386; +#if 1 + +#if 1 + // play the infotron sound, 'cause infotron hits something "hard" + subSoundFX(si, fiInfotron, actImpact); +#else + // play the zonk sound, 'cause zonk hits something "hard" + subSoundFX(si, fiZonk, actImpact); +#endif + +#else subSoundFXZonk(); // play the zonk sound,'cause zonk hits something "hard" +#endif if (! (ax == fiZonk || ax == fiInfotron || ax == fiRAM)) return subAnimateInfotrons; @@ -212,25 +232,11 @@ loc_g_1364: // Murphy dies, but not in any case if (bl == 0x29 || bl == 0x25 || bl == 0x26) return subAnimateInfotrons; - - - - - - - - - - loc_g_1386: // someone dies/explodes immediately si = si + FieldWidth; // 1 field down ExplodeFieldSP(si); // Explode return subAnimateInfotrons; - - - - loc_g_138D: // infotron comes rolling from right to left // To Do: draw infotron rolling from right // according to position in (bl And &H07) @@ -238,8 +244,13 @@ loc_g_138D: // infotron comes rolling from right to left X = GetStretchX(si + 1); Y = GetStretchY(si); dx = (bl & 0x7) + 1; +#if 1 + StretchedSprites.BltImg(X, Y, aniSpace, 0); + StretchedSprites.BltImg(X - (TwoPixels * dx), Y, aniInfotronRollLeft, dx - 1); +#else StretchedSprites.BltEx(X, Y, 0); - StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniInfotronRollLeft[dx - 1]); + StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesInfotronRollLeft[dx - 1]); +#endif // +++++++++++++++++++++++++++++++++++++++++++++++++++++ bl = HighByte(PlayField16[si]) + 1; // get and increment sequence# if (bl == 0x24) @@ -268,8 +279,13 @@ loc_g_13E9: // infotron comes rolling from left to right X = GetStretchX(si - 1); Y = GetStretchY(si); dx = (bl & 0x7) + 1; +#if 1 + StretchedSprites.BltImg(X, Y, aniSpace, 0); + StretchedSprites.BltImg(X + (TwoPixels * dx), Y, aniInfotronRollRight, dx - 1); +#else StretchedSprites.BltEx(X, Y, 0); - StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniInfotronRollRight[dx - 1]); + StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesInfotronRollRight[dx - 1]); +#endif // +++++++++++++++++++++++++++++++++++++++++++++++++++++ bl = HighByte(PlayField16[si]) + 1; if (bl == 0x34) @@ -318,8 +334,13 @@ loc_g_1472: // infotron rolls left X = GetStretchX(si); Y = GetStretchY(si); dx = (bl & 0xF) + 1; +#if 1 + StretchedSprites.BltImg(X, Y, aniSpace, 0); + StretchedSprites.BltImg(X - (TwoPixels * dx), Y, aniInfotronRollLeft, dx - 1); +#else StretchedSprites.BltEx(X, Y, 0); - StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniInfotronRollLeft[dx - 1]); + StretchedSprites.BltEx(X - (TwoPixels * dx), Y, aniFramesInfotronRollLeft[dx - 1]); +#endif // +++++++++++++++++++++++++++++++++++++++++++++++++++++ bl = HighByte(PlayField16[si]) + 1; // retrieve and increment sequence# if (bl < 0x52) @@ -355,8 +376,13 @@ loc_g_14E0: // infotron rolls right X = GetStretchX(si); Y = GetStretchY(si); dx = (bl & 0x7) + 1; +#if 1 + StretchedSprites.BltImg(X, Y, aniSpace, 0); + StretchedSprites.BltImg(X + (TwoPixels * dx), Y, aniInfotronRollRight, dx - 1); +#else StretchedSprites.BltEx(X, Y, 0); - StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniInfotronRollRight[dx - 1]); + StretchedSprites.BltEx(X + (TwoPixels * dx), Y, aniFramesInfotronRollRight[dx - 1]); +#endif // +++++++++++++++++++++++++++++++++++++++++++++++++++++ bl = HighByte(PlayField16[si]) + 1; if (bl < 0x62) @@ -446,4 +472,3 @@ loc_g_1722: return subCleanUpForInfotronsAbove; } // subCleanUpForInfotronsAbove -