Commit f0975acb authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* const warning fixes. formatting fixes (squash them tabs)

parent b087885b
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
#define OPENGL_EFFECT_NONE 1 #define OPENGL_EFFECT_NONE 1
#define OPENGL_EFFECT_CUBE 2 #define OPENGL_EFFECT_CUBE 2
#define OPENGL_EFFECT_TRANSPARENT_CUBE 4 #define OPENGL_EFFECT_TRANSPARENT_CUBE 4
#if defined( HAVE_GL_GLU_H ) || defined( SYS_DARWIN ) #if defined( HAVE_GL_GLU_H ) || defined( __APPLE__ )
#define OPENGL_MORE_EFFECT 8 #define OPENGL_MORE_EFFECT 8
#endif #endif
#ifdef OPENGL_MORE_EFFECT #ifdef OPENGL_MORE_EFFECT
#include <math.h> #include <math.h>
#ifdef SYS_DARWIN #ifdef __APPLE__
#include <OpenGL/glu.h> #include <OpenGL/glu.h>
#else #else
#include <GL/glu.h> #include <GL/glu.h>
...@@ -116,9 +116,9 @@ ...@@ -116,9 +116,9 @@
#define SIGN(x) (x < 0 ? (-1) : 1) #define SIGN(x) (x < 0 ? (-1) : 1)
#define PID2 1.570796326794896619231322 #define PID2 1.570796326794896619231322
static char *ppsz_effects[] = { static const char *ppsz_effects[] = {
"none", "cube", "transparent-cube", "cylinder", "torus", "sphere","SQUAREXY","SQUARER", "ASINXY", "ASINR", "SINEXY", "SINER" }; "none", "cube", "transparent-cube", "cylinder", "torus", "sphere","SQUAREXY","SQUARER", "ASINXY", "ASINR", "SINEXY", "SINER" };
static char *ppsz_effects_text[] = { static const char *ppsz_effects_text[] = {
N_("None"), N_("Cube"), N_("Transparent Cube"), N_("None"), N_("Cube"), N_("Transparent Cube"),
N_("Cylinder"), N_("Torus"), N_("Sphere"), N_("SQUAREXY"),N_("SQUARER"), N_("ASINXY"), N_("ASINR"), N_("SINEXY"), N_("SINER") }; N_("Cylinder"), N_("Torus"), N_("Sphere"), N_("SQUAREXY"),N_("SQUARER"), N_("ASINXY"), N_("ASINR"), N_("SINEXY"), N_("SINER") };
#endif #endif
...@@ -137,14 +137,17 @@ static int Control ( vout_thread_t *, int, va_list ); ...@@ -137,14 +137,17 @@ static int Control ( vout_thread_t *, int, va_list );
static inline int GetAlignedSize( int ); static inline int GetAlignedSize( int );
static int InitTextures( vout_thread_t * ); static int InitTextures ( vout_thread_t * );
static int SendEvents( vlc_object_t *, char const *, static int SendEvents ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * ); vlc_value_t, vlc_value_t, void * );
#ifdef OPENGL_MORE_EFFECT
static float Z_Compute ( float, int, float, float );
static void Transform ( float, int, float, float, int, int, int, int, double *, double * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
#ifdef OPENGL_MORE_EFFECT
#define ACCURACY_TEXT N_( "OpenGL sampling accuracy " ) #define ACCURACY_TEXT N_( "OpenGL sampling accuracy " )
#define ACCURACY_LONGTEXT N_( "Select the accuracy of 3D object sampling(1 = min and 10 = max)" ) #define ACCURACY_LONGTEXT N_( "Select the accuracy of 3D object sampling(1 = min and 10 = max)" )
#define RADIUS_TEXT N_( "OpenGL Cylinder radius" ) #define RADIUS_TEXT N_( "OpenGL Cylinder radius" )
...@@ -167,9 +170,9 @@ static int SendEvents( vlc_object_t *, char const *, ...@@ -167,9 +170,9 @@ static int SendEvents( vlc_object_t *, char const *,
"Several visual OpenGL effects are available." ) "Several visual OpenGL effects are available." )
#ifndef OPENGL_MORE_EFFECT #ifndef OPENGL_MORE_EFFECT
static char *ppsz_effects[] = { static const char *ppsz_effects[] = {
"none", "cube", "transparent-cube" }; "none", "cube", "transparent-cube" };
static char *ppsz_effects_text[] = { static const char *ppsz_effects_text[] = {
N_("None"), N_("Cube"), N_("Transparent Cube") }; N_("None"), N_("Cube"), N_("Transparent Cube") };
#endif #endif
...@@ -741,7 +744,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -741,7 +744,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
/***************************************************************************** /*****************************************************************************
* Transform: Calculate the distorted grid coordinates * Transform: Calculate the distorted grid coordinates
*****************************************************************************/ *****************************************************************************/
void Transform(float p, int distortion, float width, float height,int i, int j, int i_visible_width, int i_visible_height, double *ix,double *iy) static void Transform(float p, int distortion, float width, float height,int i, int j, int i_visible_width, int i_visible_height, double *ix,double *iy)
{ {
double x,y,xnew,ynew; double x,y,xnew,ynew;
double r,theta,rnew,thetanew; double r,theta,rnew,thetanew;
...@@ -799,11 +802,10 @@ void Transform(float p, int distortion, float width, float height,int i, int j, ...@@ -799,11 +802,10 @@ void Transform(float p, int distortion, float width, float height,int i, int j,
*iy = height * (ynew + 1) / (2.0); *iy = height * (ynew + 1) / (2.0);
} }
/***************************************************************************** /*****************************************************************************
* Z_Compute: Calculate the Z-coordinate * Z_Compute: Calculate the Z-coordinate
*****************************************************************************/ *****************************************************************************/
float Z_Compute(float p, int distortion, float x, float y) static float Z_Compute(float p, int distortion, float x, float y)
{ {
float f_z = 0.0; float f_z = 0.0;
double d_p = p / 100.0; double d_p = p / 100.0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment