X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54e29ef9c1110a0ce5fc49c20142ce2ba938cfe0..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/samples/opengl/penguin/lw.cpp diff --git a/samples/opengl/penguin/lw.cpp b/samples/opengl/penguin/lw.cpp index fa9a3827e1..9b2202000c 100644 --- a/samples/opengl/penguin/lw.cpp +++ b/samples/opengl/penguin/lw.cpp @@ -34,7 +34,6 @@ #include "lw.h" #include #include -#include #if wxUSE_GLCANVAS @@ -63,7 +62,7 @@ static wxInt32 read_short(FILE *f) // when using the direct evaluation in the return statement wxInt32 first = read_char(f) ; wxInt32 second = read_char(f) ; - + return (first<<8) | second ; } @@ -91,7 +90,7 @@ static int read_string(FILE *f, char *s) do { c = read_char(f); if (cnt < LW_MAX_NAME_LEN) - s[cnt] = c; + s[cnt] = (char)c; else s[LW_MAX_NAME_LEN-1] = 0; cnt++; @@ -170,7 +169,7 @@ static void read_surf(FILE *f, int nbytes, lwObject *lwo) static void read_pols(FILE *f, int nbytes, lwObject *lwo) { int guess_cnt = lwo->face_cnt; - + while (nbytes > 0) { lwFace *face; int i; @@ -188,17 +187,17 @@ static void read_pols(FILE *f, int nbytes, lwObject *lwo) /* allocate space for points */ face->index = (int*) calloc(sizeof(int)*face->index_cnt,1); - + /* read points in */ for (i=0; iindex_cnt; i++) { face->index[i] = read_short(f); nbytes -= 2; } - + /* read surface material */ face->material = read_short(f); nbytes -= 2; - + /* skip over detail polygons */ if (face->material < 0) { int det_cnt;