Index: binaries/data/mods/public/globalscripts/Templates.js =================================================================== --- binaries/data/mods/public/globalscripts/Templates.js +++ binaries/data/mods/public/globalscripts/Templates.js @@ -27,35 +27,34 @@ } /** - * Check if a given list of classes matches another list of classes. - * Useful f.e. for checking identity classes. - * - * @param classes - List of the classes to check against. - * @param match - Either a string in the form + * Check if the classes given in the identity template + * match a list of classes + * @param classes List of the classes to check against + * @param match Either a string in the form * "Class1 Class2+Class3" * where spaces are handled as OR and '+'-signs as AND, - * and ! is handled as NOT, thus Class1+!Class2 = Class1 AND NOT Class2. + * and ! is handled as NOT, thus Class1+!Class2 = Class1 AND NOT Class2 * Or a list in the form * [["Class1"], ["Class2", "Class3"]] - * where the outer list is combined as OR, and the inner lists are AND-ed. + * where the outer list is combined as OR, and the inner lists are AND-ed * Or a hybrid format containing a list of strings, where the list is - * combined as OR, and the strings are split by space and '+' and AND-ed. + * combined as OR, and the strings are split by space and '+' and AND-ed * * @return undefined if there are no classes or no match object * true if the the logical combination in the match object matches the classes - * false otherwise. + * false otherwise */ function MatchesClassList(classes, match) { if (!match || !classes) return undefined; - // Transform the string to an array + // transform the string to an array if (typeof match == "string") match = match.split(/\s+/); - for (let sublist of match) + for (var sublist of match) { - // If the elements are still strings, split them by space or by '+' + // if the elements are still strings, split them by space or by '+' if (typeof sublist == "string") sublist = sublist.split(/[+\s]+/); if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) Index: binaries/data/mods/public/simulation/templates/template_unit_hero.xml =================================================================== --- binaries/data/mods/public/simulation/templates/template_unit_hero.xml +++ binaries/data/mods/public/simulation/templates/template_unit_hero.xml @@ -54,7 +54,6 @@ - attack/weapon/sword.xml actor/human/death/death.xml Index: binaries/data/mods/public/simulation/templates/template_unit_hero_healer.xml =================================================================== --- /dev/null +++ binaries/data/mods/public/simulation/templates/template_unit_hero_healer.xml @@ -0,0 +1,40 @@ + + + + 4.0 + 8.0 + 4.0 + + + + + 200 + 150 + 200 + + + + 20 + 6 + 2000 + + Human + + + 1000 + + + -Soldier Healer Support + + + 9 + + 12.0 + 200.0 + 0.0 + + + + 30 + + Index: binaries/data/mods/public/simulation/templates/units/maur_hero_chanakya.xml =================================================================== --- binaries/data/mods/public/simulation/templates/units/maur_hero_chanakya.xml +++ binaries/data/mods/public/simulation/templates/units/maur_hero_chanakya.xml @@ -1,69 +1,15 @@ - - - 4.0 - 8.0 - 4.0 - + - units/heroes/hero_garrison units/heroes/maur_hero_chanakya_1 units/heroes/maur_hero_chanakya_2 - - 2 - 40 - - 200 - 150 - 200 - - - - 20 - 6 - 2000 - - Human - - - 1000 - maur - Human Organic - Healer Hero Support Acharya Chanakya Acharya Chāṇakya units/maur_hero_chanakya.png - phase_city - - hero - - - - - - star/256x256.png - star/256x256_mask.png - - - - - Hero - - - 9 - - 12.0 - 200.0 - 0.0 - - - - 30 - units/mauryans/hero_chanakya.xml Index: source/renderer/VertexBufferManager.cpp =================================================================== --- source/renderer/VertexBufferManager.cpp +++ source/renderer/VertexBufferManager.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -63,7 +63,7 @@ typedef std::list::iterator Iter; #if DUMP_VB_STATS - debug_printf("\n============================\n# allocate vsize=%d nverts=%d\n\n", vertexSize, numVertices); + debug_printf("\n============================\n# allocate vsize=%zu nverts=%zu\n\n", vertexSize, numVertices); for (Iter iter = m_Buffers.begin(); iter != m_Buffers.end(); ++iter) { CVertexBuffer* buffer = *iter; if (buffer->CompatibleVertexType(vertexSize, usage, target)) @@ -90,7 +90,7 @@ if (!result) { - LOGERROR("Failed to create VBOs (%lu*%lu)", (unsigned long)vertexSize, (unsigned long)numVertices); + LOGERROR("Failed to create VBOs (%zu*%zu)", vertexSize, numVertices); } return result; @@ -102,7 +102,7 @@ { ENSURE(chunk); #if DUMP_VB_STATS - debug_printf("\n============================\n# release %p nverts=%d\n\n", chunk, chunk->m_Count); + debug_printf("\n============================\n# release %p nverts=%zu\n\n", chunk, chunk->m_Count); #endif chunk->m_Owner->Release(chunk); }