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

« back to all changes in this revision

Viewing changes to artist.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2009-08-28 23:44:59 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090828234459-5211154t1zt8u083
Tags: 2.8-1
* New upstream release:
  + All debian/patches merged with upstream
* debian/control:
  + Updated Standards-Version to 3.8.3

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>
6
7
#include "paint.h"
7
8
#include "crinkle.h"
8
9
 
9
 
char artist_Id[] = "$Id: artist.c,v 1.40 1997/12/03 17:21:10 spb Exp $";
 
10
char artist_Id[] = "$Id: artist.c,v 1.41 2009/08/28 09:09:17 spb Exp spb $";
10
11
#define SIDE 1.0
11
12
#ifndef PI
12
13
#define PI 3.14159265
19
20
extern Parm fold_param;
20
21
extern Graph g;
21
22
 
 
23
extern int swosh;
 
24
 
22
25
Fold *top;
23
26
 
24
27
 
266
269
  if( g.repeat >= 0 ){
267
270
    g.pos=0;
268
271
  }else{
269
 
    g.pos=g.graph_width-1;
 
272
    g.pos = g.pixmap_width - 1;
270
273
  }     
271
274
}
272
275
/* }}} */
424
427
Height *b;
425
428
Height *shadow;
426
429
{
427
 
  int i, j, coord, last;
 
430
  int i, coord, last;
428
431
  Col *res, col;
429
432
 
430
433
  /* this routine returns a perspective view of the surface */
816
819
  return(res);
817
820
}
818
821
 
 
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
 
819
827
/* }}} */
820
828
/* {{{  void plot_column(g)*/
821
829
void plot_column(g)
837
845
      flush_region(0,0,g->graph_width,g->graph_height);
838
846
    }
839
847
  }
840
 
  if( g->scroll ){
 
848
  if( g->scroll && !swosh ){
841
849
    scroll_screen(g->scroll);
842
850
  }
843
851
 
876
884
  /* now update pos ready for next time */
877
885
  if( g->repeat >=0 ){
878
886
    g->pos++;
879
 
    if(g->pos >= g->graph_width)
 
887
    if(g->pos >= g->pixmap_width)
880
888
    {
881
889
      g->pos -=  g->repeat;
882
 
      if( g->pos < 0 || g->pos > g->graph_width-1 )
 
890
      if( g->pos < 0 || g->pos > g->pixmap_width-1 )
883
891
      {
884
892
        g->pos=0; 
885
893
      }else{
890
898
    g->pos--;
891
899
    if( g->pos < 0 ){
892
900
      g->pos -=   g->repeat;
893
 
      if( g->pos < 0 || g->pos > (g->graph_width-1) ){
894
 
        g->pos=g->graph_width-1;
 
901
      if( g->pos < 0 || g->pos > (g->pixmap_width-1) ){
 
902
        g->pos=g->pixmap_width-1;
895
903
      }else{
896
904
        g->scroll = g->repeat;
897
905
      }
898
906
    }
899
907
  }
900
908
 
 
909
  if(g->scroll && swosh)
 
910
  {
 
911
    scroll_screen(g->scroll);
 
912
  }
901
913
}
902
914
/* }}} */
903
915