This is where you'll add new commands to tie it all together. A command can safely assume that it controls the entire screen, unlike an effect. The screen will usually be cleared before and after a command is run.
#include <fcntl.h>
#include <glob.h>
#include <unistd.h>
#include <cmath>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <memory>
#include "bitmap.h"
#include "effect.h"
#include "lib.h"
#include "rve.h"
Functions | |
void | usage () |
void | do_nothing (int signum) |
int | text_changealpha (Effect_changealpha &effect, char *text) |
int | cmd_showimg (int argc, char *argv[]) |
| |
int | cmd_bluebox (int argc, char *argv[]) |
| |
int | cmd_clear (int argc, char *argv[]) |
| |
int | cmd_static_text (int argc, char *argv[]) |
| |
int | cmd_fading_text (int argc, char *argv[]) |
| |
int | cmd_hscroll_text (int argc, char *argv[]) |
| |
int | cmd_clock (int argc, char *argv[]) |
| |
int | cmd_tile_text (int argc, char *argv[]) |
| |
int | cmd_simple_anim (int argc, char *argv[]) |
| |
int | cmd_streamer (int argc, char *argv[]) |
| |
int | cmd_rollcount (int argc, char *argv[]) |
| |
int | cmd_drift (int argc, char *argv[]) |
| |
int | cmd_vote (int argc, char *argv[]) |
| |
int | main (int argc, char *argv[]) |
Variables | |
int | screenw |
int | screenh |
int | screenx = 0 screeny = 0 |
int | deadline = 0 |
int | verbosity = 1 |
char * | global_font = FONT *stylefile = NULL |
int | global_fps = 23 global_textcolor = 0xFFFFFF fontsize = 5 |
struct { | |
char * name | |
int(* function )(int, char **) | |
bool clear | |
} | commands [] |
|
Renders a transparent blue box. Used for testing if bmovl even works. |
|
Clears the screen |
|
Renders a clock in milliseconds on the screen, for testing timing. |
|
Interfaces with Driftnet (http://www.ex-parrot.com/~chris/driftnet/) to capture images coming across the network and display them at random positions on the screen. To make this work you need to install Driftnet and run the TOOLS/driftd script on the machine that will be capturing from the network. You may want to edit the Driftnet Makefile to disable the GUI code. Also remember to edit the configuration at the top of driftd and to create a temporary dir on the capturing machine (default: ./drift). Instead of connecting to a host/port, the drift command can also just read from stdin if you give the "-" argument. |
|
Renders a text centered on the screen and makes it fade in and out. Requires one argument: the text string. |
|
Scrolls a text across the screen from right to left one or more times. Requires one argument: the text string.
|
|
Animates a rolling counter counting from a time (hours:minuts:seconds) towards zero.
|
|
Blits an image to screen, nothing else. Requires a single argument: the file name.
|
|
Scrolls a simple looping animation across the screen. Each argument is a bitmap file, and the bitmaps will be moved from right to left on the screen while looping in an animation.
|
|
Renders a text string in the top left corner. Requires one argument: the text string. |
|
This works like hscroll_text, except that the text will be blended on top of an animated streamer. For now the documentation is the source. |
|
Renders a text centered on the screen and makes it appear/disappear with a tile transition. Requires one argument: the text string. |
|
Visualizes a voting between 2 or more choices. The names of those choices are given as arguments to the vote command, and the scores are updated by feeding in numbers on stdin, like "3 2 5\n" for a voting with 3 choices. |