1 /* Stereograph 2 * Header file; 3 * Copyright (c) 2000 by Fabian Januszewski <fabian.linux@januszewski.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 21 struct GFX_DATA { 22 /* measurements */ 23 int Width; 24 int Height; 25 26 /* RGB-Data, 24bit coding @ ONE 32 bit integer, standard eastern orientation (left to right, top to bottom) */ 27 int *Data; 28 }; 29 30 struct PARAMS { 31 int Startx; 32 int Starty; 33 int AA; 34 int Zoom; 35 int AAr; 36 float Front; 37 float Distance; 38 float Eyeshift; 39 }; 40 41 /* engine internals exclusively */ 42 struct RENDERER_DATA { 43 int startx; 44 int max_change_tex_width; 45 float *right_change_map; 46 float *left_change_map; 47 int naa; 48 int nzoom; 49 int nfactor; 50 int *scanline; 51 float realdist; 52 float internal_a; 53 float eyeshift; 54 }; 55 56 57 /* sets pointers of the engine interface */ 58 int Get_GFX_Pointers(struct PARAMS **pParam, struct GFX_DATA **pBase, struct GFX_DATA **pTexture, struct GFX_DATA **pStereo); 59 60 /* processes line number base_line */ 61 int ProcessLine(int base_line); 62 63 /* clears the renderer */ 64 void Clear_Renderer(void); 65 /* initializes renderer */ 66 int Initialize_Renderer(void); 67 68 69 /* engine internal functions */ 70 int RenderLine(int *base_data, int *texture_data, int *stereo_data); 71 int InitMap(float *change_map, int a, int b, float v); 72 int FillMapsLeftToRight(int *base_data); 73 float GetChange(int x, int *base_data); 74 int NormalScan(int *stereo_data, int *texture_data); 75 int AAScan(int *stereo_data, int *texture_data); 76 int ZoomScan(int *stereo_data, int *texture_data); 77 int ZoomAAScan(int *stereo_data, int *texture_data); |