30#include <libFreeWRL.h>
34#include "../vrml_parser/Structs.h"
35#include "../opengl/OpenGL_Utils.h"
36#include "../main/headers.h"
37#include "../vrml_parser/CParseGeneral.h"
38#include "../scenegraph/Vector.h"
39#include "../vrml_parser/CFieldDecls.h"
40#include "../vrml_parser/CParseParser.h"
41#include "../vrml_parser/CParseLexer.h"
42#include "../vrml_parser/CParse.h"
46#include "../x3d_parser/Bindable.h"
47#include "../scenegraph/Collision.h"
48#include "../scenegraph/quaternion.h"
49#include "../scenegraph/Viewer.h"
51#include "../opengl/RasterFont.h"
55#define DJ_KEEP_COMPILER_WARNING 0
57#define MAX_BUFFER_SIZE 4096
58static char buffer[MAX_BUFFER_SIZE] =
"\0";
59void render_init(
void);
61#if DJ_KEEP_COMPILER_WARNING
62#define STATUS_LEN 2000
67 int screenWidth, screenHeight;
71void *statusbar_constructor(){
76void statusbar_init(
struct tstatusbar *t){
79 t->prv = statusbar_constructor();
83 p->screenHeight = 200;
93void kill_status (
void) {
99void update_status(
char* msg)
104 strncpy(buffer, msg, MAX_BUFFER_SIZE);
113void hudSetConsoleMessage(
char *buffer){}
114void handleButtonOver(){}
115void handleOptionPress(){}
116void handleButtonPress(){}
118void setMenuButton_collision(
int val){}
119void setMenuButton_texSize(
int size){}
120void setMenuButton_headlight(
int val){}
121void setMenuButton_navModes(
int type){}
124int handleStatusbarHud(
int mev,
int* clipplane)
128void statusbar_set_window_size(
int width,
int height)
132 p->screenHeight = height;
133 p->screenWidth = width;
134 p->screenRatio = 1.5;
136 p->screenRatio = (double)width / (
double)height;
138 p->screenRatio = 1.5;
140 fwl_setScreenDim(width, height);
142void statusbar_handle_mouse(
int mev,
int butnum,
int mouseX,
int mouseY)
147 fwl_handle_aqua(mev, butnum, mouseX, mouseY);
150void setup_projection(
int pick,
int x,
int y)
153 GLsizei screenwidth2 = tg->display.screenWidth;
154 GLDOUBLE aspect2 = tg->display.screenRatio;
156 if(Viewer()->sidebyside)
158 screenwidth2 = (int)((screenwidth2 * .5)+.5);
159 aspect2 = aspect2 * .5;
163 FW_GL_MATRIX_MODE(GL_PROJECTION);
164 FW_GL_VIEWPORT(0,0,screenwidth2,tg->display.screenHeight);
165 FW_GL_LOAD_IDENTITY();
168 if ((Viewer()->fieldofview <= 0.0) || (Viewer()->fieldofview > 180.0)) Viewer()->fieldofview=45.0;
170 FW_GLU_PERSPECTIVE(Viewer()->fieldofview, aspect2, Viewer()->nearPlane, Viewer()->farPlane);
172 FW_GL_MATRIX_MODE(GL_MODELVIEW);
173 PRINT_GL_ERROR_IF_ANY(
"XEvents::setup_projection");
184 if(buffer[0] !=
'\0') {
185 printf(
"%s:%d drawStatusBar NON-FUNCTIONAL %s\n",__FILE__,__LINE__,buffer);
189 #if !(defined(_ANDROID))
193 if ((tg->display.screenWidth > 5) && (tg->display.screenHeight > 5)) {
196 rf_xfont_set_color(xf_white);
199 rf_printf(15, 15, buffer);