Skip to content

Agar v1.7.0 ("Ancient Egypt")

Latest
Compare
Choose a tag to compare
@JulNadeauCA JulNadeauCA released this 02 May 04:59

Added

  • sdl2fb: New driver for SDL 2.0 (single-window; frame-buffer mode).
  • sdl2gl: New driver for SDL 2.0 (single-window; OpenGL mode).
  • sdl2mw: New driver for SDL 2.0 (multi-window; OpenGL mode).
  • glx: Added support for X Input Methods. Thanks sr20det!
  • AG_Button: New option AG_BUTTON_CROP (crop label surface to fit contents). Useful for condensing or removing typographical spacings so that individual glyphs (for example "Geometrical Shapes") can be made to align precisely.
  • AG_Color: Added compression / decompression macros for 4/12/24/48-bit values.
  • AG_Driver: New operation: setMouseAutoCapture (enable, disable or reset mouse auto-capture on button-down).
  • AG_DriverSw: New option clampOnResize (clamp active Agar windows against new display size).
  • AG_Error: New function AG_Debug2() (output debug message when debug level is >= 2).
  • AG_FontBf: New bitmap font engine for the .agbf font format.
  • AG_Menu: Implemented keyboard shortcuts. Added AG_MENU_NO_BOOL_MSG and AG_MENU_FAST_BOOL_MSG options.
  • AG_Menu: Improved the performance of the AG_MenuView renderer by caching state-dependent opaque labels (embedding any icons), so blending is no longer required by draw(). Improved appearance of AG_MenuView.
  • AG_Object: Introduce numerical class IDs and *_ISA() macros.
  • AG_Object: New function AG_ObjectFreeChildrenOfType().
  • AG_Radio: New HOMOGENOUS option to divide space equally between items. Thanks Stephen!
  • AG_StyleSheet: New CSS selectors E > F. Child widgets are now addressable by instance name (e.g., AG_Combo > "trigger") or class name (e.g., AG_Combo > AG_Button).
  • AG_StyleSheet: New CSS selector conditionals width, height and zoom. Widgets can be styled based on their current geometry or zoom level.
  • AG_Surface: New field Lpadding (scaline start padding). Allows fast cropping of lines from the left.
  • AG_Surface: Make it possible to increment the pixels pointer to fast crop lines from the top. Added pixelsBase pointer.
  • AG_Surface: Added standard palettes for 1/2/4/8-bit modes. New Indexed surfaces are now initialized with a standard palette by default.
  • AG_Surface: Added support for 40- and 48-bpp surfaces.
  • AG_Surface: Introduce optimized blitter tables.
  • AG_Surface: New function AG_PixelFormatMaximum() to return the maximum possible pixel value for a given format.
  • AG_Surface: New function AG_SurfaceBlend8() for blending 1/2/4/8-bpp surfaces against an AG_Color using the closest approximation available.
  • AG_Surface: Embed 4 general-purpose 16-bit guides. Guides are useful for typography, graphics and other applications.
  • AG_Surface: Make the AG_SURFACE_TRACE flag useful for tracing surface operations such as blits, copies / conversions and mapping to widgets (needs --enable-debug-surfaces).
  • AG_Text: Expand the list of standard font sizes to 32 sizes. Added fractional sizes between 7.0 and 13.0.
  • AG_Text: Expanded font adjustments to include subpixel alignment corrections for all 32 standard sizes. The table now covers over 150 popular open-source fonts. Adjustments allow different fonts to align with pixel-perfect accuracy.
  • AG_Text: Added OS/2 metrics and Unicode range information to the AG_Font structure.
  • AG_Text: Utilize OS/2 metrics typoAscender and typoDescender where available.
  • AG_Text: New macros AGSI_IS_*(c) for testing whether a character lies within a given Unicode range.
  • AG_Text: New macros AG_FONT_HAS_*() for testing the Unicode coverage of a font.
  • AG_Text: New structure AG_UnicodeRange and full table of Unicode ranges agUnicodeRanges[].
  • AG_Text: New table agUnicodeRangeFromOS2[] for mapping OS/2 Unicode coverage bits to indexes into agUnicodeRanges[].
  • AG_Text: New functions AG_FontGetStandardSize() and AG_FontGetStandardSizeIndex() for finding the standard point size closest to a given point size.
  • AG_Text: The surface returned by AG_TextRender() now includes Ascent information under Guide 0.
  • AG_Text: New function AG_TextRenderRTL() for rendering text right-to-left.
  • AG_Text: New function AG_FetchFontFromList() for loading the first available font from a comma-separated list.
  • AG_Text: New functions AG_FontGetStyleName() and AG_FontGetStyleByName(). Convert between the Uint and string representations of font styles (including styles, weights and width variants).
  • AG_Text: New function AG_FontGetFamilyStyles(). Return an array of AG_Font style flags describing every style, weight and width variant available in a given font's family.
  • AG_Text: New function AG_TextRenderCropped(). Crops the returned surface to fit the rendered text contents. This fast crop operation leaves the cropped (all-transparent) pixels in memory. It can be used for condensing or removing typographical spacings so that individual glyphs (for example "Geometrical Shapes") can be aligned precisely inside widget controls.
  • AG_Textbox / AG_Editable: Implement Undo/Redo functionality.
  • AG_Textbox / AG_Editable: Let AG_Textbox (and other containers) manage clipping so that text can be allowed to overflow out of the AG_Editable and out over the padding of its container widget.
  • AG_Editable: New option NO_CLIPPING to allow overflow beyond the widget's allocated area (for container widgets which implement their own clipping).
  • AG_Tlist: Draw lines to express the relationship between tree items.
  • AG_Tlist: New function AG_TlistScrollToSelection().
  • AG_Tlist: New option AG_TLIST_EXPAND_NODES. Display nodes (items with children) initially in expanded state.
  • AG_Tlist: New option AG_TLIST_NO_SCALE_ICON. Disable icon scaling when the icon width exceeds the standard width.
  • AG_Tlist: New option AG_TLIST_FIXED_HEIGHT. Don't reset the item height on "font-changed".
  • AG_Tlist: New options AG_TLIST_NO_LINES and AG_TLIST_NO_BGLINES. Disable lines connecting nodes or background lines.
  • AG_Tlist: New item flag AG_TLIST_ITEM_DISABLED. Disable the item individually (prevent selection and display in "disabled" state).
  • AG_Tlist: Improve keyboard navigation. Allow RIGHT/LEFT keys to Expand/Collapse node items.
  • AG_Event: New macro AG_EVENT_DUMP to produce a listing of argv[] arguments on the console.
  • AG_Widget: New flag AG_WIDGET_DISABLE_ON_ATTACH and functions AG_PushDisabledState() and AG_PopDisabledState. Make attached child widgets start in DISABLED mode (without raising "widget-disabled").
  • AG_Widget: New event "padding-changed". Generated by the style compiler to signal that the padding attribute of a widget has changed.
  • MAP: Introduce dynamic Map Objects with MAP_Object. Map Objects coexist with static Map elements and are embedded with the serialized MAP. Nodes refer to MAP_Object instances using an intermediate MAP_Location structure (which adds per-node flags, z-coordinate, height, layer and neighbor information). More than one MAP node may refer to a given MAP_Object.
  • MAP: New Insert Object (InsertObj) tool.
  • MAP: New functions MAP_DuplicateLocation(), MAP_NodeDelLocation(), MAP_NodeDelLocationAtIndex().
  • MAP: Added height (h) and z-coordinate (z) attributes to MAP_Item. Introduce MAP_Item classes.
  • MAP: Added Undo/Redo and History Buffer to Map Editor. New function MAP_ClearHistory().
  • MAP: Added validity tests to MAP_Node and MAP_Item.
  • MAP: Added persistent Library to the Map Editor. The pLibs pointer of MAP may be used to specify an alternate AG_Object as VFS Root for the Library. Similarly, pMaps may be used to specify an alternate VFS Root for loaded Maps.
  • agartest: New test/benchmark module surface for testing conversions and pixel/surface operations between surfaces in different modes and formats.
  • agartest: New command-line option -D (enable debugging).
  • agartest: New installer install-agartest.exe for Windows.
  • Provide copies of the OFL as separate files (OFL11.txt and LICENSE.ofl).
  • Install a copy of the generated Makefile.config as ${DATADIR}/agar.mk.
  • Install a copy of the generated configure.lua as ${DATADIR}/agar.lua.
  • Added DEBUG_MOUSE build option (debug delivery of mouse events to widgets).
  • Added Vim syntax files (under the syntax/ directory) complete with all types and constants.
  • New bitmap fonts: Agar Minimal and Agar Ideograms.

