release v0.6.2
also contains preset search fix and NDS mem fix
This commit is contained in:
parent
90c628612e
commit
19ed900ef3
25 changed files with 233 additions and 59 deletions
|
|
@ -54,8 +54,8 @@ class DivWorkPool;
|
|||
|
||||
#define DIV_UNSTABLE
|
||||
|
||||
#define DIV_VERSION "dev196"
|
||||
#define DIV_ENGINE_VERSION 196
|
||||
#define DIV_VERSION "0.6.2"
|
||||
#define DIV_ENGINE_VERSION 197
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
|||
|
|
@ -565,6 +565,7 @@ void DivPlatformNDS::setFlags(const DivConfig& flags) {
|
|||
for (int i=0; i<16; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
memCompo.capacity=(isDSi?16777216:4194304);
|
||||
}
|
||||
|
||||
int DivPlatformNDS::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include "dave.hpp"
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define EP128EMU_UNLIKELY(x) x
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,26 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
|
|||
}
|
||||
}
|
||||
|
||||
void findInSubs(std::vector<FurnaceGUISysDef>& where, std::vector<FurnaceGUISysDef>& newSongSearchResults, String lowerCase) {
|
||||
for (FurnaceGUISysDef& j: where) {
|
||||
if (!j.orig.empty()) {
|
||||
String lowerCase1=j.name;
|
||||
for (char& i: lowerCase1) {
|
||||
if (i>='A' && i<='Z') i+='a'-'A';
|
||||
}
|
||||
auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) {
|
||||
return (c==' ' || c=='_' || c=='-');
|
||||
});
|
||||
lowerCase1.erase(lastItem,lowerCase1.end());
|
||||
if (lowerCase1.find(lowerCase)!=String::npos) {
|
||||
newSongSearchResults.push_back(j);
|
||||
newSongSearchResults[newSongSearchResults.size()-1].subDefs.clear();
|
||||
}
|
||||
}
|
||||
findInSubs(j.subDefs,newSongSearchResults,lowerCase);
|
||||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawNewSong() {
|
||||
bool accepted=false;
|
||||
std::vector<int> sysDefStack;
|
||||
|
|
@ -121,26 +141,30 @@ void FurnaceGUI::drawNewSong() {
|
|||
newSongSearchResults.clear();
|
||||
for (FurnaceGUISysCategory& i: sysCategories) {
|
||||
for (FurnaceGUISysDef& j: i.systems) {
|
||||
String lowerCase1=j.name;
|
||||
for (char& i: lowerCase1) {
|
||||
if (i>='A' && i<='Z') i+='a'-'A';
|
||||
}
|
||||
auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) {
|
||||
return (c==' ' || c=='_' || c=='-');
|
||||
});
|
||||
lowerCase1.erase(lastItem,lowerCase1.end());
|
||||
if (lowerCase1.find(lowerCase)!=String::npos) {
|
||||
newSongSearchResults.push_back(j);
|
||||
if (!j.orig.empty()) {
|
||||
String lowerCase1=j.name;
|
||||
for (char& i: lowerCase1) {
|
||||
if (i>='A' && i<='Z') i+='a'-'A';
|
||||
}
|
||||
auto lastItem=std::remove_if(lowerCase1.begin(),lowerCase1.end(),[](char c) {
|
||||
return (c==' ' || c=='_' || c=='-');
|
||||
});
|
||||
lowerCase1.erase(lastItem,lowerCase1.end());
|
||||
if (lowerCase1.find(lowerCase)!=String::npos) {
|
||||
newSongSearchResults.push_back(j);
|
||||
newSongSearchResults[newSongSearchResults.size()-1].subDefs.clear();
|
||||
}
|
||||
}
|
||||
findInSubs(j.subDefs,newSongSearchResults,lowerCase);
|
||||
}
|
||||
std::sort(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) {
|
||||
return strcmp(a.name.c_str(),b.name.c_str())<0;
|
||||
});
|
||||
auto lastItem=std::unique(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) {
|
||||
return a.name==b.name;
|
||||
});
|
||||
newSongSearchResults.erase(lastItem,newSongSearchResults.end());
|
||||
}
|
||||
std::sort(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) {
|
||||
return strcmp(a.name.c_str(),b.name.c_str())<0;
|
||||
});
|
||||
auto lastItem1=std::unique(newSongSearchResults.begin(),newSongSearchResults.end(),[](const FurnaceGUISysDef& a, const FurnaceGUISysDef& b) {
|
||||
return a.name==b.name;
|
||||
});
|
||||
newSongSearchResults.erase(lastItem1,newSongSearchResults.end());
|
||||
}
|
||||
if (ImGui::BeginTable("sysPicker",newSongQuery.empty()?2:1,ImGuiTableFlags_BordersInnerV)) {
|
||||
if (newSongQuery.empty()) {
|
||||
|
|
|
|||
|
|
@ -2430,8 +2430,10 @@ void FurnaceGUI::initSystemPresets() {
|
|||
);
|
||||
CATEGORY_END;
|
||||
|
||||
/*
|
||||
CATEGORY_BEGIN("User","system presets that you have saved.");
|
||||
CATEGORY_END;
|
||||
*/
|
||||
|
||||
CATEGORY_BEGIN("FM","chips which use frequency modulation (FM) to generate sound.\nsome of these also pack more (like square and sample channels).");
|
||||
ENTRY(
|
||||
|
|
@ -2837,7 +2839,7 @@ void FurnaceGUI::initSystemPresets() {
|
|||
}
|
||||
);
|
||||
ENTRY(
|
||||
"NDS", {
|
||||
"Nintendo DS", {
|
||||
CH(DIV_SYSTEM_NDS, 1.0f, 0, "")
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,10 @@
|
|||
|
||||
#define TS FurnaceGUITutorialStep
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include "../utfutils.h"
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -482,8 +485,8 @@ struct FurnaceCV {
|
|||
static const char* cvText[]={
|
||||
// intro
|
||||
"Play demo songs?\n"
|
||||
"- Down: no\n"
|
||||
"- Up: yes",
|
||||
"- Down: Play current song\n"
|
||||
"- Up: Play demo songs",
|
||||
|
||||
"Well, well, well. You wanna\n"
|
||||
"enable Serious Mode, right?\n",
|
||||
|
|
@ -495,7 +498,8 @@ static const char* cvText[]={
|
|||
"April 1st\n",
|
||||
|
||||
"The plot is left\n"
|
||||
"as an exercise for the player.",
|
||||
"as an exercise for the player.\n\n"
|
||||
"X - Shoot Arrow Key - Move",
|
||||
|
||||
"GAME OVER",
|
||||
|
||||
|
|
@ -795,15 +799,18 @@ void FurnaceGUI::initRandomDemoSong() {
|
|||
|
||||
#ifdef _WIN32
|
||||
WIN32_FIND_DATAW de;
|
||||
demoPath+=DIR_SEPARATOR_STR;
|
||||
HANDLE d=FindFirstFileW(utf8To16(demoPath.c_str()).c_str(),&de);
|
||||
String realDemoPath=demoPath;
|
||||
realDemoPath+=DIR_SEPARATOR_STR;
|
||||
realDemoPath+="*";
|
||||
HANDLE d=FindFirstFileW(utf8To16(realDemoPath.c_str()).c_str(),&de);
|
||||
if (d==INVALID_HANDLE_VALUE) {
|
||||
demoPath="..";
|
||||
demoPath+=DIR_SEPARATOR_STR;
|
||||
demoPath+="demos";
|
||||
demoPath+=DIR_SEPARATOR_STR;
|
||||
realDemoPath="..";
|
||||
realDemoPath+=DIR_SEPARATOR_STR;
|
||||
realDemoPath+="demos";
|
||||
realDemoPath+=DIR_SEPARATOR_STR;
|
||||
realDemoPath+="*";
|
||||
logW("OH NO");
|
||||
HANDLE d=FindFirstFileW(utf8To16(demoPath.c_str()).c_str(),&de);
|
||||
HANDLE d=FindFirstFileW(utf8To16(realDemoPath.c_str()).c_str(),&de);
|
||||
if (d==INVALID_HANDLE_VALUE) {
|
||||
logW("dang it");
|
||||
return;
|
||||
|
|
@ -866,13 +873,14 @@ void FurnaceGUI::initRandomDemoSong() {
|
|||
for (String& i: subDirs) {
|
||||
#ifdef _WIN32
|
||||
WIN32_FIND_DATAW de1;
|
||||
i+=DIR_SEPARATOR_STR;
|
||||
i+="*.fur";
|
||||
HANDLE d1=FindFirstFileW(utf8To16(i.c_str()).c_str(),&de1);
|
||||
String realI=i;
|
||||
realI+=DIR_SEPARATOR_STR;
|
||||
realI+="*.fur";
|
||||
HANDLE d1=FindFirstFileW(utf8To16(realI.c_str()).c_str(),&de1);
|
||||
if (d1==INVALID_HANDLE_VALUE) continue;
|
||||
do {
|
||||
String u8Name=utf16To8(de.cFileName);
|
||||
String newPath=demoPath;
|
||||
String newPath=i;
|
||||
newPath+=DIR_SEPARATOR_STR;
|
||||
newPath+=u8Name;
|
||||
randomDemoSong.push_back(newPath);
|
||||
|
|
@ -1983,6 +1991,7 @@ void FurnaceCVPlayer::collision(FurnaceCVObject* other) {
|
|||
if (!invincible) {
|
||||
dead=true;
|
||||
cv->respawnTime=48;
|
||||
cv->shotType=0;
|
||||
cv->soundEffect(SE_DEATH_C1);
|
||||
cv->soundEffect(SE_DEATH_C2);
|
||||
cv->createObject<FurnaceCVExplMedium>(x-8,y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue