1 /* Goom Project 2 * Copyright (C) <2003> iOS-Software 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef _LINES_H 21 #define _LINES_H 22 23 #include "goom_typedefs.h" 24 #include "goom_graphic.h" 25 #include "goom_config.h" 26 27 struct _GMUNITPOINTER 28 { 29 float x; 30 float y; 31 float angle; 32 }; 33 34 /* tableau de points */ 35 struct _GMLINE 36 { 37 38 GMUnitPointer *points; 39 GMUnitPointer *points2; 40 int IDdest; 41 float param; 42 float amplitudeF; 43 float amplitude; 44 45 int nbPoints; 46 guint32 color; /* pour l'instant je stocke la couleur a terme, on stockera le mode couleur et l'on animera */ 47 guint32 color2; 48 49 int screenX; 50 int screenY; 51 52 float power; 53 float powinc; 54 55 PluginInfo *goomInfo; 56 }; 57 58 /* les ID possibles */ 59 60 #define GML_CIRCLE 0 61 /* (param = radius) */ 62 63 #define GML_HLINE 1 64 /* (param = y) */ 65 66 #define GML_VLINE 2 67 /* (param = x) */ 68 69 /* les modes couleur possible (si tu mets un autre c'est noir) */ 70 71 #define GML_BLEUBLANC 0 72 #define GML_RED 1 73 #define GML_ORANGE_V 2 74 #define GML_ORANGE_J 3 75 #define GML_VERT 4 76 #define GML_BLEU 5 77 #define GML_BLACK 6 78 79 /* construit un effet de line (une ligne horitontale pour commencer) */ 80 GMLine *goom_lines_init (PluginInfo *goomInfo, int rx, int ry, 81 int IDsrc, float paramS, int modeCoulSrc, 82 int IDdest, float paramD, int modeCoulDest); 83 84 void goom_lines_switch_to (GMLine * gml, int IDdest, float param, 85 float amplitude, 86 int modeCoul); 87 88 void goom_lines_set_res (GMLine * gml, int rx, int ry); 89 90 void goom_lines_free (GMLine ** gml); 91 92 void goom_lines_draw (PluginInfo *plugInfo, GMLine * gml, gint16 data[512], Pixel *p); 93 94 #endif /* _LINES_H */ 95