Skip to content

Commit

Permalink
piece of trash
Browse files Browse the repository at this point in the history
  • Loading branch information
tildearrow committed Oct 29, 2023
1 parent af97168 commit e121c40
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ option(WITH_DEMOS "Install demo songs" ON)
option(WITH_INSTRUMENTS "Install instruments" ON)
option(WITH_WAVETABLES "Install wavetables" ON)

set(DEPENDENCIES_INCLUDE_DIRS "")
set(DEPENDENCIES_INCLUDE_DIRS "extern/IconFontCppHeaders")

if (ANDROID AND NOT TERMUX)
set(DEPENDENCIES_DEFINES "IS_MOBILE")
Expand Down Expand Up @@ -919,7 +919,6 @@ if (BUILD_GUI)
list(APPEND DEPENDENCIES_INCLUDE_DIRS
extern/imgui_patched
extern/imgui_patched/backends
extern/IconFontCppHeaders
extern/igfd
)
if (WIN32 OR APPLE)
Expand Down
2 changes: 1 addition & 1 deletion src/engine/platform/pce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "pce.h"
#include "../engine.h"
// TODO: move this away
#include "../../src/gui/furIcons.h"
#include "../../gui/furIcons.h"
#include <math.h>

//#define rWrite(a,v) pendingWrites[a]=v;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/platform/snes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "../engine.h"
#include "../../ta-log.h"
// TODO: move this away
#include "../../src/gui/furIcons.h"
#include "../../gui/furIcons.h"
#include <math.h>

#define CHIP_FREQBASE 131072
Expand Down
27 changes: 27 additions & 0 deletions src/engine/platform/swan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#include "swan.h"
#include "../engine.h"
// TODO: move this away
#include "../../gui/furIcons.h"
#include "IconsFontAwesome4.h"
#include <math.h>

#define rWrite(a,v) if (!skipRegisterWrites) {writes.push(QueuedWrite(a,v)); if (dumpWrites) {addWrite(a,v);}}
Expand Down Expand Up @@ -480,6 +483,30 @@ unsigned short DivPlatformSwan::getPan(int ch) {
return ((chan[ch].pan&0xf0)<<4)|(chan[ch].pan&15);
}

DivChannelModeHints DivPlatformSwan::getModeHints(int ch) {
DivChannelModeHints ret;

switch (ch) {
case 1: // PCM
ret.count=1;
ret.hint[0]=ICON_FA_VOLUME_UP;
ret.type[0]=pcm?4:0;
break;
case 2: // sweep
ret.count=1;
ret.hint[0]=ICON_FUR_SAW;
ret.type[0]=sweep?2:0;
break;
case 3: // noise
ret.count=1;
ret.hint[0]=ICON_FUR_NOISE;
ret.type[0]=noise?4:0;
break;
}

return ret;
}

DivDispatchOscBuffer* DivPlatformSwan::getOscBuffer(int ch) {
return oscBuf[ch];
}
Expand Down
1 change: 1 addition & 0 deletions src/engine/platform/swan.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class DivPlatformSwan: public DivDispatch {
void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch);
unsigned short getPan(int chan);
DivChannelModeHints getModeHints(int chan);
DivDispatchOscBuffer* getOscBuffer(int chan);
unsigned char* getRegisterPool();
int getRegisterPoolSize();
Expand Down
17 changes: 15 additions & 2 deletions src/gui/furIcons.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// not auto-generated. update every time you change icons.ttf!

#define ICON_MIN_FUR 0xe0f0
#define ICON_MAX_FUR 0xe14d
#define ICON_MAX_FUR 0xe158

// test
#define ICON_FUR_TEST0 u8"\ue0f0"
Expand Down Expand Up @@ -82,6 +82,18 @@
#define ICON_FUR_SAMPLE_SIGN u8"\ue140"
#define ICON_FUR_SAMPLE_TRIM u8"\ue141"

// waveforms
#define ICON_FUR_NOISE u8"\ue14f"
#define ICON_FUR_PULSE1 u8"\ue150"
#define ICON_FUR_PULSE2 u8"\ue151"
#define ICON_FUR_PULSE3 u8"\ue152"
#define ICON_FUR_PULSE4 u8"\ue153"
#define ICON_FUR_PULSE5 u8"\ue154"
#define ICON_FUR_PULSE6 u8"\ue155"
#define ICON_FUR_PULSE7 u8"\ue156"
#define ICON_FUR_SAW u8"\ue157"
#define ICON_FUR_TRI u8"\ue158"

// misc
#define ICON_FUR_SINE u8"\ue144"
#define ICON_FUR_ADSR_A u8"\ue145"
Expand All @@ -92,4 +104,5 @@
#define ICON_FUR_DEC_EXP u8"\ue14a"
#define ICON_FUR_INC_LINEAR u8"\ue14b"
#define ICON_FUR_INC_BENT u8"\ue14c"
#define ICON_FUR_VOL_DIRECT u8"\ue14d"
#define ICON_FUR_VOL_DIRECT u8"\ue14d"
#define ICON_FUR_ADSR u8"\ue14e"

0 comments on commit e121c40

Please sign in to comment.