<commit_before>
class SkillGfx
  attr_reader :skill_gfx_index,
              :fs,
              :gfx_file_pointer,
              :sprite_file_pointer,
              :palette_pointer
  
  def initialize(skill_gfx_index, fs)
    @skill_gfx_index = skill_gfx_index
    @fs = fs
    
    read_from_rom()
  end
  
  def read_from_rom
    case GAME
    when "dos"
      gfx_filename_pointer, @gfx_file_pointer, @sprite_file_pointer, @palette_pointer = fs.read(SKILL_GFX_LIST_START + skill_gfx_index*16, 16).unpack("VVVV")
    when "por", "ooe"
      gfx_asset_index, sprite_asset_index, gfx_pointer, unknown, @palette_pointer = fs.read(SKILL_GFX_LIST_START + skill_gfx_index*16, 16).unpack("vvVVV")
      @gfx_file_pointer = fs.assets[gfx_asset_index][:ram_start_offset]
      @sprite_file_pointer = fs.assets[sprite_asset_index][:ram_start_offset]
    end
  end
  
  def write_to_rom
    raise NotImplementedError.new
  end
end<commit_msg>Fix skill gfx error<commit_after>
class SkillGfx
  attr_reader :skill_gfx_index,
              :fs,
              :gfx_file_pointer,
              :sprite_file_pointer,
              :palette_pointer
  
  def initialize(skill_gfx_index, fs)
    @skill_gfx_index = skill_gfx_index
    @fs = fs
    
    read_from_rom()
  end
  
  def read_from_rom
    case GAME
    when "dos"
      gfx_filename_pointer, @gfx_file_pointer, @sprite_file_pointer, @palette_pointer = fs.read(SKILL_GFX_LIST_START + skill_gfx_index*16, 16).unpack("VVVV")
    when "por", "ooe"
      gfx_asset_index, sprite_asset_index, gfx_pointer, unknown, @palette_pointer = fs.read(SKILL_GFX_LIST_START + skill_gfx_index*16, 16).unpack("vvVVV")
      @gfx_file_pointer = fs.assets[gfx_asset_index][:asset_pointer]
      @sprite_file_pointer = fs.assets[sprite_asset_index][:asset_pointer]
    end
  end
  
  def write_to_rom
    raise NotImplementedError.new
  end
end
{'fraction_non_alphanumeric': 0.08565310492505353, 'fraction_numerical': 0.008565310492505354, 'mean_word_length': 3.45, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1414103', 'n_tokens_mistral': 701, 'n_tokens_neox': 704, 'n_words': 110}