diff options
Diffstat (limited to 'engines/tony/mpal/mpal.cpp')
| -rw-r--r-- | engines/tony/mpal/mpal.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 19e3d43df4..c813b354b0 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -8,17 +8,16 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * */ /* * This code is based on original Tony Tough source code @@ -1519,13 +1518,12 @@ void mpalFree() { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns numeric results. */ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { Common::String buf; uint32 dwRet = 0; - char *n; va_list v; va_start(v, wQueryType); @@ -1626,7 +1624,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { */ lockVar(); int x = GETARG(uint32); - n = GETARG(char *); + char *n = GETARG(char *); buf = Common::String::format("Status.%u", x); if (varGetValue(buf.c_str()) <= 0) n[0]='\0'; @@ -1716,11 +1714,10 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns a pointer or handle. */ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { - char *n; Common::String buf; va_list v; va_start(v, wQueryType); @@ -1798,12 +1795,9 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { error("mpalQuery(MPQ_ITEM_IS_ACTIVE, uint32 nItem) used incorrect variant"); } else if (wQueryType == MPQ_ITEM_NAME) { - /* - * uint32 mpalQuery(MPQ_ITEM_NAME, uint32 nItem, char *lpszName); - */ lockVar(); int x = GETARG(uint32); - n = GETARG(char *); + char *n = GETARG(char *); buf = Common::String::format("Status.%u", x); if (varGetValue(buf.c_str()) <= 0) n[0] = '\0'; @@ -1873,7 +1867,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that needs to run within a co-routine context. */ void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet) { |
