Skip to content

Commit

Permalink
Merge pull request #46 from AlwinEsch/Nexus-change
Browse files Browse the repository at this point in the history
[Nexus] API related update
  • Loading branch information
AlwinEsch authored Jan 1, 2022
2 parents 876199b + 8de1151 commit f216d37
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
4 changes: 3 additions & 1 deletion screensaver.biogenesis/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="screensaver.biogenesis"
version="20.0.0"
version="20.1.0"
name="BioGenesis"
provider-name="Team Kodi">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -22,8 +22,10 @@
<summary lang="da_DK">BioGenesis pauseskærm</summary>
<summary lang="de_DE">BioGenesis Bildschirmschoner</summary>
<summary lang="en_GB">BioGenesis screensaver</summary>
<summary lang="zh_CN">生物发生屏保程序</summary>
<description lang="da_DK">En implementering af John Conways berømte &quot;Game of Life&quot; med 3 brugerdefinerede farveregler. Et par grundlæggende regler styrer, hvilke celler der vil leve i den næste generation, afhængigt af cellernes nuværende tilstand og antallet af dets levende naboer.[CR][CR]Screenshots yder ikke så meget retfærdighed, da systemets bevægelse grænsende mellem stabilitet og kaos er det, der ser interessant ud.[CR][CR]Funktioner:[CR]- Der er implementeret 3 brugerdefinerede farveregler, der hver især giver interessante resultater.[CR]- Kolonifarvende farveceller afhængig af farven på dets 'overordnede' celler.[CR]CR]- Farvelægning i en levetid farver en celle afhængig af, hvor længe den har været i live.[CR]- Nabo, der farver en celle afhængigt af naboens konfiguration.[CR]- Mange parametre kan konfigureres i indstillingerne.</description>
<description lang="de_DE">Eine Implementierung von John Conways berühmtem &quot;Game of Life&quot; mit 3 benutzerdefinierten Farbregeln. Einige Grundregeln regeln, welche Zellen in der nächsten Generation leben werden, abhängig vom aktuellen Zustand der Zellen und der Anzahl ihrer lebenden Nachbarn.[CR][CR]Screenshots werden nicht so sehr gerecht, da die Bewegung des Systems zwischen Stabilität und Chaos interessant aussieht.[CR][CR]Eigenschaften:[CR] - Es werden jeweils 3 benutzerdefinierte Farbregeln implementiert, die interessante Ergebnisse liefern.[CR] - Farbzellen für Kolonien, abhängig von der Farbe der übergeordneten Zellen.[CR] - Die lebenslange Färbung färbt eine Zelle abhängig davon, wie lange sie noch lebt.[CR] - Nachbarn färben eine Zelle abhängig von der Konfiguration ihrer Nachbarn.[CR] - Viele Parameter sind in den Einstellungen konfigurierbar.</description>
<description lang="en_GB">An implementation of John Conway's famous &quot;Game of Life&quot; with 3 custom coloring rules. A few basic rules govern which cells will live in the next generation depending on the cells current state and the number of its live neighbors.[CR][CR]Screenshots don't do this much justice as the motion of the system bordering between stability and chaos is what looks interesting.[CR][CR]Features:[CR] - 3 custom coloring rules are implemented each yielding interesting results.[CR] - Colony coloring color cells depending on the color of its 'parent' cells.[CR] - Lifetime coloring colors a cell depending on how long its been alive.[CR] - Neighbor coloring a cell depending on the configuration of its neighbors.[CR] - Many parameters are configurable in the settings.</description>
<description lang="zh_CN">约翰·康威著名的“生活游戏”的一个实现,带有3个自定义着色规则。根据细胞的当前状态和其活的邻居的数量,一些基本规则决定了下一代细胞将存活。[CR][CR]截图没有做到这一点,因为系统在稳定和混乱之间的运动看起来很有趣。[CR][CR]特性:[CR] -实现了3个自定义着色规则,每个规则都产生了有趣的结果。[CR] -菌落根据其“亲代”细胞的颜色给细胞着色。[CR] -根据细胞存活的时间给细胞着色。[CR] -邻居根据其邻居的配置为单元格着色。[CR] -许多参数可在设置中配置。</description>
</extension>
</addon>
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ msgstr ""
"Project-Id-Version: KODI Main\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2021-09-17 03:30+0000\n"
"Last-Translator: taxigps <taxigps@sina.com>\n"
"PO-Revision-Date: 2021-11-04 04:06+0000\n"
"Last-Translator: 撷星芒 <mofa2020@qq.com>\n"
"Language-Team: Chinese (China) <https://kodi.weblate.cloud/projects/kodi-add-ons-look-and-feel/screensaver-biogenesis/zh_cn/>\n"
"Language: zh_cn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.8\n"
"X-Generator: Weblate 4.8.1\n"

msgctxt "Addon Summary"
msgid "BioGenesis screensaver"
msgstr ""
msgstr "生物发生屏保程序"

