2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
9 /* ----- /-/-/-/-/-/-/-/-/ <<< (((((( /\ )))))) >>> \-\-\-\-\-\-\-\-\ ----- *\
12 export for fxspan.c--simple span buffer for special effects
14 \* ----- \-\-\-\-\-\-\-\-\ <<< (((((( \/ )))))) >>> /-/-/-/-/-/-/-/-/ ----- */
29 // When a span is off the screen, we put this into its "left" field.
30 // No baseball puns, please.
31 #define SPAN_NOT_USED -1
33 // This clips a set of spans against the clipping info for a given
34 // canvas. We return FALSE if all the spans were off the canvas, TRUE
35 // if there's anything left. x and y are the upper-left corner of the
36 // sFXSpanSet within the canvas.
37 extern bool FXSpanClipToCanvas(sFXSpanSet
*set
, grs_canvas
*canvas
,
40 extern bool FXSpanClipToSet(sFXSpanSet
*input_set
, sFXSpanSet
*clip_set
,
41 sFXSpanSet
*output_set_1
,
42 sFXSpanSet
*output_set_2
,
46 // The bounding width is however far over any used span reaches.
47 extern void FXSpanSetBoundingWidth(sFXSpanSet
*set
);
49 // The span buffer is expected to be clipped in x and y by the time
51 extern void FXSpanDrawSetFromSnarf(sFXSpanSet
*set
, sFXSpanSnarf
*snarf
,
53 fix x_in_canvas
, fix y_in_canvas
,
54 fix x_in_snarf
, fix y_in_snarf
);
57 extern void FXSpanDrawSetFromCanvas(sFXSpanSet
*set
, grs_canvas
*canvas
,
58 fix x_start
, fix y_start
,
59 fix x_end
, fix y_end
);
61 // This is mostly for testing.
62 extern void FXSpanDrawFlatColor(sFXSpanSet
*set
, sFXSpanSnarf
*snarf
,
64 fix x_in_canvas
, fix y_in_canvas
,
65 fix x_in_snarf
, fix y_in_snarf
,
68 // FXSpanSnarfSetup allocates the necessary memory for snarfing, so you
70 void FXSpanSnarfSetup(sFXSpanSnarf
*snarf
, int x
, int y
, grs_canvas
*canvas
);
72 extern void FXSpanSnarf(sFXSpanSnarf
*snarf
, sFXSpanSet
*set
,
73 grs_canvas
*canvas
, fix x
, fix y
);
75 // FXUnsnarf deallocates the memory allocated by FXSpanSnarf. snarf
76 // itself is not freed since we don't know whether it's from the free
78 extern void FXSpanUnsnarf(sFXSpanSnarf
*snarf
);