What new codes are already implented ?

Discussion about Rocks'n'Diamonds, Boulder Dash, Supaplex, Emerald Mine and any other BD hybrid.

Moderators: Flumminator, Zomis

Post Reply
richard
Posts: 199
Joined: Fri Jun 18, 2004 9:00 pm

What new codes are already implented ?

Post by richard »

Is there for example the code in the soundsinfo.conf implented ?:

custom_1.creating: abc.wav

If not, could you please insert this too ? I think we have already spoken about a "sound by creating" thing... so, ämm... Holger ? :D
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

main.c

Code: Select all

struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
{
  { ".[DEFAULT]",		ACTION_DEFAULT,			TRUE	},
  { ".waiting",			ACTION_WAITING,			TRUE	},
  { ".falling",			ACTION_FALLING,			TRUE	},
  { ".moving",			ACTION_MOVING,			TRUE	},
  { ".digging",			ACTION_DIGGING,			FALSE	},
  { ".snapping",		ACTION_SNAPPING,		FALSE	},
  { ".collecting",		ACTION_COLLECTING,		FALSE	},
  { ".dropping",		ACTION_DROPPING,		FALSE	},
  { ".pushing",			ACTION_PUSHING,			FALSE	},
  { ".walking",			ACTION_WALKING,			FALSE	},
  { ".passing",			ACTION_PASSING,			FALSE	},
  { ".impact",			ACTION_IMPACT,			FALSE	},
  { ".breaking",		ACTION_BREAKING,		FALSE	},
  { ".activating",		ACTION_ACTIVATING,		FALSE	},
  { ".deactivating",		ACTION_DEACTIVATING,		FALSE	},
  { ".opening",			ACTION_OPENING,			FALSE	},
  { ".closing",			ACTION_CLOSING,			FALSE	},
  { ".attacking",		ACTION_ATTACKING,		TRUE	},
  { ".growing",			ACTION_GROWING,			TRUE	},
  { ".shrinking",		ACTION_SHRINKING,		FALSE	},
  { ".active",			ACTION_ACTIVE,			TRUE	},
  { ".filling",			ACTION_FILLING,			FALSE	},
  { ".emptying",		ACTION_EMPTYING,		FALSE	},
  { ".changing",		ACTION_CHANGING,		FALSE	},
  { ".exploding",		ACTION_EXPLODING,		FALSE	},
  { ".boring",			ACTION_BORING,			FALSE	},
  { ".boring[1]",		ACTION_BORING_1,		FALSE	},
  { ".boring[2]",		ACTION_BORING_2,		FALSE	},
  { ".boring[3]",		ACTION_BORING_3,		FALSE	},
  { ".boring[4]",		ACTION_BORING_4,		FALSE	},
  { ".boring[5]",		ACTION_BORING_5,		FALSE	},
  { ".boring[6]",		ACTION_BORING_6,		FALSE	},
  { ".boring[7]",		ACTION_BORING_7,		FALSE	},
  { ".boring[8]",		ACTION_BORING_8,		FALSE	},
  { ".boring[9]",		ACTION_BORING_9,		FALSE	},
  { ".boring[10]",		ACTION_BORING_10,		FALSE	},
  { ".sleeping",		ACTION_SLEEPING,		FALSE	},
  { ".sleeping[1]",		ACTION_SLEEPING_1,		FALSE	},
  { ".sleeping[2]",		ACTION_SLEEPING_2,		FALSE	},
  { ".sleeping[3]",		ACTION_SLEEPING_3,		FALSE	},
  { ".awakening",		ACTION_AWAKENING,		FALSE	},
  { ".dying",			ACTION_DYING,			FALSE	},
  { ".turning",			ACTION_TURNING,			FALSE	},
  { ".turning_from_left",	ACTION_TURNING_FROM_LEFT,	FALSE	},
  { ".turning_from_right",	ACTION_TURNING_FROM_RIGHT,	FALSE	},
  { ".turning_from_up",		ACTION_TURNING_FROM_UP,		FALSE	},
  { ".turning_from_down",	ACTION_TURNING_FROM_DOWN,	FALSE	},
  { ".other",			ACTION_OTHER,			FALSE	},

  /* empty suffix always matches -- check as last entry in InitSoundInfo() */
  { "",				ACTION_DEFAULT,			TRUE	},

  { NULL,			0,				0	}
}; 
Test those in the leftmost column. Not sure which of them works where but I'm 99% sure that there's nothing more, except those, that will work.
richard
Posts: 199
Joined: Fri Jun 18, 2004 9:00 pm

