~ubuntu-branches/ubuntu/intrepid/xscreensaver/intrepid

« back to all changes in this revision

Viewing changes to hacks/glx/jigglypuff.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould
  • Date: 2008-08-28 16:15:25 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080828161525-mxga521aoezxjq8h
Tags: 5.07-0ubuntu1
* Upgrade upstream version
* debian/control: Remove suggest xdaliclock as it is no longer
  included
* Remove 10_jwz-screensaver-randr-patch-3.patch as it has been merged
  upstream.
* Add 24_hacks_xsublim_enable.patch as it seems that xsublim was dropped
  from the build files.  There is nothing in the Changelog about it
  so I believe it was accidental.
* Updating the .desktop files from the XML files using gnome-screensaver's
  utility to do so.  Lots of text updates.  Also:
    * Added: abstractile.desktop
    * Added: cwaves.desktop
    * Added: m6502.desktop
    * Added: skytentacles.desktop
    * Removed: xteevee.desktop
* xscreensaver-gl-extra.files: Added skytentacles
* xscreensaver-data-extra.files: Added abstractile, cwaves and m6502
* xscreensaver-data.files: Remove partial abstractile, m6502 and cwaves

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
#define DEF_HOLD            "800"
67
67
#define DEF_SPHERISM        "75"
68
68
#define DEF_DAMPING         "500"
 
69
#define DEF_RANDOM          "True"
 
70
#define DEF_TETRA           "False"
 
71
#define DEF_SPOOKY          "0"
69
72
 
70
73
#ifndef max
71
74
#define max(a,b) (((a)>(b))?(a):(b))
137
140
};
138
141
 
139
142
static argtype vars[] = {
140
 
    {&random_parms, "random", "Random", "True", t_Bool},
141
 
    {&do_tetrahedron, "tetra", "Tetra", "False", t_Bool},
142
 
    {&spooky, "spooky", "Spooky", "0", t_Int},
 
143
    {&random_parms, "random", "Random", DEF_RANDOM, t_Bool},
 
144
    {&do_tetrahedron, "tetra", "Tetra", DEF_TETRA, t_Bool},
 
145
    {&spooky, "spooky", "Spooky", DEF_SPOOKY, t_Int},
143
146
    {&color, "color", "Color", DEF_COLOR, t_String},
144
147
    {&shininess, "shininess", "Shininess", DEF_SHININESS, t_Int},
145
148
    {&complexity, "complexity", "Complexity", DEF_COMPLEXITY, t_Int},
670
673
 * see what the cost is of calling glBegin/glEnd for each
671
674
 * triangle.
672
675
 */
673
 
static inline void face_render(face *f, jigglystruct *js)
 
676
static inline int face_render(face *f, jigglystruct *js)
674
677
{
675
678
    hedge *h1, *h2, *hend;
 
679
    int polys = 0;
676
680
 
677
681
    h1 = f->start;
678
682
    hend = h1->prev;
688
692
        vertex_render(hend->vtx, js);
689
693
        h1 = h2;
690
694
        h2 = h1->next;
 
695
        polys++;
691
696
    }
692
697
    glEnd();
 
698
    return polys;
693
699
}
694
700
 
695
 
static void jigglypuff_render(jigglystruct *js) 
 
701
static int jigglypuff_render(jigglystruct *js) 
696
702
{
 
703
    int polys = 0;
697
704
    face *f = js->shape->faces;
698
705
    vertex *vtx = js->shape->vertices;
699
706
 
702
709
        vtx = vtx->next;
703
710
    }
704
711
    while(f) {
705
 
        face_render(f, js);
 
712
        polys += face_render(f, js);
706
713
        f=f->next;
707
714
    }
 
715
    return polys;
708
716
}
709
717
 
710
718
/* This is the jiggling code */
991
999
        glColor4fv(js->jiggly_color);
992
1000
    }
993
1001
    
994
 
    jigglypuff_render(js);
 
1002
    mi->polygon_count = jigglypuff_render(js);
995
1003
    if(MI_IS_FPS(mi))
996
1004
        do_fps(mi);
997
1005
    glFinish();
1061
1069
           js->do_wireframe, js->spooky, js->color_style, js->shininess);*/
1062
1070
}
1063
1071
 
1064
 
XSCREENSAVER_MODULE ("Jigglypuff", jigglypuff)
 
1072
XSCREENSAVER_MODULE ("JigglyPuff", jigglypuff)
1065
1073
 
1066
1074
#endif /* USE_GL */
1067
1075