From 5b1ea5777a2ab37211a495a570098fba3c3e5565 Mon Sep 17 00:00:00 2001 From: Jasx Date: Thu, 28 Apr 2016 18:06:15 +0200 Subject: [PATCH] Add soundspace - Adds a new soundspace - Adds a comment to soundspace --- xobj_core/classes/jas Soundspace.lsl | 22 +++++++++++++++++++++- xobj_core/libraries/libJasPre.lsl | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/xobj_core/classes/jas Soundspace.lsl b/xobj_core/classes/jas Soundspace.lsl index 85a1c89..a1a62fb 100644 --- a/xobj_core/classes/jas Soundspace.lsl +++ b/xobj_core/classes/jas Soundspace.lsl @@ -41,9 +41,29 @@ #define SP_CINEMA "ci" #define SP_FOREST "fo" #define SP_CAVE "cv" +#define SP_TOWN "to" // 2-strided list of soundspaces if you want to add more -#define SP_DATA [SP_RAIN_INTERIOR, "f8c6e681-e2a1-6e71-a38d-7323391d8c64", SP_RAIN_SHELTERED, "165a41d5-12ab-8b71-1fda-6590f616fded", SP_RAIN, "766f250a-410b-81e6-21ec-bfbea99947cc", SP_NIGHT,"2d371ae8-53fa-d640-4faa-b97395c91caa", SP_RUMBLE,"10b0ad90-d8b1-0552-019d-ec8eb853cf6d", SP_DRONE_DARK,"bb72e416-7956-19ce-cc4d-cf5e80a58a2a", SP_DRONE_HOLLOW,"e34305af-0337-7632-5bfb-74e875f0a21d", SP_COMPUTER,"fd36026d-5945-ccc0-b4c3-728f5b79b32c", SP_UNDERWATER,"d0a2c412-34a3-46e1-6668-72281424ede1", SP_NIGHT_INT, "767b9f46-876f-701e-5d7d-e946263c71c3", SP_INT_FIREPLACE,"7515a1f4-a497-2aef-6885-b4bf78f27d65", SP_SEWER_DRIP,"a8ee5281-4e30-2a86-67d9-66c10084ff9a", SP_SEWER_STREAM,"7f2ba05d-9d7b-37f6-6c74-f221fec33426", SP_SEWER_WATERFALL,"52174c27-9c54-a2fd-abf7-b38e2175646e", SP_CINEMA, "c80c9883-9575-22d2-d0a8-1c8b413216e3", SP_FOREST, "969b502f-11d0-eea0-d7d0-e02399ddc849", SP_CAVE, "a764c97d-d359-7732-3cec-bec2c5ab655a"] +#define SP_DATA [ \ + SP_RAIN_INTERIOR, "f8c6e681-e2a1-6e71-a38d-7323391d8c64", \ + SP_RAIN_SHELTERED, "165a41d5-12ab-8b71-1fda-6590f616fded", \ + SP_RAIN, "766f250a-410b-81e6-21ec-bfbea99947cc", \ + SP_NIGHT,"2d371ae8-53fa-d640-4faa-b97395c91caa", \ + SP_RUMBLE,"10b0ad90-d8b1-0552-019d-ec8eb853cf6d", \ + SP_DRONE_DARK,"bb72e416-7956-19ce-cc4d-cf5e80a58a2a", \ + SP_DRONE_HOLLOW,"e34305af-0337-7632-5bfb-74e875f0a21d", \ + SP_COMPUTER,"fd36026d-5945-ccc0-b4c3-728f5b79b32c", \ + SP_UNDERWATER,"d0a2c412-34a3-46e1-6668-72281424ede1", \ + SP_NIGHT_INT, "767b9f46-876f-701e-5d7d-e946263c71c3", \ + SP_INT_FIREPLACE,"7515a1f4-a497-2aef-6885-b4bf78f27d65", \ + SP_SEWER_DRIP,"a8ee5281-4e30-2a86-67d9-66c10084ff9a", \ + SP_SEWER_STREAM,"7f2ba05d-9d7b-37f6-6c74-f221fec33426", \ + SP_SEWER_WATERFALL,"52174c27-9c54-a2fd-abf7-b38e2175646e", \ + SP_CINEMA, "c80c9883-9575-22d2-d0a8-1c8b413216e3", \ + SP_FOREST, "969b502f-11d0-eea0-d7d0-e02399ddc849", \ + SP_CAVE, "a764c97d-d359-7732-3cec-bec2c5ab655a", \ + SP_TOWN, "1d864bd6-a128-8b97-738a-60ca23e6fdc4" \ +] #define Soundspace$override(targ, uuid, vol) runMethod((string)targ, "jas Soundspace", SoundspaceMethod$override, [uuid, vol], TNN) diff --git a/xobj_core/libraries/libJasPre.lsl b/xobj_core/libraries/libJasPre.lsl index 7817fe3..aeb204c 100644 --- a/xobj_core/libraries/libJasPre.lsl +++ b/xobj_core/libraries/libJasPre.lsl @@ -178,7 +178,7 @@ list bitArrToList(integer int, integer bytesize){ #define prAngle(object, var, rotOffset) float var; {vector temp = (prPos(object)-llGetRootPosition())/llGetRootRotation()*rotOffset; var = llAtan2(temp.y,temp.x);} #define prAngX(object, var) prAngle(object, var, ZERO_ROTATION) #define prAngZ(object, var) prAngle(object, var, llEuler2Rot(<0,PI_BY_TWO,0>)) - +// Checks if I am in front of prim #define myAng(object, var, rotOffset) float var; {vector temp = (llGetPos()-prPos(object))/prRot(object)*rotOffset; var = llAtan2(temp.y,temp.x);} #define myAngX(object, var) myAng(object, var, ZERO_ROTATION) #define myAngZ(object, var) myAng(object, var, llEuler2Rot(<0,PI_BY_TWO,0>))