mirror of
https://github.com/BanjoRecomp/BanjoRecomp
synced 2026-06-16 22:00:10 -04:00
UI Submodule Refactor (#32)
* Added recompui::IconButton * Remove zelda themed input mapping visualization * update toggle * grayscale overlay colors * recompui::theme namespace + border constants * added ui_binding_button element * Initial support for multiple controllers. (#3) * Support for multiple controllers. * Fix default bindings. * Backwards compatibility with controls from previous version. * WIP code driven input mapping and player assignment * button press anims & temp reassignment state when opening assignment modal * set base opacity for disable state getting re-enabled * generic PlayerCard for both main Controls and assignment modal * wip ui_select recompui component * Add Input Profiles. (#4) * Add Input Profiles. * Add capability of setting custom profiles. * Remove leftover early return. * button sizes and annotation update * flex wrap and context root being assets * controls page multi vs single views * ability to reparent elements * ability to rotate elements * added functional caret to Select component * smaller edit profile button * select fixes and player profile assignment * pointer events property support and apply ptr events None to select arrow svg * init mp kb mappings to be unmapped * wire up selected profile's bindings * reimplement binding system in new menu * clear and reset input bindings implemented * remove deprecated controls panel * changes up to swapping to recompfrontend library * switch ui/input to be using recompfrontend library (unfinished) * register main font with recompui * Changes for recompui built in default scss * launcher + custom background * update modern runtime for recompui * Update N64ModernRuntime for recompui config changes * Added RecordSpinner icon * Added PlusKeyboard icon * remove sass and rml * single player + theme update * Delete Rmlui and lunasvg from being dependencies. * Update recomp frontend commit. * Remove lunasvg and rmlui submodules. * Update recomp frontend. * Move findfreetype. * Remove freetype windows binaries. * More updates. * Update frontend. * It builds. * Update frontend. * Update runtime and frontend. * Update frontend and RT64. * Get rid of SDL2 path from recomp frontend. * Update runtime and frontend and fix link order to fix Linux building * Update frontend and remove gyro and mouse sensitivity options * Update frontend to fix open menu button on controllers --------- Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
This commit is contained in:
+11
-8
@@ -4,8 +4,9 @@
|
||||
#include "librecomp/overlays.hpp"
|
||||
#include "librecomp/addresses.hpp"
|
||||
#include "banjo_config.h"
|
||||
#include "recomp_input.h"
|
||||
#include "recomp_ui.h"
|
||||
#include "recompinput/recompinput.h"
|
||||
#include "recompui/recompui.h"
|
||||
#include "recompui/renderer.h"
|
||||
#include "banjo_render.h"
|
||||
#include "banjo_sound.h"
|
||||
#include "librecomp/helpers.hpp"
|
||||
@@ -17,7 +18,7 @@
|
||||
#include "../lib/N64ModernRuntime/thirdparty/xxHash/xxh3.h"
|
||||
|
||||
extern "C" void recomp_update_inputs(uint8_t* rdram, recomp_context* ctx) {
|
||||
recomp::poll_inputs();
|
||||
recompinput::poll_inputs();
|
||||
}
|
||||
|
||||
extern "C" void recomp_puts(uint8_t* rdram, recomp_context* ctx) {
|
||||
@@ -50,14 +51,15 @@ extern "C" void recomp_get_gyro_deltas(uint8_t* rdram, recomp_context* ctx) {
|
||||
float* x_out = _arg<0, float*>(rdram, ctx);
|
||||
float* y_out = _arg<1, float*>(rdram, ctx);
|
||||
|
||||
recomp::get_gyro_deltas(x_out, y_out);
|
||||
// TODO: use controller number
|
||||
recompinput::get_gyro_deltas(0, x_out, y_out);
|
||||
}
|
||||
|
||||
extern "C" void recomp_get_mouse_deltas(uint8_t* rdram, recomp_context* ctx) {
|
||||
float* x_out = _arg<0, float*>(rdram, ctx);
|
||||
float* y_out = _arg<1, float*>(rdram, ctx);
|
||||
|
||||
recomp::get_mouse_deltas(x_out, y_out);
|
||||
recompinput::get_mouse_deltas(x_out, y_out);
|
||||
}
|
||||
|
||||
extern "C" void recomp_powf(uint8_t* rdram, recomp_context* ctx) {
|
||||
@@ -123,7 +125,7 @@ extern "C" void recomp_load_overlays(uint8_t * rdram, recomp_context * ctx) {
|
||||
}
|
||||
|
||||
extern "C" void recomp_high_precision_fb_enabled(uint8_t * rdram, recomp_context * ctx) {
|
||||
_return(ctx, static_cast<s32>(banjo::renderer::RT64HighPrecisionFBEnabled()));
|
||||
_return(ctx, static_cast<s32>(recompui::renderer::RT64HighPrecisionFBEnabled()));
|
||||
}
|
||||
|
||||
extern "C" void recomp_get_resolution_scale(uint8_t* rdram, recomp_context* ctx) {
|
||||
@@ -167,7 +169,8 @@ extern "C" void recomp_get_camera_inputs(uint8_t* rdram, recomp_context* ctx) {
|
||||
|
||||
float x, y;
|
||||
|
||||
recomp::get_right_analog(&x, &y);
|
||||
// TODO: use controller number
|
||||
recompinput::get_right_analog(0, &x, &y);
|
||||
|
||||
float magnitude = sqrtf(x * x + y * y);
|
||||
|
||||
@@ -187,7 +190,7 @@ extern "C" void recomp_get_camera_inputs(uint8_t* rdram, recomp_context* ctx) {
|
||||
extern "C" void recomp_set_right_analog_suppressed(uint8_t* rdram, recomp_context* ctx) {
|
||||
s32 suppressed = _arg<0, s32>(rdram, ctx);
|
||||
|
||||
recomp::set_right_analog_suppressed(suppressed);
|
||||
recompinput::set_right_analog_suppressed(suppressed);
|
||||
}
|
||||
|
||||
constexpr uint32_t k1_to_phys(uint32_t addr) {
|
||||
|
||||
Reference in New Issue
Block a user