Compare commits

...

14 Commits

Author SHA1 Message Date
66b5d94e00 forgot message3
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
+ update tox module
2025-05-06 13:09:49 +02:00
5649a2ad9c update subs (some version ups)
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
2025-05-06 11:55:32 +02:00
ba4f0e0e3e pull in irc fix
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-04-25 14:29:09 +02:00
3160e57f4d fix android update
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-04-19 16:10:51 +02:00
4538651608 update ubuntu ci and copy over android fix from tomato
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
2025-04-19 16:07:58 +02:00
c6b98f9be9 update subs
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-04-12 23:03:01 +02:00
8ab43626ae more ngcft1 opts
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-03-16 11:58:28 +01:00
5f53901274 more ngcft1 memory opts
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
2025-03-15 20:21:38 +01:00
be186bc025 ngc ft1 inactivity
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-03-14 13:51:37 +01:00
87b9a7d089 actually fix windows
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-03-10 21:27:18 +01:00
e913ed87e9 fix windows
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
2025-03-10 21:20:44 +01:00
bfb2d8d8e5 contact4
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
2025-03-10 21:04:07 +01:00
9496b94752 update sub
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-03-03 21:10:19 +01:00
a4e4a5bc7e Create LICENSE 2025-02-07 12:26:11 +01:00
24 changed files with 74 additions and 41 deletions

View File

@ -14,7 +14,7 @@ jobs:
linux-ubuntu:
timeout-minutes: 10
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
@ -46,15 +46,15 @@ jobs:
- name: Compress artifacts
shell: bash
run: |
tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz -C ${{github.workspace}}/build/bin/ .
tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64.tar.gz -C ${{github.workspace}}/build/bin/ .
- uses: actions/upload-artifact@v4
with:
# TODO: simpler name?
name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64
name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64
# TODO: do propper packing
path: |
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64.tar.gz
windows:

View File

