mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
replace tinygl tgl_fatal_error with error()
This commit is contained in:
parent
f0c6e8faf3
commit
e1e997a0c1
@ -557,9 +557,6 @@
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\clip.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\error.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\get.cpp">
|
||||
</File>
|
||||
|
@ -571,9 +571,6 @@
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\clip.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\error.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\get.cpp">
|
||||
</File>
|
||||
|
@ -782,10 +782,6 @@
|
||||
RelativePath="..\..\engine\tinygl\clip.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\error.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\get.cpp"
|
||||
>
|
||||
|
@ -787,10 +787,6 @@
|
||||
RelativePath="..\..\engine\tinygl\clip.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\error.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\engine\tinygl\get.cpp"
|
||||
>
|
||||
|
@ -84,7 +84,6 @@
|
||||
289EEF1A0D8921F600521A80 /* arrays.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEB40D8921F600521A80 /* arrays.cpp */; };
|
||||
289EEF1B0D8921F600521A80 /* clear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEB50D8921F600521A80 /* clear.cpp */; };
|
||||
289EEF1C0D8921F600521A80 /* clip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEB60D8921F600521A80 /* clip.cpp */; };
|
||||
289EEF1D0D8921F600521A80 /* error.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEB70D8921F600521A80 /* error.cpp */; };
|
||||
289EEF1E0D8921F600521A80 /* get.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEB80D8921F600521A80 /* get.cpp */; };
|
||||
289EEF1F0D8921F600521A80 /* image_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEBA0D8921F600521A80 /* image_util.cpp */; };
|
||||
289EEF200D8921F600521A80 /* init.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEBB0D8921F600521A80 /* init.cpp */; };
|
||||
@ -291,7 +290,6 @@
|
||||
289EEEB40D8921F600521A80 /* arrays.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = arrays.cpp; sourceTree = "<group>"; };
|
||||
289EEEB50D8921F600521A80 /* clear.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = clear.cpp; sourceTree = "<group>"; };
|
||||
289EEEB60D8921F600521A80 /* clip.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = clip.cpp; sourceTree = "<group>"; };
|
||||
289EEEB70D8921F600521A80 /* error.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = error.cpp; sourceTree = "<group>"; };
|
||||
289EEEB80D8921F600521A80 /* get.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = get.cpp; sourceTree = "<group>"; };
|
||||
289EEEB90D8921F600521A80 /* gl.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = gl.h; sourceTree = "<group>"; };
|
||||
289EEEBA0D8921F600521A80 /* image_util.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = image_util.cpp; sourceTree = "<group>"; };
|
||||
@ -667,7 +665,6 @@
|
||||
289EEEB40D8921F600521A80 /* arrays.cpp */,
|
||||
289EEEB50D8921F600521A80 /* clear.cpp */,
|
||||
289EEEB60D8921F600521A80 /* clip.cpp */,
|
||||
289EEEB70D8921F600521A80 /* error.cpp */,
|
||||
289EEEB80D8921F600521A80 /* get.cpp */,
|
||||
289EEEB90D8921F600521A80 /* gl.h */,
|
||||
289EEEBA0D8921F600521A80 /* image_util.cpp */,
|
||||
@ -861,7 +858,6 @@
|
||||
289EEF1A0D8921F600521A80 /* arrays.cpp in Sources */,
|
||||
289EEF1B0D8921F600521A80 /* clear.cpp in Sources */,
|
||||
289EEF1C0D8921F600521A80 /* clip.cpp in Sources */,
|
||||
289EEF1D0D8921F600521A80 /* error.cpp in Sources */,
|
||||
289EEF1E0D8921F600521A80 /* get.cpp in Sources */,
|
||||
289EEF1F0D8921F600521A80 /* image_util.cpp in Sources */,
|
||||
289EEF200D8921F600521A80 /* init.cpp in Sources */,
|
||||
|
@ -1,17 +0,0 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "engine/tinygl/zgl.h"
|
||||
|
||||
void gl_fatal_error(const char *format, ...) {
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
|
||||
fprintf(stderr, "TinyGL: fatal error: ");
|
||||
vfprintf(stderr, format,ap);
|
||||
fprintf(stderr, "\n");
|
||||
exit(1);
|
||||
|
||||
va_end(ap);
|
||||
}
|
@ -27,7 +27,7 @@ void tglGetIntegerv(int pname,int *params) {
|
||||
*params = MAX_TEXTURE_STACK_DEPTH;
|
||||
break;
|
||||
default:
|
||||
gl_fatal_error("glGet: option not implemented");
|
||||
error("glGet: option not implemented");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void glopCallList(GLContext *c, TGLParam *p) {
|
||||
list = p[1].ui;
|
||||
l = find_list(c, list);
|
||||
if (!l)
|
||||
gl_fatal_error("list %d not defined", list);
|
||||
error("list %d not defined", list);
|
||||
p = l->first_op_buffer->ops;
|
||||
|
||||
while (1) {
|
||||
|
@ -18,13 +18,13 @@ void glopViewport(GLContext *c, TGLParam *p) {
|
||||
ysize_req = ymin + ysize;
|
||||
|
||||
if (c->gl_resize_viewport && c->gl_resize_viewport(c, &xsize_req, &ysize_req) != 0) {
|
||||
gl_fatal_error("glViewport: error while resizing display");
|
||||
error("glViewport: error while resizing display");
|
||||
}
|
||||
|
||||
xsize = xsize_req - xmin;
|
||||
ysize = ysize_req - ymin;
|
||||
if (xsize <= 0 || ysize <= 0) {
|
||||
gl_fatal_error("glViewport: size too small");
|
||||
error("glViewport: size too small");
|
||||
}
|
||||
|
||||
c->viewport.xmin = xmin;
|
||||
|
@ -5,7 +5,6 @@ MODULE_OBJS := \
|
||||
arrays.o \
|
||||
clear.o \
|
||||
clip.o \
|
||||
error.o \
|
||||
get.o \
|
||||
image_util.o \
|
||||
init.o \
|
||||
|
@ -29,7 +29,7 @@ GLSpecBuf *specbuf_get_buffer(GLContext *c, const int shininess_i, const float s
|
||||
// create new buffer
|
||||
GLSpecBuf *buf = (GLSpecBuf *)gl_malloc(sizeof(GLSpecBuf));
|
||||
if (!buf)
|
||||
gl_fatal_error("could not allocate specular buffer");
|
||||
error("could not allocate specular buffer");
|
||||
c->specbuf_num_buffers++;
|
||||
buf->next = c->specbuf_first;
|
||||
c->specbuf_first = buf;
|
||||
|
@ -128,7 +128,7 @@ void glopTexImage2D(GLContext *c, TGLParam *p) {
|
||||
|
||||
if (!(target == TGL_TEXTURE_2D && level == 0 && components == 3 && border == 0
|
||||
&& format == TGL_RGBA && type == TGL_UNSIGNED_BYTE)) {
|
||||
gl_fatal_error("glTexImage2D: combination of parameters not handled");
|
||||
error("glTexImage2D: combination of parameters not handled");
|
||||
}
|
||||
|
||||
do_free = 0;
|
||||
@ -165,7 +165,7 @@ void glopTexEnv(GLContext *, TGLParam *p) {
|
||||
|
||||
if (target != TGL_TEXTURE_ENV) {
|
||||
error:
|
||||
gl_fatal_error("glTexParameter: unsupported option");
|
||||
error("glTexParameter: unsupported option");
|
||||
}
|
||||
|
||||
if (pname != TGL_TEXTURE_ENV_MODE)
|
||||
@ -183,7 +183,7 @@ void glopTexParameter(GLContext *, TGLParam *p) {
|
||||
|
||||
if (target != TGL_TEXTURE_2D) {
|
||||
error:
|
||||
gl_fatal_error("glTexParameter: unsupported option");
|
||||
error("glTexParameter: unsupported option");
|
||||
}
|
||||
|
||||
switch (pname) {
|
||||
@ -202,6 +202,6 @@ void glopPixelStore(GLContext *, TGLParam *p) {
|
||||
int param = p[2].i;
|
||||
|
||||
if (pname != TGL_UNPACK_ALIGNMENT || param != 1) {
|
||||
gl_fatal_error("glPixelStore: unsupported option");
|
||||
error("glPixelStore: unsupported option");
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ void glopVertex(GLContext *c, TGLParam *p) {
|
||||
c->vertex_max <<= 1; // just double size
|
||||
newarray = (GLVertex *)gl_malloc(sizeof(GLVertex) * c->vertex_max);
|
||||
if (!newarray) {
|
||||
gl_fatal_error("unable to allocate GLVertex array.");
|
||||
error("unable to allocate GLVertex array.");
|
||||
}
|
||||
memcpy(newarray, c->vertex, n * sizeof(GLVertex));
|
||||
gl_free(c->vertex);
|
||||
@ -319,7 +319,7 @@ void glopVertex(GLContext *c, TGLParam *p) {
|
||||
case TGL_POLYGON:
|
||||
break;
|
||||
default:
|
||||
gl_fatal_error("glBegin: type %x not handled", c->begin_type);
|
||||
error("glBegin: type %x not handled", c->begin_type);
|
||||
}
|
||||
|
||||
c->vertex_n = n;
|
||||
|
@ -306,8 +306,6 @@ void gl_resizeImageNoInterpolate(unsigned char *dest, int xsize_dest, int ysize_
|
||||
|
||||
GLContext *gl_get_context();
|
||||
|
||||
void gl_fatal_error(const char *format, ...);
|
||||
|
||||
// specular buffer "api"
|
||||
GLSpecBuf *specbuf_get_buffer(GLContext *c, const int shininess_i, const float shininess);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user