Skip to content

Commit

Permalink
update to EOS-SDK-39599718-v1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
3ddelano committed Feb 18, 2025
1 parent 7bc6346 commit 022aaa9
Show file tree
Hide file tree
Showing 25 changed files with 171 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- "*"
tags:
- "*"
jobs:
Expand Down Expand Up @@ -120,12 +120,12 @@ jobs:
token: "${{secrets.EOS_SDK_MIRROR_PAT}}"
repository: 3ddelano/eos-sdk-mirror
path: thirdparty/eos-sdk
ref: "193b33ffa0f18bf76afd6949099949273c1f79a6"
ref: "f5bafec19f0be4258134adb93317abe6f51ff7e7"

- name: (Windows) Install mingw64
if: ${{ matrix.platform == 'windows' }}
# change to egor-tensin/setup-mingw@v2 once pr #16 is merged
uses: e-t-l/setup-mingw@patch-1
uses: 3ddelano/setup-mingw@patch-1

- name: (Linux) Install dependencies
if: ${{ matrix.platform == 'linux' }}
Expand Down
4 changes: 3 additions & 1 deletion sample/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ func _notification(what: int) -> void:
if what == NOTIFICATION_WM_CLOSE_REQUEST:
print("Shutting down EOS...")
EOS.Platform.PlatformInterface.release()
var _res = EOS.Platform.PlatformInterface.shutdown()
var res := EOS.Platform.PlatformInterface.shutdown()
if not EOS.is_success(res):
printerr("Failed to shutdown EOS: ", EOS.result_str(res))
63 changes: 59 additions & 4 deletions sample/addons/epic-online-services-godot/eos.gd
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,30 @@ class Platform:


class Ecom:
enum ItemType {Durable = 0, Consumable = 1, Other = 2}
enum ItemType {
## This entitlement is intended to persist.
Durable = 0,
## This entitlement is intended to be transient and redeemed.
Consumable = 1,
## This entitlement has a type that is not currently intended for an in-game store.
Other = 2
}

enum OwnershipStatus {
## The catalog item is not owned by the local user
NotOwned = 0,
## The catalog item is owned by the local user
Owned = 1
}

enum OwnershipStatus {NotOwned = 0, Owned = 1}
enum CheckoutOrientation {
## Current orientation will be used
Default = 0,
## Portrait orientation
Portrait = 1,
## Landscape orientation
Landscape = 2
}

class CheckoutOptions extends BaseClass:
func _init():
Expand All @@ -865,6 +886,7 @@ class Ecom:
var local_user_id = EOSGRuntime.local_epic_account_id
var entries: Array # Array[Dictionary] {offer_id: String}
var override_catalog_namespace: String
var preferred_orientation = CheckoutOrientation.Default

class CopyEntitlementByIdOptions extends BaseClass:
func _init():
Expand Down Expand Up @@ -1016,6 +1038,7 @@ class Ecom:
var local_user_id = EOSGRuntime.local_epic_account_id
var entitlement_names: Array # Array[String]
var include_redeemed: bool
var override_catalog_namespace: String

class QueryOffersOptions extends BaseClass:
func _init():
Expand Down Expand Up @@ -1448,7 +1471,7 @@ class Leaderboards:


class Lobby:
enum LobbyAttributeVisibility {Public = 0, Private = 1}
enum LobbyAttributeVisibility { Public = 0, Private = 1}

enum LobbyMemberStatus {
Joined = 0,
Expand All @@ -1459,7 +1482,14 @@ class Lobby:
Closed = 5
}

enum LobbyPermissionLevel {PublicAdvertised = 0, JoinViaPresence = 1, InviteOnly = 2}
enum LobbyPermissionLevel { PublicAdvertised = 0, JoinViaPresence = 1, InviteOnly = 2}

enum LobbyRTCRoomJoinActionType {
## Join RTC Room as soon as user joins the lobby
AutomaticJoin = 0,
## Do not join RTC Room when joining the lobby. User must manually call Join RTC Room
ManualJoin = 1
}

const SEARCH_BUCKET_ID = "bucket"
const SEARCH_MINCURRENT_MEMBERS = "mincurrentmembers"
Expand Down Expand Up @@ -1490,6 +1520,7 @@ class Lobby:
## - use_manual_audio_output: [bool],[br]
## - local_audio_device_input_starts_muted: [bool]
var local_rtc_options = null
var rtc_room_join_action_type = LobbyRTCRoomJoinActionType.AutomaticJoin

