Re: [Goom] patch from goom integration into xine
Brought to you by:
jchoelt
From: Jean-Christophe <je...@io...> - 2004-07-01 22:09:34
|
Hi Michael, I applied this patch as well, and uploaded an updated tarball on the website http://www.ios-software.com/index.php3?page=projet&quoi=1&where=goom/devel/index.html in this version you can also see an early-stage function support into the goom scripting language (see the goom control center -> brigh flash). Any other patch are welcome. See ya, Jeko Michael Roitzsch wrote: >Hi Jeko, > > > >>I applied your patch which worked. >> >> > >Thanks a lot. :) > > > >>The flex/bison changes will not be kept anyway: files to edit are >>goom_script_scanner.lex / .yacc If you open them, you will see that it's >>mainly C code. >> >> > >I see. The attached patch should port my changes to these files. Is that ok? > >I am afraid this won't be the last patch. New changes will arrive here >shortly. > >There is one other thing a couple of xine developers noticed: goom2k4 always >starts with the same effect, no matter what file xine plays. It is a circular >wave visualization that washes out to all white, stays almost totally white >for a while, which looks a bit strange, before moving on to the next effect. >Could there be some problem with random initialization? > > > >>I'll put a new tarball with your changes online soon, I added support >>for sub-functions in the embedded scripting language of goom: so I've >>just a few things to finish there before. >> >> > >Btw, is there a public CVS of goom somewhere? > >Michael > > > >------------------------------------------------------------------------ > >--- goom2k4-dev15/src/goom_script_scanner.lex Sa Mär 27 18:15:05 2004 >+++ goom2k4-dev15/src/goom_script_scanner.lex Do Jul 1 13:55:18 2004 >@@ -695,7 +695,9 @@ > > void goom_script_scanner_compile(GoomScriptScanner *_currentScanner, PluginInfo *pluginInfo, const char *script) { > >+#ifdef VERBOSE > printf("\n=== Starting Compilation ===\n"); >+#endif > currentScanner = _currentScanner; > reset_scanner(currentScanner); > currentScanner->pluginInfo = pluginInfo; >@@ -706,7 +708,9 @@ > > calculate_labels(currentScanner->iflow); > >+#ifdef VERBOSE > printf("=== Compilation done. # of lines: %d. # of instr: %d ===\n", currentScanner->num_lines, currentScanner->iflow->number); >+#endif > } > > void goom_script_scanner_execute(GoomScriptScanner *scanner) { >--- goom2k4-dev15/src/goom_script_scanner.y Sa Mär 27 18:15:05 2004 >+++ goom2k4-dev15/src/goom_script_scanner.y Do Jul 1 13:53:22 2004 >@@ -38,7 +38,9 @@ > } > static void commit_set(NodeType *set) { > precommit_node(set->opr.op[1]); >+#ifdef VERBOSE > printf("set.f %s %s\n", set->opr.op[0]->str, set->opr.op[1]->str); >+#endif > currentScanner->instr = instr_init(currentScanner, "set.f", INSTR_SETF, 2); > commit_node(set->opr.op[0]); > commit_node(set->opr.op[1]); >@@ -51,7 +53,9 @@ > return fld; > } > static void commit_float(NodeType *var) { >+#ifdef VERBOSE > printf("float %s\n", var->opr.op[0]->str); >+#endif > currentScanner->instr = instr_init(currentScanner, "float", INSTR_INT, 1); > commit_node(var->opr.op[0]); > } >@@ -63,7 +67,9 @@ > return intd; > } > static void commit_int(NodeType *var) { >+#ifdef VERBOSE > printf("int %s\n", var->opr.op[0]->str); >+#endif > currentScanner->instr = instr_init(currentScanner, "int", INSTR_INT, 1); > commit_node(var->opr.op[0]); > } >@@ -102,7 +108,9 @@ > } > > /* add op2 to tmp */ >+#ifdef VERBOSE > printf("%s %s %s\n", type, stmp, expr->opr.op[toAdd]->str); >+#endif > currentScanner->instr = instr_init(currentScanner, type, instr_id, 2); > commit_node(new_var(stmp)); > commit_node(expr->opr.op[toAdd]); >@@ -167,7 +175,9 @@ > > /* jzero.i <expression> <endif> */ > sprintf(slab, "|eif%d|", allocateLabel()); >+#ifdef VERBOSE > printf("jzero.i %s %s\n", node->opr.op[0]->str, slab); >+#endif > currentScanner->instr = instr_init(currentScanner, "jzero.i", INSTR_JZERO, 2); > commit_node(node->opr.op[0]); > instr_add_param(currentScanner->instr, slab, TYPE_LABEL); >@@ -175,7 +185,9 @@ > /* [... instrs of the if ...] */ > commit_node(node->opr.op[1]); > /* label <endif> */ >+#ifdef VERBOSE > printf("label %s\n", slab); >+#endif > currentScanner->instr = instr_init(currentScanner, "label", INSTR_LABEL, 1); > instr_add_param(currentScanner->instr, slab, TYPE_LABEL); > } >@@ -245,7 +257,9 @@ > case OPR_SET: commit_set(node); break; > case OPR_IF: commit_if(node); break; > case OPR_BLOCK: commit_block(node); break; >+#ifdef VERBOSE > case EMPTY_NODE: printf("NOP\n"); break; >+#endif > } > > commit_node(node->opr.next); /* recursive for the moment, maybe better to do something iterative? */ > > |