From 571f40d02ec5322b7aa62e8b0f7d37ba538a9a25 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 13 May 2008 01:32:22 +0000 Subject: [ADD] Added Sound class and related code git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@125 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Dialog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'pokemod/Dialog.cpp') diff --git a/pokemod/Dialog.cpp b/pokemod/Dialog.cpp index de1e87f7..43ba518a 100644 --- a/pokemod/Dialog.cpp +++ b/pokemod/Dialog.cpp @@ -523,17 +523,15 @@ void Dialog::validate() case Music: if (numArgs == 1) { - // FIXME: find sound files -// if (!QFile(QString("%1/music/%2").arg(static_cast(pokemod())->path()).arg(arg)).exists()) -// invError = 1; + if (!ok || (static_cast(pokemod())->soundIndex(temp) == INT_MAX)) + invError = 1; } break; case SoundEffect: if (numArgs == 1) { - // FIXME: find sound files -// if (!QFile(QString("%1/sound/%2").arg(static_cast(pokemod())->path()).arg(arg)).exists()) -// invError = 1; + if (!ok || (static_cast(pokemod())->soundIndex(temp) == INT_MAX)) + invError = 1; } else if (numArgs == 2) { -- cgit