2010-08-17 09:28:20 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
2021-12-26 17:47:58 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-02-18 01:34:21 +00:00
|
|
|
*
|
2010-08-17 09:28:20 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:21 +00:00
|
|
|
*
|
2010-08-17 09:28:20 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 17:47:58 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2010-08-17 09:28:20 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This code is based on original Hugo Trilogy source code
|
|
|
|
*
|
|
|
|
* Copyright (c) 1989-1995 David P. Gray
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HUGO_UTIL_H
|
|
|
|
#define HUGO_UTIL_H
|
|
|
|
|
|
|
|
namespace Hugo {
|
|
|
|
|
|
|
|
enum seqTextUtil {
|
2010-11-11 15:01:57 +00:00
|
|
|
kGameOver = 0
|
2010-08-17 09:28:20 +00:00
|
|
|
};
|
|
|
|
|
2011-02-12 08:13:35 +00:00
|
|
|
namespace Utils {
|
2011-01-23 00:05:52 +00:00
|
|
|
|
2011-02-12 08:13:35 +00:00
|
|
|
int firstBit(byte data);
|
|
|
|
int lastBit(byte data);
|
2010-09-27 21:50:11 +00:00
|
|
|
|
2011-02-12 08:13:35 +00:00
|
|
|
void reverseByte(byte *data);
|
2010-09-27 21:50:11 +00:00
|
|
|
|
2011-03-21 12:07:23 +00:00
|
|
|
/**
|
|
|
|
* Show a dialog notifying the user about something, with
|
|
|
|
* only a simple "OK" button to dismiss it.
|
|
|
|
*/
|
2020-06-16 19:57:23 +00:00
|
|
|
void notifyBox(const Common::String &msg); // Redirect to call notifyBox with u32strings
|
|
|
|
void notifyBox(const Common::U32String &msg);
|
2011-03-21 12:07:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Show a dialog prompting the player to input some text.
|
|
|
|
*/
|
|
|
|
Common::String promptBox(const Common::String &msg);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show a dialog prompting the player for a "yes"/"no" choice.
|
|
|
|
*/
|
2020-06-16 19:57:23 +00:00
|
|
|
bool yesNoBox(const Common::String &msg); // Redirect to call yesNoBox with u32strings
|
|
|
|
bool yesNoBox(const Common::U32String &msg);
|
2011-03-21 12:07:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert a string to lower case, in place.
|
|
|
|
* @param buffer string to convert to lower case
|
|
|
|
* @return the string which was passed in
|
|
|
|
*/
|
2011-02-12 08:13:35 +00:00
|
|
|
char *strlwr(char *buffer);
|
2011-03-21 11:53:50 +00:00
|
|
|
|
|
|
|
} // End of namespace Utils
|
2010-08-17 09:28:20 +00:00
|
|
|
|
2010-08-27 09:48:53 +00:00
|
|
|
} // End of namespace Hugo
|
|
|
|
|
2010-08-17 09:28:20 +00:00
|
|
|
#endif
|