ISO C89 compilers are required to support" when includng
the following data file... */
# endif
-const char * const builtin_pdb_data[] = {
+static const char * const builtin_pdb_data[] = {
# include "molecules.h"
};
+#ifndef USE_IPHONE
+# define LOAD_FILES
+#endif
+
+
typedef struct {
const char *name;
GLfloat size, size2;
}
+#ifdef LOAD_FILES
static int
parse_pdb_file (molecule *m, const char *name)
{
return 0;
}
+#endif /* LOAD_FILES */
typedef struct { char *atom; int count; } atom_and_count;
load_molecules (ModeInfo *mi)
{
molecule_configuration *mc = &mcs[MI_SCREEN(mi)];
- int wire = MI_IS_WIREFRAME(mi);
int i;
mc->nmolecules = 0;
+# ifdef LOAD_FILES
if (molecule_str && *molecule_str &&
strcmp(molecule_str, "(default)")) /* try external PDB files */
{
/* The -molecule option can point to a .pdb file, or to
a directory of them.
*/
+ int wire = MI_IS_WIREFRAME(mi);
struct stat st;
int nfiles = 0;
int list_size = 0;
files = 0;
mc->nmolecules = molecule_ctr;
}
+# endif /* LOAD_FILES */
if (mc->nmolecules == 0) /* do the builtins if no files */
{
glTranslatef (0, 0, (size * 1.1)); /* move toward camera */
+ glRotatef (current_device_rotation(), 0, 0, 1); /* right side up */
+
# ifdef HAVE_GLBITMAP
glRasterPos3f (0, 0, 0); /* draw text here */
(y - 0.5) * 9,
(z - 0.5) * 9);
+ /* Do it twice because we don't track the device's orientation. */
+ glRotatef( current_device_rotation(), 0, 0, 1);
gltrackball_rotate (mc->trackball);
+ glRotatef(-current_device_rotation(), 0, 0, 1);
get_rotation (mc->rot, &x, &y, &z, !mc->button_down_p);
glRotatef (x * 360, 1.0, 0.0, 0.0);