def get_rsb_texture_name(filename: str) -> str:
    """Match source texture names to RSB texture names that were shipped"""
    ext = filename.lower()[-4:]
    newfilename = filename
    if ext in (".bmp", ".tga"):
        #Replace extension with .RSB
        newfilename = newfilename[:-4]
        newfilename += ".RSB"
        if ext == ".tga":
            #Append TGA to front of filename
            newfilename = "TGA" + newfilename
    return newfilename