var client_data = null

Expand All @@ -1516,6 +1547,7 @@ class Lobby:
## - use_manual_audio_output: [bool],[br]
## - local_audio_device_input_starts_muted: [bool]
var local_rtc_options = null
var rtc_room_join_action_type = LobbyRTCRoomJoinActionType.AutomaticJoin

var client_data = null

Expand All @@ -1533,6 +1565,7 @@ class Lobby:
## - use_manual_audio_output: [bool],[br]
## - local_audio_device_input_starts_muted: [bool]
var local_rtc_options = null
var rtc_room_join_action_type = LobbyRTCRoomJoinActionType.AutomaticJoin

var client_data = null

Expand Down Expand Up @@ -1672,6 +1705,28 @@ class Lobby:
var local_user_id = EOSGRuntime.local_product_user_id
var lobby_id: String

class JoinRTCRoomOptions extends BaseClass:
func _init():
super._init("JoinRTCRoomOptions")

var local_user_id = EOSGRuntime.local_product_user_id
var lobby_id: String

## (Optional) Allows the local application to set local audio options for the RTC Room if it is enabled. Set this to a [Dictionary] to override the defaults.[br]
## A [Dictionary] with keys: [br]
## - flags: A bitwise-or union of [enum EOS.RTC.JoinRoomFlags],[br]
## - use_manual_audio_input: [bool],[br]
## - use_manual_audio_output: [bool],[br]
## - local_audio_device_input_starts_muted: [bool]
var local_rtc_options = null

class LeaveRTCRoomOptions extends BaseClass:
func _init():
super._init("LeaveRTCRoomOptions")

var local_user_id = EOSGRuntime.local_product_user_id
var lobby_id: String

class LobbyInterface:
static func create_lobby(options: CreateLobbyOptions) -> void:
IEOS.lobby_interface_create_lobby(options)
Expand Down
5 changes: 5 additions & 0 deletions sample/addons/epic-online-services-godot/heos/hlobby.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ var _notif_rtc_data_data_received = EOS.NotificationIdInvalid
func _init() -> void:
super._init("HLobby")


func _notification(what: int) -> void:
if what == NOTIFICATION_PREDELETE:
_lobby_details = null

#endregion


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ extends BaseClass

#region Signals


## Emitted when the member's rtc state changes
signal rtc_state_updated

#endregion


#region Public vars

var product_user_id: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ cache/0/20/0/glyphs/80/texture_idx = 0
cache/0/20/0/kerning_overrides/16/0 = Vector2(0, 0)
cache/0/20/0/kerning_overrides/20/0 = Vector2(0, 0)

