Changeset 1396


Ignore:
Timestamp:
May 15, 2012, 2:24:22 PM (9 years ago)
Author:
sam
Message:

orbital: start working on the gun system.

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/orbital/Makefile.am

    r1386 r1396  
    44orbital_SOURCES = \
    55    orbital.cpp orbital.h mesh.h particlesystem.h tank.h player.h \
    6     snake.h starfield.h
     6    gun.h snake.h starfield.h
    77nodist_orbital_SOURCES = \
    88    shiny.lolfx.cpp
  • trunk/orbital/orbital.cpp

    r1379 r1396  
    239239int main(int argc, char **argv)
    240240{
    241     Application app("Orbital", ivec2(800, 600), 60.0f);
     241    Application app("Orbital", ivec2(1280, 720), 60.0f);
     242    //Application app("Orbital", ivec2(800, 600), 60.0f);
    242243
    243244#if defined _MSC_VER && !defined _XBOX
  • trunk/orbital/orbital.h

    r1367 r1396  
    1010#include "mesh.h"
    1111#include "particlesystem.h"
     12#include "gun.h"
    1213#include "starfield.h"
    1314#include "tank.h"
  • trunk/orbital/snake.h

    r1391 r1396  
    1515    Snake(int nodes)
    1616      : m_steer(0.f),
     17        m_stick(0),
    1718        m_ready(false)
    1819    {
     
    4647    ~Snake()
    4748    {
     49        if (m_stick)
     50            Input::UntrackStick(m_stick);
    4851    }
    4952
     
    6871
    6972        /* Destruction test */
    70         if (m_nodes.Count() >= 3 && m_steer > 30
    71              && (int)m_steer / 6 != (int)(m_steer - 2.f * seconds) / 6)
     73        if (!m_stick)
     74            m_stick = Input::TrackStick();
     75        if (m_stick && m_stick->GetButtonCount() >= 4
     76             && m_stick->GetButton(12)
     77             && (int)m_steer != (int)(m_steer - 2.f * seconds))
    7278        {
    7379            int tohit = (int)RandF(m_nodes.Count() - 2);
     
    167173    /* List of nodes (position, self-rotation angle, life, damage) */
    168174    Array<vec3, float, float, float> m_nodes;
     175    /* Test */
     176    Stick *m_stick;
    169177    bool m_ready;
    170178};
  • trunk/win32/orbital.vcxproj

    r1386 r1396  
    2929  <ItemGroup>
    3030    <ClInclude Include="..\orbital\CommandParser.h" />
     31    <ClInclude Include="..\orbital\gun.h" />
    3132    <ClInclude Include="..\orbital\mesh.h" />
    3233    <ClInclude Include="..\orbital\orbital.h" />
  • trunk/win32/orbital.vcxproj.filters

    r1380 r1396  
    22<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <ItemGroup>
     4    <ClInclude Include="..\orbital\gun.h" />
    45    <ClInclude Include="..\orbital\mesh.h" />
    56    <ClInclude Include="..\orbital\CommandParser.h" />
Note: See TracChangeset for help on using the changeset viewer.