Skip to content

Commit

Permalink
fix: remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Le Saux committed Apr 8, 2024
1 parent b394fae commit 0cd9646
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions export/impdraw/overscan/overscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ func OverscanPalette(filePath string) (color.Palette, uint8, error) {
for i := 0; i < pens; i++ {
pc := binary.LittleEndian.Uint16(b[(0x801-0x170)+offset:])
log.GetLogger().Info("Read color %d\n", pc)
if err == nil {
c := constants.NewRawCpcPlusColor(pc)
log.GetLogger().Info("PEN(%d) R(%d) G(%d) B(%d)\n", i, c.R, c.G, c.B)
col := color.RGBA{A: 0xff, B: uint8(c.B) << 4, G: uint8(c.G) << 4, R: uint8(c.R) << 4}
palette = append(palette, col)
} else {
palette = append(palette, color.Black)
log.GetLogger().Error("Error while retreiving color from hardware value %X error %v\n", pc, err)
}
// if err == nil {
c := constants.NewRawCpcPlusColor(pc)
log.GetLogger().Info("PEN(%d) R(%d) G(%d) B(%d)\n", i, c.R, c.G, c.B)
col := color.RGBA{A: 0xff, B: uint8(c.B) << 4, G: uint8(c.G) << 4, R: uint8(c.R) << 4}
palette = append(palette, col)
// } else {
// palette = append(palette, color.Black)
// log.GetLogger().Error("Error while retreiving color from hardware value %X error %v\n", pc, err)
// }
offset += 2
}
} else {
Expand Down

0 comments on commit 0cd9646

Please sign in to comment.