Skip to content

Commit

Permalink
Merge pull request #2109 from Jesuszilla/new-feats
Browse files Browse the repository at this point in the history
fix: ShadowOffset SCTRL not working for X axis for shadows, -nomusic & -nosound cmd line opts
  • Loading branch information
K4thos authored Nov 9, 2024
2 parents 38dfd96 + 4f392e2 commit e355e62
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/anim.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ func (sl ShadowList) draw(x, y, scl float32) {
}

s.anim.ShadowDraw(drawwindow,
sys.cam.Offset[0]-((x-s.pos[0]-xshearoff)*scl),
sys.cam.Offset[0]-((x-s.pos[0]-s.shadowOffset[0]-xshearoff)*scl),
sys.cam.GroundLevel()+sys.cam.Offset[1]-sys.envShake.getOffset()-y-
(s.pos[1]*sys.stage.sdw.yscale-s.shadowOffset[1]-sys.stage.sdw.offset[1])*scl,
scl*s.scl[0], scl*-s.scl[1],
Expand Down
4 changes: 4 additions & 0 deletions src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -4300,6 +4300,10 @@ func (c *Char) playSound(ffx string, lowpriority bool, loopCount int32, g, n, ch
if g < 0 {
return
}
// Don't do anything if we have the nosound command line flag
if _, ok := sys.cmdFlags["-nosound"]; ok {
return
}
var s *Sound
if ffx == "" || ffx == "s" {
if c.gi().snd != nil {
Expand Down
8 changes: 8 additions & 0 deletions src/sound.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ func (bgm *Bgm) Open(filename string, loop, bgmVolume, bgmLoopStart, bgmLoopEnd,
lc = -1
}
}
// Don't do anything if we have the nomusic command line flag
if _, ok := sys.cmdFlags["-nomusic"]; ok {
return
}
// Don't do anything if we have the nosound command line flag
if _, ok := sys.cmdFlags["-nosound"]; ok {
return
}
bgm.startPos = startPosition
// we're going to continue to use our own modified streamLooper because beep doesn't allow
// direct access to loop2 for dynamic modifications to loopstart, loopend, etc.
Expand Down

0 comments on commit e355e62

Please sign in to comment.