Giter Site home page Giter Site logo

kvakvs / hge Goto Github PK

View Code? Open in Web Editor NEW
262.0 17.0 75.0 22.04 MB

HGE 1.9 configured with CMake DirectX9 version, with shaders. The classic 1.8.1. version is in the `master` branch if you ever need that.

Home Page: http://kvakvs.github.io/hge

License: Other

C 32.63% C++ 7.37% Fortran 0.03% Shell 0.13% Ada 1.25% Assembly 1.94% Pascal 0.86% C# 0.76% CLIPS 0.10% CMake 53.68% Batchfile 0.02% Makefile 0.30% SAS 0.03% DIGITAL Command Language 0.35% HTML 0.42% Module Management System 0.02% Perl 0.05% Roff 0.06% Cuda 0.01% Objective-C 0.01%
directx game-engine game-development 2d-game-engine 2d-rendering-engine cmake hge-library hge

hge's Introduction

Change notes for 1.9

  • Multiple API calls changed some types from char* to const char*, also blending mode is now using hgeBlendMode enum - use type cast like so: spt->SetBlendMode((hgeBlendMode)(BLEND_COLORMUL | BLEND_ALPHAADD | BLEND_NOZWRITE));
  • uint32_t color argument in many functions and classes is now a simple wrapper class hgeColor32. To give default clear/draw color, you can use hgeColor32::WHITE() and BLACK() constexpr functions or create your colors.
  • Multiple improvements to memory safety (strings and vectors where char * has a risk of overflow), modernising the source (smart pointers, etc), and type safety (replacing generic pointers and ints with structs and enums).

Support & Questions

Documentation and more info http://kvakvs.github.io/hge

Example game can be found here https://github.com/kvakvs/hge_skel

For those times when you absolutely need help, there is the Discord channel: https://discord.gg/TdjamHt

ANNOUNCEMENT

DirectX8 support has ended. There will be no assistance with DirectX8 issues, DirectX8 code will be gradually removed. Please use DirectX9.

INSTALLING

This package is configured with CMakeLists.txt for use with CMake. Once ran, CMake generates project files for one of known IDE's for Windows (as well as Linux/Unix/MacOSX but this version of HGE only builds on Windows).

  1. Edit CMakeLists.txt in root folder, set "DIRECTX_SDK_DIR" to where you have DirectX 9 SDK (see that it comes from microsoft.com, tagged year ~2010, size ~550 MB).
  2. Run cmake_studioNNNN.bat (NOTE: you can create own bat file if CMake supports your IDE).
  3. Project directory will be created in _build, open project file (.SLN solution file) with your IDE and click "BUILD" in your IDE.
  4. Resulting library HGE.DLL and HGE.LIB will be placed in bin directory, all intermediate libraries will be placed in /linklib. There is also HGE-STATIC library which doesn't require DLL to run, it can be found in linklib.
  5. All temporary build files will stay inside _build/. To clean intermediate files one should delete linklib, bin and _build

IMPORTANT

  1. If you got a 64bit project by mistake, add "-A Win32" to CMake command line. See example in cmake_studio2019.bat
  2. If you are going to change any build options, please keep in mind, that this is CMake generated project, editing anything inside _build folder will be overwritten next time, when you compile HGE project. If you need to add any compiler options, please edit main or each CMakeLists.txt in HGE181 and src/* folders (depending how big your changes are).
  3. if you link against HGE library, you only need to mention HGE.LIB in project settings, and have HGE.DLL in your program folder. HGEHELPERS is not needed (its linked internally).
  4. if you link against HGE-STATIC flavour of library, you don't need HGE.DLL anymore, all functionality will be included in your application. You need to mention HGEHELPERS, ZLIB and HGELIBPNG in linker settings of your project for this to work (as well as D3D8.lib D3DX8.lib or 9 if you are using DirectX9 and WINMM.lib). Consult project settings of 'hge' project regarding Linker input.

hge's People

Contributors

ezamyatin avatar kvakvs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hge's Issues

runtime check failure

I need to explicitly set
#define HGE_DIRECTX_VER 9
in order for hge to not give me this error:

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention

at function call Texture_load (line 119 in tutorial2.cpp)

stdint.h

File stdint.h is not included by Microsoft in VS by default. Only version of VS that include this file is VS 2010.

fonted crash

After launched, it keeps in blackscreen for seconds, then self-closed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.