Class: CocoScreen

Inherits:
CocoMachineLanguage show all
Defined in:
lib/native_file_types/coco/CocoScreen.rb

Overview

a Coco M/L file that overlays video RAM www.cs.unc.edu/~yakowenk/coco/text/video.html

Instance Attribute Summary

Attributes inherited from NativeFileType

#aux_code, #contents, #file_system_image, #file_type, #filename, #meta_data

Instance Method Summary collapse

Methods inherited from CocoMachineLanguage

#data_without_header, file_system_file_types, #load_address

Methods inherited from NativeFileType

#<=>, #==, all_native_file_types, best_fit, code_for_tests, compatability_score, #data_without_header, file_type_matches?, #full_filename, #header_length, #initialize, is_valid_file_if, #load_address, load_address, matching_score, native_file_types_possible_on_file_system, non_matching_score, #to_hex_dump, #to_info_dump, #type_description

Methods included from SubclassTracking

extended

Constructor Details

This class inherits a constructor from NativeFileType

Instance Method Details

#picture_formatObject



24
25
26
# File 'lib/native_file_types/coco/CocoScreen.rb', line 24

def picture_format
  :png
end

#picture_heightObject



20
21
22
# File 'lib/native_file_types/coco/CocoScreen.rb', line 20

def picture_height
  Coco.screen_rows*Coco.font_height
end

#picture_widthObject



17
18
19
# File 'lib/native_file_types/coco/CocoScreen.rb', line 17

def picture_width
  Coco.default_screen_width*Coco.font_width
end

#to_pictureObject



13
14
15
# File 'lib/native_file_types/coco/CocoScreen.rb', line 13

def to_picture
  Coco.to_screendump(data_without_header,32)
end