mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-30 04:50:08 +00:00
Resolves all current analyser warnings.
This commit is contained in:
parent
ecd3350a6f
commit
c6e6c3fcfb
@ -44,17 +44,17 @@ OpenGLOutputBuilder::OpenGLOutputBuilder(size_t bytes_per_pixel) :
|
|||||||
// create the source vertex array
|
// create the source vertex array
|
||||||
glGenVertexArrays(1, &source_vertex_array_);
|
glGenVertexArrays(1, &source_vertex_array_);
|
||||||
|
|
||||||
bool supports_texture_barrier = false;
|
// bool supports_texture_barrier = false;
|
||||||
#ifdef GL_NV_texture_barrier
|
#ifdef GL_NV_texture_barrier
|
||||||
GLint number_of_extensions;
|
// GLint number_of_extensions;
|
||||||
glGetIntegerv(GL_NUM_EXTENSIONS, &number_of_extensions);
|
// glGetIntegerv(GL_NUM_EXTENSIONS, &number_of_extensions);
|
||||||
|
//
|
||||||
for(GLuint c = 0; c < (GLuint)number_of_extensions; c++) {
|
// for(GLuint c = 0; c < (GLuint)number_of_extensions; c++) {
|
||||||
const char *extension_name = (const char *)glGetStringi(GL_EXTENSIONS, c);
|
// const char *extension_name = (const char *)glGetStringi(GL_EXTENSIONS, c);
|
||||||
if(!strcmp(extension_name, "GL_NV_texture_barrier")) {
|
// if(!strcmp(extension_name, "GL_NV_texture_barrier")) {
|
||||||
supports_texture_barrier = true;
|
// supports_texture_barrier = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if(supports_texture_barrier) {
|
// if(supports_texture_barrier) {
|
||||||
|
@ -92,6 +92,10 @@ static void AddToDisassembly(PartialDisassembly &disassembly, const std::vector<
|
|||||||
#define IM_INSTRUCTION(base, op) \
|
#define IM_INSTRUCTION(base, op) \
|
||||||
case base: instruction.operation = op; break;
|
case base: instruction.operation = op; break;
|
||||||
switch(operation) {
|
switch(operation) {
|
||||||
|
default:
|
||||||
|
instruction.operation = Instruction::KIL;
|
||||||
|
break;
|
||||||
|
|
||||||
IM_INSTRUCTION(0x00, Instruction::BRK)
|
IM_INSTRUCTION(0x00, Instruction::BRK)
|
||||||
IM_INSTRUCTION(0x20, Instruction::JSR)
|
IM_INSTRUCTION(0x20, Instruction::JSR)
|
||||||
IM_INSTRUCTION(0x40, Instruction::RTI)
|
IM_INSTRUCTION(0x40, Instruction::RTI)
|
||||||
|
@ -139,19 +139,6 @@ Media StaticAnalyser::GetMedia(const char *file_name) {
|
|||||||
std::list<Target> StaticAnalyser::GetTargets(const char *file_name) {
|
std::list<Target> StaticAnalyser::GetTargets(const char *file_name) {
|
||||||
std::list<Target> targets;
|
std::list<Target> targets;
|
||||||
|
|
||||||
// Get the extension, if any; it will be assumed that extensions are reliable, so an extension is a broad-phase
|
|
||||||
// test as to file format.
|
|
||||||
const char *mixed_case_extension = strrchr(file_name, '.');
|
|
||||||
char *lowercase_extension = nullptr;
|
|
||||||
if(mixed_case_extension) {
|
|
||||||
lowercase_extension = strdup(mixed_case_extension+1);
|
|
||||||
char *parser = lowercase_extension;
|
|
||||||
while(*parser) {
|
|
||||||
*parser = (char)tolower(*parser);
|
|
||||||
parser++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Collect all disks, tapes and ROMs as can be extrapolated from this file, forming the
|
// Collect all disks, tapes and ROMs as can be extrapolated from this file, forming the
|
||||||
// union of all platforms this file might be a target for.
|
// union of all platforms this file might be a target for.
|
||||||
TargetPlatformType potential_platforms = 0;
|
TargetPlatformType potential_platforms = 0;
|
||||||
|
@ -346,7 +346,7 @@ uint8_t Parser::get_next_byte() {
|
|||||||
std::vector<uint8_t> Parser::get_track() {
|
std::vector<uint8_t> Parser::get_track() {
|
||||||
std::vector<uint8_t> result;
|
std::vector<uint8_t> result;
|
||||||
int distance_until_permissible_sync = 0;
|
int distance_until_permissible_sync = 0;
|
||||||
uint8_t last_id[6];
|
uint8_t last_id[6] = {0, 0, 0, 0, 0, 0};
|
||||||
int last_id_pointer = 0;
|
int last_id_pointer = 0;
|
||||||
bool next_is_type = false;
|
bool next_is_type = false;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ std::shared_ptr<Track> OricMFMDSK::get_uncached_track_at_position(unsigned int h
|
|||||||
// The file format omits clock bits. So it's not a genuine MFM capture.
|
// The file format omits clock bits. So it's not a genuine MFM capture.
|
||||||
// A consumer must contextually guess when an FB, FC, etc is meant to be a control mark.
|
// A consumer must contextually guess when an FB, FC, etc is meant to be a control mark.
|
||||||
size_t track_offset = 0;
|
size_t track_offset = 0;
|
||||||
uint8_t last_header[6];
|
uint8_t last_header[6] = {0, 0, 0, 0, 0, 0};
|
||||||
std::unique_ptr<Encodings::MFM::Encoder> encoder = Encodings::MFM::GetMFMEncoder(segment.data);
|
std::unique_ptr<Encodings::MFM::Encoder> encoder = Encodings::MFM::GetMFMEncoder(segment.data);
|
||||||
bool did_sync = false;
|
bool did_sync = false;
|
||||||
while(track_offset < 6250) {
|
while(track_offset < 6250) {
|
||||||
|
Loading…
Reference in New Issue
Block a user