1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-09 09:20:44 +00:00

fixed a couple lint errors in d2term (#697)

This commit is contained in:
lord 2020-08-05 19:32:23 -07:00 committed by GitHub
parent ca7412aea6
commit c1ed5a2381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ package d2term
import (
"errors"
"fmt"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2math"
"image/color"
"log"
"math"
@ -14,15 +13,17 @@ import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2math"
)
const (
termCharWidth = 6
termCharHeight = 16
termRowCount = 24
termRowCountMax = 32
termColCountMax = 128
termAnimLength = 0.5
termCharWidth = 6
termCharHeight = 16
termCharDoubleWidth = termCharWidth * 2
termRowCount = 24
termRowCountMax = 32
termColCountMax = 128
termAnimLength = 0.5
)
const (
@ -231,9 +232,9 @@ func (t *terminal) Render(surface d2interface.Surface) error {
historyEntry := t.outputHistory[historyIndex]
surface.PushTranslation(termCharWidth*2, outputHeight-(i+1)*termCharHeight)
surface.PushTranslation(termCharDoubleWidth, outputHeight-(i+1)*termCharHeight)
surface.DrawTextf(historyEntry.text)
surface.PushTranslation(-termCharWidth*2, 0)
surface.PushTranslation(-termCharDoubleWidth, 0)
switch historyEntry.category {
case d2enum.TermCategoryInfo: