The website of Lei Chen

Sunshine and rain of a developer

Emacs Function Key Binding in GNU Screen with input-decode-map

Posted by hide1713 on July 4, 2011

Problem:

When you run Emacs in text mode or in a GNU screen, some of the function key bindings are not working.  For example. <S-f4> will just print “;2S” on the screen instead of running command that binds to Shift f4.  Some of the key binding such as Ctrl-arrow/Meta-arrow keys can be mapped correctly by setting the term info to xterm256, etc. However, a general solution is available to map any key code to where it should be.

Solution:

According to the manual, you can define keys in input-decode-map

http://www.gnu.org/software/emacs/manual/html_node/viper/Key-Bindings.html

Don’t copy the code. You need to type it in your .emacs file.

(define-key input-decode-map  "^[O1;2S" (kbd "<S-f4>")) ; bind shift-f4
(define-key input-decode-map  "^[O1;5S" (kbd "<C-f4>")) ; bind ctrl-f4
(global-set-key (kbd "<C-f4>") 'previous-line)
(global-set-key (kbd "<S-f4>") 'next-line)

To get the key code for S-f4, press C-q and S-f4. You will see something like ^[O1;2S pops out in your emacs buffer. Bind the key code to the key name and you can use it anywhere now.

Posted in Emacs | Leave a Comment »

How to save GNU screen scroll buffer

Posted by hide1713 on February 27, 2011

If you use gnu screen, I am sure this tip will be useful someday. If you ran some programs for hours and want to dump the whole scroll buffer to a file. Here’s how:

Ctrl-a :hardcopy -h dump_file.

Note: the dump_file might have many empty line at the beginning, you might need to scroll down a little bit to see the content.

Do NOT use the Ctrl-a [ copy buffer for super big block, screen might die!

From screen user manual:

18.1 hardcopy

— Command: hardcopy [-h] [file]

(C-a h, C-a C-h)
Writes out the currently displayed image to the file file, or, if no filename is specified, to hardcopy.n in the default directory, where n is the number of the current window. This either appends or overwrites the file if it exists, as determined by the hardcopy_append command. If the option -h is specified, dump also the contents of the scrollback buffer.

Posted in Uncategorized | Leave a Comment »

100 Things To Do Before Leo Die

Posted by hide1713 on May 8, 2010

  1. Skydive
  2. 100% test coverage for a middle size project
  3. complete a project with TDD
  4. visit the tomb of Alan Turing
  5. swim with sharks
  6. become a pilot
  7. lead a great project that has huge impact
  8. write my operating system
  9. write my device driver
  10. attend a public film audition
  11. write a book
  12. get a bs degree in computer science
  13. get a ms degree in computer science
  14. design a commercial game and make money from it
  15. write a patch for python lib
  16. speak in a major conference
  17. be in a daft punk live show
  18. be in a justice live show
  19. visit wolfenstein
  20. live in jail for few weeks
  21. contribute to ubuntu community
  22. contribute to kernel community
  23. meet a lovely girl and fall in love with her
  24. study statistics
  25. study DJ software
  26. create another human
  27. teach my kids programming
  28. get a mustang or 370z
  29. get a Audi R8 or same class car
  30. get a small plane
  31. drive my car in Nürburgring
  32. get married
  33. somebody ask me for autograph
  34. build my Linux distribution
  35. work in a project that could affect millions people’s life
  36. invent something and apply for patent
  37. build an elementary somewhere in China
  38. improve gmail
  39. work in a game company
  40. become the vice president of a major company
  41. visit Las Vagas
  42. get drunk, for real
  43. meet Larry Page when he is still alive
  44. visit Hide’s museum in Japan
  45. become a mentor and guide some students
  46. make a documentary film
  47. draw many elephants
  48. play computer game with my kids
  49. fire guns
  50. develop a software for mobile device
  51. attend cooking school
  52. on a TV show or news
  53. 200 miles per hour on the ground
  54. 20000 meters from earth
  55. win a chess game against another good player
  56. build a personal website
  57. draw animal cartoons
  58. still life painting
  59. fight for justice
  60. create Wikipedia pages
  61. start up a company
  62. work in a restaurant and learn how to run a restaurant
  63. own a Bar
  64. survive a deadly disease or accident
  65. find true love
  66. donate blood
  67. climb a huge snow mountain
  68. act in a film
  69. visit NASA
  70. kill pigs
  71. get some really decent clothing
  72. sleep for a whole day
  73. finish a very difficult rock climbing track
  74. translate a book
  75. over 1000 friends on facebook
  76. get tased by a police officer
  77. double my income in 3 years
  78. triple my income in 5 years
  79. own a nice house
  80. live in a ghetto
  81. crack a software
  82. hack a website and get root privilege
  83. no spelling error in a long mail
  84. find a information collection system that fits me best
  85. find a time management system that fits me best
  86. work extremely efficient for a day
  87. keep writing code for 24 hours
  88. learn to play a music instrument
  89. work in the same company for 5 years
  90. take a one-year vacation
  91. teach my grad child programming
  92. draw a naked woman
  93. fly in a balloon
  94. beg on street
  95. find a remote place without using GPS
  96. convert somebody to atheist
  97. convince some girls that astrology is not for real
  98. play soccer in an amateur league
  99. dance in a dance club
  100. build a nice system for blood simulation and human organs simulation

Posted in Uncategorized | Leave a Comment »

CPU Instruction Speed Benchmark (1999 – 2010)

Posted by hide1713 on February 23, 2010

I’ve been reading the Programming Pearls for the last few weeks. It is a very interesting and inspirational book. In the appendix, I found a small C speed benchmark program. I changed the source code (casting the pointer to right type) so that it runs on my 64 bit system. The test results is surprising but very logical. Modern CPU runs much faster on division and mod operation. Overall, my 2.8G Core 2 Due takes 13 seconds to terminate while the 1999 PII CPU takes 513 seconds.

Testing result on a 2.8Ghz Intel Core 2 Duo CPU (Date: Feb 23 2010)

C Time Cost Model, n=5000
Integer Arithmetic (n=5000)                         nanosecond per instruction
 {}                     66372 66265 66226 66217 66212       3
 k++                    61226 61101 61105 61089 61112       2
 k = i + j              66915 66618 66593 66589 66378       3
 k = i - j              66905 66215 66413 66270 67377       3
 k = i * j              66908 66768 66696 66800 66713       3
 k = i / j              84009 83901 83915 83896 83916       3 division and mod operation cost the same amount of time as addition and subtraction!
 k = i % j              87329 87328 87340 87317 87335       3
 k = i & j              66861 66588 66563 66471 66507       3
 k = i | j              67665 67547 67562 67493 67586       3
Floating Point Arithmetic (n=5000)
 fj=j;                  61255 61130 61096 61151 61094       2
 fj=j; fk = fi + fj;   107793107778107782107780107777       4
 fj=j; fk = fi - fj;   107816107781107784107822107783       4
 fj=j; fk = fi * fj;   116801116769116760116763116767       5
 fj=j; fk = fi / fj;   197412197467197431197405197428       8
Array Operations (n=5000)
 k = i + j              68272 68202 68198 68208 68196       3
 k = x[i] + j           61465 61294 61280 61305 61280       2
 k = i + x[j]           62285 62135 62112 62137 62108       2
 k = x[i] + x[j]        67986 67857 67861 67854 67871       3
Comparisons (n=5000)
 if (i < j) k++         67828 67620 67623 67623 67608       3
 if (x[i] < x[j]) k++   68377 68288 68286 68280 68276       3
Array Comparisons and Swaps (n=5000)
 k = (x[i]<x[k]) ? -1:1 80980 80932 80932 80928 80931       3
 k = intcmp(x+i, x+j)  142630142660142621142593142599       6
 swapmac(i, j)         108802108758108734108766108734       4
 swapfunc(i, j)        189412189421189412189460189490       8
Max Function, Macro and Inline (n=5000)
 k = (i > j) ? i : j    75729 75485 75551 75480 75543       3
 k = maxmac(i, j)       75842 75592 75522 75535 75518       3
 k = maxfunc(i, j)     143934143780143783143748143777       6
Math Functions (n=1000)
 fk = j+fi;              2733  2736  2739  2734  2734       3
 k = rand();            12512 12529 12557 12476 12485      13
 fk = sqrt(j+fi)        11497 11496 11506 11503 11500      12
 fk = sin(j+fi)         46135 46116 46092 46128 46106      46
 fk = sinh(j+fi)        11829 11819 11824 11837 11832      12
 fk = asin(j+fi)         6392  6387  6390  6386  6387       6
 fk = cos(j+fi)         46199 46183 46177 46174 46179      46
 fk = tan(j+fi)         55542 55496 55507 55488 55501      56
Memory Allocation (n=500)
 free(malloc(16));      13106 13017 12932 12779 12959      52
 free(malloc(100));     12972 12947 12867 13016 12923      52
 free(malloc(2000));    11653 11683 11536 11673 11620      47
 Secs: 13.33

Testing result of a PII CPU in 1999
C Time Cost Model, n=5000
Integer Arithmetic (n=5000)
{}                      1263  1313  1263  1263  1263       5
k++                     2011  2011  2010  2011  2011       8
k = i + j               2260  2260  2260  2260  2260       9
k = i - j               2244  2260  2259  2260  2260       9
k = i * j               4023  4005  4023  4022  4023      16
k = i / j              13814 13814 13980 13914 14163      56
k = i % j              13814 13814 13814 13797 13797      55
k = i & j               2260  2277  2260  2260  2260       9
k = i | j               2260  2260  2260  2260  2260       9
Floating Point Arithmetic (n=5000)
fj=j;                   5019  5003  5021  4970  5036      20
fj=j; fk = fi + fj;     5021  5019  5019  5021  5019      20
fj=j; fk = fi - fj;     5019  5021  5036  5019  5021      20
fj=j; fk = fi * fj;     5036  5021  5019  5019  5038      20
fj=j; fk = fi / fj;    12549 12551 12551 12551 12567      50
Array Operations (n=5000)
k = i + j               2260  2260  2260  2260  2260       9
k = x[i] + j            2808  2810  2775  2808  2810      11
k = i + x[j]            2908  3341  2893  2875  2860      12
k = x[i] + x[j]         3490  3507  3490  3490  3490      14
Comparisons (n=5000)
if (i < j) k++          2393  2393  2377  2393  2393      10
if (x[i] < x[j]) k++    2926  2924  2926  2908  2926      12
Array Comparisons and Swaps (n=5000)
k = (x[i]<x[k]) ? -1:1  3042  3057  3059  3059  3057      12
k = intcmp(x+i, x+j)    7015  7015  7015  7015  7016      28
swapmac(i, j)          15077 15110 15077 15110 15094      60
swapfunc(i, j)          8477  8479  8477  8494  8495      34
Max Function, Macro and Inline (n=5000)
k = (i > j) ? i : j     2509  2509  2509  2526  2511      10
k = maxmac(i, j)        2509  2509  2526  2509  2509      10
k = maxfunc(i, j)       5536  5519  5536  5519  5534      22
Math Functions (n=1000)
fk = j+fi;               151   149   166   166   149      16
k = rand();              715   680   698   682   697      69
fk = sqrt(j+fi)         2360  2343  2360  2343  2343     235
fk = sin(j+fi)          2743  2742  2742  2743  2758     275
fk = sinh(j+fi)         9209  9226  9226  9242  9226     923
fk = asin(j+fi)         7747  7730  7728  7714  7714     773
fk = cos(j+fi)          2758  2758  2760  2758  2760     276
fk = tan(j+fi)          3256  3258  3258  3258  3258     326
Memory Allocation (n=500)
free(malloc(16));       1113  1113  1113  1113  1097     444
free(malloc(100));      1296  1296  1296  1296  1296     519
free(malloc(2000));     1296  1279  1298  1279  1296     516
Secs: 513.37

Posted in Uncategorized | Leave a Comment »

Ubuntu 9.10 Headphone Jack Troubleshooting on Gateway laptop

Posted by hide1713 on January 31, 2010

I am using a Gateway M6862 laptop and the sound card worked pretty well under Ubuntu 8.04. However, after I installed a Ubuntu 9.10, the front headphone jack stop working. After troubleshooting for a while.  The solution is quite simple.

Append the following line at the end of /etc/modprobe.d/alsa-base.conf

options snd-hda-intel model=eapd probe_mask=1 position_fix=1

The reason is quite simple. The latest ALSA driver update introduced new bugs. The consequence is that the drive can not correctly detect your sound card chip. Therefore, we have to tell the driver from modprobe.

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

lspci -v

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
Subsystem: Gateway 2000 Device 0562
Flags: bus master, fast devsel, latency 0, IRQ 22
Memory at f3300000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel

Posted in Ubuntu | 9 Comments »

Python Decorator By Example

Posted by hide1713 on January 10, 2010

Here are three simple python decorator examples. A function decorator without argument, a function decorator with one argument and a decorator encapsulated in a class. Further usage of python decorator can be found in Charming Python: Decorators make magic easy


def test_decorator(func):
    def decorator():
        print "Say hi before execute func"
        func()
        print "Say good bye"
    return decorator

@test_decorator
def test_func():
    print "In test_func"

def test_decorator_with_argument(func):
    def decorator(args):
        print "Before"
        func(args)
        print "After"
    return decorator

@test_decorator_with_argument
def test_func_with_argument(name):
    print "My name is ",name

class DecoratorClass(object):
    def __init__(self,func):
        self.func = func
    def __call__(self):
        print "Extra code"
        self.func()
        print "Extra code after"

@DecoratorClass
def test_decorator_class():
    print "Decorated by a class"

test_func()
test_func_with_argument("leo")
test_decorator_class()

Output:
Say hi before execute func
In test_func
Say good bye
Before
My name is  leo
After
Extra code
Decorated by a class
Extra code after

Posted in Python | Leave a Comment »

Python Scope Horror

Posted by hide1713 on November 20, 2009

In [71]: m=10

In [72]: i=[3,4]

In [73]: j=[m for m in i]

In [74]: j
Out[74]: [3, 4]

In [75]: m
Out[75]: 4
Notice that the value of m changed from 10 to 4 and it’s not my intention.!!

When you write [x for x in y], make sure x is unused!!!

Posted in Python | Leave a Comment »

Ubuntu 9.10 Dual Screen Resolution Problme[Solved]

Posted by hide1713 on November 8, 2009

I just installed Ubuntu 9.10 yesterday. The only problem is that 9.10 fail to detect my dual monitors; therefore, the resolution of my two monitors were set to 1024*768 by default. I spent one day to complete solve this problem. My graphic card is a ATI one. You may skip this page if your graphic card is not ATI. Here’s how.

1. Download ATI driver from Ubuntu Hardware Driver setting. Run the following command.

sudo amdcccle

2. Set correct resolution for both screen. (1280*800 and 1600*1200 for me). It was weird at the beginning, because ATI control center only allowed me to set my second monitor to 1280*800. I solved this problem by unplugging the monitor and reboot my box(Maybe).

3. (Optional) Revert the screen location. My second monitor is on my right hand side. I tried to set the screen position in AIT control center. But the control center always crash after I apply the change. I have no option but changing xorg.conf manually.

Section “Monitor”
Identifier   “0-LCD”
Option      “VendorName” “ATI Proprietary Driver”
Option      “ModelName” “Generic Autodetecting Monitor”
Option      “DPMS” “true”
Option      “PreferredMode” “1280×800″
Option      “TargetRefresh” “60″
Option      “Position” “0 0″
Option      “Rotate” “normal”
Option      “Disable” “false”
EndSection

Section “Monitor”
Identifier   “0-CRT1″
Option      “VendorName” “ATI Proprietary Driver”
Option      “ModelName” “Generic Autodetecting Monitor”
Option      “DPMS” “true”
Option      “PreferredMode” “1600×1200″
Option      “TargetRefresh” “60″
Option      “Position” “1280 0″
Option      “Rotate” “normal”
Option      “Disable” “false”
EndSection

The position option indicates the start point of a screen.

All Done!

 

 

 

Posted in Ubuntu | Leave a Comment »

Gamebryo Frame Rendering System Reading Notes

Posted by hide1713 on October 21, 2009

Let’s look into Gamebryo frame rendering system. The documentation is located in:

Gamebryo Document->Programmer Level-> Core Runtime -> Frame Rendering System

The propose of the frame rendering system is to make rendering code portable.  Applications that use the frame rendering system do all their configuration work up front. The complex effects can be performed automatically at render time.

Render Frame(NiRenderFrame) represents an entire rendering process. It must be set up during initialization and displayed each frame. It has many render steps and iterates through the rend steps telling them to hook callback function to a frame.

Render Step(NiRenderStep) is a single rendering effect. It does the actual rendering work. It can be turned on/off to control the final effect. One Rend Step usually performs one or more rendering passes via render click objects.

Render Click(NiClickRenderStep) is a complete rendering pass. It can be easily enabled or disabled by 1) application in every frame 2) a render click validator according to some criteria. 3) pre/post callback function.

Render View(NiRenderView) objects provide a certain type of render click with an array of geometry to render. They can do this by culling a scene graph against a camera or by using some other algorithm to determine which geometry objects need to be rendered.

Render List Processor(NiRenderListProcessor) ,During rendering, the processor is passed an array of geometry objects that need to be rendered and passes back an array of objects that still need to be rendered. By controlling that output array, the render list processor can modify the geometry array, such as rendering some geometry objects immediately and deferring rendering of a sorted list for later.

Posted in GameBryo | Leave a Comment »

GameBryo Asset Service and Actionmap

Posted by hide1713 on October 15, 2009

GameBryo Asset Service provides an easy way to access game data. For all the assets( Entity models, logic scripts,images etc), the asset service assigns a unique name to each of them.  The unique id is called Uniform Resource Identifier (URI) that is prefixed by the string “urn:”, followed by one or more specifiers.

Examples:

  • urn:gamebryo-scenegraph:Precache—All assets that are tagged with both “gamebryo-scenegraph” and “Precache”, which might be used to identify every asset that should be pre-loaded during application startup.
  • urn:emergent-world:Level1—An asset that is tagged with “emergent-world” and has the name of “Level1″, which might be used to load all the entities needed in the first level of a game.
  • urn:llid:0716a14d-81ca-46f2-9e7e-7dc30ff2c561:Wii—A logical asset with the indicated unique ID and also tagged “Wii”, which might be used to load the Wii variation of an asset selected with an asset-picker in a tool.

Assets in Hello World Demo:

In the hello world example, the HelloWorldService::SetupInputActions() function uses “urn:gamebryo-actionmap:HelloWorldActionMap” to load a key-action map. It maps the “m” key to HELLOWROLD_ACTION_DROP event and “n” key to HELLOWORLD_ACTION_PICKUP event. The  actionmap file is located in \Gamebryo\Media\Samples\GameFramework\HelloWorld\HelloWroldActionMap.actionmap.

Also, in ConfigCommon.ini file, the initial world is specified by

[Game]
InitialWorld = urn:emergent-world:HelloWorld

The question is how does gamebryo map URN  to  file. This question is very important because you must understand the asset service in order to use assets.

Let’s take a close look on HelloWrold cpp project.

In Config.ini file, we have an attribute

[AssetWeb.Win32]
Path=$(SourceBaseDir)/../../../Media

This attribute specifies the root directory for Asset directory. The config manager service will load this attribute in run time. On my computer, the AssetWeb root folder is F:\Gamebryo\Media. There are three files in Media/asset-web-config directory which define the asset web.

The LogicalIdTagger.ini defines some logical tags:

; The Assets are a list of asset types (assigned by the MimeTagger) that should have logical
; asset id’s assigned to them. If the asset does not possess one of these tags, then no logical
; asset id is created for it.  Logical asset id’s are only needed for assets that will be referenced
; by other asset files, like block or model files.
[LogicalIdTagger.Assets]
=gamebryo-scenegraph
=gamebryo-animation
=gamebryo-terrain
=gamebryo-terrain-materialpkg
=physx-terrain
=gamebryo-actionmap
=wwise-sound-bank
=bmp-image

In MimeTagger.ini, for each file extension, a pair of tags is created from the associated MIME  type.  For example, “py=script/python-behavior” will result in every file
with the “.py” extension having two tag values – “script” and “python- behavior”.

xblock=x-world/emergent-world

kf=application/gamebryo-sequence-file
actionmap=application/gamebryo-actionmap
bnk=audio/wwise-sound-bank

Therefore, HelloWorldActionMap.actionmap file is named as “urn:gamebryo-actionmap:HelloWorldActionMap” and the HelloWrold.xblock is named as “urn:emergent-world:HelloWorld”.  The path of those files are irrlevent to urn.  The asset service searches all the sub directories under AssetWeb root and classifies files accordingly.

Key Actionmap

The Hello World example demonstrates two ways of handling key event.

1. Register a key handler function and switch the logic according to key code.


EE_HANDLER(HelloWorldService, HandleKeyDownMessage, KeyDownMessage); // Register handler

void HelloWorldService::HandleKeyUpMessage(const KeyUpMessage *pMessage,
 efd::Category targetChannel)
{
 Entity* pAvatar = GetAvatar();
 if (pAvatar)
 {
 switch (pMessage->GetKey()) // Switch key code
 {
 case NiInputKeyboard::KEY_UP:
 pAvatar->SetPropertyValue("IsMoving", false);
 break;

 case NiInputKeyboard::KEY_LEFT:
 pAvatar->SetPropertyValue("IsTurningLeft", false);
 break;

...

2. Use a data-driven actionmap to bind keys to events. Currently, there’s no tool to help you generate actionmap  file; therefore, you need to edit the file by hand. Please read the The ecrInput Library documentation for detail.


HelloWorldActionMap.actionmap
...
 <Event EventName="HELLOWORLD_ACTION_DROP" EventCategory="0xC000000007765433" EventFlags="RETURN_MAGNITUDE">
 <ActionsList>
 <!--Flags - InputService.h ActionFlags enum - use individual string values or combined bitmask as an int-->
 <!--DeviceID - a way to define action for specific controllers-->
 <!--Modifiers - NiInputKeyboard Modifiers enum-->
 <!--ActionClsID - (ACTION/DPAD/STICK)-->
 <!--Semantic - NiAction.h Semantic enum for gpad string values GP_BUTTON_LUP or NiInputKeyboard.h for key value strings KEY_M, etc-->
 <Action Flags="ON_ACTIVATE" DeviceID="0" Modifiers="0" ActionClsID="ACTION" Semantic="KEY_M"MinRange="-1.000000" MaxRange="1.000000" />
 <Action Flags="ON_ACTIVATE" DeviceID="0" Modifiers="0" ActionClsID="ACTION" Semantic="GP_BUTTON_RDOWN" MinRange="-1.000000" MaxRange="1.000000" />
 </ActionsList>
 </Event>
 <!--0xC000000007765432-->
 <!--13835058055407359026-->
 <Event EventName="HELLOWORLD_ACTION_PICKUP" EventCategory="0xC000000007765432" EventFlags="RETURN_MAGNITUDE">
 <ActionsList>
 <Action Flags="ON_ACTIVATE" DeviceID="0" Modifiers="0" ActionClsID="ACTION" Semantic="KEY_N" MinRange="-1.000000" MaxRange="1.000000" />
 <Action Flags="ON_ACTIVATE" DeviceID="0" Modifiers="0" ActionClsID="ACTION" Semantic="GP_BUTTON_RRIGHT" MinRange="-1.000000" MaxRange="1.000000" />

After you create the actionmap, you can create an action message handler.


// Define the message categories for the actions
static const efd::Category kCAT_STANDALONE_ACTION_PICKUP =
 Category( efd::UniversalID::ECU_Any, 0, 0x07765432 );

static const efd::Category kCAT_STANDALONE_ACTION_DROP =
 Category( efd::UniversalID::ECU_Any, 0, 0x07765433 );

...

void HelloWorldService::HandleActionMessage(const InputActionMessage* pMsg,
 efd::Category targetChannel)
{
 Entity* pAvatar = GetAvatar();

 switch(pMsg->GetClassID())
 {
 case efd::kMSGID_CoreInputAction:
 if (pAvatar)
 {
 if(targetChannel == kCAT_STANDALONE_ACTION_PICKUP)
 {
 pAvatar->SendEvent(pAvatar->GetEntityID(), "Jack", "PickupEntity");
 }
 else if(targetChannel == kCAT_STANDALONE_ACTION_DROP)
 {
 pAvatar->SendEvent(pAvatar->GetEntityID(), "Jack", "DropEntity");
 }
 }
 break;
 }

}

Reference:

Gamebryo Documentation: Programmer Level->Foundation->Asset Runtime Service

Gamebryo Documentation: The ecrInput Library

HelloWorld example project

Posted in GameBryo | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.