Removed

  • AG_Surface: Removed the fn argument from the AG_SurfaceBlend*() family of functions. Different blending arithmetic can be implemented using separate functions.
  • AG_Object: Removed AG_ObjectPage{In,Out}() and unused flags AG_OBJECT_FLOATING_VARS, AG_OBJECT_NON_PERSISTENT, AG_OBJECT_RESIDENT, AG_OBJECT_REOPEN_ONLOAD, AG_OBJECT_REMAIN_DATA and AG_OBJECT_CHLD_AUTOSAVE.
  • AG_Text: Removed AG_UnusedFont() and the reference counter in AG_Font.

Changed

  • Ctrl + Mouse Wheel may now be used to change the zoom level on a window.
  • Updated the build system. BSDBuild configure scripts are smaller and no longer emit unnecessary defines such as foo_cflags.h for dependent libraries. Such definitions are always available from ${DATADIR}/agar.mk.
  • Don't install headers from libraries disabled from the build (by --disable-foo).
  • AG_Color: Handle rgb16() format in AG_ColorFromString().
  • AG_Combo: Make combo expansion windows detachable and resizable.
  • AG_Combo: Make sub-elements style-addressable as input and trigger.
  • AG_FontSelector: Add Unicode range information and more metrics under the "Metrics" tab.
  • AG_FontSelector: The preview function now includes text in different scripts. It is now possible to set a user-defined preview function.
  • AG_Object: Improve the object validity test by using a pseudo-random signature generated on initialization. Make validity and class-membership testing possible outside of Debug builds.
  • AG_Object: Event argument accessor macros of the form AG_CONST_FOO_PTR() are now defined as AG_cFOO_PTR().
  • AG_Object: In AG_ObjectGenName(), convert the prefix (class name) to lowercase in its entirety.
  • AG_Object: With the AG_OBJECT_NAME_ONATTACH option, do not generate a name if the object has a non-empty name set.
  • AG_Printf: When formatting floating-point, handle positive and negative infinity.
  • AG_Surface: Replaced the PixelsPerByte field by PixelsPerByteShift to allow for more efficient arithmetic when handling < 8-bpp surfaces.
  • AG_Surface: In AG_SurfaceCopy(), handle 8-bpp copies to same-format surfaces using block copy.
  • AG_Surface: In AG_SurfaceCopy(), add an optimized case for sources surfaces in <= 8-bpp.
  • AG_Surface: In AG_SurfaceCopy(), add an optimized case for grayscale source surfaces.
  • AG_Tlist: Improved appearance and typography fixes. Improved performance of the renderer using state-dependent opaque labels to avoid the need for blending in draw().
  • AG_Tlist: Now applies the "padding" attribute on a per-item basis.
  • AG_Tlist: AG_TlistSetCompareFn() now returns a pointer to the previous compare function.
  • AG_Tlist: Make the comparison function of AG_TlistSort() ANSI-aware. Ignore SGR sequences as well as ideogram-range Unicodes.
  • AG_UCombo: Make combo expansion windows detachable and resizable.
  • AG_UCombo: Make the button style-addressable as trigger.
  • AG_Widget: In AG_WidgetSensitive(), use the window pointer to avoid an unnecessary traversal of parent objects.
  • AG_Widget: Prevent delivery of redundant "widget-shown" or "widget-hidden" events if AG_WidgetShow() and AG_WidgetHide() are called multiple times.
  • MAP: Performance improvements in threaded mode. Decoupled the memory allocation of nodes from the MAP thread in MAP_AllocNodes(). Removed redundant lock operations. Removed lock in MAP_NodeCopy().
  • MAP: Replaced MAP_NodeRemoveAll() by MAP_NodeClear(). Added fast path when clearing nodes with layer = -1.
  • MAP: MAP_NodeSwapLayers() now requires the map to be locked.

