The Dink Network

Reply to Re: Bugfixes for freedink on Linux

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 1st 2022, 03:30 PM
anon.gif
ghostknight
Ghost They/Them
 
The patches got unmanagable, so the latest bugfixes are now available from my repository. It is best build with the latest version of the build script.

Bugs that have been squashed so far:

- Bug in input.cpp for SDL2 version 2.0.10 and later

- Fixed overlapping memory when using strcpy()

- Incompatible type long for array that stores function arguments

- Fixed configure.ac so that freedink can be build with latest autotools (Linux only)

- Spamming of unrelated 'Surface doesn't have a colorkey' is now a thing of the past.

There have been some further improvements to the logging mechanism. This - at least for now - is only interesting for developers of the freedink source.

Here is an excerpt of the related git commit message:

    The logging mechanism now supports three log levels that control the
    verbosity. However, those levels are only available in the DEBUG version.
    The DEBUG version can be built by defining CXXFLAGS=-DDEBUGB.
    The log levels can only be set if freedink is started on the CLI. The
    -d flag can be passed multiple times, where every time the log level is
    incremented by 1.
    The log levels are range from 0 (default, -d flag not passed) to 3 (-d
    flag passed three times on CLI).
    
    Log level 0: Only errors will be logged.
    Log level 1: Debug messages will be logged.
    Log level 2: Execution paths are traced, verbose messages from SDL are
                 omitted.
    Log level 3: All verbose messages are included, SDL included.
    
    Log levels > 1 are intended for debugging the freedink engine,
    they are not useful for dinkc coders. Those log levels inflate logfiles
    quite quickly within a few seconds, so they should be used carefully.



I have also added a new Bash script in contrib/log-format.sh, it indents the logfile that makes it easier to trace the execution paths of the new log functions.

@yeoldetoast I, too, came to the conclusion that the freeze issue is probably related to the midi interpreter used. I will try to use different midi players and see if this sorts out the issue.

As for the soundbank problem, I saw that, too, in the code. The problem is that freedink stores it in a 0-based array and dinkc uses a 1 one based array (?). The source tries to compensate for that TWICE in file sfx.cpp. The first time is in function
SoundPlayEffectChannel()
    return channel + 1;


The returned value is then incremented a second time in playsound(). I am currently in the process of determining the best way to handle this, since the error condition (return value of '0') seems to get ignored.

@robj I am cautiously optimistic that the days of this bug are numbered. However, I do not know how comfortable you are building freedink on windows and I do not have a windows system. So I will not be able to provide any help on how to build freedink on windows.