Browse Source

Clean up extra log modules

master
Noah Petherbridge 2 years ago
parent
commit
31e01987e5
5 changed files with 10 additions and 35 deletions
  1. +0
    -14
      log.go
  2. +9
    -0
      sdl/events.go
  3. +0
    -4
      sdl/fps.go
  4. +0
    -17
      sdl/log.go
  5. +1
    -0
      sdl/sdl.go

+ 0
- 14
log.go View File

@@ -1,14 +0,0 @@
package render

import "github.com/kirsle/golog"

var log *golog.Logger

func init() {
log = golog.GetLogger("doodle")
log.Configure(&golog.Config{
Level: golog.DebugLevel,
Theme: golog.DarkTheme,
Colors: golog.ExtendedColor,
})
}

+ 9
- 0
sdl/events.go View File

@@ -4,9 +4,18 @@ import (
"errors"

"git.kirsle.net/apps/doodle/lib/events"
"git.kirsle.net/apps/doodle/pkg/log"
"github.com/veandco/go-sdl2/sdl"
)

// Debug certain SDL events
var (
DebugWindowEvents = false
DebugMouseEvents = false
DebugClickEvents = false
DebugKeyEvents = false
)

// Poll for events.
func (r *Renderer) Poll() (*events.State, error) {
s := r.events


+ 0
- 4
sdl/fps.go View File

@@ -1,7 +1,5 @@
package sdl

import "git.kirsle.net/apps/doodle/pkg/level"

// Frames to cache for FPS calculation.
const (
maxSamples = 100
@@ -16,5 +14,3 @@ var (
fpsSkipped uint32
fpsInterval uint32 = 1000
)

var pixelHistory []level.Pixel

+ 0
- 17
sdl/log.go View File

@@ -1,17 +0,0 @@
package sdl

import "github.com/kirsle/golog"

var log *golog.Logger

// Verbose debug logging.
var (
DebugMouseEvents = false
DebugClickEvents = false
DebugKeyEvents = false
DebugWindowEvents = false
)

func init() {
log = golog.GetLogger("doodle")
}

+ 1
- 0
sdl/sdl.go View File

@@ -6,6 +6,7 @@ import (

"git.kirsle.net/apps/doodle/lib/events"
"git.kirsle.net/apps/doodle/lib/render"
"git.kirsle.net/apps/doodle/pkg/log"
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/ttf"
)


Loading…
Cancel
Save