- free(copy);
-}
-
-void PSPEAK(vocab_t msg, int skip)
-/* Find the skip+1st message from msg and print it. msg should be
- * the index of the inventory message for object. (INVEN+N+1 message
- * is game.prop=N message). */
-{
- if (skip >= 0)
- speak(object_descriptions[msg].longs[skip]);
- else
- speak(object_descriptions[msg].inventory);
+ free(rendered);
+}
+
+void speak(const char* msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+ vspeak(msg, ap);
+ va_end(ap);
+}
+
+void pspeak(vocab_t msg, enum speaktype mode, int skip, ...)
+/* Find the skip+1st message from msg and print it. Modes are:
+ * feel = for inventory, what you can touch
+ * look = the long description for the state the object is in
+ * listen = the sound for the state the object is in
+ * study = text on the object. */
+{
+ va_list ap;
+ va_start(ap, skip);
+ switch (mode) {
+ case touch:
+ vspeak(objects[msg].inventory, ap);
+ break;
+ case look:
+ vspeak(objects[msg].longs[skip], ap);
+ break;
+ case hear:
+ vspeak(objects[msg].sounds[skip], ap);
+ break;
+ case study:
+ vspeak(objects[msg].texts[skip], ap);
+ break;
+ }
+ va_end(ap);