summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/d_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/d_misc.c')
-rw-r--r--apps/plugins/pdbox/PDa/src/d_misc.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/PDa/src/d_misc.c b/apps/plugins/pdbox/PDa/src/d_misc.c
index b6d36764b8..6eb2857db9 100644
--- a/apps/plugins/pdbox/PDa/src/d_misc.c
+++ b/apps/plugins/pdbox/PDa/src/d_misc.c
@@ -5,9 +5,17 @@
5/* miscellaneous: print~; more to come. 5/* miscellaneous: print~; more to come.
6*/ 6*/
7 7
8#ifdef ROCKBOX
9#include "plugin.h"
10#include "pdbox.h"
11#endif
12
8#include "m_pd.h" 13#include "m_pd.h"
14
15#ifndef ROCKBOX
9#include <stdio.h> 16#include <stdio.h>
10#include <string.h> 17#include <string.h>
18#endif
11 19
12/* ------------------------- print~ -------------------------- */ 20/* ------------------------- print~ -------------------------- */
13static t_class *print_class; 21static t_class *print_class;
@@ -69,7 +77,10 @@ static void *print_new(t_symbol *s)
69 return (x); 77 return (x);
70} 78}
71 79
72static void print_setup(void) 80#ifndef ROCKBOX
81static
82#endif
83void print_setup(void)
73{ 84{
74 print_class = class_new(gensym("print~"), (t_newmethod)print_new, 0, 85 print_class = class_new(gensym("print~"), (t_newmethod)print_new, 0,
75 sizeof(t_print), 0, A_DEFSYM, 0); 86 sizeof(t_print), 0, A_DEFSYM, 0);
@@ -118,7 +129,11 @@ static void scope_dsp(t_scope *x, t_signal **sp)
118 129
119static void scope_erase(t_scope *x) 130static void scope_erase(t_scope *x)
120{ 131{
132#ifdef ROCKBOX
133 (void) x;
134#else
121 if (x->x_drawn) sys_vgui(".x%x.c delete gumbo\n", x->x_canvas); 135 if (x->x_drawn) sys_vgui(".x%x.c delete gumbo\n", x->x_canvas);
136#endif
122} 137}
123 138
124#define X1 10. 139#define X1 10.
@@ -126,6 +141,7 @@ static void scope_erase(t_scope *x)
126#define YC 5. 141#define YC 5.
127static void scope_bang(t_scope *x) 142static void scope_bang(t_scope *x)
128{ 143{
144#ifndef ROCKBOX
129 int n, phase; 145 int n, phase;
130 char hugebuf[10000], *s = hugebuf; 146 char hugebuf[10000], *s = hugebuf;
131 scope_erase(x); 147 scope_erase(x);
@@ -142,6 +158,7 @@ static void scope_bang(t_scope *x)
142 } 158 }
143 sprintf(s, "-tags gumbo\n"); 159 sprintf(s, "-tags gumbo\n");
144 sys_gui(hugebuf); 160 sys_gui(hugebuf);
161#endif
145 x->x_drawn = 1; 162 x->x_drawn = 1;
146} 163}
147 164
@@ -152,6 +169,9 @@ static void scope_free(t_scope *x)
152 169
153static void *scope_new(t_symbol *s) 170static void *scope_new(t_symbol *s)
154{ 171{
172#ifdef ROCKBOX
173 (void) s;
174#endif
155 t_scope *x = (t_scope *)pd_new(scope_class); 175 t_scope *x = (t_scope *)pd_new(scope_class);
156 error("scope: this is now obsolete; use arrays and tabwrite~ instead"); 176 error("scope: this is now obsolete; use arrays and tabwrite~ instead");
157 x->x_phase = 0; 177 x->x_phase = 0;
@@ -188,6 +208,9 @@ static t_int *bang_tilde_perform(t_int *w)
188 208
189static void bang_tilde_dsp(t_bang *x, t_signal **sp) 209static void bang_tilde_dsp(t_bang *x, t_signal **sp)
190{ 210{
211#ifdef ROCKBOX
212 (void) sp;
213#endif
191 dsp_add(bang_tilde_perform, 1, x); 214 dsp_add(bang_tilde_perform, 1, x);
192} 215}
193 216
@@ -203,6 +226,9 @@ static void bang_tilde_free(t_bang *x)
203 226
204static void *bang_tilde_new(t_symbol *s) 227static void *bang_tilde_new(t_symbol *s)
205{ 228{
229#ifdef ROCKBOX
230 (void) s;
231#endif
206 t_bang *x = (t_bang *)pd_new(bang_tilde_class); 232 t_bang *x = (t_bang *)pd_new(bang_tilde_class);
207 x->x_clock = clock_new(x, (t_method)bang_tilde_tick); 233 x->x_clock = clock_new(x, (t_method)bang_tilde_tick);
208 outlet_new(&x->x_obj, &s_bang); 234 outlet_new(&x->x_obj, &s_bang);
@@ -233,6 +259,9 @@ static void samplerate_tilde_bang(t_samplerate *x)
233 259
234static void *samplerate_tilde_new(t_symbol *s) 260static void *samplerate_tilde_new(t_symbol *s)
235{ 261{
262#ifdef ROCKBOX
263 (void) s;
264#endif
236 t_samplerate *x = (t_samplerate *)pd_new(samplerate_tilde_class); 265 t_samplerate *x = (t_samplerate *)pd_new(samplerate_tilde_class);
237 outlet_new(&x->x_obj, &s_float); 266 outlet_new(&x->x_obj, &s_float);
238 return (x); 267 return (x);