Not sure if these will even be used, might be best to just go with no viewmodel hands as there will be so many different character models playable... didn't seem to bother q2 though!


Update:MDave wrote:This is what I'm working on! Although I guess the only thing quake about it anymore is the engine (and a few sounds I've yet to replace).
http://bladebattles.com/kurok/index.html
Sounds great. :) Please let us know if you need any help, and welcome to i3d!ijed wrote:The remake thing is going, well. I've invested so much time in it that stopping would be stupid, but the maps and Qc are both pretty mangled.
Code: Select all
//=============================================================================
/* MAIN MENU */
void M_Main_Back (void)
{
key_dest = key_game;
m_state = m_none;
cls.demonum = m_save_demonum;
if (cls.demonum != -1 && !cls.demoplayback && cls.state != ca_connected) CL_NextDemo ();
}
CMenu main_menu (M_Main_Back);
void M_Menu_Main_f (void)
{
if (key_dest != key_menu)
{
m_save_demonum = cls.demonum;
cls.demonum = -1;
}
key_dest = key_menu;
m_state = m_main;
m_entersound = true;
}
void M_Main_Init (void)
{
main_menu.AddPic ();
main_menu.AddPic ("gfx/ttl_main.lmp");
main_menu.AddTitle ("Select a Submenu");
main_menu.AddOption (M_Menu_SinglePlayer_f, "Single Player Menu");
main_menu.AddSpacer ();
main_menu.AddOption (M_Menu_MultiPlayer_f, "Multiplayer Menu");
main_menu.AddSpacer ();
main_menu.AddOption ("\35\36\36\36\36\36\36\36\36\36\36\36\36\37");
main_menu.AddSpacer ();
main_menu.AddOption (M_Menu_Game_f, "Games Menu");
main_menu.AddSpacer ();
main_menu.AddOption (M_Menu_Maps_f, "Maps Menu");
main_menu.AddSpacer ();
main_menu.AddOption (M_Menu_Options_f, "Options Menu");
main_menu.AddSpacer ();
main_menu.AddOption (M_Menu_Quit_f, "Exit Quake");
}
void M_Main_Draw (void)
{
main_menu.Draw ();
}
void M_Main_Key (int key)
{
main_menu.Key (key);
}Code: Select all
/*
==============================================================================================================
KEYBOARD DEVICE
==============================================================================================================
*/
CDIKeyboard::CDIKeyboard (void)
{
// set the device name
strcpy (this->DeviceName, "Keyboard");
// run an event discard to set the initial state
this->DiscardEvents ();
}
void CDIKeyboard::RunEvents (void)
{
if (!this->Initialized) return;
if (!this->Acquired) return;
// poll the device
if (!this->PollDevice ()) return;
// get the state
HRESULT hr = this->TheDevice->GetDeviceState (256, this->KeyDevState);
// see if access to the device has been lost (or if it's not acquired at all), and if so,
// attempt to re-acquire it.
if ((hr == DIERR_INPUTLOST) || (hr == DIERR_NOTACQUIRED))
{
// re-acquire
this->Acquired = false;
this->Acquire ();
return;
}
// otherwise failed to read - this is done after the above
// test as otherwise FAILED (hr) will trap those conditions.
if (FAILED (hr)) return;
// perform key actions
for (int i = 0; i < NUM_DI_KEYS; i++)
{
// not a key we're interested in
if (!DI_Key_Map[i]) continue;
// get the state
this->KeyState[i] = (this->KeyDevState[i] & 0x80);
// run the events
if (this->KeyState[i] && !this->OldKeyState[i]) Key_Event (DI_Key_Map[i], true);
if (!this->KeyState[i] && this->OldKeyState[i]) Key_Event (DI_Key_Map[i], false);
// store back
this->OldKeyState[i] = this->KeyState[i];
}
}
void CDIKeyboard::DiscardEvents (void)
{
for (int i = 0; i < NUM_DI_KEYS; i++)
{
// not a key we're interested in
if (!DI_Key_Map[i]) continue;
// send an up event for each key to make sure they're really cleared
Key_Event (i, false);
// clear the state
this->KeyState[i] = false;
this->OldKeyState[i] = false;
}
}