#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdarg.h>
#include <string.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include "rendermodes.h"
#include "sketch.h"
Defines | |
#define | SPEED |
#define | SPEED_FAST |
#define | SPEED_SLOW |
#define | VIEW_DIST_ADD |
#define | FPS_X |
#define | FPS_Y |
#define | PRINT_RENDERTIME |
#define | QUIT_POLL_MACRO |
#define | updatecrc32(c, crc) |
#define | updateadl32(c, crc) |
Functions | |
void | fputbytes (unsigned long v, long n) |
Put Bytes. Originally written by Ken Silverman http://www.advsys.net/ken. | |
void | pngoutopenfile (char *fnam, long xsiz, long ysiz) |
Open file for png-output. Originally written by Ken Silverman http://www.advsys.net/ken. | |
void | pngoutputpixel (long rgbcol) |
Output pixel to png-file. Originally written by Ken Silverman http://www.advsys.net/ken. | |
void | free_fdo (void) |
Free the flow data object "fdo". | |
void | cleanup (int status, const char *fmt,...) |
Free resources and exit. | |
void | resizeSDLscreen (int new_w, int new_h) |
Resize screen. | |
void | initSDL (int xs, int ys, int bpp, int fullscreen) |
Create SDL-window. | |
void | getinput (void) |
Input-handler. | |
void | gtk_gui_iteration (void) |
One gtk_main()-iteration. | |
int | initapp (int argc, char **argv) |
The application's "heart". | |
Variables | |
const char * | command_name |
int | vol_loaded |
float | ipos [4] |
float | ifor [4] |
float | iup [4] |
float | istr [4] |
int | rendermode |
uint32_t | rendermode_toggle |
uint32_t | faceshade_toggle |
uint32_t | slice_dir_toggle |
uint32_t | doubleclick_toggle [2] |
uint32_t | click_switcher |
uint32_t | last_mb_up |
uint32_t | last_mb_dn |
uint32_t | last_doubleclick |
uint32_t | tfunc_timeout_response |
char | double_clicked |
uint32_t | tfunc_timeout |
int | refresh |
int | hiqu_auto |
int | lobound |
int | hibound |
char | txt [] |
uint32_t | digit_bg [12 *16 *8] |
int | fill_bg |
int | additional_clears |
uint32_t | showFPS |
int | gmx |
int | gmy |
int | mgrab_rendersurf |
int | mgrab_tfuncsurf |
int | mgrab_rendersurf_rmb |
int | mgrab_tfuncsurf_rmb |
int | draw_single_sline |
float | seedpoint [2] |
FILE * | pngofil |
long | pngoxplc |
long | pngoyplc |
long | pngoxsiz |
long | pngoysiz |
unsigned long | pngocrc |
unsigned long | pngoadcrc |
long | crctab32 [256] |
|
Free resources and exit. Is called, whenever an error occurs or the program terminates noramlly.
|
|
Input-handler. Polls the input-devices. Keyboard, Mouse and Window-manager-events are handled here. |
|
One gtk_main()-iteration. Instead of calling gtk_main() (which does not return control to the program until termination) each iteration is executed explicitly through this function-call. |
|
The application's "heart". int main(int argc, char **argv) - "abstraction" This makes it possible to make a "real" Win32 application out of this (so no console-window is opened upon double-click in the explorer! Don't forget to remove /DCONSOLE when compiling the program). Look at w32main.c for details!
|
|
Create SDL-window. Allocates the necessary buffers for rendering.
|
|
Resize screen. Is called, whenever the window-size changes. Reallocates the necessary buffers for rendering.
|