Skip to content

Commit

Permalink
25.1.20
Browse files Browse the repository at this point in the history
[Engine]
* Update atlas code to eventually support different pixel types.
* Initialise atlas bitmap surfaces faster.
* Fix allocating more memory than needed when enlarging atlas bitmaps.
* Set image, atlas, font and texture class purpose flag at compile time.
* Merge instead of swapping image flags when running 'SwapImage()'.
* Disambiguate between Bitmap fonts and FreeType fonts.

[Assets]
* Rebuild API documentation.
  • Loading branch information
Mhatxotic committed Jan 20, 2025
1 parent 6198544 commit cc19492
Show file tree
Hide file tree
Showing 16 changed files with 302 additions and 263 deletions.
26 changes: 13 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- Reference for the Mhatxotic Engine API version 25.1.17.15 -->
<!-- Automatically built at Fri Jan 17 00:45:22 2025 +0000 -->
<!-- With Mhatxotic Engine Project Management Utility version 25.1.17.15 -->
<!-- Reference for the Mhatxotic Engine API version 25.1.19.102 -->
<!-- Automatically built at Mon Jan 20 00:04:11 2025 +0000 -->
<!-- With Mhatxotic Engine Project Management Utility version 25.1.19.102 -->
<!-- Copyright (c) 2006-2025 Mhatxotic Design, All Rights Reserved Worldwide -->
<HTML lang="en-GB">
<HEAD>
Expand All @@ -11,18 +11,18 @@
<META name="apple-mobile-web-app-title" content="Mhatxotic Engine API">
<META name="author" content="Mhatxotic Design">
<META name="copyright" content="Copyright © 2006-2025 Mhatxotic Design, All Rights Reserved">
<META name="description" content="Reference for the Mhatxotic Engine API version 25.1.17.15">
<META name="description" content="Reference for the Mhatxotic Engine API version 25.1.19.102">
<META name="format-detection" content="telephone=no">
<META name="generator" content="Mhatxotic Engine Project Management Utility version 25.1.17.15">
<META name="generator" content="Mhatxotic Engine Project Management Utility version 25.1.19.102">
<META name="google-site-verification" content="BvWxrqmgaIxqe_W8AW3OGK0fdCI_JfB_-gcOOxCF9_4">
<META name="googlebot" content="index,follow">
<META name="og:description" content="Reference for the Mhatxotic Engine API version 25.1.17.15">
<META name="og:description" content="Reference for the Mhatxotic Engine API version 25.1.19.102">
<META name="og:image" content="https://repository-images.githubusercontent.com/611875607/ee7aa468-9797-4763-9a2d-ea3d782ef413">
<META name="og:title" content="Mhatxotic Engine 25.1.17.15 API reference">
<META name="og:title" content="Mhatxotic Engine 25.1.19.102 API reference">
<META name="og:url" content="https://mhatxotic.github.io/Engine/">
<META name="robots" content="index,follow">
<META name="viewport" content="width=device-width, initial-scale=1">
<TITLE>Mhatxotic Engine 25.1.17.15 API reference</TITLE>
<TITLE>Mhatxotic Engine 25.1.19.102 API reference</TITLE>
<STYLE media="screen">
* { margin:0; padding:0 }
BODY { background-color:#111; border:0; font-family:sans-serif; overflow-x:hidden; text-shadow: 1px 1px #111 }
Expand Down Expand Up @@ -60,7 +60,7 @@
</STYLE>
</HEAD>
<BODY id="idx.top">
<H1>Mhatxotic Engine 25.1.17.15 API reference</H1>
<H1>Mhatxotic Engine 25.1.19.102 API reference</H1>
<NOSCRIPT>
<H2>JavaScript is required to show and hide elements.</H2>
</NOSCRIPT>
Expand Down Expand Up @@ -264,7 +264,7 @@ <H2>Table of contents:-</H2>
<DIV>
<A href="#idx:Atlas">Atlas namespace</A>
<OL>
<LI><P>The atlas class allows dynamic building of an OpenGL texture by collecting library.</P></LI>
<LI><P>The atlas class allows dynamic building of an OpenGL texture by allowing the guest to combine multiple bitmaps into a single texture so there is less OpenGL texture id switching and fundamentally less CPU usage used.</P></LI>
<LI><A href="#idx:Atlas">&#x25B2; Return to summary</A> / <A href="#idx.top">top</A></LI>
</OL>
</DIV>
Expand Down Expand Up @@ -9816,11 +9816,11 @@ <H4><A href="#idx:Util">&#x25B2; Return to table of contents</A></H4>
<DIV id="Util.ParseUrl" style="display:none">
<H3>Util.ParseUrl</H3>
<H4>Syntax:-</H4>
<PRE><U>Result</U>, <U>Protocol</U>, <U>Secure</U>, <U>Host</U>, <U>Port</U>, <U>Resource</U>, <U>Bookmark</U>, <U>Username</U>, <U>Password</U> = Util.ParseUrl(<I><U>String</U></I>)</PRE>
<PRE><U>Result</U>, <U>Scheme</U>, <U>Secure</U>, <U>Host</U>, <U>Port</U>, <U>Resource</U>, <U>Bookmark</U>, <U>Username</U>, <U>Password</U> = Util.ParseUrl(<I><U>String</U></I>)</PRE>
<H4>Function Parameters:-</H4>
<PRE><U>String</U> <I>(string)</I> = The url to parse<BR></PRE>
<H4>Return Parameters:-</H4>
<PRE><U>Result</U> <I>(integer)</I> = The result code of the parse<BR><U>Protocol</U> <I>(string)</I> = The protocol string 'http' or 'https'<BR><U>Secure</U> <I>(boolean)</I> = The conneciton would need to use SSL?<BR><U>Host</U> <I>(string)</I> = The hostname to connect to<BR><U>Port</U> <I>(integer)</I> = The port number to connect to<BR><U>Resource</U> <I>(string)</I> = The resource to request<BR><U>Bookmark</U> <I>(string)</I> = The bookmark part of the request<BR><U>Username</U> <I>(string)</I> = The username part of the request<BR><U>Password</U> <I>(string)</I> = The password part of the request<BR></PRE>
<PRE><U>Result</U> <I>(integer)</I> = The result code of the parse<BR><U>Scheme</U> <I>(string)</I> = The scheme string 'http' or 'https'<BR><U>Secure</U> <I>(boolean)</I> = The conneciton would need to use SSL?<BR><U>Host</U> <I>(string)</I> = The hostname to connect to<BR><U>Port</U> <I>(integer)</I> = The port number to connect to<BR><U>Resource</U> <I>(string)</I> = The resource to request<BR><U>Bookmark</U> <I>(string)</I> = The bookmark part of the request<BR><U>Username</U> <I>(string)</I> = The username part of the request<BR><U>Password</U> <I>(string)</I> = The password part of the request<BR></PRE>
<H4>Synopsis:-</H4>
<PRE>Parses the specified url and returns all the information about it </PRE>
<H4><A href="#idx:Util">&#x25B2; Return to table of contents</A></H4>
Expand Down Expand Up @@ -12256,6 +12256,6 @@ <H3>win_widthmin</H3>
<H4><A href="#idx.cv">&#x25B2; Return to table of contents</A></H4>
</DIV>
<ADDRESS>Copyright &copy; 2025 Mhatxotic Design, All Rights Reserved.<BR>
This document was generated at Fri Jan 17 00:45:22 2025 +0000</ADDRESS>
This document was generated at Mon Jan 20 00:04:11 2025 +0000</ADDRESS>
</BODY>
</HTML>
16 changes: 8 additions & 8 deletions src/asset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,23 @@ CTOR_MEM_BEGIN_ASYNC_CSLAVE(Assets, Asset, ICHelperUnsafe),
void InitAsyncAsset(lua_State*const lS, const string &strName,
const AssetFlagsConst &afcFlags, Asset &aCref)
{ // Prepare user flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Dispatch the event
AsyncInitArray(lS, strName, "assetdata", aCref);
}
/* -- Load asset from file asynchronously -------------------------------- */
void InitAsyncFile(lua_State*const lS, const string &strFile,
const AssetFlagsConst &afcFlags)
{ // Prepare user flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Load asset from file asynchronously
AsyncInitFile(lS, strFile, "assetfile");
}
/* -- Load asset from command-line --------------------------------------- */
void InitAsyncCmdLine(lua_State*const lS, const string &strCmdLine,
const AssetFlagsConst &afcFlags)
{ // Prepare user flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Nothing to send to 'stdin'
Memory mbBlank;
// Dispatch the request asynchronously
Expand All @@ -194,23 +194,23 @@ CTOR_MEM_BEGIN_ASYNC_CSLAVE(Assets, Asset, ICHelperUnsafe),
void InitAsyncCmdLineEx(lua_State*const lS, const string &strCmdLine,
const AssetFlagsConst &afcFlags, Asset &aStdIn)
{ // Prepare user flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Load asset from file asynchronously
AsyncInitCmdLine(lS, strCmdLine,
StrAppend("cmdline<", aStdIn.MemSize()), aStdIn);
}
/* -- Init from file ----------------------------------------------------- */
void InitFile(const string &strFile, const AssetFlagsConst &afcFlags)
{ // Set load flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Load file normally
SyncInitFileSafe(strFile);
}
/* -- Init from file ----------------------------------------------------- */
void InitPtr(const string &strName, const AssetFlagsConst &afcFlags,
size_t stNSize, const char*const cpNPtr)
{ // Prepare flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Copy the memory
Memory mData{ stNSize, cpNPtr };
// Do the initialisation
Expand All @@ -225,7 +225,7 @@ CTOR_MEM_BEGIN_ASYNC_CSLAVE(Assets, Asset, ICHelperUnsafe),
{ // Copy name of asset
IdentSet(aCref.IdentGet());
// Copy flags
FlagReset(aCref.FlagGet());
FlagSet(aCref.FlagGet());
// Then copy the memory over
MemInitCopy(aCref);
}
Expand All @@ -240,7 +240,7 @@ CTOR_MEM_BEGIN_ASYNC_CSLAVE(Assets, Asset, ICHelperUnsafe),
void InitArray(const string &strName, Asset &aRef,
const AssetFlagsConst &afcFlags)
{ // Set load flags
FlagReset(afcFlags);
FlagSet(afcFlags);
// Set filename and flags
SyncInitArray(strName, aRef);
}
Expand Down
Loading

0 comments on commit cc19492

Please sign in to comment.