make compilable after latest change

This commit is contained in:
Pawel Kolodziejski 2009-05-08 07:32:33 +00:00
parent f85c21fa4c
commit 110527019b
26 changed files with 62 additions and 62 deletions

View file

@ -24,8 +24,8 @@ MODULES += \
engine/imuse \ engine/imuse \
engine/lua \ engine/lua \
engine/smush \ engine/smush \
engine/tinygl \
common \ common \
graphics \
mixer mixer

View file

@ -34,8 +34,8 @@
#include "engine/vector3d.h" #include "engine/vector3d.h"
#include "engine/gfx_tinygl.h" #include "engine/gfx_tinygl.h"
#include "engine/tinygl/gl.h" #include "graphics/tinygl/gl.h"
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
// below funcs lookAt, transformPoint and tgluProject are from Mesa glu sources // below funcs lookAt, transformPoint and tgluProject are from Mesa glu sources
static void lookAt(TGLfloat eyex, TGLfloat eyey, TGLfloat eyez, TGLfloat centerx, static void lookAt(TGLfloat eyex, TGLfloat eyey, TGLfloat eyez, TGLfloat centerx,

View file

@ -35,8 +35,8 @@
#include "engine/vector3d.h" #include "engine/vector3d.h"
#include "engine/gfx_base.h" #include "engine/gfx_base.h"
#include "engine/tinygl/gl.h" #include "graphics/tinygl/gl.h"
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
class GfxTinyGL : public GfxBase { class GfxTinyGL : public GfxBase {
public: public:

View file

@ -1,27 +1,27 @@
MODULE := engine/tinygl MODULE := graphics
MODULE_OBJS := \ MODULE_OBJS := \
api.o \ tinygl/api.o \
arrays.o \ tinygl/arrays.o \
clear.o \ tinygl/clear.o \
clip.o \ tinygl/clip.o \
get.o \ tinygl/get.o \
image_util.o \ tinygl/image_util.o \
init.o \ tinygl/init.o \
light.o \ tinygl/light.o \
list.o \ tinygl/list.o \
matrix.o \ tinygl/matrix.o \
memory.o \ tinygl/memory.o \
misc.o \ tinygl/misc.o \
select.o \ tinygl/select.o \
specbuf.o \ tinygl/specbuf.o \
texture.o \ tinygl/texture.o \
vertex.o \ tinygl/vertex.o \
zbuffer.o \ tinygl/zbuffer.o \
zline.o \ tinygl/zline.o \
zmath.o \ tinygl/zmath.o \
ztriangle.o \ tinygl/ztriangle.o \
ztriangle_shadow.o tinygl/ztriangle_shadow.o
# Include common rules # Include common rules
include $(srcdir)/rules.mk include $(srcdir)/rules.mk

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
// glVertex // glVertex

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
#define VERTEX_ARRAY 0x0001 #define VERTEX_ARRAY 0x0001
#define COLOR_ARRAY 0x0002 #define COLOR_ARRAY 0x0002

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
void glopClearColor(GLContext *c, TGLParam *p) { void glopClearColor(GLContext *c, TGLParam *p) {
c->clear_color.v[0] = p[1].f; c->clear_color.v[0] = p[1].f;

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
// fill triangle profile // fill triangle profile
// #define TINYGL_PROFILE // #define TINYGL_PROFILE

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
void tglGetIntegerv(int pname,int *params) { void tglGetIntegerv(int pname,int *params) {
GLContext *c=gl_get_context(); GLContext *c=gl_get_context();

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
// image conversion // image conversion

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
GLContext *gl_ctx; GLContext *gl_ctx;

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
void glopMaterial(GLContext *c, TGLParam *p) { void glopMaterial(GLContext *c, TGLParam *p) {
int mode = p[1].i; int mode = p[1].i;

View file

@ -1,22 +1,22 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
static const char *op_table_str[] = { static const char *op_table_str[] = {
#define ADD_OP(a, b, c) "gl" #a " " #c, #define ADD_OP(a, b, c) "gl" #a " " #c,
#include "engine/tinygl/opinfo.h" #include "graphics/tinygl/opinfo.h"
}; };
static void (*op_table_func[])(GLContext *, TGLParam *) = { static void (*op_table_func[])(GLContext *, TGLParam *) = {
#define ADD_OP(a, b, c) glop ## a , #define ADD_OP(a, b, c) glop ## a ,
#include "engine/tinygl/opinfo.h" #include "graphics/tinygl/opinfo.h"
}; };
static int op_table_size[] = { static int op_table_size[] = {
#define ADD_OP(a, b, c) b + 1 , #define ADD_OP(a, b, c) b + 1 ,
#include "engine/tinygl/opinfo.h" #include "graphics/tinygl/opinfo.h"
}; };
GLContext *gl_get_context() { GLContext *gl_get_context() {

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
void gl_print_matrix(const float *m) { void gl_print_matrix(const float *m) {
int i; int i;

View file

@ -1,7 +1,7 @@
// Memory allocator for TinyGL // Memory allocator for TinyGL
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
// modify these functions so that they suit your needs // modify these functions so that they suit your needs

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
void glopViewport(GLContext *c, TGLParam *p) { void glopViewport(GLContext *c, TGLParam *p) {
int xsize, ysize, xmin, ymin, xsize_req, ysize_req; int xsize, ysize, xmin, ymin, xsize_req, ysize_req;

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
int glRenderMode(int mode) { int glRenderMode(int mode) {
GLContext *c = gl_get_context(); GLContext *c = gl_get_context();

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
static void calc_buf(GLSpecBuf *buf, const float shininess) { static void calc_buf(GLSpecBuf *buf, const float shininess) {
int i; int i;

View file

@ -1,7 +1,7 @@
// Texture Manager // Texture Manager
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
static GLTexture *find_texture(GLContext *c, int h) { static GLTexture *find_texture(GLContext *c, int h) {
GLTexture *t; GLTexture *t;

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zgl.h" #include "graphics/tinygl/zgl.h"
#include <string.h> #include <string.h>

View file

@ -6,7 +6,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "engine/tinygl/zbuffer.h" #include "graphics/tinygl/zbuffer.h"
ZBuffer *ZB_open(int xsize, int ysize, int mode, void *frame_buffer) { ZBuffer *ZB_open(int xsize, int ysize, int mode, void *frame_buffer) {
ZBuffer *zb; ZBuffer *zb;

View file

@ -3,15 +3,15 @@
#include "common/debug.h" #include "common/debug.h"
#include "engine/tinygl/gl.h" #include "graphics/tinygl/gl.h"
#include "engine/tinygl/zbuffer.h" #include "graphics/tinygl/zbuffer.h"
#include "engine/tinygl/zmath.h" #include "graphics/tinygl/zmath.h"
enum { enum {
#define ADD_OP(a,b,c) OP_ ## a , #define ADD_OP(a,b,c) OP_ ## a ,
#include "engine/tinygl/opinfo.h" #include "graphics/tinygl/opinfo.h"
DUMMY DUMMY
}; };

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zbuffer.h" #include "graphics/tinygl/zbuffer.h"
#define ZCMP(z,zpix) ((z) >= (zpix)) #define ZCMP(z,zpix) ((z) >= (zpix))
@ -21,24 +21,24 @@ void ZB_plot(ZBuffer * zb, ZBufferPoint * p) {
#define INTERP_Z #define INTERP_Z
static void ZB_line_flat_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2, int color) { static void ZB_line_flat_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2, int color) {
#include "engine/tinygl/zline.h" #include "graphics/tinygl/zline.h"
} }
// line with color interpolation // line with color interpolation
#define INTERP_Z #define INTERP_Z
#define INTERP_RGB #define INTERP_RGB
static void ZB_line_interp_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) { static void ZB_line_interp_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) {
#include "engine/tinygl/zline.h" #include "graphics/tinygl/zline.h"
} }
// no Z interpolation // no Z interpolation
static void ZB_line_flat(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2, int color) { static void ZB_line_flat(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2, int color) {
#include "engine/tinygl/zline.h" #include "graphics/tinygl/zline.h"
} }
#define INTERP_RGB #define INTERP_RGB
static void ZB_line_interp(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) { static void ZB_line_interp(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) {
#include "engine/tinygl/zline.h" #include "graphics/tinygl/zline.h"
} }
void ZB_line_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) { void ZB_line_z(ZBuffer *zb, ZBufferPoint *p1, ZBufferPoint *p2) {

View file

@ -5,7 +5,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "engine/tinygl/zmath.h" #include "graphics/tinygl/zmath.h"
void gl_M4_Id(M4 *a) { void gl_M4_Id(M4 *a) {
int i, j; int i, j;

View file

@ -1,7 +1,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "engine/tinygl/zbuffer.h" #include "graphics/tinygl/zbuffer.h"
#define ZCMP(z, zpix) ((z) >= (zpix)) #define ZCMP(z, zpix) ((z) >= (zpix))
@ -23,7 +23,7 @@ void ZB_fillTriangleFlat(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBuffe
z += dzdx; \ z += dzdx; \
} }
#include "engine/tinygl/ztriangle.h" #include "graphics/tinygl/ztriangle.h"
} }
// Smooth filled triangle. // Smooth filled triangle.
@ -88,7 +88,7 @@ void ZB_fillTriangleSmooth(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBuf
} \ } \
} }
#include "engine/tinygl/ztriangle.h" #include "graphics/tinygl/ztriangle.h"
} }
void ZB_setTexture(ZBuffer *zb, PIXEL *texture) { void ZB_setTexture(ZBuffer *zb, PIXEL *texture) {
@ -116,7 +116,7 @@ void ZB_fillTriangleMapping(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBu
t += dtdx; \ t += dtdx; \
} }
#include "engine/tinygl/ztriangle.h" #include "graphics/tinygl/ztriangle.h"
} }
void ZB_fillTriangleMappingPerspective(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2) { void ZB_fillTriangleMappingPerspective(ZBuffer *zb, ZBufferPoint *p0, ZBufferPoint *p1, ZBufferPoint *p2) {

View file

@ -1,5 +1,5 @@
#include "engine/tinygl/zbuffer.h" #include "graphics/tinygl/zbuffer.h"
#define ZCMP(z, zpix) ((z) >= (zpix)) #define ZCMP(z, zpix) ((z) >= (zpix))