@ -42,11 +42,11 @@ jobs:
strategy:
matrix:
platform:
- vcpkg_toolkit: arm-neon-android
- vcpkg_toolkit: arm-neon-android-23
ndk_abi: armeabi-v7a
- vcpkg_toolkit: arm64-android
- vcpkg_toolkit: arm64-android-23
ndk_abi: arm64-v8a
- vcpkg_toolkit: x64-android
- vcpkg_toolkit: x64-android-23
ndk_abi: x86_64
steps:
@ -54,6 +54,11 @@ jobs:
with:
submodules: recursive
- uses: actions/checkout@v4
with:
repository: 'Green-Sky/vcpkg_android_triplets'
path: 'vcpkg_android_triplets'
- uses: nttld/setup-ndk@v1
id: setup_ndk
with:
@ -79,7 +84,7 @@ jobs:
env:
ANDROID_NDK_HOME: ${{steps.setup_ndk.outputs.ndk-path}}
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
run: vcpkg install --triplet ${{matrix.platform.vcpkg_toolkit}} libsodium openssl
run: vcpkg install --overlay-triplets=vcpkg_android_triplets --triplet ${{matrix.platform.vcpkg_toolkit}} libsodium openssl
# vcpkg scripts root /usr/local/share/vcpkg/scripts
- name: Configure CMake

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Erik Scholz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,15 +1,18 @@
#include "./dice_tool.hpp"
#include <solanaceae/contact/contact_store_i.hpp>
#include <solanaceae/contact/components.hpp>
#include <imgui.h>
#include <entt/container/dense_set.hpp>
#include <entt/entity/registry.hpp>
#include <entt/entity/handle.hpp>
#include <cstdint>
#include <iostream>
DiceTool::DiceTool(P2PRNGI& p2prng, Contact3Registry& cr) : _p2prng(p2prng), _cr(cr) {
DiceTool::DiceTool(P2PRNGI& p2prng, ContactStore4I& cs) : _p2prng(p2prng), _cs(cs) {
p2prng.subscribe(this, P2PRNG_Event::init);
p2prng.subscribe(this, P2PRNG_Event::hmac);
p2prng.subscribe(this, P2PRNG_Event::secret);
@ -29,7 +32,7 @@ float DiceTool::render(float) {
static uint16_t g_sides {6};
ImGui::InputScalar("##sides", ImGuiDataType_U16, &g_sides);
static entt::dense_set<Contact3> peers;
static entt::dense_set<Contact4> peers;
if (ImGui::CollapsingHeader("peers")) {
ImGui::Indent();
@ -43,7 +46,7 @@ float DiceTool::render(float) {
continue;
}
Contact3Handle c {_cr, *it};
ContactHandle4 c = _cs.contactHandle(*it);
const char* str_ptr = "<unk>";
if (const auto* name_ptr = c.try_get<Contact::Components::Name>(); name_ptr != nullptr && !name_ptr->name.empty()) {
@ -61,8 +64,8 @@ float DiceTool::render(float) {
ImGui::OpenPopup("peer selector");
}
if (ImGui::BeginPopup("peer selector")) {
for (const auto& [cv] : _cr.view<Contact::Components::TagBig>().each()) {
Contact3Handle c {_cr, cv};
for (const auto& [cv] : _cs.registry().view<Contact::Components::TagBig>().each()) {
ContactHandle4 c = _cs.contactHandle(cv);
if (peers.contains(c)) {
continue;
@ -75,8 +78,8 @@ float DiceTool::render(float) {
if (c.all_of<Contact::Components::TagGroup, Contact::Components::ParentOf>()) {
if (ImGui::BeginMenu(str_ptr)) {
for (const Contact3 child_cv : c.get<Contact::Components::ParentOf>().subs) {
Contact3Handle child_c {_cr, child_cv};
for (const Contact4 child_cv : c.get<Contact::Components::ParentOf>().subs) {
ContactHandle4 child_c = _cs.contactHandle(child_cv);
if (peers.contains(child_c)) {
continue;
@ -113,10 +116,10 @@ float DiceTool::render(float) {
}
if (ImGui::Button("roll")) {
//std::vector<Contact3Handle> c_vec{peers.cbegin(), peers.cend()};
std::vector<Contact3Handle> c_vec;
//std::vector<ContactHandle4> c_vec{peers.cbegin(), peers.cend()};
std::vector<ContactHandle4> c_vec;
for (const auto cv : peers) {
c_vec.emplace_back(_cr, cv);
c_vec.emplace_back(_cs.contactHandle(cv));
}
std::vector<uint8_t> is {'D', 'I', 'C', 'E'};

View File

@ -1,13 +1,13 @@
#pragma once
#include <solanaceae/tox_p2prng/p2prng.hpp>
#include <solanaceae/contact/contact_model3.hpp>
#include <solanaceae/contact/fwd.hpp>
#include <vector>
class DiceTool : public P2PRNGEventI {
P2PRNGI& _p2prng;
Contact3Registry& _cr;
ContactStore4I& _cs;
struct Rolls {
std::vector<uint8_t> id;
@ -23,7 +23,7 @@ class DiceTool : public P2PRNGEventI {
std::vector<Rolls> _rolls;
public:
DiceTool(P2PRNGI& p2prng, Contact3Registry& cr);
DiceTool(P2PRNGI& p2prng, ContactStore4I& cs);
~DiceTool(void);
float render(float time_delta);

View File

@ -1,6 +1,9 @@
#include <solanaceae/plugin/solana_plugin_v1.h>
#include <solanaceae/contact/contact_store_i.hpp>
#include "./dice_tool.hpp"
#include <imgui.h>
#include <entt/entt.hpp>
@ -33,11 +36,11 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
try {
auto* p2prng_i = PLUG_RESOLVE_INSTANCE(P2PRNGI);
auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1");
auto* cs = PLUG_RESOLVE_INSTANCE(ContactStore4I);
// static store, could be anywhere tho
// construct with fetched dependencies
g_dt = std::make_unique<DiceTool>(*p2prng_i, *cr);
g_dt = std::make_unique<DiceTool>(*p2prng_i, *cs);
auto* imguic = PLUG_RESOLVE_INSTANCE_VERSIONED(ImGuiContext, ImGui::GetVersion());
auto* imguimemaf = PLUG_RESOLVE_INSTANCE_VERSIONED(ImGuiMemAllocFunc, ImGui::GetVersion());

View File

@ -1,8 +1,9 @@
#include <solanaceae/plugin/solana_plugin_v1.h>
#include "./transfer_auto_accept.hpp"
#include <solanaceae/util/config_model.hpp>
#include "./transfer_auto_accept.hpp"
#include <entt/entt.hpp>
#include <entt/fwd.hpp>