store pattern names
This commit is contained in:
parent
67ec998196
commit
cda18d32b3
|
@ -25,6 +25,7 @@ furthermore, an `or reserved` indicates this field is always present, but is res
|
||||||
|
|
||||||
the format versions are:
|
the format versions are:
|
||||||
|
|
||||||
|
- 51: Furnace 0.5.7pre3
|
||||||
- 50: Furnace 0.5.7pre2
|
- 50: Furnace 0.5.7pre2
|
||||||
- 49: Furnace 0.5.7pre1
|
- 49: Furnace 0.5.7pre1
|
||||||
- 48: Furnace 0.5.6
|
- 48: Furnace 0.5.6
|
||||||
|
@ -105,6 +106,7 @@ size | description
|
||||||
| - 0x09: Neo Geo (YM2610) - 13 channels
|
| - 0x09: Neo Geo (YM2610) - 13 channels
|
||||||
| - bit 6 enables alternate mode:
|
| - bit 6 enables alternate mode:
|
||||||
| - 0x42: Genesis extended - 13 channels
|
| - 0x42: Genesis extended - 13 channels
|
||||||
|
| - 0x43: SMS (SN76489) + OPLL (YM2413) - 13 channels
|
||||||
| - 0x47: C64 (6581) - 3 channels
|
| - 0x47: C64 (6581) - 3 channels
|
||||||
| - 0x49: Neo Geo extended - 16 channels
|
| - 0x49: Neo Geo extended - 16 channels
|
||||||
| - bit 7 for non-DefleMask chips:
|
| - bit 7 for non-DefleMask chips:
|
||||||
|
@ -444,6 +446,7 @@ size | description
|
||||||
| - instrument
|
| - instrument
|
||||||
| - volume
|
| - volume
|
||||||
| - effect and effect data...
|
| - effect and effect data...
|
||||||
|
STR | pattern name (>=51)
|
||||||
|
|
||||||
# the Furnace instrument format (.fui)
|
# the Furnace instrument format (.fui)
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
warnings+=(String("\n")+x); \
|
warnings+=(String("\n")+x); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DIV_VERSION "0.5.7pre2"
|
#define DIV_VERSION "0.5.7pre3"
|
||||||
#define DIV_ENGINE_VERSION 50
|
#define DIV_ENGINE_VERSION 51
|
||||||
|
|
||||||
enum DivStatusView {
|
enum DivStatusView {
|
||||||
DIV_STATUS_NOTHING=0,
|
DIV_STATUS_NOTHING=0,
|
||||||
|
|
|
@ -986,6 +986,10 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
pat->data[j][5+(k<<1)]=reader.readS();
|
pat->data[j][5+(k<<1)]=reader.readS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ds.version>=51) {
|
||||||
|
pat->name=reader.readString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reader.tell()<reader.size()) {
|
if (reader.tell()<reader.size()) {
|
||||||
|
@ -1337,6 +1341,8 @@ SafeWriter* DivEngine::saveFur() {
|
||||||
w->writeS(pat->data[j][3]); // volume
|
w->writeS(pat->data[j][3]); // volume
|
||||||
w->write(&pat->data[j][4],2*song.pat[i>>16].effectRows*2); // effects
|
w->write(&pat->data[j][4],2*song.pat[i>>16].effectRows*2); // effects
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w->writeString(pat->name,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// POINTERS
|
/// POINTERS
|
||||||
|
|
|
@ -19,9 +19,10 @@
|
||||||
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "IconsFontAwesome4.h"
|
#include "IconsFontAwesome4.h"
|
||||||
|
#include <imgui.h>
|
||||||
|
|
||||||
void FurnaceGUI::drawOrders() {
|
void FurnaceGUI::drawOrders() {
|
||||||
char selID[64];
|
static char selID[4096];
|
||||||
if (nextWindow==GUI_WINDOW_ORDERS) {
|
if (nextWindow==GUI_WINDOW_ORDERS) {
|
||||||
ordersOpen=true;
|
ordersOpen=true;
|
||||||
ImGui::SetNextWindowFocus();
|
ImGui::SetNextWindowFocus();
|
||||||
|
@ -66,9 +67,9 @@ void FurnaceGUI::drawOrders() {
|
||||||
bool highlightLoop=(i>=loopOrder && i<=loopEnd);
|
bool highlightLoop=(i>=loopOrder && i<=loopEnd);
|
||||||
if (highlightLoop) ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(uiColors[GUI_COLOR_SONG_LOOP]));
|
if (highlightLoop) ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(uiColors[GUI_COLOR_SONG_LOOP]));
|
||||||
if (settings.orderRowsBase==1) {
|
if (settings.orderRowsBase==1) {
|
||||||
snprintf(selID,64,"%.2X##O_S%.2x",i,i);
|
snprintf(selID,4096,"%.2X##O_S%.2x",i,i);
|
||||||
} else {
|
} else {
|
||||||
snprintf(selID,64,"%d##O_S%.2x",i,i);
|
snprintf(selID,4096,"%d##O_S%.2x",i,i);
|
||||||
}
|
}
|
||||||
if (ImGui::Selectable(selID)) {
|
if (ImGui::Selectable(selID)) {
|
||||||
e->setOrder(i);
|
e->setOrder(i);
|
||||||
|
@ -79,7 +80,12 @@ void FurnaceGUI::drawOrders() {
|
||||||
for (int j=0; j<e->getTotalChannelCount(); j++) {
|
for (int j=0; j<e->getTotalChannelCount(); j++) {
|
||||||
if (!e->song.chanShow[j]) continue;
|
if (!e->song.chanShow[j]) continue;
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
snprintf(selID,64,"%.2X##O_%.2x_%.2x",e->song.orders.ord[j][i],j,i);
|
DivPattern* pat=e->song.pat[j].getPattern(e->song.orders.ord[j][i],false);
|
||||||
|
/*if (!pat->name.empty()) {
|
||||||
|
snprintf(selID,4096,"%s##O_%.2x_%.2x",pat->name.c_str(),j,i);
|
||||||
|
} else {*/
|
||||||
|
snprintf(selID,4096,"%.2X##O_%.2x_%.2x",e->song.orders.ord[j][i],j,i);
|
||||||
|
//}
|
||||||
if (ImGui::Selectable(selID,(orderEditMode!=0 && curOrder==i && orderCursor==j))) {
|
if (ImGui::Selectable(selID,(orderEditMode!=0 && curOrder==i && orderCursor==j))) {
|
||||||
if (curOrder==i) {
|
if (curOrder==i) {
|
||||||
if (orderEditMode==0) {
|
if (orderEditMode==0) {
|
||||||
|
@ -106,6 +112,9 @@ void FurnaceGUI::drawOrders() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!pat->name.empty() && ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("%s",pat->name.c_str());
|
||||||
|
}
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
if (curOrder==i) {
|
if (curOrder==i) {
|
||||||
if (orderEditMode==0) {
|
if (orderEditMode==0) {
|
||||||
|
|
Loading…
Reference in New Issue