~ubuntu-branches/ubuntu/vivid/xmountains/vivid

« back to all changes in this revision

Viewing changes to artist.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2008-06-11 19:35:06 UTC
  • mfrom: (3.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080611193506-f9w3mgbd3zejd4oq
Tags: 2.7-8
Change Build-Depends: xutils-dev. (Closes: #485719)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 */
4
4
#include <math.h>
5
5
#include <stdio.h>
6
 
#include <stdlib.h>
7
6
#include "paint.h"
8
7
#include "crinkle.h"
9
8
 
20
19
extern Parm fold_param;
21
20
extern Graph g;
22
21
 
23
 
extern int swosh;
24
 
 
25
22
Fold *top;
26
23
 
27
24
 
269
266
  if( g.repeat >= 0 ){
270
267
    g.pos=0;
271
268
  }else{
272
 
    g.pos = g.pixmap_width - 1;
 
269
    g.pos=g.graph_width-1;
273
270
  }     
274
271
}
275
272
/* }}} */
427
424
Height *b;
428
425
Height *shadow;
429
426
{
430
 
  int i, coord, last;
 
427
  int i, j, coord, last;
431
428
  Col *res, col;
432
429
 
433
430
  /* this routine returns a perspective view of the surface */
819
816
  return(res);
820
817
}
821
818
 
822
 
void blank_region(int lx, int ly, int ux, int uy);
823
 
void flush_region(int x, int y, int w, int h);
824
 
void scroll_screen(int dist);
825
 
void plot_pixel(int x, int y, Gun value);
826
 
 
827
819
/* }}} */
828
820
/* {{{  void plot_column(g)*/
829
821
void plot_column(g)
845
837
      flush_region(0,0,g->graph_width,g->graph_height);
846
838
    }
847
839
  }
848
 
  if( g->scroll && !swosh ){
 
840
  if( g->scroll ){
849
841
    scroll_screen(g->scroll);
850
842
  }
851
843
 
884
876
  /* now update pos ready for next time */
885
877
  if( g->repeat >=0 ){
886
878
    g->pos++;
887
 
    if(g->pos >= g->pixmap_width)
 
879
    if(g->pos >= g->graph_width)
888
880
    {
889
881
      g->pos -=  g->repeat;
890
 
      if( g->pos < 0 || g->pos > g->pixmap_width-1 )
 
882
      if( g->pos < 0 || g->pos > g->graph_width-1 )
891
883
      {
892
884
        g->pos=0; 
893
885
      }else{
898
890
    g->pos--;
899
891
    if( g->pos < 0 ){
900
892
      g->pos -=   g->repeat;
901
 
      if( g->pos < 0 || g->pos > (g->pixmap_width-1) ){
902
 
        g->pos=g->pixmap_width-1;
 
893
      if( g->pos < 0 || g->pos > (g->graph_width-1) ){
 
894
        g->pos=g->graph_width-1;
903
895
      }else{
904
896
        g->scroll = g->repeat;
905
897
      }
906
898
    }
907
899
  }
908
900
 
909
 
  if(g->scroll && swosh)
910
 
  {
911
 
    scroll_screen(g->scroll);
912
 
  }
913
901
}
914
902
/* }}} */
915
903