Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7520 → Rev 7521

/programs/cmm/lib/array.h
1,5 → 1,7
// Author: Pavel Iakovlev by. pavelyakov
 
#ifndef INCLUDE_ARRAY_H
#define INCLUDE_ARRAY_H
 
// Array memory: [dword key][byte flags][dword left][dword right][dword value] -> 17 bytes = 1 position
// If key don't exists then value == 0
161,4 → 163,6
:byte Dictionary::init(dword size)
{
RETURN array.init(size);
}
}
 
#endif
/programs/cmm/lib/events.h
0,0 → 1,46
 
#ifndef INCLUDE_ARRAY_H
#include "../lib/array.h"
#endif
 
#define ECTRL 300
 
struct EVENTS
{
Array array;
int new_id;
void init();
int add();
int add_n();
bool press();
};
 
void EVENTS::init(dword size)
{
array.init(size);
new_id = 900;
}
 
int EVENTS::add(dword event1)
{
new_id++;
array.set(new_id, event1);
return new_id;
}
 
int EVENTS::add_n(dword id, event2)
{
array.set(id, event2);
return new_id;
}
 
bool EVENTS::press(dword id)
{
dword event3;
if (array.get(id)) {
event3 = array.get(id);
event3();
return true;
}
return false;
}
/programs/cmm/lib/keyboard.h
71,6 → 71,7
#define SCAN_CODE_KEY_N 049
#define SCAN_CODE_KEY_O 024
#define SCAN_CODE_KEY_P 025
#define SCAN_CODE_KEY_Q 016
#define SCAN_CODE_KEY_R 019
#define SCAN_CODE_KEY_S 031
#define SCAN_CODE_KEY_T 020