- whitespaces

- fix for compilation at MAX, at include types
- changed to our types

svn-id: r12344
This commit is contained in:
Paweł Kołodziejski 2004-01-12 19:08:04 +00:00
parent e4628fbb07
commit b8e3dda84c
4 changed files with 23 additions and 27 deletions

View file

@ -1,7 +1,6 @@
#ifndef ANIMATION_H #ifndef ANIMATION_H
#define ANIMATION_H #define ANIMATION_H
#include <inttypes.h>
#ifdef USE_MPEG2 #ifdef USE_MPEG2
extern "C" { extern "C" {
#include <mpeg2dec/mpeg2.h> #include <mpeg2dec/mpeg2.h>
@ -20,13 +19,11 @@ namespace Sword2 {
typedef struct { typedef struct {
int palnum; int palnum;
unsigned char lookup[2][BITDEPTH*BITDEPTH*BITDEPTH]; byte lookup[2][BITDEPTH * BITDEPTH * BITDEPTH];
unsigned char * lut; byte *lut;
unsigned char * lut2; byte *lut2;
int lutcalcnum; int lutcalcnum;
int framenum; int framenum;
@ -44,10 +41,10 @@ typedef struct {
struct { struct {
int cnt; int cnt;
int end; int end;
unsigned char pal[4*256]; byte pal[4 * 256];
} palettes[50]; } palettes[50];
unsigned char buffer[BUFFER_SIZE]; byte buffer[BUFFER_SIZE];
PlayingSoundHandle bgSound; PlayingSoundHandle bgSound;

View file

@ -249,7 +249,7 @@ public:
void plotPoint(uint16 x, uint16 y, uint8 colour); void plotPoint(uint16 x, uint16 y, uint8 colour);
void drawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 colour); void drawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 colour);
void plotYUV(unsigned char * lut, int width, int height, uint8_t * const * buf); void plotYUV(byte *lut, int width, int height, uint8 *const *buf);
int32 createSurface(SpriteInfo *s, uint8 **surface); int32 createSurface(SpriteInfo *s, uint8 **surface);
void drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL); void drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL);

View file

@ -821,9 +821,8 @@ void Graphics::closeBackgroundLayer(void) {
} }
void Graphics::plotYUV(unsigned char * lut, int width, int height, uint8_t * const * dat) void Graphics::plotYUV(byte *lut, int width, int height, byte *const *dat) {
{ byte *buf = _buffer + (40 + (400 - height) / 2) * RENDERWIDE + (640 - width) / 2;
uint8 *buf = _buffer + (40+(400-height)/2) * RENDERWIDE + (640-width)/2;
int x, y; int x, y;

View file

@ -614,7 +614,7 @@ int32 Logic::fnPlayCredits(int32 *params) {
// credits. Note that musicTimeRemaining() will return 0 if the music // credits. Note that musicTimeRemaining() will return 0 if the music
// is muted, so we need a sensible fallback for that case. // is muted, so we need a sensible fallback for that case.
uint32 musicLength = MAX(1000 * (_vm->_sound->musicTimeRemaining() - 3), 25 * scrollSteps); uint32 musicLength = MAX(1000 * (_vm->_sound->musicTimeRemaining() - 3), 25 * (int32)scrollSteps);
while (scrollPos < scrollSteps && !_vm->_quit) { while (scrollPos < scrollSteps && !_vm->_quit) {
bool foundStartLine = false; bool foundStartLine = false;