...
1 package replay
2
3 import (
4 "fmt"
5 "time"
6
7 "go.formulabun.club/functional/strings"
8 )
9
10 func (r *HeaderPreFileEntries) GetTitle() string {
11 return strings.SafeNullTerminated(r.Title[:])
12 }
13
14 func (r *HeaderPostFileEntries) GetTime() time.Duration {
15 return time.Millisecond * time.Duration(1000*r.Time/35)
16 }
17
18 func (r *HeaderPostFileEntries) GetBestLapTime() time.Duration {
19 return time.Millisecond * time.Duration(1000*r.Lap/35)
20 }
21
22 func (r *HeaderPreFileEntries) GetGuestFileName() string {
23 return fmt.Sprintf("MAP%02d-guest.lmp", r.GameMap)
24 }
25
View as plain text