1
0
Fork 0

obj.cxx: use more explicit parenthases.

texload.[ch]: use const in function definitions where appropriate.
This commit is contained in:
curt 1998-08-20 15:16:43 +00:00
parent 9b94c66383
commit 82702880dd
3 changed files with 10 additions and 6 deletions

View file

@ -231,7 +231,7 @@ int fgObjLoad(char *path, fgTILE *t) {
"Ack! unknown usemtl name = %s in %s\n",
material, path);
} else {
fragment.material_ptr = &(*myfind).second;
fragment.material_ptr = &((*myfind).second);
}
// initialize the fragment transformation matrix
@ -490,6 +490,10 @@ int fgObjLoad(char *path, fgTILE *t) {
// $Log$
// Revision 1.23 1998/08/20 15:16:43 curt
// obj.cxx: use more explicit parenthases.
// texload.[ch]: use const in function definitions where appropriate.
//
// Revision 1.22 1998/08/20 15:12:03 curt
// Used a forward declaration of classes fgTILE and fgMATERIAL to eliminate
// the need for "void" pointers and casts.

View file

@ -73,7 +73,7 @@ ConvertUint(unsigned *array, unsigned int length) {
}
}
static ImageRec *ImageOpen(char *fileName)
static ImageRec *ImageOpen(const char *fileName)
{
union {
int testWord;
@ -182,7 +182,7 @@ ImageGetRow(ImageRec *image, unsigned char *buf, int y, int z) {
}
GLubyte *
read_alpha_texture(char *name, int *width, int *height)
read_alpha_texture(const char *name, int *width, int *height)
{
unsigned char *base, *lptr;
ImageRec *image;
@ -215,7 +215,7 @@ read_alpha_texture(char *name, int *width, int *height)
}
GLubyte *
read_rgb_texture(char *name, int *width, int *height)
read_rgb_texture(const char *name, int *width, int *height)
{
unsigned char *base, *ptr;
unsigned char *rbuf, *gbuf, *bbuf, *abuf;

View file

@ -18,8 +18,8 @@ extern "C" {
#endif
extern GLubyte *read_alpha_texture(char *name, int *width, int *height);
extern GLubyte * read_rgb_texture(char *name, int *width, int *height);
extern GLubyte *read_alpha_texture(const char *name, int *width, int *height);
extern GLubyte * read_rgb_texture(const char *name, int *width, int *height);
#ifdef __cplusplus