[Scummvm-git-logs] scummvm master -> 0e23319c6cf8276edebc0342f58c5e5070f7f6f0
sev-
noreply at scummvm.org
Sat Jan 20 22:53:01 UTC 2024
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3bc7902b6a KOLIBRI: Update for new ksys.h
1a7c690a51 KOLIBRI: Remove sdl-stubs
0b10743566 KOLIBRI: Replace kos32sys.h
595f0421f6 KOLIBRI: build-kolibri: Use a more common path to SDK
bb530c76ee KOLIBRI: build-kolibri: Temporarily disable ags engine as it fails to compile
15cae58aa4 CONFIGURE: Handle kolibrios that merges vorbisfile and vorbis
0e23319c6c KOLIBRI: Add explicit paths for ogg and vorbis
Commit: 3bc7902b6a67916e8e5bc9c112a7bf2b61130c4d
https://github.com/scummvm/scummvm/commit/3bc7902b6a67916e8e5bc9c112a7bf2b61130c4d
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:46+01:00
Commit Message:
KOLIBRI: Update for new ksys.h
New ksys has renamed few structs and function. Propagate rename and
use _ksys_file_read_dir function instead of manual filling
Changed paths:
backends/fs/kolibrios/kolibrios-fs.cpp
diff --git a/backends/fs/kolibrios/kolibrios-fs.cpp b/backends/fs/kolibrios/kolibrios-fs.cpp
index b1bf8184f55..0a2456bdecd 100644
--- a/backends/fs/kolibrios/kolibrios-fs.cpp
+++ b/backends/fs/kolibrios/kolibrios-fs.cpp
@@ -33,25 +33,17 @@
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
-#include <sys/kos_io.h>
#include <sys/ksys.h>
#include "common/pack-start.h" // START STRUCT PACKING
-struct kol_readdir_result_header {
- uint32 version;
- uint32 number_of_placed_blocks;
- uint32 total_number_of_blocks;
- byte reserved[20];
-} PACKED_STRUCT;
-
struct kol_readdir_result_entry {
- ksys_bdfe_t bdfe;
+ ksys_file_info_t bdfe;
char fileName[520];
} PACKED_STRUCT;
struct kol_readdir_result {
- kol_readdir_result_header header;
+ ksys_dir_entry_header_t header;
kol_readdir_result_entry entries[0];
} PACKED_STRUCT;
@@ -61,26 +53,18 @@ namespace {
// opendir/readdir are buggy. And they encourage using syscalls. Whatever
kol_readdir_result *kol_readdir(const char *path, uint32 max_blocks) {
- ksys70_status_t ret_result;
- int result_buffer_size = sizeof (kol_readdir_result_header)
+ ksys_file_status_t ret_result;
+ int result_buffer_size = sizeof (ksys_dir_entry_header_t)
+ max_blocks * sizeof (kol_readdir_result_entry);
kol_readdir_result *result_buffer = (kol_readdir_result *) malloc (result_buffer_size);
if (!result_buffer)
return nullptr;
memset(result_buffer, 0, result_buffer_size);
- ksys70_t request;
- request.p00 = 1; // Read directory
- request.p04dw = 0;
- request.p08dw = 3; // UTF-8
- request.p12 = max_blocks;
- request.buf16 = result_buffer;
- request.p20 = 0; // Don't use inline path
- request.p21 = path;
-
- ret_result = _ksys70(&request);
-
- // 0 is returned for normal dirs, 6 for virtual directories
- if (ret_result.status != 0 && ret_result.status != 6) {
+
+ ret_result = _ksys_file_read_dir(path, 0, KSYS_FILE_UTF8, max_blocks, result_buffer);
+
+ // KSYS_FS_ERR_SUCCESS (0) is returned for normal dirs, KSYS_FS_ERR_EOF (6) for virtual directories
+ if (ret_result.status != 0 && ret_result.status != KSYS_FS_ERR_EOF) {
free (result_buffer);
return nullptr;
}
@@ -94,18 +78,19 @@ kol_readdir_result *kol_readdir(const char *path) {
if (!res)
return nullptr;
- uint32 tot_blocks = res->header.total_number_of_blocks;
+ uint32 tot_blocks = res->header.files;
free(res);
return kol_readdir(path, tot_blocks);
}
bool getFileAttrs(Common::String path, uint32& attrs) {
- fileinfo_t info;
+ ksys_file_info_t info;
memset(&info, 0, sizeof(info));
- info.attr = 0x10;
- if(get_fileinfo(path.c_str(), &info)) {
+ info.attr = KSYS_FILE_ATTR_DIR;
+
+ if(_ksys_file_info(path.c_str(), &info)) {
attrs = 0;
return false;
}
@@ -170,7 +155,7 @@ bool KolibriOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode,
if (!res)
return false;
- for (int i = 0; i < (int) res->header.number_of_placed_blocks; i++)
+ for (int i = 0; i < (int) res->header.blocks; i++)
{
// Skip 'invisible' files if necessary
if (res->entries[i].fileName[0] == '.' && !hidden) {
@@ -190,7 +175,7 @@ bool KolibriOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode,
entry._path += entry._displayName;
entry._isValid = true;
- entry._attributes = res->entries[i].bdfe.attributes;
+ entry._attributes = res->entries[i].bdfe.attr;
// Honor the chosen mode
if ((mode == Common::FSNode::kListFilesOnly && entry.isDirectory()) ||
Commit: 1a7c690a513b7076c81d19436e17876c4c2b9f71
https://github.com/scummvm/scummvm/commit/1a7c690a513b7076c81d19436e17876c4c2b9f71
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:49+01:00
Commit Message:
KOLIBRI: Remove sdl-stubs
Now similar SDL stubs are in the SDL library. We now have a conflict due
to slightly different prototypes. Just remove the stubs
Changed paths:
R backends/platform/sdl/kolibrios/sdl-stubs.cpp
backends/platform/sdl/module.mk
diff --git a/backends/platform/sdl/kolibrios/sdl-stubs.cpp b/backends/platform/sdl/kolibrios/sdl-stubs.cpp
deleted file mode 100644
index 0c8f23f1b08..00000000000
--- a/backends/platform/sdl/kolibrios/sdl-stubs.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "backends/events/sdl/sdl-events.h"
-
-SDL_Joystick *SDL_JoystickOpen (int index) {
- return nullptr;
-}
-
-const char *SDL_JoystickName (int index) {
- return nullptr;
-}
-
-int SDL_NumJoysticks (void) {
- return 0;
-}
-
-void SDL_JoystickClose (SDL_Joystick *joystick) {
-}
-
-// SDL CDAudio is not used on kolibri as it's redirected away from
-// in platform-specific code but since it's still linked-in it needs those stubs
-CDstatus SDL_CDStatus (SDL_CD *cdrom) {
- return CD_ERROR;
-}
-
-int SDL_CDPlayTracks (SDL_CD *cdrom, int start_track, int start_frame, int ntracks, int nframes) {
- return -1;
-}
-
-int SDL_CDStop (SDL_CD *cdrom) {
- return -1;
-}
-
-SDL_CD *SDL_CDOpen (int drive) {
- return nullptr;
-}
-
-void SDL_CDClose (SDL_CD *cdrom) {
-}
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index 06480af4ce9..230ea04b351 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -7,8 +7,7 @@ MODULE_OBJS := \
ifdef KOLIBRIOS
MODULE_OBJS += \
kolibrios/kolibrios-main.o \
- kolibrios/kolibrios.o \
- kolibrios/sdl-stubs.o
+ kolibrios/kolibrios.o
endif
ifdef POSIX
Commit: 0b107435665aae06914905666b80e4f323ba7d37
https://github.com/scummvm/scummvm/commit/0b107435665aae06914905666b80e4f323ba7d37
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:50+01:00
Commit Message:
KOLIBRI: Replace kos32sys.h
kos32sys.h is no longer available. Just declare DLL-related functions ourselves
like other programs do.
Changed paths:
backends/platform/sdl/kolibrios/wrapper-main.c
backends/plugins/kolibrios/kolibrios-provider.cpp
diff --git a/backends/platform/sdl/kolibrios/wrapper-main.c b/backends/platform/sdl/kolibrios/wrapper-main.c
index ac5d05e96c3..fab501d1701 100644
--- a/backends/platform/sdl/kolibrios/wrapper-main.c
+++ b/backends/platform/sdl/kolibrios/wrapper-main.c
@@ -19,8 +19,11 @@
*
*/
-#include <kos32sys.h>
#include <stdio.h>
+#include <string.h>
+
+void* get_proc_address(void *handle, const char *proc_name);
+void* load_library(const char *name);
/* This is just a small wrapper so that the main scummvm is loaded as dll. */
int kolibrios_main(int argc, char *argv[]);
diff --git a/backends/plugins/kolibrios/kolibrios-provider.cpp b/backends/plugins/kolibrios/kolibrios-provider.cpp
index 7f5de38f3e0..f08774caf42 100644
--- a/backends/plugins/kolibrios/kolibrios-provider.cpp
+++ b/backends/plugins/kolibrios/kolibrios-provider.cpp
@@ -30,9 +30,13 @@
#include "common/debug.h"
-#include <kos32sys.h>
#include <errno.h>
+extern "C" {
+void* get_proc_address(void *handle, const char *proc_name);
+void* load_library(const char *name);
+}
+
class KolibriOSPlugin final : public DynamicPlugin {
protected:
void *_dlHandle;
Commit: 595f0421f6666031271d6cd9b18bc40e095011a0
https://github.com/scummvm/scummvm/commit/595f0421f6666031271d6cd9b18bc40e095011a0
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:50+01:00
Commit Message:
KOLIBRI: build-kolibri: Use a more common path to SDK
~/sdk is a pretty unusual path for kolibri SDK. Use a bit more natural
paths resulting from manual checkout.
Changed paths:
backends/platform/sdl/kolibrios/build-kolibri.sh
diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index 1a2228d5fe4..4dbb68f8af4 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -2,7 +2,7 @@
set -e
-export KOS32_SDK_DIR=$HOME/sdk
+export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
export KOS32_AUTOBUILD=$HOME/autobuild
# Use plugins for both engines and detection as KolibriOS has a limit per executable module
Commit: bb530c76ee46adbeee3350de3abe45cc41110c89
https://github.com/scummvm/scummvm/commit/bb530c76ee46adbeee3350de3abe45cc41110c89
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:50+01:00
Commit Message:
KOLIBRI: build-kolibri: Temporarily disable ags engine as it fails to compile
Changed paths:
backends/platform/sdl/kolibrios/build-kolibri.sh
diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index 4dbb68f8af4..bba0265e7b1 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -6,6 +6,6 @@ export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
export KOS32_AUTOBUILD=$HOME/autobuild
# Use plugins for both engines and detection as KolibriOS has a limit per executable module
-./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed
+./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed --disable-engine=ags
make -j5 all zip-root scummvm-zip
Commit: 15cae58aa4a5b3029b72248b17669bf02b57937d
https://github.com/scummvm/scummvm/commit/15cae58aa4a5b3029b72248b17669bf02b57937d
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:50+01:00
Commit Message:
CONFIGURE: Handle kolibrios that merges vorbisfile and vorbis
Kolibri doesn't have a separate -lvorbisfile
Changed paths:
configure
diff --git a/configure b/configure
index 3affb8bc35d..453e0297f41 100755
--- a/configure
+++ b/configure
@@ -5150,6 +5150,10 @@ echo "$_tts"
# Check for Vorbis
#
echocheck "Vorbis"
+VORBISFILE=-lvorbisfile
+if test "$_host_os" = kolibrios ; then
+ VORBISFILE=
+fi
if test "$_vorbis" = auto ; then
_vorbis=no
cat > $TMPC << EOF
@@ -5158,14 +5162,14 @@ int main(void) { vorbis_packet_blocksize(0,0); return 0; }
EOF
if test "$_ogg" = yes ; then
cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
- -lvorbisfile -lvorbis -logg && _vorbis=yes
+ $VORBISFILE -lvorbis -logg && _vorbis=yes
else
cc_check $VORBIS_CFLAGS $VORBIS_LIBS \
- -lvorbisfile -lvorbis && _vorbis=yes
+ $VORBISFILE -lvorbis && _vorbis=yes
fi
fi
if test "$_vorbis" = yes ; then
- append_var LIBS "$VORBIS_LIBS -lvorbisfile -lvorbis"
+ append_var LIBS "$VORBIS_LIBS $VORBISFILE -lvorbis"
append_var INCLUDES "$VORBIS_CFLAGS"
fi
define_in_config_if_yes "$_vorbis" 'USE_VORBIS'
Commit: 0e23319c6cf8276edebc0342f58c5e5070f7f6f0
https://github.com/scummvm/scummvm/commit/0e23319c6cf8276edebc0342f58c5e5070f7f6f0
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-01-20T23:52:50+01:00
Commit Message:
KOLIBRI: Add explicit paths for ogg and vorbis
Auto-detect fails which is kinda expected with such weird paths
Changed paths:
backends/platform/sdl/kolibrios/build-kolibri.sh
diff --git a/backends/platform/sdl/kolibrios/build-kolibri.sh b/backends/platform/sdl/kolibrios/build-kolibri.sh
index bba0265e7b1..a6ac3b5b881 100755
--- a/backends/platform/sdl/kolibrios/build-kolibri.sh
+++ b/backends/platform/sdl/kolibrios/build-kolibri.sh
@@ -6,6 +6,6 @@ export KOS32_SDK_DIR=$HOME/kolibrios/contrib/sdk
export KOS32_AUTOBUILD=$HOME/autobuild
# Use plugins for both engines and detection as KolibriOS has a limit per executable module
-./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --enable-engine=testbed --disable-engine=ags
+./configure --host=kos32 --enable-release --enable-plugins --default-dynamic --enable-detection-dynamic --with-vorbis-prefix=$KOS32_SDK_DIR/sources/libvorbis-1.3.7 --with-ogg-prefix=$KOS32_SDK_DIR/sources/libogg-1.3.5 --enable-engine=testbed --disable-engine=ags
make -j5 all zip-root scummvm-zip
More information about the Scummvm-git-logs
mailing list