Files
source/MessageBoxScreen.h
T
Wanne 20d677c519 New Feature: Layered hierarchical tripwire networks (by Flugente)
- allows creating of complex tripwire networks, that behave differently depending on where they are activated. Different networks can overlap, allowing a wide range of trap network designs
- added network-specific view methods (ALT + Shift + C)
- added new dialogues when planting tripwire

New feature: remote defusing of mines (by Flugente)
- the new items Remote Defuse and Remote Combo allow to remotely defuse a bomb that has been planted. Simply select a frequency for defusing upon planting the mine. This frequency is of course treated differently than a detonation frequency.

New feature: directional frag explosions (by Flugente)
- the tag <Directional>1</Directional> in Items.xml allows an explosive to be directional. Frags caused by its explosion will fly in the direction determined by the merc planting them.
- the tags <ubHorizontalDegree> and <ubVerticalDegree> in Explosives.xml determine the arc in which the frags will fly.

New feature: makeshift mines (by Flugente)
- you can now create mines out of grenades: simply merge tripwire with them. You can then use them like regular mines. They can also be activated by your tripwire networks.
- With a simple item transformation in the UDB, you can transform a makeshift mine back to a grenade and a piece of tripwire.

Minor changes (by Flugente)
- metal detector now only works if used in hands
- wire cutters give a bonus if in hands while defusing tripwire or tripwire-activatable mines/bombs
- added new message boxes with 8 and 16 buttons
- increased the maximum number of bullets that can be on screen from 200 to 1000 (necessary for mass claymore explosions)
- the tags <Detonator> and <RemoteDetonator> are not used anymore, as those properties can be set via flags in <AttachmentClass>. For now, they still remain in the xmls though.

WARNING! This will break savegame compatibility!

More infos on those features:
1st post: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=303556&#Post303556 






git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5217 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-04-20 10:40:16 +00:00

116 lines
4.9 KiB
C

#ifndef _MSGBOX_H
#define _MSGBOX_H
#include "mousesystem.h"
// Message box flags
#define MSG_BOX_FLAG_USE_CENTERING_RECT 0x0001 // Pass in a rect to center in
#define MSG_BOX_FLAG_OK 0x0002 // Displays OK button
#define MSG_BOX_FLAG_YESNO 0x0004 // Displays YES NO buttons
#define MSG_BOX_FLAG_CANCEL 0x0008 // Displays YES NO buttons
#define MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS 0x0010 // Displays four numbered buttons, 1-4
#define MSG_BOX_FLAG_YESNOCONTRACT 0x0020 // yes no and contract buttons
#define MSG_BOX_FLAG_OKCONTRACT 0x0040 // ok and contract buttons
#define MSG_BOX_FLAG_YESNOLIE 0x0080 // ok and contract buttons
#define MSG_BOX_FLAG_CONTINUESTOP 0x0100 // continue stop box
#define MSG_BOX_FLAG_OKSKIP 0x0200 // Displays ok or skip (meanwhile) buttons
#define MSG_BOX_FLAG_GENERICCONTRACT 0x0400 // displays contract buttoin + 2 user-defined text buttons
#define MSG_BOX_FLAG_GENERIC 0x0800 // 2 user-defined text buttons
// OJW - Adding text chatbox
#define MSG_BOX_FLAG_INPUTBOX 0x1000 // has a text input field
// Flugente - added boxes for simultaneous defuse/detonate mechanism
#define MSG_BOX_FLAG_EIGHT_NUMBERED_BUTTONS 0x2000 // Displays eight numbered buttons, 1-4, 10, 20, 30, 40. Numbers 1-4 respond to the normal detonate mechanism, rest to defusing
#define MSG_BOX_FLAG_SIXTEEN_NUMBERED_BUTTONS 0x4000 // Displays sixteen numbered buttons, 1-16, for setting up a tripwire network and choosing both a detonation and defusing frequency
// message box return codes
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
#define MSG_BOX_RETURN_YES 2 // ENTER or YES button
#define MSG_BOX_RETURN_NO 3 // ESC, Right Click or NO button
#define MSG_BOX_RETURN_CONTRACT 4 // contract button
#define MSG_BOX_RETURN_LIE 5 // LIE BUTTON
// message box style flags
enum
{
MSG_BOX_BASIC_STYLE = 0, // We'll have other styles, like in laptop, etc
// Graphics are all that are required here...
MSG_BOX_RED_ON_WHITE,
MSG_BOX_BLUE_ON_GREY,
MSG_BOX_BASIC_SMALL_BUTTONS,
MSG_BOX_IMP_STYLE,
MSG_BOX_LAPTOP_DEFAULT,
};
typedef void (*MSGBOX_CALLBACK)( UINT8 bExitValue );
typedef struct
{
UINT16 usFlags;
UINT32 uiExitScreen;
MSGBOX_CALLBACK ExitCallback;
INT16 sX;
INT16 sY;
UINT32 uiSaveBuffer;
MOUSE_REGION BackRegion;
UINT16 usWidth;
UINT16 usHeight;
INT32 iButtonImages;
union
{
struct
{
UINT32 uiOKButton;
UINT32 uiYESButton;
UINT32 uiNOButton;
UINT32 uiUnusedButton;
};
struct
{
UINT32 uiButton[16];
};
};
BOOLEAN fRenderBox;
INT8 bHandled;
INT32 iBoxId;
BOOLEAN fWasPaused;
} MESSAGE_BOX_STRUCT;
extern MESSAGE_BOX_STRUCT gMsgBox;
extern BOOLEAN fRestoreBackgroundForMessageBox;
//this variable can be unset if ur in a non gamescreen and DONT want the msg box to use the save buffer
extern BOOLEAN gfDontOverRideSaveBuffer;
//OJW - 20090208
extern CHAR16 gszMsgBoxInputString[255];
////////////////////////////////
// ubStyle: Determines the look of graphics including buttons
// zString: 16-bit string
// uiExitScreen The screen to exit to
// ubFlags Some flags for button style
// ReturnCallback Callback for return. Can be NULL. Returns any above return value
// pCenteringRect Rect to send if MSG_BOX_FLAG_USE_CENTERING_RECT set. Can be NULL
////////////////////////////////
INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
void DoScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoUpperScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoLowerScreenIndependantMessageBox( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
void DoScreenIndependantMessageBoxWithRect( const STR16 zString, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
//wrappers for other screens
BOOLEAN DoLapTopSystemMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoOptionsMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
BOOLEAN DoSaveLoadMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback, SGPRect *pCenteringRect );
#endif