[Scummvm-cvs-logs] CVS: residual/tinygl README.residual,1.1,1.2 api.cpp,1.1,1.2 arrays.cpp,1.1,1.2 clear.cpp,1.1,1.2 clip.cpp,1.1,1.2 error.cpp,1.1,1.2 get.cpp,1.1,1.2 gl.h,1.1,1.2 image_util.cpp,1.1,1.2 init.cpp,1.1,1.2 light.cpp,1.1,1.2 list.cpp,1.1,1.2 matrix.cpp,1.1,1.2 memory.cpp,1.1,1.2 misc.cpp,1.1,1.2 select.cpp,1.1,1.2 specbuf.cpp,1.1,1.2 texture.cpp,1.1,1.2 vertex.cpp,1.1,1.2 zbuffer.cpp,1.1,1.2 zbuffer.h,1.1,1.2 zdither.cpp,1.1,1.2 zgl.h,1.1,1.2 zline.cpp,1.1,1.2 zmath.cpp,1.1,1.2 ztriangle.cpp,1.1,1.2
Pawel Kolodziejski
aquadran at users.sourceforge.net
Wed Jan 12 07:28:14 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: residual/tinygl LICENCE,NONE,1.1 README.residual,NONE,1.1 api.cpp,NONE,1.1 arrays.cpp,NONE,1.1 clear.cpp,NONE,1.1 clip.cpp,NONE,1.1 error.cpp,NONE,1.1 get.cpp,NONE,1.1 gl.h,NONE,1.1 image_util.cpp,NONE,1.1 init.cpp,NONE,1.1 light.cpp,NONE,1.1 list.cpp,NONE,1.1 matrix.cpp,NONE,1.1 memory.cpp,NONE,1.1 misc.cpp,NONE,1.1 msghandling.cpp,NONE,1.1 msghandling.h,NONE,1.1 opinfo.h,NONE,1.1 select.cpp,NONE,1.1 specbuf.cpp,NONE,1.1 specbuf.h,NONE,1.1 texture.cpp,NONE,1.1 vertex.cpp,NONE,1.1 zbuffer.cpp,NONE,1.1 zbuffer.h,NONE,1.1 zdither.cpp,NONE,1.1 zfeatures.h,NONE,1.1 zgl.h,NONE,1.1 zline.cpp,NONE,1.1 zline.h,NONE,1.1 zmath.cpp,NONE,1.1 zmath.h,NONE,1.1 ztriangle.cpp,NONE,1.1 ztriangle.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: residual/tinygl .cvsignore,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual/tinygl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19401
Modified Files:
README.residual api.cpp arrays.cpp clear.cpp clip.cpp
error.cpp get.cpp gl.h image_util.cpp init.cpp light.cpp
list.cpp matrix.cpp memory.cpp misc.cpp select.cpp specbuf.cpp
texture.cpp vertex.cpp zbuffer.cpp zbuffer.h zdither.cpp zgl.h
zline.cpp zmath.cpp ztriangle.cpp
Log Message:
added changes for proper c++ compile
Index: README.residual
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/README.residual,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- README.residual 12 Jan 2005 15:20:01 -0000 1.1
+++ README.residual 12 Jan 2005 15:26:45 -0000 1.2
@@ -3,3 +3,6 @@
* Changed files extensions from *.c to *.cpp to compile as C++.
* Included only files needed by Residual.
+* Changed includes paths in source files.
+* Added needed type cast after malloc funcs and one fix for proper
+ compile.
Index: api.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/api.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- api.cpp 12 Jan 2005 15:20:01 -0000 1.1
+++ api.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
#include <stdio.h>
/* glVertex */
Index: arrays.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/arrays.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- arrays.cpp 12 Jan 2005 15:20:01 -0000 1.1
+++ arrays.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
#include <assert.h>
#include <stdio.h>
@@ -130,7 +130,7 @@
{
c->vertex_array_size = p[1].i;
c->vertex_array_stride = p[2].i;
- c->vertex_array = p[3].p;
+ c->vertex_array = (float *)p[3].p;
}
void
@@ -151,7 +151,7 @@
{
c->color_array_size = p[1].i;
c->color_array_stride = p[2].i;
- c->color_array = p[3].p;
+ c->color_array = (float *)p[3].p;
}
void
@@ -171,7 +171,7 @@
glopNormalPointer(GLContext *c, GLParam *p)
{
c->normal_array_stride = p[1].i;
- c->normal_array = p[2].p;
+ c->normal_array = (float *)p[2].p;
}
void
@@ -190,7 +190,7 @@
{
c->texcoord_array_size = p[1].i;
c->texcoord_array_stride = p[2].i;
- c->texcoord_array = p[3].p;
+ c->texcoord_array = (float *)p[3].p;
}
void
Index: clear.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/clear.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- clear.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ clear.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
void glopClearColor(GLContext *c,GLParam *p)
Index: clip.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/clip.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- clip.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ clip.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
/* fill triangle profile */
/* #define PROFILE */
@@ -404,7 +404,7 @@
#ifdef PROFILE
count_triangles_textured++;
#endif
- ZB_setTexture(c->zb,c->current_texture->images[0].pixmap);
+ ZB_setTexture(c->zb,(PIXEL *)c->current_texture->images[0].pixmap);
ZB_fillTriangleMappingPerspective(c->zb,&p0->zp,&p1->zp,&p2->zp);
} else if (c->current_shade_model == GL_SMOOTH) {
ZB_fillTriangleSmooth(c->zb,&p0->zp,&p1->zp,&p2->zp);
Index: error.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/error.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- error.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ error.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,5 +1,5 @@
#include <stdarg.h>
-#include "zgl.h"
+#include "tinygl/zgl.h"
void gl_fatal_error(char *format, ...)
{
Index: get.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/get.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- get.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ get.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
void glGetIntegerv(int pname,int *params)
{
Index: gl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/gl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gl.h 12 Jan 2005 15:20:02 -0000 1.1
+++ gl.h 12 Jan 2005 15:26:45 -0000 1.2
@@ -6,10 +6,6 @@
#define GL_VERSION_1_1 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-
enum {
/* Boolean values */
GL_FALSE = 0,
@@ -831,8 +827,4 @@
void glInit(void *zbuffer);
void glClose(void);
-#ifdef __cplusplus
-}
-#endif
-
#endif
Index: image_util.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/image_util.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- image_util.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ image_util.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
/*
* image conversion
Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/init.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- init.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ init.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
GLContext *gl_ctx;
@@ -6,8 +6,8 @@
void initSharedState(GLContext *c)
{
GLSharedState *s=&c->shared_state;
- s->lists=gl_zalloc(sizeof(GLList *) * MAX_DISPLAY_LISTS);
- s->texture_hash_table=
+ s->lists=(GLList **)gl_zalloc(sizeof(GLList *) * MAX_DISPLAY_LISTS);
+ s->texture_hash_table=(GLTexture **)
gl_zalloc(sizeof(GLTexture *) * TEXTURE_HASH_TABLE_SIZE);
alloc_texture(c,0);
@@ -34,14 +34,14 @@
GLViewport *v;
int i;
- c=gl_zalloc(sizeof(GLContext));
+ c=(GLContext *)gl_zalloc(sizeof(GLContext));
gl_ctx=c;
c->zb=zbuffer;
/* allocate GLVertex array */
c->vertex_max = POLYGON_MAX_VERTEX;
- c->vertex = gl_malloc(POLYGON_MAX_VERTEX*sizeof(GLVertex));
+ c->vertex = (GLVertex *)gl_malloc(POLYGON_MAX_VERTEX*sizeof(GLVertex));
/* viewport */
v=&c->viewport;
@@ -150,7 +150,7 @@
c->matrix_stack_depth_max[2]=MAX_TEXTURE_STACK_DEPTH;
for(i=0;i<3;i++) {
- c->matrix_stack[i]=gl_zalloc(c->matrix_stack_depth_max[i] * sizeof(M4));
+ c->matrix_stack[i]=(M4*)gl_zalloc(c->matrix_stack_depth_max[i] * sizeof(M4));
c->matrix_stack_ptr[i]=c->matrix_stack[i];
}
Index: light.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/light.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- light.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ light.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,5 +1,5 @@
-#include "zgl.h"
-#include "msghandling.h"
+#include "tinygl/zgl.h"
+#include "tinygl/msghandling.h"
void glopMaterial(GLContext *c,GLParam *p)
{
@@ -113,7 +113,7 @@
float a=v.v[0];
assert(a == 180 || (a>=0 && a<=90));
l->spot_cutoff=a;
- if (a != 180) l->cos_spot_cutoff=cos(a * M_PI / 180.0);
+ if (a != 180) l->cos_spot_cutoff=cos(a * PI / 180.0);
}
break;
case GL_CONSTANT_ATTENUATION:
Index: list.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/list.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- list.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ list.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
static char *op_table_str[]=
{
@@ -57,8 +57,8 @@
GLList *l;
GLParamBuffer *ob;
- l=gl_zalloc(sizeof(GLList));
- ob=gl_zalloc(sizeof(GLParamBuffer));
+ l=(GLList *)gl_zalloc(sizeof(GLList));
+ ob=(GLParamBuffer *)gl_zalloc(sizeof(GLParamBuffer));
ob->next=NULL;
l->first_op_buffer=ob;
@@ -113,7 +113,7 @@
/* we should be able to add a NextBuffer opcode */
if ((index + op_size) > (OP_BUFFER_MAX_SIZE-2)) {
- ob1=gl_zalloc(sizeof(GLParamBuffer));
+ ob1=(GLParamBuffer *)gl_zalloc(sizeof(GLParamBuffer));
ob1->next=NULL;
ob->next=ob1;
Index: matrix.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/matrix.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- matrix.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ matrix.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
void gl_print_matrix( const float *m)
{
@@ -116,7 +116,7 @@
float angle;
int dir_code;
- angle = p[1].f * M_PI / 180.0;
+ angle = p[1].f * PI / 180.0;
u[0]=p[2].f;
u[1]=p[3].f;
u[2]=p[4].f;
Index: memory.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/memory.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- memory.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ memory.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,7 +1,7 @@
/*
* Memory allocator for TinyGL
*/
-#include "zgl.h"
+#include "tinygl/zgl.h"
/* modify these functions so that they suit your needs */
Index: misc.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/misc.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- misc.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ misc.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
#include "msghandling.h"
void glopViewport(GLContext *c,GLParam *p)
Index: select.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/select.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- select.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ select.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,4 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
int glRenderMode(int mode)
{
Index: specbuf.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/specbuf.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- specbuf.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ specbuf.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,5 +1,5 @@
-#include "zgl.h"
-#include "msghandling.h"
+#include "tinygl/zgl.h"
+#include "tinygl/msghandling.h"
#include <math.h>
#include <stdlib.h>
@@ -33,7 +33,7 @@
}
if (oldest == NULL || c->specbuf_num_buffers < MAX_SPECULAR_BUFFERS) {
/* create new buffer */
- GLSpecBuf *buf = gl_malloc(sizeof(GLSpecBuf));
+ GLSpecBuf *buf = (GLSpecBuf *)gl_malloc(sizeof(GLSpecBuf));
if (!buf) gl_fatal_error("could not allocate specular buffer");
c->specbuf_num_buffers++;
buf->next = c->specbuf_first;
Index: texture.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/texture.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- texture.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ texture.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -2,7 +2,7 @@
* Texture Manager
*/
-#include "zgl.h"
+#include "tinygl/zgl.h"
static GLTexture *find_texture(GLContext *c,int h)
{
@@ -44,7 +44,7 @@
{
GLTexture *t,**ht;
- t=gl_zalloc(sizeof(GLTexture));
+ t=(GLTexture *)gl_zalloc(sizeof(GLTexture));
ht=&c->shared_state.texture_hash_table[h % TEXTURE_HASH_TABLE_SIZE];
@@ -144,14 +144,14 @@
do_free=0;
if (width != 256 || height != 256) {
- pixels1 = gl_malloc(256 * 256 * 3);
+ pixels1 = (unsigned char *)gl_malloc(256 * 256 * 3);
/* no interpolation is done here to respect the original image aliasing ! */
- gl_resizeImageNoInterpolate(pixels1,256,256,pixels,width,height);
+ gl_resizeImageNoInterpolate(pixels1,256,256,(unsigned char *)pixels,width,height);
do_free=1;
width=256;
height=256;
} else {
- pixels1=pixels;
+ pixels1=(unsigned char *)pixels;
}
im=&c->current_texture->images[level];
@@ -171,7 +171,7 @@
#elif TGL_FEATURE_RENDER_BITS == 16
im->pixmap=gl_malloc(width*height*2);
if(im->pixmap) {
- gl_convertRGB_to_5R6G5B(im->pixmap,pixels1,width,height);
+ gl_convertRGB_to_5R6G5B((unsigned short *)im->pixmap,pixels1,width,height);
}
#else
#error TODO
Index: vertex.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/vertex.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- vertex.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ vertex.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,4 +1,5 @@
-#include "zgl.h"
+#include "tinygl/zgl.h"
+#include <string.h>
void glopNormal(GLContext * c, GLParam * p)
{
@@ -219,7 +220,7 @@
if (n >= c->vertex_max) {
GLVertex *newarray;
c->vertex_max <<= 1; /* just double size */
- newarray = gl_malloc(sizeof(GLVertex) * c->vertex_max);
+ newarray = (GLVertex *)gl_malloc(sizeof(GLVertex) * c->vertex_max);
if (!newarray) {
gl_fatal_error("unable to allocate GLVertex array.\n");
}
Index: zbuffer.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zbuffer.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zbuffer.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ zbuffer.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <assert.h>
#include <string.h>
-#include "zbuffer.h"
+#include "tinygl/zbuffer.h"
ZBuffer *ZB_open(int xsize, int ysize, int mode,
int nb_colors,
@@ -18,7 +18,7 @@
ZBuffer *zb;
int size;
- zb = gl_malloc(sizeof(ZBuffer));
+ zb = (ZBuffer *)gl_malloc(sizeof(ZBuffer));
if (zb == NULL)
return NULL;
@@ -48,12 +48,12 @@
size = zb->xsize * zb->ysize * sizeof(unsigned short);
- zb->zbuf = gl_malloc(size);
+ zb->zbuf = (unsigned short *)gl_malloc(size);
if (zb->zbuf == NULL)
goto error;
if (frame_buffer == NULL) {
- zb->pbuf = gl_malloc(zb->ysize * zb->linesize);
+ zb->pbuf = (PIXEL *)gl_malloc(zb->ysize * zb->linesize);
if (zb->pbuf == NULL) {
gl_free(zb->zbuf);
goto error;
@@ -61,7 +61,7 @@
zb->frame_buffer_allocated = 1;
} else {
zb->frame_buffer_allocated = 0;
- zb->pbuf = frame_buffer;
+ zb->pbuf = (PIXEL *)frame_buffer;
}
zb->current_texture = NULL;
@@ -100,16 +100,16 @@
size = zb->xsize * zb->ysize * sizeof(unsigned short);
gl_free(zb->zbuf);
- zb->zbuf = gl_malloc(size);
+ zb->zbuf = (unsigned short *)gl_malloc(size);
if (zb->frame_buffer_allocated)
gl_free(zb->pbuf);
if (frame_buffer == NULL) {
- zb->pbuf = gl_malloc(zb->ysize * zb->linesize);
+ zb->pbuf = (PIXEL *)gl_malloc(zb->ysize * zb->linesize);
zb->frame_buffer_allocated = 1;
} else {
- zb->pbuf = frame_buffer;
+ zb->pbuf = (PIXEL *)frame_buffer;
zb->frame_buffer_allocated = 0;
}
}
@@ -123,7 +123,7 @@
int y, n;
q = zb->pbuf;
- p1 = buf;
+ p1 =(unsigned char *) buf;
n = zb->xsize * PSZB;
for (y = 0; y < zb->ysize; y++) {
memcpy(p1, q, n);
@@ -247,7 +247,7 @@
int y, n;
q = zb->pbuf;
- p1 = (unsigned int *) buf;
+ p1 = (unsigned int *)buf;
linesize = linesize * 3;
for (y = 0; y < zb->ysize; y++) {
@@ -264,8 +264,9 @@
q += 4;
p += 3;
} while (--n > 0);
-
- (char *) p1 += linesize;
+ char *t = (char *)p1;
+ t += linesize;
+ p1 = (unsigned int *)t;
}
}
@@ -277,7 +278,7 @@
switch (zb->mode) {
#ifdef TGL_FEATURE_8_BITS
case ZB_MODE_INDEX:
- ZB_ditherFrameBuffer(zb, buf, linesize >> 1);
+ ZB_ditherFrameBuffer(zb, (unsigned char *)buf, linesize >> 1);
break;
#endif
#ifdef TGL_FEATURE_16_BITS
@@ -416,7 +417,7 @@
unsigned int *p;
unsigned short *q;
- p = adr;
+ p = (unsigned int *)adr;
v = val | (val << 16);
n = count >> 3;
@@ -439,7 +440,7 @@
int i, n, v;
unsigned int *p;
- p = adr;
+ p = (unsigned int *)adr;
v = val;
n = count >> 2;
for (i = 0; i < n; i++) {
Index: zbuffer.h
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zbuffer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zbuffer.h 12 Jan 2005 15:20:02 -0000 1.1
+++ zbuffer.h 12 Jan 2005 15:26:45 -0000 1.2
@@ -5,7 +5,7 @@
* Z buffer
*/
-#include "zfeatures.h"
+#include "tinygl/zfeatures.h"
#define ZB_Z_BITS 16
Index: zdither.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zdither.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zdither.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ zdither.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include "zbuffer.h"
+#include "tinygl/zbuffer.h"
#include <assert.h>
#if defined(TGL_FEATURE_8_BITS)
@@ -45,7 +45,7 @@
for(i=0;i<nb_colors;i++) color_table[i]=0;
zb->nb_colors=nb_colors;
- zb->ctable=gl_malloc(nb_colors * sizeof(int));
+ zb->ctable=(int *)gl_malloc(nb_colors * sizeof(int));
for (r = 0; r < _R; r++) {
for (g = 0; g < _G; g++) {
@@ -61,7 +61,7 @@
}
}
- zb->dctable=gl_malloc( DITHER_TABLE_SIZE );
+ zb->dctable=(unsigned char *)gl_malloc( DITHER_TABLE_SIZE );
for(i=0;i<DITHER_TABLE_SIZE;i++) {
r=(i >> 12) & 0x7;
Index: zgl.h
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zgl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zgl.h 12 Jan 2005 15:20:02 -0000 1.1
+++ zgl.h 12 Jan 2005 15:26:45 -0000 1.2
@@ -5,10 +5,10 @@
#include <stdio.h>
#include <math.h>
#include <assert.h>
-#include <GL/gl.h>
-#include "zbuffer.h"
-#include "zmath.h"
-#include "zfeatures.h"
+#include "tinygl/gl.h"
+#include "tinygl/zbuffer.h"
+#include "tinygl/zmath.h"
+#include "tinygl/zfeatures.h"
#define DEBUG
/* #define NDEBUG */
@@ -324,27 +324,23 @@
void gl_fatal_error(char *format, ...);
+#ifndef PI
+#define PI 3.14159265358979323846
+#endif
/* specular buffer "api" */
GLSpecBuf *specbuf_get_buffer(GLContext *c, const int shininess_i,
const float shininess);
-#ifdef __BEOS__
-void dprintf(const char *, ...);
-
-#else /* !BEOS */
-
#ifdef DEBUG
-#define dprintf(format, args...) \
- fprintf(stderr,"In '%s': " format "\n",__FUNCTION__, ##args);
+#define dprintf fprintf
#else
-#define dprintf(format, args...)
+#define dprintf
#endif
-#endif /* !BEOS */
/* glopXXX functions */
Index: zline.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zline.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zline.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ zline.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,5 +1,5 @@
#include <stdlib.h>
-#include "zbuffer.h"
+#include "tinygl/zbuffer.h"
#define ZCMP(z,zpix) ((z) >= (zpix))
Index: zmath.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/zmath.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- zmath.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ zmath.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "zmath.h"
+#include "tinygl/zmath.h"
/* ******* Gestion des matrices 4x4 ****** */
Index: ztriangle.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/tinygl/ztriangle.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ztriangle.cpp 12 Jan 2005 15:20:02 -0000 1.1
+++ ztriangle.cpp 12 Jan 2005 15:26:45 -0000 1.2
@@ -1,5 +1,5 @@
#include <stdlib.h>
-#include "zbuffer.h"
+#include "tinygl/zbuffer.h"
#define ZCMP(z,zpix) ((z) >= (zpix))
- Previous message: [Scummvm-cvs-logs] CVS: residual/tinygl LICENCE,NONE,1.1 README.residual,NONE,1.1 api.cpp,NONE,1.1 arrays.cpp,NONE,1.1 clear.cpp,NONE,1.1 clip.cpp,NONE,1.1 error.cpp,NONE,1.1 get.cpp,NONE,1.1 gl.h,NONE,1.1 image_util.cpp,NONE,1.1 init.cpp,NONE,1.1 light.cpp,NONE,1.1 list.cpp,NONE,1.1 matrix.cpp,NONE,1.1 memory.cpp,NONE,1.1 misc.cpp,NONE,1.1 msghandling.cpp,NONE,1.1 msghandling.h,NONE,1.1 opinfo.h,NONE,1.1 select.cpp,NONE,1.1 specbuf.cpp,NONE,1.1 specbuf.h,NONE,1.1 texture.cpp,NONE,1.1 vertex.cpp,NONE,1.1 zbuffer.cpp,NONE,1.1 zbuffer.h,NONE,1.1 zdither.cpp,NONE,1.1 zfeatures.h,NONE,1.1 zgl.h,NONE,1.1 zline.cpp,NONE,1.1 zline.h,NONE,1.1 zmath.cpp,NONE,1.1 zmath.h,NONE,1.1 ztriangle.cpp,NONE,1.1 ztriangle.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: residual/tinygl .cvsignore,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list