mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 08:41:16 +00:00
Use MxS32 instead of int
This commit is contained in:
parent
03c4b5789c
commit
b90ae91cb6
@ -60,13 +60,13 @@ void MxTransitionManager::Transition_Dissolve()
|
|||||||
// If we are starting the animation
|
// If we are starting the animation
|
||||||
if (m_animationTimer == 0) {
|
if (m_animationTimer == 0) {
|
||||||
// Generate the list of columns in order...
|
// Generate the list of columns in order...
|
||||||
for (int i = 0; i < 640; i++) {
|
for (MxS32 i = 0; i < 640; i++) {
|
||||||
m_columnOrder[i] = i;
|
m_columnOrder[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...then shuffle the list (to ensure that we hit each column once)
|
// ...then shuffle the list (to ensure that we hit each column once)
|
||||||
for (i = 0; i < 640; i++) {
|
for (i = 0; i < 640; i++) {
|
||||||
int swap = rand() % 640;
|
MxS32 swap = rand() % 640;
|
||||||
MxU16 t = m_columnOrder[i];
|
MxU16 t = m_columnOrder[i];
|
||||||
m_columnOrder[i] = m_columnOrder[swap];
|
m_columnOrder[i] = m_columnOrder[swap];
|
||||||
m_columnOrder[swap] = t;
|
m_columnOrder[swap] = t;
|
||||||
@ -92,7 +92,7 @@ void MxTransitionManager::Transition_Dissolve()
|
|||||||
if (res == DD_OK) {
|
if (res == DD_OK) {
|
||||||
FUN_1004c4d0(ddsd);
|
FUN_1004c4d0(ddsd);
|
||||||
|
|
||||||
for (int i = 0; i < 640; i++) {
|
for (MxS32 i = 0; i < 640; i++) {
|
||||||
// Select 16 columns on each tick
|
// Select 16 columns on each tick
|
||||||
if (m_animationTimer * 16 > m_columnOrder[i])
|
if (m_animationTimer * 16 > m_columnOrder[i])
|
||||||
continue;
|
continue;
|
||||||
@ -100,11 +100,11 @@ void MxTransitionManager::Transition_Dissolve()
|
|||||||
if (m_animationTimer * 16 + 15 < m_columnOrder[i])
|
if (m_animationTimer * 16 + 15 < m_columnOrder[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (int j = 0; j < 480; j++) {
|
for (MxS32 j = 0; j < 480; j++) {
|
||||||
// Shift the chosen column a different amount at each scanline.
|
// Shift the chosen column a different amount at each scanline.
|
||||||
// We use the same shift for that scanline each time.
|
// We use the same shift for that scanline each time.
|
||||||
// By the end, every pixel gets hit.
|
// By the end, every pixel gets hit.
|
||||||
int ofs = (m_randomShift[j] + i) % 640;
|
MxS32 ofs = (m_randomShift[j] + i) % 640;
|
||||||
|
|
||||||
// Set the chosen pixel to black
|
// Set the chosen pixel to black
|
||||||
if (ddsd.ddpfPixelFormat.dwRGBBitCount == 8) {
|
if (ddsd.ddpfPixelFormat.dwRGBBitCount == 8) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user