OpenTyrian: Reverted C++-isms from code, to match upstream more closely

This commit is contained in:
pelya
2014-06-09 00:30:50 +03:00
parent cc172312e5
commit eb81855ac7
22 changed files with 80 additions and 91 deletions

View File

@@ -1940,7 +1940,7 @@ void JE_drawMenuChoices( void )
tempY -= 16;
}
str = (char *)malloc(strlen(menuInt[curMenu + 1][x-1])+2);
str = malloc(strlen(menuInt[curMenu + 1][x-1])+2);
if (curSel[curMenu] == x)
{
str[0] = '~';
@@ -2200,7 +2200,7 @@ void JE_scaleBitmap( SDL_Surface *dst_bitmap, const SDL_Surface *src_bitmap, in
//Okay, it's time to loop through and add bits of A to a rectangle in B
Uint8 *dst = (Uint8 *)dst_bitmap->pixels; /* 8-bit specific */
Uint8 *dst = dst_bitmap->pixels; /* 8-bit specific */
const Uint8 *src, *src_w; /* 8-bit specific */
dst += y1 * dst_bitmap->pitch + x1;
@@ -2804,7 +2804,7 @@ void JE_menuFunction( JE_byte select )
case 3:
case 4:
JE_playSampleNum(S_CURSOR);
{
int temp = curSel[curMenu] - 3;
do {
if (joysticks == 0)
@@ -2818,7 +2818,6 @@ void JE_menuFunction( JE_byte select )
inputDevice[temp]++;
}
} while (inputDevice[temp] == inputDevice[temp == 0 ? 1 : 0]);
}
break;
case 5:
curMenu = 2;
@@ -3059,8 +3058,8 @@ void JE_drawShipSpecs( SDL_Surface * screen, SDL_Surface * temp_screen )
* We can't work in place. In fact we'll need to overlay the result
* To avoid our temp screen dependence this has been rewritten to
* only write one line at a time.*/
dst = (Uint8 *)screen->pixels;
src = (Uint8 *)temp_screen->pixels;
dst = screen->pixels;
src = temp_screen->pixels;
for (int y = 0; y < screen->h; y++)
{
for (int x = 0; x < screen->pitch; x++)