Skip to content

Commit

Permalink
fix non-determinstic font bug, audio loading issue, and linear scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
ajusa committed Mar 6, 2021
1 parent 2b2b4c3 commit 9d9555b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/audio.moon
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ load_source = =>
success, source = pcall(love.audio.newSource, @, "stream")
if success then return source
mime = puremagic.via_path(@)
if filetype[mime] == nil then return nil
original = lfs.newFileData(@)
actual = lfs.newFileData(original\getString(), filetype[mime])
return love.audio.newSource(actual, "stream")
Expand All @@ -45,7 +46,9 @@ exists = => @\sub(-1) != "~"
on "sound", =>
clear sound
if exists(@path) and @n != 0
file = with load_source(@path)
file = load_source(@path)
if file == nil then return
file = with file
\setLooping(@n == -1)
\setVolume(sound_volume)
\play!
Expand All @@ -54,7 +57,9 @@ on "sound", =>
on "music", =>
clear music
if exists @path
file = with load_source(@path)
file = load_source(@path)
if file == nil then return
file = with file
\setLooping(true)
\setVolume(music_volume)
\play!
Expand Down
1 change: 1 addition & 0 deletions src/main.moon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export *
import dispatch, dispatch_often, on, remove, register from require 'event'
import create_listbox from require 'listbox'
love.graphics.setDefaultFilter("linear", "linear")
script = require "script"
pprint = require "lib/pprint"
Timer = require 'lib/timer'
Expand Down
2 changes: 1 addition & 1 deletion src/text/text.moon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ backlog = {}
lines = 3
if love._console_name == "3DS" then lines = 7
pad = 10
text_font = nil
text_font = font
override_font = nil
update_font = ->
if interpreter and not override_font
Expand Down

0 comments on commit 9d9555b

Please sign in to comment.