diff --git a/Machines/Oric/Video.cpp b/Machines/Oric/Video.cpp index f5f5d41f1..36866fdb1 100644 --- a/Machines/Oric/Video.cpp +++ b/Machines/Oric/Video.cpp @@ -21,12 +21,9 @@ namespace { VideoOutput::VideoOutput(uint8_t *memory) : ram_(memory), - frame_counter_(0), counter_(0), - is_graphics_mode_(false), - character_set_base_address_(0xb400), + crt_(new Outputs::CRT::CRT(64*6, 6, Outputs::CRT::DisplayType::PAL50, 2)), v_sync_start_position_(PAL50VSyncStartPosition), v_sync_end_position_(PAL50VSyncEndPosition), - counter_period_(PAL50Period), next_frame_is_sixty_hertz_(false), - crt_(new Outputs::CRT::CRT(64*6, 6, Outputs::CRT::DisplayType::PAL50, 2)) { + counter_period_(PAL50Period) { crt_->set_rgb_sampling_function( "vec3 rgb_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate)" "{" diff --git a/Machines/Oric/Video.hpp b/Machines/Oric/Video.hpp index 162091501..cb95a579a 100644 --- a/Machines/Oric/Video.hpp +++ b/Machines/Oric/Video.hpp @@ -27,7 +27,7 @@ class VideoOutput { std::shared_ptr crt_; // Counters and limits - int counter_, frame_counter_; + int counter_ = 0, frame_counter_ = 0; int v_sync_start_position_, v_sync_end_position_, counter_period_; // Output target and device @@ -38,11 +38,11 @@ class VideoOutput { // Registers uint8_t ink_, paper_; - int character_set_base_address_; + int character_set_base_address_ = 0xb400; inline void set_character_set_base_address(); - bool is_graphics_mode_; - bool next_frame_is_sixty_hertz_; + bool is_graphics_mode_ = false; + bool next_frame_is_sixty_hertz_ = false; bool use_alternative_character_set_; bool use_double_height_characters_; bool blink_text_; diff --git a/Machines/Utility/Typer.cpp b/Machines/Utility/Typer.cpp index 8243f38bd..61297237f 100644 --- a/Machines/Utility/Typer.cpp +++ b/Machines/Utility/Typer.cpp @@ -14,11 +14,9 @@ using namespace Utility; Typer::Typer(const char *string, HalfCycles delay, HalfCycles frequency, std::unique_ptr character_mapper, Delegate *delegate) : - counter_(-delay), frequency_(frequency), - string_pointer_(0), + counter_(-delay), delegate_(delegate), - phase_(0), character_mapper_(std::move(character_mapper)) { size_t string_size = strlen(string) + 3; string_ = (char *)malloc(string_size); diff --git a/Machines/Utility/Typer.hpp b/Machines/Utility/Typer.hpp index 39570d0e4..33500b3f9 100644 --- a/Machines/Utility/Typer.hpp +++ b/Machines/Utility/Typer.hpp @@ -63,11 +63,11 @@ class Typer { private: char *string_; - size_t string_pointer_; + size_t string_pointer_ = 0; HalfCycles frequency_; HalfCycles counter_; - int phase_; + int phase_ = 0; Delegate *delegate_; std::unique_ptr character_mapper_;