Jump to content
  • Advertisement
Sign in to follow this  
Axesor

Stupid Chip Menu won't show.

This topic is 4863 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For all of you who are megaman nt warrior fans and don't know what the PCN is go here: www.freewebs.com/axesor/ Any way. I'm having trouble getting chip selections to show up in the chip box. CShock1.pcn has the data of 1 hers how the game reads it:
BOOL DataShock()
{
  HANDLE hFile = CreateFile(TEXT("pcn_extensions\\CShock1.pcn"), GENERIC_READ, 0, NULL,
    OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
  if (hFile == INVALID_HANDLE_VALUE)
  {
  Shock = 0;
  return FALSE;
  }

    char  cData[2];
    DWORD dwBytesRead;
    if (!ReadFile(hFile, &cData, 1, &dwBytesRead, NULL))
    {
      // Something went wrong, so close the file handle
      CloseHandle(hFile);
      return FALSE;
    }


    Shock = atoi(cData);

  // Close the file
  return CloseHandle(hFile);
}


And heres the drawing functions:
      	if(ChipSelect)
{

////////////////////Must-go-on-top///////////////////
///////////////////Draw-the-avaiable-chips////////////
 TCHAR Chipsz[64];
   ///If shock chip is valid//////////
  if(Shock == 1)
  {
	    RECT  rectchipa = {0, 0, texta, 150 };
  wsprintf(Chipsz, "<Shocker>");
  SetBkMode(hDC, TRANSPARENT);
  SetTextColor(hDC, Selecter[0]);
  DrawText(hDC, Chipsz, -1, &rectchipa, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
  }
    if(Gatl == 1)
  {
		 RECT  rectchipb = {0, 0, texta, 150 };
  wsprintf(Chipsz, "<Gatlin G.>");
  SetBkMode(hDC, TRANSPARENT);
  SetTextColor(hDC, Selecter[1]);
  DrawText(hDC, Chipsz, -1, &rectchipb, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
  }

	
	{
		//Draws the rectangular chip box
    HPEN BlackPen = CreatePen(PS_SOLID, 3, RGB(0, 0, 0));
  SelectObject(hDC, BlackPen);
  HBRUSH LightBBrush = CreateSolidBrush(RGB(0, 0, 150));
  SelectObject(hDC, LightBBrush);
  
  Rectangle(hDC, 320, 35, 40,140);
 

  DeleteObject(BlackPen);
  DeleteObject(LightBBrush);
  }


}


And heres the Chip actions:
/////////////////////////////////
//--Battle chip commands-------//
/////////////////////////////////


void SelectC(int chosen)
{
	if(chosen == 0)
	{
		Chips->SetHidden(FALSE);
	}
	else if(chosen == 1)
	{
		Chipg->SetHidden(FALSE);
	}
	else if(chosen == NULL)
	{
		Chips->SetHidden(TRUE);
		Chipg->SetHidden(TRUE);
	}
    ///Make a delay and end the chip///
	for(int i = 0;i<10;i++)
	{
     Chips->SetHidden(TRUE);
     Chipg->SetHidden(TRUE);
	}
}
/////////////////////////
// Check for valid chip//
/////////////////////////


Anyone knows why this isn't working? I have the menu showing but I see no selection and when I press enter, on a selction no chip action.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!