Update svn properties.

0.6.0-stable
Jeff Ames 2008-06-23 05:15:30 +00:00
parent eecaf327b9
commit e9a61e7c74
2 changed files with 75 additions and 74 deletions

View File

@ -1,74 +1,74 @@
// Grafitti board 0.0.2 for OpenSim // Grafitti board 0.0.2 for OpenSim
// By Justin Clark-Casey (justincc) // By Justin Clark-Casey (justincc)
// http://justincc.wordpress.com // http://justincc.wordpress.com
// This script is available under the BSD License // This script is available under the BSD License
string text = ""; string text = "";
int LISTENING_CHANNEL = 43; int LISTENING_CHANNEL = 43;
// XXX Only putting this here as well to get around OpenSim's int -> string casting oddness // XXX Only putting this here as well to get around OpenSim's int -> string casting oddness
string LISTENING_CHANNEL_STRING = "43"; string LISTENING_CHANNEL_STRING = "43";
// FIXME: Should be dynamic! // FIXME: Should be dynamic!
int CHARS_WIDTH = 42; int CHARS_WIDTH = 42;
default default
{ {
state_entry() state_entry()
{ {
llSetText( llSetText(
"Say /" + LISTENING_CHANNEL_STRING + " <message> to add text." "Say /" + LISTENING_CHANNEL_STRING + " <message> to add text."
+ " Say /" + LISTENING_CHANNEL_STRING + " Say /" + LISTENING_CHANNEL_STRING
+ " !clear to clear board", + " !clear to clear board",
<0.0, 1.0, 0.0>, 1.0); <0.0, 1.0, 0.0>, 1.0);
llListen(LISTENING_CHANNEL, "", NULL_KEY, ""); llListen(LISTENING_CHANNEL, "", NULL_KEY, "");
addGraffiti("justincc's graffiti board v0.0.2"); addGraffiti("justincc's graffiti board v0.0.2");
addGraffiti("Now with primitive word wrap!"); addGraffiti("Now with primitive word wrap!");
draw(); draw();
} }
listen(integer channel, string name, key id, string message) listen(integer channel, string name, key id, string message)
{ {
if (message == "!clear") if (message == "!clear")
{ {
clearGraffiti(); clearGraffiti();
} }
else else
{ {
addGraffiti(message); addGraffiti(message);
} }
draw(); draw();
} }
} }
// Add some additional graffiti // Add some additional graffiti
void addGraffiti(string message) void addGraffiti(string message)
{ {
while (llStringLength(message) > CHARS_WIDTH) while (llStringLength(message) > CHARS_WIDTH)
{ {
text += "\n\n" + llGetSubString(message, 0, CHARS_WIDTH - 1); text += "\n\n" + llGetSubString(message, 0, CHARS_WIDTH - 1);
message = llDeleteSubString(message, 0, CHARS_WIDTH - 1); message = llDeleteSubString(message, 0, CHARS_WIDTH - 1);
} }
text += "\n\n" + message; text += "\n\n" + message;
} }
// Clear the existing graffiti // Clear the existing graffiti
void clearGraffiti() void clearGraffiti()
{ {
text = ""; text = "";
} }
// Actually fires the graffiti out to the dynamic texture module // Actually fires the graffiti out to the dynamic texture module
void draw() void draw()
{ {
//llSay(0, text); //llSay(0, text);
string drawList = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text " + text + ";"; string drawList = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text " + text + ";";
osSetDynamicTextureData("", "vector", drawList, "1024", 0); osSetDynamicTextureData("", "vector", drawList, "1024", 0);
} }

View File

@ -65,6 +65,7 @@ property_map = {
".mdp" : text, ".mdp" : text,
".mds" : text, ".mds" : text,
".nsi" : text, ".nsi" : text,
".ogg" : binary,
".pdb" : binary, ".pdb" : binary,
".php" : script, ".php" : script,
".pidb" : binary, ".pidb" : binary,