HGamer3D-Enet-Binding 0.4.0 → 0.5.0
raw patch · 17 files changed
+412/−412 lines, 17 filessetup-changed
Files
- HGamer3D-Enet-Binding.cabal +13/−13
- HGamer3D/Bindings/Enet/ClassEnet.chs +37/−37
- HGamer3D/Bindings/Enet/ClassEnetClient.chs +37/−37
- HGamer3D/Bindings/Enet/ClassEnetPacket.chs +37/−37
- HGamer3D/Bindings/Enet/ClassEnetServer.chs +37/−37
- HGamer3D/Bindings/Enet/ClassPtr.chs +13/−13
- HGamer3D/Bindings/Enet/StructHG3DClass.chs +37/−37
- HGamer3D/Bindings/Enet/Utils.chs +37/−37
- LICENSE +13/−13
- Setup.hs +19/−19
- include/ClassEnet.h +22/−22
- include/ClassEnetClient.h +27/−27
- include/ClassEnetPacket.h +20/−20
- include/ClassEnetServer.h +21/−21
- include/ClassPtr.h +28/−28
- include/EnetDllDefines.h +7/−7
- include/StructHG3DClass.h +7/−7
HGamer3D-Enet-Binding.cabal view
@@ -1,14 +1,14 @@ Name: HGamer3D-Enet-Binding -Version: 0.4.0 +Version: 0.5.0 Synopsis: Enet Binding for HGamer3D Description: - HGamer3D is a game engine for developing 3D games in the programming - language Haskell. This package provides the Enet binding. - HGamer3D-Enet-Binding is available on Windows and Linux. - This binding does not claim to have full coverage of Enet - functionality, but only to support what is needed for the- HGamer3D-Network package.- + HGamer3D is a toolset for developing 3D games in the programming + language Haskell. This package provides the Enet binding. + HGamer3D-Enet-Binding is available on Windows and Linux. + This binding does not claim to have full coverage of Enet + functionality, but only to support what is needed for the + HGamer3D-Network package. + License: OtherLicense @@ -19,21 +19,21 @@ Cabal-Version: >=1.4 Homepage: http://www.hgamer3d.org Category: Game Engine, Network -Extra-source-files: Setup.hs, include/ClassEnetClient.h, include/StructHG3DClass.h, include/hg3dstruct.h, include/EnetDllDefines.h, include/ClassPtr.h, include/ClassEnetServer.h, include/ClassEnet.h, include/ClassEnetPacket.h, include/hg3denet.hpp +Extra-source-files: Setup.hs, include/ClassEnet.h, include/ClassEnetClient.h, include/ClassEnetPacket.h, include/ClassEnetServer.h, include/ClassPtr.h, include/EnetDllDefines.h, include/hg3denet.hpp, include/hg3dstruct.h, include/StructHG3DClass.h Library Build-Depends: base >= 3 && < 5, HGamer3D-Data >= 0.4.0 - Exposed-modules: HGamer3D.Bindings.Enet.Utils, HGamer3D.Bindings.Enet.StructHG3DClass, HGamer3D.Bindings.Enet.ClassPtr, HGamer3D.Bindings.Enet.ClassEnetServer, HGamer3D.Bindings.Enet.ClassEnet, HGamer3D.Bindings.Enet.ClassEnetPacket, HGamer3D.Bindings.Enet.ClassEnetClient + Exposed-modules: HGamer3D.Bindings.Enet.Utils, HGamer3D.Bindings.Enet.ClassPtr, HGamer3D.Bindings.Enet.StructHG3DClass, HGamer3D.Bindings.Enet.ClassEnet, HGamer3D.Bindings.Enet.ClassEnetClient, HGamer3D.Bindings.Enet.ClassEnetPacket, HGamer3D.Bindings.Enet.ClassEnetServer Other-modules: - ghc-options: + ghc-options: -O2 cc-options: -Wno-attributes hs-source-dirs: . Include-dirs: include Build-tools: build-depends: if os(windows) - extra-libraries: hg3denet040 + extra-libraries: hg3denet050 else - extra-libraries: hg3denet040,enet + extra-libraries: hg3denet050,enet
HGamer3D/Bindings/Enet/ClassEnet.chs view
@@ -1,46 +1,46 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- ClassEnet.chs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at -- - -module HGamer3D.Bindings.Enet.ClassEnet where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- ClassEnet.chs++-- ++module HGamer3D.Bindings.Enet.ClassEnet where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+ {# import HGamer3D.Bindings.Enet.Utils #} {# import HGamer3D.Bindings.Enet.ClassPtr #} {# import HGamer3D.Bindings.Enet.StructHG3DClass #}- -#include "ClassEnet.h" ++#include "ClassEnet.h" {- function HG3DEnet -} {#fun enet_enet_construct as new { alloca- `HG3DClass' peek*} -> `()' #}
HGamer3D/Bindings/Enet/ClassEnetClient.chs view
@@ -1,46 +1,46 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- ClassEnetClient.chs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at -- - -module HGamer3D.Bindings.Enet.ClassEnetClient where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- ClassEnetClient.chs++-- ++module HGamer3D.Bindings.Enet.ClassEnetClient where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+ {# import HGamer3D.Bindings.Enet.Utils #} {# import HGamer3D.Bindings.Enet.ClassPtr #} {# import HGamer3D.Bindings.Enet.StructHG3DClass #}- -#include "ClassEnetClient.h" ++#include "ClassEnetClient.h" {- function ~EnetClient -} {#fun enet_clnt_destruct as delete { withHG3DClass* `HG3DClass' } -> `()' #}
HGamer3D/Bindings/Enet/ClassEnetPacket.chs view
@@ -1,46 +1,46 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- ClassEnetPacket.chs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at -- - -module HGamer3D.Bindings.Enet.ClassEnetPacket where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- ClassEnetPacket.chs++-- ++module HGamer3D.Bindings.Enet.ClassEnetPacket where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+ {# import HGamer3D.Bindings.Enet.Utils #} {# import HGamer3D.Bindings.Enet.ClassPtr #} {# import HGamer3D.Bindings.Enet.StructHG3DClass #}- -#include "ClassEnetPacket.h" ++#include "ClassEnetPacket.h" {- function getData -} {#fun enet_pck_getData as getData { withHG3DClass* `HG3DClass' ,
HGamer3D/Bindings/Enet/ClassEnetServer.chs view
@@ -1,46 +1,46 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- ClassEnetServer.chs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at -- - -module HGamer3D.Bindings.Enet.ClassEnetServer where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- ClassEnetServer.chs++-- ++module HGamer3D.Bindings.Enet.ClassEnetServer where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+ {# import HGamer3D.Bindings.Enet.Utils #} {# import HGamer3D.Bindings.Enet.ClassPtr #} {# import HGamer3D.Bindings.Enet.StructHG3DClass #}- -#include "ClassEnetServer.h" ++#include "ClassEnetServer.h" {- function ~EnetServer -} {#fun enet_srv_destruct as delete { withHG3DClass* `HG3DClass' } -> `()' #}
HGamer3D/Bindings/Enet/ClassPtr.chs view
@@ -1,10 +1,10 @@-{-# LANGUAGE EmptyDataDecls #-}+{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} -- This source file is part of HGamer3D, a project to enable 3D game development -- in Haskell. For the latest info, see http://www.hgamer3d.org . --- +-- -- (c) 2011-2014 Peter Althainz -- @@ -19,12 +19,12 @@ -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. --- +-- -- ClassPtr.chs --- Class Ptr Utilities+-- Class Ptr Utilities module HGamer3D.Bindings.Enet.ClassPtr where @@ -37,14 +37,14 @@ import HGamer3D.Data.Colour import HGamer3D.Data.Angle -{# import HGamer3D.Bindings.Enet.Utils #}+{# import HGamer3D.Bindings.Enet.Utils #} #include "ClassPtr.h" -{- class ClassEnetClient -}-{#pointer *ClassEnetClient as ClassEnetClient#}-{- class ClassEnetPacket -}-{#pointer *ClassEnetPacket as ClassEnetPacket#}-{- class ClassEnetServer -}-{#pointer *ClassEnetServer as ClassEnetServer#}-{- class ClassEnet -}-{#pointer *ClassHG3DEnet as ClassEnet#}+{- class ClassEnetClient -} +{#pointer *ClassEnetClient as ClassEnetClient#} +{- class ClassEnetPacket -} +{#pointer *ClassEnetPacket as ClassEnetPacket#} +{- class ClassEnetServer -} +{#pointer *ClassEnetServer as ClassEnetServer#} +{- class ClassEnet -} +{#pointer *ClassHG3DEnet as ClassEnet#}
HGamer3D/Bindings/Enet/StructHG3DClass.chs view
@@ -1,43 +1,43 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- StructHG3DClass.chs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at -- - -module HGamer3D.Bindings.Enet.StructHG3DClass where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - - -#include "StructHG3DClass.h" +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- StructHG3DClass.chs++-- ++module HGamer3D.Bindings.Enet.StructHG3DClass where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+++#include "StructHG3DClass.h" import Data.Bits import HGamer3D.Data.HG3DClass
HGamer3D/Bindings/Enet/Utils.chs view
@@ -1,43 +1,43 @@-{-# LANGUAGE ForeignFunctionInterface #-} -{-# LANGUAGE TypeSynonymInstances #-} - --- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE TypeSynonymInstances #-}++-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- - --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. ++-- (c) 2011-2014 Peter Althainz -- - - --- Utils.hs - +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at+-- +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +++-- Utils.hs+ -- Marshalling Utilities- -module HGamer3D.Bindings.Enet.Utils where - -import Foreign -import Foreign.Ptr -import Foreign.C - -import HGamer3D.Data.HG3DClass -import HGamer3D.Data.Vector -import HGamer3D.Data.Colour -import HGamer3D.Data.Angle - - -#include "StructHG3DClass.h" ++module HGamer3D.Bindings.Enet.Utils where++import Foreign+import Foreign.Ptr+import Foreign.C++import HGamer3D.Data.HG3DClass+import HGamer3D.Data.Vector+import HGamer3D.Data.Colour+import HGamer3D.Data.Angle+++#include "StructHG3DClass.h" import Control.Monad (liftM)
LICENSE view
@@ -1,13 +1,13 @@-(c) 2011-2014 Peter Althainz - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +(c) 2011-2014 Peter Althainz++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.
Setup.hs view
@@ -1,21 +1,21 @@--- This source file is part of HGamer3D, a project to enable 3D game development --- in Haskell. For the latest info, see http://www.hgamer3d.org . +-- This source file is part of HGamer3D, a project to enable 3D game development +-- in Haskell. For the latest info, see http://www.hgamer3d.org . -- --- (c) 2011-2014 Peter Althainz --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, software --- distributed under the License is distributed on an "AS IS" BASIS, --- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --- See the License for the specific language governing permissions and --- limitations under the License. +-- (c) 2011-2014 Peter Althainz -- --- Setup.hs - -import Distribution.Simple -main = defaultMain +-- Licensed under the Apache License, Version 2.0 (the "License");+-- you may not use this file except in compliance with the License.+-- You may obtain a copy of the License at+-- +-- http://www.apache.org/licenses/LICENSE-2.0+-- +-- Unless required by applicable law or agreed to in writing, software+-- distributed under the License is distributed on an "AS IS" BASIS,+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+-- See the License for the specific language governing permissions and+-- limitations under the License.+-- +-- Setup.hs++import Distribution.Simple+main = defaultMain
include/ClassEnet.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,31 +14,31 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ClassEnet.h -// +// #include "wchar.h" -#ifndef _DEFINED_HG3D_ClassEnet-#define _DEFINED_HG3D_ClassEnet--#include "ClassPtr.h"-#include "ClassEnetServer.h"-#include "ClassEnetClient.h"+#ifndef _DEFINED_HG3D_ClassEnet +#define _DEFINED_HG3D_ClassEnet +#include "ClassPtr.h" +#include "ClassEnetServer.h" +#include "ClassEnetClient.h" -// -void enet_enet_construct(struct hg3dclass_struct * result_c);--// -void enet_enet_destruct(struct hg3dclass_struct * thisclass_c);--// -void enet_enet_createServer(int port_c, struct hg3dclass_struct * result_c);--// -void enet_enet_createClient(struct hg3dclass_struct * result_c);--#endif + +// +void enet_enet_construct(struct hg3dclass_struct * result_c); + +// +void enet_enet_destruct(struct hg3dclass_struct * thisclass_c); + +// +void enet_enet_createServer(int port_c, struct hg3dclass_struct * result_c); + +// +void enet_enet_createClient(struct hg3dclass_struct * result_c); + +#endif
include/ClassEnetClient.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,36 +14,36 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ClassEnetClient.h -// +// #include "wchar.h" -#ifndef _DEFINED_HG3D_ClassEnetClient-#define _DEFINED_HG3D_ClassEnetClient--#include "ClassPtr.h"-#include "ClassEnetPacket.h"+#ifndef _DEFINED_HG3D_ClassEnetClient +#define _DEFINED_HG3D_ClassEnetClient +#include "ClassPtr.h" +#include "ClassEnetPacket.h" -// -void enet_clnt_destruct(struct hg3dclass_struct * thisclass_c);--// -void enet_clnt_connect(struct hg3dclass_struct * thisclass_c, char * server_c, int port_c, int * result_c);--// -void enet_clnt_disconnect(struct hg3dclass_struct * thisclass_c, int * result_c);--// -void enet_clnt_serve(struct hg3dclass_struct * thisclass_c, int msWait_c, int * result_c);--// -void enet_clnt_getPacket(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c);--// -void enet_clnt_send(struct hg3dclass_struct * thisclass_c, char * message_c, int channel_c);--#endif + +// +void enet_clnt_destruct(struct hg3dclass_struct * thisclass_c); + +// +void enet_clnt_connect(struct hg3dclass_struct * thisclass_c, char * server_c, int port_c, int * result_c); + +// +void enet_clnt_disconnect(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void enet_clnt_serve(struct hg3dclass_struct * thisclass_c, int msWait_c, int * result_c); + +// +void enet_clnt_getPacket(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void enet_clnt_send(struct hg3dclass_struct * thisclass_c, char * message_c, int channel_c); + +#endif
include/ClassEnetPacket.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,29 +14,29 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ClassEnetPacket.h -// +// #include "wchar.h" -#ifndef _DEFINED_HG3D_ClassEnetPacket-#define _DEFINED_HG3D_ClassEnetPacket--#include "ClassPtr.h"+#ifndef _DEFINED_HG3D_ClassEnetPacket +#define _DEFINED_HG3D_ClassEnetPacket +#include "ClassPtr.h" -// -void enet_pck_getData(struct hg3dclass_struct * thisclass_c, char * result_c);--// -void enet_pck_getPeer(struct hg3dclass_struct * thisclass_c, char * result_c);--// -void enet_pck_getChannel(struct hg3dclass_struct * thisclass_c, int * result_c);--// -void enet_pck_destruct(struct hg3dclass_struct * thisclass_c);--#endif + +// +void enet_pck_getData(struct hg3dclass_struct * thisclass_c, char * result_c); + +// +void enet_pck_getPeer(struct hg3dclass_struct * thisclass_c, char * result_c); + +// +void enet_pck_getChannel(struct hg3dclass_struct * thisclass_c, int * result_c); + +// +void enet_pck_destruct(struct hg3dclass_struct * thisclass_c); + +#endif
include/ClassEnetServer.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,30 +14,30 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ClassEnetServer.h -// +// #include "wchar.h" -#ifndef _DEFINED_HG3D_ClassEnetServer-#define _DEFINED_HG3D_ClassEnetServer--#include "ClassPtr.h"-#include "ClassEnetPacket.h"+#ifndef _DEFINED_HG3D_ClassEnetServer +#define _DEFINED_HG3D_ClassEnetServer +#include "ClassPtr.h" +#include "ClassEnetPacket.h" -// -void enet_srv_destruct(struct hg3dclass_struct * thisclass_c);--// -void enet_srv_serve(struct hg3dclass_struct * thisclass_c, int msWait_c, int * result_c);--// -void enet_srv_getPacket(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c);--// -void enet_srv_send(struct hg3dclass_struct * thisclass_c, char * peer_c, char * message_c, int channel_c);--#endif + +// +void enet_srv_destruct(struct hg3dclass_struct * thisclass_c); + +// +void enet_srv_serve(struct hg3dclass_struct * thisclass_c, int msWait_c, int * result_c); + +// +void enet_srv_getPacket(struct hg3dclass_struct * thisclass_c, struct hg3dclass_struct * result_c); + +// +void enet_srv_send(struct hg3dclass_struct * thisclass_c, char * peer_c, char * message_c, int channel_c); + +#endif
include/ClassPtr.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,37 +14,37 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // ClassPtr.h -// Here are the methods defined, which do the class pointer-// marshalling and the casting of subclasses to higher classes+// Here are the methods defined, which do the class pointer +// marshalling and the casting of subclasses to higher classes #include "wchar.h" -#ifndef CLASSPTR_INCLUDE_H-#define CLASSPTR_INCLUDE_H--typedef struct hg3dclass_struct {- void *ptr;- void *fptr;-} hg3dclass_struct;--void *getHG3DClassPtr(hg3dclass_struct inSt, const char* className);---typedef void ClassEnetClient; -hg3dclass_struct getHG3DClass_EnetClient(void *ptrIn);--typedef void ClassEnetPacket; -hg3dclass_struct getHG3DClass_EnetPacket(void *ptrIn);--typedef void ClassEnetServer; -hg3dclass_struct getHG3DClass_EnetServer(void *ptrIn);--typedef void ClassHG3DEnet; -hg3dclass_struct getHG3DClass_HG3DEnet(void *ptrIn);--#endif+#ifndef CLASSPTR_INCLUDE_H +#define CLASSPTR_INCLUDE_H + +typedef struct hg3dclass_struct { + void *ptr; + void *fptr; +} hg3dclass_struct; + +void *getHG3DClassPtr(hg3dclass_struct inSt, const char* className); + + +typedef void ClassEnetClient; +hg3dclass_struct getHG3DClass_EnetClient(void *ptrIn); + +typedef void ClassEnetPacket; +hg3dclass_struct getHG3DClass_EnetPacket(void *ptrIn); + +typedef void ClassEnetServer; +hg3dclass_struct getHG3DClass_EnetServer(void *ptrIn); + +typedef void ClassHG3DEnet; +hg3dclass_struct getHG3DClass_HG3DEnet(void *ptrIn); + +#endif
include/EnetDllDefines.h view
@@ -11,15 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // EnetDllDefines.h -#ifndef _HGamer3DEnet040_DLLDEFINES_H_ -#define _HGamer3DEnet040_DLLDEFINES_H_ +#ifndef _HGamer3DEnet050_DLLDEFINES_H_ +#define _HGamer3DEnet050_DLLDEFINES_H_ -/* Cmake will define HGamer3DEnet040_EXPORTS on Windows when it +/* Cmake will define HGamer3DEnet050_EXPORTS on Windows when it configures to build a shared library. If you are going to use another build system on windows or create the visual studio projects by hand you need to define MyLibrary_EXPORTS when @@ -29,13 +29,13 @@ // We are using the Visual Studio Compiler and building Shared libraries #if (defined (_WIN32)) && !(defined (__GNUC__)) - #if defined(HGamer3DEnet040_EXPORTS) + #if defined(HGamer3DEnet050_EXPORTS) #define Enet_LIB_EXPORT __declspec(dllexport) #else #define Enet_LIB_EXPORT __declspec(dllimport) - #endif /* HGamer3DEnet040_EXPORTS */ + #endif /* HGamer3DEnet050_EXPORTS */ #else /* defined (_WIN32) */ #define Enet_LIB_EXPORT #endif -#endif /* _HGamer3DEnet040_DLLDEFINES_H_ */ +#endif /* _HGamer3DEnet050_DLLDEFINES_H_ */
include/StructHG3DClass.h view
@@ -1,6 +1,6 @@ // This source file is part of HGamer3D, a project to enable 3D game development // in Haskell. For the latest info, see http://www.hgamer3d.org . -// +// // (c) 2011-2014 Peter Althainz // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,16 +14,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +// // StructHG3DClass.h -// +// #include "wchar.h" -typedef struct hg3dclass_struct {- void *ptr;- void *fptr;-} hg3dclass_struct;+typedef struct hg3dclass_struct { + void *ptr; + void *fptr; +} hg3dclass_struct;