Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!

Oni Sephiroth

Member Since 07 Mar 2006
Offline Last Active Sep 27 2011 06:13 PM

Posts I've Made

In Topic: Level Loading C++ / DirectX 10

03 January 2011 - 04:43 AM

It depends on your map format. Similarly to how you know how to read in model data, you need to know how to read in the format of your map. You need to know how the file is organized and where everything is located. For example, I use a custom format in my engine where the header contains the map's background music and tileset. If someone wants to write a reader for my map, they need to know what that header looks like.

In Topic: C++ Linked List?

03 January 2011 - 04:36 AM

You have the concept right. You basically have two classes, your node class and your linkedList class. The node class contains your data as well as a pointer to a node object, which is the next node in the list. The linked list class has 3 node pointers, a firstNode, a lastNode and a currentNode. The firstNode is the first node in the list, or the head. lastNode is the last node in the list, or the tail. currentNode is used to iterate through the list by grabbing the memory addresses of each subsequent node.

The reason you only need three nodes and not one for each piece of data is because each node exists within its previous node. So if you have 5 nodes, you have your head, which contains a pointer to the second node, which contains a pointer to the 3rd, which contains a pointer to the 4th, which contains a pointer to the 5th (the tail).

In Topic: GetKeyState() problem

01 October 2010 - 04:49 AM

Wouldn't the for loop cover all of those though? I've tried casting the _key variable to a char as well and that didn't do me any good either.

In Topic: GetKeyState() problem

01 October 2010 - 04:43 AM

I threw a breakpoint in where I'm actually checking the state of the key. It doesn't break when I press a letter key, but it does for others. I'll look into GetKeyboardState()

In Topic: Keyboard input help (C++)

04 September 2010 - 06:58 AM

As far as keycodes go, is it a problem that I'm using ASCII values?