mirror of
https://github.com/sven-n/MuMain
synced 2026-08-15 20:32:27 -04:00
66 lines
2.6 KiB
HTML
66 lines
2.6 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
|
|
xmlns:pd="http://www.munique.net/OpenMU/PacketDefinitions"
|
|
>
|
|
<xsl:param name="resultFileName" />
|
|
<xsl:param name="subNamespace" />
|
|
<xsl:output method="text" indent="yes" />
|
|
<xsl:include href="Common.xslt" />
|
|
|
|
<xsl:template match="pd:PacketDefinitions">
|
|
<xsl:text>// <copyright file="PacketBindings.h" company="MUnique">
|
|
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
|
// </copyright>
|
|
|
|
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This source code was auto-generated by an XSL transformation.
|
|
// Do not change this file. Instead, change the XML data which contains
|
|
// the packet definitions and re-run the transformation (publish/rebuild the
|
|
// managed library project).
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
#include "Connection.h"
|
|
#include <coreclr_delegates.h>
|
|
|
|
#include "PacketFunctions_CommonEnums.h"
|
|
#include "PacketFunctions_</xsl:text>
|
|
<xsl:value-of select="$subNamespace"/>
|
|
<xsl:text>_Enums.h"
|
|
</xsl:text>
|
|
<xsl:apply-templates select="pd:Packets/pd:Packet" mode="function_binding" />
|
|
|
|
</xsl:template>
|
|
|
|
<xsl:template match="pd:Packet[not(pd:Fields/pd:Field/pd:Type = 'Structure[]')]" mode="function_binding">
|
|
<xsl:value-of select="$newline" />
|
|
<xsl:text>typedef void(CORECLR_DELEGATE_CALLTYPE* Send</xsl:text>
|
|
<xsl:apply-templates select="pd:Name" />
|
|
<xsl:text>)(int32_t</xsl:text>
|
|
<xsl:apply-templates select="pd:Fields/pd:Field" mode="nativeparamtypes">
|
|
<xsl:sort select="pd:DefaultValue"/>
|
|
</xsl:apply-templates>
|
|
<xsl:text>);</xsl:text>
|
|
<xsl:value-of select="$newline" />
|
|
<xsl:text>inline Send</xsl:text>
|
|
<xsl:apply-templates select="pd:Name" />
|
|
<xsl:text> dotnet_Send</xsl:text>
|
|
<xsl:apply-templates select="pd:Name" />
|
|
<xsl:text> = reinterpret_cast<Send</xsl:text>
|
|
<xsl:apply-templates select="pd:Name" />
|
|
<xsl:text>>(symLoad(munique_client_library_handle, "Send</xsl:text>
|
|
<xsl:apply-templates select="pd:Name" />
|
|
<xsl:text>"));</xsl:text>
|
|
<xsl:value-of select="$newline" />
|
|
</xsl:template>
|
|
|
|
|
|
<xsl:template match="text()" mode="function_binding"></xsl:template>
|
|
<xsl:template match="text()"></xsl:template>
|
|
|
|
</xsl:stylesheet>
|