Mercurial > audlegacy-plugins
annotate src/paranormal/general.c @ 1218:cc4e03df48a3
Make things not crash.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Sun, 08 Jul 2007 22:25:12 -0500 |
parents | a7c98f237b03 |
children | 3b034150d31e |
rev | line source |
---|---|
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
1 /* FIXME: what to name this file? */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
2 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
3 #ifdef HAVE_CONFIG_H |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
4 # include <config.h> |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
5 #endif |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
6 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
7 #include "paranormal.h" |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
8 #include "actuators.h" |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
9 #include "pn_utils.h" |
1177
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
10 #include "libcalc/calc.h" |
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
11 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
12 /* **************** general_fade **************** */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
13 static struct pn_actuator_option_desc general_fade_opts[] = |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
14 { |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
15 { "amount", "The amount by which the color index of each " |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
16 "pixel should be decreased by each frame (MAX 255)", |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
17 OPT_TYPE_INT, { ival: 3 } }, |
175 | 18 { NULL } |
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
19 }; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
20 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
21 static void |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
22 general_fade_exec (const struct pn_actuator_option *opts, |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
23 gpointer data) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
24 { |
177 | 25 int amt = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 3 : opts[0].val.ival; |
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
26 int i, j; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
27 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
28 for (j=0; j<pn_image_data->height; j++) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
29 for (i=0; i<pn_image_data->width; i++) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
30 pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
31 CAPLO (pn_image_data->surface[0][PN_IMG_INDEX (i, j)] |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
32 - amt, 0); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
33 } |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
34 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
35 struct pn_actuator_desc builtin_general_fade = |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
36 { |
155
adf9f4b26039
[svn] - user-friendly names (UI side unimplemented still)
nenolod
parents:
149
diff
changeset
|
37 "general_fade", "Fade-out", "Decreases the color index of each pixel", |
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
38 0, general_fade_opts, |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
39 NULL, NULL, general_fade_exec |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
40 }; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
41 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
42 /* **************** general_blur **************** */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
43 /* FIXME: add a variable radius */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
44 /* FIXME: SPEEEED */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
45 static void |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
46 general_blur_exec (const struct pn_actuator_option *opts, |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
47 gpointer data) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
48 { |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
49 int i,j; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
50 register guchar *srcptr = pn_image_data->surface[0]; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
51 register guchar *destptr = pn_image_data->surface[1]; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
52 register int sum; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
53 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
54 for (j=0; j<pn_image_data->height; j++) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
55 for (i=0; i<pn_image_data->width; i++) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
56 { |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
57 sum = *(srcptr)<<2; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
58 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
59 /* top */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
60 if (j > 0) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
61 { |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
62 sum += *(srcptr-pn_image_data->width)<<1; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
63 if (i > 0) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
64 sum += *(srcptr-pn_image_data->width-1); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
65 if (i < pn_image_data->width-1) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
66 sum += *(srcptr-pn_image_data->width+1); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
67 } |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
68 /* bottom */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
69 if (j < pn_image_data->height-1) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
70 { |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
71 sum += *(srcptr+pn_image_data->width)<<1; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
72 if (i > 0) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
73 sum += *(srcptr+pn_image_data->width-1); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
74 if (i < pn_image_data->width-1) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
75 sum += *(srcptr+pn_image_data->width+1); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
76 } |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
77 /* left */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
78 if (i > 0) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
79 sum += *(srcptr-1)<<1; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
80 /* right */ |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
81 if (i < pn_image_data->width-1) |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
82 sum += *(srcptr+1)<<1; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
83 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
84 *destptr++ = (guchar)(sum >> 4); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
85 srcptr++; |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
86 } |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
87 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
88 pn_swap_surfaces (); |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
89 } |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
90 |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
91 struct pn_actuator_desc builtin_general_blur = |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
92 { |
155
adf9f4b26039
[svn] - user-friendly names (UI side unimplemented still)
nenolod
parents:
149
diff
changeset
|
93 "general_blur", "Blur", "A simple 1 pixel radius blur", |
149
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
94 0, NULL, |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
95 NULL, NULL, general_blur_exec |
fd9c0a5871ac
[svn] - new and IMPROVED paranormal visualization studio
nenolod
parents:
diff
changeset
|
96 }; |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
97 |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
98 /* **************** general_mosaic **************** */ |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
99 /* FIXME: add a variable radius */ |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
100 /* FIXME: SPEEEED */ |
175 | 101 static struct pn_actuator_option_desc general_mosaic_opts[] = |
102 { | |
103 { "radius", "The pixel radius that should be used for the effect.", | |
104 OPT_TYPE_INT, { ival: 6 } }, | |
105 { NULL } | |
106 }; | |
107 | |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
108 static void |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
109 general_mosaic_exec (const struct pn_actuator_option *opts, |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
110 gpointer data) |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
111 { |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
112 int i,j; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
113 register guchar *srcptr = pn_image_data->surface[0]; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
114 register guchar *destptr = pn_image_data->surface[1]; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
115 register int sum; |
177 | 116 int radius = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 6 : opts[0].val.ival; |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
117 |
175 | 118 for (j=0; j<pn_image_data->height; j += radius) |
119 for (i=0; i<pn_image_data->width; i += radius) | |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
120 { |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
121 int ii = 0, jj = 0; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
122 guchar bval = 0; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
123 |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
124 /* find the brightest colour */ |
175 | 125 for (jj = 0; jj < radius && (j + jj < pn_image_data->height); jj++) |
126 for (ii = 0; ii < radius && (i + ii < pn_image_data->width); ii++) | |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
127 { |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
128 guchar val = srcptr[PN_IMG_INDEX(i + ii, j + jj)]; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
129 |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
130 if (val > bval) |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
131 bval = val; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
132 } |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
133 |
175 | 134 for (jj = 0; jj < radius && (j + jj < pn_image_data->height); jj++) |
135 for (ii = 0; ii < radius && (i + ii < pn_image_data->width); ii++) | |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
136 { |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
137 destptr[PN_IMG_INDEX(i + ii, j + jj)] = bval; |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
138 } |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
139 } |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
140 |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
141 pn_swap_surfaces (); |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
142 } |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
143 |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
144 struct pn_actuator_desc builtin_general_mosaic = |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
145 { |
176 | 146 "general_mosaic", "Mosaic", "A simple mosaic effect.", |
175 | 147 0, general_mosaic_opts, |
174
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
148 NULL, NULL, general_mosaic_exec |
3d98be3d74c2
[svn] - mosaic effect (in progress, custom size will be in the next commit)
nenolod
parents:
155
diff
changeset
|
149 }; |
177 | 150 |
151 /* **************** general_clear **************** */ | |
152 static void | |
153 general_clear_exec (const struct pn_actuator_option *opts, | |
154 gpointer data) | |
155 { | |
156 memset(pn_image_data->surface[0], '\0', | |
157 (pn_image_data->height * pn_image_data->width)); | |
158 } | |
159 | |
160 struct pn_actuator_desc builtin_general_clear = | |
161 { | |
162 "general_clear", "Clear Surface", "Clears the surface.", | |
163 0, NULL, | |
164 NULL, NULL, general_clear_exec | |
165 }; | |
166 | |
179
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
167 /* **************** general_noop **************** */ |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
168 static void |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
169 general_noop_exec (const struct pn_actuator_option *opts, |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
170 gpointer data) |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
171 { |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
172 return; |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
173 } |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
174 |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
175 struct pn_actuator_desc builtin_general_noop = |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
176 { |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
177 "general_noop", "Do Nothing", "Does absolutely nothing.", |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
178 0, NULL, |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
179 NULL, NULL, general_noop_exec |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
180 }; |
b44ab11a64c2
[svn] - NOOP instruction. What this does is basically takes a slot in a
nenolod
parents:
177
diff
changeset
|
181 |
181 | 182 /* **************** general_invert **************** */ |
183 static void | |
184 general_invert_exec (const struct pn_actuator_option *opts, | |
185 gpointer data) | |
186 { | |
187 int i, j; | |
188 | |
189 for (j=0; j < pn_image_data->height; j++) | |
190 for (i=0; i < pn_image_data->width; i++) | |
191 pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = | |
192 255 - pn_image_data->surface[0][PN_IMG_INDEX (i, j)]; | |
193 } | |
194 | |
195 struct pn_actuator_desc builtin_general_invert = | |
196 { | |
197 "general_invert", "Value Invert", "Performs a value invert.", | |
198 0, NULL, | |
199 NULL, NULL, general_invert_exec | |
200 }; | |
201 | |
182
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
202 /* **************** general_replace **************** */ |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
203 static struct pn_actuator_option_desc general_replace_opts[] = |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
204 { |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
205 { "start", "The beginning colour value that should be replaced by the value of out.", |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
206 OPT_TYPE_INT, { ival: 250 } }, |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
207 { "end", "The ending colour value that should be replaced by the value of out.", |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
208 OPT_TYPE_INT, { ival: 255 } }, |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
209 { "out", "The colour value that in is replaced with.", |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
210 OPT_TYPE_INT, { ival: 0 } }, |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
211 { NULL } |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
212 }; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
213 |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
214 static void |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
215 general_replace_exec (const struct pn_actuator_option *opts, |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
216 gpointer data) |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
217 { |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
218 register int i, j; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
219 register guchar val; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
220 guchar begin = opts[0].val.ival > 255 || opts[0].val.ival < 0 ? 250 : opts[0].val.ival; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
221 guchar end = opts[1].val.ival > 255 || opts[1].val.ival < 0 ? 255 : opts[1].val.ival; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
222 guchar out = opts[2].val.ival > 255 || opts[2].val.ival < 0 ? 0 : opts[2].val.ival; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
223 |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
224 for (j=0; j < pn_image_data->height; j++) |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
225 for (i=0; i < pn_image_data->width; i++) |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
226 { |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
227 val = pn_image_data->surface[0][PN_IMG_INDEX (i, j)]; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
228 if (val >= begin && val <= end) |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
229 pn_image_data->surface[0][PN_IMG_INDEX (i, j)] = out; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
230 } |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
231 } |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
232 |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
233 struct pn_actuator_desc builtin_general_replace = |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
234 { |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
235 "general_replace", "Value Replace", "Performs a value replace on a range of values.", |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
236 0, general_replace_opts, |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
237 NULL, NULL, general_replace_exec |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
238 }; |
6048abdac7d1
[svn] - add value replace filter, replaces a range of values with a different value
nenolod
parents:
181
diff
changeset
|
239 |
271 | 240 /* **************** general_swap **************** */ |
241 static void | |
242 general_swap_exec (const struct pn_actuator_option *opts, | |
243 gpointer data) | |
244 { | |
245 pn_swap_surfaces (); | |
246 } | |
247 | |
248 struct pn_actuator_desc builtin_general_swap = | |
249 { | |
250 "general_swap", "Swap Surface", "Swaps the surface.", | |
251 0, NULL, | |
252 NULL, NULL, general_swap_exec | |
253 }; | |
272 | 254 |
255 /* **************** general_copy **************** */ | |
256 static void | |
257 general_copy_exec (const struct pn_actuator_option *opts, | |
258 gpointer data) | |
259 { | |
260 memcpy(pn_image_data->surface[1], pn_image_data->surface[0], | |
261 (pn_image_data->width * pn_image_data->height)); | |
262 } | |
263 | |
264 struct pn_actuator_desc builtin_general_copy = | |
265 { | |
266 "general_copy", "Copy Surface", "Copies the surface to the other surface.", | |
267 0, NULL, | |
268 NULL, NULL, general_copy_exec | |
269 }; | |
278 | 270 |
271 /* **************** general_flip **************** */ | |
272 static struct pn_actuator_option_desc general_flip_opts[] = | |
273 { | |
274 { "direction", "Negative is horizontal, positive is vertical.", | |
275 OPT_TYPE_INT, { ival: -1 } }, | |
276 { NULL } | |
277 }; | |
278 | |
279 static void | |
280 general_flip_exec (const struct pn_actuator_option *opts, | |
281 gpointer data) | |
282 { | |
283 gint x, y; | |
284 | |
285 if (opts[0].val.ival < 0) | |
286 { | |
287 for (y = 0; y < pn_image_data->height; y++) | |
288 for (x = 0; x < pn_image_data->width; x++) | |
289 { | |
290 pn_image_data->surface[1][PN_IMG_INDEX(pn_image_data->width - x, y)] = | |
291 pn_image_data->surface[0][PN_IMG_INDEX(x, y)]; | |
292 } | |
293 } | |
294 else | |
295 { | |
296 for (y = 0; y < pn_image_data->height; y++) | |
297 for (x = 0; x < pn_image_data->width; x++) | |
298 { | |
299 pn_image_data->surface[1][PN_IMG_INDEX(x, pn_image_data->height - y)] = | |
300 pn_image_data->surface[0][PN_IMG_INDEX(x, y)]; | |
301 } | |
302 } | |
303 | |
304 pn_swap_surfaces (); | |
305 } | |
306 | |
307 struct pn_actuator_desc builtin_general_flip = | |
308 { | |
309 "general_flip", "Flip Surface", "Flips the surface.", | |
310 0, general_flip_opts, | |
311 NULL, NULL, general_flip_exec | |
312 }; | |
1177
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
313 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
314 /* ***************** general_evaluate ***************** */ |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
315 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
316 static struct pn_actuator_option_desc general_evaluate_opts[] = |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
317 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
318 { "init_script", "Script to run on start.", OPT_TYPE_STRING, {sval: "global_reg0 = 27;"} }, |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
319 { "frame_script", "Script to run.", OPT_TYPE_STRING, {sval: "global_reg0 = global_reg0 + 1;"} }, |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
320 { NULL } |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
321 }; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
322 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
323 struct pn_evaluate_ctx |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
324 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
325 expression_t *expr_on_init, *expr_on_frame; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
326 symbol_dict_t *dict; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
327 gboolean reset; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
328 }; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
329 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
330 static void |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
331 general_evaluate_init(gpointer *data) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
332 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
333 *data = g_new0(struct pn_evaluate_ctx, 1); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
334 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
335 ((struct pn_evaluate_ctx *)*data)->reset = TRUE; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
336 } |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
337 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
338 static void |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
339 general_evaluate_cleanup(gpointer op_data) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
340 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
341 struct pn_evaluate_ctx *data = (struct pn_evaluate_ctx *) op_data; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
342 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
343 g_return_if_fail(data != NULL); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
344 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
345 if (data->expr_on_init) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
346 expr_free(data->expr_on_init); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
347 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
348 if (data->expr_on_frame) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
349 expr_free(data->expr_on_frame); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
350 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
351 if (data->dict) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
352 dict_free(data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
353 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
354 if (data) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
355 g_free(data); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
356 } |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
357 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
358 static void |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
359 general_evaluate_exec(const struct pn_actuator_option *opts, |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
360 gpointer op_data) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
361 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
362 struct pn_evaluate_ctx *data = (struct pn_evaluate_ctx *) op_data; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
363 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
364 if (data->reset) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
365 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
366 if (data->dict) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
367 dict_free(data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
368 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
369 data->dict = dict_new(); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
370 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
371 if (opts[0].val.sval != NULL); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
372 data->expr_on_init = expr_compile_string(opts[0].val.sval, data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
373 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
374 if (opts[1].val.sval != NULL); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
375 data->expr_on_frame = expr_compile_string(opts[1].val.sval, data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
376 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
377 if (data->expr_on_init != NULL) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
378 expr_execute(data->expr_on_init, data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
379 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
380 data->reset = FALSE; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
381 } |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
382 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
383 if (data->expr_on_frame != NULL) |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
384 expr_execute(data->expr_on_frame, data->dict); |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
385 } |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
386 |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
387 struct pn_actuator_desc builtin_general_evaluate = |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
388 { |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
389 "general_evaluate", "Evalulate VM Code", |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
390 "Evaluates arbitrary VM code. Does not draw anything.", |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
391 0, general_evaluate_opts, |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
392 general_evaluate_init, general_evaluate_cleanup, general_evaluate_exec |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
393 }; |
a7c98f237b03
[svn] - add general_evaluate which can run arbitrary VM code
nenolod
parents:
278
diff
changeset
|
394 |