68
58
#ifdef GET_SUED_BY_THE_BBC
69
59
{"-locklogo" , ".locklogo", XrmoptionNoArg, "true" },
71
{"-tunonly" , ".tunonly", XrmoptionNoArg, "true" },
61
{"-logo" , ".drawlogo", XrmoptionNoArg, "true" },
62
{"+logo" , ".drawlogo", XrmoptionNoArg, "false" },
72
63
{"-reverse" , ".reverse", XrmoptionNoArg, "true" },
73
64
{"-fog" , ".fog", XrmoptionNoArg, "false" },
81
72
#ifdef GET_SUED_BY_THE_BBC
82
73
{&locklogo, "locklogo", "LockLogo", DEF_LOCKLOGO , t_Bool},
84
{&tunonly, "tunonly", "TunnelOnly", DEF_TUNONLY , t_Bool},
75
{&drawlogo, "drawlogo", "DrawLogo", DEF_DRAWLOGO , t_Bool},
85
76
{&reverse, "reverse", "Reverse", DEF_REVERSE , t_Bool},
86
77
{&do_fog, "fog", "Fog", DEF_FOG , t_Bool},
89
ModeSpecOpt sws_opts = {countof(opts), opts, countof(vars), vars, NULL};
80
ENTRYPOINT ModeSpecOpt tunnel_opts = {countof(opts), opts, countof(vars), vars, NULL};
90
81
#include "xpm-ximage.h"
91
#include "../../utils/images/logo-180.xpm"
92
#include "../images/tunnelstar.xpm"
93
#include "../images/timetunnel0.xpm"
94
#include "../images/timetunnel1.xpm"
95
#include "../images/timetunnel2.xpm"
82
#include "images/logo-180.xpm"
83
#include "images/tunnelstar.xpm"
84
#include "images/timetunnel0.xpm"
85
#include "images/timetunnel1.xpm"
86
#include "images/timetunnel2.xpm"
96
87
#ifdef GET_SUED_BY_THE_BBC
97
# include "../images/tardis.xpm"
98
# include "../images/whologo.xpm"
99
# include "../images/whohead1.xpm"
100
/* #include "../images/whohead_psy.xpm" */
88
# include "images/tardis.xpm"
89
# include "images/whologo.xpm"
90
# include "images/whohead1.xpm"
91
/* #include "images/whohead_psy.xpm" */
101
92
# endif /* GET_SUED_BY_THE_BBC */
104
95
#ifdef USE_GL /* whole file */
108
97
/* ANIMATION CONTROLS */
109
98
/* an effect is a collection of floating point variables that vary with time.
110
99
A knot is a timestamp with an array of floats. State is the current values of the floats.
854
float mylog2(float x) { return ( log(x) / log(2));}
846
static float mylog2(float x) { return ( log(x) / log(2));}
856
static void LoadTexture(ModeInfo * mi, char **fn, unsigned int texbind, int blur, float bw_color, Bool anegative, Bool onealpha)
848
static void LoadTexture(ModeInfo * mi, char **fn, GLuint texbind, int blur, float bw_color, Bool anegative, Bool onealpha)
858
850
/* looping and temporary array index variables */
859
851
int ix, iy, bx, by, indx, indy, boxsize, cchan, tmpidx, dtaidx;
1088
1081
glGenTextures(MAX_TEXTURE, tc->texture_binds);
1090
1083
/*LoadTexture(*mi, **fn, texbind, bluralpha, bw_color, anegative, onealpha)*/
1091
LoadTexture(mi, timetunnel0_xpm, tc->texture_binds[0], 0, 0.0, FALSE, FALSE);
1092
LoadTexture(mi, timetunnel1_xpm, tc->texture_binds[2], 0, 0.0, FALSE, FALSE);
1093
LoadTexture(mi, timetunnel2_xpm, tc->texture_binds[5], 0, 0.0, FALSE, FALSE);
1094
LoadTexture(mi, tunnelstar_xpm, tc->texture_binds[4], 0, 0.0, FALSE, FALSE);
1084
LoadTexture(mi, timetunnel0_xpm, tc->texture_binds[0], 0, 0.0, False, False);
1085
LoadTexture(mi, timetunnel1_xpm, tc->texture_binds[2], 0, 0.0, False, False);
1086
LoadTexture(mi, timetunnel2_xpm, tc->texture_binds[5], 0, 0.0, False, False);
1087
LoadTexture(mi, tunnelstar_xpm, tc->texture_binds[4], 0, 0.0, False, False);
1095
1088
# ifdef GET_SUED_BY_THE_BBC
1096
1089
if (locklogo) {
1097
1090
# endif /* GET_SUED_BY_THE_BBC */
1098
LoadTexture(mi, (char **) logo_180_xpm, tc->texture_binds[3], 0,0.0, FALSE, FALSE);
1091
LoadTexture(mi, (char **) logo_180_xpm, tc->texture_binds[3], 0,0.0, False, False);
1099
1092
tc->texture_binds[1] = tc->texture_binds[3];
1100
1093
tc->texture_binds[6] = tc->texture_binds[3];
1101
1094
tc->texture_binds[8] = tc->texture_binds[3];
1103
LoadTexture(mi, (char **) logo_180_xpm, tc->texture_binds[9], 2,1.0, TRUE, TRUE);
1096
LoadTexture(mi, (char **) logo_180_xpm, tc->texture_binds[9], 2,1.0, True, True);
1104
1097
# ifdef GET_SUED_BY_THE_BBC
1106
LoadTexture(mi, whologo_xpm, tc->texture_binds[3], 0,0.0, FALSE, FALSE);
1107
LoadTexture(mi, tardis_xpm, tc->texture_binds[1], 0, 0.0 ,FALSE, FALSE);
1108
LoadTexture(mi, whohead1_xpm, tc->texture_binds[6], 0, 1.0, FALSE, FALSE);
1109
/* LoadTexture(mi, whohead_psy_xpm, tc->texture_binds[8], 1, 0.7, FALSE, FALSE); */
1099
LoadTexture(mi, whologo_xpm, tc->texture_binds[3], 0,0.0, False, False);
1100
LoadTexture(mi, tardis_xpm, tc->texture_binds[1], 0, 0.0 ,False, False);
1101
LoadTexture(mi, whohead1_xpm, tc->texture_binds[6], 0, 1.0, False, False);
1102
/* LoadTexture(mi, whohead_psy_xpm, tc->texture_binds[8], 1, 0.7, False, False); */
1111
LoadTexture(mi, whohead1_xpm, tc->texture_binds[9], 2, 1.0, TRUE, TRUE);
1104
LoadTexture(mi, whohead1_xpm, tc->texture_binds[9], 2, 1.0, True, True);
1113
1106
# endif /* GET_SUED_BY_THE_BBC */
1114
1107
glEnable(GL_TEXTURE_2D);
1201
1196
/*void draw_sign(mi, tc,z,alpha,aspect,tex,blendmode)*/
1204
1199
draw_sign(mi, tc, tc->effects[2].state[0], tc->effects[2].state[1], 2.0, 1, 0);
1207
1202
draw_sign(mi, tc, tc->effects[5].state[0], tc->effects[5].state[1], 1.0, 3, 0);
1208
1203
/*who head brite*/
1210
1205
draw_sign(mi, tc,1.0, tc->effects[10].state[0], 1.0 / 1.33, 6, 2);
1211
1206
/*who head psychadelic REMOVED*/
1212
1207
/* draw_sign(mi, tc,1.0, tc->effects[11].state[0], 1.0 / 1.33, 8, 0); */