[AD] CONST-correctness in C version of Allegro

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


It looks like I'm the only human being who have tried to compile the C
version of the library under DJGPP : it doesn't compile and nobody noticed
it before me :-)
When you define ALLEGRO_USE_C in the makefile, you just can't compile with
DJGPP because CONST-correctness seems not to have been applied to the
following files (AL_CONST are missing on the original files) .
ccsrpite.c :
COMPILED_SPRITE *get_compiled_sprite(AL_CONST BITMAP *bitmap, int planar)
void draw_compiled_sprite(BITMAP *dst, AL_CONST COMPILED_SPRITE *src, int x,
int y)

in cgfx.h :
int FUNC_LINEAR_GETPIXEL(AL_CONST BITMAP *src, int sx, int sy)

in cmisc.c :
void apply_matrix_f(AL_CONST MATRIX_f *m, float x, float y, float z,
      float *xout, float *yout, float *zout)

in cstretch.c :
void stretch_blit(AL_CONST BITMAP *src, BITMAP *dst, int sx, int sy, int sw,
int sh, int dx, int dy, int dw, int dh)
void stretch_sprite(BITMAP *dst, AL_CONST BITMAP *src, int x, int y, int w,
int h)

in csprh.h :
In this file, every function is wrong :
void FUNC_LINEAR_DRAW_SPRITE(BITMAP *dst, AL_CONST BITMAP *src, int dx, int
dy)
void FUNC_LINEAR_DRAW_256_SPRITE(BITMAP *dst, AL_CONST BITMAP *src, int dx,
int dy)
void FUNC_LINEAR_DRAW_SPRITE_V_FLIP(BITMAP *dst, AL_CONST BITMAP *src, int
dx, int dy)
void FUNC_LINEAR_DRAW_SPRITE_H_FLIP(BITMAP *dst, AL_CONST BITMAP *src, int
dx, int dy)
void FUNC_LINEAR_DRAW_SPRITE_VH_FLIP(BITMAP *dst, AL_CONST BITMAP *src, int
dx, int dy)
void FUNC_LINEAR_DRAW_TRANS_SPRITE(BITMAP *dst, AL_CONST BITMAP *src, int
dx, int dy)
void FUNC_LINEAR_DRAW_TRANS_RGBA_SPRITE(BITMAP *dst, AL_CONST BITMAP *src,
int dx, int dy)
void FUNC_LINEAR_DRAW_LIT_SPRITE(BITMAP *dst, AL_CONST BITMAP *src, int dx,
int dy, int color)
void FUNC_LINEAR_DRAW_CHARACTER(BITMAP *dst, AL_CONST BITMAP *src, int dx,
int dy, int color)
void FUNC_LINEAR_DRAW_RLE_SPRITE(BITMAP *dst, AL_CONST RLE_SPRITE *src, int
dx, int dy)
void FUNC_LINEAR_DRAW_TRANS_RLE_SPRITE(BITMAP *dst, AL_CONST RLE_SPRITE
*src, int dx, int dy)
void FUNC_LINEAR_DRAW_TRANS_RGBA_RLE_SPRITE(BITMAP *dst, AL_CONST RLE_SPRITE
*src, int dx, int dy)
void FUNC_LINEAR_DRAW_LIT_RLE_SPRITE(BITMAP *dst, AL_CONST RLE_SPRITE *src,
int dx, int dy, int color)

When CONST correctness is good, the library compile :-)

Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/