Remove waves for now as they were unsatisfactory.
Removes "shininess" as a water parameter as it was basically useless.
Add a button in Atlas to recompute water parameters so you can now see
fog in Atlas.
Fixes#1743, #1803 (invalid)
Refs #1875, #2114, #48.
This was SVN commit r14514.
It's completely broken since 4b1297b328 and will have to be updated for
the new SpiderMonkey API.
I only uncomment it at the moment because I plan to fix/reimplement it
soon after the upgrade.
Closes#2348
Refs #2241
Refs #1886
This was SVN commit r14506.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.
Closes#2241
Refs #1886
Refs #1966
This was SVN commit r14496.
This avoids wrapping overhead that would otherwise be required because
multiple globals per compartment aren't supported anymore in newer
versions of SpiderMonkey.
Check the ticket for a detailed explanation.
Closes#2322
Refs #2241
Refs #1886
This was SVN commit r14441.
Replace CreateValue with SetValueString so we don't pass pointers to
internal
ConfigDB structures around. Refs #1810.
Remove some splash screen related functions since we can achieve the
same
with the ConfigDB functions exposed to scripts.
This was SVN commit r14437.
The Multiplayer lobby needs some changes to avoid compartment
mismatches. Instead of initializing it with a ScriptInterface and
storing script values at different locations, it takes a ScriptInterface
argument in the functions that really need to read or write some script
values and avoids storing values as script values with an associated
compartment where possible.
The scripting interface of the lobby is also adjusted to use
JSInterface_Lobby.h/cpp files as other components instead of adding all
functions to ScriptFunctions.cpp. This makes it a bit more clearly
arranged IMO.
Fixes#2267
Refs #2241
Refs #1886
This was SVN commit r14199.
Replaces glBegin/End with glDrawArrays, GL_QUADS with GL_TRIANGLES, and
replaces glPush/PopAttrib by resetting the viewport manually.
Adjusts GLSL shaders for these changes.
This was SVN commit r14152.
Adds runtime support for 10.5 APIs: display modes, bundle paths, system
paths, pasteboards. Previously this was compile-time support only, which
prevented building on later SDKs while targeting earlier APIs.
Adds hardcoded version for pre-10.6 builds, to avoid messing with
deprecated Gestalt or having to add a 10.5 non-dispatch singleton (Grand
Central Dispatch didn't exist in 10.5)
This was SVN commit r14140.
Fix EncryptPassword being called with the wrong argument order, and
encrypting username instead of password. (This will break all existing
lobby accounts.)
Fix EncryptPassword not using all of salt_base.
This was SVN commit r14123.
OglTex had a size_t added, which pushed it over HDATA_USER_SIZE.
Use u32 instead to minimise the difference between platforms.
This was SVN commit r14121.
This approach isn't used anymore. Now we start the archive building with
parameters to pyrogeneis.
Refs #2241 (the code used g_ScriptingHost which is going to be removed)
This was SVN commit r14102.
- Implement tech mods for UnitMotion speeds, Fixes#1958, based on patch
by wraitii
- Implement athen_hero_themistocles ship speed aura as a test
This was SVN commit r14058.
SDL queues up all the input events received in a frame. When the hotkey
system saw a key up/down event, it immediately updated its
HotkeyIsPressed state and then pushed a hotkey event onto the end of the
queue.
If the initial queue was e.g. [key-down shift, key-press Z, key-up
shift], the hotkey event triggered by Z would be processed after the
key-up shift had updated the HotkeyIsPressed state, so the handler of
the Z hotkey would not think the shift hotkey was pressed.
If the initial queue was e.g. [key-press Z, mouse-click], the hotkey
triggered by Z would be processed after the mouse-click event, so it
could apply to the wrong building selection.
Fix by pushing the hotkey events onto a special queue that gets
processed before any subsequent SDL input events.
Also update the HotkeyIsPressed status when the HOTKEYDOWN/HOTKEYUP
events are processed, not when they are generated, to guarantee they are
consistent with the DOWN/UP events.
Fixes#1869.
This was SVN commit r14057.
Because it was historically grown, we have some duplicated code for
converting script types to native types.
This patch removes the file JSConversions.cpp and moves some code to
ScriptConversions.cpp.
The places using JSConversions.cpp are changed to use the
ScriptInterface's conversion functions in ScriptConversions.cpp.
I also removed JSInterface_Vector3D because it had additional
requirements to the conversion code that no other code has and because
it's currently not used. I think it doesn't make sense to maintain code
just because it could possibly be used again later.
Closes#2213
Refs #1886
This was SVN commit r14036.
Since all remaining uses of ScriptableObject/CJSObject have been
removed, the related files can now also be removed.
Closes#2212
Refs #2126
Refs #2137
Refs #1886
This was SVN commit r14026.
Add optional clipping rectangle to CTextRenderer. Strings that are
printed
outside the vertical extent of the clipping rectangle will be
immediately
skipped. This greatly reduces the cost of large scrollable text boxes.
This was SVN commit r14019.
When CTextRenderer is given multiple strings with no differences other
than position, render them in a single glDrawElements call to reduce
driver overhead.
Also avoid some unnecessary copies of std::wstrings.
This helps performance a bit with large GUI text boxes.
This was SVN commit r14018.
Replace unifont with CFont and CFontManager, since the h_mgr interface
was
needlessly inconvenient.
Load the font textures through CTextureManager, to support dynamic
reloading (e.g. when resetting GL state - see #741).
Add CFontMetrics as a convenient wrapper for code that just wants to
measure text.
Fixes#1117.
This was SVN commit r14016.
When textures.xml specifies format="alpha", the input is expected to be
an
8-bit greyscale PNG, and the output will be an 8-bit uncompressed
alpha-only DDS.
Add format override to CTextureProperties, to select between e.g.
GL_ALPHA
and GL_LUMINANCE for 8-bit textures.
This is needed so fonts can use the new texture system.
This was SVN commit r14015.
Implements custom, VFS-based map load/save dialogs for Atlas (replaces
broken native file dialogs), fixes#631, #889.
Fixes map loading/saving to handle arbitrary subdirectories for better
organization.
Adds default settings to Atlas player panel, fixes#1872. Each setting
now has a checkbox to choose whether it should be saved with the map
(avoids writing lots of useless default data for each map).
Adds map preview setting to Atlas, refs #1745.
Cleans up and simplifies some duplicate code.
Fixes optional serialization performance test.
This was SVN commit r13938.
This fixes an error with autostart and smoothlos=true, where the system
defines were being accessed before the first rendered frame.
This was SVN commit r13923.
Use an arena allocator in ShaderModelRenderer::Render, to reduce
the allocation cost in STL containers.
Avoid unnecessary copying of std::vectors.
This was SVN commit r13911.
wdbg_heap_NumberOfAllocations doesn't work without the wdbg_heap
leak detector, which is disabled since it's slow and broken.
Use a simple hook via _CrtSetAllocHook instead to count allocations.
This was SVN commit r13910.
Switch all the constant strings in graphics code to use the new
variables.
This avoids the cost of instantiating CStrInterns at runtime every
frame.
This was SVN commit r13906.
CShaderDefines is designed to be efficient to copy and compare, but not
to construct. Conditional defines were constructing new CShaderDefines
for many models every frame.
Precompute all the possible conditional combinations of CShaderDefines
when a material is first loaded, so they can be looked up at no cost
when rendering.
This was SVN commit r13902.
On MSVC, casting i32 to i64 then multiplying gets compiled into a call
to __allmul, which is slow. Use the __emul intrinsic instead.
GCC 4.6+ appears optimise this case automatically and doesn't need any
special handling.
This reduces the cost of ComputeShortPath by about 50% (testing AI vs AI
on Oasis 01).
This was SVN commit r13873.
Overflowing elements in SpatialQueryArray are now reported with
debug_warn, but can be ignored and the program will continue working,
but further entities will be truncated.
This was SVN commit r13860.
Add CEntityHandle which wraps an entity_id_t and also has a pointer to a
per-entity array of IComponents. QueryInterface/CmpPtr on a handle just
involve a couple of pointer dereferences instead of a map lookup.
This requires sizeof(void*) per registered interface type per entity,
which is currently ~0.5KB per entity, which shouldn't be a problem.
This was SVN commit r13825.
Exclude dev.cfg from the Windows installer.
Use the correct filename for the Windows installer.
Update some paths to match the new EC2 build process.
This was SVN commit r13802.
- Don't show the scrollbar when the contents aren't overflowing the
visible area.
- Fix bugs in minimum bar sizing.
- Add capability to set a maximum bar size.
- Correct outdated/incorrect comments.
This was SVN commit r13771.
glDrawRangeElements needs to know the range of vertexs that are used
by the index array. With VBOs it doesn't really matter if the range
is wrong (all the vertexes are in GPU memory anyway), but with CPU
vertex arrays the driver has to memcpy the given range of data, so
incorrect bounds will result in garbage data being rendered.
With gentangents, the rendered mesh can have more vertexes than the
original CModelDef, but was rendered with the CModelDef's vertex count.
Use the correct vertex count instead.
Refs #2050.
This was SVN commit r13734.
Adds INIT_HAVE_DISPLAY_ERROR init flag to correctly override
ah_display_error in Atlas (InitVfs was overriding it again), but don't
use it because it's ugly and broken, refs #1729
This was SVN commit r13724.
The values in CMessageTerrainChanged can be overestimates that exceed
the normal map boundaries, and should be clamped before looping over
them.
This was SVN commit r13714.