[sub_resource type="Image" id="Image_xp0mx"]
[sub_resource type="Image" id="Image_f1n54"]
data = {
"data": PackedByteArray("////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////YP///2H///8A////AP///wD///8A////AP///wD///8A////AP///2D///9h////AP///wD///8A////YP///7////+/////Yf///wD///8A////AP///wD///8A////AP///2D///+/////v////2H///8A////AP///2H///+/////v////7////9h////AP///wD///8A////AP///2D///+/////v////7////9g////AP///wD///8A////Yf///7////+/////v////2H///8A////AP///2D///+/////v////7////9g////AP///wD///8A////AP///wD///9h////v////7////+/////Yf///2D///+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///2H///+/////v////7////+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///wD///8A////Yf///7////+/////v////7////9g////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7////+/////Yf///wD///8A////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7////+/////v////7////9h////AP///wD///8A////AP///wD///8A////AP///2D///+/////v////7r///85////jv///7////+/////v////2H///8A////AP///wD///8A////AP///2D///+/////v////73///86////AP///wb///+F////v////7////+/////Yf///wD///8A////AP///2D///+/////v////77///9E////AP///wD///8A////BP///3z///+/////v////7////9h////AP///wD///9h////v////7////9O////AP///wD///8A////AP///wD///8C////cf///7////+/////YP///wD///8A////AP///2H///9a////AP///wD///8A////AP///wD///8A////AP///wH///9m////YP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AA=="),
"format": "RGBA8",
Expand All @@ -1218,7 +1218,7 @@ data = {
}

[sub_resource type="ImageTexture" id="ImageTexture_3k56q"]
image = SubResource("Image_xp0mx")
image = SubResource("Image_f1n54")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ea04u"]
content_margin_left = 4.0
Expand Down Expand Up @@ -1272,7 +1272,7 @@ corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5

[sub_resource type="Image" id="Image_yt2n6"]
[sub_resource type="Image" id="Image_tumt8"]
data = {
"data": PackedByteArray("////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ALOzs6OysrKmuLi4Ev///wD///8A////AP///wC4uLgSsrKyprKysqb///8A////ALGxsa2ysrLZsbGxs7i4uBL///8A////ALi4uBKysrKzsrKy2bKysqz///8A////AK+vrxOysrK1srKy2bGxsbO4uLgSuLi4ErKysrOysrLZs7OztK+vrxP///8A////AP///wCvr68TsrKytbKystmxsbGzsrKys7Kystmzs7O0r6+vE////wD///8A////AP///wD///8Ar6+vE7KysrWysrLZsrKy2bOzs7Svr68T////AP///wD///8A////AP///wD///8A////AK+vrxOysrKpsrKyqK+vrxP///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A"),
"format": "RGBA8",
Expand All @@ -1282,7 +1282,7 @@ data = {
}

[sub_resource type="ImageTexture" id="ImageTexture_oehfs"]
image = SubResource("Image_yt2n6")
image = SubResource("Image_tumt8")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qts61"]
content_margin_left = 8.0
Expand Down
5 changes: 5 additions & 0 deletions sample/fonts/roboto-32b.tres
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ cache/0/16/0/descent = 0.0
cache/0/16/0/underline_position = 0.0
cache/0/16/0/underline_thickness = 0.0
cache/0/16/0/scale = 1.0
cache/0/50/0/ascent = 0.0
cache/0/50/0/descent = 0.0
cache/0/50/0/underline_position = 0.0
cache/0/50/0/underline_thickness = 0.0
cache/0/50/0/scale = 1.0
4 changes: 3 additions & 1 deletion sample/scenes/LogsView/LogsView.gd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func log_msg(level: int, msg: String, category := ""):

var darkened_color = Color(color).darkened(0.2).to_html(true)
var to_print = "[color=#%s]%s\t%s\t[/color][color=%s]%s[/color]" % [darkened_color, _category, level_str, color, msg]
var to_print_nonrich = "[%s] [%s] %s" % [category, level_str, msg]
logs_label.text += to_print + "\n"
# Uncomment the below line if you want to see EOS logs in terminal too
# print_rich(to_print)
print_rich(to_print)
# print(to_print_nonrich)
14 changes: 8 additions & 6 deletions sample/test.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ extends Node

@onready var IS_ANTICHEAT_SERVER: String = Env.get_var("IS_ANTICHEAT_SERVER", "false")

var anticheat_server_main = AntiCheatServerMain.new()
var anticheat_server_main: AntiCheatServerMain = null


func _ready() -> void:
if IS_ANTICHEAT_SERVER != "false":
anticheat_server_main = AntiCheatServerMain.new()
add_child(anticheat_server_main)
return

Expand Down Expand Up @@ -598,11 +599,12 @@ func test_anticheat_client_interface():
func _send_msg_to_server(local_user_id: String, jwt: String, mode: int):
var peer_id = multiplayer.get_remote_sender_id()
print("--- AntiCheatServer: _send_msg_to_server: got rpc: peer: %s, local_user_id: %d" % [peer_id, local_user_id])
anticheat_server_main.on_client_message_receive(peer_id, "register", {
local_user_id = local_user_id,
jwt = jwt,
mode = mode
})
if anticheat_server_main:
anticheat_server_main.on_client_message_receive(peer_id, "register", {
local_user_id = local_user_id,
jwt = jwt,
mode = mode
})


func _get_res_if_sucess(res: Dictionary):
Expand Down
6 changes: 6 additions & 0 deletions src/ecom_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ void IEOS::ecom_interface_checkout(Ref<RefCounted> p_options) {
ERR_FAIL_NULL(s_ecomInterface);
CharString local_user_id = VARIANT_TO_CHARSTRING(p_options->get("local_user_id"));
CharString override_catalog_namespace = VARIANT_TO_CHARSTRING(p_options->get("override_catalog_namespace"));
int preferred_orientation = p_options->get("preferred_orientation");

EOS_Ecom_CheckoutOptions options;
memset(&options, 0, sizeof(options));
options.ApiVersion = EOS_ECOM_CHECKOUT_API_LATEST;
options.LocalUserId = eosg_string_to_epic_account_id(local_user_id.get_data());
options.PreferredOrientation = static_cast<EOS_ECheckoutOrientation>(preferred_orientation);
if (override_catalog_namespace.length() > 0) {
options.OverrideCatalogNamespace = override_catalog_namespace.get_data();
}
Expand Down Expand Up @@ -386,11 +388,15 @@ int IEOS::ecom_interface_get_transaction_count(Ref<RefCounted> p_options) {
void IEOS::ecom_interface_query_entitlements(Ref<RefCounted> p_options) {
ERR_FAIL_NULL(s_ecomInterface);
CharString local_user_id = VARIANT_TO_CHARSTRING(p_options->get("local_user_id"));
CharString override_catalog_namespace = VARIANT_TO_CHARSTRING(p_options->get("override_catalog_namespace"));

EOS_Ecom_QueryEntitlementsOptions options;
memset(&options, 0, sizeof(options));
options.ApiVersion = EOS_ECOM_QUERYENTITLEMENTS_API_LATEST;
options.LocalUserId = eosg_string_to_epic_account_id(local_user_id.get_data());
if (override_catalog_namespace.size() > 0){
options.OverrideCatalogNamespace = override_catalog_namespace.get_data();
}

TypedArray<String> p_entitlement_names = p_options->get("entitlement_names");
options.EntitlementNameCount = static_cast<uint32_t>(p_entitlement_names.size());
Expand Down
1 change: 1 addition & 0 deletions src/eosg_active_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class EOSGActiveSession : public RefCounted {
~EOSGActiveSession() {
if (m_internal != nullptr) {
EOS_ActiveSession_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_lobby_details.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EOSGLobbyDetails : public RefCounted {
~EOSGLobbyDetails() {
if (m_internal != nullptr) {
EOS_LobbyDetails_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_lobby_modification.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class EOSGLobbyModification : public RefCounted {
~EOSGLobbyModification() {
if (m_internal != nullptr) {
EOS_LobbyModification_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_lobby_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class EOSGLobbySearch : public RefCounted {
~EOSGLobbySearch() {
if (m_internal != nullptr) {
EOS_LobbySearch_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_playerdatastorage_file_transfer_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class EOSGPlayerDataStorageFileTransferRequest : public EOSGFileTransferRequest
~EOSGPlayerDataStorageFileTransferRequest() {
if (m_internal != nullptr) {
EOS_PlayerDataStorageFileTransferRequest_Release(m_internal);
m_internal = nullptr;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/eosg_presence_modification.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class EOSGPresenceModification : public RefCounted {
~EOSGPresenceModification() {
if (m_internal != nullptr) {
EOS_PresenceModification_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_session_details.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class EOSGSessionDetails : public RefCounted {
~EOSGSessionDetails() {
if (m_internal != nullptr) {
EOS_SessionDetails_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_session_modification.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class EOSGSessionModification : public RefCounted {
~EOSGSessionModification() {
if (m_internal != nullptr) {
EOS_SessionModification_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_session_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class EOSGSessionSearch : public RefCounted {
~EOSGSessionSearch() {
if (m_internal != nullptr) {
EOS_SessionSearch_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
1 change: 1 addition & 0 deletions src/eosg_titlestorage_file_transfer_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class EOSGTitleStorageFileTransferRequest : public EOSGFileTransferRequest {
~EOSGTitleStorageFileTransferRequest() {
if (m_internal != nullptr) {
EOS_TitleStorageFileTransferRequest_Release(m_internal);
m_internal = nullptr;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/eosg_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class EOSGTransaction : public RefCounted {
~EOSGTransaction() {
if (m_internal != nullptr) {
EOS_Ecom_Transaction_Release(m_internal);
m_internal = nullptr;
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/ieos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ void IEOS::_bind_methods() {
IEOS_BIND_SIGNAL(leaderboards_interface_query_leaderboard_user_scores_callback);
IEOS_BIND_SIGNAL(lobby_interface_create_lobby_callback);
IEOS_BIND_SIGNAL(lobby_interface_destroy_lobby_callback);
IEOS_BIND_SIGNAL(lobby_interface_join_rtc_room_callback);
IEOS_BIND_SIGNAL(lobby_interface_leave_rtc_room_callback);
IEOS_BIND_SIGNAL(lobby_interface_hard_mute_member_callback);
IEOS_BIND_SIGNAL(lobby_interface_join_lobby_accepted_callback);
IEOS_BIND_SIGNAL(lobby_interface_join_lobby_by_id_callback);
Expand Down
Loading

0 comments on commit 022aaa9

Please sign in to comment.