Skeleton for pre-connect configuration dialog
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2497 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -3857,6 +3857,14 @@ SOURCE=..\sc2code\clock.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\sc2code\cnctdlg.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\sc2code\cnctdlg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\sc2code\coderes.h
|
SOURCE=..\sc2code\coderes.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
uqm_SUBDIRS="comm libs planets ships"
|
uqm_SUBDIRS="comm libs planets ships"
|
||||||
uqm_CFILES="battle.c border.c build.c cleanup.c clock.c collide.c comm.c
|
uqm_CFILES="battle.c border.c build.c cleanup.c clock.c cnctdlg.c collide.c
|
||||||
commanim.c commglue.c confirm.c credits.c cyborg.c demo.c
|
comm.c commanim.c commglue.c confirm.c credits.c cyborg.c
|
||||||
displist.c dummy.c encount.c fmv.c galaxy.c gameev.c
|
demo.c displist.c dummy.c encount.c fmv.c galaxy.c gameev.c
|
||||||
gameinp.c gameopt.c gendef.c getchar.c globdata.c gravity.c
|
gameinp.c gameopt.c gendef.c getchar.c globdata.c gravity.c
|
||||||
gravwell.c grpinfo.c hyper.c init.c intel.c intro.c ipdisp.c
|
gravwell.c grpinfo.c hyper.c init.c intel.c intro.c ipdisp.c
|
||||||
load.c loadship.c master.c melee.c menu.c misc.c mouse_err.c
|
load.c loadship.c master.c melee.c menu.c misc.c mouse_err.c
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
//Copyright Michael Martin, 2006
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef NETPLAY
|
||||||
|
|
||||||
|
#include "cnctdlg.h"
|
||||||
|
#include "controls.h"
|
||||||
|
|
||||||
|
typedef struct connect_dialog_state
|
||||||
|
{
|
||||||
|
BOOLEAN (*InputFunc) (struct connect_dialog_state *pInputState);
|
||||||
|
COUNT MenuRepeatDelay;
|
||||||
|
|
||||||
|
BOOLEAN Initialized;
|
||||||
|
int which_side;
|
||||||
|
|
||||||
|
int option;
|
||||||
|
} CONNECT_DIALOG_STATE;
|
||||||
|
|
||||||
|
typedef CONNECT_DIALOG_STATE *PCONNECT_DIALOG_STATE;
|
||||||
|
|
||||||
|
static BOOLEAN
|
||||||
|
DoMeleeConnectDialog (PCONNECT_DIALOG_STATE state)
|
||||||
|
{
|
||||||
|
if (!state->Initialized)
|
||||||
|
{
|
||||||
|
state->Initialized = TRUE;
|
||||||
|
SetDefaultMenuRepeatDelay ();
|
||||||
|
/* Prepare widgets, draw stuff, etc. */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* But this is skeletal, so just end immediately */
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
MeleeConnectDialog (int side)
|
||||||
|
{
|
||||||
|
CONNECT_DIALOG_STATE state;
|
||||||
|
|
||||||
|
state.Initialized = FALSE;
|
||||||
|
state.which_side = side;
|
||||||
|
state.InputFunc = DoMeleeConnectDialog;
|
||||||
|
|
||||||
|
DoInput ((PVOID)&state, TRUE);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* NETPLAY */
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
//Copyright Michael Martin, 2006
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef NETPLAY
|
||||||
|
|
||||||
|
#ifndef _CNCTDLG_H
|
||||||
|
#define _CNCTDLG_H
|
||||||
|
|
||||||
|
#include "libs/compiler.h"
|
||||||
|
|
||||||
|
BOOLEAN MeleeConnectDialog (int side);
|
||||||
|
|
||||||
|
#endif /* _CNCTDLG_H */
|
||||||
|
|
||||||
|
#endif /* NETPLAY */
|
||||||
|
|
||||||
@@ -2503,9 +2503,16 @@ DoMelee (PMELEE_STATE pMS)
|
|||||||
#ifdef NETPLAY
|
#ifdef NETPLAY
|
||||||
case NET_TOP:
|
case NET_TOP:
|
||||||
case NET_BOT:
|
case NET_BOT:
|
||||||
|
{
|
||||||
|
COUNT which_side;
|
||||||
|
which_side = pMS->MeleeOption == NET_TOP ? 1 : 0;
|
||||||
|
if (MeleeConnectDialog (which_side))
|
||||||
|
{
|
||||||
pMS->Initialized = FALSE;
|
pMS->Initialized = FALSE;
|
||||||
pMS->InputFunc = DoConnectingDialog;
|
pMS->InputFunc = DoConnectingDialog;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
case CONTROLS_TOP:
|
case CONTROLS_TOP:
|
||||||
case CONTROLS_BOT:
|
case CONTROLS_BOT:
|
||||||
|
|||||||
Reference in New Issue
Block a user