msgctxt "Addon Description"
msgid "An implementation of John Conway's famous \"Game of Life\" with 3 custom coloring rules. A few basic rules govern which cells will live in the next generation depending on the cells current state and the number of its live neighbors.[CR][CR]Screenshots don't do this much justice as the motion of the system bordering between stability and chaos is what looks interesting.[CR][CR]Features:[CR] - 3 custom coloring rules are implemented each yielding interesting results.[CR] - Colony coloring color cells depending on the color of its 'parent' cells.[CR] - Lifetime coloring colors a cell depending on how long its been alive.[CR] - Neighbor coloring a cell depending on the configuration of its neighbors.[CR] - Many parameters are configurable in the settings."
msgstr ""
msgstr "约翰·康威著名的“生活游戏”的一个实现,带有3个自定义着色规则。根据细胞的当前状态和其活的邻居的数量,一些基本规则决定了下一代细胞将存活。[CR][CR]截图没有做到这一点,因为系统在稳定和混乱之间的运动看起来很有趣。[CR][CR]特性:[CR] -实现了3个自定义着色规则,每个规则都产生了有趣的结果。[CR] -菌落根据其“亲代”细胞的颜色给细胞着色。[CR] -根据细胞存活的时间给细胞着色。[CR] -邻居根据其邻居的配置为单元格着色。[CR] -许多参数可在设置中配置。"

# [Consistency] Make terms, settings names, brands and other minutiae, consistent throughout file.
# [Capitalization] Avoid capitalizing every second word. See http://grammarist.com/capitalization/
Expand All @@ -39,32 +39,32 @@ msgstr "常规"

msgctxt "#30001"
msgid "Minimum grid size"
msgstr ""
msgstr "最小网格尺寸"

msgctxt "#30002"
msgid "Maximum grid size"
msgstr ""
msgstr "最大网格尺寸"

msgctxt "#30003"
msgid "Reset time"
msgstr ""
msgstr "重置时间"

msgctxt "#30004"
msgid "Preset change"
msgstr ""
msgstr "重置更改"

msgctxt "#30005"
msgid "Minimum line size"
msgstr ""
msgstr "最小线尺寸"

msgctxt "#30006"
msgid "Use colony colouring"
msgstr ""
msgstr "使用菌落着色"

msgctxt "#30007"
msgid "Use lifetime colouring"
msgstr ""
msgstr "使用终身着色"

msgctxt "#30008"
msgid "Use neighbour colouring"
msgstr ""
msgstr "使用相邻颜色"
22 changes: 11 additions & 11 deletions src/Life.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct Grid
Cell * fullGrid;
};

class ATTRIBUTE_HIDDEN CScreensaverBiogenesis
class ATTR_DLL_LOCAL CScreensaverBiogenesis
: public kodi::addon::CAddonBase
, public kodi::addon::CInstanceScreensaver
#ifndef WIN32
Expand Down Expand Up @@ -166,8 +166,8 @@ CScreensaverBiogenesis::CScreensaverBiogenesis()
bool CScreensaverBiogenesis::Start()
{
#ifndef WIN32
std::string fraqShader = kodi::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/frag.glsl");
std::string vertShader = kodi::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/vert.glsl");
std::string fraqShader = kodi::addon::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/frag.glsl");
std::string vertShader = kodi::addon::GetAddonPath("resources/shaders/" GL_TYPE_STRING "/vert.glsl");
if (!LoadShaderFiles(vertShader, fraqShader) || !CompileAndLink())
{
kodi::Log(ADDON_LOG_ERROR, "Failed to create and compile shader");
Expand Down Expand Up @@ -282,17 +282,17 @@ void CScreensaverBiogenesis::CreateGrid()
{
int i, cellmin, cellmax;

m_grid.minSize = kodi::GetSettingInt("minsize");
m_grid.maxSize = kodi::GetSettingInt("maxsize");
m_grid.resetTime = kodi::GetSettingInt("resettime");
m_grid.presetChance = kodi::GetSettingInt("presetchance");
m_grid.cellLineLimit = kodi::GetSettingInt("lineminsize");
m_grid.minSize = kodi::addon::GetSettingInt("minsize");
m_grid.maxSize = kodi::addon::GetSettingInt("maxsize");
m_grid.resetTime = kodi::addon::GetSettingInt("resettime");
m_grid.presetChance = kodi::addon::GetSettingInt("presetchance");
m_grid.cellLineLimit = kodi::addon::GetSettingInt("lineminsize");

if (!kodi::GetSettingBoolean("colony"))
if (!kodi::addon::GetSettingBoolean("colony"))
m_grid.allowedColoring ^= (1 << COLOR_COLONY);
if (!kodi::GetSettingBoolean("lifetime"))
if (!kodi::addon::GetSettingBoolean("lifetime"))
m_grid.allowedColoring ^= (1 << COLOR_TIME);
if (!kodi::GetSettingBoolean("neighbour"))
if (!kodi::addon::GetSettingBoolean("neighbour"))
m_grid.allowedColoring ^= (1 << COLOR_NEIGHBORS);

cellmin = (int)sqrt((float)(m_width*m_height/(int)(m_grid.maxSize*m_grid.maxSize*m_ratio)));
Expand Down

0 comments on commit f216d37

Please sign in to comment.