void AppInfoPanel::createGui() {
            const wxBitmap appIconImage = IO::loadImageResource("AppIcon.png");
            wxStaticBitmap* appIcon = new wxStaticBitmap(this, wxID_ANY, appIconImage);
            wxStaticText* appName = new wxStaticText(this, wxID_ANY, "TrenchBroom");
            appName->SetFont(appName->GetFont().Larger().Larger().Larger().Larger().Bold());
            wxStaticLine* appLine = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
            wxStaticText* appClaim = new wxStaticText(this, wxID_ANY, "Level Editor");
            
            wxString versionStr("Version ");
            versionStr << getBuildVersion() << " " << getBuildChannel();
            
            wxString buildStr("Build ");
            buildStr << getBuildId() << " " << getBuildType();
            
            wxStaticText* version = new wxStaticText(this, wxID_ANY, versionStr);
            wxStaticText* build = new wxStaticText(this, wxID_ANY, buildStr);
#if !defined(_WIN32)
            version->SetFont(version->GetFont().Smaller());
            build->SetFont(build->GetFont().Smaller());
#endif
            version->SetForegroundColour(wxColor(128, 128, 128));
            build->SetForegroundColour(wxColor(128, 128, 128));
            
            SetBackgroundColour(*wxWHITE);
            
            wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
            sizer->Add(appIcon, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(appName, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(appLine, 0, wxEXPAND);
            sizer->Add(appClaim, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(version, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->Add(build, 0, wxALIGN_CENTER_HORIZONTAL);
            sizer->AddStretchSpacer();
            SetSizerAndFit(sizer);
        }
Exemple #2
0
Addresses* HexSearcher::GetAddresses(Addresses* addresses)
{
    bool create = false;

    if (!addresses)
    {
        addresses = new Addresses();
        create = true;
    }

    HexPatterns::FindBuildInfo(addresses);
    if (addresses->BuildInfo)
    {
        std::string buildStr(ReadString(addresses->BuildInfo + 5, 40));
        if (buildStr.find("Release Assertions Enabled") != std::string::npos)
            sSniffer->SetTestClient();
        else if (buildStr.find("Release") == std::string::npos)
            printf("WARNING: Build does not appear to be supported.\n");
    }

    HexPatterns::Find(addresses);
    if (!addresses->IsValid())
    {
        if (create)
            delete addresses;

        return nullptr;
    }

    return addresses;
}
/* Pushes char * (pointer to a string) on the stack  */
Type* strLiteral(char *string){
	/* initialize record */
	Type *structPtr;
	if((structPtr = (Type *) malloc(sizeof(Type *))) == NULL)
		printError( "Malloc of string type struct failed", 3);
	structPtr->longval = NULL;
	structPtr->dubval = NULL;
	structPtr->strval = string;
	structPtr->type = 302; //enum val for STRING
	structPtr->attr = NULL; //pointer to Attributes(additional info)
	/* asm write */
	fprintf( curDataFile, ".sLit%ld:\tdb  '", strings_in_use);
	
	/* parse the string for escape sequences that must be handled for NASM */
	buildStr(string); 
	
	fprintf( textSec, "\tpush\tQWORD %s.sLit%ld\n", currentScopeStr, strings_in_use++);
	return structPtr;
}