mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Fixes for Rance 9 English version
Add stubs for Discord HLL, and implement AFAFactory.LoadArchive.
This commit is contained in:
@@ -133,6 +133,7 @@ target_sources(xsystem4 PRIVATE
|
||||
src/hll/DALKEDemo.c
|
||||
src/hll/Data.c
|
||||
src/hll/DataFile.c
|
||||
src/hll/Discord.c
|
||||
src/hll/DrawDungeon.c
|
||||
src/hll/DrawEffect.c
|
||||
src/hll/DrawGraph.c
|
||||
|
||||
@@ -441,6 +441,7 @@ extern struct static_library lib_DALKDemo;
|
||||
extern struct static_library lib_DALKEDemo;
|
||||
extern struct static_library lib_Data;
|
||||
extern struct static_library lib_DataFile;
|
||||
extern struct static_library lib_Discord;
|
||||
extern struct static_library lib_DrawDungeon;
|
||||
extern struct static_library lib_DrawDungeon2;
|
||||
extern struct static_library lib_DrawDungeon14;
|
||||
@@ -563,6 +564,7 @@ static struct static_library *static_libraries[] = {
|
||||
&lib_DALKEDemo,
|
||||
&lib_Data,
|
||||
&lib_DataFile,
|
||||
&lib_Discord,
|
||||
&lib_DrawDungeon,
|
||||
&lib_DrawDungeon2,
|
||||
&lib_DrawDungeon14,
|
||||
|
||||
+23
-2
@@ -14,10 +14,31 @@
|
||||
* along with this program; if not, see <http://gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "system4/string.h"
|
||||
#include "asset_manager.h"
|
||||
#include "hll.h"
|
||||
|
||||
static enum asset_type get_asset_type(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case 2: return ASSET_CG;
|
||||
case 3: return ASSET_FLAT;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, AFAFactory, IsExistArchive, struct string *ArchiveName);
|
||||
//bool AFAFactory_LoadArchive(int Type, struct string *ArchiveName);
|
||||
|
||||
bool AFAFactory_LoadArchive(int type, struct string *archive_name)
|
||||
{
|
||||
enum asset_type t = get_asset_type(type);
|
||||
if (t < 0) {
|
||||
WARNING("Unknown asset type: %d", type);
|
||||
return false;
|
||||
}
|
||||
return asset_manager_load_archive(t, archive_name->text);
|
||||
}
|
||||
|
||||
//int AFAFactory_GetCountOfData(int Type);
|
||||
//void AFAFactory_GetTitleByIndex(int Type, int Index, struct string **Name);
|
||||
//int AFAFactory_SearchTitle(int Type, struct string *Name);
|
||||
@@ -28,7 +49,7 @@ HLL_WARN_UNIMPLEMENTED(false, bool, AFAFactory, IsExistArchive, struct string *A
|
||||
|
||||
HLL_LIBRARY(AFAFactory,
|
||||
HLL_EXPORT(IsExistArchive, AFAFactory_IsExistArchive),
|
||||
HLL_TODO_EXPORT(LoadArchive, AFAFactory_LoadArchive),
|
||||
HLL_EXPORT(LoadArchive, AFAFactory_LoadArchive),
|
||||
HLL_TODO_EXPORT(GetCountOfData, AFAFactory_GetCountOfData),
|
||||
HLL_TODO_EXPORT(GetTitleByIndex, AFAFactory_GetTitleByIndex),
|
||||
HLL_TODO_EXPORT(SearchTitle, AFAFactory_SearchTitle),
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 2026 Nunuhara Cabbage <nunuhara@haniwa.technology>
|
||||
*
|
||||
* 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 2 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://gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "hll.h"
|
||||
|
||||
static void Discord_Update(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void Discord_UpdateActivity(struct string **pIText, struct string **pIText2)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HLL_LIBRARY(Discord,
|
||||
HLL_EXPORT(Update, Discord_Update),
|
||||
HLL_EXPORT(UpdateActivity, Discord_UpdateActivity)
|
||||
);
|
||||
@@ -94,6 +94,7 @@ xsystem4 = [version_h,
|
||||
'hll/DALKEDemo.c',
|
||||
'hll/Data.c',
|
||||
'hll/DataFile.c',
|
||||
'hll/Discord.c',
|
||||
'hll/DrawDungeon.c',
|
||||
'hll/DrawEffect.c',
|
||||
'hll/DrawGraph.c',
|
||||
|
||||
Reference in New Issue
Block a user