Fixed

  • Define GL_SILENCE_DEPRECATION under MacOS. Thanks Gaetan Brouilles!
  • Fixed outdated test for Cygwin. Thanks Walter!
  • Fixed compilation problem with core/dir.c under NetBSD.
  • Fixed compilation problem with core/inline_byteswap.h and core/cpuinfo.c on powerpc64. Thanks Mark Linimon!
  • Fixed double <-> long conversion warnings in math/m_sparse*.
  • wgl: Fixed a bug in cursor handling. When showing a window initially, perform size allocation after having initialized the cursors so that the initial cursor-change areas are correctly established.
  • install-sdk.exe now installs include files in include\x86 or include\x64.
  • AG_Console: Garbage-collect generated textures more efficiently.
  • AG_HSVPal: Fixed color not updating on agcolor binding change.
  • AG_Menu: When an AG_MenuView is detached, immediately invalidate the view pointers of its AG_MenuItem.
  • AG_Menu: Fixed styling errors. Honor the #disabled state.
  • AG_Numerical: Fixed styling errors. Use AG_BUTTON_CROP to align the arrows. Make the buttons style-addressable. Thanks Kristof!
  • AG_Surface: Fixed loading of PNG files in 16bpc format (the surface was not being initialized with the correct 64-bit masks). Fix transparency to colorkey translation when loading a PNG in an Indexed format.
  • AG_Surface: Fixed conversion between Indexed/Grayscale and other modes.
  • AG_Surface: Fixed conversion between 64-bpp and other modes.
  • AG_Surface: Honor surface padding in AG_SurfaceFromPixelsRGB() and AG_SurfaceFromPixelsRGBA().
  • AG_Surface: AG_MapPixelIndexed() now uses the Euclidean distance method.
  • AG_Table: Fixed an off-by-one which caused a missing cursor-change area for column resize.
  • AG_Text: AG_SetDefaultFont() now takes effect immediately.
  • AG_Textbox, AG_Editable and AG_Console: Fix horizontal scrolling (Shift + Mouse Wheel) behavior.
  • AG_Titlebar: Use AG_BUTTON_CROP to align the window button labels precisely.
  • AG_Widget: Fixed non-delivery of mouse-button-down events to hidden and subsequently re-shown widgets (e.g., widgets under a Notebook). Thanks Walter!
  • AG_Widget: Deliver widget-hidden when detaching a widget from a visible window.
  • AG_Widget: In AG_WidgetSizeAlloc(), set the UNDERSIZE flag correctly on return in the case where size_allocate() is inherited from a parent class.
  • AG_Window: Fix a memory leak in single-window mode (the Resize cursors).
  • AG_Window: Fixed a visual off-by-one pixel error with the left-side window-resize controls in single-window mode.
  • MAP: Added missing lock operations in MAP_AddCamera(), MAP_PushLayer() and MAP_PopLayer(). Fixed multiple memory leaks.
  • MAP: Fixed crash when pushing new layers in Editor.