Publish VCC Plus OSS source distribution for 3.6.2 build 60

This commit is contained in:
Brian Holman committed 2026-11-13 00:14:03 -07:00
commit c652a5276d
1192 files changed
+272368

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
// Copyright 2015 by Joseph Forgione
// This file is part of VCC (Virtual Color Computer).
//
// VCC (Virtual Color Computer) 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 3 of the License, or
// (at your option) any later version.
//
// VCC (Virtual Color Computer) 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 VCC (Virtual Color Computer). If not, see <http://www.gnu.org/licenses/>.
//
// Debugger Utilities - Part of the Debugger package for VCC
// Author: Chet Simpson
#pragma once
#include <Windows.h>
#include <string>
#include <vector>
namespace VCC::Debugger
{
template<class Type_>
inline LPCSTR ToLPCSTR(std::basic_string<Type_>& str)
{
return str.c_str();
}
template<class Type_>
inline LPCSTR ToLPCSTR(const std::basic_string<Type_>& str)
{
return str.c_str();
}
template<class Type_>
LPCSTR ToLPCSTR(const std::basic_filebuf<Type_>&& str)
{
static_assert("RValue not supported for ToLPCSTR");
}
std::string ToHexString(long value, int length, bool leadingZeros = true);
std::string ToDecimalString(long value, int length, bool leadingZeros = true);
std::string ToByteString(const std::vector<unsigned char>& bytes);
bool replace(std::string& str, const std::string& from, const std::string& to);
int roundUp(int numToRound, int multiple);
int roundDn(int numToRound, int multiple);
unsigned char DbgRead8(bool phyAddr, unsigned short block, unsigned short PC);
}
namespace VCC::Debugger::UI
{
struct BackBufferInfo
{
HDC DeviceContext = nullptr;
HBITMAP Bitmap = nullptr;
RECT Rect{};
int Width = 0;
int Height = 0;
void CleanupDC(HWND hWnd);
void CleanupBitmap();
};
BackBufferInfo AttachBackBuffer(HWND hWnd, int widthAdjust, int heightAdjust);
}