Making a Head-to-Head Online Game January 07, 2009 12:36AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 07, 2009 12:39AM | Registered: 16 years ago Posts: 26 |
Re: Making a Head-to-Head Online Game January 07, 2009 12:45AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 07, 2009 12:48AM | Registered: 16 years ago Posts: 26 |
Re: Making a Head-to-Head Online Game January 07, 2009 12:52AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 07, 2009 12:53AM | Registered: 16 years ago Posts: 26 |
Re: Making a Head-to-Head Online Game January 07, 2009 08:41AM | Registered: 16 years ago Posts: 443 |
Re: Making a Head-to-Head Online Game January 08, 2009 01:57AM | Registered: 16 years ago Posts: 703 |
Re: Making a Head-to-Head Online Game January 08, 2009 02:49AM | Registered: 16 years ago Posts: 21 |
Re: Making a Head-to-Head Online Game January 08, 2009 10:10AM | Registered: 16 years ago Posts: 48 |
Re: Making a Head-to-Head Online Game January 08, 2009 06:26PM | Admin Registered: 16 years ago Posts: 5,132 |
u32 inet_addr(const char *cp); s8 inet_aton(const char *cp, struct in_addr *addr); char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */ s32 if_config( char *local_ip, char *netmask, char *gateway,boolean use_dhcp); s32 if_configex(struct in_addr *local_ip,struct in_addr *netmask,struct in_addr *gateway,boolean use_dhcp); s32 net_init(); s32 net_socket(u32 domain,u32 type,u32 protocol); s32 net_bind(s32 s,struct sockaddr *name,socklen_t namelen); s32 net_listen(s32 s,u32 backlog); s32 net_accept(s32 s,struct sockaddr *addr,socklen_t *addrlen); s32 net_connect(s32 s,struct sockaddr *,socklen_t); s32 net_write(s32 s,const void *data,s32 size); s32 net_send(s32 s,const void *data,s32 size,u32 flags); s32 net_sendto(s32 s,const void *data,s32 len,u32 flags,struct sockaddr *to,socklen_t tolen); s32 net_recv(s32 s,void *mem,s32 len,u32 flags); s32 net_recvfrom(s32 s,void *mem,s32 len,u32 flags,struct sockaddr *from,socklen_t *fromlen); s32 net_read(s32 s,void *mem,s32 len); s32 net_close(s32 s); s32 net_select(s32 maxfdp1,fd_set *readset,fd_set *writeset,fd_set *exceptset,struct timeval *timeout); s32 net_setsockopt(s32 s,u32 level,u32 optname,const void *optval,socklen_t optlen); s32 net_ioctl(s32 s, u32 cmd, void *argp); s32 net_fcntl(s32 s, u32 cmd, u32 flags); s32 net_shutdown(s32 s, u32 how); struct hostent * net_gethostbyname(char *addrString);
Re: Making a Head-to-Head Online Game January 08, 2009 06:49PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 08, 2009 07:59PM | Registered: 16 years ago Posts: 703 |
Re: Making a Head-to-Head Online Game January 08, 2009 08:40PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 09, 2009 02:27AM | Registered: 16 years ago Posts: 703 |
Re: Making a Head-to-Head Online Game January 09, 2009 03:09AM | Admin Registered: 16 years ago Posts: 5,132 |
Re: Making a Head-to-Head Online Game January 09, 2009 03:23AM | Registered: 16 years ago Posts: 70 |
Re: Making a Head-to-Head Online Game January 09, 2009 06:56AM | Registered: 16 years ago Posts: 703 |
Quote
Matando
In the libogc examples there a network example. It's under "examples/gamecube/devices/network/".
Even though its for gamecube it should work on the wii, I really don't see why it wouldn't.
*edit: btw Happy belated Birthday :p
#--------------------------------------------------------------------------------- # Clear the implicit built in rules #--------------------------------------------------------------------------------- .SUFFIXES: #--------------------------------------------------------------------------------- ifeq ($(strip $(DEVKITPPC)),) $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") endif include $(DEVKITPPC)/wii_rules #--------------------------------------------------------------------------------- # TARGET is the name of the output # BUILD is the directory where object files & intermediate files will be placed # SOURCES is a list of directories containing source code # INCLUDES is a list of directories containing extra header files #--------------------------------------------------------------------------------- TARGET := $(notdir $(CURDIR)) BUILD := build SOURCES := source DATA := data INCLUDES := #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) CXXFLAGS = $(CFLAGS) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- LIBS := -ldb -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- LIBDIRS := #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional # rules for different file extensions #--------------------------------------------------------------------------------- ifneq ($(BUILD),$(notdir $(CURDIR))) #--------------------------------------------------------------------------------- export OUTPUT := $(CURDIR)/$(TARGET) export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ $(foreach dir,$(DATA),$(CURDIR)/$(dir)) export DEPSDIR := $(CURDIR)/$(BUILD) #--------------------------------------------------------------------------------- # automatically build a list of object files for our project #--------------------------------------------------------------------------------- CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #--------------------------------------------------------------------------------- # use CXX for linking C++ projects, CC for standard C #--------------------------------------------------------------------------------- ifeq ($(strip $(CPPFILES)),) export LD := $(CC) else export LD := $(CXX) endif export OFILES := $(addsuffix .o,$(BINFILES)) \ $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \ $(sFILES:.s=.o) $(SFILES:.S=.o) #--------------------------------------------------------------------------------- # build a list of include paths #--------------------------------------------------------------------------------- export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ -I$(CURDIR)/$(BUILD) \ -I$(LIBOGC_INC) #--------------------------------------------------------------------------------- # build a list of library paths #--------------------------------------------------------------------------------- export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \ -L$(LIBOGC_LIB) export OUTPUT := $(CURDIR)/$(TARGET) .PHONY: $(BUILD) clean #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile #--------------------------------------------------------------------------------- clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol #--------------------------------------------------------------------------------- else DEPENDS := $(OFILES:.o=.d) #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- $(OUTPUT).dol: $(OUTPUT).elf $(OUTPUT).elf: $(OFILES) #--------------------------------------------------------------------------------- # This rule links in binary data with the .jpg extension #--------------------------------------------------------------------------------- %.jpg.o : %.jpg #--------------------------------------------------------------------------------- @echo $(notdir $<) $(bin2o) -include $(DEPENDS) #--------------------------------------------------------------------------------- endif #---------------------------------------------------------------------------------
Re: Making a Head-to-Head Online Game January 09, 2009 09:00AM | Registered: 16 years ago Posts: 152 |
Re: Making a Head-to-Head Online Game January 09, 2009 09:23AM | Registered: 16 years ago Posts: 703 |