Post by richard »

Thanks, but I need the code I wrote above.
Hmm... seems that it is NOT implented yet...

Version 3.1.1 would seem pretty with that code, don´t you think too Holger ? :D
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

3.1.1 will be a bugfix release for 3.1.0; but your idea of adding a ".creating" sound is worth implementing. (I think it's already on the TODO list.)

Maybe it will find it's way into 3.1.2 or 3.1.3... We'll see. :-)
Yoshi348
Posts: 132
Joined: Fri Jun 18, 2004 8:27 pm
Location: My own little world (California)

Post by Yoshi348 »

What's the true/false column for? Whether or not it can be used for custom elements? Cause I'm trying to make a sound when my blinking nut (it changes from red (nothing) to green (gem)) is hit by a rock and changes, and I can't really figure out how to do it (even from the end of the element it changes into [for green, a nut cracking animation]).
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> What's the true/false column for?

Just look at the definition of "ElementActionInfo":

Code: Select all

struct ElementActionInfo
{
  char *suffix;
  int value;
  boolean is_loop_sound;
};
So, it sets the default setting if this sound action is looping or not (which you can of course override in your sound settings).

> Whether or not it can be used for custom elements? Cause I'm trying to make a sound
> when my blinking nut (it changes from red (nothing) to green (gem)) is hit by a rock and
> changes, and I can't really figure out how to do it (even from the end of the element it
> changes into [for green, a nut cracking animation]).

Using "custom_x.changing: <sound>" with "custom_x" being your "red nut" element should do it...
Yoshi348
Posts: 132
Joined: Fri Jun 18, 2004 8:27 pm
Location: My own little world (California)

Post by Yoshi348 »

Hmm... but that would do it for all change pages, and I don't want them making annoying noises while blinking. (The red and green nuts are seperate elements... there wouldn't seem to be a way to have different contents based on the animation frame.) I just want a sound when they get cracked open.

EDIT: Nevermind, I figured out a clever way to do it.
Zomis
Posts: 1502
Joined: Mon Jun 21, 2004 1:27 pm
Location: Sweden
Contact:

Post by Zomis »

Yoshi348 wrote:Hmm... but that would do it for all change pages, and I don't want them making annoying noises while blinking. (The red and green nuts are seperate elements... there wouldn't seem to be a way to have different contents based on the animation frame.) I just want a sound when they get cracked open.

EDIT: Nevermind, I figured out a clever way to do it.
I guess that clever way is something like having your red nut change to <temp CE>, which changes to green nut + has that sound set?
At least that was the only clever way I just came up with... ;)
Yoshi348
Posts: 132
Joined: Fri Jun 18, 2004 8:27 pm
Location: My own little world (California)

Post by Yoshi348 »

Close, but my goal was to have it make NO noise when cycling from red to green to red, and it only making noise when cracked open. I already had a sort of temp CE for the cracking animation, so I just made the cracking CE use a changing sound.
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> Hmm... but that would do it for all change pages, and I don't want them making annoying
> noises while blinking.

Yes, I am aware of that problem that was introduced together with the "change pages" (without also adding a possibility to distinguish them with sounds).

I'll try to find a good solution for that problem (like "custom_x.changing.<page>: <sound>"); until then, your or Zomis' way of using helper CEs is a usable interim solution.
Post Reply